From: Nagender Telkar <ntelkar@gmail.com>
To: Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
Cc: gdb@sources.redhat.com
Subject: Re: Adding backtrace to an arm-based on-target debugger
Date: Wed, 07 Jul 2004 20:25:00 -0000 [thread overview]
Message-ID: <3e599100040707132534373483@mail.gmail.com> (raw)
In-Reply-To: <40E8DA64.60705@codito.com>
Hello All,
I am trying to get the back trace working for an arm-based target
debugger. The remote gdb protocol does not specify about the
handshakes that go on between the gdb and the remote target.
I am using GNU gdb 6.0 configured as "--host=i686-pc-cygwin --target=arm-elf".
Can someone tell me which registers does the gdb use when it is trying
to do a backtrace?
On what basis does it send out the "$m" command?
What is the protocol involved?
What happens if the enviornment in which the application being
debugged is compiled by "armcc", but the debuggable application is
compiled in "arm-elf-gcc"?
The application being debugged(by arm-elf-gcc) jumps in and out of the
armcc compiled code.
The following is the set of register values shown on the gdb prompt. I
have also shown what happens after I do a "bt" at the command prompt.
Any help would be greatly appreciated. Thanks in advance.
Nagender
(gdb) i r
r0 0xd380c0 13861056
r1 0xb0c478 11584632
r2 0xd11a68 13703784
r3 0x0 0
r4 0xd38124 13861156
r5 0xd50aec 13961964
r6 0xb0c494 11584660
r7 0xb0c978 11585912
r8 0x0 0
r9 0xd3da98 13884056
r10 0x69817c 6914428
r11 0xb00fb0 11538352
r12 0xb00fb4 11538356
sp 0xb00d44 11537732
lr 0x602c 24620
pc 0x2058 8280
fps 0x0 0
cpsr 0x0 0
(gdb) bt
Sending packet: $mb00f98,4#66...Ack
Packet received: c080d300
#0 ET_SaveReport (pApp=0xd380c0) at et_dbfunctions.c:732
Sending packet: $mb00fac,4#b9...Ack
Packet received: 100bd500
Sending packet: $mb00fa4,4#8a...Ack
Packet received: cc0fb000
Sending packet: $mb00fac,4#b9...Ack
Packet received: 100bd500
Sending packet: $mb00fac,4#b9...Ack
Packet received: 100bd500
Sending packet: $mb00fcc,4#bb...Ack
Packet received: fc0ad500
Sending packet: $md50af4,4#91...Ack
Packet received: 04b04ce2
Sending packet: $md50af8,4#95...Ack
Packet received: 08d04de2
Sending packet: $md50afc,4#c0...Ack
Packet received: 14000be5
Sending packet: $md50b00,4#58...Ack
Packet received: 14301be5
Sending packet: $md50b04,4#5c...Ack
Packet received: 18300be5
Sending packet: $md50b08,4#60...Ack
Packet received: 18001be5
Sending packet: $md50b0c,4#8b...Ack
Packet received: 01f0ffeb
Sending packet: $md50b10,4#59...Ack
Packet received: 18001be5
Sending packet: $md50b14,4#5d...Ack
Packet received: e7eeffeb
Sending packet: $md50b18,4#61...Ack
Packet received: 18301be5
Sending packet: $md50b1c,4#8c...Ack
Packet received: 0c3093e5
Sending packet: $md50b20,4#5a...Ack
Packet received: 003093e5
Sending packet: $md50b24,4#5e...Ack
Packet received: 18201be5
Sending packet: $md50b28,4#62...Ack
Packet received: 2c4093e5
Sending packet: $md50b2c,4#8d...Ack
Packet received: 0c0092e5
Sending packet: $md50b30,4#5b...Ack
Packet received: bb1fa0e3
Sending packet: $mb00fa4,4#8a...Ack
Packet received: cc0fb000
Sending packet: $mb00fac,4#b9...Ack
Packet received: 100bd500
#1 0x00d50b10 in ?? ()
Sending packet: $mb00fac,4#b9...Ack
Packet received: 100bd500
Sending packet: $mb00fa4,4#8a...Ack
Packet received: cc0fb000
Sending packet: $mb00fac,4#b9...Ack
Packet received: 100bd500
Sending packet: $mb00fac,4#b9...Ack
Packet received: 100bd500
Sending packet: $mb00fcc,4#bb...Ack
Packet received: fc0ad500
Sending packet: $md50af4,4#91...Ack
Packet received: 04b04ce2
Sending packet: $md50af8,4#95...Ack
Packet received: 08d04de2
Sending packet: $md50afc,4#c0...Ack
Packet received: 14000be5
Sending packet: $md50b00,4#58...Ack
Packet received: 14301be5
Sending packet: $md50b04,4#5c...Ack
Packet received: 18300be5
Sending packet: $md50b08,4#60...Ack
Packet received: 18001be5
Sending packet: $md50b0c,4#8b...Ack
Packet received: 01f0ffeb
Sending packet: $md50b10,4#59...Ack
Packet received: 18001be5
Sending packet: $md50b14,4#5d...Ack
Packet received: e7eeffeb
Sending packet: $md50b18,4#61...Ack
Packet received: 18301be5
Sending packet: $md50b1c,4#8c...Ack
Packet received: 0c3093e5
Sending packet: $md50b20,4#5a...Ack
Packet received: 003093e5
Sending packet: $md50b24,4#5e...Ack
Packet received: 18201be5
Sending packet: $md50b28,4#62...Ack
Packet received: 2c4093e5
Sending packet: $md50b2c,4#8d...Ack
Packet received: 0c0092e5
Sending packet: $md50b30,4#5b...Ack
Packet received: bb1fa0e3
Sending packet: $mb00fac,4#b9...Ack
Packet received: 100bd500
(gdb)
On Mon, 05 Jul 2004 10:04:44 +0530, Ramana Radhakrishnan
<ramana.radhakrishnan@codito.com> wrote:
>
> >I am working on developing an on-target debugger for applications on
> >an arm-based target. I need to add a backtrace feature to it.
> >
> >Can someone tell me where to look for the gdb serial protocol?
> >
> >
> 1. info gdbint.
> 2. gdb/remote.c
>
> >When I do a "bt" on the gdb prompt I get only the current frame. It
> >does not go beyond the current frame. It is as shown below.
> >
> >#0 Test_Func(nValue=525, psValueBuf=0xb00f0c,
> >Sending packet: $mb00ee0,4#89...Ack
> >Packet received: 14000000
> > nValueBufSize=20) at et_amountctl.c:390
> >#1 0x00d4b9e4 in ?? ()
> >
> >Can you tell me what do I need to do in the target-side stub?
> >
> >
> >
> Please submit your problem with a script of your debug session showing
> exactly all that you did before this and a small testcase mentioning the
> version of gdb , gcc and binutils that you are currently using for this.
>
> You could take a look at the script command in bash or you could use
> emacs to capture the debug session using M-x gdb .
>
> cheers
> Ramana
>
next prev parent reply other threads:[~2004-07-07 20:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-05 0:40 Nagender Telkar
2004-07-05 4:35 ` Ramana Radhakrishnan
2004-07-07 20:25 ` Nagender Telkar [this message]
2004-07-08 5:26 Atul Talesara
[not found] <36993D449C7FA647BF43568E0793AB3E8C79F9@nevis_pune_xchg.pune.nevisnetworks.com>
2004-07-09 0:59 ` Nagender Telkar
2004-07-12 13:56 Atul Talesara
2004-07-12 11:11 ` Atul Talesara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e599100040707132534373483@mail.gmail.com \
--to=ntelkar@gmail.com \
--cc=gdb@sources.redhat.com \
--cc=ramana.radhakrishnan@codito.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox