aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-08-16 18:31:03 +0000
committerDaniel Jacobowitz <drow@false.org>2006-08-16 18:31:03 +0000
commit2bc416ba69083af3af0fd150c0f00310abbb76f0 (patch)
treef10dfc397c20248a407dc2d3ef2fa5be105f1a2e /gdb
parent3e9e4fcfb0ec301e086dbc755a23d4fe42506368 (diff)
downloadgdb-2bc416ba69083af3af0fd150c0f00310abbb76f0.zip
gdb-2bc416ba69083af3af0fd150c0f00310abbb76f0.tar.gz
gdb-2bc416ba69083af3af0fd150c0f00310abbb76f0.tar.bz2
* remote.c, target.c: Strip trailing whitespace.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/remote.c60
-rw-r--r--gdb/target.c200
3 files changed, 134 insertions, 130 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0be5e72..fbc6fe5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2006-08-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * remote.c, target.c: Strip trailing whitespace.
+
2006-08-15 Daniel Jacobowitz <dan@codesourcery.com>
PR remote/1966
diff --git a/gdb/remote.c b/gdb/remote.c
index 6545094..6bc53ca 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -255,7 +255,7 @@ struct packet_reg
long regnum; /* GDB's internal register number. */
LONGEST pnum; /* Remote protocol register number. */
int in_g_packet; /* Always part of G packet. */
- /* long size in bytes; == register_size (current_gdbarch, regnum);
+ /* long size in bytes; == register_size (current_gdbarch, regnum);
at present. */
/* char *name; == REGISTER_NAME (regnum); at present. */
};
@@ -1041,12 +1041,12 @@ typedef int gdb_threadref; /* Internal GDB thread reference. */
struct gdb_ext_thread_info
{
threadref threadid; /* External form of thread reference. */
- int active; /* Has state interesting to GDB?
+ int active; /* Has state interesting to GDB?
regs, stack. */
- char display[256]; /* Brief state display, name,
+ char display[256]; /* Brief state display, name,
blocked/suspended. */
char shortname[32]; /* To be used to name threads. */
- char more_display[256]; /* Long info, statistics, queue depth,
+ char more_display[256]; /* Long info, statistics, queue depth,
whatever. */
};
@@ -1092,7 +1092,7 @@ static void copy_threadref (threadref *dest, threadref *src);
static int threadmatch (threadref *dest, threadref *src);
-static char *pack_threadinfo_request (char *pkt, int mode,
+static char *pack_threadinfo_request (char *pkt, int mode,
threadref *id);
static int remote_unpack_thread_info_response (char *pkt,
@@ -1101,7 +1101,7 @@ static int remote_unpack_thread_info_response (char *pkt,
*info);
-static int remote_get_threadinfo (threadref *threadid,
+static int remote_get_threadinfo (threadref *threadid,
int fieldset, /*TAG mask */
struct gdb_ext_thread_info *info);
@@ -1112,14 +1112,14 @@ static char *pack_threadlist_request (char *pkt, int startflag,
static int parse_threadlist_response (char *pkt,
int result_limit,
threadref *original_echo,
- threadref *resultlist,
+ threadref *resultlist,
int *doneflag);
static int remote_get_threadlist (int startflag,
threadref *nextthread,
int result_limit,
int *done,
- int *result_count,
+ int *result_count,
threadref *threadlist);
typedef int (*rmt_thread_action) (threadref *ref, void *context);
@@ -1819,13 +1819,13 @@ remote_threads_extra_info (struct thread_info *tp)
if (threadinfo.active)
{
if (*threadinfo.shortname)
- n += xsnprintf (&display_buf[0], sizeof (display_buf) - n,
+ n += xsnprintf (&display_buf[0], sizeof (display_buf) - n,
" Name: %s,", threadinfo.shortname);
if (*threadinfo.display)
- n += xsnprintf (&display_buf[n], sizeof (display_buf) - n,
+ n += xsnprintf (&display_buf[n], sizeof (display_buf) - n,
" State: %s,", threadinfo.display);
if (*threadinfo.more_display)
- n += xsnprintf (&display_buf[n], sizeof (display_buf) - n,
+ n += xsnprintf (&display_buf[n], sizeof (display_buf) - n,
" Priority: %s", threadinfo.more_display);
if (n > 0)
@@ -1853,7 +1853,7 @@ extended_remote_restart (void)
putpkt (rs->buf);
remote_fileio_reset ();
-
+
/* Now query for status so this looks just like we restarted
gdbserver from scratch. */
putpkt ("?");
@@ -2813,10 +2813,10 @@ cleanup_sigint_signal_handler (void *dummy)
{
signal (SIGINT, handle_sigint);
if (sigint_remote_twice_token)
- delete_async_signal_handler ((struct async_signal_handler **)
+ delete_async_signal_handler ((struct async_signal_handler **)
&sigint_remote_twice_token);
if (sigint_remote_token)
- delete_async_signal_handler ((struct async_signal_handler **)
+ delete_async_signal_handler ((struct async_signal_handler **)
&sigint_remote_token);
}
@@ -3069,18 +3069,18 @@ Packet: '%s'\n"),
phex_nz (pnum, 0), p, buf);
fieldsize = hex2bin (p, regs,
- register_size (current_gdbarch,
+ register_size (current_gdbarch,
reg->regnum));
p += 2 * fieldsize;
- if (fieldsize < register_size (current_gdbarch,
+ if (fieldsize < register_size (current_gdbarch,
reg->regnum))
warning (_("Remote reply is too short: %s"), buf);
- regcache_raw_supply (current_regcache,
+ regcache_raw_supply (current_regcache,
reg->regnum, regs);
}
if (*p++ != ';')
- error (_("Remote register badly formatted: %s\nhere: %s"),
+ error (_("Remote register badly formatted: %s\nhere: %s"),
buf, p);
}
}
@@ -3265,10 +3265,10 @@ Packet: '%s'\n"),
pnum, p, buf);
fieldsize = hex2bin (p, regs,
- register_size (current_gdbarch,
+ register_size (current_gdbarch,
reg->regnum));
p += 2 * fieldsize;
- if (fieldsize < register_size (current_gdbarch,
+ if (fieldsize < register_size (current_gdbarch,
reg->regnum))
warning (_("Remote reply is too short: %s"), buf);
regcache_raw_supply (current_regcache, reg->regnum, regs);
@@ -3878,7 +3878,7 @@ remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
check_binary_download (memaddr);
payload_size = get_memory_write_packet_size ();
-
+
/* The packet buffer will be large enough for the payload;
get_memory_packet_size ensures this. */
buf = rs->buf;
@@ -4274,7 +4274,7 @@ putpkt_binary (char *buf, int cnt)
case '$':
{
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"Packet instead of Ack, ignoring it\n");
/* It's probably an old response sent because an ACK
was lost. Gobble up the packet and ack it so it
@@ -4400,14 +4400,14 @@ read_frame (char **buf_p,
if (check_0 == SERIAL_TIMEOUT || check_1 == SERIAL_TIMEOUT)
{
if (remote_debug)
- fputs_filtered ("Timeout in checksum, retrying\n",
+ fputs_filtered ("Timeout in checksum, retrying\n",
gdb_stdlog);
return -1;
}
else if (check_0 < 0 || check_1 < 0)
{
if (remote_debug)
- fputs_filtered ("Communication error in checksum\n",
+ fputs_filtered ("Communication error in checksum\n",
gdb_stdlog);
return -1;
}
@@ -4574,7 +4574,7 @@ getpkt_sane (char **buf, long *sizeof_buf, int forever)
serial_write (remote_desc, "-", 1);
}
- /* We have tried hard enough, and just can't receive the packet.
+ /* We have tried hard enough, and just can't receive the packet.
Give up. */
printf_unfiltered (_("Ignoring packet error, continuing...\n"));
@@ -4989,7 +4989,7 @@ remote_insert_hw_breakpoint (struct bp_target_info *bp_tgt)
if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE)
return -1;
-
+
*(p++) = 'Z';
*(p++) = '1';
*(p++) = ',';
@@ -5733,7 +5733,7 @@ remote_is_async_p (void)
will be able to delay notifying the client of an event until the
point where an entire packet has been received. */
-static void (*async_client_callback) (enum inferior_event_type event_type,
+static void (*async_client_callback) (enum inferior_event_type event_type,
void *context);
static void *async_client_context;
static serial_event_ftype remote_async_serial_handler;
@@ -5747,7 +5747,7 @@ remote_async_serial_handler (struct serial *scb, void *context)
}
static void
-remote_async (void (*callback) (enum inferior_event_type event_type,
+remote_async (void (*callback) (enum inferior_event_type event_type,
void *context), void *context)
{
if (current_target.to_async_mask_value == 0)
@@ -5774,7 +5774,7 @@ static void
init_remote_async_ops (void)
{
remote_async_ops.to_shortname = "async";
- remote_async_ops.to_longname =
+ remote_async_ops.to_longname =
"Remote serial target in async version of the gdb-specific protocol";
remote_async_ops.to_doc =
"Use a remote computer via a serial line, using a gdb-specific protocol.\n\
@@ -5902,7 +5902,7 @@ _initialize_remote (void)
struct remote_state *rs;
/* architecture specific data */
- remote_gdbarch_data_handle =
+ remote_gdbarch_data_handle =
gdbarch_data_register_post_init (init_remote_state);
/* Old tacky stuff. NOTE: This comes after the remote protocol so
diff --git a/gdb/target.c b/gdb/target.c
index 7861372..65d24a5 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -167,7 +167,7 @@ static void debug_to_stop (void);
struct target_ops deprecated_child_ops;
/* Pointer to array of target architecture structures; the size of the
- array; the current index into the array; the allocated size of the
+ array; the current index into the array; the allocated size of the
array. */
struct target_ops **target_structs;
unsigned target_struct_size;
@@ -475,44 +475,44 @@ update_current_target (void)
if (!current_target.field) \
current_target.field = value
- de_fault (to_open,
- (void (*) (char *, int))
+ de_fault (to_open,
+ (void (*) (char *, int))
tcomplain);
- de_fault (to_close,
- (void (*) (int))
+ de_fault (to_close,
+ (void (*) (int))
target_ignore);
- de_fault (to_attach,
+ de_fault (to_attach,
maybe_kill_then_attach);
- de_fault (to_post_attach,
- (void (*) (int))
+ de_fault (to_post_attach,
+ (void (*) (int))
target_ignore);
- de_fault (to_detach,
- (void (*) (char *, int))
+ de_fault (to_detach,
+ (void (*) (char *, int))
target_ignore);
- de_fault (to_resume,
- (void (*) (ptid_t, int, enum target_signal))
+ de_fault (to_resume,
+ (void (*) (ptid_t, int, enum target_signal))
noprocess);
- de_fault (to_wait,
- (ptid_t (*) (ptid_t, struct target_waitstatus *))
+ de_fault (to_wait,
+ (ptid_t (*) (ptid_t, struct target_waitstatus *))
noprocess);
- de_fault (to_fetch_registers,
- (void (*) (int))
+ de_fault (to_fetch_registers,
+ (void (*) (int))
target_ignore);
- de_fault (to_store_registers,
- (void (*) (int))
+ de_fault (to_store_registers,
+ (void (*) (int))
noprocess);
- de_fault (to_prepare_to_store,
- (void (*) (void))
+ de_fault (to_prepare_to_store,
+ (void (*) (void))
noprocess);
- de_fault (deprecated_xfer_memory,
- (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *))
+ de_fault (deprecated_xfer_memory,
+ (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *))
nomemory);
- de_fault (to_files_info,
- (void (*) (struct target_ops *))
+ de_fault (to_files_info,
+ (void (*) (struct target_ops *))
target_ignore);
- de_fault (to_insert_breakpoint,
+ de_fault (to_insert_breakpoint,
memory_insert_breakpoint);
- de_fault (to_remove_breakpoint,
+ de_fault (to_remove_breakpoint,
memory_remove_breakpoint);
de_fault (to_can_use_hw_breakpoint,
(int (*) (int, int, int))
@@ -537,105 +537,105 @@ update_current_target (void)
return_zero);
de_fault (to_region_ok_for_hw_watchpoint,
default_region_ok_for_hw_watchpoint);
- de_fault (to_terminal_init,
- (void (*) (void))
+ de_fault (to_terminal_init,
+ (void (*) (void))
target_ignore);
- de_fault (to_terminal_inferior,
- (void (*) (void))
+ de_fault (to_terminal_inferior,
+ (void (*) (void))
target_ignore);
- de_fault (to_terminal_ours_for_output,
- (void (*) (void))
+ de_fault (to_terminal_ours_for_output,
+ (void (*) (void))
target_ignore);
- de_fault (to_terminal_ours,
- (void (*) (void))
+ de_fault (to_terminal_ours,
+ (void (*) (void))
target_ignore);
- de_fault (to_terminal_save_ours,
- (void (*) (void))
+ de_fault (to_terminal_save_ours,
+ (void (*) (void))
target_ignore);
- de_fault (to_terminal_info,
+ de_fault (to_terminal_info,
default_terminal_info);
- de_fault (to_kill,
- (void (*) (void))
+ de_fault (to_kill,
+ (void (*) (void))
noprocess);
- de_fault (to_load,
- (void (*) (char *, int))
+ de_fault (to_load,
+ (void (*) (char *, int))
tcomplain);
- de_fault (to_lookup_symbol,
- (int (*) (char *, CORE_ADDR *))
+ de_fault (to_lookup_symbol,
+ (int (*) (char *, CORE_ADDR *))
nosymbol);
- de_fault (to_create_inferior,
+ de_fault (to_create_inferior,
maybe_kill_then_create_inferior);
- de_fault (to_post_startup_inferior,
- (void (*) (ptid_t))
+ de_fault (to_post_startup_inferior,
+ (void (*) (ptid_t))
target_ignore);
- de_fault (to_acknowledge_created_inferior,
- (void (*) (int))
+ de_fault (to_acknowledge_created_inferior,
+ (void (*) (int))
target_ignore);
- de_fault (to_insert_fork_catchpoint,
- (void (*) (int))
+ de_fault (to_insert_fork_catchpoint,
+ (void (*) (int))
tcomplain);
- de_fault (to_remove_fork_catchpoint,
- (int (*) (int))
+ de_fault (to_remove_fork_catchpoint,
+ (int (*) (int))
tcomplain);
- de_fault (to_insert_vfork_catchpoint,
- (void (*) (int))
+ de_fault (to_insert_vfork_catchpoint,
+ (void (*) (int))
tcomplain);
- de_fault (to_remove_vfork_catchpoint,
- (int (*) (int))
+ de_fault (to_remove_vfork_catchpoint,
+ (int (*) (int))
tcomplain);
- de_fault (to_insert_exec_catchpoint,
- (void (*) (int))
+ de_fault (to_insert_exec_catchpoint,
+ (void (*) (int))
tcomplain);
- de_fault (to_remove_exec_catchpoint,
- (int (*) (int))
+ de_fault (to_remove_exec_catchpoint,
+ (int (*) (int))
tcomplain);
- de_fault (to_reported_exec_events_per_exec_call,
- (int (*) (void))
+ de_fault (to_reported_exec_events_per_exec_call,
+ (int (*) (void))
return_one);
- de_fault (to_has_exited,
- (int (*) (int, int, int *))
+ de_fault (to_has_exited,
+ (int (*) (int, int, int *))
return_zero);
- de_fault (to_mourn_inferior,
- (void (*) (void))
+ de_fault (to_mourn_inferior,
+ (void (*) (void))
noprocess);
- de_fault (to_can_run,
+ de_fault (to_can_run,
return_zero);
- de_fault (to_notice_signals,
- (void (*) (ptid_t))
+ de_fault (to_notice_signals,
+ (void (*) (ptid_t))
target_ignore);
- de_fault (to_thread_alive,
- (int (*) (ptid_t))
+ de_fault (to_thread_alive,
+ (int (*) (ptid_t))
return_zero);
- de_fault (to_find_new_threads,
- (void (*) (void))
+ de_fault (to_find_new_threads,
+ (void (*) (void))
target_ignore);
- de_fault (to_extra_thread_info,
- (char *(*) (struct thread_info *))
+ de_fault (to_extra_thread_info,
+ (char *(*) (struct thread_info *))
return_zero);
- de_fault (to_stop,
- (void (*) (void))
+ de_fault (to_stop,
+ (void (*) (void))
target_ignore);
current_target.to_xfer_partial = current_xfer_partial;
- de_fault (to_rcmd,
- (void (*) (char *, struct ui_file *))
+ de_fault (to_rcmd,
+ (void (*) (char *, struct ui_file *))
tcomplain);
- de_fault (to_enable_exception_callback,
- (struct symtab_and_line * (*) (enum exception_event_kind, int))
+ de_fault (to_enable_exception_callback,
+ (struct symtab_and_line * (*) (enum exception_event_kind, int))
nosupport_runtime);
- de_fault (to_get_current_exception_event,
- (struct exception_event_record * (*) (void))
+ de_fault (to_get_current_exception_event,
+ (struct exception_event_record * (*) (void))
nosupport_runtime);
- de_fault (to_pid_to_exec_file,
- (char *(*) (int))
+ de_fault (to_pid_to_exec_file,
+ (char *(*) (int))
return_zero);
- de_fault (to_can_async_p,
- (int (*) (void))
+ de_fault (to_can_async_p,
+ (int (*) (void))
return_zero);
- de_fault (to_is_async_p,
- (int (*) (void))
+ de_fault (to_is_async_p,
+ (int (*) (void))
return_zero);
- de_fault (to_async,
- (void (*) (void (*) (enum inferior_event_type, void*), void*))
+ de_fault (to_async,
+ (void (*) (void (*) (enum inferior_event_type, void*), void*))
tcomplain);
#undef de_fault
@@ -703,7 +703,7 @@ push_target (struct target_ops *t)
return (t != target_stack);
}
-/* Remove a target_ops vector from the stack, wherever it may be.
+/* Remove a target_ops vector from the stack, wherever it may be.
Return how many times it was removed (0 or 1). */
int
@@ -986,7 +986,7 @@ target_xfer_partial (struct target_ops *ops,
if (retval > 0 && myaddr != NULL)
{
int i;
-
+
fputs_unfiltered (", bytes =", gdb_stdlog);
for (i = 0; i < retval; i++)
{
@@ -999,11 +999,11 @@ target_xfer_partial (struct target_ops *ops,
}
fprintf_unfiltered (gdb_stdlog, "\n");
}
-
+
fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
}
}
-
+
fputc_unfiltered ('\n', gdb_stdlog);
}
return retval;
@@ -1068,7 +1068,7 @@ Mode for reading from readonly sections is %s.\n"),
static LONGEST
default_xfer_partial (struct target_ops *ops, enum target_object object,
- const char *annex, gdb_byte *readbuf,
+ const char *annex, gdb_byte *readbuf,
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
{
if (object == TARGET_OBJECT_MEMORY
@@ -1547,7 +1547,7 @@ target_resize_to_sections (struct target_ops *target, int num_added)
/* Check to see if anyone else was pointing to this structure.
If old_value was null, then no one was. */
-
+
if (old_value)
{
for (t = target_structs; t < target_structs + target_struct_size;
@@ -1567,7 +1567,7 @@ target_resize_to_sections (struct target_ops *target, int num_added)
current_target.to_sections_end = target->to_sections_end;
}
}
-
+
return old_count;
}
@@ -1960,7 +1960,7 @@ deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len,
}
fprintf_unfiltered (gdb_stdlog, "\n");
}
-
+
fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
}
}
@@ -2512,7 +2512,7 @@ command."),
show_targetdebug,
&setdebuglist, &showdebuglist);
- add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
+ add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
&trust_readonly, _("\
Set mode for reading from readonly sections."), _("\
Show mode for reading from readonly sections."), _("\