Commit Graph

99 Commits

Author SHA1 Message Date
Jim Kingdon a1c8d76ef8 * frame.h, symtab.h, findvar.c (read_var_value): Change basereg
support to use LOC_BASEREG rather than SYMBOL_BASEREG_VALID.
	* dwarfread.c: Use LOC_BASEREG where appropriate.
	* Various: Support LOC_BASEREG and LOC_BASEREG_ARG.
1993-08-24 21:38:24 +00:00
Jim Kingdon 313dd52048 * frame.h, symtab.h: Revise comments regarding baseregs. 1993-08-21 02:54:33 +00:00
Peter Schauer 6f87ec4a21 Make breakpoint_re_set_one work with overloaded member functions,
`b 123' and `b foo' if foo is a static function.
	* symtab.c (decode_line_1, decode_line_2):  New argument `canonical'
	to return canonical line specs if requested by the caller.
	* breakpoint.c, source.c, symtab.c, symtab.h:  Change prototypes and
	callers accordingly.
	* symtab.c (build_canonical_line_spec):  New helper function which
	constructs the canonical line spec.
	* breakpoint.c (break_command_1):  Use canonical line spec instead
	of command string as addr_string if necessary.
	* source.c (line_info):  Fix storage leak.
1993-07-19 06:41:16 +00:00
Jim Kingdon f1ed43304a * symtab.c (decode_line_1): Use end of block to figure out whether
val.end is in the same function, not minimal symbols.

	* source.c (line_info): Add a few more wrap_here's.

	* i386-tdep.c (i386_follow_jump): Do byteswapping where needed and
	don't make assumptions about sizes of host data types.

	* blockframe.c, symtab.h (find_pc_partial_function): New arg endaddr.
	* infrun.c, breakpoint.c, printcmd.c: Change callers.
	* printcmd.c (containing_function_bounds): Remove.
	* printcmd.c (disassemble_command): Use find_pc_partial_function,
	not containing_function_bounds.
	* infcmd.c (step_1): Use find_pc_partial_function rather than
	trying to roll our own.  Move check for a pc between SIGTRAMP_START and
	SIGTRAMP_END in find_pc_partial_function, not step_1.
1993-07-12 03:42:35 +00:00
Jim Kingdon 5402346525 * infcmd.c (run_stack_dummy): New argument name.
Change error message in (another) attempt to make it comprehensible.
	* valops.c (call_function_by_hand): Pass name to run_stack_dummy.
	* symtab.h: Declare demangle and asm_demangle since macros use them.
1993-07-08 03:32:00 +00:00
Jim Kingdon 025abdfbd3 * symtab.h: Add comments about line numbers. 1993-06-29 16:55:29 +00:00
Jim Kingdon d63aae7f32 * symtab.h (struct symtab, line_charpos): Fix comment.
* source.c (identify_source_line): Fix off by one bug with line.
1993-06-29 14:47:17 +00:00
Jim Kingdon b9298844e5 * source.c (line_info): If --fullname, display the source.
(identify_source_line), callers: Take pc as argument, rather than
	assuming innermost frame (emacs doesn't use this, so no one ever
	noticed).
	* symtab.h: Declare frame_file_full_name.
	* main.c: Don't.
1993-05-26 03:27:32 +00:00
Jim Kingdon 9c5c272236 Doc fixes to previous doc fixes. 1993-04-23 15:12:25 +00:00
Jim Kingdon 5afa2040f4 Thu Apr 22 14:50:05 1993 Jim Kingdon (kingdon@cygnus.com)
* symtab.h: Fix LOC_REF_ARG comment.

Wed Apr 22 20:21:30 1993  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
			  and Jim Kingdon (kingdon@cygnus.com)

	* stabsread.c (define_symbol): Combine a 'p', 'r' arg pair to a
	LOC_REGPARM symbol.
	* config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Revise comments.
	symfile.c (compare_symbols): Don't check first character; STRCMP
	does that.

	* stabsread.c (define_symbol): Generate a LOC_REGPARM_ADDR for
	structures that are passed by address in a register.
	* symtab.h (enum address_class): Add LOC_REGPARM_ADDR.
	* findvar.c (read_var_value),
	printcmd.c (address_info, print_frame_args),
	stack.c (print_frame_arg_vars), symmisc.c (print_{,partial_}symbol),
	* symtab.c (lookup_block_symbol): Deal with it.
1993-04-22 22:27:25 +00:00
Jim Kingdon fce30fa15e * symtab.h: Clean up SYMBOL_VALUE comments. 1993-04-22 16:12:31 +00:00
Fred Fish 5aefc1ca23 Remove chill sanitizations, which are no longer necessary. 1993-04-16 23:22:41 +00:00
Jim Kingdon 95330ec393 More doc fixes 1993-04-16 17:46:01 +00:00
Jim Kingdon 0b28c26082 * symtab.{c,h}: Doc fixes (remove symseg references, last relevant
in gdb 2.8!).
1993-04-16 17:36:49 +00:00
Peter Schauer ca6a826d84 * symtab.h (DESTRUCTOR_PREFIX_P): New macro to check if physname
is a C++ destructor.
        * symtab.c (gdb_mangle_name): Use it.
        * symtab.c (find_methods): Do not add destructors to choice list
        for constructors.
        * symtab.c (decode_line_1): Make breakpoints on destructors work
        for gcc-2.x again.
1993-04-08 17:37:24 +00:00
John Gilmore ece2e98a0c * symtab.h (struct linetable_entry): Remove confusing comment. 1993-03-23 08:13:11 +00:00
Fred Fish 2e4964adfc * defs.h (STRCMP, STREQ, STREQN): New macros.
* defs.h (demangle_and_match):  Remove prototype.
	* dwarfread.c (STREQ, STREQN):  Remove macros, replaced with STREQ
	  and STREQN defined in defs.h.
	* dwarfread.c (set_cu_language):  For completely unknown languages,
	  try to deduce the language from the filename.  Retain behavior
	  that for known languages we don't know how to handle, we use
	  language_unknown.
	* dwarfread.c (enum_type, symthesize_typedef):  Initialize language
	  and demangled name fields in symbol.
	* dwarfread.c, mipsread.c, partial-stab.h:  For all usages of
	  ADD_PSYMBOL_TO_LIST, add language and objfile parameters.
	* dwarfread.c (new_symbol):  Attempt to demangle C++ symbol names
	  and cache the results in SYMBOL_DEMANGLED_NAME for the symbol.
	* elfread.c (STREQ):  Remove macro, use STREQ defined in defs.h.
	  Replace usages throughout.
	* elfread.c (demangle.h):  Include.
	* elfread.c (record_minimal_symbol):  Remove prototype and function.
	* gdbtypes.h, symtab.h (B_SET, B_CLR, B_TST, B_TYPE, B_BYTES,
	  B_CLRALL):  Moved from symtab.h to gdbtypes.h.
	* infcmd.c (jump_command):  Remove code to demangle name and add
	  it to a cleanup list.  Now just use SYMBOL_DEMANGLED_NAME.
	* minsyms.c (demangle.h):  Include.
	* minsyms.c (lookup_minimal_symbol):  Indent comment to match code.
	* minsyms.c (install_minimal_symbols):  Attempt to demangle symbol
	  names as C++ names, and cache them in SYMBOL_DEMANGLED_NAME.
	* mipsread.c (psymtab_language):  Add static variable.
	* stabsread.c (demangle.h):  Include.
	* stabsread.c (define_symbol):  Attempt to demangle C++ symbol
	  names and cache them in the SYMBOL_DEMANGLED_NAME field.
	* stack.c (return_command):  Remove explicit demangling of name
	  and use of cleanups.  Just use SYMBOL_DEMANGLED_NAME.
	* symfile.c (demangle.h):  Include.
	* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):  Fix
	  to match macros in symfile.h and allow them to be compiled
	  if INLINE_ADD_PSYMBOL is not true.
	* symfile.h (INLINE_ADD_PSYMBOL):  Default to true if not set.
	* symfile.h (ADD_PSYMBOL_*):  Add language and objfile parameters.
	  Add code to demangle and cache C++ symbol names.  Use macro form
	  if INLINE_ADD_PSYMBOL is true, otherwise use C function form.
	* symmisc.c (add_psymbol_to_list, add_psymbol_addr_to_list):
	  Remove, also defined in symfile.c, which we already fixed.
	* symtab.c (expensive_mangler):  Remove prototype and function.
	* symtab.c (find_methods):  Remove physnames parameter and fix
	  prototype to match.
	* symtab.c (completion_list_add_symbol):  Name changed to
	  completion_list_add_name.
	* symtab.c (COMPLETION_LIST_ADD_SYMBOL):  New macro, adds both
	  the normal symbol name and the cached C++ demangled name.
	* symtab.c (lookup_demangled_partial_symbol,
	  lookup_demangled_block_symbol):  Remove prototypes and functions.
	* symtab.c (lookup_symbol):  Remove use of expensive_mangler,
	  use lookup_block_symbol instead of lookup_demangled_block_symbol.
	  Remove code to try demangling names and matching them.
	* symtab.c (lookup_partial_symbol, lookup_block_symbol):
	  Fix to try matching the cached demangled name if no match is
	  found using the regular symbol name.
	* symtab.c (find_methods):  Remove unused physnames array.
	* symtab.c (name_match, NAME_MATCH):  Remove function and macro,
	  replaced with SYMBOL_MATCHES_REGEXP from symtab.h.
	* symtab.c (completion_list_add_symbol):  Rewrite to use cached
	  C++ demangled symbol names.
	* symtab.h:  Much reformatting of structures and such to add
	  whitespace to make them more readable, and make them more
	  consistent with other gdb structure definitions.
	* symtab.h (general_symbol_info): New struct containing fields
	  common to all symbols.
	* symtab.h (SYMBOL_LANGUAGE, SYMBOL_DEMANGLED_NAME,
	  SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME,
	  SYMBOL_MATCHES_REGEXP, MSYMBOL_INFO, MSYMBOL_TYPE):  New macros.
	* symtab. (struct minimal_symbol, struct partial_symbol, struct
	  symbol): Use general_symbol_info struct.
	* utils.c (demangle_and_match):  Remove, no longer used.
	* valops.c (demangle.h):  Include.
	* xcoffexec.c (eq):  Remove macro, replace usages with STREQ.
	* blockframe.c, breakpoint.c, c-exp.y, c-valprint.c, dbxread.c,
	  infcmd.c, m2-exp.y, minsyms.c, objfiles.h, solib.c, stack.c,
	  symmisc.c, symtab.c, valops.c:  Replace references to minimal
	  symbol fields with appropriate macros.
	* breakpoint.c, buildsym.c, c-exp.y, c-typeprint.c, c-valprint.c,
	  coffread.c, command.c, convex-tdep.c, cp-valprint.c, dbxread.c,
	  demangle.c, elfread.c, energize.c, environ.c, exec.c,
	  gdbtypes.c, i960-tdep.c, infrun.c, infrun-hacked.c, language.c,
	  main.c, minsyms.c, mipsread.c, partial-stab.h, remote-es1800.c,
	  remote-nindy.c, remote-udi.c, rs6000-tdep.c, solib.c, source.c,
	  sparc-pinsn.c, stabsread.c, standalone.c, state.c, stuff.c,
	  symfile.c, symmisc.c, symtab.c, symtab.h, tm-sysv4.h,
	  tm-ultra3.h, values.c, xcoffexec.c, xcoffread.c:  Replace strcmp
	  and strncmp usages with STREQ, STREQN, or STRCMP as appropriate.
	* breakpoint.c, buildsym.c, c-typeprint.c, expprint.c, findvar.c,
	  mipsread.c, printcmd.c, source.c, stabsread.c, stack.c,
	  symmisc.c, tm-29k.h, valops.c, values.c:  Replace SYMBOL_NAME
	  references with SYMBOL_SOURCE_NAME or SYMBOL_LINKAGE_NAME as
	  appropriate.
	* buildsym.c (start_subfile, patch_subfile_names):  Default the
	  source language to what can be deduced from the filename.
	* buildsym.c (end_symtab):  Update the source language in the
	  allocated symtab to match what we have been using.
	* buildsym.h (struct subfile):  Add a language field.
	* c-typeprint.c (c_print_type):  Remove code to do explicit
	  demangling.
	* dbxread.c (psymtab_language):  Add static variable.
	* dbxread.c (start_psymtab):  Initialize psymtab_language using
	  deduce_language_from_filename.
1992-12-23 06:34:57 +00:00
Per Bothner 35fcebce93 A ton of changes to improve C++ debugging. See ChangeLog. 1992-09-04 07:37:18 +00:00
John Gilmore 2670f34d21 Relocate symbols using an array of section_offsets, rather than a
single `addr' or `offset'.  This makes Solaris-2 support work, and
permits better VxWorks (and maybe xcoff) support later.  See ChangeLog.
1992-07-04 13:59:03 +00:00
Fred Fish 4ed3a9ea66 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c,
	eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c,
	i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c,
	infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c,
	putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c,
	sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c,
	tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c,
	values.c, xcoffread.c:
	Remove "(void)" casts from function calls where the return value
	is ignored, in accordance with GNU coding standards.
