From: Siva Chandra <sivachandra@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: [RFC] Extend gdb.Breakpoint to allow setting a breakpoint at the current execution address
Date: Fri, 27 Apr 2012 19:13:00 -0000 [thread overview]
Message-ID: <CAGyQ6gx7-n33xmtVNYLjhPZy4i8O-JW+ZJMHMgofSD80frpLYA@mail.gmail.com> (raw)
In-Reply-To: <878vhh5gk8.fsf@fleche.redhat.com>
Continuing from http://sourceware.org/ml/gdb-patches/2012-04/msg01001.html
I am posting to gdb@ as it is more suitable now.
Siva> I didn't find a way to set a breakpoint at the current execution
Siva> address through the existing Python API.
Tom> I think you can use '*$pc' as the linespec.
Tom> Or you can get the value of the PC (any way you want) and use ('*%d' % pc).
I didn't want to use $pc explicitly as the manual only says "on most
machines" with regard to its meaning. I do not know of any machine
where PC does not mean the program counter though.
What are the other ways to get the value of the PC?
Thanks,
Siva Chandra
next parent reply other threads:[~2012-04-27 19:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGyQ6gwgaeptA6-C3-WFC6+1t_DW4pVc+pgJbQbAcZo=+SQ=bQ@mail.gmail.com>
[not found] ` <878vhh5gk8.fsf@fleche.redhat.com>
2012-04-27 19:13 ` Siva Chandra [this message]
2012-04-28 1:41 ` Tom Tromey
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=CAGyQ6gx7-n33xmtVNYLjhPZy4i8O-JW+ZJMHMgofSD80frpLYA@mail.gmail.com \
--to=sivachandra@google.com \
--cc=gdb@sourceware.org \
--cc=tromey@redhat.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