]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
*** empty log message ***
authorJim Kingdon <jkingdon@engr.sgi.com>
Fri, 19 Apr 1991 03:22:12 +0000 (03:22 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Fri, 19 Apr 1991 03:22:12 +0000 (03:22 +0000)
gdb/Makefile.dist
gdb/Makefile.in
gdb/breakpoint.c
gdb/mips-xdep.c
gdb/mipsread.c

index 8c626fecce112b3d6467e98d6b0070ccf7211e7b..ffaa1f591ba0e7572d88a3071db9cd7c7fd7a7d1 100755 (executable)
@@ -212,7 +212,7 @@ OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
     symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
     command.o utils.o expread.o expprint.o environ.o version.o \
     copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
-    inftarg.o ieee-float.o \
+    inftarg.o ieee-float.o putenv.o \
     dbxread.o coffread.o # mipsread.o
 
 RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
index 7b4e3ce9fa8dce77d2dfb2b284d6ce6d91715a36..ffaa1f591ba0e7572d88a3071db9cd7c7fd7a7d1 100644 (file)
@@ -54,7 +54,7 @@ CC-LD=${CC}
 # system malloc, uncomment the following two lines.
 #GNU_MALLOC =
 #MALLOC_CFLAGS = -DNO_MALLOC_CHECK
-GNU_MALLOC = gmalloc.o mcheck.o
+GNU_MALLOC = gmalloc.o mcheck.o mtrace.o
 MALLOC_CFLAGS =
 
 # Where is the "include" directory?  Traditionally ../include or ./include
@@ -107,7 +107,7 @@ CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}/libbfd.a
 ADD_FILES = ${OBSTACK} ${REGEX} ${ALLOCA} ${GNU_MALLOC} ${GETOPT}
 ADD_DEPS = ${OBSTACK} ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${GETOPT}
 
-VERSION = 3.94.2
+VERSION = 3.94.3
 DIST=gdb-$(VERSION)
 
 LINT=/usr/5bin/lint
@@ -171,12 +171,13 @@ HFILES=   breakpoint.h command.h defs.h environ.h \
        value.h
 
 OPCODES = pn-opcode.h np1-opcode.h sparc-opcode.h vax-opcode.h m68k-opcode.h \
-         ns32k-opcode.h convex-opcode.h pyr-opcode.h mips-opcode.h \
+         ns32k-opcode.h convx-opcode.h pyr-opcode.h mips-opcode.h \
          am29k-opcode.h
 
-REMOTE_EXAMPLES = remote-sa.m68k.shar remote-multi.shar
+REMOTE_EXAMPLES = rem-m68k.shar rem-multi.shar
 
-MALLOCSRC = gmalloc.c mcheck.c ansidecl.h stdlib.h gmalloc.h stddef.h
+MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \
+           ansidecl.h stdlib.h gmalloc.h stddef.h
 GETOPTSRC = $(GETOPT_DIR)/getopt.c $(GETOPT_DIR)/getopt1.c
 
 POSSLIBS_MAINDIR = obstack.h obstack.c regex.c regex.h alloca.c \
@@ -188,11 +189,11 @@ TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
 # tdesc-lib cannot be named simply tdesc, because if if it were GNU make
 # would try to make it from tdesc.c.
 # tdesc-lib removed from the list due to Motorola copyrights...gnu@cygnus.com
-OTHERS = Makefile.dist depend alldeps.mak Makefile.srcdir \
+OTHERS = Makefile.dist depend alldeps.mak Makefile.sdir \
         createtags munch config.gdb config.status \
         ChangeLog ChangeLog-3.x \
         README TODO TAGS WHATS.NEW \
-        gdb.texinfo gdb-int.texinfo gdbrc.tex threecol.tex \
+        gdb.texinfo gdbint.texinfo gdbrc.tex threecol.tex \
        .gdbinit COPYING expread.tab.c stab.def \
         copying.c Projects Convex.notes copying.awk \
         saber.suppress standalone.c stuff.c kdb-start.c \
@@ -211,7 +212,7 @@ OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
     symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
     command.o utils.o expread.o expprint.o environ.o version.o \
     copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
-    inftarg.o ieee-float.o \
+    inftarg.o ieee-float.o putenv.o \
     dbxread.o coffread.o # mipsread.o
 
 RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
@@ -276,7 +277,7 @@ rapp: $(RAPP_OBS)
        ${srcdir}/munch ${RAPP_OBS} > rapp_init.c
        ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
        
-Makefiles= Makefile.srcdir $(M_MAKEFILE) \
+Makefiles= Makefile.sdir $(M_MAKEFILE) \
        ${srcdir}/alldeps.mak ${srcdir}/Makefile.dist
 
 MAKE_MAKEFILE= echo "M_MAKEFILE=$(M_MAKEFILE)" | \
