This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Problem with getting function arguments and the right line number in a backtrace.
- To: Eelco Chaudron <echaudron at extremenetworks dot com>
- Subject: Re: Problem with getting function arguments and the right line number in a backtrace.
- From: jtc at redback dot com (J.T. Conklin)
- Date: 20 Mar 2001 17:02:34 -0800
- Cc: "'gdb at sources dot redhat dot com'" <gdb at sources dot redhat dot com>
- References: <DF1D2451EDE9D311828000508B63751B46B5E2@nl-msexch-01.extremenetworks.com>
- Reply-To: jtc at redback dot com
>>>>> "Eelco" == Eelco Chaudron <echaudron@extremenetworks.com> writes:
Eelco> I'm trying to use GDB to analyze a memory / core dump made by a
Eelco> system running VxWorks in a MIPS environment. I wrote a target
Eelco> that should take care of this, all memory and register access
Eelco> seems to work, but I do have some problems with the source
Eelco> integration. I'm using GDB version 5.0 build 20010314.
I've implemented crash dumps for x86 and ppc based vxWorks systems. I
cannot recall doing anything special.
You need to ensure that your register and memory reads (for both code
(if your code space is in the dump) and data space). If it's botched
in any way, I can see the backtrace code messing up as it tries to
disassemble code to find function prologues.
What object file format does vxWorks MIPS use? ELF, a.out, coff,
ecoff? The x86 vxWorks system where I did crash dumps used a.out
(newer versions of vxWorks/x86 may use ELF), which does not store
section start addresses. I had to set these manually:
section .text &_sysInit
section .data &_etext
section .bss &_edata
To verify you are reading memory and registers correctly, I would make
sure that you can read (disassemble?) a function (and get sane results
of course); read a global variable; and read registers. To verify the
last one, you might want to write an assembly language function that
sets the registers to known patterns and then forces a crash.
I hope this helps, or at least gives you some ideas about where to go
next.
--jtc
--
J.T. Conklin
RedBack Networks