Commit Graph

274 Commits

Author SHA1 Message Date
Jean Marie Diaz d2a85f11be * breakpoint.c (mention), main.c (fputs_unfiltered): Add comments.
* breakpoint.c (delete_breakpoint, enable_breakpoint,
	disable_breakpoint): Don't call breakpoints_changed; it is now
	called via the *_breakpoint_hook functions.
	* annotate.c (_initialize_annotate, breakpoint_changed): New functions.
1994-08-02 00:44:24 +00:00
Stu Grossman 754e5da26e * Makefile.in (INSTALLED_LIBS, CLIBS, DEPFILES): Add support for
--enable-xxx configure option by adding ENABLE_{CLIBS DEPFILES}
	where appropriate.

	* General hackery to support alternate user-interface.
	* breakpoint.c (mention, delete_breakpoint, enable_breakpoint,
	disable_breakpoint):  Call hooks for alternate user-interface.
	* defs.h:  Add declarations for alternate user-interface hooks.
	* main.c (main):  Add --nw (and --nowindows) options to disable
	the GUI.
	* (near call to command_loop):  Call command_loop_hook if set.
	* (fputs_unfiltered):  Call fputs_unfiltered_hook if set.
	* stack.c:  Call print_frame_info_listing_hook if set.
	* top.c (gdb_init):  Initialize targets.c and utils.c prior to
	other files to make sure that calls to error and warning will
	work.  Call init_ui_hook after everything else.
	* utils.c (query):  Call query_hook if set.
	* (gdb_flush):  Call flush_hook if set.
	* Change _initialize_utils to initialize_utils cuz we don't use
	automatic initialization of utils.c anymore.

	* Support for TK GUI.
	* Makefile.in:  Add rule for gdbtk.o.
	* configure.in:  Add support for --enable-gdbtk.
	* gdbtk.c:  New file.  Contains support routines for TK interface.
	* gdbtk.tcl:  New file.  Implements GUI policy.

	* remote.c:  Get rid of #ifdef DONT_USE_REMOTE.  It's no longer
	necessary.
1994-07-28 22:07:02 +00:00
Stan Shebs 557f3a0e60 * breakpoint.c (ignore, condition): Move usage note into body of
help text, so first line can be one-line summary.
1994-07-23 22:01:44 +00:00
Stan Shebs 9f5772857f Breakpoint hit counts, from Bob Rusk (rrusk@mail.csd.harris.com).
* breakpoint.h (hit_count): New breakpoint field.
	* breakpoint.c (show_breakpoint_hit_counts): New variable.
	(clear_breakpoint_hit_counts): New function.
	(bpstat_stop_status): Increment the hit count.
	(breakpoint_1): Display the hit count.
	* infcmd.c (run_command): Reset breakpoint hit counts.
	* target.c (generic_mourn_inferior): Don't clear ignore counts if
	displaying hit counts.
1994-07-14 02:15:39 +00:00
Kung Hsu f2d9c05802 Modified Files:
breakpoint.c ChangeLog

        * breakpoint.c: annotate changes lost at merge, put back in.
1994-06-14 23:22:44 +00:00
Kung Hsu 110548816a Modified Files:
breakpoint.c ChangeLog

        * breakpoint.c: fix a syntax error native cc does not like.
1994-06-11 01:09:25 +00:00
Jim Kingdon 20b3c1aae5 * breakpoint.c (breakpoint_1): Fix typo.
* annotate.c (annotate_field_end): Fix typo.

	* Makefile.in: Move annotate.o from COMMON_OBS to OBS.

	* Makefile.in (TSSTART): Remove; no longer used.
