Commit Graph

98 Commits

Author SHA1 Message Date
Peter Schauer e8abe489a0 * coffread.c, symfile.h (coff_getfilename): Make it static again.
* xcoffread.c (coff_getfilename):  Use a static copy from
	coffread.c, modified for accessing the static xcoff strtbl.
1994-11-25 21:46:52 +00:00
Peter Schauer 07aa9fdc6b * eval.c (evaluate_subexp): Make fnptr a LONGEST instead
of using longest_to_int.

	* infcmd.c (run_stack_dummy):  Reinstate set_current_frame call,
	mips and alpha targets need the real breakpoint pc for
	creating the breakpoint frame.

	* stack.c (return_command):  Cast return value to the return
	type of the function from which we return.
	* values.c (set_return_value):  Pass VALUE_CONTENTS unmodified
	to STORE_RETURN_VALUE.

	* symtab.c (lookup_symbol):  Remove search for `static mangled
	symbols', the search for `static symbols' already looks for
	mangled and demangled symbols via lookup_block_symbol.

	* valarith.c (value_binop):  Use ANSI C arithmetic conversions
	when performing integral evaluations, implement BINOP_EQUAL and
	BINOP_LESS.
	(value_equal, value_less):  Use value_binop to perform the
	comparison if both operands have TYPE_CODE_INT.

	* rs6000-tdep.c (pop_frame):  Make sure all registers are valid,
	as they are written back later. Handle sp restore for frameless
	functions. Use fdata.nosavedpc instead of fdata.frameless to
	determine if the pc has been saved.
	(function_frame_info):  Handle `mr r31,r1', which is generated by
	gcc-2.6, as a synonym for `oril r31,r1,0'.
	(skip_trampoline_code):  Handle shared library trampolines.
	* xcoffread.c (read_xcoff_symtabs):  Record XMC_GL symbols with
	their real name. Enables setting of breakpoints in shared libraries
	before the executable is run.
1994-10-15 10:50:07 +00:00
Jim Kingdon e90bd60df3 * xcoffread.c (read_xcoff_symtab): Fix comment for yesterday's change. 1994-09-29 15:26:16 +00:00
Jim Kingdon 67b9f39403 * xcoffread.c (read_xcoff_symtab, case C_FILE):
Set main_aux before using it.
1994-09-28 18:02:00 +00:00
Jim Kingdon d4cedfe4ae * xcoffread.c (read_xcoff_symtab): Process XTY_LD symbols we were
ignoring before.  But continue to ignore XMC_DS.
1994-09-28 17:18:59 +00:00
Jim Kingdon f69ecb9c9a * xcoffread.c (read_xcoff_symtab): Fix obsolete comment about
mst_solib_trampoline.

	* f-valprint.c (f_val_print): Change cast of valaddr from
	CORE_ADDR * to char **, since that is how it is used.

	* dbxread.c (read_dbx_dynamic_symtab): Save copy of symbol names
	using obsavestring, and pass that to prim_record_minimal_symbol.
	Having the objfile point to bfd_asymbol_name directly doesn't work
	if we save and restore a mapped symbol file.
1994-09-14 22:45:49 +00:00
Stan Shebs 7f4c859520 * objfiles.c (allocate_objfile): Add the newly-created objfile to
the end of the list of objfiles, instead of at the beginning.

	* xcoffread.c (allocate_include_entry): New function, abstracted
	from code in record_include_begin.
	(record_include_begin, record_include_end): Call it.

	* blockframe.c (reinit_frame_cache): Test inferior_pid instead of
	target_has_stack to decide whether to create a real stack frame
	for the cache.

	* coffread.c (process_coff_symbol) [CXUX_TARGET]: Ignore vendor
	section.
	* config/m88k/tm-cxux.h (CXUX_TARGET): Define.

	* h8300-tdep.c: Include "dis-asm.h" instead of <dis-asm.h>.
1994-09-03 00:32:08 +00:00
Stan Shebs 298f0428b4 Tue May 17 16:45:20 1994 Stan Shebs (shebs@andros.cygnus.com)
* xcoffread.c (read_xcoff_symtab): For C_FILE symbols, only use
	the auxent if the symbol's name is ".file".  From David Edelsohn
	<c1dje@watson.ibm.com>.
