mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
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.
This commit is contained in:
@@ -561,7 +561,7 @@ x86_insert_point (char type, CORE_ADDR addr, int len)
|
||||
struct process_info *proc = current_process ();
|
||||
switch (type)
|
||||
{
|
||||
case '0':
|
||||
case '0': /* software-breakpoint */
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -572,11 +572,13 @@ x86_insert_point (char type, CORE_ADDR addr, int len)
|
||||
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;
|
||||
@@ -589,7 +591,7 @@ x86_remove_point (char type, CORE_ADDR addr, int len)
|
||||
struct process_info *proc = current_process ();
|
||||
switch (type)
|
||||
{
|
||||
case '0':
|
||||
case '0': /* software-breakpoint */
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -600,9 +602,10 @@ x86_remove_point (char type, CORE_ADDR addr, int len)
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user