This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: unknowns "??" while debugging executable created for target i686-pc-linux-gnu
- From: vijay nag <vijunag at gmail dot com>
- To: gdb at sourceware dot org
- Date: Fri, 28 Jun 2013 15:26:11 +0530
- Subject: RE: unknowns "??" while debugging executable created for target i686-pc-linux-gnu
Hello,
I recently upgraded the compiler from gcc-3.3.6(i386) to
gcc-4.7.2(i686) to my project. gdb is having trouble printing the
back-trace when debugging is stopped by "ctrl + c".
I'm using gdb-7.5 configured for i686 target to debug my executable
~/vinag/gdb/bin/gdb -v
GNU gdb (GDB) 7.5
Copyright (C) 2012 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 "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Program received signal SIGINT, Interrupt.
0xb7fff410 in ?? ()
(gdb) bt
#0 0xb7fff410 in ?? ()
Cannot access memory at address 0x51
(gdb) info registers
eax 0xfffffffc -4
ecx 0x22 34
edx 0x5 5
ebx 0x1e8e8c88 512658568
esp 0xbffff2a8 0xbffff2a8
ebp 0x4d 0x4d
esi 0x5 5
edi 0x0 0
eip 0xb7fff410 0xb7fff410
eflags 0x246 [ PF ZF IF ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb)
Looks like frame-pointer $ebp is containing junk values and I don't
understand why it is containing junk values. However if I insert a
break-point at a location, gdb is somehow able to decode
the call stack.
Breakpoint 1, sn_assert_init (argc=5, argv=0xbffff844,
stackbot=stackbot@entry=0xbffff7c8, domain=7, procldatafunc=0x13087852
<sn_assert_fill_proclet_data>,
callgen=callgen@entry=0,
minicore_dir_suffix=minicore_dir_suffix@entry=0x0) at
snutil/sn_assert_handler.c:823
823 {
(gdb) bt
#0 assert_init (argc=5, argv=0xbffff844,
stackbot=stackbot@entry=0xbffff7c8, domain=7)..assert_handler.c:823
#1 0x12eedcec in main (argc=5, argv=0xbffff844, env=0xbffff85c) at main.c:256
(gdb) f 0
#0 assert_init (argc=5, argv=0xbffff844,
stackbot=stackbot@entry=0xbffff7c8, domain=7)...assert_handler.c:823
823 {
(gdb) info registers
eax 0x5 5
ecx 0x0 0
edx 0xbffffe32 -1073742286
ebx 0x1eb62400 515253248
esp 0xbffff75c 0xbffff75c
ebp 0xbffff7b8 0xbffff7b8
esi 0x0 0
edi 0x18f63d48 418790728
eip 0x1308abff 0x1308abff <assert_init>
eflags 0x286 [ PF SF IF ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) p *(0xbffff7b8 + 4)
$1 = 343195968
(gdb) info line *343195968
Line 292 of "libc-start.c" starts at address 0x1474c140
<__libc_start_main+464> and ends at 0x1474c148
<__libc_start_main+472>.
(gdb)
What could be the issue here ?