From: Matt Rice <ratmice@gmail.com>
To: Hui Zhu <teawater@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: [Question] does GDB have a commands to get the end address of a function?
Date: Mon, 11 Jun 2012 19:36:00 -0000 [thread overview]
Message-ID: <CACTLOFrfioLWVYmaVB=4wpxjT-ACd9WP_js+j2hPKiA7vvVkHA@mail.gmail.com> (raw)
In-Reply-To: <CANFwon1pNMmDTN9O-M3mJr8u-3uBzxZFvgPXVx45acYh2xXocw@mail.gmail.com>
On Mon, Jun 11, 2012 at 2:36 AM, Hui Zhu <teawater@gmail.com> wrote:
> Now, I get the end address of a function with command "disassemble
> function_name".
> Does GDB have an command to output the end address of a function?
i'm not aware of anything, there is the following which could be made
into a user defined command or something.
py gdb.execute("p/x %s" %
gdb.block_for_pc(gdb.decode_line("*main")[1][0].pc).end)
seems to differ slightly from 'disassemble' I suppose by the length of
the last instruction
next prev parent reply other threads:[~2012-06-11 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 9:37 Hui Zhu
2012-06-11 19:36 ` Matt Rice [this message]
2012-06-11 20:42 ` Andreas Schwab
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='CACTLOFrfioLWVYmaVB=4wpxjT-ACd9WP_js+j2hPKiA7vvVkHA@mail.gmail.com' \
--to=ratmice@gmail.com \
--cc=gdb@sourceware.org \
--cc=teawater@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