diff options
author | Daniel Jacobowitz <drow@false.org> | 2001-11-17 20:31:18 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2001-11-17 20:31:18 +0000 |
commit | c215244117f848e06f0e10be5fc4514fdb954a0d (patch) | |
tree | 7d883a7efdece16fd22ddd89e980dbc7a6f40c1f /gdb/arm-linux-nat.c | |
parent | b0677c2eb2c7912e242107856de9b0f6c3acd717 (diff) | |
download | gdb-c215244117f848e06f0e10be5fc4514fdb954a0d.zip gdb-c215244117f848e06f0e10be5fc4514fdb954a0d.tar.gz gdb-c215244117f848e06f0e10be5fc4514fdb954a0d.tar.bz2 |
* arm-linux-nat.c: Don't include <asm/ptrace.h>.
(fetch_register): Use elf_gregset_t instead of struct pt_regs.
(fetch_regs): Likewise.
(store_register): Likewise.
(store_regs): Likewise.
Diffstat (limited to 'gdb/arm-linux-nat.c')
-rw-r--r-- | gdb/arm-linux-nat.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index 8438d72..52d6c64 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -29,8 +29,6 @@ #include <sys/utsname.h> #include <sys/procfs.h> -#include <asm/ptrace.h> - /* Prototypes for supply_gregset etc. */ #include "gregset.h" @@ -397,7 +395,7 @@ static void fetch_register (int regno) { int ret, tid; - struct pt_regs regs; + elf_gregset_t regs; /* Get the thread id for the ptrace call. */ tid = GET_THREAD_ID (inferior_ptid); @@ -410,20 +408,20 @@ fetch_register (int regno) } if (regno >= A1_REGNUM && regno < PC_REGNUM) - supply_register (regno, (char *) ®s.uregs[regno]); + supply_register (regno, (char *) ®s[regno]); if (PS_REGNUM == regno) { if (arm_apcs_32) - supply_register (PS_REGNUM, (char *) ®s.uregs[CPSR_REGNUM]); + supply_register (PS_REGNUM, (char *) ®s[CPSR_REGNUM]); else - supply_register (PS_REGNUM, (char *) ®s.uregs[PC_REGNUM]); + supply_register (PS_REGNUM, (char *) ®s[PC_REGNUM]); } if (PC_REGNUM == regno) { - regs.uregs[PC_REGNUM] = ADDR_BITS_REMOVE (regs.uregs[PC_REGNUM]); - supply_register (PC_REGNUM, (char *) ®s.uregs[PC_REGNUM]); + regs[PC_REGNUM] = ADDR_BITS_REMOVE (regs[PC_REGNUM]); + supply_register (PC_REGNUM, (char *) ®s[PC_REGNUM]); } } @@ -434,7 +432,7 @@ static void fetch_regs (void) { int ret, regno, tid; - struct pt_regs regs; + elf_gregset_t regs; /* Get the thread id for the ptrace call. */ tid = GET_THREAD_ID (inferior_ptid); @@ -447,15 +445,15 @@ fetch_regs (void) } for (regno = A1_REGNUM; regno < PC_REGNUM; regno++) - supply_register (regno, (char *) ®s.uregs[regno]); + supply_register (regno, (char *) ®s[regno]); if (arm_apcs_32) - supply_register (PS_REGNUM, (char *) ®s.uregs[CPSR_REGNUM]); + supply_register (PS_REGNUM, (char *) ®s[CPSR_REGNUM]); else - supply_register (PS_REGNUM, (char *) ®s.uregs[PC_REGNUM]); + supply_register (PS_REGNUM, (char *) ®s[PC_REGNUM]); - regs.uregs[PC_REGNUM] = ADDR_BITS_REMOVE (regs.uregs[PC_REGNUM]); - supply_register (PC_REGNUM, (char *) ®s.uregs[PC_REGNUM]); + regs[PC_REGNUM] = ADDR_BITS_REMOVE (regs[PC_REGNUM]); + supply_register (PC_REGNUM, (char *) ®s[PC_REGNUM]); } /* Store all general registers of the process from the values in @@ -465,7 +463,7 @@ static void store_register (int regno) { int ret, tid; - struct pt_regs regs; + elf_gregset_t regs; if (!register_valid[regno]) return; @@ -482,7 +480,7 @@ store_register (int regno) } if (regno >= A1_REGNUM && regno <= PC_REGNUM) - read_register_gen (regno, (char *) ®s.uregs[regno]); + read_register_gen (regno, (char *) ®s[regno]); ret = ptrace (PTRACE_SETREGS, tid, 0, ®s); if (ret < 0) @@ -496,7 +494,7 @@ static void store_regs (void) { int ret, regno, tid; - struct pt_regs regs; + elf_gregset_t regs; /* Get the thread id for the ptrace call. */ tid = GET_THREAD_ID (inferior_ptid); @@ -512,7 +510,7 @@ store_regs (void) for (regno = A1_REGNUM; regno <= PC_REGNUM; regno++) { if (register_valid[regno]) - read_register_gen (regno, (char *) ®s.uregs[regno]); + read_register_gen (regno, (char *) ®s[regno]); } ret = ptrace (PTRACE_SETREGS, tid, 0, ®s); |