This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] stepping over permanent breakpoint
Pedro Alves wrote:
Not all architectures that run linux need PC adjustment. You're
thinking x86-linux. Anyway, I meant that you're breaking setting
a user breakpoint on top of a permanent breakpoint. Try
setting a breakpoint with "break *int3_addr", on top
of that int3, and running to it. When it is hit, you're moving
the PC passed it, so later calls to bpstat_stop_status like:
/* See if there is a breakpoint at the current PC. */
ecs->event_thread->stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
... will not see the permanent breakpoint, right?
Hmm... very interesting. I am not seeing what you suggest
(it works for me) but by looking at the code, I don't
understand why - I agree it should be broken as you say, but
for some reason it isn't. I will have to look into this a
bit more (I am working in gdb 6.7).
Mark's point about considering a trap instruction as a normal
instruction is valid, so I'm not sure if we'd want to do this
skipping by default or not. I'll let you guys fight
over it. :-)
Other than wanting to make gdb on qnx work, I have no strong
feelings about one way or the other... It was a thought.