Commit graph

3040 commits

Author SHA1 Message Date
John Gilmore
2778e91584 * buildsym.c (define_symbol): Nameless types are now on several
platforms; generalize them and un-ifdef them to make Solaris 2
work.
1992-06-15 08:47:56 +00:00
John Gilmore
d69bba12b8 * infcmd.c: Fix typo (reported by Rob Savoye).
* xm-sun4sol2.h (gregset_t):  Thinko in register set definition.
* symtab.h:  Disable SYMBOL_BASEREG_VALID until it works.
* dbxread.c (dbx_psymtab_to_symtab_1):  Renamed from
psymtab_to_symtab_1.  Use current psymtab's sym_offset and symbol_size,
rather than the one for the first file in the dependency chain.
1992-06-15 08:42:09 +00:00
John Gilmore
87afde58f6 * readline.c: Make new SIGNALS_* macros to parameterize the
ugly changes in signal blocking macro.  Use them throughout,
reducing #ifdef HAVE_POSIX_SIGNALS and HAVE_BSD_SIGNALS clutter
significantly.  Make all such places use POSIX if available,
to avoid losing with poor `sigsetmask' emulation from libiberty.
1992-06-15 08:37:50 +00:00
Stu Grossman
7c88553a91 * readline.c (insert_some_chars): Return void. 1992-06-14 22:21:18 +00:00
John Gilmore
bcbf95597c * dbxread.c (end_psymtab): Only reset texthigh if it's not already
set.  Don't reset our own texthigh, or dependency-only pst's, in
scanning all the rest of the psymtabs.
(process_one_symbol):  Fix comments around N_OBJ, N_OPT, N_UNDF.

* buildsym.h (N_UNDF):  Improve comments.
(N_LSYM, etc):  Skip types without names (":T(0,3)=sfoob...").
1992-06-14 18:10:10 +00:00
John Gilmore
c3c93fda32 * objdump.c (dump_elf_stabs): Also dump .stab.index and .stab.excl sections.
(dump_elf_stabs_1):  Split out main body of old dump_elf_stabs.
* objdump.1, binutils.texi:  Document new sections dumped.
1992-06-14 17:52:53 +00:00
Fred Fish
252f6c65f2 * symtab.h (struct symbol): Add aux_value union for preserving
an additional per-symbol value.
* symtab.h (SYMBOL_BASEREG, SYMBOL_BASEREG_VALID):  Add defines.
* frame.h (FRAME_GET_BASEREG_VALUE):  Provide default definition.
* findvar.c (read_var_value):  Use SYMBOL_BASEREG if valid.
* printcmd.c (address_info):  Use SYMBOL_BASEREG if valid.
* symmisc.c (print_symbol):  Use SYMBOL_BASEREG if valid.
1992-06-13 18:20:44 +00:00
John Gilmore
b886a6e31f Lint 1992-06-13 17:15:12 +00:00
Michael Tiemann
a6b46ad4de Make `clear_symtab_users_once' non-static so objfiles can be linked. 1992-06-13 16:20:04 +00:00
John Gilmore
346168a2c6 * elfread.c (record_minimal_symbol_and_info): Kludged to put
extra info in the minimal symbol.
(elf_symtab_read):  The extra info is the size of an ELF object,
which was kludged to us in the `udata' field of the BFD symbol.
Gag me with a crowbar...
(elf_symfile_read):  Keep track of both the absolute load address,
and the offset between load addr and symbols.  Handle STABS as
well as DWARF sections, passing the absolute load address to
elfstab_build_psymtabs.

* objfiles.c (free_objfile):  Eliminate storage leaks.  Contributed
by <Peter.Schauer@regent.e-technik.tu-muenchen.dbp.de>.
* symfile.c (symfile_bfd_open):  Comment where name is freed.
* symmisc.c (extend_psymbol_list):  Comment where list is freed.
1992-06-13 07:24:30 +00:00
John Gilmore
9342ecb944 * dbxread.c: Add symbol_size to struct dbx_symfile_info.
Add symbol_size and file offsets to struct symloc.
Add static symbol_table_offset, string_table_offset,
file_string_table_offset, next_file_string_table_offset,
last_function_name.
(add_old_header_file):  Convert error() to complain()t.
(dbx_symfile_read):  Get symbol size via the objfile.
Also get symbol_table_offset.
(dbx_symfile_init):  Record symbol size and count via the objfile.
(dbx_next_symbol_text):  Always add file_string_table_offset when
accessing string table.
(read_dbx_symtab):  Initialize file_string_table_offset to 0.
(SET_NAMESTRING):  Use the offset.
(end_psymtab):  Large kludge to determine addresses where source
files start and end (for the psymtab header).
(psymtab_to_symtab_1):  Set file_string_table_offset before reading.
Get this, symbol size, and symbol offset, from psymtab.
(read_ofile_symtab):  Don't back up one symbol for Solaris2.
Patch up last_source_start_addr if zero in N_SO.
(process_one_symbol):  Add variable function_start_offset.
( "", N_FUN, N_LBRAC, N_RBRAC, N_SLINE):  Add ifdef for
BLOCK_ADDRESS_FUNCTION_RELATIVE.
( "", N_OBJ, N_OPT):  Ignore.
(elfstab_build_psymtabs):  New function to read stabs out of
an ELF file.

* Makefile.in:  Accept $(BISON) even though we really want $(YACC).
(gdb):  use GLOBAL_CFLAGS when linking, too.
* partial-stab.h (N_UNDF):  Deal with Sol2 relative stringtab offsets.
(N_OBJ, N_OPT):  Ignore.
('f', 'F'):  Save last function name.

* symfile.h:  Prototype elfstab_build_psymtabs.
* symfile.c:  Add almost-OK debug versions of add_psymbol_*to_list.

* xm-sysv4.h:  Add <limits.h> to avoid conflicting defns in defs.h.
1992-06-13 06:39:27 +00:00
John Gilmore
609f87d4c9 Remove reg_names decl (now in defs.h). 1992-06-13 06:08:09 +00:00
John Gilmore
4ae6ed3a9e Avoid ANSI C "empty translation unit" idiocy. 1992-06-13 06:04:03 +00:00
John Gilmore
1e730c4b08 * section.c (STD_SECTION): Remove extra semicolon in declarations.
* configure.in:  Rewrite target parsing to use simple format.
Handle sparc-sun-solaris2 configuration.
* aout64.h:  Avoid ANSI C brain death warning.
* elf.c:  Avoid trigraph (???) or /* in comments.
1992-06-13 05:58:49 +00:00
John Gilmore
0dce456e8d Lint 1992-06-13 05:56:15 +00:00
John Gilmore
770cde303d Lint 1992-06-13 05:24:22 +00:00
John Gilmore
18eb7badc4 Add sun4sol2 => sparc-sun-solaris2. 1992-06-13 05:23:04 +00:00
John Gilmore
93297ea028 * buildsym.h: Add processing_acc_compilation flag.
* buildsym.c (read_sun_builtin_type, read_sun_floating_type):  New.
(define_symbol):  Skip arg types in function entries.  Resolve
overloaded 'P' which acc uses for prototypes of functions called
by this file.
(read_type: 'b', 'r'):  Handle Solaris2 builtin types.

* minsyms.c (prim_record_minimal_symbol_and_info):  Hack to
save size of ELF symbols.  FIXME.
* tm-sun4os5.h:  Rename to tm-sun4sol2.h.  Update defines for Sol2.
* xm-sun4os5.h:  Rename to xm-sun4sol2.h.  Hack more defines.

* config/sun4os5.m[ht]:  Rename to config/sun4sol2.m[ht]; new xm, tm.
1992-06-13 02:18:44 +00:00
John Gilmore
bf2e5f6b82 * configure.in: Solaris config is sparc-sun-solaris2.
* config/sun4os5.m[ht]:  Rename to config/sun4sol2.m[ht].
1992-06-13 01:56:41 +00:00
David D. Zuhn
a52057f811 change to new solaris naming system, add sysv4 host config 1992-06-13 00:43:08 +00:00
Fred Fish
6b53bf346d * expprint.c (print_subexp): Add missing ']'.
* defs.h (reg_names):  Fix declaration to match that in infcmd.c
	* stack.c (reg_names):  Delete redundant (and inconsistent) decl.
	* WHATS.NEW:  Point out improved C++ function name handling.
	* gdbtypes.c (lookup_fundamental_type):  For now, use the same
	type names for both implicitly and explicitly signed integral
	types.  See comment in the source code.
1992-06-12 20:51:42 +00:00
John Gilmore
28de880c48 Two `long long' fixes from Robert R. Henry (rrh@dino.tera.com):
* defs.h (longest_to_int):  Avoid void arm of ?: in error case.
* expprint.c (print_subexp):  Fix printing of register names.
1992-06-11 19:34:56 +00:00
Stu Grossman
d1dc824fa9 Latest and greatest, many bug fixes, value annotations, stack frame
annotations, etc...
1992-06-11 17:35:58 +00:00
John Gilmore
c5f0c9388a * objdump.1, binutils.texi: Update for --stabs. Also fix
objdump's doc to use -- rather than + for long options.
(FIXME:  Not yet fixed everywhere in binutils.texinfo.)
1992-06-11 09:18:44 +00:00
John Gilmore
1304f099bc Small changes from Solaris port. The big stuff is not all working yet.
* inferior.h (register_valid):  Declare.
* remote-udi.c, rs6000-xdep.c, sparc-xdep.c, tm-rs6000.h:  Remove decl.
* objfiles.h (ALL_OBJFILE_{SYMTABS,PSYMTABS,MSYMBOLS}):  Add
macros for traversing the data structures in a single objfile.
* tm-m88k.h, tm-sparc.h (REGISTER_NAMES):  Remove extra semicolon.
* tm-i960.h (REGISTER_NAMES):  Cosmetic change.
* infcmd.c:  Lint.
1992-06-11 08:43:29 +00:00
John Gilmore
bab58134b5 #undef PC, which Solaris2 defines in sys/types.h, clobbering the
termcap global variable PC.
1992-06-11 08:29:01 +00:00
John Gilmore
73b8f10233 New feature: --stabs prints out a .stab section from an ELF file.
Installed under #ifdef ELF_STAB_DISPLAY so it can be easily disabled,
since it requires bfd-internals header files and such.
1992-06-11 08:23:11 +00:00
John Gilmore
1291085e40 Add N_OBJ and N_OPT from Solaris-2. 1992-06-11 08:15:03 +00:00
John Gilmore
3ce7a82414 Regen'd from bfd.c after removing elf_core_tdata_struct. 1992-06-11 08:12:01 +00:00
John Gilmore
80bdcb77bd * elf.c (elf_obj_tdata): Merge elf_obj_tdata_struct and
elf_core_tdata_struct into a single common struct.  Core files
wouldn't have worked at all without this.
(bfd_elf_find_section):  New function for GDB's undercover use
to find string sections that BFD hides from it.
(elf_get_str_section):  Avoid multiple alloc&reads for same data; lint.
(elf_object_p, elf_core_file_p):  Allocate internal file header
storage dynamically.
* bfd.c (union {...} tdata):  Remove elf_core_tdata_struct.
* demo64.c:  Prevent "empty translation unit" warnings from idiots.
1992-06-11 08:10:04 +00:00
Steve Chamberlain
b5adcbd066 * i386.h: a.out magic numbers from
mohring@informatik.tu-muenchen.de
1992-06-10 14:59:16 +00:00
Steve Chamberlain
aa0a709adc Wed Jun 10 07:53:24 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* objdump.c(display_info), patches from
	mohring@informatik.tu-muenchen.de to print the table much more
	nicely.
