This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Avoid software breakpoint's instruction shadow inconsistency
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>, Luis Machado <lgustavo at codesourcery dot com>
- Date: Tue, 23 Sep 2014 19:34:36 +0100
- Subject: Re: [PATCH] Avoid software breakpoint's instruction shadow inconsistency
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 1 dot 10 dot 1409140447170 dot 27075 at tp dot orcam dot me dot uk> <5421B1B3 dot 7010106 at redhat dot com> <alpine dot DEB dot 1 dot 10 dot 1409231850520 dot 27075 at tp dot orcam dot me dot uk>
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