+2012-07-19 Michael Eager <eager@eagercon.com>
+
+ * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
+ to hw_execute.
+ * linux-x86-low.c (x86_insert_point, x86_remove_point):
+ Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
+ hardware breakpoint.
+
2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdbserver/linux-low.c (initialize_low): Call
return retval;
}
+#define Z_PACKET_HW_BP '1'
#define Z_PACKET_WRITE_WP '2'
#define Z_PACKET_READ_WP '3'
#define Z_PACKET_ACCESS_WP '4'
{
switch (type)
{
+ case Z_PACKET_HW_BP:
+ return hw_execute;
case Z_PACKET_WRITE_WP:
return hw_write;
case Z_PACKET_READ_WP:
struct process_info *proc = current_process ();
switch (type)
{
- case '0':
+ case '0': /* software-breakpoint */
{
int ret;
done_accessing_memory ();
return ret;
}
- case '2':
- case '3':
- case '4':
+ case '1': /* hardware-breakpoint */
+ case '2': /* write watchpoint */
+ case '3': /* read watchpoint */
+ case '4': /* access watchpoint */
return i386_low_insert_watchpoint (&proc->private->arch_private->debug_reg_state,
type, addr, len);
+
default:
/* Unsupported. */
return 1;
struct process_info *proc = current_process ();
switch (type)
{
- case '0':
+ case '0': /* software-breakpoint */
{
int ret;
done_accessing_memory ();
return ret;
}
- case '2':
- case '3':
- case '4':
+ case '1': /* hardware-breakpoint */
+ case '2': /* write watchpoint */
+ case '3': /* read watchpoint */
+ case '4': /* access watchpoint */
return i386_low_remove_watchpoint (&proc->private->arch_private->debug_reg_state,
type, addr, len);
default: