aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-nat.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-07-10 01:35:53 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-07-10 01:35:53 +0000
commit34df79fc9d631a7cacdb2f9a9e12d5e3f8c6dd1c (patch)
tree90f72ebb31b2efb141be6ccc518e56eb37b0a701 /gdb/mips-nat.c
parentec1c752b34daada508decf3f978f0796f6008f77 (diff)
downloadgdb-34df79fc9d631a7cacdb2f9a9e12d5e3f8c6dd1c.zip
gdb-34df79fc9d631a7cacdb2f9a9e12d5e3f8c6dd1c.tar.gz
gdb-34df79fc9d631a7cacdb2f9a9e12d5e3f8c6dd1c.tar.bz2
* findvar.c, defs.h
({extract,store}_{signed_integer,unsigned_integer,address}): New routines to replace SWAP_TARGET_AND_HOST. All over: All uses of SWAP_TARGET_AND_HOST on integers replaced.
Diffstat (limited to 'gdb/mips-nat.c')
-rw-r--r--gdb/mips-nat.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index bcdec87..5e34f92 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -149,14 +149,15 @@ get_longjmp_target(pc)
CORE_ADDR *pc;
{
CORE_ADDR jb_addr;
+ char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
- jb_addr = read_register(A0_REGNUM);
+ jb_addr = read_register (A0_REGNUM);
- if (target_read_memory(jb_addr + JB_PC * JB_ELEMENT_SIZE, pc,
- sizeof(CORE_ADDR)))
+ if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
+ TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- SWAP_TARGET_AND_HOST(pc, sizeof(CORE_ADDR));
+ *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}