1994-05-18 00:59:15 +00:00
Jim Kingdon 1c95d7ab2e gcc -Wall lint:
* breakpoint.c (watchpoint_check): Remove unused variable b.
	* stack.c (print_frame_info): Move sp and buf inside #if.
	* eval.c (evaluate_subexp): Remove unused variables pp,
	mangle_ptr, ptr, and mangle_tstr.
	* valarith.c (value_x_binop): Remove unused variables mangle_tstr
	and mangle_ptr.
	* symtab.c (lookup_symtab): Put variable copy inside #if.
	(decode_line_1): Put variable q1 inside #if 0.
	* target.h: Declare target_link.
	* infrun.c (wait_for_inferior): Remove unused variables signame.
	* remote.c (remote_resume): Remove unused variable name.
	* c-exp.y (parse_number): Parenthesize operand of shift.
	* dbxread.c (record_minimal_symbol): Parenthesize operand of &&
	(this is a semantic change, the warning seems to have detected a bug).
	* dbxread.c (end_psymtab): Move variable p1 inside #if.
	* coffread.c: Move variable temptype inside #if.
	* ch-typeprint.c (chill_type_print_base): Remove unused variable
	name.
	* ch-valprint.c: #include typeprint.h and ch-lang.h.
	(chill_val_print): Remove unused variable in_range.
	(chill_val_print): Remove statement "length > TYPE_LENGTH (type);".
	(chill_val_print): Add default case for switch.
	* stabsread.h: Declare stabsect_build_psymtabs.
	* os9kread.c (read_minimal_symbols): Make this return void.
	(os9k_symfile_read): Remove unused variables stb_exist and val.
	(os9k_symfile_init): Remove unused variable val.
	(fill_sym): Remove unused variable id.
	(read_os9k_psymtab): Put variable back_to inside #if 0.  Remove
	unused variable nsl.
	Remove unused variable symfile_bfd.
	#if 0 unused variables lbrac_unmatched_complaint and
	lbrac_mismatch_complaint.
	Remove declaration for non-existent function os9k_next_symbol_text.

	* annotate.c, annotate.h: New files, containing a function for
	each annotation which outputs it.
	* Move breakpoints_changed from breakpoint.c to annotate.c.
	* breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c,
	printcmd.c, source.c, stack.c, utils.c, valprint.c:
	Use annotate.c functions to output annotations.
	* Makefile.in (OBS): Add annotate.o.
1994-05-13 18:18:57 +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 47ebe8fd88 * breakpoint.c (breakpoint_1): Annotate each field of the headers.
Explicitly annotate each record.
1994-04-30 01:30:28 +00:00
Jim Kingdon 9e8db4456e * breakpoint.c (watch_command): Use (CORE_ADDR)0, not NULL, for
target null pointer.
	* blockframe.c (find_frame_addr_in_frame_chain): Likewise.

	* printcmd.c (output_command): Annotate things we print here too.
	* Move declaration of print_value_flags from defs.h to value.h.
	* main.c (command_line_input): Call wrap_here as well as gdb_flush.
1994-04-21 21:19:58 +00:00
Jim Kingdon 6c803036a9 * main.c (main): Accept --annotate=N option and make --fullname
the same as --annotate=1.
	(command_line_input): Print annotatation before and after prompt.
	* blockframe.c (flush_cached_frames): Print annotation.
	* Rename frame_file_full_name to annotation_level and move it from
	symtab.h to defs.h.
	* source.c (identify_source_line): If annotation_level > 1,
	change output format.
	* breakpoint.c: Print annotation whenever a breakpoint changes.
	* main.c: New variable server_command.
	(command_line_input): Parse "server " and set server_command.
	(dont_repeat): Check server_command.
1994-04-20 19:23:30 +00:00
Stan Shebs fad466eb6d Fri Apr 15 11:53:46 1994 Stan Shebs (shebs@andros.cygnus.com)
* source.c (DIRNAME_SEPARATOR): New macro, replaces all references
	to : in search path processing.
	* defs.h (qsort): Rename argument in prototype.
	* symtab.h (SAYMBOL_VALUE): Rename value field, avoids bugs in
	some compilers.
	* breakpoint.c, exec.c, mdebugread.c, mipsread.c, xcoffexec.c
	(false): Eliminate usages.
1994-04-15 21:55:49 +00:00
Jeff Law 999dd04b89 * breakpoint.h (enum bptype): Add bp_hardware_watchpoint and
bp_watchpoint_scope breakpoints.
	(struct breakpoint): Add val_chain and related_breakpoint fields
	for use by watchpoints.

	* breakpoint.c (within_scope): Delete.  No longer used.
	(TARGET_CAN_USE_HARDWARE_WATCHPOINT): Provide default definition.
	(target_{remove,insert}_watchpoint): Likewise.
	(can_use_hardware_watchpoint): New function.
	(remove_breakpoint): New function to remove a single breakpoint
	or hardware watchpoint.
	(insert_breakpoints): Handle insertion of hardware watchpoints.
	Store a copy of the value chain derived from the watchpoint
	expression.
	(remove_breakpoints): Simplify by using remove_breakpoint.
	(delete_breakpoint): Likewise.
	(watchpoint_check): Delete the watchpoint and watchpoint scope
	breakpoints when the watchpoint goes out of scope.  Save & restore
	the current frame after checking watchpoints.
	(breakpoint_init_inferior): Likewise (restarting the program
	makes all local watchpoints go out of scope).
	(bpstat_stop_status): Handle hardware watchpoints much like normal
	watchpoints. Delete the watchpoint and watchpoint scope breakpoint
	when the watchpoint goes out of scope.  Remove and reinsert all
	breakpoints before returning if we stopped when a hardware watchpoint
	fired.
	(watch_command): Use a hardware watchpoint when possible.  If
	watching a local expression, build a scope breakpoint too.
	(map_breakpoint_numbers): Also call given function for any
	related breakpoints.
	(disable_breakpoint): Never disable a scope breakpoint.
	(enable_breakpoint): Handle hardware breakpoints much like normal
	breakpoints, but recompute the watchpoint_scope breakpoint's
	frame and address  (if we have an associated scope breakpoint).
	(read_memory_nobpt): Handle hardware watchpoints like normal
	watchpoints.  When necessary handle watchpoint_scope breakpoints.
	(print_it_normal, bpstat_what, breakpoint_1, mention): Likewise.
	(clear_command, breakpoint_re_set_one, enable_command): Likewise.
	(disable_command): Likewise.

	* blockframe.c (find_frame_addr_in_frame_chain): New function.
	Extern prototype added to frame.h

	* infrun.c (wait_for_inferior): Set current_frame and select
	a frame before checking if we stopped due to a hardare watchpoint
	firing.  Handle stepping over hardware watchpoints.
	(normal_stop): Remove unnecessary call to select_frame.

	* value.h (value_release_to_mark): Declare.
	* values.c (value_release_to_mark): New function.

	* procfs.c (procfs_wait): Add cases for hardware watchpoints.
	(procfs_set_watchpoint, procfs_stopped_by_watchpoint): New functions.

	* hppab-nat.c (hppa_set_watchpoint): New function.

	* config/pa/nm-hppab.h (STOPPED_BY_WATCHPOINT): Define.
	(HAVE_STEPPABLE_WATCHPOINT): Define.
	(TARGET_CAN_USE_HARDWARE_WATCHPOINT): Define.
	(target_{insert,delete}_watchpoint): Define.
