Commit Graph

78 Commits

Author SHA1 Message Date
Stephane Carrez 37767e423b * utils.c (query): Remove tui hacks; tui must use the query_hook.
* top.c (command_loop): Remove tui insert_mode hacks; don't call
	tuiCleanUp because this must be made with atexit by tui.
	* symfile.c (symbol_file_command): Remove call to TUIDO
	* stack.c (show_and_print_stack_frame_stub): Remove tui check;
	not necessary when using the selected frame hooks.
	(print_stack_frame_stub): Likewise.
	(print_frame_info_base): Likewise.
	(print_frame_info): Likewise.
	(up_silently_command): Likewise.
	(down_silently_command): Likewise.
	(show_stack_frame): Likewise for TUIDO.
	(select_frame): Likewise.
	(select_and_print_frame): Likewise.
	(stack_publish_stopped_with_no_frame): Remove.
	(select_and_maybe_print_frame): Remove.
	* main.c (captured_main): Remove tui_fileopen and tuiInit; tui
	must use the initialize ui hook.
	* infrun.c (normal_stop): Remove call to TUIDO; tui must use the
	selected frame hooks.
	* event-top.c (command_handler): Remove tui insert_mode hack.
	* defs.h: Remove TUIDO; Only include tui.h.
	* breakpoint.c (mention): Remove calls to TUIDO.
	(delete_breakpoint): Remove tui hacks; tui must install
	the breakpoint hooks.
