* Disassemble arbitrary memory with disas?
@ 2009-05-22 21:36 Toshi Morita
2009-05-22 21:44 ` Joel Brobecker
2009-05-22 21:54 ` Andreas Schwab
0 siblings, 2 replies; 5+ messages in thread
From: Toshi Morita @ 2009-05-22 21:36 UTC (permalink / raw)
To: gdb
I'm currently debugging a JIT which dynamically generates code, and I'd like to disassemble it with the "disas" command in GDB.
However, since there isn't any symbolic information for the buffer in which the code is generated, GDB refuses to disassemble.
Is there a way to do this?
Please reply to tm314159 at yahoodotcom since I don't normally read this list.
Toshi
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Disassemble arbitrary memory with disas?
2009-05-22 21:36 Disassemble arbitrary memory with disas? Toshi Morita
@ 2009-05-22 21:44 ` Joel Brobecker
2009-05-22 21:51 ` Jonas Maebe
2009-05-22 21:54 ` Andreas Schwab
1 sibling, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2009-05-22 21:44 UTC (permalink / raw)
To: Toshi Morita; +Cc: gdb
> I'm currently debugging a JIT which dynamically generates code, and
> I'd like to disassemble it with the "disas" command in GDB.
>
> However, since there isn't any symbolic information for the buffer in
> which the code is generated, GDB refuses to disassemble.
I think that the "x /i" command should work. Have a look at the GDB
documentation on the "x" command, it should give you more details
about how to use the /something modifiers.
--
Joel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Disassemble arbitrary memory with disas?
2009-05-22 21:44 ` Joel Brobecker
@ 2009-05-22 21:51 ` Jonas Maebe
0 siblings, 0 replies; 5+ messages in thread
From: Jonas Maebe @ 2009-05-22 21:51 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Toshi Morita, gdb
On 22 May 2009, at 23:44, Joel Brobecker wrote:
> I think that the "x /i" command should work. Have a look at the GDB
> documentation on the "x" command, it should give you more details
> about how to use the /something modifiers.
Indeed. An alternative is "disassemble <start_address>
<stop_address>". "x/10i <address>" is easier to type though :)
Jonas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Disassemble arbitrary memory with disas?
2009-05-22 21:36 Disassemble arbitrary memory with disas? Toshi Morita
2009-05-22 21:44 ` Joel Brobecker
@ 2009-05-22 21:54 ` Andreas Schwab
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2009-05-22 21:54 UTC (permalink / raw)
To: Toshi Morita; +Cc: gdb
Toshi Morita <tm314159@yahoo.com> writes:
> I'm currently debugging a JIT which dynamically generates code, and I'd like to disassemble it with the "disas" command in GDB.
>
> However, since there isn't any symbolic information for the buffer in which the code is generated, GDB refuses to disassemble.
>
> Is there a way to do this?
(gdb) help disass
Disassemble a specified section of memory.
Default is the function surrounding the pc of the selected frame.
With a /m modifier, source lines are included (if available).
With a single argument, the function surrounding that address is dumped.
Two arguments are taken as a range of memory to dump.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Disassemble arbitrary memory with disas?
@ 2009-05-22 22:45 Toshi Morita
0 siblings, 0 replies; 5+ messages in thread
From: Toshi Morita @ 2009-05-22 22:45 UTC (permalink / raw)
To: Joel Brobecker, Jonas Maebe; +Cc: gdb
Thanks a lot!!
Will try it when I get back in the office on Tuesday!
Toshi
--- On Fri, 5/22/09, Jonas Maebe <jonas.maebe@elis.ugent.be> wrote:
> From: Jonas Maebe <jonas.maebe@elis.ugent.be>
> Subject: Re: Disassemble arbitrary memory with disas?
> To: "Joel Brobecker" <brobecker@adacore.com>
> Cc: "Toshi Morita" <tm314159@yahoo.com>, gdb@sourceware.org
> Date: Friday, May 22, 2009, 2:51 PM
>
> On 22 May 2009, at 23:44, Joel Brobecker wrote:
>
> > I think that the "x /i" command should work. Have a
> look at the GDB
> > documentation on the "x" command, it should give you
> more details
> > about how to use the /something modifiers.
>
> Indeed. An alternative is "disassemble
> <start_address> <stop_address>". "x/10i
> <address>" is easier to type though :)
>
>
> Jonas
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-22 22:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-22 21:36 Disassemble arbitrary memory with disas? Toshi Morita
2009-05-22 21:44 ` Joel Brobecker
2009-05-22 21:51 ` Jonas Maebe
2009-05-22 21:54 ` Andreas Schwab
2009-05-22 22:45 Toshi Morita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox