gdbserver: Support the "swbreak"/"hwbreak" stop reasons
authorPedro Alves <palves@redhat.com>
Wed, 4 Mar 2015 20:41:16 +0000 (20:41 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 4 Mar 2015 20:41:16 +0000 (20:41 +0000)
commit1ec68e26c982a256df03d22dce072b88ab117a73
tree55fa2034593a4191263d1ad05cd9f8dfb7752bab
parentfaf09f0119da40d9b408021ad5665a906e00ee59
gdbserver: Support the "swbreak"/"hwbreak" stop reasons

This patch teaches the core of gdbserver about the new "swbreak" and
"hwbreak" stop reasons, and adds the necessary hooks a backend needs
to implement to support the feature.

gdb/gdbserver/ChangeLog:
2015-03-04  Pedro Alves  <palves@redhat.com>

* remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
* server.c (swbreak_feature, hwbreak_feature): New globals.
(handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
(captured_main): Clear swbreak_feature and hwbreak_feature.
* server.h (swbreak_feature, hwbreak_feature): Declare.
* target.h (struct target_ops) <stopped_by_sw_breakpoint,
supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
supports_stopped_by_hw_breakpoint>: New fields.
(target_supports_stopped_by_sw_breakpoint)
(target_stopped_by_sw_breakpoint)
(target_supports_stopped_by_hw_breakpoint)
(target_stopped_by_hw_breakpoint): Declare.
gdb/gdbserver/ChangeLog
gdb/gdbserver/remote-utils.c
gdb/gdbserver/server.c
gdb/gdbserver/server.h
gdb/gdbserver/target.h