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]
Other format: [Raw text]

RE: Adding backtrace to an arm-based on-target debugger


>Hi Atul,
>
>The type of applications I am trying to debug using my arm-based stub
>are compiled with arm-elf-gcc. But these applications make certain
>system calls to an underlying module, which happens to be compiled
>using armcc.
>
>Another important point is that the application(compiled in
>arm-elf-gcc) and the underlying module(compiled in armcc) make use of
>the same stack.
>
>So, when I do a "bt" on the gdb prompt, the gdb has to parse the stack
>that contains symbols of both the arm-elf-gcc compiled code and the
>arm-cc compiled code. Can the gdb do that?

Hello Nagender,
I'm not sure if GDB can manage if both the compilers
have different "stack frame" formats.  Don't know if
your compilers generate incompatible stack frames.

>
>Regarding the gdb documentation, I find only description of the
>symbols(c, n, g etc) that are used but not the actual protocol or the
>actual handshaking mechanism, that is, I want to know what happens
>after you do a bt, s or a c on the gdb prompt. 
[1] The best ways is to see one of the standard stubs
in action with remote debug on:
(gdb) set debug remote 1



>Is the series of
>requests that the gdb makes to the stub documented?
Not exactly, but they should be pretty much standard
for most of arch.
For Ex.: When a breakpoint is reported to GDB by
the stub, it take PC to find corresponding source line,
SP to find argument values, etc.  The later results
in a few mem reads in the stack area.

Looking at the packets [1] and the GDB RSP document [2]
you should be able to figure out very easily all you want.
[2] http://www.cs.odu.edu/~public/gdbdocs/gdb_32.html

-regards,
 Atul T.
------------------------------------------------------------ 
A computer without Windows is like a fish without a bicycle!


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