@@ -503,4 +504,4 @@ force_update :
 # When used with GDB, the demangler should never look for leading underscores
 # because GDB strips them off during symbol read-in.  Thus -Dnounderscore.
 cplus-dem.o : cplus-dem.c
-       ${CC} -c -Dnounderscore `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
+       ${CC} -c ${CFLAGS} -Dnounderscore `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
index 97080fff8d810e6d7fa08cf3d5850edaca79989c..4617e5d02794e8a9e29dd22d9b440042a4de6da9 100644 (file)
@@ -294,6 +294,89 @@ End with a line saying just \"end\".\n", bnum);
   error ("No breakpoint number %d.", bnum);
 }
 \f
+extern int memory_breakpoint_size; /* from mem-break.c */
+
+/* Like target_read_memory() but if breakpoints are inserted, return
+   the shadow contents instead of the breakpoints themselves.  */
+int
+read_memory_nobpt (memaddr, myaddr, len)
+     CORE_ADDR memaddr;
+     char *myaddr;
+     unsigned len;
+{
+  int status;
+  struct breakpoint *b;
+
+  if (memory_breakpoint_size < 0)
+    /* No breakpoints on this machine.  */
+    return target_read_memory (memaddr, myaddr, len);
+  
+  ALL_BREAKPOINTS (b)
+    {
+      if (b->address == NULL || !b->inserted)
+       continue;
+      else if (b->address + memory_breakpoint_size <= memaddr)
+       /* The breakpoint is entirely before the chunk of memory
+          we are reading.  */
+       continue;
+      else if (b->address >= memaddr + len)
+       /* The breakpoint is entirely after the chunk of memory we
+          are reading.  */
+       continue;
+      else
+       {
+         /* Copy the breakpoint from the shadow contents, and recurse
+            for the things before and after.  */
+         
+         /* Addresses and length of the part of the breakpoint that
+            we need to copy.  */
+         CORE_ADDR membpt = b->address;
+         unsigned int bptlen = memory_breakpoint_size;
+         /* Offset within shadow_contents.  */
+         int bptoffset = 0;
+         
+         if (membpt < memaddr)
+           {
+             /* Only copy the second part of the breakpoint.  */
+             bptlen -= memaddr - membpt;
+             bptoffset = memaddr - membpt;
+             membpt = memaddr;
+           }
+
+         if (membpt + bptlen > memaddr + len)
+           {
+             /* Only copy the first part of the breakpoint.  */
+             bptlen -= (membpt + bptlen) - (memaddr + len);
+           }
+
+         bcopy (b->shadow_contents + bptoffset,
+                myaddr + membpt - memaddr, bptlen);
+
+         if (membpt > memaddr)
+           {
+             /* Copy the section of memory before the breakpoint.  */
+             status = read_memory_nobpt (memaddr, myaddr, membpt - memaddr);
+             if (status != 0)
+               return status;
+           }
+
+         if (membpt + bptlen < memaddr + len)
+           {
+             /* Copy the section of memory after the breakpoint.  */
+             status = read_memory_nobpt
+               (membpt + bptlen,
+                myaddr + membpt + bptlen - memaddr,
+                memaddr + len - (membpt + bptlen));
+             if (status != 0)
+               return status;
+           }
+         return 0;
+       }
+    }
+  /* Nothing overlaps.  Just call read_memory_noerr.  */
+  return target_read_memory (memaddr, myaddr, len);
+}
+\f
 /* insert_breakpoints is used when starting or continuing the program.
    remove_breakpoints is used when the program stops.
    Both return zero if successful,
index 7748f1c0e167e76b139438b0b644d857e32200a8..3d4540b19601a77fef91b987b9764d0d3297c1c6 100644 (file)
@@ -110,6 +110,7 @@ store_inferior_registers (regno)
     }
 }
 
+#if 0
 void
 fetch_core_registers ()
 {
@@ -130,3 +131,4 @@ fetch_core_registers ()
     supply_register (regno, buf);
   }
 }
+#endif /* 0 */
index 137c6c46e882a9b7000ca44bb4628cb6e606bc06..e4804acab6a85cdb778662d8caea257244e878a6 100644 (file)
@@ -30,7 +30,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "symfile.h"
 #ifdef CMUCS
 #include <mips/syms.h>
-#endif CMUCS
+#else /* not CMUCS */
+#include <syms.h>
+#endif /* not CMUCS */
 
 /* Since these things are defined differently on various systems I'll
    (re)define here what I really need in this module.  I only assume the