From: Jim Kingdon Date: Fri, 19 Apr 1991 03:22:12 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: gdb-4_18~24492 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31ef19fc7f71a06e322000f7f3870d4f19a696e0;p=external%2Fbinutils.git *** empty log message *** --- diff --git a/gdb/Makefile.dist b/gdb/Makefile.dist index 8c626fe..ffaa1f5 100755 --- a/gdb/Makefile.dist +++ b/gdb/Makefile.dist @@ -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) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 7b4e3ce..ffaa1f5 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -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,^\./,,'` diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 97080ff..4617e5d 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -294,6 +294,89 @@ End with a line saying just \"end\".\n", bnum); error ("No breakpoint number %d.", bnum); } +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); +} + /* insert_breakpoints is used when starting or continuing the program. remove_breakpoints is used when the program stops. Both return zero if successful, diff --git a/gdb/mips-xdep.c b/gdb/mips-xdep.c index 7748f1c..3d4540b 100644 --- a/gdb/mips-xdep.c +++ b/gdb/mips-xdep.c @@ -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 */ diff --git a/gdb/mipsread.c b/gdb/mipsread.c index 137c6c4..e4804ac 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -30,7 +30,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "symfile.h" #ifdef CMUCS #include -#endif CMUCS +#else /* not CMUCS */ +#include +#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