1994-04-13 21:57:00 +00:00
Jeff Law bd2f0c8543 * breakpoint.c (print_it_normal): Allow GDB to notify the user
about more than one watchpoint being triggered.
1994-03-30 17:17:01 +00:00
Jim Kingdon c4de6b308e * breakpoint.c (_initialize_breakpoint): Update docstring for
tbreak to match what the code actually does.
1994-03-11 16:13:08 +00:00
Jim Kingdon 82a2edfbcf * breakpoint.c, breakpoint.h, c-valprint.c, ch-valprint.c,
cp-valprint.c, eval.c, expprint.c, findvar.c, language.c,
	objfiles.h, infcmd.c, printcmd.c, stack.c, typeprint.c,
	valarith.c, valops.c, valprint.c, value.h, values.c: Replace
	value with value_ptr.  This is for the ptx compiler.
	* objfiles.h, target.h: Don't declare a "sec_ptr" field using a
	"sec_ptr" typedef.
	* symm-nat.c: Add a bunch of stuff for symmetry's ptrace stuff.
	#if 0 i386_float_info.
	* symm-tdep.c (round): Remove.  Also remove sgttyb.
	* symm-tdep.c: Remove lots of stuff which duplicates stuff from
	i386-tdep.c.  Remove register_addr and ptx_coff_regno_to_gdb.
	* i386-tdep.c (i386_frame_find_saved_regs): Put in
	I386_REGNO_TO_SYMMETRY check in case it is needed for Dynix
	someday.
	* config/i386/nm-symmetry.h: Change KERNEL_U_ADDR.  Move
	stuff from PTRACE_READ_REGS, PTRACE_WRITE_REGS macros to
	symm-nat.c.  Define CHILD_WAIT and declare child_wait().
	* config/i386/tm-symmetry.h: Remove call function stuff; stuff in
	tm-i386v.h is apparently OK.
	* config/i386/xm-symmetry.h [_SEQUENT_]: Define HAVE_TERMIOS not
	HAVE_TERMIO.  Define MEM_FNS_DECLARED, NEED_POSIX_SETPGID, and
	USE_O_NOCTTY.
1994-03-03 01:00:57 +00:00
Jim Kingdon bcc3771841 * breakpoint.h (enum bptype): New type bp_through_sigtramp.
(bpstat_what_main_action): New code BPSTAT_WHAT_THROUGH_SIGTRAMP.
	* breakpoint.c (bpstat_what): Return BPSTAT_WHAT_THROUGH_SIGTRAMP
	if we hit a bp_through_sigtramp breakpoint.  Remove kludge which
	ignored bs->stop for a bp_step_resume breakpoint.
	* infrun.c (wait_for_inferior): Make a through_sigtramp_breakpoint
	which performs one (the check_sigtramp2 one) of the functions
	which had been handled by the step_resume_breakpoint.  For each
	use of the step_resume_breakpoint, make it still use the
	step_resume_breakpoint, use the through_sigtramp_breakpoint, or
	operate on both.
	Deal with BPSTAT_WHAT_THROUGH_SIGTRAMP return from bpstat_what.
	When setting the frame address of the step resume breakpoint, set
	it to the address for frame *before* the call instruction is
	executed, not after.
