diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2020-05-11 19:18:31 +0200 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2020-05-15 10:55:21 +0200 |
commit | 013707794a67269dd34fd8ae6e354e982c547dc0 (patch) | |
tree | 2893fa4b9a9a8dbbe628167ddebe6736c8b63184 /gdbserver | |
parent | 2a50b401465f74d7f3ee1654915b9070b4dc0fee (diff) | |
download | gdb-013707794a67269dd34fd8ae6e354e982c547dc0.zip gdb-013707794a67269dd34fd8ae6e354e982c547dc0.tar.gz gdb-013707794a67269dd34fd8ae6e354e982c547dc0.tar.bz2 |
Enable hardware breakpoints for gdbserver on Windows
When trying to use hardware breakpoints with gdbserver you get this error:
(gdb) hbreak main
Hardware assisted breakpoint 2 at 0x40162d: file gdb-9493.c, line 5.
(gdb) c
Continuing.
Warning:
Cannot insert hardware breakpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
It turns out the respective types just needed to be added to the
appropriate callback functions, because x86_dr_(insert|remove)_watchpoint
already handles them.
gdbserver/ChangeLog:
2020-05-15 Hannes Domani <ssbssa@yahoo.de>
* win32-i386-low.cc (i386_supports_z_point_type): Handle
Z_PACKET_HW_BP z_type.
(i386_insert_point): Handle raw_bkpt_type type.
(i386_remove_point): Likewise.
Diffstat (limited to 'gdbserver')
-rw-r--r-- | gdbserver/ChangeLog | 7 | ||||
-rw-r--r-- | gdbserver/win32-i386-low.cc | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 4853463..d2b2444 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2020-05-15 Hannes Domani <ssbssa@yahoo.de> + + * win32-i386-low.cc (i386_supports_z_point_type): Handle + Z_PACKET_HW_BP z_type. + (i386_insert_point): Handle raw_bkpt_type type. + (i386_remove_point): Likewise. + 2020-04-30 Hannes Domani <ssbssa@yahoo.de> * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj): diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc index 389ec49..410f10a 100644 --- a/gdbserver/win32-i386-low.cc +++ b/gdbserver/win32-i386-low.cc @@ -162,6 +162,7 @@ i386_supports_z_point_type (char z_type) { switch (z_type) { + case Z_PACKET_HW_BP: case Z_PACKET_WRITE_WP: case Z_PACKET_ACCESS_WP: return 1; @@ -176,6 +177,7 @@ i386_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, { switch (type) { + case raw_bkpt_type_hw: case raw_bkpt_type_write_wp: case raw_bkpt_type_access_wp: { @@ -197,6 +199,7 @@ i386_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, { switch (type) { + case raw_bkpt_type_hw: case raw_bkpt_type_write_wp: case raw_bkpt_type_access_wp: { |