* ieee.c: New file with code to read IEEE debugging information.

* budbg.h (parse_ieee): Declare.
	* rddbg.c (read_debugging_info): Handle IEEE flavour files.
	(read_ieee_debugging_info): New static function.
	* Makefile.in: Rebuild dependencies.
	(CFILES): Add ieee.c.
	(OBJDUMP_OBJS): Add ieee.o.
This commit is contained in:
Ian Lance Taylor 1996-01-04 21:35:04 +00:00
parent f8254a3cc5
commit f516798679
5 changed files with 2378 additions and 100 deletions

View File

@ -57,6 +57,7 @@ defparse.y
deflex.l
filemode.c
gmalloc.c
ieee.c
is-ranlib.c
is-strip.c
mac-binutils.r

View File

@ -1,3 +1,44 @@
Thu Jan 4 16:31:21 1996 Ian Lance Taylor <ian@cygnus.com>
* ieee.c: New file with code to read IEEE debugging information.
* budbg.h (parse_ieee): Declare.
* rddbg.c (read_debugging_info): Handle IEEE flavour files.
(read_ieee_debugging_info): New static function.
* Makefile.in: Rebuild dependencies.
(CFILES): Add ieee.c.
(OBJDUMP_OBJS): Add ieee.o.
* bucomm.h (xrealloc): Change type of first parameter from char *
to PTR.
Tue Jan 2 17:44:07 1996 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in: Add targets to automatically rebuild dependencies.
Remove targets which just listed dependencies of .o files.
(DEP): New variable.
(HFILES, GENERATED_HFILES): New variables.
(CFILES, GENERATED_CFILES): New variables.
(underscore.c): Don't do anything, just depend upon stamp-under.
(stamp-under): New target; do what underscore.c used to do.
(nlmconv.o): Depend upon sym.h and ecoff.h.
(.dep, .dep1, dep.sed, dep, dep-in): New targets.
(stage1, stage2, stage3, against, comparison): Remove.
(de-stage1, de-stage2, de-stage3): Remove.
(clean, distclean): Remove stamp-under and dep.sed.
* dep-in.sed: New file.
Implement generic debugging support. Implement a stabs reader and
a generic printer.
* budbg.h, debug.c, debug.h, prdbg.c, rddbg.c, stabs.c: New files.
* objdump.c: Include "debug.h" and "budbg.h".
(dump_debugging): New global variable.
(usage): Mention --debugging.
(long_options): Add "debugging".
(display_bfd): Handle --debugging.
* Makefile.in (OBJDUMP_OBJS): New variable.
($(OBJDUMP_PROG)): Use $(OBJDUMP_OBJS).
* binutils.texi, objdump.1: Document --debugging.
Sat Dec 30 09:59:51 1995 Jeffrey A Law (law@cygnus.com)
* nm.c ( long_options): Add "--defined-only" option.

View File

