aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-01-06 00:14:09 +0000
committerMichael Snyder <msnyder@vmware.com>2011-01-06 00:14:09 +0000
commit493e2a69a40a30bcabe6ad5390dbae9bab98015d (patch)
tree26db7cf93932e5a4ef54faa2d6572d2f8ef759e4 /gdb
parentb1ec4f36abd93b1386168e21a3f652288d7cd053 (diff)
downloadgdb-493e2a69a40a30bcabe6ad5390dbae9bab98015d.zip
gdb-493e2a69a40a30bcabe6ad5390dbae9bab98015d.tar.gz
gdb-493e2a69a40a30bcabe6ad5390dbae9bab98015d.tar.bz2
2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* gdbreplay.c: Shorten lines of >= 80 columns. * linux-low.c: Ditto. * linux-ppc-low.c: Ditto. * linux-s390-low.c: Ditto. * linux-sparc-low.c: Ditto. * linux-x86-low.c: Ditto. * linux-xtensa-low.c: Ditto. * mem-break.c: Ditto. * nto-low.c: Ditto. * regcache.h: Ditto. * remote-utils.c: Ditto. * server.c: Ditto. * server.h: Ditto. * thread-db.c: Ditto. * tracepoint.c: Ditto. * utils.c: Ditto. * win32-low.h: Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbserver/ChangeLog20
-rw-r--r--gdb/gdbserver/gdbreplay.c11
-rw-r--r--gdb/gdbserver/linux-low.c28
-rw-r--r--gdb/gdbserver/linux-ppc-low.c3
-rw-r--r--gdb/gdbserver/linux-s390-low.c15
-rw-r--r--gdb/gdbserver/linux-sparc-low.c30
-rw-r--r--gdb/gdbserver/linux-x86-low.c8
-rw-r--r--gdb/gdbserver/linux-xtensa-low.c3
-rw-r--r--gdb/gdbserver/mem-break.c3
-rw-r--r--gdb/gdbserver/nto-low.c3
-rw-r--r--gdb/gdbserver/regcache.h3
-rw-r--r--gdb/gdbserver/remote-utils.c10
-rw-r--r--gdb/gdbserver/server.c15
-rw-r--r--gdb/gdbserver/server.h9
-rw-r--r--gdb/gdbserver/thread-db.c3
-rw-r--r--gdb/gdbserver/tracepoint.c44
-rw-r--r--gdb/gdbserver/utils.c3
-rw-r--r--gdb/gdbserver/win32-low.h6
18 files changed, 151 insertions, 66 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 2871dd6..2933360 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,23 @@
+2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
+
+ * gdbreplay.c: Shorten lines of >= 80 columns.
+ * linux-low.c: Ditto.
+ * linux-ppc-low.c: Ditto.
+ * linux-s390-low.c: Ditto.
+ * linux-sparc-low.c: Ditto.
+ * linux-x86-low.c: Ditto.
+ * linux-xtensa-low.c: Ditto.
+ * mem-break.c: Ditto.
+ * nto-low.c: Ditto.
+ * regcache.h: Ditto.
+ * remote-utils.c: Ditto.
+ * server.c: Ditto.
+ * server.h: Ditto.
+ * thread-db.c: Ditto.
+ * tracepoint.c: Ditto.
+ * utils.c: Ditto.
+ * win32-low.h: Ditto.
+
2011-01-05 Joel Brobecker <brobecker@adacore.com>
* gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 47071ac..469b79a 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -243,7 +243,8 @@ remote_open (char *name)
/* Enable TCP keep alive process. */
tmp = 1;
- setsockopt (tmp_desc, SOL_SOCKET, SO_KEEPALIVE, (char *) &tmp, sizeof (tmp));
+ setsockopt (tmp_desc, SOL_SOCKET, SO_KEEPALIVE,
+ (char *) &tmp, sizeof (tmp));
/* Tell TCP not to delay small packets. This greatly speeds up
interactive response. */
@@ -254,8 +255,9 @@ remote_open (char *name)
#ifndef USE_WIN32API
close (tmp_desc); /* No longer need this */
- signal (SIGPIPE, SIG_IGN); /* If we don't do this, then gdbreplay simply
- exits when the remote side dies. */
+ signal (SIGPIPE, SIG_IGN); /* If we don't do this, then
+ gdbreplay simply exits when
+ the remote side dies. */
#else
closesocket (tmp_desc); /* No longer need this */
#endif
@@ -419,7 +421,8 @@ gdbreplay_version (void)
{
printf ("GNU gdbreplay %s%s\n"
"Copyright (C) 2011 Free Software Foundation, Inc.\n"
- "gdbreplay is free software, covered by the GNU General Public License.\n"
+ "gdbreplay is free software, covered by "
+ "the GNU General Public License.\n"
"This gdbreplay was configured as \"%s\"\n",
PKGVERSION, version, host_name);
}
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index ee685f4..93f3570 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1668,7 +1668,8 @@ linux_wait_for_event (ptid_t ptid, int *wstat, int options)
if (event_pid > 0
&& ptid_is_pid (ptid) && ptid_get_pid (ptid) != event_pid)
{
- struct lwp_info *event_child = find_lwp_pid (pid_to_ptid (event_pid));
+ struct lwp_info *event_child
+ = find_lwp_pid (pid_to_ptid (event_pid));
if (! WIFSTOPPED (*wstat))
mark_lwp_dead (event_child, *wstat);
@@ -2064,7 +2065,9 @@ retry:
ourstatus->value.integer = WEXITSTATUS (w);
if (debug_threads)
- fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
+ fprintf (stderr,
+ "\nChild exited with retcode = %x \n",
+ WEXITSTATUS (w));
}
else
{
@@ -2072,7 +2075,9 @@ retry:
ourstatus->value.sig = target_signal_from_host (WTERMSIG (w));
if (debug_threads)
- fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
+ fprintf (stderr,
+ "\nChild terminated with signal = %x \n",
+ WTERMSIG (w));
}
@@ -2296,7 +2301,8 @@ Check if we're already there.\n",
report_to_gdb = (!maybe_internal_trap
|| current_inferior->last_resume_kind == resume_step
|| event_child->stopped_by_watchpoint
- || (!step_over_finished && !bp_explains_trap && !trace_event)
+ || (!step_over_finished
+ && !bp_explains_trap && !trace_event)
|| gdb_breakpoint_here (event_child->stop_pc));
/* We found no reason GDB would want us to stop. We either hit one
@@ -3176,7 +3182,8 @@ need_step_over_p (struct inferior_list_entry *entry, void *dummy)
{
if (debug_threads)
fprintf (stderr,
- "Need step over [LWP %ld]? yes, found breakpoint at 0x%s\n",
+ "Need step over [LWP %ld]? yes, "
+ "found breakpoint at 0x%s\n",
lwpid_of (lwp), paddress (pc));
/* We've found an lwp that needs stepping over --- return 1 so
@@ -4045,9 +4052,13 @@ linux_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len)
register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE);
/* Round ending address up; get number of longwords that makes. */
register int count
- = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1) / sizeof (PTRACE_XFER_TYPE);
+ = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1)
+ / sizeof (PTRACE_XFER_TYPE);
+
/* Allocate buffer of that many longwords. */
- register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE));
+ register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *)
+ alloca (count * sizeof (PTRACE_XFER_TYPE));
+
int pid = lwpid_of (get_thread_lwp (current_inferior));
if (debug_threads)
@@ -4090,7 +4101,8 @@ linux_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len)
/* Copy data to be written over corresponding part of buffer. */
- memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)), myaddr, len);
+ memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)),
+ myaddr, len);
/* Write the entire buffer. */
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index 816906e..e19f10a 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -255,7 +255,8 @@ ppc_get_pc (struct regcache *regcache)
{
unsigned int pc;
(*the_target->read_memory) (addr, (unsigned char *) &pc, 4);
- return ((CORE_ADDR)1 << 63) | ((CORE_ADDR)fd << 32) | (CORE_ADDR) (pc - 4);
+ return ((CORE_ADDR)1 << 63)
+ | ((CORE_ADDR)fd << 32) | (CORE_ADDR) (pc - 4);
}
else if (register_size (0) == 4)
{
diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c
index 88e39ad..5c38e43 100644
--- a/gdb/gdbserver/linux-s390-low.c
+++ b/gdb/gdbserver/linux-s390-low.c
@@ -73,10 +73,14 @@ static int s390_regmap[] = {
static int s390_regmap_3264[] = {
PT_PSWMASK, PT_PSWADDR,
- PT_GPR0, PT_GPR0, PT_GPR1, PT_GPR1, PT_GPR2, PT_GPR2, PT_GPR3, PT_GPR3,
- PT_GPR4, PT_GPR4, PT_GPR5, PT_GPR5, PT_GPR6, PT_GPR6, PT_GPR7, PT_GPR7,
- PT_GPR8, PT_GPR8, PT_GPR9, PT_GPR9, PT_GPR10, PT_GPR10, PT_GPR11, PT_GPR11,
- PT_GPR12, PT_GPR12, PT_GPR13, PT_GPR13, PT_GPR14, PT_GPR14, PT_GPR15, PT_GPR15,
+ PT_GPR0, PT_GPR0, PT_GPR1, PT_GPR1,
+ PT_GPR2, PT_GPR2, PT_GPR3, PT_GPR3,
+ PT_GPR4, PT_GPR4, PT_GPR5, PT_GPR5,
+ PT_GPR6, PT_GPR6, PT_GPR7, PT_GPR7,
+ PT_GPR8, PT_GPR8, PT_GPR9, PT_GPR9,
+ PT_GPR10, PT_GPR10, PT_GPR11, PT_GPR11,
+ PT_GPR12, PT_GPR12, PT_GPR13, PT_GPR13,
+ PT_GPR14, PT_GPR14, PT_GPR15, PT_GPR15,
PT_ACR0, PT_ACR1, PT_ACR2, PT_ACR3,
PT_ACR4, PT_ACR5, PT_ACR6, PT_ACR7,
@@ -138,7 +142,8 @@ s390_collect_ptrace_register (struct regcache *regcache, int regno, char *buf)
}
static void
-s390_supply_ptrace_register (struct regcache *regcache, int regno, const char *buf)
+s390_supply_ptrace_register (struct regcache *regcache,
+ int regno, const char *buf)
{
int size = register_size (regno);
if (size < sizeof (long))
diff --git a/gdb/gdbserver/linux-sparc-low.c b/gdb/gdbserver/linux-sparc-low.c
index 530b4f1..d88bf0d 100644
--- a/gdb/gdbserver/linux-sparc-low.c
+++ b/gdb/gdbserver/linux-sparc-low.c
@@ -40,7 +40,8 @@
#define SPARC_F_REGS_NUM 48
#define SPARC_CONTROL_REGS_NUM 6
-#define sparc_num_regs (SPARC_R_REGS_NUM + SPARC_F_REGS_NUM + SPARC_CONTROL_REGS_NUM)
+#define sparc_num_regs \
+ (SPARC_R_REGS_NUM + SPARC_F_REGS_NUM + SPARC_CONTROL_REGS_NUM)
/* Each offset is multiplied by 8, because of the register size.
These offsets apply to the buffer sent/filled by ptrace.
@@ -49,10 +50,10 @@
static int sparc_regmap[] = {
/* These offsets correspond to GET/SETREGSET. */
- -1, 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, /* g0 .. g7 */
- 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, /* o0 .. o5, sp, o7 */
- -1, -1, -1, -1, -1, -1, -1, -1, /* l0 .. l7 */
- -1, -1, -1, -1, -1, -1, -1, -1, /* i0 .. i5, fp, i7 */
+ -1, 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, /* g0 .. g7 */
+ 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, /* o0 .. o5, sp, o7 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* l0 .. l7 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* i0 .. i5, fp, i7 */
/* Floating point registers offsets correspond to GET/SETFPREGSET. */
0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4, /* f0 .. f7 */
@@ -67,7 +68,8 @@ static int sparc_regmap[] = {
17 *8, /* pc */
18 *8, /* npc */
16 *8, /* state */
- /* FSR offset also corresponds to GET/SETFPREGSET, ans is placed next to f62. */
+ /* FSR offset also corresponds to GET/SETFPREGSET, ans is placed
+ next to f62. */
32 *8, /* fsr */
-1, /* fprs */
/* Y register is 32-bits length, but gdb takes care of that. */
@@ -141,7 +143,8 @@ sparc_fill_gregset (struct regcache *regcache, void *buf)
int range;
for (range = 0; range < N_GREGS_RANGES; range++)
- for (i = gregs_ranges[range].regno_start; i <= gregs_ranges[range].regno_end; i++)
+ for (i = gregs_ranges[range].regno_start;
+ i <= gregs_ranges[range].regno_end; i++)
if (sparc_regmap[i] != -1)
collect_register (regcache, i, ((char *) buf) + sparc_regmap[i]);
@@ -155,7 +158,8 @@ sparc_fill_fpregset (struct regcache *regcache, void *buf)
int range;
for (range = 0; range < N_FPREGS_RANGES; range++)
- for (i = fpregs_ranges[range].regno_start; i <= fpregs_ranges[range].regno_end; i++)
+ for (i = fpregs_ranges[range].regno_start;
+ i <= fpregs_ranges[range].regno_end; i++)
collect_register (regcache, i, ((char *) buf) + sparc_regmap[i]);
}
@@ -192,7 +196,8 @@ sparc_store_gregset (struct regcache *regcache, const void *buf)
memset (zerobuf, 0, sizeof(zerobuf));
for (range = 0; range < N_GREGS_RANGES; range++)
- for (i = gregs_ranges[range].regno_start; i <= gregs_ranges[range].regno_end; i++)
+ for (i = gregs_ranges[range].regno_start;
+ i <= gregs_ranges[range].regno_end; i++)
if (sparc_regmap[i] != -1)
supply_register (regcache, i, ((char *) buf) + sparc_regmap[i]);
else
@@ -226,7 +231,9 @@ sparc_get_pc (struct regcache *regcache)
return pc;
}
-static const unsigned char sparc_breakpoint[INSN_SIZE] = { 0x91, 0xd0, 0x20, 0x01 };
+static const unsigned char sparc_breakpoint[INSN_SIZE] = {
+ 0x91, 0xd0, 0x20, 0x01
+};
#define sparc_breakpoint_len INSN_SIZE
@@ -240,7 +247,8 @@ sparc_breakpoint_at (CORE_ADDR where)
if (memcmp(sparc_breakpoint, insn, sizeof(insn)) == 0)
return 1;
- /* If necessary, recognize more trap instructions here. GDB only uses TRAP Always. */
+ /* If necessary, recognize more trap instructions here. GDB only
+ uses TRAP Always. */
return 0;
}
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index a1c379b..88f177d 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -232,7 +232,8 @@ x86_get_thread_area (int lwpid, CORE_ADDR *addr)
idx = gs >> reg_thread_area;
if (ptrace (PTRACE_GET_THREAD_AREA,
- lwpid_of (lwp), (void *) (long) idx, (unsigned long) &desc) < 0)
+ lwpid_of (lwp),
+ (void *) (long) idx, (unsigned long) &desc) < 0)
return -1;
*addr = desc[1];
@@ -659,7 +660,8 @@ x86_linux_prepare_to_resume (struct lwp_info *lwp)
int i;
int pid = ptid_get_pid (ptid);
struct process_info *proc = find_process_pid (pid);
- struct i386_debug_reg_state *state = &proc->private->arch_private->debug_reg_state;
+ struct i386_debug_reg_state *state
+ = &proc->private->arch_private->debug_reg_state;
for (i = DR_FIRSTADDR; i <= DR_LASTADDR; i++)
x86_linux_dr_set (ptid, i, state->dr_mirror[i]);
@@ -1544,7 +1546,7 @@ add_insns (unsigned char *start, int len)
{ \
extern unsigned char start_ ## NAME, end_ ## NAME; \
add_insns (&start_ ## NAME, &end_ ## NAME - &start_ ## NAME); \
- __asm__ ("jmp end_" #NAME "\n" \
+ __asm__ ("jmp end_" #NAME "\n" \
"\t" "start_" #NAME ":" \
"\t" INSNS "\n" \
"\t" "end_" #NAME ":"); \
diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c
index 118c274..d9b76f0 100644
--- a/gdb/gdbserver/linux-xtensa-low.c
+++ b/gdb/gdbserver/linux-xtensa-low.c
@@ -172,7 +172,8 @@ xtensa_breakpoint_at (CORE_ADDR where)
(*the_target->read_memory) (where, (unsigned char *) &insn,
xtensa_breakpoint_len);
- return memcmp((char *)&insn, xtensa_breakpoint, xtensa_breakpoint_len) == 0;
+ return memcmp((char *) &insn,
+ xtensa_breakpoint, xtensa_breakpoint_len) == 0;
}
struct linux_target_ops the_low_target = {
diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c
index 56ff406..eea8c71 100644
--- a/gdb/gdbserver/mem-break.c
+++ b/gdb/gdbserver/mem-break.c
@@ -357,7 +357,8 @@ set_fast_tracepoint_jump (CORE_ADDR where,
the current shadow contents, because write_inferior_memory
updates any shadow memory with what we pass here, and we want
that to be a nop. */
- err = write_inferior_memory (where, fast_tracepoint_jump_shadow (jp), length);
+ err = write_inferior_memory (where, fast_tracepoint_jump_shadow (jp),
+ length);
if (err != 0)
{
if (debug_threads)
diff --git a/gdb/gdbserver/nto-low.c b/gdb/gdbserver/nto-low.c
index 40bd194..47d7a93 100644
--- a/gdb/gdbserver/nto-low.c
+++ b/gdb/gdbserver/nto-low.c
@@ -635,7 +635,8 @@ nto_fetch_registers (struct regcache *regcache, int regno)
{
const unsigned int registeroffset
= the_low_target.register_offset (regno);
- supply_register (regcache, regno, ((char *)&greg) + registeroffset);
+ supply_register (regcache, regno,
+ ((char *)&greg) + registeroffset);
}
}
else
diff --git a/gdb/gdbserver/regcache.h b/gdb/gdbserver/regcache.h
index 1461975..df3b261 100644
--- a/gdb/gdbserver/regcache.h
+++ b/gdb/gdbserver/regcache.h
@@ -93,6 +93,7 @@ void collect_register (struct regcache *regcache, int n, void *buf);
void collect_register_as_string (struct regcache *regcache, int n, char *buf);
-void collect_register_by_name (struct regcache *regcache, const char *name, void *buf);
+void collect_register_by_name (struct regcache *regcache,
+ const char *name, void *buf);
#endif /* REGCACHE_H */
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index ad58c68..69f102b 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -328,7 +328,8 @@ remote_open (char *name)
if (port == 0)
{
socklen_t len = sizeof (sockaddr);
- if (getsockname (listen_desc, (struct sockaddr *) &sockaddr, &len) < 0
+ if (getsockname (listen_desc,
+ (struct sockaddr *) &sockaddr, &len) < 0
|| len < sizeof (sockaddr))
perror_with_name ("Can't determine port");
port = ntohs (sockaddr.sin_port);
@@ -971,7 +972,8 @@ readchar (void)
if (readchar_bufcnt == 0)
{
- readchar_bufcnt = read (remote_desc, readchar_buf, sizeof (readchar_buf));
+ readchar_bufcnt = read (remote_desc, readchar_buf,
+ sizeof (readchar_buf));
if (readchar_bufcnt <= 0)
{
@@ -1083,7 +1085,9 @@ getpkt (char *buf)
if (noack_mode)
{
- fprintf (stderr, "Bad checksum, sentsum=0x%x, csum=0x%x, buf=%s [no-ack-mode, Bad medium?]\n",
+ fprintf (stderr,
+ "Bad checksum, sentsum=0x%x, csum=0x%x, "
+ "buf=%s [no-ack-mode, Bad medium?]\n",
(c1 << 4) + c2, csum, buf);
/* Not much we can do, GDB wasn't expecting an ack/nac. */
break;
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index b7300a4..d236cc4 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -654,7 +654,8 @@ handle_search_memory_1 (CORE_ADDR start_addr, CORE_ADDR search_space_len,
if (gdb_read_memory (read_addr, search_buf + keep_len,
nr_to_read) != 0)
{
- warning ("Unable to access target memory at 0x%lx, halting search.",
+ warning ("Unable to access target memory "
+ "at 0x%lx, halting search.",
(long) read_addr);
return -1;
}
@@ -1638,7 +1639,8 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
return;
}
- if (strncmp ("qSearch:memory:", own_buf, sizeof ("qSearch:memory:") - 1) == 0)
+ if (strncmp ("qSearch:memory:", own_buf,
+ sizeof ("qSearch:memory:") - 1) == 0)
{
require_running (own_buf);
handle_search_memory (own_buf, packet_len);
@@ -2164,7 +2166,8 @@ queue_stop_reply_callback (struct inferior_list_entry *entry, void *arg)
if (thread_stopped (thread))
{
if (debug_threads)
- fprintf (stderr, "Reporting thread %s as already stopped with %s\n",
+ fprintf (stderr,
+ "Reporting thread %s as already stopped with %s\n",
target_pid_to_str (entry->id),
target_waitstatus_to_string (&thread->last_status));
@@ -2264,7 +2267,8 @@ gdbserver_version (void)
{
printf ("GNU gdbserver %s%s\n"
"Copyright (C) 2011 Free Software Foundation, Inc.\n"
- "gdbserver is free software, covered by the GNU General Public License.\n"
+ "gdbserver is free software, covered by the "
+ "GNU General Public License.\n"
"This gdbserver was configured as \"%s\"\n",
PKGVERSION, version, host_name);
}
@@ -2295,7 +2299,8 @@ gdbserver_show_disableable (FILE *stream)
" vCont \tAll vCont packets\n"
" qC \tQuerying the current thread\n"
" qfThreadInfo\tThread listing\n"
- " Tthread \tPassing the thread specifier in the T stop reply packet\n"
+ " Tthread \tPassing the thread specifier in the "
+ "T stop reply packet\n"
" threads \tAll of the above\n");
}
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 5ade77d..22cf38b 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -71,7 +71,8 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap);
#endif
#ifndef ATTR_NORETURN
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
+#if defined(__GNUC__) && (__GNUC__ > 2 \
+ || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
#define ATTR_NORETURN __attribute__ ((noreturn))
#else
#define ATTR_NORETURN /* nothing */
@@ -79,7 +80,8 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap);
#endif
#ifndef ATTR_FORMAT
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4))
+#if defined(__GNUC__) && (__GNUC__ > 2 \
+ || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4))
#define ATTR_FORMAT(type, x, y) __attribute__ ((format(type, x, y)))
#else
#define ATTR_FORMAT(type, x, y) /* nothing */
@@ -427,7 +429,8 @@ int decode_xfer_write (char *buf, int packet_len, char **annex,
int decode_search_memory_packet (const char *buf, int packet_len,
CORE_ADDR *start_addrp,
CORE_ADDR *search_space_lenp,
- gdb_byte *pattern, unsigned int *pattern_lenp);
+ gdb_byte *pattern,
+ unsigned int *pattern_lenp);
int unhexify (char *bin, const char *hex, int count);
int hexify (char *hex, const char *bin, int count);
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index 5250575..529516e 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -428,7 +428,8 @@ thread_db_find_new_threads (void)
err = thread_db->td_ta_thr_iter_p (thread_db->thread_agent,
find_new_threads_callback,
&new_thread_count,
- TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
+ TD_THR_ANY_STATE,
+ TD_THR_LOWEST_PRIORITY,
TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
if (debug_threads)
fprintf (stderr, "Found %d threads in iteration %d.\n",
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index 171cadd..c9e9ead 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -130,8 +130,10 @@ trace_vdebug (const char *fmt, ...)
# define traceframes_created gdb_agent_traceframes_created
# define trace_state_variables gdb_agent_trace_state_variables
# define get_raw_reg gdb_agent_get_raw_reg
-# define get_trace_state_variable_value gdb_agent_get_trace_state_variable_value
-# define set_trace_state_variable_value gdb_agent_set_trace_state_variable_value
+# define get_trace_state_variable_value \
+ gdb_agent_get_trace_state_variable_value
+# define set_trace_state_variable_value \
+ gdb_agent_set_trace_state_variable_value
# define ust_loaded gdb_agent_ust_loaded
# define helper_thread_id gdb_agent_helper_thread_id
# define cmd_buf gdb_agent_cmd_buf
@@ -175,7 +177,7 @@ struct ipa_sym_addresses
#define STRINGIZE_1(STR) #STR
#define STRINGIZE(STR) STRINGIZE_1(STR)
-#define IPA_SYM(SYM) \
+#define IPA_SYM(SYM) \
{ \
STRINGIZE (gdb_agent_ ## SYM), \
offsetof (struct ipa_sym_addresses, addr_ ## SYM) \
@@ -4070,7 +4072,9 @@ get_context_regcache (struct tracepoint_hit_ctx *ctx)
#ifdef HAVE_UST
if (ctx->type == static_tracepoint)
{
- struct static_tracepoint_ctx *sctx = (struct static_tracepoint_ctx *) ctx;
+ struct static_tracepoint_ctx *sctx
+ = (struct static_tracepoint_ctx *) ctx;
+
if (!sctx->regcache_initted)
{
sctx->regcache_initted = 1;
@@ -4895,7 +4899,8 @@ traceframe_read_mem (int tfnum, CORE_ADDR addr,
/* Iterate through a traceframe's blocks, looking for memory. */
while ((dataptr = traceframe_find_block_type (dataptr,
- datasize - (dataptr - database),
+ datasize
+ - (dataptr - database),
tfnum, 'M')) != NULL)
{
memcpy (&maddr, dataptr, sizeof (maddr));
@@ -4957,7 +4962,8 @@ traceframe_read_tsv (int tsvnum, LONGEST *val)
/* Iterate through a traceframe's blocks, looking for the tsv. */
while ((dataptr = traceframe_find_block_type (dataptr,
- datasize - (dataptr - database),
+ datasize
+ - (dataptr - database),
tfnum, 'V')) != NULL)
{
memcpy (&vnum, dataptr, sizeof (vnum));
@@ -5149,7 +5155,8 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
&ipa_gdb_jump_pad_buffer_end))
fatal ("error extracting `gdb_jump_pad_buffer_end'");
- if (ipa_gdb_jump_pad_buffer <= stop_pc && stop_pc < ipa_gdb_jump_pad_buffer_end)
+ if (ipa_gdb_jump_pad_buffer <= stop_pc
+ && stop_pc < ipa_gdb_jump_pad_buffer_end)
{
/* We can tell which tracepoint(s) the thread is collecting by
matching the jump pad address back to the tracepoint. */
@@ -5539,7 +5546,8 @@ emit_void_call_2 (CORE_ADDR fn, int arg1)
static enum eval_result_type compile_bytecodes (struct agent_expr *aexpr);
static void
-compile_tracepoint_condition (struct tracepoint *tpoint, CORE_ADDR *jump_entry)
+compile_tracepoint_condition (struct tracepoint *tpoint,
+ CORE_ADDR *jump_entry)
{
CORE_ADDR entry_point = *jump_entry;
enum eval_result_type err;
@@ -6183,8 +6191,9 @@ download_trace_state_variables (void)
if (prev_ptr != 0)
{
/* Fixup the next pointer in the last item in the list. */
- write_inferior_data_ptr (prev_ptr + offsetof (struct trace_state_variable,
- next), 0);
+ write_inferior_data_ptr (prev_ptr
+ + offsetof (struct trace_state_variable,
+ next), 0);
}
}
@@ -6222,8 +6231,10 @@ upload_fast_traceframes (void)
return;
trace_debug ("ipa_traceframe_count (racy area): %d (w=%d, r=%d)",
- ipa_traceframe_write_count_racy - ipa_traceframe_read_count_racy,
- ipa_traceframe_write_count_racy, ipa_traceframe_read_count_racy);
+ ipa_traceframe_write_count_racy
+ - ipa_traceframe_read_count_racy,
+ ipa_traceframe_write_count_racy,
+ ipa_traceframe_read_count_racy);
if (ipa_traceframe_write_count_racy == ipa_traceframe_read_count_racy)
return;
@@ -6368,7 +6379,8 @@ upload_fast_traceframes (void)
block = add_traceframe_block (tframe, ipa_tframe.data_size);
if (block != NULL)
{
- if (read_inferior_memory (tf + offsetof (struct traceframe, data),
+ if (read_inferior_memory (tf
+ + offsetof (struct traceframe, data),
block, ipa_tframe.data_size))
error ("Uploading: Couldn't read traceframe data at %s\n",
paddress (tf + offsetof (struct traceframe, data)));
@@ -6416,7 +6428,8 @@ upload_fast_traceframes (void)
curr_tbctrl_idx,
(int) (ipa_trace_buffer_ctrl.start - ipa_trace_buffer_lo),
(int) (ipa_trace_buffer_ctrl.free - ipa_trace_buffer_lo),
- (int) (ipa_trace_buffer_ctrl.end_free - ipa_trace_buffer_lo),
+ (int) (ipa_trace_buffer_ctrl.end_free
+ - ipa_trace_buffer_lo),
(int) (ipa_trace_buffer_ctrl.wrap - ipa_trace_buffer_lo),
(int) (ipa_trace_buffer_hi - ipa_trace_buffer_lo));
}
@@ -7137,7 +7150,8 @@ probe_marker_at (char *packet)
"ltt_marker_connect (marker = %s/%s)",
m->channel, m->name);
- result = USTF(ltt_marker_connect) (m->channel, m->name, GDB_PROBE_NAME);
+ result = USTF(ltt_marker_connect) (m->channel, m->name,
+ GDB_PROBE_NAME);
if (result && result != -EEXIST)
trace_debug ("ltt_marker_connect (marker = %s/%s, errno = %d)",
m->channel, m->name, -result);
diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
index f98b37c..7e9000e 100644
--- a/gdb/gdbserver/utils.c
+++ b/gdb/gdbserver/utils.c
@@ -40,7 +40,8 @@ static void malloc_failure (size_t size) ATTR_NORETURN;
static void
malloc_failure (size_t size)
{
- fprintf (stderr, PREFIX "ran out of memory while trying to allocate %lu bytes\n",
+ fprintf (stderr,
+ PREFIX "ran out of memory while trying to allocate %lu bytes\n",
(unsigned long) size);
exit (1);
}
diff --git a/gdb/gdbserver/win32-low.h b/gdb/gdbserver/win32-low.h
index f0ad964..4099a98 100644
--- a/gdb/gdbserver/win32-low.h
+++ b/gdb/gdbserver/win32-low.h
@@ -55,10 +55,12 @@ struct win32_target_ops
void (*initial_stuff) (void);
/* Fetch the context from the inferior. */
- void (*get_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
+ void (*get_thread_context) (win32_thread_info *th,
+ DEBUG_EVENT *current_event);
/* Flush the context back to the inferior. */
- void (*set_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
+ void (*set_thread_context) (win32_thread_info *th,
+ DEBUG_EVENT *current_event);
/* Called when a thread was added. */
void (*thread_added) (win32_thread_info *th);