1994-05-18 03:13:09 +00:00
Jim Kingdon 963dbabee7 * xcoffread.c (xcoff_next_symbol_text): Don't return before
updating raw_symbol and symnum.  Return a value in the case where
	we complained.
1994-04-20 17:07:11 +00:00
Stu Grossman 70e375c356 Mon Apr 11 19:21:27 1994 Stu Grossman (grossman at cygnus.com)
* xcoffread.c (read_xcoff_symtab):  Ignore symbols of class C_EXT,
	smtyp XTY_LD, sclass XMC_DS (external data segment label).  They
	often have the same names as debug symbols for functions, and
	confuse lookup_symbol().
1994-04-12 02:53:09 +00:00
Jim Kingdon afbdbbd78e * xcoffread.c (xcoff_next_symbol_text): New function.
(read_xcoff_symtab): Set next_symbol_text_func to it.
	Move raw_symbol outside of read_xcoff_symtab.
1994-03-30 22:38:58 +00:00
Jim Kingdon 34d265dc08 * xcoffread.c (xcoff_next_symbol_text): New function.
(read_xcoff_symtab): Set next_symbol_text_func to it.
	Move raw_symbol outside of read_xcoff_symtab.
1994-03-30 21:48:14 +00:00
Peter Schauer ae6d035d28 For Sunos 4.x targets, enable gdb to set breakpoints in shared
library functions before the executable is run. Retrieve dynamic
	symbols from stripped executables.
	* symtab.h (minimal_symbol_type):  Add mst_solib_trampoline type.
	* parse.c (write_exp_msymbol), symmisc.c (dump_msymbols),
	symtab.c (list_symbols):  Handle mst_solib_trampoline.
	* minsyms.c (lookup_minimal_symbol):  Handle mst_solib_trampoline
	for all targets, remove IBM6000_TARGET dependencies.
	* dbxread.c (read_dbx_dynamic_symtab):  New function.
	* dbxread.c (dbx_symfile_read):  Use it.
	* dbxread.c (SET_NAMESTRING):  Set namestring to
	"<bad string table index>" instead of "foo" if the string index is
	corrupt.
	* xcoffread.c (read_xcoff_symtab):  Use mst_solib_trampoline instead
	of mst_unknown.
	* symtab.c (list_symbols):  Take from_tty as parameter and pass it
	to break_command. Handle mst_file_* minimal symbol types.
1994-03-15 21:46:32 +00:00
Ian Lance Taylor 37f24dc945 * xcoffread.c (read_xcoff_symtab): Change CSECT_LEN to use
x_scnlen.l rather than x_scnlen to match corresponding change in
	coff/internal.h.
1994-02-02 19:37:52 +00:00
Ian Lance Taylor bf8d9d28c6 * coffread.c (read_one_sym): bfd_coff_swap_aux_in now takes
additional arguments.
	* xcoffread.c (read_xcoff_symtab, read_symbol_lineno): Likewise.
1994-02-01 17:26:01 +00:00
Jim Kingdon 1b880e74fb * xcoffread.c (xcoff_symfile_read): Make second parameter a
struct section_offsets *, not a (nonexistent) struct section_offset *.
1994-01-21 14:44:29 +00:00
Jim Kingdon 6657a0c7ea * xcoffread.c (read_xcoff_symtab): Make main_aux just a union
internal_xcoff_symtab, not an array of one of them.  Change lots of
	"main_aux" to "&main_aux" and so on.
1994-01-21 14:38:58 +00:00
Jim Kingdon 27ad511f84 * coffread.c, xcoffread.c: Include <coff/internal.h>
before "symfile.h".
1994-01-21 14:26:20 +00:00
Jim Kingdon d4a0983ab0 * xcoffread.c (read_xcoff_symtab): complain() not abort().
* xcoffread.c (struct coff_symbol): Rename c_nsyms to c_naux (removes
	a completely gratuitous difference between xcoffread.c and coffread.c).
