This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with getting function arguments and the right line number in a backtrace.


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]