Commit Graph

11 Commits

Author SHA1 Message Date
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