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.
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.
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.
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.
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.
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.
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.
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.