From: Anton Ertl <anton@mips.complang.tuwien.ac.at>
To: gdb@sourceware.org
Subject: Dealing with version-specific syntax
Date: Wed, 12 Jan 2011 19:28:00 -0000 [thread overview]
Message-ID: <20110112192750.GA30525@a4.complang.tuwien.ac.at> (raw)
What I am trying to do: Get the disassembly for a specific address
range. And I try to do it with gdb. The problem here ist that as far
as I can tell, up to gdb-7.0 the way to do this is
disassemble 0x404E22 0x404E40
Starting from gdb-7.1, this syntax is invalid, and instead we have to
use
disassemble 0x404E22,0x404E40
Unfortunately, this syntax does something else in gdb-7.0 and earlier
(it disassembles whole functions).
Is there a good way inside gdb for deciding which syntax to use?
Ideally, I would test if the space-separated syntax works, and use it
if it does, and otherwise use the comma-syntax. Or I might test for
the gdb version and use the syntax depending on that.
If there is no easy way, we will probably take the approach of testing
the gdb version outside of gdb.
- anton
next reply other threads:[~2011-01-12 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 19:28 Anton Ertl [this message]
2011-01-13 7:30 ` André Pönitz
2011-01-15 16:33 ` Anton Ertl
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=20110112192750.GA30525@a4.complang.tuwien.ac.at \
--to=anton@mips.complang.tuwien.ac.at \
--cc=gdb@sourceware.org \
/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