Commit Graph

7942 Commits

Author SHA1 Message Date
Thomas Lord
199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
Ian Lance Taylor
b3c0fc577b * reloc.c (enum bfd_reloc_code_real): Added
BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
	BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
	* bfd-in2.h: Rebuilt.
	* coff-mips.c (mips_bfd_reloc_type_lookup): Handle
	BFD_RELOC_MIPS_LITERAL.
	* elf32-mips.c (mips_reloc_map): Handle new relocs.
1993-11-01 21:17:31 +00:00
Jim Kingdon
d566fd91cf * config/m88k/m88k.mh (NATDEPFILES): Remove exec.o. 1993-11-01 21:11:12 +00:00
Jim Kingdon
95bfaf1c01 * Makefile.in, gdb.t2*/Makefile.in: Add -O to CXXFLAGS. 1993-11-01 20:49:03 +00:00
Jim Kingdon
3fd4045fdb * paread.c (pa_symtab_read): Change comments to say ignoring
labels really should be handled by the assembler/compiler.

	* Makefile.in: Add -O to CXXFLAGS.

	* TODO: Expand comments on fast watchpoints.
1993-11-01 20:41:35 +00:00
Jim Kingdon
58cf370c11 * mmalloc.texi: Fix typo ("for for" -> "for"). 1993-11-01 20:28:46 +00:00
Jim Kingdon
7b63668388 * Makefile.in (CXXFLAGS): Add -O. 1993-11-01 20:18:22 +00:00
Jim Kingdon
de807a9b6a Remove v9-specific entry 1993-11-01 20:08:35 +00:00
Ian Lance Taylor
55d5b62d65 * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
	(MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
	MY_bfd_seclet_link): Define.
	(MY_bfd_reloc_type_lookup): Rename from
	MY_reloc_howto_type_lookup.
	(MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
	(MY(vec)): Use JUMP_TABLE rather than listing functions.
	* hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
	MY_canonicalize_reloc, MY_write_object_contents): Don't define in
	terms of MY, because that causes a recusive invocation of CAT when
	expanded within JUMP_TABLE, and ANSI compilers don't expand
	recursive macros.
	* mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
	MY_reloc_howto_type_lookup, and don't define in terms of MY.
	(MY_canonicalize_reloc): Don't define in terms of MY.
	(aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
	than listing functions.
1993-11-01 19:43:39 +00:00
Stan Shebs
278d569a2a Keep Lynx file 1993-11-01 19:27:15 +00:00
Stan Shebs
9798d9bf47 Keep Sparc file 1993-11-01 19:25:39 +00:00
Stan Shebs
a3ffe730ba Keep Sparc file 1993-11-01 19:18:08 +00:00
Stan Shebs
e3b5bfa890 Keep Lynx files 1993-11-01 19:15:17 +00:00
Jim Kingdon
6198b7a128 * config.bfd: Use m68k-elf for m68*-*-sysv4*. 1993-11-01 15:19:29 +00:00
Jeff Law
55449edd2d Fix typo in recent hange from using bfd target name to using the flavour. 1993-11-01 07:51:03 +00:00
Jeff Law
5c08b47f03 * paread.c (pa_symtab_read): Also filter out local symbols starting
with "L$".
1993-11-01 03:46:30 +00:00
Jeff Law
ffb4ea6ab0 * paread.c (pa_symtab_read): Also filter out local symbols starting
with "L$".
1993-11-01 03:44:53 +00:00
Jim Kingdon
73edb321e3 * values.c (unpack_long, unpack_double, value_from_double),
valarith.c (value_binop), stabsread.c (define_symbol):
	Use extract_floating and store_floating instead of
	SWAP_TARGET_AND_HOST.
1993-10-31 20:45:41 +00:00
Jim Kingdon
52912aac0d * symfile.h (sym_fns), symfile.c (find_sym_fns), xcoffread.c,
coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c:
	Change from using bfd target name to using the flavour.
1993-10-31 20:34:35 +00:00
Jim Kingdon
bf04fba0f3 Add missing entry for change by Ian 1993-10-31 19:51:54 +00:00
Jim Kingdon
ffbfe25026 * remote.texi (VxWorks Remote): Clarify that rebuilding VxWorks kernel
is a mandatory step.  Make the stuff about that more concise.
1993-10-31 19:36:41 +00:00
Stan Shebs
30fb2a6495 Keep Lynx files 1993-10-31 19:35:44 +00:00
Stan Shebs
00bac33447 Keep Lynx files 1993-10-31 19:28:03 +00:00
Jim Kingdon
9e461dac71 * targets.c: Move enum target_flavour outside of struct and change
the name to enum bfd_flavour.  This means bfd clients can use it.
	* bfd-in.h: Add macro bfd_get_flavour.
	* bfd-in2.h: Rebuilt.
1993-10-31 18:59:59 +00:00
Jim Kingdon
0eed42deee * symfile.h (sym_fns), symfile.c (find_sym_fns), xcoffread.c,
coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c:
	Change from using bfd target name to using the flavour.
1993-10-31 18:54:28 +00:00
Jeff Law
47f45d6636 * config/tc-hppa.c (subspace_dictionary_chain): Add new ssd_defined
field.  Define SUBSPACE_DEFINED accessor macro.
	(pa_subspace): Allow user to override subspace attributes for
	built-in subspaces.  Set ssd_defined at the end of fcn -- that
	way the attributes can only be changed once.  Pass newly allocated
	name to is_defined_subspace, not a pointer to the input line.
	Fix typo in space/subspace rework.
	(is_defined_subspace): Delete unused 2nd arg.  All callers changed.

	* config/tc-hppa.c (pa_import): If currently in the text segment
	and a symbol is imported without type information, set BSF_FUNCTION
	for the symbol.
1993-10-31 18:49:26 +00:00
Jim Kingdon
00b02f17b5 * paread.c: Remove comment about how we should use an "ordinary"
file format with an hppa suffix.  There is nothing ordinary about SOM.
1993-10-31 15:56:44 +00:00
Jim Kingdon
f6c4bf1a82 * objfiles.h, infcmd.c, symfile.c: Add comments about how various
objfiles get created and when we should blow them away.
1993-10-31 15:46:34 +00:00
Jim Kingdon
e6d739ebb5 * som.c: Add comment about how abort() on corrupt executable is evil. 1993-10-31 15:40:58 +00:00
Jeff Law
20b39b6f05 * write.c (relax_and_size_seg): Correct test to determine
if the section's size was rounded up.
1993-10-31 08:06:11 +00:00
Jeff Law
e75acd689b * config/obj-som.h (obj_set_symbol_type): Define a hook so GAS
can properly set all the SOM symbol types.
	* config/tc-hppa.c (pa_symbol_type): New enum to represent the
	symbol types which can be set from an IMPORT/EXPORT statement.
	(pa_export_args): Set the pa_symbol_type type based on arguments.
	If defined, call obj_set_symbol_type to pass this information on
	to the BFD backend.
1993-10-31 07:48:41 +00:00
Jeff Law
d191a03cf5 * read.c (get_stab_string_offset): Set SEC_DEBUGGING for any
stab section we make.
        (s_stab_generic): Likewise.
1993-10-31 07:38:33 +00:00
Jeff Law
65a7f8a604 Allow backends to override the value of the "fake" label.
See ChangeLog for the details.
1993-10-31 02:19:05 +00:00
Jeff Law
b309df49dc * config/tc-i386.h (DOT_LABEL_PREFIX): Delete.
(LOCAL_LABEL, FAKE_LABEL_NAME): Define.
        * config/tc-m68k.h (DOT_LABEL_PREFIX): Delete.
        (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
        * config/te-sco386.h (DOT_LABEL_PREFIX): Delete.
        (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
1993-10-31 02:18:17 +00:00
Jeff Law
b89094aa91 * config/tc-hppa.h (FAKE_LABEL_NAME): Define as L$0\001 so it's
known to be a local label.
1993-10-31 02:13:49 +00:00
Jeff Law
d4c8cbd8ef * expr.c (make_expr_symbol): Delete DOT_LABEL_PREFIX code
and instead simply use the string defined by FAKE_LABEL_NAME.
        (operand): Likewise.
        * read.c (s_stab_generic): Likewise.
1993-10-31 02:13:34 +00:00
Jeff Law
6bc14195fb Rework space/subspace handling in PA code to fully support
SOM spaces/subspaces.
	* tc-hppa.c (USE_ALIASES): New object-format dependent define
	to control the use of space/subspace name aliases.
	(update_subspace): Accept space chain entry for containing space
	as a new parameter.  All callers changed.
	(pa_get_label): Use current_space rather than pa_segment_to_space.
	(pa_define_label): Likewise.
	(pa_undefine_label): Likewise.
	(md_begin): Change into the (possibly modified) text_section.
	(pa_parse_space_stmt): Create a new segment/space if create_flag
	is true, and the space name is not one of the two predefined spaces.
	(pa_subspace): Use current_space rather than a lookup via
	pa_segment_to_space.  Reset BFD section flags as required by
	the .subspace directive.  Likewise for the section alignment.
	Pass the current space to update_subspace and create_new_subspace.
	(pa_spaces_begin): Only use space/subspace aliases if USE_ALIASES
	is true.  When not using aliases, create a BFD section for each
	subspace encountered.  When not using aliases replace the default
	text, data, and bss segments with new ones.
	(create_new_subspace): When not using aliases each subspace has a
	section/segment and subsegments are not needed, so set the subsegment
	to zero.
1993-10-31 01:54:01 +00:00
Jeff Law
3b9a72c53c Rework space/subspace handling in PA code to fully support
SOM spaces/subspaces.
	* config/tc-hppa.c (USE_ALIASES): New object-format dependent define
	to control the use of space/subspace name aliases.
	(update_subspace): Accept space chain entry for containing space
	as a new parameter.  All callers changed.
	(pa_get_label): Use current_space rather than pa_segment_to_space.
	(pa_define_label): Likewise.
	(pa_undefine_label): Likewise.
	(md_begin): Change into the (possibly modified) text_section.
	(pa_parse_space_stmt): Create a new segment/space if create_flag
	is true, and the space name is not one of the two predefined spaces.
	(pa_subspace): Use current_space rather than a lookup via
	pa_segment_to_space.  Reset BFD section flags as required by
	the .subspace directive.  Likewise for the section alignment.
	Pass the current space to update_subspace and create_new_subspace.
	(pa_spaces_begin): Only use space/subspace aliases if USE_ALIASES
	is true.  When not using aliases, create a BFD section for each
	subspace encountered.  When not using aliases replace the default
	text, data, and bss segments with new ones.
	(create_new_subspace): When not using aliases each subspace has a
	section/segment and subsegments are not needed, so set the subsegment
	to zero.
1993-10-31 01:53:01 +00:00
Jeff Law
5c2bae7507 * gas/hppa/unsorted/unsorted.exp (ss_align): Remove OSF xfail.
* gas/hppa/more.parse/parse.exp: Add new test.
        * gas/hppa/more.parse/ssbug.s: New test to make sure non-default
        * sections are handled correctly.
1993-10-31 01:45:52 +00:00
Jeff Law
03cc338bc1 * gas/hppa/more.parse/parse.exp: Add new test.
* gas/hppa/more.parse/ssbug.s: New test to make sure non-default
	sections are handled correctly.
1993-10-31 01:41:59 +00:00
Jeff Law
548ea75baa * config/tc-hppa.c (pa_parse_space_stmt): If needed, call
obj_set_section_attributes to pass space attributes to the
        BFD backend.
        (create_new_space): Likewise.
        (create_new_subspace): Likewise for subspace attributes using
        obj_set_subsection_attributes.
        (update_subspace): Likewise for subspace attributes using
        obj_set_subsection_attributes.
1993-10-30 23:11:31 +00:00
Jeff Law
0f3b419c4c * config/tc-hppa.c (pa_parse_space_stmt): Get segment and sort key
for $TEXT$ and $PRIVATE$ from the default space structure.
1993-10-30 23:00:34 +00:00
Jeff Law
9a182533aa * config/tc-hppa.c (pa_export_args): Always set BSF_FUNCTION
as appropriate for the given type.
1993-10-30 22:55:19 +00:00
Jeff Law
62f0841b9d * config/tc-hppa.c (tc_gen_reloc): Preliminary stab at handling
SOM relocations.
1993-10-30 22:35:49 +00:00
Jeff Law
d56f45f5bc * config/tc-hppa.c (pa_comm): Delete incorrect check for symbol
redefinition.
1993-10-30 22:02:53 +00:00
Jeff Law
3c87583d0a * config/obj-som.[ch]: New files for SOM support. Note SOM
support is not yet complete in GAS or BFD.
1993-10-30 21:57:16 +00:00
Jeff Law
0fa747c4f3 * config/obj-som.[ch]: New files for SOM support in GAS. 1993-10-30 21:55:00 +00:00
Jeff Law
12696e9cb5 * config/ho-hppabsd.h: Delete IO* macros, they are defined in
stdio.h.  Delete declaration of free.  Include stdlib.h, unistd.h,
        and string.h.
1993-10-30 21:29:29 +00:00
Jeff Law
9bc0f7c85c * gas/all/gas.exp: Disable (and fail) p1480.s for all PA targets. 1993-10-30 21:14:53 +00:00
Jim Kingdon
4d57c5995e * symfile.c (reread_symbols): When re-reading symbols, do all the
right operations ourself, rather than calling symbol_file_command.
	If we re-read something, call clear_symtab_users not just
	breakpoint_re_set.
	* objfiles.h, objfiles.c (build_objfile_section_table): No longer
	static.
	* symfile.c (clear_symtab_users): Call clear_pc_function_cache.
	* coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c
	(*_symfile_offsets): Set objfile->num_sections.
	* remote.c (remote_wait), symfile.c (syms_from_objfile):
	Don't muck with objfile->num_sections now that all the symbol
	readers set it.
	* elfread.c: Clean up obsolete comment about handling only DWARF.
	* paread.c: Remove comment about how we should use an "ordinary"
	file format with an hppa suffix.  There is nothing ordinary about SOM.
1993-10-30 20:21:19 +00:00