public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: [RFC] Extend gdb.Breakpoint to allow setting a breakpoint at the current execution address
       [not found] ` <878vhh5gk8.fsf@fleche.redhat.com>
@ 2012-04-27 19:13   ` Siva Chandra
  2012-04-28  1:41     ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Siva Chandra @ 2012-04-27 19:13 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] Extend gdb.Breakpoint to allow setting a breakpoint at the current execution address
  2012-04-27 19:13   ` [RFC] Extend gdb.Breakpoint to allow setting a breakpoint at the current execution address Siva Chandra
@ 2012-04-28  1:41     ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2012-04-28  1:41 UTC (permalink / raw)
  To: Siva Chandra; +Cc: gdb

>>>>> "Siva" == Siva Chandra <sivachandra@google.com> writes:

Siva> I didn't want to use $pc explicitly as the manual only says "on most
Siva> machines" with regard to its meaning.  I do not know of any machine
Siva> where PC does not mean the program counter though.

Yeah.

Siva> What are the other ways to get the value of the PC?

gdb.Frame.pc is the simplest.  You can pick any frame, but for commands
the selected frame is the one that users expect.

Tom

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-28  1:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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   ` [RFC] Extend gdb.Breakpoint to allow setting a breakpoint at the current execution address Siva Chandra
2012-04-28  1:41     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).