1994-02-25 09:12:29 +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
Jim Kingdon d7e7e85159 * infrun.c (wait_for_inferior): Don't set frame for
step_resume_breakpoint for IN_SIGTRAMP cases.

	* infrun.c (wait_for_inferior), breakpoint.h (struct bpstat_what),
	breakpoint.c (bpstat_what): Move step_resume from its own field of
	the struct bpstat_what into the main_action.  Make it override
	other breakpoints.  This is a conservative change in the sense
	that before the step resume breakpoint was a breakpoint.c
	breakpoint, hitting the step resume breakpoint overrode even
	calling bpstat_stop_status.
1994-01-19 21:14:40 +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
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 cf3e377e61 * breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
that clears the `inserted' flag for all breakpoints and deletes
	any breakpoints which should go away between runs of programs.
	* inflow.c (generic_mourn_inferior), infrun.c (init_wait_for_inferior),
	remote-es.c (es1800_load), comments in exec.c and corelow.c:
	Use it instead of mark_breakpoints_out.
	* breakpoint.c (mark_breakpoints_out):  Update comment, tm-rs6000.h
	uses it in a completely different context.
	* breakpoint.c (breakpoint_re_set_one):  Add bp_call_dummy case.
1993-10-07 11:16:35 +00:00
Jim Kingdon ebad9e902c * breakpoint.c (delete_breakpoint): Don't insert a disabled breakpoint. 1993-10-06 18:01:06 +00:00
Peter Schauer cef4c2e7a5 Changes to support alpha OSF/1 in native mode.
* alpha-nat.c, alpha-tdep.c, config/alpha/alpha-osf1.mt,
	  config/alpha/nm-alpha.h, config/alpha/tm-alpha.h, osfsolib.c:
	New files.
	* Makefile.in:  Add new files and dependencies.
	* configure.in:  Add alpha target.
	* config/alpha/alpha-osf1.mh (NATDEPFILES):  Add osfsolib.o
	* config/alpha/alpha-osf1.mh (MH_CFLAGS):  Remove, we can handle
	shared libraries now.
	* config/alpha/xm-alpha.h:  Cleanup, get MAKEVA_* defines right.

	* defs.h (CORE_ADDR):  Make its type overridable via CORE_ADDR_TYPE,
	provide `unsigned int' default.
	* breakpoint.c (breakpoint_auto_delete):  Delete only if we really
	stopped for the breakpoint.
	* stabsread.c, stabsread.h (define_symbol):  Change valu parameter
	to a CORE_ADDR.
	* stabsread.c (read_range_type):  Handle the case where the lower
	bound overflows and the upper doesn't and the range is legal.
	* infrun.c (resume):  Do not step a breakpoint instruction if
	CANNOT_STEP_BREAKPOINT is defined.

	* inferior.h (CALL_DUMMY_LOCATION):  New variant AT_ENTRY_POINT.
	Now that we have the bp_call_dummy breakpoint the call dummy code
	is no longer needed. PUSH_DUMMY_FRAME, PUSH_ARGUMENTS and
	FIX_CALL_DUMMY can be used to set up everything for the dummy.
	The breakpoint for the dummy is set at the entry point and thats it.
	* blockframe.c (inside_entry_file, inside_entry_func):  Do not stop
	backtraces if pc is in the call dummy at the entry point.
	* infcmd.c (run_stack_dummy):  Handle AT_ENTRY_POINT case. Use
	the expected breakpoint pc when setting up the frame for
	set_momentary_breakpoint.
	* symfile.c (entry_point_address):  New function for AT_ENTRY_POINT
	support.
	* valops.c (call_function_by_hand):  Handle AT_ENTRY_POINT case.
1993-10-05 19:44:57 +00:00
Jim Kingdon cb6b02027c * breakpoint.h, breakpoint.c (bpstat_stop_status): Add new argument
not_a_breakpoint.
	* infrun.c (wait_for_inferior): Pass it.  Also consolidate the
	test of whether we are stepping into a CURRENTLY_STEPPING macro.
1993-09-22 01:16:50 +00:00
K. Richard Pixley 817ac7f82b * breakpoint.c (bpstat_stop_status),
infcmd.c (step_1),
	  infrun.c (wait_for_inferior): collapse SHIFT_INST_REGS ifdef and insert macro.

	* m88k-tdep.c: include ieee-float.h.  new global target_is_m88110.
	  new const struct ext_format_m88110 for float format.
	  (pic_prologue_code): add braces.
	  (next_insn): remove unused variable buf.
	  (frame_find_saved_regs): remove unused variables next_addr,
	  saved_regs, regnum.
	  (frame_locals_address): remove unused variables frame, ap.
	  (frame_args_address): remove unused variables frame, ap.
	  (push_parameters): add some breaks and a default case.

	* remote-bug.c: remove redundant includes of value.h, target.h,
	  serial.h.
	  (bug_open): corrected typo, sr_multi_scan -> gr_multi_scan.
	  (bug_fetch_register): special case sfip register for m88110.
	  remove flag bit masking of pc registers.  This should be handled
	  by the ADDR_BITS_* macros.
	  (bug_store_register): special case sfip register for m88110.
	  Corrected sprint format for extended registers.
