aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.c
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/gdbserver/linux-low.c
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/gdbserver/linux-low.c')
-rw-r--r--gdb/gdbserver/linux-low.c28
1 files changed, 20 insertions, 8 deletions
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. */