summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-sparc-low.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-03-22 23:57:10 +0000
committerPedro Alves <palves@redhat.com>2009-03-22 23:57:10 +0000
commit1b3f60162b504e5231252b748e95913671c431a1 (patch)
tree599f2d4d4cb8c9951ff502f4232fa6d33fbb9c53 /gdb/gdbserver/linux-sparc-low.c
parenta07b2135dbda574558da179559ccc1cd335f896e (diff)
downloadbinutils-gdb-1b3f60162b504e5231252b748e95913671c431a1.tar.gz
* i387-fp.c, linux-arm-low.c, linux-cris-low.c,
linux-crisv32-low.c, linux-i386-low.c, linux-low.c, linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c, linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c, regcache.c, remote-utils.c, server.c, spu-low.c, target.h, thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c, Makefile.in, configure.ac: Fix whitespace throughout. * configure: Regenerate.
Diffstat (limited to 'gdb/gdbserver/linux-sparc-low.c')
-rw-r--r--gdb/gdbserver/linux-sparc-low.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/gdb/gdbserver/linux-sparc-low.c b/gdb/gdbserver/linux-sparc-low.c
index 9d59e0b2335..411e1a85734 100644
--- a/gdb/gdbserver/linux-sparc-low.c
+++ b/gdb/gdbserver/linux-sparc-low.c
@@ -49,10 +49,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 */
@@ -61,8 +61,8 @@ static int sparc_regmap[] = {
24*4, 25*4, 26*4, 27*4, 28*4, 29*4, 30*4, 31*4, /* f24 .. f31 */
/* F32 offset starts next to f31: 31*4+4 = 16 * 8. */
- 16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8, /* f32 .. f46 */
- 24*8, 25*8, 26*8, 27*8, 28*8, 29*8, 30*8, 31*8, /* f48 .. f62 */
+ 16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8, /* f32 .. f46 */
+ 24*8, 25*8, 26*8, 27*8, 28*8, 29*8, 30*8, 31*8, /* f48 .. f62 */
17 *8, /* pc */
18 *8, /* npc */
@@ -125,7 +125,7 @@ sparc_fill_gregset_to_stack (const void *buf)
memcpy(&addr, ((char *) buf) + sparc_regmap[find_regno("sp")], sizeof(addr));
addr += BIAS;
-
+
for (i = l0_regno; i <= i7_regno; i++)
{
collect_register (i, tmp_reg_buf);
@@ -139,12 +139,12 @@ sparc_fill_gregset (void *buf)
{
int i;
int range;
-
+
for (range = 0; range < N_GREGS_RANGES; range++)
for (i = gregs_ranges[range].regno_start; i <= gregs_ranges[range].regno_end; i++)
if (sparc_regmap[i] != -1)
- collect_register (i, ((char *) buf) + sparc_regmap[i]);
-
+ collect_register (i, ((char *) buf) + sparc_regmap[i]);
+
sparc_fill_gregset_to_stack (buf);
}
@@ -153,11 +153,11 @@ sparc_fill_fpregset (void *buf)
{
int i;
int range;
-
+
for (range = 0; range < N_FPREGS_RANGES; range++)
for (i = fpregs_ranges[range].regno_start; i <= fpregs_ranges[range].regno_end; i++)
collect_register (i, ((char *) buf) + sparc_regmap[i]);
-
+
}
static void
@@ -173,7 +173,7 @@ sparc_store_gregset_from_stack (const void *buf)
memcpy(&addr, ((char *) buf) + sparc_regmap[find_regno("sp")], sizeof(addr));
addr += BIAS;
-
+
for (i = l0_regno; i <= i7_regno; i++)
{
(*the_target->read_memory) (addr, tmp_reg_buf, sizeof(tmp_reg_buf));
@@ -190,14 +190,14 @@ sparc_store_gregset (const void *buf)
int range;
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++)
if (sparc_regmap[i] != -1)
- supply_register (i, ((char *) buf) + sparc_regmap[i]);
+ supply_register (i, ((char *) buf) + sparc_regmap[i]);
else
- supply_register (i, zerobuf);
-
+ supply_register (i, zerobuf);
+
sparc_store_gregset_from_stack (buf);
}
@@ -206,7 +206,7 @@ sparc_store_fpregset (const void *buf)
{
int i;
int range;
-
+
for (range = 0; range < N_FPREGS_RANGES; range++)
for (i = fpregs_ranges[range].regno_start; i <= fpregs_ranges[range].regno_end; i++)
supply_register (i, ((char *) buf) + sparc_regmap[i]);
@@ -234,7 +234,7 @@ sparc_breakpoint_at (CORE_ADDR where)
unsigned char insn[INSN_SIZE];
(*the_target->read_memory) (where, (unsigned char *) insn, sizeof(insn));
-
+
if (memcmp(sparc_breakpoint, insn, sizeof(insn)) == 0)
return 1;
@@ -284,4 +284,3 @@ struct linux_target_ops the_low_target = {
NULL, NULL, NULL, NULL,
NULL, NULL
};
-