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.
* c-valprint.c (c_val_print): For array of chars printed with
string syntax, don't print the address of the array. From
bothner@cygnus.com.
* c-exp.y (yylex): Recognize '.' as indicating a floating point
number regardless of the radix. From wilson@cygnus.com.
* valprint.c (set_input_radix_1, set_output_radix_1): New
prototypes and functions that do the actual radix setting work.
* valprint.c (set_radix, set_output_radix, set_input_radix):
Rewrite to use set_input_radix_1 and set_output_radix_1.
* valprint.c (initialize_valprint): Enable commands to
independently set and show input and output radices.
* valprint.c (show_radix): New prototype and function that
handles separate input and output radices.
to source, since previous behavior of defaulting to gdb init file
was troublesome and undocumented.
* printcmd.c (disassemble_command): Add missing '{}' pair to
else with two statements. Bug reported by Stephane Tsacas
<slt@isoft.fr>.
* symtab.c (find_pc_line): Don't complain about zero length or
negative length line numbers for the moment, since we may not own
the terminal when called, such as when single stepping. (FIXME)
* language.h (CAST_IS_CONVERSION): True if current language is
C++ as well as C. Fix from Peter Schauer.
* environ.c (get_in_environ, set_in_environ, unset_in_environ):
Use STREQN macro rather than bare '!strncmp()'.
* environ.c (unset_in_environ): Avoid use of memcpy on
overlapping memory regions, as suggested by Paul Eggert
<eggert@twinsun.com>.
* c-exp.y (%union struct): Remove unused ulval as suggested
by Paul Eggert <eggert@twinsun.com>.
* demangle.c: Change all references to cfront to ARM, since the
actual algorithm is the one specified in the Annotated Reference
Manual. This was confusing users into thinking that full cfront
support was implemented.
* dwarfread.c (CFRONT_PRODUCER): Remove, was never really used.
* eval.c (evaluate_subexp): For STRUCTOP_PTR pass the arg type
directly to lookup_struct_elt_type, which will do the
dereferencing itself.
* gdbtypes.c (lookup_struct_elt_type): Expand comments. Fix
NULL dereferencing bug for unnamed structs, comment out
questionable code.
* c-exp.y (exp): Use lcurly and rcurly for arrays and UNOP_MEMVAL
constructs.
* parse.c (free_funcalls): Moved prototype from parser-defs.h,
made function static.
* parse.c (struct funcall): Moved struct def from parser-defs.h.
* parse.c (funcall_chain): Moved from parser-defs.h, made static.
* parse.c (start_arglist):
* parser-defs.h (free_funcalls): Moved prototype to parse.c.
* parser-defs.h (struct funcall): Moved struct def to parse.c.
* parser-defs.h (funcall_chain): Moved to parse.c.
* printcmd.c (print_frame_nameless_args): Fix prototype.
* tm-mips.h (setup_arbitrary_frame): Fix prototype.
* tm-sparc.h (setup_arbitrary_frame): Fix prototype.
* valops.c (typecmp): Moved prototype from values.h.
* value.h (typecmp): Moved prototype to valops.c, made static.
**** start-sanitize-chill ****
* ch-exp.y (yylex): Change way control sequences are disabled.
**** end-sanitize-chill ****
of array constants using the obvious syntax.
* c-valprint.c (c_val_print): Set printed string length.
* dwarfread.c (read_tag_string_type): New prototype and
function that handles TAG_string_type DIEs.
* dwarfread.c (process_dies): Add case for TAG_string_type
that calls new read_tag_string_type function.
* expprint.c (print_subexp): Add support for OP_ARRAY.
* gdbtypes.c (create_range_type, create_array_type): Inherit
objfile from the index type.
**** start-sanitize-chill ****
* ch-typeprint.c (chill_print_type): Add case for
TYPE_CODE_STRING.
* ch-valprint.c (chill_val_print): Fix case for
TYPE_CODE_STRING.
**** end-sanitize-chill ****
constants with an explicit null byte terminator. OP_STRING is
now used for real string types.
* c-lang.c (builtin_type_*): Move declarations to lang.c since
they are used by all languages.
* c-lang.c (_initialize_c_language): Move initializations of
builtin_type_* to lang.c.
* c-typeprint.c (c_type_print_varspec_prefix,
c_type_print_varspec_suffix): TYPE_CODE_PASCAL_ARRAY renamed
to TYPE_CODE_STRING.
* c-valprint.c (c_val_print): Change the way character arrays
are printed as strings to be consistent with the way strings
are printed when pointer-to-char types are dereferenced.
Remove test of print_max before calling val_print_string, which
now does it's own test.
* eval.c (evaluate_subexp): Add case for OP_ARRAY.
* expprint.c (print_subexp, dump_expression): Add case for OP_ARRAY.
* expression.h (enum exp_opcode): Add OP_ARRAY and document.
* gdbtypes.c (builtin_type_*): Add declarations moved from
c-lang.c.
* gdbtypes.c (create_string_type): New function to create real
string types.
* gdbtypes.c (recursive_dump_type): TYPE_CODE_PASCAL_ARRAY
renamed to TYPE_CODE_STRING.
* gdbtypes.c (_initialize_gdbtypes): Add initializations of
builtin_type_* types moved from c-lang.c.
* gdbtypes.h (enum type_code): TYPE_CODE_PASCAL_ARRAY renamed
to TYPE_CODE_STRING.
* gdbtypes.h (builtin_type_string): Add extern declaration.
* gdbtypes.h (create_string_type): Add prototype.
* m2-lang.c (m2_create_fundamental_type): TYPE_CODE_PASCAL_ARRAY
renamed to TYPE_CODE_STRING.
* m88k-tdep.c (pushed_size): TYPE_CODE_PASCAL_ARRAY renamed to
TYPE_CODE_STRING.
* mipsread.c (_initialize_mipsread): TYPE_CODE_PASCAL_ARRAY
renamed to TYPE_CODE_STRING.
* parse.c (length_of_subexp, prefixify_subexp): Add case for
OP_ARRAY.
* printcmd.c (print_formatted): Recognize TYPE_CODE_STRING.
* typeprint.c (print_type_scalar): TYPE_CODE_PASCAL_ARRAY renamed
to TYPE_CODE_STRING.
* valops.c (allocate_space_in_inferior): New function and
prototype, using code ripped out of value_string.
* valops.c (value_string): Rewritten to use new function
allocate_space_in_inferior, but temporarily disabled until some
other support is in place.
* valops.c (value_array): New function to create array constants.
* valprint.c (val_print_string): Add comment to document use,
complete rewrite to fix several small buglets.
* value.h (value_array): Add prototype.
* value.h (val_print_string): Change prototype to match rewrite.
**** start-sanitize-chill ****
* ch-valprint.c (chill_val_print): Add case for TYPE_CODE_STRING.
* ch-exp.y (match_character_literal): Disable recognition of
control sequence form of character literals and document why.
**** end-sanitize-chill ****
must include the "-y" option.
* c-exp.y, m2-exp.y (yyrule, yyname, yyss, yyssp, yyvs, yyvsp):
Remove defines to remap non-yacc symbols, thus backing out of
previous recent changes. Standard policy is that non-yacc parser
generators get fixed, rather than adding bug workarounds in gdb
for each new one that pops up. Expand comment to note this.
* c-exp.y, m2-exp.y (YYDEBUG): Revert back to disabled by default.
* c-exp.y, m2-exp.y (YYDEBUG): Define if MAINTENANCE_CMDS is defined
and YYDEBUG is not already defined.
* c-exp.y (strncmp): Replace throughout with STREQN, missed
them during the previous replacements.
* printcmd.c (_initialize_printcmd): Update internal documentation
for "set" command to note that the assignment syntax is language
dependent.
**** start-sanitize-chill ****
* ch-exp.y (yyreds, yytoks): Remap like other yy* names.
* ch-exp.y (YYDEBUG): Define if MAINTENANCE_CMDS is defined
and YYDEBUG is not already defined.
* ch-exp.y (GDB_REGNAME, GDB_LAST, GDB_VARIABLE, GDB_ASSIGNMENT,
single_assignment_action): New terminals and nonterminal for gdb
extensions to chill expression grammer.
* ch-exp.y (match_dollar_tokens): Lexer routine to match all
tokens that start with '$' (register names, convenience vars, etc).
* ch-exp.y (tokentab2): Add GDB_ASSIGNMENT.
* ch-exp.y (yylex): Call match_dollar_tokens.
**** end-sanitize-chill ****
* 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.
* Makefile.in (SFILES_MAINDIR): Add typeprint.c, c-typeprint.c,
m2-typeprint.c, c-valprint.c cp-valprint.c m2-valprint.c.
* Makefile.in (HFILES): Add valprint.h.
* Makefile.in (OBS): Add typeprint.o, c-typeprint.o,
m2-typeprint.o, c-valprint.o, cp-valprint.o m2-valprint.o.
* typeprint.c, typeprint.h: New files for language independent
type printing functions.
* c-typeprint.c, m2-typeprint.c: New files for language dependent
type printing functions and definitions.
* valprint.h: New include file for language independent value
printing definitions.
* c-valprint.c, cp-valprint.c, m2-valprint.c: New files for language
dependent value printing functions.
* c-exp.y (production ptype): Add range_type variable and use new
create_range_type function.
* c-exp.y (tokentab2, tokentab3), c-lang.c (c_op_print_tab),
infcmd.c (path_var_name), language.c (unk_op_print_tab),
m2-lang.c (m2_op_print_tab): Change from ANSI-obsolescent
"const static" to ANSI-conformant "static const".
* c-exp.y (c_create_fundamental_type): Remove unused nbytes.
* c-exp.y (c_language_defn, cplus_language_defn): Add c_print_type,
and c_val_print.
* c-lang.h (c_print_type, c_val_print): Add prototypes.
* coffread.c (decode_type): Add range_type variable and call to
new create_range_type function.
* complaints.c (complain): Remove unused val variable.
* complaints.c (_initialize_complaints): Make it void.
* convex-tdep.c (value_of_trapped_internalvar): Add range_type
variable and call new create_range_type function.
* defs.h (enum val_prettyprint): Move enum from value.h to here
so we can avoid having to include value.h just for prototypes that
need the enum (thanks ANSI).
* dwarfread.c (struct_type): Local anonymous_size variable is
only used if !BITS_BIG_ENDIAN.
* dwarfread.c (decode_subscript_data_item): Add rangetype
variable and call new create_range_type function.
* elfread.c (elf_symfile_read): Remove unused dbx and text_sect
variables.
* eval.c (evaluate_subexp): Remove unused local variable name
and the statement with no side effects that initializes it.
* expprint.c (print_subexp): Change local_printstr to
LA_PRINT_STRING.
* gdbtypes.c (create_range_type): New function that creates
a range type using code fragments from object file readers as
an example of what has to be initialized.
* gdbtypes.c (create_array_type): Removed index_type, low_bound,
and high_bound parameters, replaced with a single range_type
parameter. Change function body to use passed in range_type
rather than handcrafting one.
* gdbtypes.h (create_range_type): Add prototype.
* gdbtypes.h (create_array_type): Change prototype parameters.
* infrun.c (normal_stop): Remove unused local variables tem and c.
* infrun.c (hook_stop_stub): Return 0 rather than random value.
* language.c (unk_lang_print_type, unk_lang_val_print): Add
stub functions that call error if called.
* language.c (unknown_language_defn, auto_language_defn,
local_language_defn): Add initializers unk_lang_print_type and
unk_lang_val_print.
* language.h (struct language_defn): Reformat for larger
comments, add la_print_type and la_val_print members. Add
LA_PRINT_TYPE and LA_VAL_PRINT macros. Change local_printchar
to LA_PRINT_CHAR and local_printstr to LA_PRINT_STRING.
* m2-lang.c (m2_create_fundamental_type): Remove unused local
variable nbytes.
* m2-lang.c (m2_language_defn): Add initializers m2_print_type
and m2_val_print.
* m2-lang.h (m2_print_type, m2_val_print): Add prototypes.
* main.c (execute_command): Remove unused local variable cmdlines.
* main.c (echo_command), stabsread.c (read_type), printcmd.c
(clear_displays), symmisc.c (block_depth), values.c
(clear_value_history):
Make testing of truth value of assignment result explicit.
* mipsread.c (upgrade_type): Update FIXME to include future use
of create_range_type.
* printcmd.c (ptype_command, ptype_eval, whatis_command,
whatis_exp, maintenance_print_type): Move prototypes and functions
to new typeprint.c.
* printcmd.c (_initialize_printcmd): Move add_com calls for
ptype_command and whatis_command to new typeprint.c.
* ser-bsd.c (serial_open): Remove unused variable sgttyb.
* source.c (find_source_lines): Local variable c only used
when LSEEK_NOT_LINEAR is defined.
* stabsread.c (read_array_type): Use new create_range_type
function.
* stabsread.c (read_range_type): Add new index_type variable and
call new create_range_type function rather than handcrafting
range types.
* symmisc.c (type_print_1): Change usages to LA_PRINT_TYPE.
* symtab.c (typedef_print usages): Use c_typedef_print, renamed.
* symtab.c (type_print_base usages): Use c_type_print_base.
* symtab.c (type_print_varspec_prefix usages): Use
c_type_print_varspec_prefix.
* symtab.c (type_print_method_args usages): Use
cp_type_print_method_args.
* valprint.c: Completely ripped apart and the fragments used
to create c-valprint.c, cp-valprint.c, m2-valprint.c, and
valprint.h. Remaining stuff is language independent.
* value.h (struct fn_field): Forward declare for prototypes.
* value.h (type_print_1): Remove prototype.
* value.h (enum val_prettyprint): Moved to defs.h.
* value.h (typedef_print): Prototype renamed to c_typedef_print.
* value.h (baseclass_offset): Add prototype.
**** start-sanitize-chill ****
* Makefile.in (SFILES_MAINDIR): Add ch-typeprint.c, ch-valprint.c.
* Makefile.in (OBS): Add ch-typeprint.o, ch-valprint.o.
* ch-typeprint.c: New file for language dependent type printing.
* ch-valprint.c: New file for language dependent value printing.
* ch-exp.y (parse_number): Remove prototype and stub function.
* ch-exp.y (decode_integer_literal): Removed unused digits and
temp variables.
* ch-exp.y (convert_float): Completely ifdef out for now.
* ch-exp.y (tokentab2, tokentab3, tokentab4, tokentab5),
ch-lang.c (chill_op_print_tab):
Change from ANSI-obsolescent "const static" to ANSI-conformant
"static const".
* ch-exp.y (yylex): Add unhandled storage class enumeration
literals to switch statement for completeness.
* ch-lang.c (chill_create_fundamental_types): Remove unused
nbytes variable. Change dummy type to 2 bytes to match int.
Handle FT_VOID types gratuituously added to chill DWARF by
compiler. Change FT_CHAR case to generate an TYPE_CODE_CHAR
type rather than a one byte TYPE_CODE_INT type.
* ch-lang.c (chill_language_defn): Add chill_print_type and
chill_val_print.
* ch-lang.h (chill_print_type, chill_val_print): Add prototypes.
**** end-sanitize-chill ****
a optional type to decorate as an array type, the type of the
index, and the bounds of the array. Records this additional info
in the array type for use with languages with nonzero array
bounds.
* gdbtypes.h (enum type_code): Update comment for TYPE_CODE_ARRAY
to note that arrays may have bounds.
* gdbtypes.h (create_array_type): Update prototype.
* c-exp.y (ptype production): Adjust for new create_array_type
calling conventions.
* coffread.c (decode_type): Call create_array_type rather than
handcrafting array types.
* convex-tdep.c (value_type): Remove, now use create_array_type.
* convex-tdep.c (value_of_trapped_internalvar): Convert calls to
vector_type into calls to create_array_type.
* dwarfread.c (decode_subscr_data): Name changed to
decode_subscript_data_item throughout.
* dwarfread.c (decode_subscript_data_item): Rewrite to use
create_array_type. Now records index type and range as well.
* dwarfread.c (dwarf_read_array_type): Rewrite as part of
change to use create_array_type.
* dwarfread.c (read_subroutine_type): Test existing user defined
types before decorating them, to ensure they are blank, and
complain about it if they are not.
* dwarfread.c (decode_fund_type): For unrecognized types, always
return some valid type (type integer). If the unrecognized type
cannot be an implementation defined type, complain as well.
* m88k-tdep.c (pushed_size): Update comment for TYPE_CODE_ARRAY.
* m88k-tdep.c (store_param): Update comment for TYPE_CODE_ARRAY.
* mipsread.c (upgrade_type): Add FIXME comment that code to
handcraft arrays should be replaced with call to create_array_type.
* stabsread.c (read_array_type): Replace code to handcraft
array types with call to create_array_type.
* valprint.c (type_print_varspec_prefix): Minor formatting
change, join lines that don't need to be split.
language specific fundamental types for C.
* m2-exp.y (m2_create_fundamental_type): New function to create
language specific fundamental types for Modula 2.
* c-exp.y (c_language_defn, cplus_language_defn): Add
c_create_fundamental_type to language struct initializers.
* m2-exp.y (m2_language_defn): Add m2_create_fundamental_type
to language struct initializers.
* dwarfread.c (expression.h, language.h): Include.
* dwarfread.c (ftypes): New array to hold fundamental types
for current compilation unit.
* dwarfread.c (cu_language_defn): New pointer to language
struct for language of current compilation unit.
* dwarfread.c (dwarf_fundamental_type): New function to
create/lookup fundamental types.
* dwarfread.c (set_cu_language): Initialize cu_language_defn.
* dwarfread.c (throughout): Replace lookup_fundamental_type
with dwarf_fundamental_type.
* dwarfread.c (read_file_scope): Zero out ftypes for each new
compilation unit (may be different language or different objfile).
* gdbtypes.c (lookup_fundamental_type): Move actual type
creations into language specific fundamental type creation
functions and call via create_fundamental_type. Add comment
about this function being obsolescent.
* gdbtypes.h (FT_BYTE, FT_UNSIGNED_BYTE): New types, true byte
sized signed and unsigned integers.
* gdbtypes.h (FT_NUM_MEMBERS): Increment, new types added.
* language.c (language_def): New function to lookup a language
struct given it's enumeration.
* language.h (struct language_defn): Add la_fund_type, a pointer
to a function that creates fundamental types for this language.
* language.h (create_fundamental_type): New macro to create
fundamental types based on the current language.
* language.h (language_def): Add prototype.
* language.c (unk_lang_create_fundamental_type): New function
for initializing language structs, calls error if called.
* language.c (unk_language_defn, auto_language_defn,
local_language_defn): Use unk_lang_create_fundamental_type.
**** start-sanitize-chill ****
ch-exp.y (chill_create_fundamental_type): New function.
ch-exp.y (chill_language_defn): Add chill_create_fundamental_type.
ch-exp.y (_initialize_chill_exp): BOOL types are only one byte.
**** end-sanitize-chill ****
which together maintain a dynamically expandable static buffer
for the lexer to use when translating C strings to their internal
form (other future uses possible). Fix parsing of C style strings
to do the normal C style input conversions of escaped character
sequences.
* valops.c (value_string): Remove translation of escaped
character sequences, now done in C expression parser.
and decides if it should be printed in literal form or some other
form, based on it's ASCII value and setting of sevenbit_strings.
* {c-exp.y, m2-exp.y} (emit_char): Use new PRINT_LITERAL_FORM
macro, change indentation style.
**** start-sanitize-chill ****
* ch-exp.y (chill_printchar): Use new PRINT_LITERAL_FORM macro.
* ch-exp.y (chill_printstr): First cut at real function instead
of error stub.
**** end-sanitize-chill ****
* defs.h (printchar): Replace with gdb_printchar.
* language.h (language_defn): Add new function pointers
la_printchar and la_printstr, to do language dependent
printing of characters and strings.
* language.h (local_printchar, local_printstr): New macros
to call language dependent functions pointed to by la_printchar
and la_printstr respectively.
* c-exp.y (emit_char, c_printchar, c_printstr): New language
dependent functions for printing characters and strings.
* c-exp.y (c_language_defn, cplus_language_defn): Add
c_printchar and c_printstr.
* command.c (do_setshow_command): Rename printchar use to
gdb_printchar.
* expprint.c (print_subexp): Replace C style string output
with call to local_printstr.
* language.c (unk_lang_printchar, unk_lang_printstr):
New stubs, currently errors.
* language.c (unknown_language_defn, auto_language_defn,
local_language_defn): Add unk_lang_printchar and
unk_lang_printstr.
* m2-exp.y (emit_char, m2_printchar, m2_printstr): New
language dependent functions to print characters and strings.
* m2-exp.y (m2_language_defn): Add m2_printchar and m2_printstr.
* utils.c (printchar): Renamed to gdb_printchar.
* valprint.c (print_string): Remove prototype, function moved
to c-exp.y, where it becomes c_printstr.
* valprint.c (print_max): Made global for reference from the
language dependent printing routines in *-exp.y.
* valprint.c (repeat_count_threshold): New variable with function
of old REPEAT_COUNT_THREHOLD define, but now settable by user.
Change all references to old macro to references to new variable.
* valprint.c (value_print, val_print): Replace calls to
print_string with calls to local_printstr.
* valprint.c (val_print): Replace C style character printing
with call to local_printchar.
* valprint.c (val_print): Add case for TYPE_CODE_CHAR.
* valprint.c (_initialize_valprint): Add add_show_from_set
call for setting up repeat_count_threshold as print variable.
**** start-sanitize-chill ****
* ch-exp.y (decode_integer_value): New function.
* ch-exp.y (decode_integer_literal): Use decode_integer_value.
* ch-exp.y (chill_printchar, chill_printstr): New language
dependent functions for printing characters and strings.
* ch-exp.y (chill_language_defn): Add chill_printchar and
chill_printstr.
**** end-sanitize-chill ****
local formatting information.
* language.h (language_defn): Replace individual format info
with language_format_info structs.
* language.h (local_*_format, local_*_format_prefix,
local_*_format_specifier, local_*_format_suffix): New macros
for binary/octal/decimal/hex formats to access info elements.
* c-exp.y (c_language_defn): Update for new format handling.
* m2-exp.y (m2_language_defn): Update for new format handling.
* dbxread.c (language.h): Include for partial-stab.h use.
* defs.h (local_hex_format, local_hex_format_custom,
local_hex_string, local_hex_string_custom): Move to language.h.
* language.c (local_hex_format_custom, local_hex_string,
local_hex_string_custom, local_octal_format_custom): Use new
format handling.
* language.c (unknown_language_defn, auto_language_defn,
local_language_defn): Update for new format handling.
* printcmd.c (print_scalar_formatted): Use new macros
to access decimal and binary format info for printing.
**** start-sanitize-chill ****
* c-exp.y (chill_language_defn): Update for new format handling.
* ch-exp.y (CHARACTER_LITERAL): Add support to yylex.
* ch-exp.y (match_integer_literal): Add function.
* ch-exp.y (builtin_type_chill_char): Add definition.
* gdbtypes.h (builtin_type_chill_char): Add declaration.
**** end-sanitize-chill ****
removed redundant parse rules. (YYSTYPE): added typed_val, removed
UINT and CHAR rules. (parse_number): work out the targetwise type
of a number based upon it's size and qualifiers. (yylex): chars
are now treated the same way as ints.
* source.c (indentify_source_line): don't core dump if wanted
line is larger than number of lines in source. (can happen when
coff gets confused about #included source).
remap all malloc's to xmalloc's and all realloc's to xrealloc's.
* c-exp.y, m2-exp.y: Add comment about how malloc/realloc are
remapped to xmalloc/xrealloc, use only malloc/realloc in grammer
file. Remove preprocessor defines that previously did remapping.
* c-exp.y: Call lookup_signed_typename() after seeing
"signed". This handles "signed char" correctly.
* c-exp.y: Recognize (but ignore) 'const' and 'volatile'
keywords before a type specifier.
to create new blank types, instead of handcrafting them.
* defs.h (printfi_filtered): Add prototype.
* utils.c (printfi_filtered): New function.
* gdbtypes.c (recursive_dump_type): Use printfi_filtered to
to simplify the code. Other cleanups.
* gdbtypes.c (check_stub_method): Demangle using DMGL_ANSI.
* gdbtypes.h (struct cplus_struct_type): Add comments describing
use of various fields.
* gdbtypes.c (print_bit_vector, print_cplus_stuff): New functions.
* c-exp.y (%token): Add CLASS as a token for C++, add grammar
production that currently treats it exactly the same as STRUCT.
* c-exp.y (yylex): Recognize "class" as token CLASS.
* symtab.c (gdb_mangle_name): Rewrite to match current g++ stabs.
* symtab.c (decode_line_1): Fix to pass quoted args on down to
general symbol handling code. Call cplus_mangle_opname with
DMGL_ANSI.
* symtab.c (decode_line_2): Print demangled function names in
breakpoint menus, instead of just file and line number.
* symtab.c (name_match): Call cplus_demangle with DMGL_ANSI.
* valprint.c (type_print_base): Print "class" for C++ classes,
rather than "struct". Print section labels for public, protected
and private members of C++ classes.
* values.c: Include demangle.h.
* values.c (value_headof): Call cplus_demangle with DMGL_ANSI.
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.
tokens with embedded whitespace, such as C++ demangled names.
* defs.h (demangle_and_match, strcmp_iw, skip_quoted): Prototypes.
* main.c (gdb_completer_quote_characters): Add global variable.
* main.c (symbol_completion_function): Total rewrite for C++
demangled name handling.
* main.c (skip_quoted): New function.
* main.c (main): Set rl_completer_quote_characters.
* symmisc.c (dump_symtab): Print source language for symtab.
* symtab.c (expensive_mangler): Add prototype and function.
* symtab.c (completion_list_add_symbol): Total rewrite for new
C++ demangled name handling.
* symtab.c (lookup_symbol): Check for demangled C++ symbol first,
other changes for demangled C++ symbol handling.
* symtab.c (lookup_demangled_block_symbol): Use demangle_and_match.
* symtab.c (lookup_demangled_partial_symbol): Use demangle_and_match.
* symtab.c (decode_line_1): Recognize C++ demangled names on input.
* symtab.c (completion_list_add_symbol): Total rewrite for new
C++ demangled name handling.
* symtab.c (expensive_mangler): New function.
* utils.c (strcmp_iw, demangle_and_match): New functions.
* xcoffread.c (aixcoff_symfile_read): Fix prototype.
disconnecting from controlling terminal, to avoid gdb hanging
on SVR4. Fixes bug reported by Oliver Okrongli.
* procfs.c (PROC_NAME_FMT): Change format to match default used
by system, as suggested by Oliver Okrongli.
* tm-68k.h (FRAME_FIND_SAVED_REGS): Apply missing parentheses
bug fix from Brent Townshend (bst%tt@cam.ORG).
* c-exp.y (nonempty_typelist): Fix memory overrun bug reported
by turlais@rechser.total.fr.
* dwarfread.c (decode_subscr_data): Fix bug in calculation of
length of non-zero lowerbound arrays. Bug fix from Peggy Fieland.
* objfiles.h (unlink_objfile): Add prototype.
* objfiles.c (unlink_objfile): Add function.
* objfiles.c (free_objfile): Call unlink_objfile.
* objfiles.c (allocate_objfile): Call unlink_objfile on newly
remapped objfiles. Bug reported by hahn@sunshine.labs.tek.com.
Also, discard old possibly bogus sf struct.
* symfile.c (symbol_file_add): Call init_entry_point_info() and
find_sym_fns() for remapped symbol files, in case of any changes
since the last mapping.
and use it to decide when to print the actual type name rather than
trying to invent the name of a fundamental type. This clears up the
confusion between int/long when they are the same sizes, removes one
obstacle to multi-language support (previously valprint.c thought
everything was a C type), and allows gdb to support distinctions between
explicitly and implicitly signed types when the compiler supports such
distinction in the debug output (as does every ANSI compiler I tested
except for gcc).
to make prototypes for all functions declared here.
* cplus-dem.c: Avoid declaring xmalloc and xrealloc.
* c-exp.y: Rename SIGNED, OR, and AND to avoid conflict.
* environ.c: Include <stdio.h> before defs.h. Minor cleanup.
* ieee-float.h: Use PARAMS for prototypes; make some params const.
* ieee-float.c, valarith.c: Include <stdio.h>. Lint. b*=>mem*.
* m2-exp.y: Remove unused CONST; Rename OR and AND.
* utils.c: Avoid declaring malloc and realloc. Lint.
(request_quit): Accept signal-number parameter.
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).
* expread.y, expread.tab.c: Remove.
* parser-defs.h: New file with common declarations from expread.y.
* c-exp.y: New file with the C parser from expread.y.
* m2-exp.y: New file with the Modula-2 parser.