@ -1,5 +1,5 @@
# Makefile for GNU binary-file utilities
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
# This file is part of GNU binutils.
@ -107,8 +107,6 @@ DLLTOOL_PROG=dlltool
SRCONV_PROG=srconv sysdump coffdump
MANPAGES= ar nm objdump ranlib size strings strip objcopy nlmconv
PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@
@ -125,9 +123,24 @@ BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
DEP = mkdep
ALL_CFLAGS = $(INCLUDES) @HDEFINES@ $(CFLAGS)
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h
CFILES = ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c dlltool.c \
filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c \
maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
objcopy.c objdump.c prdbg.c rddbg.c size.c srconv.c stabs.c \
strings.c sysdump.c version.c
GENERATED_CFILES = \
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
defparse.c deflex.c nlmheader.c
.c.o:
$(CC) -c $(ALL_CFLAGS) $<
@ -255,14 +268,18 @@ $(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD)
$(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(EXTRALIBS)
$(OBJDUMP_PROG): $(ADDL_LIBS) objdump.o $(BFD) $(OPCODES)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS)
OBJDUMP_OBJS = objdump.o rddbg.o debug.o stabs.o ieee.o prdbg.o
underscore.c: Makefile
rm -f underscore.c
$(OBJDUMP_PROG): $(ADDL_LIBS) $(OBJDUMP_OBJS) $(BFD) $(OPCODES)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) $(OBJDUMP_OBJS) $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS)
underscore.c: stamp-under ; @true
stamp-under: Makefile
echo '/*WARNING: This file is automatically generated!*/' >underscore.t
echo "int prepends_underscore = @UNDERSCORE@;" >>underscore.t
mv -f underscore.t underscore.c
$(srcdir)/../move-if-change underscore.t underscore.c
touch stamp-under
version.o: version.c Makefile
$(CC) -DVERSION='"$(VERSION)"' $(ALL_CFLAGS) -c $(srcdir)/version.c
@ -352,9 +369,6 @@ sysinfo.o: sysinfo.c
$(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
fi
srconv.o: srconv.c sysroff.h sysroff.c coffgrok.h $(INCDIR)/coff/internal.h \
../bfd/libcoff.h config.h
srconv: srconv.o coffgrok.o $(ADDL_LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srconv.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
@ -378,8 +392,6 @@ dlltool.o:dlltool.c
coffdump: coffdump.o coffgrok.o $(ADDL_LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ coffdump.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
sysdump.o: sysdump.c sysroff.h sysroff.c bucomm.h config.h
sysdump: sysdump.o $(ADDL_LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ sysdump.o $(ADDL_LIBS) $(EXTRALIBS)
@ -390,93 +402,45 @@ nlmheader.c: nlmheader.y sysinfo.c
rm -f nlmheader.c
mv -f y.tab.c nlmheader.c
nlmconv.o: nlmconv.c
# coff/sym.h and coff/ecoff.h won't be found by the automatic dependency
# scripts, since they are only included conditionally.
nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
ldname=`echo ld | sed '$(program_transform_name)'`; \
$(CC) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(ALL_CFLAGS) $(srcdir)/nlmconv.c
$(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS)
# This list of dependencies was generated by doing a make with gcc -MM
# saving the output in a file and removing the gcc commands
# changing "../../devo/binutils/../bfd" to "$(BFDDIR)"
# removing "../../devo/binutils/"
# changing "../include" to "$(INCDIR)"
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
rm -f .dep1
$(MAKE) DEP=$(DEP) .dep1
sed -f dep.sed <.dep1 >.dep
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h \
$(INCDIR)/fopen-same.h bucomm.h config.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h \
$(INCDIR)/fopen-same.h
size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h \
$(INCDIR)/fopen-same.h $(INCDIR)/getopt.h config.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h \
$(INCDIR)/fopen-same.h $(INCDIR)/getopt.h \
$(INCDIR)/dis-asm.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/elf/internal.h $(INCDIR)/aout/stab.def config.h
nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h \
$(INCDIR)/fopen-same.h bucomm.h config.h $(INCDIR)/getopt.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h
ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h \
$(INCDIR)/fopen-same.h bucomm.h config.h $(INCDIR)/aout/ar.h \
$(BFDDIR)/libbfd.h arsup.h
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h arsup.h
arlex.o: arlex.c ./arparse.h
not-ranlib.o: not-ranlib.c
arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h arsup.h bucomm.h config.h
strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h bucomm.h config.h
objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h \
$(INCDIR)/fopen-same.h bucomm.h config.h
is-strip.o: is-strip.c
is-ranlib.o: is-ranlib.c
not-strip.o: not-strip.c
nlmheader.o: nlmheader.c ../bfd/bfd.h \
$(INCDIR)/fopen-same.h bucomm.h config.h \
$(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h nlmconv.h
nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/libiberty.h \
$(INCDIR)/fopen-same.h bucomm.h config.h \
$(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmconv.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
# This rule really wants a mkdep that runs "gcc -MM".
.dep1: $(CFILES) $(GENERATED_CFILES)
rm -f .dep2
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
$(DEP) -f .dep2 $(ALL_CFLAGS) $?
$(srcdir)/../move-if-change .dep2 .dep1
stage1: force
- mkdir stage1
- mv -f $(STAGESTUFF) stage1
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
-e 's!@INCDIR@!$(INCDIR)!' \
-e 's!@SRCDIR@!$(srcdir)!'
stage2: force
- mkdir stage2
- mv -f $(STAGESTUFF) stage2
dep: .dep
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
cat .dep >> tmp-Makefile
$(srcdir)/../move-if-change tmp-Makefile Makefile
stage3: force
- mkdir stage3
- mv -f $(STAGESTUFF) stage3
dep-in: .dep
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
cat .dep >> tmp-Makefile.in
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
against=stage2
comparison: force
for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
de-stage1: force
- (cd stage1 ; mv -f * ..)
- rmdir stage1
de-stage2: force
- (cd stage2 ; mv -f * ..)
- rmdir stage2
de-stage3: force
- (cd stage3 ; mv -f * ..)
- rmdir stage3
.PHONY: dep dep-in
###
# DOCUMENTATION TARGETS
@ -561,11 +525,13 @@ mostlyclean:
-rm -f *.o *~ \#* core binutils.?? binutils.??? y.output config.log
-rm -rf tmpdir
clean: mostlyclean
-rm -f $(PROGS) underscore.c sysroff sysroff.c sysroff.h sysinfo
-rm -f $(PROGS) $(DEMANGLER_PROG).1 stamp-under
-rm -f underscore.c sysroff sysroff.c sysroff.h sysinfo dep.sed
distclean:
-rm -f Makefile config.status *.o *~ \#* core y.* \
binutils.?? binutils.??s binutils.aux binutils.log binutils.toc
-rm -f Makefile config.status *.o *~ \#* core y.*
-rm -f binutils.?? binutils.??s binutils.aux binutils.log binutils.toc
-rm -f $(PROGS) underscore.c config.h stamp-h config.cache config.log
-rm -f dep.sed stamp-under
maintainer-clean realclean: clean distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
@ -685,8 +651,95 @@ stamp-h: config.in config.status
config.status: configure
$(SHELL) ./config.status --recheck
### Local Variables: ***
### mode:fundamental ***
### page-delimiter: "^# " ***
### End: ***
### end of file
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \
$(INCDIR)/libiberty.h $(INCDIR)/progress.h bucomm.h \
config.h $(INCDIR)/fopen-same.h $(INCDIR)/aout/ar.h \
../bfd/libbfd.h arsup.h
arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h arsup.h $(INCDIR)/libiberty.h bucomm.h \
config.h $(INCDIR)/fopen-same.h
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h $(INCDIR)/libiberty.h bucomm.h \
config.h $(INCDIR)/fopen-same.h
coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \
$(INCDIR)/fopen-same.h
coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/coff/internal.h ../bfd/libcoff.h $(INCDIR)/bfdlink.h \
coffgrok.h
debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h debug.h
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h $(INCDIR)/libiberty.h bucomm.h \
config.h $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h \
$(INCDIR)/demangle.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h
ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \
$(INCDIR)/ieee.h bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h debug.h budbg.h
is-ranlib.o: is-ranlib.c
is-strip.o: is-strip.c
maybe-ranlib.o: maybe-ranlib.c
maybe-strip.o: maybe-strip.c
nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h $(INCDIR)/libiberty.h bucomm.h \
config.h $(INCDIR)/fopen-same.h ../bfd/libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmconv.h
nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \
$(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/getopt.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
not-ranlib.o: not-ranlib.c
not-strip.o: not-strip.c
objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h $(INCDIR)/progress.h bucomm.h config.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h $(INCDIR)/getopt.h $(INCDIR)/progress.h \
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h \
$(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab.def
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h debug.h budbg.h
rddbg.o: rddbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h debug.h budbg.h
size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \
$(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h
srconv.o: srconv.c bucomm.h config.h $(INCDIR)/fopen-same.h \
sysroff.h coffgrok.h $(INCDIR)/coff/internal.h ../bfd/libcoff.h \
$(INCDIR)/bfdlink.h sysroff.c
stabs.o: stabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h bucomm.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h
sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h bucomm.h config.h $(INCDIR)/fopen-same.h \
sysroff.h sysroff.c
version.o: version.c
underscore.o: underscore.c
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h bucomm.h config.h $(INCDIR)/fopen-same.h \
arsup.h
arlex.o: arlex.c arparse.h
sysroff.o: sysroff.c
sysinfo.o: sysinfo.c
syslex.o: syslex.c sysinfo.h
defparse.o: defparse.c
deflex.o: deflex.c defparse.h
nlmheader.o: nlmheader.c ../bfd/bfd.h $(INCDIR)/obstack.h \
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h nlmconv.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY

View File

@ -1,5 +1,5 @@
/* budbg.c -- Interfaces to the generic debugging information routines.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@ -26,7 +26,7 @@
/* Routine used to read generic debugging information. */
extern PTR read_debugging_info PARAMS ((bfd *));
extern PTR read_debugging_info PARAMS ((bfd *, asymbol **, long));
/* Routine used to print generic debugging information. */
@ -34,10 +34,15 @@ extern boolean print_debugging_info PARAMS ((FILE *, PTR));
/* Routines used to read stabs information. */
extern PTR start_stab PARAMS ((PTR));
extern PTR start_stab PARAMS ((PTR, boolean));
extern boolean finish_stab PARAMS ((PTR, PTR));
extern boolean parse_stab PARAMS ((PTR, PTR, int, int, bfd_vma, const char *));
/* Routine used to read IEEE information. */
extern boolean parse_ieee
PARAMS ((PTR, bfd *, const bfd_byte *, bfd_size_type));
#endif

2178
binutils/ieee.c Normal file

File diff suppressed because it is too large Load Diff