From: Daniel Jacobowitz <drow@false.org>
To: Shaun Jackman <sjackman@gmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: Disassembling ARM and Thumb code
Date: Fri, 06 May 2005 04:08:00 -0000 [thread overview]
Message-ID: <20050506040755.GA7038@nevyn.them.org> (raw)
In-Reply-To: <7f45d93905050520353a1dc5ed@mail.gmail.com>
On Thu, May 05, 2005 at 08:35:02PM -0700, Shaun Jackman wrote:
> On 5/5/05, Daniel Jacobowitz <drow@false.org> wrote:
> > On Thu, May 05, 2005 at 05:05:56PM -0700, Shaun Jackman wrote:
> > > My ARM7TDMI processor is currently in Thumb mode, but the x/i command
> > > dissects the instruction as an ARM instruction. The symbol
> > > rdp_getargvsp is a Thumb symbol added using add-symbol-file [elf
> > > binary here]. What is the command to disassemble a given memory
> > > location as a Thumb instruction?
> >
> > How is it marked as Thumb in the binary?
>
> It's marked with a $t symbol at the same address.
>
> $ nm busybox | grep 020004dd
> 020004dd t $t
> 020004dd t rdp_getargvsp
>
> I haven't read this in documentation; only noticed it from empirical
> evidence. For example, here's a symbol compiled for ARM marked with a
> $a symbol at the same address.
>
> $ nm hello | grep 000081f8
> 000081f8 t $a
> 000081f8 T main
GDB doesn't understand ARM mapping symbols. It could, with some
work, but it doesn't yet. However it should understand the odd symbol
address. If that's not working, there's a bug somewhere.
> Hehe. I agree, that's probably not the best plan. However, for the
> unique case of 'x/i $pc' it does make a certain amount of sense to use
> the CPSR as a hint. I'm not sure if it's worth the special case
> though. An explicit switch to the x/i and disas commands to specify
> ARM or Thumb dissection is very much a good idea though.
Yes, probably; if you have a good idea for the syntax to use, then
maybe we can add it. I don't much like the idea of target-specific
modifiers.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-05-06 4:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 0:06 Shaun Jackman
2005-05-06 1:56 ` Daniel Jacobowitz
2005-05-06 3:35 ` Shaun Jackman
2005-05-06 4:08 ` Daniel Jacobowitz [this message]
2005-05-06 16:35 ` Shaun Jackman
2005-05-09 12:48 ` Richard Earnshaw
2005-05-09 16:07 ` Shaun Jackman
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=20050506040755.GA7038@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=sjackman@gmail.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