1994-01-20 22:38:03 +00:00
Jim Kingdon af8b790667 * xcoffread.c (read_xcoff_symtab, case C_FILE): Accept the name
from either the symbol name or the auxent.
	* coffread.c, symfile.h (coff_getfilename): Renamed from getfilename,
	no longer static.
1994-01-18 03:42:30 +00:00
Jim Kingdon 91cc45dacc * xcoffread.c (process_xcoff_symbol): Only change 'V' to 'S' if not
within_function.
1994-01-16 20:09:59 +00:00
Jim Kingdon 8d60affde9 * minsyms.c, symtab.h (prim_record_minimal_symbol{,_and_info}),
coffread.c (record_minimal_symbol),
	xcoffread.c (RECORD_MINIMAL_SYMBOL), callers: Add objfile parameter.
1993-12-27 17:47:28 +00:00
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
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 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
Jim Kingdon 577e6a8dc5 * xcoffread.c (xcoff_symfile_read), coffread.c (coff_symfile_read):
Sort symtabs for this objfile only, not for all objfiles.
1993-10-21 05:24:18 +00:00
Jim Kingdon 8f6960c90e * xcoffread.c (xcoff_symfile_read), coffread.c (coff_symfile_read):
Sort symtabs for this objfile only, not for all objfiles.
	* symfile.c, symfile.h (sort_all_symtab_syms): Remove; no longer used.
1993-10-21 04:41:56 +00:00
Jim Kingdon 9438d64262 * stabsread.h, stabsread.c, dbxread.c (common_block*, copy_pending):
Move common block handling from dbxread.c to stabsread.c.
	Use the name from the BCOMM instead of the ECOMM.
	Allocate things on the symbol_obstack.
	* xcoffread.c (process_xcoff_symbol): Process C_BCOMM, C_ECOMM,
	and C_ECOML.  On unrecognized storage classes, go ahead and call
	define_symbol (after the complaint).

	* dbxread.c (process_one_symbol): Don't relocate 'S' symbols by
	the text offset.
1993-10-12 20:02:11 +00:00
K. Richard Pixley c398de0cdd index -> strchr 1993-09-01 22:24:34 +00:00
K. Richard Pixley 4ed97c9a83 bzero -> memset 1993-09-01 21:56:42 +00:00
Jim Kingdon c438b3af2a * symtab.h (struct linetable), xcoffread.c (arrange_linetable):
Revise comments re linetable sorting.
	* buildsym.c (compare_line_numbers): Sort by pc, not by line.
	* coffread.c: Tell end_symtab to sort the line table.

	* coffread.c: Re-work a lot of the coff-specific stuff to use stuff
	in buildsym.c.  This includes coff_finish_block, coff_context_stack,
	coff_local_symbols, coff_file_symbols, coff_global_symbols,
	coff_end_symtab and coff_add_symbol_to_list.
	(read_enum_type): Deal with it now that we have a "struct pending"
	not a "struct coff_pending".

	* buildsym.c (end_symtab): Don't realloc subfile->linetable.