1992-07-04 03:22:08 +00:00
Fred Fish 51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c:  Lint.
	* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
	findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
	putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
	utils.c, valarith.c, valops.c, valprint.c, values.c:
	Replace bcopy() use with memcpy(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
	ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
	target.c, values.c:
	Replace bzero() use with memset(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* i386-tdep.c, main.c, valprint.c:
	Replace bcmp() use with memcmp(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
1992-06-29 23:34:38 +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
Fred Fish b0246b3bec Changes to implement the -mapped and -readnow options for commands that
read symbol tables.
1992-03-18 16:43:25 +00:00
Per Bothner 7e258d18e0 Oodles of changes. The most important is adding support for stabs
encapsulated in mips ecoff.  See ChangeLog for the gory details.
1991-12-23 23:16:58 +00:00
Stu Grossman 0a5d35ed30 * command.h, defs.h, eval.h, expression.h, remote-sa.sparc.c,
sparc-tdep.c, symtab.h, target.h, value.h, vx-share/ptrace.h,
vx-share/xdr_ptrace.h, vx-share/xdr_rdb.h:  ANSIfy enums.
1991-12-19 01:14:31 +00:00
John Gilmore 67c29f758d Make structs work on DECstation (sigh) 1991-11-28 00:51:48 +00:00
John Gilmore f1d77e9053 Improve G++ debugging support. 1991-11-27 09:43:59 +00:00
John Gilmore 7d9884b927 * defs.h: Incorporate param.h. All users changed.
* param-no-tm.h:  Change users to define TM_FILE_OVERRIDE instead.
* param.h, param-no-tm.h:  Removed.
* Update copyrights in all changed files.
* dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c,
solib.c, symtab.h, tm-umax.h, valprint.c:  Lint.
* tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h,
xm-merlin.h:  Avoid host include files in target descriptions.
* getpagesize.h:  Removed, libiberty copes now.
1991-11-21 18:42:05 +00:00
Fred Fish d018c8a6e1 Add defines so that parsers produced by SVR4 versions of yacc can coexist
in the same executable without collision (c-exp.y, m2-exp.y).  Add forward
delaration of function returning pointer to shut up compiler warnings about
conversion of int to pointer (symtab.h).
1991-11-19 15:59:55 +00:00
John Gilmore a048c8f537 Add tracking of object files (that contain symbols) to gdb.
This includes a "struct objfile" that owns symtabs and psymtabs
that were read in from that binary file.  See ChangeLog.
1991-11-09 10:50:07 +00:00
John Gilmore 4137c5fc0d * buildsym.c: Break out initial malloc sizes.
(record_line):  Record directly in a subfile.  Alloc on demand.
(compare_line_numbers):  Add from xcoffread.c.
(end_symtab):  New params say whether to sort pendings and
linetable.  Patch block stabs if defined.  Shrink linetable before
allocating the symtab.
* buildsym.h:  Delete line_vector* and prev_line_number.  Add
global_stabs and file_stabs for xcoffread.
* dbxread.c (start_subfile):  Move to buildsym.  Change above calls.
* symtab.h:  LINETABLE(symtab) can now be null.  Zap LINELIST.
* symmisc.c, symtab.c:  Cope with null LINETABLEs.
1991-10-27 22:26:02 +00:00
Per Bothner bcccec8c8d Various fixes to improve g++ debugging. See ChangeLog. 1991-10-26 02:05:14 +00:00
Fred Fish e2aab0314f Add three new builtin types (builtin_type_long_double, builtin_type_complex,
and builtin_type_double_complex).  Also add and use various TARGET_<TYPE>_BIT
macros to indicate the sizes of various types on the target machine.
1991-10-24 10:58:41 +00:00
Fred Fish 4a35d6e91b Remove the object file specific fields from the partial symbol table
structure and replace them with a pointer to private data for each
different flavor of object file reader to initialize appropriately.
1991-10-24 08:42:20 +00:00
Jim Kingdon 8aa13b8777 Make it run on wingnut (88k, DGUX). Complete list of changes in the ChangeLog. 1991-05-03 06:02:03 +00:00
Jim Kingdon e1ce8aa5ed The list of changes is too long to fit in the cvs log (since it truncates!).
Look at the ChangeLog for Apr 30 and May 1.
1991-05-02 04:28:42 +00:00
Michael Tiemann aec4cb918e Tue Apr 30 13:13:33 1991 Michael Tiemann (tiemann at cygint.cygnus.com)
* valprint.c (type_print_base): If the type being printed is a
	struct containing undefined types, print "<undefine type>"
	as the type instead of crashing.
	* values.c (value_headof): Get the vtable pointer taking
	TYPE_VPTR_BASETYPE into account.
	* symtab.c, symtab.h, dbxread.c: Fix various whitespace splotches.
1991-04-30 20:19:02 +00:00
Jim Kingdon ea9cdf62c6 * symtab.c, symtab.h: Have a builtin_type_{,unsigned_}long_long
regardless of LONG_LONG.
	symtab.c, symtab.h (allocate_stub_method): New function.
1991-04-26 23:05:17 +00:00
John Gilmore 5c43db6b38 * symtab.c (free_symtab): Declare as exported void fn now. 1991-04-19 01:17:26 +00:00
John Gilmore 92a29b47d7 * symtab.h (GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK): New
defines for the blocks of a blockvector that contain global and
        file-static symbols and the first of the smaller scope contours.
1991-04-13 22:21:23 +00:00
K. Richard Pixley bd5635a1e2 Initial revision 1991-03-28 16:26:26 +00:00
John Gilmore 831c851165 Initial revision 1990-09-05 17:54:31 +00:00
gdb-3.3 4187119d59 gdb-3.3 2012-06-03 15:36:32 +01:00
gdb-3.1 e91b87a368 gdb-3.1 2012-06-03 15:36:31 +01:00
gdb-2.8.1 bb7592f010 gdb-2.8.1 2012-06-03 15:36:31 +01:00
gdb-2.8 3bf57d2108 gdb-2.8 2012-06-03 15:36:31 +01:00
gdb-2.5.2 6368691e88 gdb-2.5.2 2012-06-03 15:36:30 +01:00
gdb-2.5.1 632ea0ccc5 gdb-2.5.1 2012-06-03 15:36:30 +01:00
gdb-2.4+.aux.coff 7b4ac7e1ed gdb-2.4+.aux.coff 2012-06-03 15:36:30 +01:00