This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [RFC] Extend gdb.Breakpoint to allow setting a breakpoint at the current execution address
- From: Tom Tromey <tromey at redhat dot com>
- To: Siva Chandra <sivachandra at google dot com>
- Cc: gdb at sourceware dot org
- Date: Fri, 27 Apr 2012 19:41:25 -0600
- Subject: Re: [RFC] Extend gdb.Breakpoint to allow setting a breakpoint at the current execution address
- References: <CAGyQ6gwgaeptA6-C3-WFC6+1t_DW4pVc+pgJbQbAcZo=+SQ=bQ@mail.gmail.com> <878vhh5gk8.fsf@fleche.redhat.com> <CAGyQ6gx7-n33xmtVNYLjhPZy4i8O-JW+ZJMHMgofSD80frpLYA@mail.gmail.com>
>>>>> "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