aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>2001-01-22 20:23:25 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>2001-01-22 20:23:25 +0000
commitf6427adebb21b17d4dfb8e5a038b823ccb9e78ee (patch)
treef0a6f615ea8acad93ac264a8e92f4efd68c20ac7
parentd9fc371418344176be0fb3bfe3ff32c192586ee5 (diff)
downloadgdb-f6427adebb21b17d4dfb8e5a038b823ccb9e78ee.zip
gdb-f6427adebb21b17d4dfb8e5a038b823ccb9e78ee.tar.gz
gdb-f6427adebb21b17d4dfb8e5a038b823ccb9e78ee.tar.bz2
* ns32k-tdep.c: #include "frame.h"
* config/ns32k/tm-umax.h (FRAME_FIND_SAVED_REGS): Restore. It appears to have been inadvertantly removed sometime in May 1999. * Revert 2000-11-09 changes where shared library objects were moved from NATDEPFILES to TDEPFILES on NetBSD targets. While we'd like to be able to debug dynamically linked executables, this makes it impossible to build a cross debugger on a many hosts. * config/i386/nbsd.mt: Remove solib.o, solib-svr4.o from TDEPFILES. * config/i386/nbsdelf.mt: Likewise. * config/m68k/nbsd.mt: Likewise. * config/ns32k/nbsd.mt: Likewise. * config/powerpc/nbsd.mt: Likewise. * config/sparc/nbsd.mt: Likewise. * config/sparc/nbsdelf.mt: Likewise. * config/i386/nbsd.mh: Add solib.o, solib-svr4.o to NATDEPFILES. * config/i386/nbsdelf.mh: Likewise. * config/m68k/nbsd.mh: Likewise. * config/ns32k/nbsd.mh: Likewise. * config/powerpc/nbsd.mh: Likewise. * config/sparc/nbsd.mh: Likewise.
-rw-r--r--gdb/ChangeLog26
-rw-r--r--gdb/config/i386/nbsd.mh2
-rw-r--r--gdb/config/i386/nbsd.mt2
-rw-r--r--gdb/config/i386/nbsdelf.mh2
-rw-r--r--gdb/config/i386/nbsdelf.mt2
-rw-r--r--gdb/config/m68k/nbsd.mh2
-rw-r--r--gdb/config/m68k/nbsd.mt2
-rw-r--r--gdb/config/ns32k/nbsd.mh2
-rw-r--r--gdb/config/ns32k/nbsd.mt2
-rw-r--r--gdb/config/ns32k/tm-umax.h37
-rw-r--r--gdb/config/powerpc/nbsd.mh2
-rw-r--r--gdb/config/powerpc/nbsd.mt2
-rw-r--r--gdb/config/sparc/nbsd.mh2
-rw-r--r--gdb/config/sparc/nbsd.mt2
-rw-r--r--gdb/config/sparc/nbsdelf.mh2
-rw-r--r--gdb/ns32k-tdep.c1
16 files changed, 75 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ffaf8d3..6206f21 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,29 @@
+2001-01-22 J.T. Conklin <jtc@redback.com>
+
+ * ns32k-tdep.c: #include "frame.h"
+ * config/ns32k/tm-umax.h (FRAME_FIND_SAVED_REGS): Restore. It
+ appears to have been inadvertantly removed sometime in May 1999.
+
+ * Revert 2000-11-09 changes where shared library objects were
+ moved from NATDEPFILES to TDEPFILES on NetBSD targets. While
+ we'd like to be able to debug dynamically linked executables,
+ this makes it impossible to build a cross debugger on a many
+ hosts.
+
+ * config/i386/nbsd.mt: Remove solib.o, solib-svr4.o from TDEPFILES.
+ * config/i386/nbsdelf.mt: Likewise.
+ * config/m68k/nbsd.mt: Likewise.
+ * config/ns32k/nbsd.mt: Likewise.
+ * config/powerpc/nbsd.mt: Likewise.
+ * config/sparc/nbsd.mt: Likewise.
+ * config/sparc/nbsdelf.mt: Likewise.
+ * config/i386/nbsd.mh: Add solib.o, solib-svr4.o to NATDEPFILES.
+ * config/i386/nbsdelf.mh: Likewise.
+ * config/m68k/nbsd.mh: Likewise.
+ * config/ns32k/nbsd.mh: Likewise.
+ * config/powerpc/nbsd.mh: Likewise.
+ * config/sparc/nbsd.mh: Likewise.
+
2001-01-19 Jason Merrill <jason@redhat.com>
* dbxread.c (read_ofile_symtab): Stay with AUTO_DEMANGLING for G++.
diff --git a/gdb/config/i386/nbsd.mh b/gdb/config/i386/nbsd.mh
index 78fed46..dce0eb5 100644
--- a/gdb/config/i386/nbsd.mh
+++ b/gdb/config/i386/nbsd.mh
@@ -1,5 +1,5 @@
# Host: Intel 386 running NetBSD
XDEPFILES=
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o i386nbsd-nat.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o i386nbsd-nat.o solib.o solib-svr4.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
diff --git a/gdb/config/i386/nbsd.mt b/gdb/config/i386/nbsd.mt
index 4fa592c..aede1c3 100644
--- a/gdb/config/i386/nbsd.mt
+++ b/gdb/config/i386/nbsd.mt
@@ -1,5 +1,5 @@
# Target: Intel 386 running NetBSD
-TDEPFILES= i386-tdep.o i387-tdep.o i386nbsd-tdep.o solib.o solib-svr4.o
+TDEPFILES= i386-tdep.o i387-tdep.o i386nbsd-tdep.o
TM_FILE= tm-nbsd.h
GDBSERVER_DEPFILES= low-nbsd.o
diff --git a/gdb/config/i386/nbsdelf.mh b/gdb/config/i386/nbsdelf.mh
index 993be01..10e22dc 100644
--- a/gdb/config/i386/nbsdelf.mh
+++ b/gdb/config/i386/nbsdelf.mh
@@ -1,5 +1,5 @@
# Host: Intel 386 running NetBSD
XDEPFILES=
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o i386nbsd-nat.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o i386nbsd-nat.o solib.o solib-svr4.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsdelf.h
diff --git a/gdb/config/i386/nbsdelf.mt b/gdb/config/i386/nbsdelf.mt
index e7bff44..2782173 100644
--- a/gdb/config/i386/nbsdelf.mt
+++ b/gdb/config/i386/nbsdelf.mt
@@ -1,5 +1,5 @@
# Target: Intel 386 running NetBSD
-TDEPFILES= i386-tdep.o i387-tdep.o solib.o solib-svr4.o
+TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-nbsdelf.h
GDBSERVER_DEPFILES= low-nbsd.o
diff --git a/gdb/config/m68k/nbsd.mh b/gdb/config/m68k/nbsd.mh
index 0815d71..4300ff9 100644
--- a/gdb/config/m68k/nbsd.mh
+++ b/gdb/config/m68k/nbsd.mh
@@ -1,5 +1,5 @@
# Host: Motorola m68k running NetBSD
XDEPFILES=
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o m68knbsd-nat.o
+NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o m68knbsd-nat.o solib.o solib-svr4.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
diff --git a/gdb/config/m68k/nbsd.mt b/gdb/config/m68k/nbsd.mt
index fabc84b..5bfaa49 100644
--- a/gdb/config/m68k/nbsd.mt
+++ b/gdb/config/m68k/nbsd.mt
@@ -1,5 +1,5 @@
# Target: Motorola m68k running NetBSD
-TDEPFILES= m68k-tdep.o m68knbsd-tdep.o solib.o solib-svr4.o
+TDEPFILES= m68k-tdep.o m68knbsd-tdep.o
TM_FILE= tm-nbsd.h
GDBSERVER_DEPFILES= low-nbsd.o
diff --git a/gdb/config/ns32k/nbsd.mh b/gdb/config/ns32k/nbsd.mh
index 14d374c..711cbe4 100644
--- a/gdb/config/ns32k/nbsd.mh
+++ b/gdb/config/ns32k/nbsd.mh
@@ -1,5 +1,5 @@
# Host: PC532 running NetBSD
XDEPFILES=
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o ns32knbsd-nat.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o ns32knbsd-nat.o solib.o solib-svr4.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
diff --git a/gdb/config/ns32k/nbsd.mt b/gdb/config/ns32k/nbsd.mt
index 1656978b..6eb8637 100644
--- a/gdb/config/ns32k/nbsd.mt
+++ b/gdb/config/ns32k/nbsd.mt
@@ -1,5 +1,5 @@
# Target: PC532 running NetBSD
-TDEPFILES= ns32k-tdep.o solib.o solib-svr4.o
+TDEPFILES= ns32k-tdep.o
TM_FILE= tm-nbsd.h
GDBSERVER_DEPFILES= low-nbsd.o
diff --git a/gdb/config/ns32k/tm-umax.h b/gdb/config/ns32k/tm-umax.h
index db8c978..7b2a4b5 100644
--- a/gdb/config/ns32k/tm-umax.h
+++ b/gdb/config/ns32k/tm-umax.h
@@ -222,6 +222,12 @@ extern CORE_ADDR umax_skip_prologue (CORE_ADDR);
extern CORE_ADDR ns32k_get_enter_addr ();
+/* Return number of args passed to a frame.
+ Can return -1, meaning no way to tell. */
+
+extern int umax_frame_num_args (struct frame_info *fi);
+#define FRAME_NUM_ARGS(fi) (umax_frame_num_args ((fi)))
+
/* Return number of bytes at start of arglist that are not really args. */
#define FRAME_ARGS_SKIP 8
@@ -232,8 +238,35 @@ extern CORE_ADDR ns32k_get_enter_addr ();
ways in the stack frame. sp is even more special:
the address we return for it IS the sp for the next frame. */
-extern int umax_frame_num_args (struct frame_info *fi);
-#define FRAME_NUM_ARGS(fi) (umax_frame_num_args ((fi)))
+#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
+{ \
+ register int regmask, regnum; \
+ int localcount; \
+ register CORE_ADDR enter_addr; \
+ register CORE_ADDR next_addr; \
+ \
+ memset (&(frame_saved_regs), '\0', sizeof (frame_saved_regs)); \
+ enter_addr = ns32k_get_enter_addr ((frame_info)->pc); \
+ if (enter_addr > 1) \
+ { \
+ regmask = read_memory_integer (enter_addr+1, 1) & 0xff; \
+ localcount = ns32k_localcount (enter_addr); \
+ next_addr = (frame_info)->frame + localcount; \
+ for (regnum = 0; regnum < 8; regnum++, regmask >>= 1) \
+ (frame_saved_regs).regs[regnum] = (regmask & 1) ? \
+ (next_addr -= 4) : 0; \
+ (frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame + 4;\
+ (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 4;\
+ (frame_saved_regs).regs[FP_REGNUM] = \
+ (read_memory_integer ((frame_info)->frame, 4));\
+ } \
+ else if (enter_addr == 1) \
+ { \
+ CORE_ADDR sp = read_register (SP_REGNUM); \
+ (frame_saved_regs).regs[PC_REGNUM] = sp; \
+ (frame_saved_regs).regs[SP_REGNUM] = sp + 4; \
+ } \
+}
/* Things needed for making the inferior call functions. */
diff --git a/gdb/config/powerpc/nbsd.mh b/gdb/config/powerpc/nbsd.mh
index 341fa44..ea10d86 100644
--- a/gdb/config/powerpc/nbsd.mh
+++ b/gdb/config/powerpc/nbsd.mh
@@ -1,5 +1,5 @@
# Host: PowerPC, running NetBSD
XDEPFILES=
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o ppcnbsd-nat.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o ppcnbsd-nat.o solib.o solib-svr4.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
diff --git a/gdb/config/powerpc/nbsd.mt b/gdb/config/powerpc/nbsd.mt
index 8045fa5..7a32fd2 100644
--- a/gdb/config/powerpc/nbsd.mt
+++ b/gdb/config/powerpc/nbsd.mt
@@ -1,5 +1,5 @@
# Target: PowerPC, running NetBSD
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
TM_FILE= tm-nbsd.h
GDBSERVER_DEPFILES= low-nbsd.o
diff --git a/gdb/config/sparc/nbsd.mh b/gdb/config/sparc/nbsd.mh
index 8974e75..1ea8750 100644
--- a/gdb/config/sparc/nbsd.mh
+++ b/gdb/config/sparc/nbsd.mh
@@ -1,6 +1,6 @@
# Host: Sun 4 or Sparcstation, running NetBSD
XDEPFILES=
+NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o solib.o solib-svr4.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o
HOST_IPC=-DBSD_IPC
diff --git a/gdb/config/sparc/nbsd.mt b/gdb/config/sparc/nbsd.mt
index 7735cf2..5c89318 100644
--- a/gdb/config/sparc/nbsd.mt
+++ b/gdb/config/sparc/nbsd.mt
@@ -1,3 +1,3 @@
# Target: Sun 4 or Sparcstation, running NetBSD
-TDEPFILES= sparc-tdep.o solib.o solib-svr4.o
+TDEPFILES= sparc-tdep.o
TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/nbsdelf.mh b/gdb/config/sparc/nbsdelf.mh
index 8211a4f..ebba3ab 100644
--- a/gdb/config/sparc/nbsdelf.mh
+++ b/gdb/config/sparc/nbsdelf.mh
@@ -1,6 +1,6 @@
# Host: Sun 4 or Sparcstation, running NetBSD
XDEPFILES=
+NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o solib.o solib-svr4.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsdelf.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o
HOST_IPC=-DBSD_IPC
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 6f39c8c..4e50c1c 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -20,6 +20,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "frame.h"
void
_initialize_ns32k_tdep (void)