Re: [PATCH] Avoid software breakpoint's instruction shadow inconsistency

Maciej W. Rozycki
2014-09-23T18:34:48Z

On Tue, 23 Sep 2014, Maciej W. Rozycki wrote:

> > > This is also important for places
> > > like `find_single_step_breakpoint' where a breakpoint's address is
> > > compared to the raw value of $pc.
> > >
> >
> > AFAICS, insert_single_step_breakpoint also doesn't do
> > gdbarch_breakpoint_from_pc, so there doesn't seem to be a mismatch.
>
> The problem is `find_single_step_breakpoint' is called in the ordinary
> breakpoint removal path too, so that if a single-step breakpoint is placed
> at the same address, it is retained. I saw this place do bad things in
> testing my change before I adjusted it to use `reqstd_address'.

And this change alone is I believe what is responsible for the removal of
the following regressions:

FAIL: gdb.base/sss-bp-on-user-bp-2.exp: before/after disassembly matches
FAIL: gdb.base/sss-bp-on-user-bp-2.exp: stepi_del_break

in little-endian MIPS16 multilib testing and this regression:

FAIL: gdb.base/sss-bp-on-user-bp-2.exp: before/after disassembly matches

in big-endian MIPS16 multilib testing with this patch in place.

Maciej