Commit Graph

18 Commits

Author SHA1 Message Date
Jim Blandy ae767bfb78 gdb/ChangeLog:
* stack.c (get_selected_block): Add new argument `addr_in_block',
used to return the exact code address we used to select the block,
not just the block.
* blockframe.c (get_frame_block, get_current_block): Same.
* frame.h (get_frame_block, get_current_block,
get_selected_block): Update declarations.
* linespec.c, stack.c, blockframe.c, breakpoint.c, findvar.c,
linespec.c, varobj.c, printcmd.c, symtab.c: Callers changed.

gdb/mi/ChangeLog:
* mi-cmd-stack.c (list_args_or_locals): Pass new arg to
get_frame_block.  (See entry in gdb/ChangeLog.)
2002-04-05 22:04:43 +00:00
Daniel Jacobowitz 3121eff097 2002-03-22 Daniel Jacobowitz <drow@mvista.com>
* symtab.h (lookup_block_symbol): Add mangled_name argument
        to prototype.

        * symmisc.c (maintenance_check_symtabs): Call lookup_block_symbol
        with new mangled_name argument.
        * linespec.c (decode_line_1): Likewise.
        * valops (value_of_this): Likewise.
        * symtab.c (lookup_transparent_type): Likewise.
        (lookup_symbol_aux): Likewise.  Accept new mangled_name argument.
        (lookup_symbol): If we are given a mangled name, pass it down
        to lookup_symbol_aux.
        (lookup_block_symbol): If we are given a mangled name to check
        against, only return symbols which match it.
2002-03-22 18:57:08 +00:00
Daniel Jacobowitz af3598f8c6 Revert accidental commit. 2002-02-14 23:57:50 +00:00
Daniel Jacobowitz 003d6d1dc8 2002-02-14 Daniel Jacobowitz <drow@mvista.com>
Fix part of PR gdb/267.
        * linespec.c (find_methods): Handle constructors specially for now.
2002-02-14 23:40:23 +00:00
Andrew Cagney 255e7dbf2e * utils.c (error_begin): Make static.
* defs.h (error_begin): Delete declaration.

* linespec.c (cplusplus_error): Replace cplusplus_hint.
(decode_line_1): Use cplusplus_error instead of error_begin,
cplusplus_hint and return_to_top_level.
* coffread.c (coff_symfile_read): Use error instead of error_begin
and return_to_top_level.
* infrun.c (default_skip_permanent_breakpoint): Ditto.
2002-02-02 03:42:59 +00:00
Fred Fish 9b27852e6d Approved by Jim Blandy:
2001-12-10  Fred Fish  <fnf@redhat.com>
	* arm-linux-tdep.c (skip_hurd_resolver): Use NULL rather than
	zero in args to lookup_minimal_symbol.
	* linespec.c (decode_line_1): Ditto.
	* i386-linux-tdep.c (skip_hurd_resolver): Ditto.
	* minsyms.c (find_stab_function_addr): Ditto.
	* symfile.c (simple_read_overlay_table): Ditto.
	(simple_read_overlay_region_table): Ditto.
2001-12-10 22:04:10 +00:00
Andrew Cagney 3d6d86c64b s/value_ptr/struct value */ 2001-11-10 21:34:56 +00:00
Jim Blandy 015a42b4cf (Changes from Daniel Berlin, with revisions by Jim Blandy.)
Abstract out operations specific to particular C++ ABI's, and
invoke them through a function table.  This removes the C++ ABI
dependencies scattered throughout the code, and allows us to
cleanly add support for new C++ ABI's.
* cp-abi.h, cp-abi.h, gnu-v2-abi.c, hpacc-abi.c: New files.
* c-typeprint.c, c-valprint.c, dbxread.c, eval.c, gdbtypes.c,
jv-typeprint.c, linespec.c, symtab.c, typeprint.c, valops.c:
#include "cp-abi.h".  These files all use functions now declared
there.
* symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P):
Deleted.  These services are now provided by functions declared in
cp-abi.h.
* value.h (value_rtti_type, value_virtual_fn_field): Same.
* values.c (value_virtual_fn_field): Same, for this definition.
* valops.c (value_rtti_type): Same.
* c-typeprint.c (c_type_print_base): Use the functions from
"cp-abi.h", instead of the old macros, or hard-coded ABI-specific
tests.
* dbxread.c (record_minimal_symbol): Same.
* gdbtypes.c (get_destructor_fn_field, virtual_base_index,
virtual_base_index_skip_primaries): Same.
* jv-typeprint.c (java_type_print_base): Same.
* linespec.c (find_methods, decode_line_1): Same.
* symtab.c (gdb_mangle_name): Same.
* Makefile.in (SFILES): Add the new .c files mentioned above.
(cp_abi_h): New variable.
(COMMON_OBS): Add gnu-v2-abi.o, hpacc-abi.o, and cp-abi.o.
(cp-abi.o, gnu-v2-abi.o, hpacc-abi.o): New targets.
(c-typeprint.o, c-valprint.o, dbxread.o, eval.o, gdbtypes.o,
jv-typeprint.o, symtab.o, linespec.o, typeprint.o, valops.o): Add
dependency on $(cp_abi_h).
2001-04-27 00:19:09 +00:00
Andrew Cagney 41899c0412 * config/pa/xm-hppah.h (HPPA_COMPILER_BUG): Delete. GDB only
compiles using an ISO-C compiler.
(MALLOC_INCOMPATIBLE): Ditto.
* linespec.c (decode_line_1): Delete hack to work around
HPPA_COMPILER_BUG.
2001-03-23 00:41:02 +00:00
Jim Blandy 13b5765709 * gdb/linespec.c (find_methods): Whitespace differences aren't
significant in *un*mangled method names.  Use strcmp_iw to compare
them, not STREQ.  (Fix from Daniel Berlin.)

* gdb/testsuite/gdb.c++/userdef.exp: Check that GDB tolerates whitespace in
unmangled operator names.
2001-03-21 20:51:16 +00:00
Jim Blandy 8bd1f2c64c * linespec.c (find_methods): Just call CHECK_TYPEDEF on t, rather
than asking for sym_class's type; that's circuitous.  Remove
sym_class, since the last use of it is gone.
2001-03-20 16:17:22 +00:00
Martin Hunt 77cd5909d2 2001-03-15 Martin Hunt <hunt@redhat.com>
* linespec.c (decode_line_1): Remove trailing quote
	when parsing double quotes.
2001-03-15 18:02:14 +00:00
Keith Seitz 91c1720e68 * linespec.c (decode_line_1): Skip argptr over a leading
double quote. Prevents alloc of 0 bytes and memcpy of -1 bytes.
2001-03-14 18:36:45 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Fernando Nasser c5f0f3d0c8 2000-11-30 Fernando Nasser <fnasser@redhat.com>
* linespec.h: New file. Declarations for linespec.c.
        * linespec.c, alpha-tdep.c, breakpoint.c, parse.c, source.c,
        symtab.c, tracepoint.c: Include the above.
        * completer.c: New file. Line completion stuff for GDB.
        (get_gdb_completer_word_break_characters,
        get_gdb_completer_quote_characters): New functions. Accessors for
        useful completer internal data.
        (filename_completer, line_completion_function, skip_quoted): Moved
        here from top.c.
        * completer.h: New file. Declarations for the above.
        * linespec.c (decode_line_1): Use
        get_gdb_completer_word_break_characters and
        get_gdb_completer_quote_characters.
        * top.c: Include completer.h.
        (filename_completer, line_completion_function, skip_quoted):
        Moved to completer.c.
        * corefile.c, exec.c, source.c, symfile.c, linespec.c: Include
        completer.h.
        * Makefile.in (SFILES): Add completer.c.
        (COMMON_OBS): Add completer.o.
        (completer.o): New target.
        (linespec.o, alpha-tdep.o, breakpoint.o, parse.o, source.o,
        symtab.o, tracepoint.o): Add linespec.h to dependencies list.
        (corefile.o, exec.o, source.o, symfile.o, linespec.o): Add completer.h
        to dependencies list.
2000-12-01 00:43:47 +00:00
Jim Blandy e85428fca3 * symtab.c (no_symtab_msg): Remove definition.
(sources_info): Replace use of no_symtab_msg with the string
itself.
* linespec.c (no_symtab_msg): Remove declaration.
(decode_line_1): Replace uses of no_symtab_msg with the string
itself.
2000-11-19 17:27:38 +00:00
Fernando Nasser 506419459a 2000-11-10 Fernando Nasser <fnasser@totem.toronto.redhat.com>
* symtab.c (decode_line_1, total_number_of_methods, find_methods,
	build_command_line_spec, find_toplevel_char, decode_line_2):
	Move to linespec.c.
	* linespec.c: New file. Routines that handle linespecs, formerly
	in symtab.c.
	* symtab.h: Export find_line_symtab and find_function_start_sal,
	* Makefile.in: Add linespec.c.
2000-11-10 23:02:56 +00:00