2001-07-14 18:59:07 +00:00
Andrew Cagney 68c81b5495 * stack.c (print_frame): For ui_out, output a list of arguments.
Update all tests.  Update doco.
2001-06-26 04:48:49 +00:00
Andrew Cagney 666547aa9e s/ui_out_list/ui_out_tupple/ 2001-05-12 04:08:24 +00:00
Kevin Buettner d493eb331e Use cleanup machinery to invoke ui_out_list_end(). 2001-04-08 17:55:13 +00:00
J.T. Conklin 3172dc307b * arch-utils.c (#include "gdbthread.h"): Removed.
(#include "symfile.h"): Removed.
(XMALLOC): Removed unused macro.
* breakpoint.c (tbreak_command): Removed local declaration.
(awatch_command, do_enable_breakpoint, set_breakpoint_count):
Remove duplicate declarations.
(bpstat_should_step, bpstat_have_active_hw_watchpoints)
(remove_solib_event_breakpoints): Fix indentation botch.
* c-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* ch-exp.c (ch_terminal_match_float_literal, parse_expr)
(parse_primval, parse_untyped_expr, parse_opt_untyped_expr):
Removed duplicate declarations.
* ch-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* corefile.c (#include "frame.h"): Removed
(#include "symfile.h"): Removed.
(#include "language.h"): Removed.
* dbxread.c (#include "command.h"): Removed.
* environ.c (#include "gdbcore.h"): Removed.
* event-loop.c (#include "top.h"): Removed.
* f-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
(#include "language.h"): Removed.
(#include "typeprint.h"): Removed.
(#include "frame.h"): Removed.
* gdbtypes.h (print_type_scalar): Removed declaration.
* infcmd.c (#include "completer.h"): Removed.
* language.c (#include "frame.h"): Removed.
* m2-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
(#include "language.h"): Removed.
* m2-valprint.c (#include "valprint.h"): Removed.
* p-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* p-valprint.c (#include "typeprint.h"): Removed.
* parse.c (#include "linespec.h"): Removed.
* regcache.c (#include "frame.h"): Removed.
* remote.c (#include "frame.h"): Removed.
(getpkt_sane): Make static.
* source.c (#include "completer.h"): Removed.
* stack.c (#include "symfile.h"): Removed.
(#include "objfiles.h"): Removed.
* symfile.c (#include "completer.h"): Removed.
* tracepoint.c (#include "completer.h"): Removed.
* values.c (#include "frame.h"): Removed.
* varobj.c (#include "valprint.h"): Removed.
* wrapper.c (#include "frame.h"): Removed.

* memattr.c (create_mem_region): Removed unused variable.
* remote-nrom.c: Removed spurious semicolon after init_nrom_ops.
-------------------------------------------------------------------
2001-03-27 20:36:24 +00:00
Andrew Cagney 64485362e8 * frame.h (SIZEOF_FRAME_SAVED_REGS): Report an error if macro
already defined.

From 2000-08-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>:
* stabsread.c (define_symbol): A parameter ('R'), a local ('r'),
or a reference ('a') can be in a pseudo register.
* infcmd.c (do_registers_info): Must take into account the pseudo
registers to print their value.
(registers_info): Likewise.
* stack.c (frame_info): Likewise.
* frame.h (SIZEOF_FRAME_SAVED_REGS): Save the pseudo registers.
2001-03-21 16:42:39 +00:00
Andrew Cagney a728f04251 Eliminate ARCH_NUM_REGS. 2001-03-13 23:31:14 +00:00
David Taylor 24285e3a2b Add comment (part of immediately previous commit). 2001-03-08 20:51:38 +00:00
David Taylor ec9a34493d * stack.c (parse_frame_specification): For one argument case,
handle the situation where the argument is an integer, not an
 	address -- arguably the most common case.  This matters on
	targets where pointers and addresses are different.
2001-03-08 20:45:22 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Peter Schauer a8079a9b4c Get rid of AIX specific PC_LOAD_SEGMENT, replace with PC_SOLIB.
* xcoffsolib.c (xcoff_solib_address):  Renamed from
	pc_load_segment_name.  Return NULL if address is not in a shared
	library.  Cleanup shared library name construction, using xasprintf.
	Format shared library member names consistent with format in exec.c.
	(solib_info):  Format shared library member names consistent with
	format in exec.c.
	* config/rs6000/nm-rs6000.h:  Replace PC_LOAD_SEGMENT with PC_SOLIB,
	using xcoff_solib_address for PC_SOLIB definition.
	* stack.c (print_frame):  Remove PC_LOAD_SEGMENT code, no longer
	needed.
2001-02-10 12:01:11 +00:00
Mark Kettenis e6e0bfabf4 * ui-out.c (do_list_end): New function.
(make_cleanup_ui_out_list_end): New function.
* ui-out.h: Provide prototype for make_cleanup_ui_out_list_end.
* stack.c (print_frame) [UI_OUT]: Call
make_cleanup_ui_out_list_end to make sure we mark the end of the
list if we do a non-local exit.  At the end of the function,
instead of calling ui_out_list_end directly, let do_cleanups
handle it.
2001-01-27 17:57:53 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Peter Schauer 1a2aab69f1 * stack.c (return_command): Pop dummy frame if we just returned from
a stop in a call dummy.
2000-11-06 20:25:36 +00:00
David Taylor bb518678ac * eval.c (parse_and_eval_long): New function.
* value.h: Declare it.

	* breakpoint.c (breakpoints_info, maintenance_info_breakpoints):
	Call parse_and_eval_long, not parse_and_eval_address.
	* command.c (do_setshow_command): Ditto.
	* infcmd.c (step_1, signal_command, continue_command): Ditto.
	* infrun.c (signals_info): Ditto.
	* stack.c (set_backtrace_limit_command, backtrace_command_1,
	up_silently_base, down_silently_base): Ditto.
	* tracepoints.c (tracepoints_info, trace_find_command,
 	trace_find_tracepoint_command): Ditto.
	* valprint.c (set_radix): Ditto.
	* values.c (show_values): Ditto.
2000-10-30 15:32:51 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney b02eeafb14 Use make_cleanup_ui_out_stream_delete(). 2000-05-15 03:16:15 +00:00
Andrew Cagney d082b2bb92 Add more checks for no stack frame. 2000-02-29 07:17:15 +00:00
Jim Kingdon 745b8ca0fc Clean up compiler warnings:
* bcache.h, bcache.c, c-valprint.c, coffread.c, stabsread.c,
	stack.c, valprint.c: Change variables to unsigned.
	* bcache.c: Rearrange to avoid warnings about variables not being set.
	* c-lang.c, ch-lang.c, f-lang.c, m2-lang.c: Include valprint.h
	rather than declaring print_max and repeat_count_threashold
	ourselves (incorrectly).
	* valprint.h: Do declare repeat_count_threashold.
	* ch-exp.c: Use default case for internal error.
	* findvar.c: Don't omit argument type.
	* symtab.c: Remove unused variable.
2000-02-08 04:39:02 +00:00
Jason Molenda 8b93c6380e import gdb-2000-02-02 snapshot 2000-02-03 04:14:45 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda c5394b80ae import gdb-2000-01-17 snapshot 2000-01-18 00:55:13 +00:00
Jason Molenda e514a9d642 import gdb-1999-10-25 snapshot 1999-10-26 03:43:48 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda ac9a91a77c import gdb-1999-06-01 snapshot 1999-06-01 15:44:41 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Stu Grossman 4cffc916c1 * dwarf2read.c (dump_die): Change stderr gdb_stderr.
* expprint.c (print_subexp):  fprintf => fprintf_unfiltered.
	* jv-typeprint.c (java_type_print_base):  fputs => fputs_filtered.
	* stack.c (struct function_bounds):  Remove superfluous `typedef'.
	* symfile.c (list_overlays_command):  stdout => gdb_stdout.
	* symmisc.c (maintenance_check_symtabs):  stdout => gdb_stdout.
	* utils.c (print_spaces):  Make more efficient.
1999-01-11 21:51:39 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Andrew Cagney 9ddf9aa9be CARP:
Rename REGISTER_NAMES{} -> REGISTER_NAME().
1998-12-10 06:10:03 +00:00
Fred Fish d0e0eca26e * solib.c (solib_address): Return the name of the containing solib.
* 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.
1995-11-19 07:16:03 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

* gdb_stat.h: New file, "portable" <sys/stat.h>.
* gdb_string.h: New file, "portable" <string.h>.

* altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
instead of <sys/stat.h>.

* alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c,
remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
"gdb_string.h" instead of <string.h>.
* gdbtk.c: Likewise.

* config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
sparc/xm-sun4os4.h (HAVE_MMAP): Removed.

* config/xm-lynx.h, config/i386/xm-ptx.h,
config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
config/pa/hppah.h, config/rs6000/xm-rs6000.h,
config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
* config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
J.T. Conklin 1a49497348 * configure.in: Check for unistd.h.
* configure: Regenerated.

* command.c, cp-valprint.c, fork-child.c, i386-tdep.c,
i386b-nat.c, inflow.c, main.c, maint.c, objfiles.c, solib.c,
source.c, stack.c, symfile.c, top.c, utils.c: Include strings.h
and/or unistd.h to bring prototypes into scope.
1995-07-31 22:46:03 +00:00
Jim Kingdon d24c05991f * valprint.c (print_longest): Clarify comment about use_local.
* printcmd.c, defs.h (print_address_numeric), callers in
	symmisc.c, symfile.c, stack.c, source.c, remote.c, infcmd.c,
	cp-valprint.c, core.c, ch-valprint.c, c-valprint.c, breakpoint.c,
	exec.c: New argument use_local.
	* source.c (identify_source_line): Use filtered output.  Use
	print_address_numeric.
1994-05-04 15:24:41 +00:00
Jim Kingdon 5e67875203 Fix many sins which will come up in 32 bit x 64 bit GDB, and
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.
1994-01-27 01:12:06 +00:00
Jim Kingdon 833e0d94cc Fix many sins which will come up in 32 bit x 64 bit GDB, and
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.
1994-01-27 00:36:05 +00:00
Peter Schauer f1de67d323 * infrun.c (normal_stop): Set stop_pc after popping the dummy frame
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.
1994-01-19 20:45:30 +00:00
Jim Kingdon 05052b638c * breakpoint.c (breakpoint_chain): Make static.
* breakpoint.c, breakpoint.h (frame_in_dummy): New function.
	* stack.c (print_frame_info): Use it.
1993-12-30 20:34:06 +00:00
Jim Kingdon 4f9834005e * stack.c (down_silently_command): Add comment about PR 1913. 1993-11-03 02:23:10 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
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.
1993-11-01 22:25:23 +00:00
Jim Kingdon 78cab901b0 * Move comments on bypassing call dummy breakpoint from stack.c
to breakpoint.h.
1993-10-15 19:37:29 +00:00
K. Richard Pixley 46c28185ab some gcc lint 1993-09-08 20:15:34 +00:00
Peter Schauer dff84871e9 * blockframe.c (create_new_frame, get_prev_frame_info):
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.
1993-08-16 10:03:57 +00:00
Jim Kingdon 73553c44e7 Revision to this change--use ->next != NULL, not just ->next, when
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.
1993-07-08 19:32:03 +00:00
Jim Kingdon 23a8e2915c * 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.
1993-07-07 20:29:56 +00:00
Jim Kingdon c94e7e757b * stack.c (print_frame_info): Use catch_errors around print_frame_args. 1993-06-11 20:06:41 +00:00