1993-09-22 00:43:55 +00:00
Jim Kingdon bb7b38008e * breakpoint.c (breakpoint_1): Support bp_call_dummy. 1993-09-21 22:55:39 +00:00
Jim Kingdon 84d598611e * defs.h (make_cleanup): Change PTR to void * when inside PARAMS.
Some of the following is in #ifdef CALL_DUMMY_BREAKPOINT_OFFSET.
	* breakpoint.h (enum bptype): Add bp_call_dummy.
	(struct bpstat_what): Add call_dummy field.
	* infrun.c (wait_for_inferior): Deal with it.
	* breakpoint.c (bpstat_what): Deal with call dummy breakpoint.
	* infcmd.c (run_stack_dummy): Set the call dummy breakpoint.
	* config/sparc/tm-sparc.h: Define CALL_DUMMY_BREAKPOINT_OFFSET.
1993-09-18 19:15:36 +00:00
K. Richard Pixley fee933f19c gcc lint 1993-09-08 21:30:33 +00:00
Jim Kingdon d889f6b7c7 * breakpoint.{c,h} (struct breakpoint): Replace symtab field with
source_file field.
1993-07-26 05:26:55 +00:00
Jim Kingdon 5af4f5f6f1 Tue Jul 13 14:03:48 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* stabsread.c (define_symbol): Make the caddr_t hack apply to `function
	returning foo' as well as `pointer to foo'.

	* remote.c [REMOTE_BREAKPOINT]: Use for breakpoint insn if defined.
	* config/m68k/tm-m68k.h: Define it.
	* mem-break.c, breakpoint.c: Improve comments.

Tue Jul 13 13:35:31 1993  Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)

	* config/m68k/tm-dpx2.h: Replace "tm-68k.h" with "m68k/tm-m68k.h".
	* config/m68k/xm-dpx2.h: Define HAVE_TERMIOS not HAVE_TERMIO.
1993-07-14 15:12:05 +00:00
Jim Kingdon f1ed43304a * symtab.c (decode_line_1): Use end of block to figure out whether
val.end is in the same function, not minimal symbols.

	* source.c (line_info): Add a few more wrap_here's.

	* i386-tdep.c (i386_follow_jump): Do byteswapping where needed and
	don't make assumptions about sizes of host data types.

	* blockframe.c, symtab.h (find_pc_partial_function): New arg endaddr.
	* infrun.c, breakpoint.c, printcmd.c: Change callers.
	* printcmd.c (containing_function_bounds): Remove.
	* printcmd.c (disassemble_command): Use find_pc_partial_function,
	not containing_function_bounds.
	* infcmd.c (step_1): Use find_pc_partial_function rather than
	trying to roll our own.  Move check for a pc between SIGTRAMP_START and
	SIGTRAMP_END in find_pc_partial_function, not step_1.
1993-07-12 03:42:35 +00:00
Jim Kingdon fe67503857 * infrun.c: Remove step_resume_{duplicate,shadow}. Replace
step_resume_break_address with step_resume_breakpoint (now local
	to wait_for_inferior).
	({insert,remove}_step_breakpoint): Remove.
	(wait_for_inferior): Set step resume break with
	set_momentary_breakpoint.  Test hitting it with bpstat_stop_status
	and bpstat_what	(stop_step_resume_break removed).
	* breakpoint.{h,c}, infrun.c: Return value from bpstat_what now struct
	which includes previous return value as main_action, and a step_resume
	bit.
	* breakpoint.c (delete_breakpoint): If breakpoint was inserted, and
	there is another breakpoint there, insert it.
	* infrun.c (wait_for_inferior): Rearrange the spaghetti a bit.  Use
	a few more gotos.
	Various: Clean up and add comments.
1993-07-11 04:52:50 +00:00
Jim Kingdon fa99ebe19f * breakpoint.c: Add comments regarding within_scope future direction. 1993-04-15 01:45:35 +00:00
Jim Kingdon 0a62ff3608 (breakpoint_1): use wrap_here before "at" 1993-04-12 17:56:35 +00:00
Jim Kingdon cabd4da684 * breakpoint.h (struct bpstat): Remove momentary field.
Remove bpstat_momentary_breakpoint.  This was always kludgy
	and is no longer used.

	* breakpoint.h: Add enum bpstat_what.
	breakpoint.h (struct bpstat), breakpoint.c (bpstat_stop_status):
	stop and print fields of bpstat now per-breakpoint, not just
	one for the whole chain.
	breakpoint.{c,h} (bpstat_what): New function.
	breakpoint.h: Remove bpstat_stop and bpstat_should_print.
	infrun.c: Replace switch (stop_bpstat->breakpoint_at->type)
	with call to bpstat_what.
	README: Remove watchpoint/breakpoint bug from known bugs.

	* breakpoint.h: Prototype bpstat_find_breakpoint.
