This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Problem with getting function arguments and the right line number in a backtrace.
- To: "'gdb at sources dot redhat dot com'" <gdb at sources dot redhat dot com>
- Subject: Problem with getting function arguments and the right line number in a backtrace.
- From: Eelco Chaudron <echaudron at extremenetworks dot com>
- Date: Mon, 19 Mar 2001 10:45:05 -0800
Hi all,
I'm trying to use GDB to analyze a memory / core dump made by a system
running VxWorks in a MIPS environment. I wrote a target that should take
care of this, all memory and register access seems to work, but I do have
some problems with the source integration. I'm using GDB version 5.0 build
20010314.
This is what happens; when I do a "back trace" this is the output:
(vxgdb) bt
#0 0x80625130 in dumpMem () at dump.c:475
...
...
The dump mem function is in dump.c, but it points to the last line of that
function:
(vxgdb) l
470 return (ERROR);
471
472 } while (size == TFTP_SEGSIZE);
473
474 return (OK);
475 }
Also the argument is not correct (i.e. the variables are not shown). If I do
a print for this function, I do see the right types:
(vxgdb) p dumpMem
$1 = {void (int)} 0x80625104 <dumpMem>
I'm not 100% sure all necessary debug information is in the binary/exec
file. What information is needed to get the right line number of the current
PC, and also is there a tool to check this (objdump etc.)?
Also for the arguments, what debug information is needed? If all the
information is in the files, which places in the source are a good start for
debugging?
I hope some one can help....?
Thanks,
Eelco
PS: This is the frame info...
(vxgdb) info frame
Stack level 0, frame at 0x83976d58:
pc = 0x80625130 in dumpMem (dump.c:475); saved pc 0x80669bd0
called by frame at 0x83976de8
source language c.
Arglist at 0x83976d58, args:
Locals at 0x83976d58, Previous frame's sp is 0x83976d58
Saved registers:
v0 at 0x83976d58, a0 at 0x83976d58, s8 at 0x83976d50, ra at 0x83976d54,
pc at 0x83976d54