aboutsummaryrefslogtreecommitdiff
path: root/gdb/m68klinux-nat.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-01-09 03:20:33 +0000
committerMichael Snyder <msnyder@vmware.com>2011-01-09 03:20:33 +0000
commit025bb325db8dce957db69eaf148c5bec373d4bb6 (patch)
tree0aec8dba9ee9dc28ad87284c4dfdfb0b01cdde50 /gdb/m68klinux-nat.c
parent1777feb0fea5ec350a86eecf81f71ccc60d4cf6f (diff)
downloadgdb-025bb325db8dce957db69eaf148c5bec373d4bb6.zip
gdb-025bb325db8dce957db69eaf148c5bec373d4bb6.tar.gz
gdb-025bb325db8dce957db69eaf148c5bec373d4bb6.tar.bz2
2011-01-08 Michael Snyder <msnyder@vmware.com>
* m2-exp.y: Comment cleanup, mostly periods and spaces. * m2-lang.c: Ditto. * m2-typeprint.c: Ditto. * m2-valprint.c: Ditto. * m32c-tdep.c: Ditto. * m32r-linux-nat.c: Ditto. * m32r-rom.c: Ditto. * m32r-tdep.c: Ditto. * m32r-tdep.h: Ditto. * m68hc11-tdep.c: Ditto. * m58klinux-nat.c: Ditto. * m68k-tdep.c: Ditto. * m88k-tdep.c: Ditto. * m88k-tdep.h: Ditto. * machoread.c: Ditto. * macrocmd.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * mdebugread.h: Ditto. * memattr.c: Ditto. * memattr.h: Ditto. * memory-map.h: Ditto. * mep-tdep.c: Ditto. * microblaze-rom.c: Ditto. * microblaze-tdep.c: Ditto. * minsyms.c: Ditto. * mips-irix-tdep.c: Ditto. * mips-linux-nat.c: Ditto. * mips-linux-tdep.c: Ditto. * mips-linux-tdep.h: Ditto. * mipsnbsd-nat.c: Ditto. * mipsnbsd-tdep.c: Ditto. * mipsread.c: Ditto. * mips-tdep.c: Ditto. * mips-tdep.h: Ditto. * mn10300-linux-tdep.c: Ditto. * mn10300-tdep.c: Ditto. * mn10300-tdep.h: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * moxie-tdep.c: Ditto. * moxie-tdep.h: Ditto. * mt-tdep.c: Ditto.
Diffstat (limited to 'gdb/m68klinux-nat.c')
-rw-r--r--gdb/m68klinux-nat.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index 43c3d6c..348f2cf 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -50,7 +50,7 @@
#include "target.h"
-/* Prototypes for supply_gregset etc. */
+/* Prototypes for supply_gregset etc. */
#include "gregset.h"
/* This table must line up with gdbarch_register_name in "m68k-tdep.c". */
@@ -106,10 +106,11 @@ fetch_register (struct regcache *regcache, int regno)
char buf[MAX_REGISTER_SIZE];
int tid;
- /* Overload thread id onto process id */
+ /* Overload thread id onto process id. */
tid = TIDGET (inferior_ptid);
if (tid == 0)
- tid = PIDGET (inferior_ptid); /* no thread id, just use process id */
+ tid = PIDGET (inferior_ptid); /* no thread id, just use
+ process id. */
regaddr = 4 * regmap[regno];
for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
@@ -127,7 +128,7 @@ fetch_register (struct regcache *regcache, int regno)
/* Fetch register values from the inferior.
If REGNO is negative, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
+ Otherwise, REGNO specifies which register (so we can save time). */
static void
old_fetch_inferior_registers (struct regcache *regcache, int regno)
@@ -147,7 +148,7 @@ old_fetch_inferior_registers (struct regcache *regcache, int regno)
}
}
-/* Store one register. */
+/* Store one register. */
static void
store_register (const struct regcache *regcache, int regno)
@@ -158,17 +159,18 @@ store_register (const struct regcache *regcache, int regno)
int tid;
char buf[MAX_REGISTER_SIZE];
- /* Overload thread id onto process id */
+ /* Overload thread id onto process id. */
tid = TIDGET (inferior_ptid);
if (tid == 0)
- tid = PIDGET (inferior_ptid); /* no thread id, just use process id */
+ tid = PIDGET (inferior_ptid); /* no thread id, just use
+ process id. */
regaddr = 4 * regmap[regno];
- /* Put the contents of regno into a local buffer */
+ /* Put the contents of regno into a local buffer. */
regcache_raw_collect (regcache, regno, buf);
- /* Store the local buffer into the inferior a chunk at the time. */
+ /* Store the local buffer into the inferior a chunk at the time. */
for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
{
errno = 0;
@@ -205,7 +207,7 @@ old_store_inferior_registers (const struct regcache *regcache, int regno)
/* Given a pointer to a general register set in /proc format
(elf_gregset_t *), unpack the register contents and supply
- them as gdb's idea of the current register values. */
+ them as gdb's idea of the current register values. */
void
supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp)
@@ -284,8 +286,13 @@ store_regs (const struct regcache *regcache, int tid, int regno)
#else
-static void fetch_regs (struct regcache *regcache, int tid) {}
-static void store_regs (const struct regcache *regcache, int tid, int regno) {}
+static void fetch_regs (struct regcache *regcache, int tid)
+{
+}
+
+static void store_regs (const struct regcache *regcache, int tid, int regno)
+{
+}
#endif
@@ -375,8 +382,13 @@ store_fpregs (const struct regcache *regcache, int tid, int regno)
#else
-static void fetch_fpregs (struct regcache *regcache, int tid) {}
-static void store_fpregs (const struct regcache *regcache, int tid, int regno) {}
+static void fetch_fpregs (struct regcache *regcache, int tid)
+{
+}
+
+static void store_fpregs (const struct regcache *regcache, int tid, int regno)
+{
+}
#endif
@@ -403,7 +415,7 @@ m68k_linux_fetch_inferior_registers (struct target_ops *ops,
/* GNU/Linux LWP ID's are process ID's. */
tid = TIDGET (inferior_ptid);
if (tid == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
/* Use the PTRACE_GETFPXREGS request whenever possible, since it
transfers more registers in one system call, and we'll cache the