Mail Archives: djgpp/2013/06/08/12:56:45
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
X-Recipient: | djgpp AT delorie DOT com
|
X-Authenticated: | #27081556
|
X-Provags-ID: | V01U2FsdGVkX1/hCBJDhJDhmGw7Aie9tJXz9D/l+suSEcKRAVg2rA
|
| kHkMhP69sjGvrR
|
Message-ID: | <51B36263.6080309@gmx.de>
|
Date: | Sat, 08 Jun 2013 18:57:07 +0200
|
From: | Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
|
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2
|
MIME-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
Subject: | Programs compiled with gcc481 cannot be debugged with gdb.
|
X-Y-GMX-Trusted: | 0
|
Reply-To: | djgpp AT delorie DOT com
|
Please inspect the small program below:
#include <stdio.h>
void f(const int i)
{
printf("a=%d\n", i);
}
int main(void)
{
int a = 1;
f(a);
return a;
}
I have compiled it using gcc-4.8.1 with the following command:
gcc -Wall -g2 -O0 a.c
When I try to use gdb to step through the code I get
the following error message:
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i786-pc-msdosdjgpp --target=djgpp".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:/tmp/a.exe...done.
(gdb) b main
Breakpoint 1 at 0x1eba: file 1.c, line 10.
(gdb) r
Starting program: c:/tmp/a.exe
Breakpoint 1, main () at 1.c:10
10 int a = 1;
(gdb) s
11 f(a);
(gdb)
f (i=<error reading variable: can't compute CFA for this frame>) at 1.c:5
5 printf("a=%d\n", i);
(gdb) p i
can't compute CFA for this frame
(gdb)
The important issue is to try to step into a function.
As long as I do not step into a function every thing works OK.
The same happens if I use gcc480. If I use gcc473 every thing
works OK. The program itself runs flawlessly.
Am I missing something? Is the coff/dwarf support in gcc-4.8.N
brocken?
If more info is needed, please tell.
Regards,
Juan M. Guerrero
- Raw text -