1992-06-10 14:57:25 +00:00
Steve Chamberlain
bb63f602dd Keep this just in case 1992-06-10 14:44:52 +00:00
Per Bothner
3b57ba9008 * Everywhere: Change RANLIB=echo>/dev/null (which confuses
some shells - and I don't blame them) to RANLIB=true.
	* mh-solaris:  Use /usr/ucb/install for INSTALL.
1992-06-10 06:32:35 +00:00
Fred Fish
08109fdb47 * config/{mh-ncr3000, mh-sysv4}: Add INSTALL. 1992-06-10 02:20:25 +00:00
Fred Fish
df03b780f4 * config/{i386v4.mh, ncr3000.mh}: Update RANLIB, add INSTALL. 1992-06-10 02:17:08 +00:00
Fred Fish
84d6c527c1 * config/{mh-ncr3000, mh-sysv4}: Add definition for INSTALL using
/usr/ucb/install.
1992-06-10 02:10:02 +00:00
Fred Fish
2d54a9e513 * config/{mh-ncr3000, mh-sysv4}: Change INSTALL to use
/usr/ucb/install.
1992-06-10 02:06:30 +00:00
Fred Fish
36ce1b6469 * c-exp.y, m2-exp.y: Move remapping defines for malloc and
realloc.  Add remapping defines for {yyss, yyssp, yyvs, yyvsp}.
	* config/{amix.mh, i386v4.mh, ncr3000.mh, stratus.mh,
	sun4os5.mh}:  Add definition for INSTALL using /usr/ucb/install.
1992-06-10 02:05:20 +00:00
Stu Grossman
cc0d9de867 Oops, forgot depend! 1992-06-09 23:33:27 +00:00
Stu Grossman
55488e9ea6 * depend: rebuild to account for remote-st2000.c.
* remote-st2000.c:  Almost works now.
* tm-st2000.h:  Need to turn on HAVE_68881, else things won't compile.
1992-06-09 23:31:53 +00:00
Steve Chamberlain
65bfcf2e61 * subsegs.c (subsegs_begin): create bss0_frchainP in the same was
as data0_frchainP

	* write.c (write_object_file): various changes to handle data in
	the BSS segment in much the same was as stuff in the DATA segment.

	* subsegs.c (subseg_change): allow and handle a change into SEG_BSS.
1992-06-09 19:36:49 +00:00
Steve Chamberlain
a1765cf0fe * subsegs.c (subseg_change): allow and handle a change into SEG_BSS.
* tc-m68k.c (m68kip): Fix typo so that only arch's >=68020 do
	pcrel data stuff. (md_estimate_size_before_relax): when relaxing a
	68010 bxx into a bra+6 jmpxx, put the bytes of the jmp opcode into
	the right place. (s_bss): Don't put .bss stuff into SEG_DATA, put
	it into SEG_BSS
1992-06-09 14:57:42 +00:00
Steve Chamberlain
90d4945716 * subsegs.c (subseg_change): allow and handle a change into SEG_BSS. 1992-06-09 14:57:23 +00:00
Fred Fish
dd823a49ca * readline.h (rl_completer_quote_characters): Add declaration.
* readline.c (rl_completer_quote_characters):  Add global var.
	* readline.c (strpbrk):  Add prototype and function.
	* readline.c (rl_complete_internal):  Add code to handle
	expansion of quoted strings.
1992-06-09 06:10:54 +00:00
Fred Fish
d630b6150e * c-exp.y (yylex): Recognize single-quoted strings that specify
tokens with embedded whitespace, such as C++ demangled names.
	* defs.h (demangle_and_match, strcmp_iw, skip_quoted):  Prototypes.
	* main.c (gdb_completer_quote_characters):  Add global variable.
	* main.c (symbol_completion_function):  Total rewrite for C++
	demangled name handling.
	* main.c (skip_quoted):  New function.
	* main.c (main):  Set rl_completer_quote_characters.
	* symmisc.c (dump_symtab):  Print source language for symtab.
	* symtab.c (expensive_mangler):  Add prototype and function.
	* symtab.c (completion_list_add_symbol):  Total rewrite for new
	C++ demangled name handling.
	* symtab.c (lookup_symbol): Check for demangled C++ symbol first,
	other changes for demangled C++ symbol handling.
	* symtab.c (lookup_demangled_block_symbol):  Use demangle_and_match.
	* symtab.c (lookup_demangled_partial_symbol):  Use demangle_and_match.
	* symtab.c (decode_line_1):  Recognize C++ demangled names on input.
	* symtab.c (completion_list_add_symbol):  Total rewrite for new
	C++ demangled name handling.
	* symtab.c (expensive_mangler):  New function.
	* utils.c (strcmp_iw, demangle_and_match):  New functions.
	* xcoffread.c (aixcoff_symfile_read):  Fix prototype.
1992-06-09 06:09:33 +00:00
John Gilmore
d9915ebc47 * Makefile.in: Roll VERSION to 4.5.4.
* Makefile.in, config/*.mh, config/*.mt:  Rename TM_CFLAGS
to MT_CFLAGS, XM_CFLAGS to MH_CFLAGS to match file names.
* config/sun4os5.mh:  Add MH_CFLAGS=-xs to save debug info.
1992-06-09 05:10:15 +00:00
John Gilmore
6b6cc3fd08 Use unsigned chars for fields in object files. 1992-06-09 03:14:50 +00:00
John Gilmore
717b47f482 Typo 1992-06-09 02:38:11 +00:00
Stu Grossman
e8a3827836 See gdb/Changelog for details. 1992-06-08 21:35:27 +00:00