X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Message-ID: <5592700D.1030105@iki.fi> Date: Tue, 30 Jun 2015 13:31:41 +0300 From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi)" User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:34.0) Gecko/20100101 Thunderbird/34.0 MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: gdb 7.0 and coff debug format failing. References: <5591A7A2 DOT 70505 AT gmx DOT de> <95c7ca20-6371-403a-a3dd-99ef7c081785 AT googlegroups DOT com> In-Reply-To: <95c7ca20-6371-403a-a3dd-99ef7c081785@googlegroups.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com 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 >> >> >> 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