1993-09-01 21:15:27 +00:00
K. Richard Pixley ade40d3153 bcopy -> memcpy 1993-09-01 20:37:15 +00:00
Peter Schauer 0eb22669dc * breakpoint.c (breakpoint_1): Walk the breakpoint chain to decide if
we have breakpoints or watchpoints as we might have to ignore internal
	breakpoints.

	Fix gdb core dumps after `file newfile' commands.
	* symtab.h, symfile.c (clear_symtab_users):  New routine which
	unconditionally clears symtab users. clear_symtab_users_once
	commented out as it was a noop anyway.
	* objfiles.c (free_objfile):  Don't call clear_symtab_users_once.
	* objfiles.c (free_all_objfiles), symfile.c (new_symfile_objfile),
	xcoffexec.c (exec_close):  Call clear_symtab_users if necessary.
	* symfile.c (syms_from_objfile):  Install cleanups for errors during
	symbol reading.
	* coffread.c, dbxread.c, mipsread.c, xcoffread.c (*_symfile_read):
	Lint cleanup code, call do_cleanups explicitly.
	* symfile.c (symbol_file_add):  Call new_symfile_objfile and
	reinit_frame_cache _after_ the new symbols are read in.
1993-07-27 19:40:57 +00:00
Jim Kingdon 6b9561a423 * xcoffread.c: Remove obsolete NO_TYPEDEFS comment. 1993-06-28 17:38:30 +00:00
Jim Kingdon 860b4da38b * xcoffread.c (read_xcoff_symtab): If several program csects in one
source file, give them all the name of the source file, rather than
	the 2nd and subsequent ones having NULL names.
1993-05-27 22:06:12 +00:00
Jim Kingdon ea753d03d6 * stabsread.c: Remove all uses of error(). Make error_type and
read_type_number static.
	(define_symbol): Don't try to deal with a missing symbol
	descriptor which isn't followed by digit, '(', or '-'.
	* stabsread.h: Don't declare read_type_number here.
	* gdbtypes.h: Don't declare error_type here.
	* xcoffread.c: Remove NO_TYPEDEFS code.
1993-05-25 19:39:41 +00:00
Jim Kingdon b646b43826 * complaint.c: Make sure all complain() pass the address of the struct.
* xcoffread.c: Make sure all struct complaints are static not auto.
1993-05-21 20:43:16 +00:00
Jim Kingdon c41e08c472 * Makefile.in: Add rule for xcoffexec.o like that for paread.o.
* xcoffread.c (process_xcoff_symbol, case C_LSYM): Use define_symbol.
1993-05-21 14:42:14 +00:00
Jim Kingdon 7326242025 * xcoffread.c (process_xcoff_symbol, case C_LSYM): Use define_symbol. 1993-05-21 14:08:17 +00:00
Jim Kingdon 67240bb8bd Doc fix 1993-05-04 23:16:27 +00:00
Jim Kingdon 194d98c69e * symtab.h, xcoffread.c: Revise linetable sorting comments. 1993-04-26 14:20:57 +00:00
Jim Kingdon 058eb7667b * xcoffread.c: Nuke NO_DEFINE_SYMBOL code. There is no going back.
* stabsread.c (define_symbol): 'R' is synonym for 'P', not 'r'.
	xcoffread.c (process_xcoff_symbol, case C_RPSYM):
	Don't muck with SYMBOL_CLASS.
1993-04-19 17:39:24 +00:00
Jim Kingdon 9fa59efdd9 * source.c (select_source_symtab): Clean up comment. Also, if
we have a current_source_symtab, and s is NULL, return without
	doing anything.
	xcoffread.c (xcoff_symfile_read): Don't call select_source_symtab.
	breakpoint.c (breakpoint_re_set): Don't call select_source_symtab.
1993-04-15 20:11:01 +00:00
Jim Kingdon 486b440e04 * xcoffread.c (record_include_{begin,end}): Change fatal to complain. 1993-04-15 00:14:37 +00:00
Jim Kingdon ef5b809c7c * xcoffread.c (struct coff_symbol): Change c_sclass to unsigned char.
Remove FIXME comment regarding this.
1993-04-07 22:45:34 +00:00
Jim Kingdon f635bd474c use E_SYMNMLEN 1993-04-07 17:40:55 +00:00
Jim Kingdon 786757a9a4 * xcoffread.c (read_xcoff_symtab): Deal correctly with symbols of
exactly 8 characters.
1993-04-06 20:08:50 +00:00
Jim Kingdon 1d7e34e1ef * xcoffread.c (xcoff_symfile_offsets): Use 0 not addr for offsets. 1993-04-03 01:19:16 +00:00
Jim Kingdon e5c007603f * xcoffread.c (sort_syms, compare_symbols): Remove.
(xcoff_symfile_read): Use sort_all_symtab_syms from symfile.c
	not our own sort_syms (it is identical).
1993-03-29 22:25:59 +00:00
Jim Kingdon ad3768932d * xcoffread.c: Nuke NAMES_HAVE_DOT define (not used). 1993-03-29 21:58:29 +00:00