* solib.h (PC_SOLIB): New macro; define using solib_address.
* stack.c (print_frame_info) [PC_SOLIB]: If no function name, try
PC_SOLIB on the PC value.
various miscellaneous things discovered in the process:
* printcmd.c, defs.h (print_address_numeric): New function.
* c-valprint.c (c_val_print), ch-valprint.c (chill_val_print)
breakpoint.c (describe_other_breakpoints, breakpoint_1, mention),
cp-valprint.c (cplus_print_value), infcmd.c (jump_command),
printcmd.c, stack.c, symfile.c, symmisc.c, valprint.c:
Use it.
* utils.c, defs.h (gdb_print_address): New function.
* expprint (dump_expression), gdbtypes.h: Use it.
* breakpoint.c (describe_other_breakpoints),
symmisc.c (dump_symtab, print_symbol):
Use filtered not unfiltered I/O.
(remove_breakpoints): Remove BREAKPOINT_DEBUG code. Might as well
just run gdb under a debugger for this (and it had problems with
printing addresses, how to print b->shadow, etc.).
* buildsym.c (make_blockvector), core.c (memory_error),
exec.c (print_section_info), maint.c (print_section_table),
mdebugread.c (parse_procedure), solib.c, source.c, symfile.c,
symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
Add comments saying code is broken. Marked with "FIXME-32x64".
* dbxread.c (process_one_symbol), partial-stab.h (default),
remote-vx.c (vx_run_files_info):
Don't cast int being passed to local_hex_string.
* symmisc.c (print_symbol): Don't cast long being passed to %lx.
* symtab.h (general_symbol_info): Add comment about SYMBOL_VALUE
only being a long.
* symmisc.c (print_symbol): Print "offset" in message for LOC_ARG
and LOC_LOCAL.
* printcmd.c (print_address): Remove #if 0 code with ADDR_BITS_REMOVE.
* source.c: Include <sys/types.h> regardless of USG.
various miscellaneous things discovered in the process:
* printcmd.c, defs.h (print_address_numeric): New function.
* c-valprint.c (c_val_print), ch-valprint.c (chill_val_print)
breakpoint.c (describe_other_breakpoints, breakpoint_1, mention),
cp-valprint.c (cplus_print_value), infcmd.c (jump_command),
printcmd.c, stack.c, symfile.c, symmisc.c, valprint.c:
Use it.
* utils.c, defs.h (gdb_print_address): New function.
* expprint (dump_expression), gdbtypes.h: Use it.
* breakpoint.c (describe_other_breakpoints),
symmisc.c (dump_symtab, print_symbol):
Use filtered not unfiltered I/O.
(remove_breakpoints): Remove BREAKPOINT_DEBUG code. Might as well
just run gdb under a debugger for this (and it had problems with
printing addresses, how to print b->shadow, etc.).
* buildsym.c (make_blockvector), core.c (memory_error),
exec.c (print_section_info), maint.c (print_section_table),
mdebugread.c (parse_procedure), solib.c, source.c, symfile.c,
symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
Add comments saying code is broken. Marked with "FIXME-32x64".
* dbxread.c (process_one_symbol), partial-stab.h (default),
remote-vx.c (vx_run_files_info):
Don't cast int being passed to local_hex_string.
* symmisc.c (print_symbol): Don't cast long being passed to %lx.
* symtab.h (general_symbol_info): Add comment about SYMBOL_VALUE
only being a long.
* symmisc.c (print_symbol): Print "offset" in message for LOC_ARG
and LOC_LOCAL.
* printcmd.c (print_address): Remove #if 0 code with ADDR_BITS_REMOVE.
* source.c: Include <sys/types.h> regardless of USG.
in case execution was stopped in the called function.
* stack.c (print_frame_info, frame_info): If backtracing through
a call dummy, handle the starting source line number on a line
boundary like backtracing through sigtramp.
* sparc-tdep.c (sparc_frame_find_saved_regs): Get frame address
for call dummy frame right. Remove old test for dummy frame,
it has been unused at least since gdb-3.5.
* sparc-tdep.c (sparc_push_dummy_frame): Set return address register
of the dummy frame.
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.
Use the function name when calling IN_SIGTRAMP.
* config/m68k/tm-m68k.h (SIG_PC_FP_OFFSET, SIG_SP_FP_OFFSET):
Define for correct handling of bachtraces through _sigtramp.
* m68k-tdep.c (m68k_find_saved_regs): Adjust saved sp for fake
sigtramp frames.
* mipsread.c (parse_type): Handle corrupt TIR info with complaint
instead of core dump.
* mipsread.c (parse_partial_symbols): Put static symbols into the
mimimal symbol table, use proper mst_types for all minimal symbols.
* stack.c (frame_info, print_frame_info): Use the starting source
line number on a line boundary if backtracing through sigtramp.
passing an integer argument to find_pc_line.
* frame.h, blockframe.c, stack.c, a29k-tdep.c,
config/gould/tmp-{pn,np1}.h,
config/{sparc/tm-sparc.h,pyr/tm-pyr.h,vax/tm-vax.h}: Remove field
next_frame from struct frame_info. It has no purpose beyond
->next->frame and is an artifact from GDB 2.8.
config/gould/tmp-{pn,np1}.h,
config/{sparc/tm-sparc.h,pyr/tm-pyr.h,vax/tm-vax.h}: Remove field
next_frame from struct frame_info. It has no purpose beyond
->next->frame and is an artifact from GDB 2.8.
* 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.
* frame.h (struct frame_info): Doc fix for next_frame.
New field signal_handler_caller.
blockframe.c (create_new_frame, get_prev_frame_info),
config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO): Set it (needs
INIT_FRAME_PC_FIRST).
stack.c (print_frame_info), rs6000-tdep.c (rs6000_frame_chain):
Check it.
* utils.c (fprintf_symbol_filtered): New function which combines
the functionality of fputs_demangled and fprint_symbol. Uses a
caller provided language parameter to select the appropriate
demangler, and caller provided args to pass to the demangler.
* defs.h (fputs_demangled, fprint_symbol): Remove prototypes.
* defs.h (fprintf_symbol_filtered): Add prototype.
* c-typeprint.c (cp_type_print_method_args): Replace calls to
fputs_demangled with call to fprintf_symbol_filtered.
* cp-valprint.c (demangle.h): Include
* cp-valprint.c (cp_print_value_fields): Replace calls to
fprint_symbol with calls to fprintf_symbol_filtered.
* printcmd.c (print_frame_args): Replace call to fprint_symbol
with call to fprintf_symbol_filtered.
* stack.c (print_frame_info, frame_info): Add language variable
to pass to fprintf_symbol_demangled and initialize it from the
symbol's language. Replace calls to fputs_demangled with calls
to fprintf_symbol_filtered.
* symtab.c (find_methods): Replace call to fputs_demangled with
call to fprintf_symbol_filtered.
**** start-sanitize-chill ****
* ch-valprint.c (demangle.h): Include.
* ch-valprint.c (chill_print_value_fields): Replace call to
fprint_symbol with call to new fprintf_symbol_filtered.
**** end-sanitize-chill ****
add a language parameter that is used to select the demangling
algorithm.
* defs.h (enum language): Move further up in file so enum can
be used in prototypes.
* defs.h (fputs_demangled): Update prototype to add lang arg.
* c-typeprint.c (cp_type_print_method_args): Add language arg
to fputs_demangled calls, remove DMGL_PARAMS flag.
* stack.c (print_frame_info): Remove obsolete code so we don't
have to update fputs_demangled usage in it.
* stack.c (print_frame_info, frame_info): Add language variable
to pass to fputs_demangled and initialize it from the symbol's
language. Call fputs_demangled with language arg.
* symtab.c (find_methods): Add language arg to fputs_demangled
call.
(REGISTER_U_ADDR): Fix up for Ultrix 4.2.
* tm-tahoe.h, xm-tahoe.h (KERNEL_U_ADDR): Move macro to xm-tahoe.h.
* stack.c (_initialize_stack): "dow" should be a valid abbreviation
for "down". Suggested by Richard Stallman.
Fix from Jim Williams.
* stack.c (return_command): Evaluate expression *before* popping
off the stack frames! Fix inspired by Jim Williams.
(up_silently_command, down_silently_command): No sel frame is error.
* defs.h (memcpy, memset): Conditionalize decls on
#ifndef MEM_FNS_DECLARED, since DECstation differs.
(alloca): Break out the STDC and non-STDC alloca cases, to make
it work on old preprocessors as well as "picky ANSI" ones.
* xm-mips.h (memcpy, memset): Declare, and set MEM_FNS_DECLARED.
* mips-tdep.c (heuristic_proc_start): Zero arg produces zero.
* utils.c (fputs_demangled): Rename SLOP since DECstation system
header files define it!
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.