summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-03-15 16:29:08 +0000
committerDaniel Jacobowitz <drow@false.org>2006-03-15 16:29:08 +0000
commit3e5af19ed9851916142fe98cc9c5d79c2c4f8302 (patch)
treea573b5b30b972af4d57a0e3d110b8d3dd792c2ca
parent21b0f40c16c85360417cfb1826348104ebd2f65e (diff)
downloadbinutils-gdb-3e5af19ed9851916142fe98cc9c5d79c2c4f8302.tar.gz
* mips-mdebug-tdep.c (compare_pdr_entries): Use bfd_get_signed_32
for code addresses. (non_heuristic_proc_desc): Likewise.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/mips-mdebug-tdep.c16
2 files changed, 14 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 826678c1265..e327c5fd0e7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
+ * mips-mdebug-tdep.c (compare_pdr_entries): Use bfd_get_signed_32
+ for code addresses.
+ (non_heuristic_proc_desc): Likewise.
+
+2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
+
* mips-linux-nat.c: Include "gdb_proc_service.h".
(PTRACE_GET_THREAD_AREA): Define.
(ps_get_thread_area): New.
diff --git a/gdb/mips-mdebug-tdep.c b/gdb/mips-mdebug-tdep.c
index 43e1c9646f8..db79713a6f4 100644
--- a/gdb/mips-mdebug-tdep.c
+++ b/gdb/mips-mdebug-tdep.c
@@ -2,8 +2,8 @@
the GNU Debugger.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -63,8 +63,8 @@ static bfd *the_bfd;
static int
compare_pdr_entries (const void *a, const void *b)
{
- CORE_ADDR lhs = bfd_get_32 (the_bfd, (bfd_byte *) a);
- CORE_ADDR rhs = bfd_get_32 (the_bfd, (bfd_byte *) b);
+ CORE_ADDR lhs = bfd_get_signed_32 (the_bfd, (bfd_byte *) a);
+ CORE_ADDR rhs = bfd_get_signed_32 (the_bfd, (bfd_byte *) b);
if (lhs < rhs)
return -1;
@@ -215,17 +215,17 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
PROC_LOW_ADDR (proc_desc) = pdr_pc;
PROC_FRAME_OFFSET (proc_desc)
- = bfd_get_32 (sec->objfile->obfd, ptr + 20);
+ = bfd_get_signed_32 (sec->objfile->obfd, ptr + 20);
PROC_FRAME_REG (proc_desc) = bfd_get_32 (sec->objfile->obfd,
ptr + 24);
PROC_REG_MASK (proc_desc) = bfd_get_32 (sec->objfile->obfd,
ptr + 4);
PROC_FREG_MASK (proc_desc) = bfd_get_32 (sec->objfile->obfd,
ptr + 12);
- PROC_REG_OFFSET (proc_desc) = bfd_get_32 (sec->objfile->obfd,
- ptr + 8);
+ PROC_REG_OFFSET (proc_desc)
+ = bfd_get_signed_32 (sec->objfile->obfd, ptr + 8);
PROC_FREG_OFFSET (proc_desc)
- = bfd_get_32 (sec->objfile->obfd, ptr + 16);
+ = bfd_get_signed_32 (sec->objfile->obfd, ptr + 16);
PROC_PC_REG (proc_desc) = bfd_get_32 (sec->objfile->obfd,
ptr + 28);
proc_desc->pdr.isym = (long) sym;