This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/3] [GDBserver] Fix hardware breakpoint regressions


This series fixes hardware breakpoint regressions exposed by my fix
for "PR breakpoints/7143 - Watchpoint does not trigger when first
set", at https://sourceware.org/ml/gdb-patches/2014-03/msg00167.html

The testsuite caught them on Linux/x86_64, at least.  gdb.sum:

 FAIL: gdb.base/hbreak2.exp: next over recursive call
 FAIL: gdb.base/hbreak2.exp: backtrace from factorial(5.1)
 FAIL: gdb.base/hbreak2.exp: continue until exit at recursive next test

gdb.log:

 (gdb) next

 Program received signal SIGTRAP, Trace/breakpoint trap.
 factorial (value=4) at ../../../src/gdb/testsuite/gdb.base/break.c:113
 113       if (value > 1) {  /* set breakpoint 7 here */
 (gdb) FAIL: gdb.base/hbreak2.exp: next over recursive call

The series touches code in all GDBserver targets.  I tested it by
building GDBserver for:

 aarch64-linux-gnu
 arm-linux-gnueabihf
 i686-pc-linux-gnu
 i686-w64-mingw32
 m68k-linux-gnu
 mips-linux-gnu
 mips-uclinux
 nios2-linux-gnu
 powerpc-linux-gnu
 sh-linux-gnu
 tilegx-unknown-linux-gnu
 x86_64-redhat-linux
 x86_64-w64-mingw32

And also regression tested on x86_64 Fedora 17.

I think the target-side changes aren't that invasive, and problems
should be easy to fix.

Unless there are objections, I'd like to push it in soon.

For convenience, this series is also available at:
  git@github.com:palves/gdb.git hbreak2_v1

Pedro Alves (3):
  [GDBserver][Aarch64] Make watchpoint support use target_hw_bp_type.
  [GDBserver] Move Z packet defines and type convertion routines to
    shared code.
  [GDBserver] Make Zx/zx packet handling idempotent.

 gdb/gdbserver/i386-low.c                    |  23 -
 gdb/gdbserver/i386-low.h                    |   6 -
 gdb/gdbserver/linux-aarch64-low.c           | 121 +++--
 gdb/gdbserver/linux-arm-low.c               |  73 +--
 gdb/gdbserver/linux-crisv32-low.c           |  63 ++-
 gdb/gdbserver/linux-low.c                   |  18 +-
 gdb/gdbserver/linux-low.h                   |   8 +-
 gdb/gdbserver/linux-mips-low.c              |  59 +--
 gdb/gdbserver/linux-ppc-low.c               |   1 +
 gdb/gdbserver/linux-s390-low.c              |   1 +
 gdb/gdbserver/linux-sparc-low.c             |   1 +
 gdb/gdbserver/linux-x86-low.c               |  76 +--
 gdb/gdbserver/lynx-low.c                    |   1 +
 gdb/gdbserver/mem-break.c                   | 732 ++++++++++++++++++++++------
 gdb/gdbserver/mem-break.h                   |  86 +++-
 gdb/gdbserver/nto-low.c                     |  49 +-
 gdb/gdbserver/server.c                      |  57 +--
 gdb/gdbserver/spu-low.c                     |   1 +
 gdb/gdbserver/target.h                      |  23 +-
 gdb/gdbserver/win32-arm-low.c               |   1 +
 gdb/gdbserver/win32-i386-low.c              |  42 +-
 gdb/gdbserver/win32-low.c                   |  18 +-
 gdb/gdbserver/win32-low.h                   |   7 +-
 gdb/testsuite/gdb.base/break-idempotent.c   |  52 ++
 gdb/testsuite/gdb.base/break-idempotent.exp | 179 +++++++
 25 files changed, 1202 insertions(+), 496 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/break-idempotent.c
 create mode 100644 gdb/testsuite/gdb.base/break-idempotent.exp

-- 
1.7.11.7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]