Commit Graph

758 Commits

Author SHA1 Message Date
Ian Lance Taylor
e820a5b09e * ieee.c (struct ieee_handle): Add fields complex_float_index and
complex_double_index.
	(ieee_complex_type): Cache type index in complex_float_index and
	complex_double_index, depending upon size.  Set size on type stack
	to size * 2.

	* ieee.c (ieee_empty_type): Use builtin_unknown, not 0.
	(ieee_void_type): Use builtin_void, not 1.

	* ieee.c (parse_ieee_ty): Handle 'V' type code.
	(parse_ieee_atn): Don't require two numbers for type 10.

	* ieee.c (parse_ieee_be): Add one to offset at end of function or
	block.

	* ieee.c (struct ieee_block): Add field skip.
	(parse_ieee_bb): Don't call debug_record_function for __XRYCPP
	function, and set skip field.
	(parse_ieee_be): Don't call debug_end_function if skip is set.
1996-03-20 21:49:31 +00:00
Ian Lance Taylor
a912e811fc * configure.in: Add AC_FUNC_VFORK.
* configure, config.in: Rebuild.
	* dlltool.c, nlmconv.c: Include <vfork.h> if HAVE_VFORK_H is
	defined.
1996-03-18 23:52:43 +00:00
Ian Lance Taylor
6ae6090e22 * stabs.c (parse_stab_range_type): A complex type is defined as a
subrange of itself with the high bound zero.
	* ieee.c (ieee_complex_type): Don't crash on sizes of 12 or 16.
1996-03-18 23:06:29 +00:00
Ian Lance Taylor
efda824b08 * ieee.c (ieee_write_undefined_tag): Switch to global_types even
if it is not empty.
	(ieee_tag_type): For an enum, look through info->enums.
1996-03-12 19:33:31 +00:00
Ian Lance Taylor
7826d7e117 tweak last patch 1996-03-12 17:26:23 +00:00
Ian Lance Taylor
ea2488ad2e * configure: Rebuild with autoconf 2.8. 1996-03-12 17:22:07 +00:00
Ian Lance Taylor
e1b8810917 * debug.c (debug_type_samep): Don't loop endlessly in
DEBUG_KIND_ENUM case.  From Eric Baur <ecb@nexen.com>.
1996-03-12 17:10:22 +00:00
Ian Lance Taylor
89a8a65d62 * rddbg.c (read_section_stabs_debugging_info): Call save_stab for
each stab entry, call stab_context on an error, and call
	free_saved_stabs before rturning.
	(read_symbol_stabs_debugging_info): Likewise.
	(SAVE_STABS_COUNT): Define.
	(struct saved_stab): Define.
	(saved_stabs, saved_stabs_index): New static variables.
	(save_stab, stab_context, free_saved_stabs): New static functios.
1996-03-11 17:38:16 +00:00
Ian Lance Taylor
7fc01fc90f * objdump.c (stab_name): Remove.
(struct stab_print): Remove.
	(stab_print): Remove.
	(dump_stabs): Don't initialize stab_name.
	(print_section_stabs): Call bfd_get_stab_name rather than using
	the stab_name array.
1996-03-11 17:37:38 +00:00
Stan Shebs
ad77e2b8ab * mpw-make.sed: Update to handle shared library support. 1996-02-27 02:13:37 +00:00
Ian Lance Taylor
ce67d0c3ac Sat Feb 24 11:21:49 1996 Alan Modra <alan@spri.levels.unisa.edu.au>:
* Makefile.in ($(OBJDUMP_PROG)): Search $(BFDLIB) before
	$(OPCODES).
1996-02-24 19:22:35 +00:00
Ian Lance Taylor
2724d37edf * configure.in: Don't tamper with LDFLAGS. Call AC_PROG_CC before
configure.host.
	* configure: Rebuild.
