public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* RE: Adding backtrace to an arm-based on-target debugger
@ 2004-07-12 11:11 Atul Talesara
  2004-07-12 13:56 ` Atul Talesara
  2004-07-27 21:48 ` using gdb for code compiled with armcc Nagender Telkar
  0 siblings, 2 replies; 3+ messages in thread
From: Atul Talesara @ 2004-07-12 11:11 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-27 21:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-12 11:11 Adding backtrace to an arm-based on-target debugger Atul Talesara
2004-07-12 13:56 ` Atul Talesara
2004-07-27 21:48 ` using gdb for code compiled with armcc Nagender Telkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).