Whitespace changes

This commit fixes various whitespace differences between i386-nat.c
and i386-low.c.

gdb/
2014-06-18  Gary Benson  <gbenson@redhat.com>

	* i386-nat.c: Whitespace changes.

gdb/gdbserver/
2014-06-18  Gary Benson  <gbenson@redhat.com>

	* i386-low.c: Whitespace changes.
This commit is contained in:
Gary Benson
2014-06-17 13:11:56 +01:00
parent 6a83deeaa8
commit fc6e2f03be
4 changed files with 45 additions and 25 deletions

View File

@ -1,3 +1,7 @@
2014-06-18 Gary Benson <gbenson@redhat.com>
* i386-nat.c: Whitespace changes.
2014-06-17 Samuel Bronson <naesten@gmail.com> 2014-06-17 Samuel Bronson <naesten@gmail.com>
* MAINTAINERS: Update Roland McGrath's email address. * MAINTAINERS: Update Roland McGrath's email address.

View File

@ -1,3 +1,7 @@
2014-06-18 Gary Benson <gbenson@redhat.com>
* i386-low.c: Whitespace changes.
2014-06-12 Tom Tromey <tromey@redhat.com> 2014-06-12 Tom Tromey <tromey@redhat.com>
* utils.c (freeargv): Remove. * utils.c (freeargv): Remove.

View File

@ -136,7 +136,7 @@
/* Types of operations supported by i386_handle_nonaligned_watchpoint. */ /* Types of operations supported by i386_handle_nonaligned_watchpoint. */
typedef enum { WP_INSERT, WP_REMOVE, WP_COUNT } i386_wp_op_t; typedef enum { WP_INSERT, WP_REMOVE, WP_COUNT } i386_wp_op_t;
/* Implementation. */ /* Implementation. */
/* Clear the reference counts and forget everything we knew about the /* Clear the reference counts and forget everything we knew about the
@ -446,14 +446,16 @@ i386_low_insert_watchpoint (struct i386_debug_reg_state *state,
&& !(TARGET_HAS_DR_LEN_8 && len == 8)) && !(TARGET_HAS_DR_LEN_8 && len == 8))
|| addr % len != 0) || addr % len != 0)
{ {
retval = i386_handle_nonaligned_watchpoint (&local_state, WP_INSERT, retval = i386_handle_nonaligned_watchpoint (&local_state,
WP_INSERT,
addr, len, type); addr, len, type);
} }
else else
{ {
unsigned len_rw = i386_length_and_rw_bits (len, type); unsigned len_rw = i386_length_and_rw_bits (len, type);
retval = i386_insert_aligned_watchpoint (&local_state, addr, len_rw); retval = i386_insert_aligned_watchpoint (&local_state,
addr, len_rw);
} }
if (retval == 0) if (retval == 0)
@ -483,14 +485,16 @@ i386_low_remove_watchpoint (struct i386_debug_reg_state *state,
&& !(TARGET_HAS_DR_LEN_8 && len == 8)) && !(TARGET_HAS_DR_LEN_8 && len == 8))
|| addr % len != 0) || addr % len != 0)
{ {
retval = i386_handle_nonaligned_watchpoint (&local_state, WP_REMOVE, retval = i386_handle_nonaligned_watchpoint (&local_state,
WP_REMOVE,
addr, len, type); addr, len, type);
} }
else else
{ {
unsigned len_rw = i386_length_and_rw_bits (len, type); unsigned len_rw = i386_length_and_rw_bits (len, type);
retval = i386_remove_aligned_watchpoint (&local_state, addr, len_rw); retval = i386_remove_aligned_watchpoint (&local_state,
addr, len_rw);
} }
if (retval == 0) if (retval == 0)

View File

@ -39,7 +39,6 @@
struct i386_dr_low_type i386_dr_low; struct i386_dr_low_type i386_dr_low;
/* Support for 8-byte wide hw watchpoints. */ /* Support for 8-byte wide hw watchpoints. */
#define TARGET_HAS_DR_LEN_8 (i386_dr_low.debug_register_length == 8) #define TARGET_HAS_DR_LEN_8 (i386_dr_low.debug_register_length == 8)
@ -603,10 +602,14 @@ i386_insert_watchpoint (struct target_ops *self,
if (type == hw_read) if (type == hw_read)
return 1; /* unsupported */ return 1; /* unsupported */
if (((len != 1 && len !=2 && len !=4) && !(TARGET_HAS_DR_LEN_8 && len == 8)) if (((len != 1 && len != 2 && len != 4)
&& !(TARGET_HAS_DR_LEN_8 && len == 8))
|| addr % len != 0) || addr % len != 0)
{
retval = i386_handle_nonaligned_watchpoint (&local_state, retval = i386_handle_nonaligned_watchpoint (&local_state,
WP_INSERT, addr, len, type); WP_INSERT,
addr, len, type);
}
else else
{ {
unsigned len_rw = i386_length_and_rw_bits (len, type); unsigned len_rw = i386_length_and_rw_bits (len, type);
@ -639,10 +642,14 @@ i386_remove_watchpoint (struct target_ops *self,
commit the change back to the inferior. */ commit the change back to the inferior. */
struct i386_debug_reg_state local_state = *state; struct i386_debug_reg_state local_state = *state;
if (((len != 1 && len !=2 && len !=4) && !(TARGET_HAS_DR_LEN_8 && len == 8)) if (((len != 1 && len != 2 && len != 4)
&& !(TARGET_HAS_DR_LEN_8 && len == 8))
|| addr % len != 0) || addr % len != 0)
{
retval = i386_handle_nonaligned_watchpoint (&local_state, retval = i386_handle_nonaligned_watchpoint (&local_state,
WP_REMOVE, addr, len, type); WP_REMOVE,
addr, len, type);
}
else else
{ {
unsigned len_rw = i386_length_and_rw_bits (len, type); unsigned len_rw = i386_length_and_rw_bits (len, type);
@ -673,8 +680,8 @@ i386_region_ok_for_watchpoint (struct target_ops *self,
/* Compute how many aligned watchpoints we would need to cover this /* Compute how many aligned watchpoints we would need to cover this
region. */ region. */
nregs = i386_handle_nonaligned_watchpoint (state, nregs = i386_handle_nonaligned_watchpoint (state, WP_COUNT,
WP_COUNT, addr, len, hw_write); addr, len, hw_write);
return nregs <= DR_NADDR ? 1 : 0; return nregs <= DR_NADDR ? 1 : 0;
} }
@ -750,6 +757,7 @@ i386_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
i386_show_dr (state, "watchpoint_hit", addr, -1, hw_write); i386_show_dr (state, "watchpoint_hit", addr, -1, hw_write);
} }
} }
if (maint_show_dr && addr == 0) if (maint_show_dr && addr == 0)
i386_show_dr (state, "stopped_data_addr", 0, 0, hw_write); i386_show_dr (state, "stopped_data_addr", 0, 0, hw_write);