1996-02-15 22:12:32 +00:00
Ian Lance Taylor
efa864530f * configure.in: Substitute RPATH_ENVVAR.
* configure: Rebuild.
	* Makefile.in (RPATH_ENVVAR): New variable.
	(check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
1996-02-15 18:57:34 +00:00
Ian Lance Taylor
2a7f07fefa * objcopy.c (smart_rename): Rather than doing chmod then chown, do
chmod without setuid, then chown, then chmod with setuid.
1996-02-15 17:46:49 +00:00
Ian Lance Taylor
f566f73fea Wed Feb 14 16:46:42 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
* arsup.c (map_over_list): Reindent.  Don't assume that the
	function does not delete the BFD.
	(ar_addlib_doer): Don't set prev->next if prev is NULL.
1996-02-14 21:48:20 +00:00
Ian Lance Taylor
90e5f484e5 * ieee.c (ieee_regno_to_genreg): Convert register numbers for m68k
and i960.
	(ieee_genreg_to_regno): Likewise.
1996-02-14 20:13:13 +00:00
Ian Lance Taylor
fe1dc0a656 * ieee.c: Extensive changes to write code to put types in the
global type block when possible, to output ranges for all memory
	occupied by the module, and to improve efficiency.
1996-02-12 19:41:47 +00:00
Ian Lance Taylor
d774870757 * debug.c (struct debug_handle): Remove class_mark field. Add
id_list and compare_list fields.
	(struct debug_class_id): Define.
	(struct debug_type_compare_list): Define.
	(debug_write): Initialize info->id_list
	(debug_write_name): Remove reference to info->class_mark.
	(debug_write_type): Get id for all structs and classes.  Simplify
	test for whether struct has already been written.
	(debug_write_class_type): Get id for all classes.  Simplify test
	for whether class has already been written.
	(debug_write_block): Don't write out blocks other than the top
	level block if they have no local variables.
	(debug_set_class_id): New static function.
	(debug_type_samep): New static function.
	(debug_class_type_samep): New static function.
	* prdbg.c (pr_start_struct_type): Always print id.
	(pr_start_class_type): Likewise.
	(pr_tag_type): Likewise.
1996-02-12 19:41:09 +00:00
Ian Lance Taylor
1dcea5a7df * ieee.c (ieee_start_compilation_unit): Clear modified and
modified_alloc fields of info.
1996-02-07 19:20:35 +00:00
Ian Lance Taylor
36fb98bec6 * configure.in: Check for --enable-shared. Substitute new
variables BFDLIB and OPCODES.
	* configure: Rebuild.
	* Makefile.in (BFDLIB): Set to @BFDLIB@.
	(OPCODES): Set to @OPCODES@.
1996-02-07 19:19:22 +00:00
Ian Lance Taylor
ae9120f917 * configure: Regenerate. 1996-02-02 21:50:53 +00:00
Steve Chamberlain
626a6542ec * configure: Regenerate with autoconf 2.7. 1996-02-01 21:39:44 +00:00
Steve Chamberlain
904fe36b83 * configure.in (i[3-6]86-*-win32): Becomes i[3-6]86-*-cygwin32.
(powerpc*-*-cygwin32): New.
	* configure: Regenerated.
1996-02-01 18:08:36 +00:00
Ian Lance Taylor
96c9632119 Wed Jan 31 13:22:03 1996 Richard Henderson <rth@tamu.edu>
* Makefile.in (distclean): Remove $(DEMANGLER_PROG).1.
1996-01-31 18:24:21 +00:00
Ian Lance Taylor
5da470b2bb Based on patches from H J Lu <hjl@zoom.com>:
* objcopy.c (remove_leading_char): New static variable.
	(OPTION_REMOVE_LEADING_CHAR): Define.
	(copy_usage): Mention --remove-leading-char.
	(filter_symbols): If remove_leading_char, and the first character
	of a global symbol matches the symbol leading char of the BFD,
	remove the first character.
	(copy_object): Filter the symbols if remove_leading_char is set.
	(copy_main): Handle --remove-leading-char.
	* binutils.texi, objcopy.1: Document --remove-leading-char.
1996-01-29 22:39:21 +00:00
Michael Meissner
eb684d4827 Fix up warning on SunOS 1996-01-27 20:44:54 +00:00
Ian Lance Taylor
392e2505bb tipo 1996-01-26 20:43:50 +00:00
Ian Lance Taylor
85d4b87066 * binutils.texi (nm): Improve documentation on symbol types.
(objdump): Reference the stabs manual from the discussion of the
	--stabs option.
1996-01-26 16:54:35 +00:00
Raymond Jou
e069197a14 * mpw-make.sed: Add a "stamps" target. 1996-01-25 19:38:14 +00:00
Ian Lance Taylor
980ef031a0 shorten copyright line 1996-01-25 18:55:00 +00:00
Ian Lance Taylor
1efb2ef007 * objdump.c (dump_headers, dump_section_header): Change objdump -h
output to be simpler and to include section file offsets.
1996-01-25 18:52:59 +00:00
Ian Lance Taylor
fab21c7850 * ieee.c (ieee_read_cxx_class): Don't multiply voffset by 4.
(struct ieee_write_type): Add name field.
	(struct ieee_type_class): Remove name field.  Change all uses to
	use new name field in type instead.
	(struct ieee_name_type): Likewise.
	(ieee_start_struct_type): Initialize name field of type.
	(ieee_start_class_type): Don't initialize classdef entry of tag.
	(ieee_class_method_var): Don't adjust voffset.
	(ieee_end_class_type): Likewise.
	(ieee_tag_type): Initialize new name field of type.
	(ieee_typdef): Set name after copying in type information.
1996-01-25 00:26:19 +00:00
Ian Lance Taylor
526fed067e * ieee.c (struct ieee_modified_type): Define.
(struct ieee_handle): Add modified and modified_alloc fields.
	(ieee_get_modified_info): New static function.
	(ieee_pointer_type): Cache type index.
	(ieee_const_type): Likewise.
	(ieee_volatile_type): Likewise.
1996-01-24 22:51:32 +00:00
Ian Lance Taylor
76e45938c3 * ieee.c (ieee_define_named_type): When creating a tag for an
anonymous struct, copy the name into memory.
	(ieee_tag_type): Likewise.
	* debug.c (debug_write_type): Only check and set id field for an
	unnamed object.
	(debug_write_class_type): Likewise.
1996-01-24 21:10:55 +00:00
Ian Lance Taylor
2466210755 * ieee.c: Various changes to write out types for functions and
references, and to not write out unnecessary function types.
1996-01-24 19:40:21 +00:00
Ian Lance Taylor
a837b8fc96 comment change 1996-01-24 19:38:16 +00:00
Ian Lance Taylor
74ae0c978d * ieee.c (struct ieee_var): Remove variable field. Add kind
field, and define some enum constants for it.
	(parse_ieee_ty): Set kind field of variable for 'x' and 'X' types.
	(parse_ieee_atn): Make an indirect slot for an external variable,
	although we otherwise don't record it.  Set kind field rather than
	variable field of pvar.
	(ieee_read_cxx_class): Try to get the type of a static member.
	(ieee_read_reference): Check kind field rather than variable
	field.
1996-01-24 17:08:25 +00:00
Ian Lance Taylor
c5baf5d9af fix ChangeLog entry 1996-01-24 01:27:44 +00:00
Ian Lance Taylor
501be095c9 * debug.h (enum debug_var_kind): Add DEBUG_VAR_ILLEGAL.
(enum debug_parm_kind): Add DEBUG_PARM_ILLEGAL.
	* debug.c (debug_get_parameter_types): Handle DEBUG_KIND_FUNCTION.
1996-01-24 01:26:49 +00:00
Ian Lance Taylor
3d2d462907 * ieee.c: Various changes to handle C++ reference types. 1996-01-24 01:26:21 +00:00
David Edelsohn
4e050e3b3e * objdump.c (disassemble_data): Pass fprintf to INIT_DISASSEMBLE_INFO. 1996-01-23 22:56:05 +00:00
Ian Lance Taylor
b96e1ce4f8 * ieee.c: Various changes to write out definitions of C++ classes. 1996-01-23 20:59:46 +00:00
Ian Lance Taylor
796369aa96 * debug.c (debug_append_filename): Remove.
* debug.h (debug_append_filename): Don't declare.
1996-01-23 20:59:18 +00:00
Ian Lance Taylor
c80b0dbaee * stabs.c (struct stab_handle): Remove last_type field. Add
so_string and so_value fields.
	(finish_stab): Call stab_emit_pending_vars before calling
	debug_end_function.  Don't warn about pending variables.
	(parse_stab): Accumulate N_SO strings until a non N_SO symbol is
	seen, rather than calling debug_append_filename.  Call
	stab_emit_pending_vars before calling debug_end_function.  Don't
	set info->last_type.
1996-01-23 20:58:57 +00:00
David Edelsohn
38aa863c90 * objdump.c (disassemble_data): Handle unknown endianness. 1996-01-23 17:58:32 +00:00
David Edelsohn
458bbd1f1e Add new option --show-raw-insn.
* objdump.c (show_raw_insn): New global.
	(usage): Update.
	(long_options): Update.
	(disassemble_data): Set disasm_info.flags if --show-raw-insn.

	* objdump.c (disassemble_data): Set new arch,mach,endian fields in
	disasm_info.
1996-01-23 00:50:24 +00:00
Ian Lance Taylor
4207b304c9 * ieee.c: Extensive changes to pass a single info argument around
in the reading routines, rather than several arguments.  Add code
	to read C++ debugging records.
1996-01-23 00:35:25 +00:00
Ian Lance Taylor
35aa91b97d * debug.h (debug_get_type_size): Declare.
(debug_get_field_name): Declare.
	(debug_get_field_bitpos): Declare.
	(debug_get_field_bitsize): Declare.
	(debug_get_field_visibility): Declare.
	(debug_get_field_physname): Declare.
	* debug.c (debug_get_real_type): Handle DEBUG_KIND_TAGGED.
	(debug_get_type_size): New function.
	(debug_get_field_name): New function.
	(debug_get_field_bitpos): New function.
	(debug_get_field_bitsize): New function.
	(debug_get_field_visibility): New function.
	(debug_get_field_physname): New function.
	(debug_write_type): Make sure we pass the real kind, not INDIRECT,
	to tag_type.  Pass the name recursively for INDIRECT.
1996-01-23 00:34:58 +00:00
Ian Lance Taylor
267e52989e * debug.h (struct debug_write_fns): Remove ellipsis_type. Add int
and boolean parameters to function_type.  Add boolean parameter to
	method_type.
	(debug_make_ellipsis_type): Don't declare.
	(debug_make_function_type): Add debug_type * and boolean
	parameters.  Change all callers.
	(debug_make_method_type): Add boolean parameter.  Change all
	callers.
	(debug_get_parameter_types): Add boolean * parameter.  Change all
	callers.
	(debug_get_target_type): Declare.
	* debug.c (struct debug_function_type): Add fields arg_types and
	varargs.
	(struct debug_method_type): Add field varargs.
	(debug_ellipsis_type, ELLIPSIS_P): Remove.
	(debug_make_ellipsis_type): Remove.
	(debug_make_function_type): Add arg_types and varargs parameters.
	(debug_make_method_type): Add varargs parameter.
	(debug_get_parameter_types): Add pvarargs parameter.
	(debug_get_target_type): New function.
	(debug_write_type): In case DEBUG_KIND_FUNCTION, push argument
	types and pass count to function_type.  In DEBUG_KIND_METHOD, use
	a signed int for the count, don't call ellipsis_type, and pass
	varargs to method_type.
	* stabs.c (struct stab_demangle_info): Add varargs field.
	(stab_demangle_argtypes): Add pvarargs parameter.  Change all
	callers.
	(stab_demangle_args): Likewise.
	(stab_demangle_type): In case 'F', pick up argument types.
	* prdbg.c (pr_ellipsis_type): Remove.
	(pr_function_type): Add argcount and varargs parameters.
	(pr_method_type): Add varargs parameter.
	* ieee.c (ieee_ellipsis_type): Remove.
	(ieee_function_type): Add argcount and varargs parameters.
	(ieee_method_type): Add varargs parameter.  Remove most of
	function body, and just call ieee_function_type.
1996-01-19 19:44:00 +00:00
Ian Lance Taylor
d3023c8f19 * stabs.c: Include "demangle.h". Added several new static
functions not listed below to demangle argument types; they are
	all called via stab_demangle_argtypes.
	(finish_stab): If the kind of an undefined tag is
	DEBUG_KIND_ILLEGAL, use DEBUG_KIND_STRUCT instead.  Warn if there
	are any pending variable.
	(parse_stab): Don't close the function when the block depth goes
	to zero.  Pass value to debug_end_function.
	(parse_stab_string): In case 'T', pass the name to
	parse_stab_type.
	(parse_stab_type): In case 'x', use stab_find_tagged_type.  In
	case '#', handle functions with variable numbers of arguments.
	(parse_stab_struct_type): Add tagname parameter.  Change all
	callers.
	(parse_stab_members): Add tagname and typenums parameters.  Change
	all callers.  If the type of a method is a stub, call
	parse_stab_argtypes to demangle the argument types and get the
	physical name of the function.
	(parse_stab_argtypes): New static function.
	(stab_record_variable): For a DEBUG_GLOBAL or DEBUG_STATIC
	variable, call debug_record_variable immediately.
	(stab_find_tagged_type): New static function.
1996-01-19 18:06:59 +00:00