1993-04-09 03:17:45 +00:00
Jim Kingdon 359a097f9f Tue Mar 30 08:06:24 1993 Jim Kingdon (kingdon@cygnus.com)
* command.c (do_setshow_command): Use %u with var_{u,z}integer.

	* command.{c,h}: New var_type var_integer.
	main.c: Use it for history_size.

	* rs6000-tdep.c, xcoffexec.c, config/rs6000/xm-rs6000.h, breakpoint.c:
	Lint and byte-order fixups.
1993-03-30 23:06:29 +00:00
Jim Kingdon 3f031adf9f (print_it_normal): return 0 after hitting watchpoint 1993-03-30 19:10:31 +00:00
Jim Kingdon 8af68e4efb * breakpoint.h (bpstat): New field print_it.
breakpoint.c (bpstat_print): Use it.
	(print_it_normal): New function (from old bpstat_print code).
	(bpstat_{alloc,stop_status}): Set print_it field.

	* breakpoint.c (bpstat_stop_status): Use catch_errors when
	evaluating watchpoint condition, via new function watchpoint_check.
	Also stop if watchpoint disabled due to leaving its block.
1993-03-30 18:55:20 +00:00
Jim Kingdon 0a97f6c4a1 Add comments regarding breakpoint_re_set 1993-03-29 23:46:12 +00:00
Jim Kingdon 0eaaa46a44 * breakpoint.{c,h}: Add exp_string to struct breakpoint and use
it in breakpoint_re_set.
1993-03-29 21:49:39 +00:00
Peter Schauer 0b0d6c3fa7 * breakpoint.c (breakpoint_re_set_one): Fix storage leak.
* breakpoint.c (enable_breakpoint): Don't enable watchpoint if it
	went out of scope.
	* exec.c (exec_close): Fix storage leak.
	* exec.c (exec_file_command): Make sure that bfd doesn't realign the
	output sections when patching an executable.
	* mips-nat.c (store_inferior_registers): Use REGISTER_PTRACE_ADDR
	when writing all registers.
	* mips-tdep.c (mips_push_dummy_frame): Save floating point registers
	at the right offset in the dummy frame.
	* mipsread.c (psymtab_to_symtab_1): Do not complain for stProc,
	stStaticProc and stEnd symbols as they are generated by gcc-2.x.
	* mipsread.c (mipscoff_new_init): Initialize stabsread and buildsym.
