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)
# 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
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
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 \
# 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 \
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)
${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)" | \
# 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,^\./,,'`
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,
}
}
+#if 0
void
fetch_core_registers ()
{
supply_register (regno, buf);
}
}
+#endif /* 0 */
#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