Mail Archives: djgpp/2015/06/30/09:31:56
On 30.6.2015 1:00, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) wrote:
> On Monday, June 29, 2015 at 10:15:30 PM UTC+2, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) wrote:
>> I have compiled gdb 7.0 with both compilers gcc 5.1.0 and gcc 3.4.6 using
>> in both cases djdev205. The result is disapointing. I have compiled the
>> following small hello-world program:
>>
>> #include <stdio.h>
>>
>>
>> int print(const char *message)
>> {
>> int bytes;
>>
>> bytes = printf("This is the message: \"%s\"\n", message);
>>
>> return bytes;
>> }
>>
>> int main(void)
>> {
>> char message[] = "qwertz";
>> int bytes;
>>
>> bytes = print(message);
>>
>> return bytes;
>> }
>>
>>
>> If I use DWARF2 format everthing works as expected but if I use the coff debug
>> format I cannot step into the function that prints. I can step through the main
>> function with problems but I cannot step into functions. Off course the test program
>> has been compiled using gcc 3.4.6. The output of the info source command is:
>>
>> (gdb) info source
>> Current source file is a.c
>> Located in m:/_tests_gdb/a.c
>> Contains 21 lines.
>> Source language is c.
>> Compiled with COFF debugging format.
>> Does not include preprocessor macro info.
>>
>> so gcc 3.4.6 seems to produce coff debug info and gdb 7.0 seems to recognize
>> this. I will compile gdb 7.0 using djev203 and see if there is any difference.
>> I will also compile gdb 6.8a with djdev205, bnu225br2 and gcc346 to see if it
>> works better. Of course, all binaries used have been downloaded from
>> http://ap1.pp.fi/djgpp/next/v2gnu.
>> Any suggestions are welcome.
>>
This problem seems to happen not always
Used https://gmplib.org/pi-with-gmp.html as another example. For it
stepping into function works for some calls and does not for others
with gdb-7.7.1 when built with gdb-3.4.6 using COFF debugging info.
gdb-7.9.1 crashes (SIGABRT) in this case.
Andris
- Raw text -