Re: [RFA] Fix watchpoints when stepping over a breakpoint

Andrew Cagney
2002-04-07T16:16:27Z

> No. In my original message I made a comment about shlib_event
>> > breakpoints being a problem. Other breakpoints would to. This is all
>> > because of the "watchpoint after instr, breakpoint before" thing - we
>> > would still have to deal with this, or we'd just keep hitting the same
>> > breakpoint over and over if there was a watchpoint on the next
>> > instruction.
>
>>
>> Sounds like Andrew was right: the decrement-PC logic is screwed.
>
>
> I agree. It's a rat's nest.

Only two targets use DECR_PC_AFTER_BREAK - m68k and i386. Core GDB
contans all all sorts of convoluted logic for what is a target problem :-(

What would it take to replace DECR_PC_AFTER_BREAK with a read_pc()
function that determines the stop address from the i386 hardware
registers and other state information?

(The m68k isn't multi-arch so I can fix that one by deleting it :-^)

Andrew