1993-03-28 19:28:26 +00:00
Jim Kingdon 2d313932ea Fetch lazy values 1993-03-26 22:49:53 +00:00
Stu Grossman a8e033f2a2 * breakpoint.c, core.c, exec.c, language.c, main.c, printcmd.c,
symfile.c, target.c, valprint.c:  Use _filtered form of *printf.
defs.h, utils.c:  Make vfprintf_filtered global.
1992-09-15 06:27:18 +00:00
John Gilmore ea678717a4 * breakpoint.c (breakpoint_re_set): Avoid setting source symtab
(which involves reading in main's symtab) if we have no breakpoints.
1992-09-02 02:31:52 +00:00
John Gilmore 9b280a7f53 RS/6000 portability changes (for hosting cross-debuggers).
* breakpoint.c (fixup_breakpoints):  Re-kludge to IBM6000_TARGET.
* buildsym.c, rs6000-xdep.c, rs6000-tdep.c, tm-rs6000.h,
xcoffexec.c, xcoffread.c:  Rename aixcoff to xcoff everywhere.
* printcmd.c (print_frame_args):  Remove an RS/6000 dependency.
* stabsread.c (define_symbol):  Remove RS/6000 dependencies.
* tm-rs6000.h (ATTACH_DETACH):  Remove: host-dependent.
(PTRACE_ATTACH, PTRACE_DETACH):  Remove: host-dep.
(NO_SINGLE_STEP):  Add, target-dependent.
(loadinfotextindex):  Lowercase, remove "aix_".
* xm-rs6000.h:  Add <sys/ptrace.h> for infptrace.c.
(NO_SINGLE_STEP):  Remove, target-dependent.
* xcoffexec.c (vmap_symtab):  Cleanup #if 0'd code.
* xcoffread.c:  Only build file if RS/6000 native GDB.
(build_function_symbol):  Remove #if 0'd code.
* rs6000-tdep.c:  Cleanup.  Add static fn protos.
Use CORE_ADDR for addresses throughout.  Make void fns void.
(pop_dummy_frame):  Add FIXME about bogosity of design here.
(rs6000_struct_return_address):  Ditto.
(frameless_function_invocation, frame_get_cache_fsr,
frame_initial_stack_address, xcoff_relocate_symtab,
xcoff_init_loadinfo, free_loadinfo, xcoff_add_toc_to_loadinfo,
add_text_to_loadinfo, find_toc_address):  Move from xdep file.
Use CORE_ADDRs.  Change identifiers to lowercase.

* rs6000-xdep.c:  Make whole file conditional on native RS/6000,
supplying dummy routines if non-native.  Add prototype for
static exec_one_dummy_insn.  Move a mess of functions to
rs6000-tdep.c (as above).  Remove #if 0'd code.

* config/rs6000.mh (XDEPFILES):  Move xcoffexec.o to target side.
(XM_CLIBS):  Add -lm to circumvent AIX 3.2 libc ldexp bug.
* config/rs6000.mt (TDEPFILES):  Adopt xcoffexec.o.
1992-08-29 00:32:58 +00:00
Fred Fish 4ed3a9ea66 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c,
	eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c,
	i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c,
	infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c,
	putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c,
	sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c,
	tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c,
	values.c, xcoffread.c:
	Remove "(void)" casts from function calls where the return value
	is ignored, in accordance with GNU coding standards.
1992-07-04 03:22:08 +00:00
Fred Fish 51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
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.
1992-06-29 23:34:38 +00:00
Stu Grossman 423e96646b * breakpoint.c (enable_command, disable_command): Without args,
should only affect normal breakpoints and watchpoints.
1992-06-17 21:53:28 +00:00
John Gilmore c8950965c9 * Makefile.in (VERSION): Roll to 4.4.7.
(HFILES):  Add call-cmds.h.
* call-cmds.h:  New header for command fns called by other files.
* breakpoint.c (watchpoints_info):  Remove, same as breakpoints_info.
(breakpoint_1):  Remove unused type arg.  Change callers.
1992-03-29 23:18:31 +00:00
Per Bothner 1eeba68641 Merged in latest RS6000 diffs from Metin G. Ozisik. 1992-03-29 22:33:35 +00:00
Stu Grossman 8537ba607b * breakpoint.c (breakpoint_re_set_one): Don't reset breakpoint
unless symbol table indicates that something has changed.
1992-02-28 04:10:02 +00:00
Stu Grossman 36a19fdc5b Fix cvs merge fuckup. 1992-02-27 17:50:06 +00:00
Stu Grossman 80ba48f58c * breakpoint.c (all_breakpoints_info, breakpoint_1): Add 'info
all-breakpoints' command.
* (get_number):  Allow users to enter negative breakpoint numbers.
* (breakpoint_1):  Reformat display of 'info break' to show new
fields.
* (create_longjmp_breakpoint, breakpoint_re_set,
breakpoint_re_set_one, enable/disable_longjmp_breakpoint),
symfile.c  (syms_from_objfile):  Re-do
insertion of longjmp breakpoints.  Move all code into
breakpoint_re_set, and call that instead of
create_longjmp_breakpoint in symfile.c.
1992-02-27 17:45:02 +00:00
John Gilmore cba0d141fb * breakpoint.h (ALL_BREAKPOINTS_SAFE): Add.
* breakpoint.c (breakpoint_re_set):  Use ALL_BREAKPOINTS_SAFE.
* symtab.c (find_pc_symtab):  Handle having no objfiles.
* infcmd.c:  Fix comment.
* objfiles.c (free_all_objfiles):  Add.
* symfile.h (ALL_OBJFILES, ALL_OBJFILES_SAFE):  Add.
* symfile.c (symbol_file_command):  free all objfiles when
specifying a new symbol file.
(reread_symbols):  Stat the file name, don't fstat the descriptor.
1992-02-27 16:28:59 +00:00
Stu Grossman 30875e1c4b * infrun.c, infcmd.c, breakpoint.c, main.c, symfile.c,
breakpoint.h, tm-sun4os4.h, tm-sparc.h, sparc-tdep.c, tm-mips.h,
mips-tdep.h, tm-sun3.h, tm-68k.h, m68k-tdep.h:  Add support for
stepping (and nexting) through longjmp().  Also, cleanup
breakpoint handling quite a bit by creating explicit breakpoint
types instead of using magic breakpoint numbers.
Makefile.in:  Update version to 4.4.3
1992-02-22 09:06:58 +00:00
John Gilmore d3b9c0df30 * breakpoint.c (breakpoint_cond_eval): Use new value_true to test
breakpoint condition language-independently.
Output hex with local_hex_string for Modula-2 support.
1991-09-19 02:54:17 +00:00
John Gilmore 06b6c733ae Fix some infrastructure to be able to cope with host and target
machines with different sized basic types (ints, ptrs, etc).
(Idea from pierre@la.tce.com (Pierre Willard).)

* value.c (value_from_longest):  Rename from value_from_long.
Handle pointer types as well as integers, so that targets with
different pointer sizes from the host can be accomodated.
* breakpoint.c, convex-tdep.c, eval.c, expprint.c, printcmd.c,
valarith.c, valops.c, valprint.c, value.h, values.c:  Rename
uses of value_from_long to value_from_longest.
* eval.c, findvar.c, printcmd.c, valarith.c, valops.c:  Pass
the correct pointer type to value_from_long{est}.

* remote-vx.c:  Remove obsolete code for calling functions via
vxworks kludge interface (it referenced value_from_long).

* valops.c (value_string):  Find malloc with lookup_misc_func, not
raw search.

* breakpoint.c, remote-vx.c: Reword strings printed by
catch_errors callers.
1991-09-06 07:09:40 +00:00
John Gilmore bdbd5f5086 Make writing to files work properly. (Fixes to BFD are also needed.)
* core.c (core_open):  Open file ourselves, read or r/w, depending on
write_files.  Use bfd_fdopenr.
* gdbcore.h (write_files):  New variable.
* exec.c (write_files):  Define variable, add set&show for it.
(exec_file_command):  Use write_files to open for read or r/write.

Make shared library reading happen automatically.  These changes
are mostly from Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.

* inferior.h (stop_soon_quietly):  Add to exported variables.
* infrun.c (child_create_inferior):  call solib hook, if defined.
(child_attach):  call solib hook, if defined.
* solib.c:  Include inferior.h.  Add from_tty to so_list as kludge.
(find_solib):  Use lookup_misc_func rather than hand-rolled.
(symbol_add_stub):  New stub for catch_errors.
(solib_add):  Avoid output if !from_tty.  Catch errors rather
than just calling symbol_file_add and bombing.
(solib_create_inferior_hook):  Interface with the target process
to let it read and alloc shared libs, then figure out what it did.

* core.c (validate_files):  Fix typo, soften warning.
(Fix from Hiroto Kagotani <kagotani@cs.titech.ac.jp>.)

* utils.c (fputs_demangled):  Avoid duplicate printing if
demangling is off.  (Fix from J.T. Conklin <jtc@cayenne.com>.)

* infrun.c (proceed):  Cast -1 to (CORE_ADDR) before comparing.
(Fix from pierre@la.tce.com (Pierre Willard).)

* main.c (catch_errors):  Change argument to a char * from an int,
since a char * can point to a struct full of glop, but an int
is not guaranteed to be able to hold a pointer.
* breakpoint.c (breakpoint_cond_eval, bpstat_stop_status,
breakpoint_re_set_one, breakpoint_re_set):  Adapt.
* core.c (core_open, solib_add_stub):  Adapt.
* remote-vx.c (symbol_stub, add_symbol_stub, callers):  Adapt.
1991-09-04 07:43:50 +00:00
Jim Kingdon 777bef06cd Check for NULL selected_frame in various places. 1991-04-22 20:08:53 +00:00
Jim Kingdon fcb887ffcd * breakpoint.c (bpstat_print): Try all elements on the bpstat
chain before giving up with an internal error.

Sun Apr 21 21:43:10 1991  Jim Kingdon  (kingdon at cygint.cygnus.com)

	* value.h, values.c (value_{,free_to_}mark): New functions.
	breakpoint.c (bpstat_stop_status): Use them.
1991-04-22 07:08:07 +00:00
Jim Kingdon 31ef19fc7f *** empty log message *** 1991-04-19 03:22:12 +00:00
Jim Kingdon f266e5641b *** empty log message *** 1991-04-19 01:32:08 +00:00
K. Richard Pixley bd5635a1e2 Initial revision 1991-03-28 16:26:26 +00:00
John Gilmore 831c851165 Initial revision 1990-09-05 17:54:31 +00:00
gdb-3.5 7a67dd45ca gdb-3.5 2012-06-03 15:36:32 +01:00
gdb-3.4 1c997a4ae8 gdb-3.4 2012-06-03 15:36:32 +01:00
gdb-3.3 4187119d59 gdb-3.3 2012-06-03 15:36:32 +01:00
gdb-3.1 e91b87a368 gdb-3.1 2012-06-03 15:36:31 +01:00
gdb-2.8.1 bb7592f010 gdb-2.8.1 2012-06-03 15:36:31 +01:00
gdb-2.8 3bf57d2108 gdb-2.8 2012-06-03 15:36:31 +01:00
gdb-2.5.1 632ea0ccc5 gdb-2.5.1 2012-06-03 15:36:30 +01:00
gdb-2.4+.aux.coff 7b4ac7e1ed gdb-2.4+.aux.coff 2012-06-03 15:36:30 +01:00