Commit Graph

218 Commits

Author SHA1 Message Date
Andrew Cagney b30bf9ee99 Recognize -i=mi0, -i=mi1 and -i=mi. 2001-06-18 17:57:43 +00:00
Eli Zaretskii c94fdfd0a8 * completer.c (gdb_completer_loc_break_characters): New variable.
(line_completion_function): If we are completing on locations,
	back up the start of word pointer past all characters which can
	appear in a location spec.
	(location_completer): New function.

	* completer.h: Add prototype for location_completer.

	* symtab.c (make_source_files_completion_list)
	(add_filename_to_list, not_interesting_fname): New functions.
	(filename_seen): New function, body extracted from
	output_source_filename.
	(output_source_filename): Call filename_seen to check if the file
	was already printed.
	(make_symbol_completion_list): If TEXT includes a
	double-quoted string, return an empty list, not NULL.
	(make_file_symbol_completion_list): New function, similar to
	make_symbol_completion_list but with an additional argument
	SRCFILE.

	* symtab.h (make_file_symbol_completion_list)
	(make_source_files_completion_list): Add prototypes.

	* breakpoint.c (_initialize_breakpoint): Make location_completer
	be the completion function for all commands which set breakpoints
	and watchpoints.
	(top-level): #include "completer.h".

	* tracepoint.c (_initialize_tracepoint): Make location_completer
	be the completion function for the "trace" command.
	(top-level): #include "completer.h".

	* printcmd.c (_initialize_printcmd): Make location_completer be
	the completion function for the "print", "inspect", "call", and
	"disassemble" commands.
	(top-level): #include "completer.h".

	* infcmd.c (_initialize_infcmd): Make location_completer be the
	completion function for the "go", "jump", and "until" commands.
	(top-level): #include "completer.h".
2001-06-11 16:05:25 +00:00
Michael Snyder 2e66352450 2001-06-08 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (delete_breakpoint): Pass mark_inserted to
        remove_breakpoint, so that the subsequent test for
        bpt->inserted will succeed, and duplicates will be fixed up.
2001-06-09 01:55:43 +00:00
Michael Snyder 8601f500c8 2001-06-01 Michael Snyder <msnyder@redhat.com>
* thread.c (delete_step_resume_breakpoint): New function.
	Maintain internal consistency of the thread list while deleting
	a step_resume_breakpoint.
	* gdbthread.h (delete_step_resume_breakpoint): Export.
	* breakpoint.c (bpstat_find_step_resume_breakpoint):
	Make thread-aware: don't return a step_resume_breakpoint
	for the wrong thread.
	* infrun.c (wait_for_inferior): Call delete_step_resume_breakpoint
	instead of delete_breakpoint_current_contents.
	(fetch_inferior_event): Ditto.
	(handle_inferior_event): Call delete_step_resume_breakpoint
	instead of delete_breakpoint.
2001-06-02 00:36:20 +00:00
Kevin Buettner e4f237da05 * breakpoint.c (breakpoint_address_is_meaningful): New function.
(check_duplicates): Don't compare non-meaningful addresses.
2001-05-23 00:52:44 +00:00
Andrew Cagney 666547aa9e s/ui_out_list/ui_out_tupple/ 2001-05-12 04:08:24 +00:00
Kevin Buettner 4d28f7a8fb Add ``type'' parameter to set_raw_breakpoint(). 2001-05-11 19:46:35 +00:00
Kevin Buettner ce696e0556 Consolidate save_inferior_ptid/restore_inferior_ptid implementation to
one source file.
2001-05-06 22:22:03 +00:00
Jim Blandy 644a1fe1ca * breakpoint.c (check_duplicates): Use the breakpoint's type, not
its address, to decide whether it's a watchpoint or not.  Zero
is a valid code address.
(update_breakpoints_after_exec): Admonishing comments.
* breakpoint.h (struct breakpoint): Doc fixes.
2001-05-06 01:35:57 +00:00
Jim Blandy 9f60f21b6d * breakpoint.c (check_duplicates): Take a breakpoint object as an
argument, rather than an address and section.  All callers changed.
2001-05-06 00:52:07 +00:00
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
Michael Snyder 75ac9d7b9d 2001-04-17 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (print_one_breakpoint): Handle 64-bit addresses.
	* tracepoint.c (tracepoints_info): Handle 64-bit addresses.
        * testsuite/gdb.trace/deltrace.exp: Allow for 64-bit addresses.
	* testsuite/gdb.trace/infotrace.exp: Ditto.
        * testsuite/gdb.trace/passcount.exp: Ditto.
	* testsuite/gdb.trace/while-stepping.exp: Ditto.
2001-04-17 20:16:31 +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 b0ed35899a Change SOFTWARE_SINGLE_STEP_P into SOFTWARE_SINGLE_STEP_P(). 2001-03-20 18:16:28 +00:00
Eli Zaretskii c97fe386ef * breakpoint.c (print_it_typical) <bp_access_watchpoint> [UI_OUT]:
Correct the order of calls to ui_out_field_string and
	ui_out_list_begin when bs->old_val is NULL.
2001-03-20 09:46:00 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Michael Snyder d85310f71a 2001-02-28 Michael Snyder <msnyder@mvstp600e.cygnus.com>
* breakpoint.c (print_one_breakpoint): Formatting clean-up.
	(read_memory_nobpt): Ditto.
	(ep_is_catchpoint): Ditto.
	(ep_is_shlib_catchpoint): Ditto.
	(ep_is_exception_catchpoint): Ditto.
	(describe_other_breakpoints): Ditto.
2001-03-01 03:50:17 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Andrew Cagney 4fcf66da88 Replace strsave() with xstrdup(). 2001-01-31 01:24:03 +00:00
Andrew Cagney 6ab3a9c917 * target.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
* breakpoint.c (TARGET_REGION_OK_FOR_HW_WATCHPOINT): Wrap macro
definition in parenthesis.
2001-01-18 15:42:24 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Fernando Nasser c5f0f3d0c8 2000-11-30 Fernando Nasser <fnasser@redhat.com>
* linespec.h: New file. Declarations for linespec.c.
        * linespec.c, alpha-tdep.c, breakpoint.c, parse.c, source.c,
        symtab.c, tracepoint.c: Include the above.
        * completer.c: New file. Line completion stuff for GDB.
        (get_gdb_completer_word_break_characters,
        get_gdb_completer_quote_characters): New functions. Accessors for
        useful completer internal data.
        (filename_completer, line_completion_function, skip_quoted): Moved
        here from top.c.
        * completer.h: New file. Declarations for the above.
        * linespec.c (decode_line_1): Use
        get_gdb_completer_word_break_characters and
        get_gdb_completer_quote_characters.
        * top.c: Include completer.h.
        (filename_completer, line_completion_function, skip_quoted):
        Moved to completer.c.
        * corefile.c, exec.c, source.c, symfile.c, linespec.c: Include
        completer.h.
        * Makefile.in (SFILES): Add completer.c.
        (COMMON_OBS): Add completer.o.
        (completer.o): New target.
        (linespec.o, alpha-tdep.o, breakpoint.o, parse.o, source.o,
        symtab.o, tracepoint.o): Add linespec.h to dependencies list.
        (corefile.o, exec.o, source.o, symfile.o, linespec.o): Add completer.h
        to dependencies list.
2000-12-01 00:43:47 +00:00
Andrew Cagney 7f7e9482db * remote.c (remote_write_bytes): Add default case to switch
initializing ``todo''. Ditto for ``nr_bytes''.
* top.c (catch_errors): Always initialize ``val''.
* solib.c (info_sharedlibrary_command): Handle bfd_get_arch_size
returning an unknown size.
* gdbtypes.c (count_virtual_fns): Always initialize ``vfuncs''.
* breakpoint.c (break_at_finish_at_depth_command_1): Initialise
extra_args to NULL.
(break_at_finish_command_1): Ditto.
2000-11-27 02:18:44 +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
David Anderson 7e73cedf75 Corrected spelling errors in comments.
gdbarch.{c,sh} removed a word from a comment.
2000-10-27 15:02:42 +00:00
Michael Snyder 23e049712d 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
* valops.c (value_cast): Indentation fix-up.
        * acconfig.h (HAVE_PRGREGSET32_T, HAVE_PRFPREGSET32_T,
        HAVE_STRUCT_LINK_MAP32): New configure macros.
        * config.in: Ditto.
        * configure.in: Test for the above new macros.
        * breakpoint.c: Update copyright date.
        * core-sol2.c: Include v9/sys/privregs.h directly to
        work around a bug in Sun's Solaris 8 header files.
        (fetch_core_registers): Use the above new configure macros to
        handle cross-debugging of 32-bit core files on a 64-bit host.
        * sol-thread.c (ps_pdmodel) New function.
        (rw_common): For debugging of 32-bit apps on a 64-bit host,
        truncate addresses to 32 bits.
        * solib.c (solib_extract_address): Functionize.  Make 32/64 aware.
        (LM_ADDR, LM_NEXT, LM_NAME): Ditto.
        (IGNORE_FIRST_LINK_MAP): Ditto.
        (first_link_map_member): Make 32/64 aware.
        (open_symbol_file_object): Ditto.
        (current_sos): Ditto.
2000-08-30 00:58:58 +00:00
Kevin Buettner 831662b3ca Protoization. 2000-08-03 18:17:58 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Mark Kettenis a48bb0b384 * breakpoint.c (bpstat_what): Keep returning
BPSTAT_WHAT_SET_LONGJMP_RESUME when hitting multiple longjmp()
breakpoints instead of signalling an error by returning
BPSTAT_WHAT_STOP_NOISY.
2000-07-07 00:20:29 +00:00
Michael Snyder 2c8f79c2da 2000-06-12 Michael Snyder <msnyder@cleaver.cygnus.com>
* breakpoint.c (breakpoint_thread_match): Fix comment.
2000-06-12 21:17:21 +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 4d6140d95e Cleanup delete_breakpoint cleanups. 2000-05-15 05:54:02 +00:00
Andrew Cagney b02eeafb14 Use make_cleanup_ui_out_stream_delete(). 2000-05-15 03:16:15 +00:00
Michael Snyder 57e687d9ad 2000-03-30 Michael Snyder <msnyder@cleaver.cygnus.com>
* defs.h (struct continuation_arg): make 'data' a union, to avoid
        casting problems when int and pointer are not the  same size.
        * event-top.c (command_handler): use data as a union.
        (command_line_handler_continuation): ditto.
        * infcmd.c (step_1_continuation): use data as a union.  Re-indent.
        (step_once): ditto.  (finish_command_continuation): ditto.
        (finish_command): ditto.
        * breakpoint.c (until_break_command): use data as a union.
        (until_break_command_continuation): ditto.
        * utils.c (add_intermediate_continuation): fix typo in comment.
2000-03-30 18:54:28 +00:00
Andrew Cagney 80ce1ecb70 Fix various GCC warnings. 2000-03-29 00:51:17 +00:00
Michael Snyder 692590c19f 2000-03-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
breakpoint.c, breakpoint.h (remove_hw_watchpoints):  New function.
        infrun.c (resume):  Remove hardware watchpoints before stepping
        when CANNOT_STEP_HW_WATCHPOINTS is nonzero.
2000-03-28 22:30:19 +00:00
Michael Snyder c690268831 2000-03-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
* breakpoint.c (insert_breakpoints, do_enable_breakpoint):
        Reselect the saved frame silently after frame selection for
        watchpoint evaluation.
        (insert_breakpoints):  Add missing space in `Hardware watchpoint
        deleted' message.  Do not reinsert hardware watchpoint if it is
        already marked for deletion at next stop.
2000-03-28 19:29:56 +00:00
Michael Snyder 99e5c1c84f 2000-03-21 Eli Zaretskii <eliz@is.elta.co.il>
* breakpoint.c (bpstat_stop_status): Don't stop if a read
        watchpoint appears to break, but the watched value changed.
2000-03-21 20:41:39 +00:00
Michael Snyder 2e70b7b962 2000-03-20 Eli Zaretskii <eliz@is.elta.co.il>
* breakpoint.c (insert_breakpoints, remove_breakpoint)
        (bpstat_stop_status, can_use_hardware_watchpoint): Don't insert,
        remove, or check status of hardware watchpoints for entire structs
        and arrays unless the user explicitly asked to watch that struct
        or array.
        (insert_breakpoints): Try to insert watchpoints for all the values
        on the value chain, even if some of them fail to insert.

        * values.c (value_primitive_field): Set the offset in struct value
        we return when the field is a packed bitfield.
2000-03-21 01:27:34 +00:00
Andrew Cagney fb40c20903 Add mi/ and testsuite/gdb.mi/ subdirectories.
Add --enable-gdbmi option to configury.
Add mi rules to Makefile.in
Add mi conditional output to event-top.c infrun.c main.c top.c.
Add -i=mi option.
2000-02-23 00:25:43 +00:00
Jason Molenda 8b93c6380e import gdb-2000-02-02 snapshot 2000-02-03 04:14:45 +00:00
Jason Molenda 0d06e24ba7 import gdb-2000-01-10 snapshot 2000-01-11 03:07:37 +00:00
Jason Molenda c3f6f71df3 import gdb-2000-01-05 snapshot 2000-01-06 03:07:20 +00:00
Jason Molenda ed9a39ebf9 import gdb-1999-12-21 snapshot 1999-12-22 21:45:38 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 4ce44c668d import gdb-1999-11-16 snapshot 1999-11-17 02:31:06 +00:00
Jason Molenda 11cf874164 import gdb-1999-11-08 snapshot 1999-11-09 01:23:30 +00:00
Jason Molenda 5c44784c11 import gdb-1999-11-01 snapshot 1999-11-02 04:44:47 +00:00
Jason Molenda e514a9d642 import gdb-1999-10-25 snapshot 1999-10-26 03:43:48 +00:00
Jason Molenda 917317f4c6 import gdb-1999-10-18 snapshot 1999-10-19 02:47:02 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Jason Molenda 6426a772a2 import gdb-1999-09-28 snapshot 1999-09-28 21:55:21 +00:00
Jason Molenda c2c6d25f0d import gdb-1999-09-21 1999-09-22 03:28:34 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda 53a5351d90 import gdb-1999-08-23 snapshot 1999-08-23 22:40:00 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 43ff13b418 import gdb-1999-07-05 snapshot 1999-07-05 17:58:44 +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
Jason Molenda 9e086581c7 import gdb-1999-0519 1999-05-19 19:58:41 +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
David Taylor 5337bd558b disable_breakpoints_in_shlibs now takes a new parameter -- silent; callers
updated.  new callers -- clear_solib (irix5-nat.c, osfsolib.c, solib.c).
PR 16495 / PR 18213.
1999-01-19 16:20:39 +00:00
Andrew Cagney 6e45c399c1 catch_errors() takes PTR argument/func instead of char* argument/func.
Update breakpoint.c.
Fix (?) cover_target_enable_exception_callback().  Wasn't returning a
value.
1999-01-17 23:23:42 +00:00
David Taylor 320d5bd8b6 insert_breakpoints -- insert cast to eliminate warning. 1999-01-14 00:37:26 +00:00
Michael Snyder 677f415c03 * thread.c: cull duplicate prototypes. Move prototypes to top.
* serial.c: indentation cleanup.
        * breakpoint.c: add casts to eliminate compiler warnings.
1999-01-13 23:44:07 +00:00
David Taylor 490825560e target.c (noprocess): terminate sentence with a period.
breakpoint.c (catch_command_1): ditto.
1999-01-05 22:01:26 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Stan Shebs 92fb1f2eba Sat Nov 21 17:15:40 1998 Philippe De Muyter <phdm@macqel.be>
* breakpoint.c (bpstat_stop_status): Do not increment hit_count
	of breakpoint if condition is not true.
1998-11-21 20:16:49 +00:00
Jason Molenda ad3b8c4a1a 1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
        possible nested-if confusion.
        * breakpoint.c (breakpoint_here_p): Ditto.
        (breakpoint_inserted_here_p): Ditto.
        (breakpoint_thread_match): Ditto.

        * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
        * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
        prototypes.

        * symtab.h: Add prototype for _initialize_source.
        * value.h: Add prototype for _initialize_value.

        * defs.h: Include sys/types.h or stddef.h to get size_t.
        (make_cleanup): Add make_cleanup_func typedef and switch to using
        a prototype for this function.
        (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
        using mmalloc.

        * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
        dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
        infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
        symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
        Cast parameters passed to make_cleanup to use the new
        make_cleanup_func typedef.


More warning cleanups.  There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system.  Bwahahaha.  You can see them
like this:

grep make_cleanup\  * | grep -v make_cleanup_func

I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
1998-10-14 01:15:00 +00:00
Frank Ch. Eigler 6ee2da947e * Fix for PR 16567, brought over from d30v branch.
Thu Oct  1 15:39:27 EDT 1998 Frank Ch. Eigler <fche@cygnus.com>
	* breakpoint.c (bpstat_stop_status): Do not consider an
	untripped watchpoint as a "hit".
1998-10-01 11:48:25 +00:00
Keith Seitz 895cc8ab1c * main.c (main): Fix violations of GNU coding standard.
* breakpoint.c: Export delete_command.

	* infcmd.c: Export continue_command, stepi_command, and nexti_command.

	* Makefile.in: Add target for v850ice.o.

	* configure.tgt: Add cygwin32 dependencies for v850 ice.
1998-07-15 18:52:50 +00:00
David Taylor 6b038bd9e6 add _siglongjmp to list of longjmp breakpoints. 1997-12-31 07:36:28 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Stu Grossman 647e52ea3a Changes from the FSF for Hurd thread support. 1996-07-17 06:03:26 +00:00
Fred Fish 41756e56ee * defs.h (read_command_lines, query_hook): Update prototypes.
(readline_begin_hook, readline_hook, readline_end_hook): Declare.
	* breakpoint.c (commands_command): Build message in temporary buffer
	and pass that, as well as tty control flag, to read_command_lines.
	* top.c (readline_begin_hook, readline_hook, readline_end_hook):
	Define here.
	(command_loop): Check for non-NULL instream before looping.
	(command_line_input): Use readline_hook when appropriate, to get
	user input from a GUI window.
	(read_next_line): Also build prompt if getting user input from a GUI.
	(recurse_read_control_structure): Fix typo in comment.
	(read_command_lines): Use passed in prompt and tty flag to decide how
	to build message.  Use readline_begin_hook when appropriate, to set
	up a GUI interaction window.  Just return head, whether NULL or not,
	after using readline_end_hook to complete GUI interaction.
	(define_command, document_command): Build message in a temporary
	buffer and pass it to read_command_lines, along with tty flag.
	* gdbtk.c (gdbtk_readline_begin, gdbtk_readline, gdbtk_readline_end):
	New functions.
	(tk_command_loop): Set instream to NULL to enable Tk user interaction.
	(gdbtk_init): Set readline_begin_hook, readline_hook,
	and readline_end_hook.
	* gdbtk.tcl (gdbtk_tcl_readline_begin, gdbtk_tcl_readline,
	gdbtk_tcl_readline_end): New functions.
	(tclsh): Pack scroll bar on right side of window, not left.
PR 9385
1996-05-20 02:05:55 +00:00
Stu Grossman fdfa331511 * Makefile.in, breakpoint.c, corelow.c, fork-child.c, inflow.c,
infrun.c, mac-nat.c, procfs.c, remote.c, sol-thread.c, thread.c,
	win32-nat.c, config/nm-lynx.h:  Rename thread.h to gdbthread.h to
	avoid conflict with Solaris /usr/include/thread.h.
1996-05-09 21:24:20 +00:00
Fred Fish 3f37b69612 * breakpoint.c (clear_momentary_breakpoints): Remove dead code
that is referenced nowhere else.
	(set_breakpoint): Ditto.
	(do_enable_breakpoint): Created from enable_once_breakpoint
	with a couple of changes.
	(enable_breakpoint): Call do_enable_breakpoint with an appropriate
	bpdisp enum value to set disposition of breakpoint.
	(enable_once_breakpoint): Ditto.
	(enable_delete_breakpoint): Ditto.
	* breakpoint.h (clear_momentary_breakpoints): Remove prototype.
	* symtab.c (find_pc_line): Improve comments.
	* gdbtk.c: Fix a couple of misspellings.
	* xcoffread.c: Ditto.
1996-05-08 23:34:34 +00:00
Jeff Law e51481f967 * From Peter Schauer:
* breakpoint.h (enum bpdisp):  Add del_at_next_stop.
        * breakpoint.c (insert_breakpoints, watchpoint_check,
        bpstat_stop_status):  Avoid bad references to memory freed via
        delete_breakpoint on watchpoints going out of scope.
        Do not delete these watchpoints, disable them and change their
        disposition to del_at_next_stop instead.
        (breakpoint_auto_delete):  Delete all breakpoints whose disposition
        is del_at_next_stop.
        (breakpoint_init_inferior):  Use switch to avoid reference to
        already deleted breakpoint.
Fixes dangling pointer problems with watchpoints.
1996-05-02 18:43:28 +00:00
Peter Schauer 39ce68291e * breakpoint.c (delete_breakpoint): Fix bpt->val, bpt->exp
storage leaks.
	(breakpoint_re_set_one):  Fix b->exp, b->val, b->cond storage leaks.

	* infcmd.c (run_command), solib.c (locate_base):  Check for
	target_has_execution in addition to inferior_pid, a core file
	from a threaded program is yielding a non-zero inferior_pid.

	* sparc-tdep.c (get_saved_register):  Handle window registers
	in a dummy frame correctly.
1996-04-28 10:49:54 +00:00
Jeff Law fa3764e2bf * From Peter Schauer.
* breakpoint.c (breakpoint_re_set_one):  Keep temporary
        breakpoints bp_until, bp_finish, bp_watchpoint_cope, bp_call_dummy
        and bp_step_resume in case breakpoint_re_set_one is called due
        to a step over a dlopen call.
        * infrun.c (wait_for_inferior):  Always remove breakpoints from
        inferior in BPSTAT_WHAT_CHECK_SHLIBS case.
1996-03-27 15:35:16 +00:00
Jeff Law 27b6a1fa2e * From Peter Schauer:
* breakpoint.c (internal_breakpoint_number): Move to file scope.
        (create_solib_event_breakpoint): Use an internal breakpoint number.
1996-03-06 16:36:13 +00:00
Stu Grossman 2f4973f852 Update copyrights. Add copyright notice to configure.in. 1996-01-05 17:11:45 +00:00
Stu Grossman 0fe1522ad0 * breakpoint.c (remove_breakpoint): Change error to warning so
that hardware watchpoint removal problems won't leave breakpoint
	traps in the target.
	* configure configure.in:  Make --enable-gdbtk be the default.
	* remote-e7000.c (e7000_insert_breakpoint,
	e7000_remove_breakpoint):  Use e7000 based breakpoints, not memory
	breakpoints.
	* (e7000_wait):  Adjust PC back by two when we see a breakpoint to
	compensate for e7000 maladjustment.
	* sparcl-tdep.c (sparclite_check_watch_resources):  Fix logic bug
	which prevented hardware watchpoints from working.
1996-01-05 00:42:36 +00:00
Stu Grossman cd10c7e388 * breakpoint.c (breakpoint_re_set): #ifdef GET_LONGJMP_TARGET
around calls to create_longjmp_breakpoint.  Why install the
	breakpoints if we can't find the longjmp target?
	* infrun.c (wait_for_inferior):  Cleanup comments near call test.
	* remote-mips.c:  Fixed a bunch of prototypes to avoid char/int
	complaint from picky compilers.  Add comment to mips_expect.
	Replace all instances of sr_get_debug with remote_debug.
	* (mips_readchar):  Don't jam init string to monitor.
	mips_initialize() handles that.
	* (mips_receive_header):  Print better message when we get too
	much garbage.
	* (mips_request):  Allow caller to pass in buff to allow them to
	analyze the returned message.
	* (mips_initialize):  Re-do initialization to try sending a BREAK,
	a ^C, and then a download escape sequence.  Cleanup protocol
	startup.  Eliminate sleeps.  Clear breakpoints (if using monitor
	breakpoints).  Re-init frame.
	* (mips_detach):  Close down target.
start-sanitize-gm
	* (mips_resume):  Pass signal down to target.
	* (mips_create_inferior):  Start target with TARGET_SIGNAL_PWR.
end-sanitize-gm
	* (mips_wait):  Handle return status with registers, or breakpoint stuff.
	* (mips_kill):  Add ^C handling.
	* (mips_insert_breakpoint mips_remove_breakpoint):  Call new
	breakpoint stuff if enabled.
	* (calculate_mask remote_mips_set_watchpoint
	remote_mips_remove_watchpoint remote_mips_stopped_by_watchpoint):
	Hardware watchpoint/breakpoint stuff.
	* (common_breakpoint):  Common code for new monitor breakpoint commands.
	* (mips_load):  Don't use `prompt'.  It's a global variable.
	* top.c (dont_repeat_command):  New command for use in
	user-defined commands to suppress auto-repeat (by hittin return key).
start-sanitize-gm
	* utils.c (request_quit):  Call target_kill here.  Good idea.
	Needs a better implementation.
end-sanitize-gm
	* valops.c:  Add start of auto function-call abandonment capability.

start-sanitize-gm
	* c-exp.y:  Add code (currently disabled) to handle GM dynamic
	structures (it conflicts with @!).
	* eval.c (evaluate_subexp_standard):  ditto.
	* expprint.c (print_subexp dump_expression):  ditto.
	* expression.h (enum exp_opcode):  ditto.
	* parse.c (length_of_subexp):  ditto.
	* configure, configure.in:  Add mip*-*-magic* target.
	* magic.c magic.h:  Special routines to handle GM stuff (like
	stepping through dispatcher).
end-sanitize-gm
1995-10-27 17:48:36 +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
Jim Kingdon e8bf33c4ac * breakpoint.c, target.h: Move defaults of watchpoint related
macros back to breakpoint.c.  Required to get GDB compiling
	on Solaris again.
1995-05-22 15:29:00 +00:00
Jeff Law 0f8cdd9ba4 * Allow up to 10 whitespace separated arguments to user defined
commands.
        * top.c (struct user_args): Structure for holding arguments to
        user defined commands.
        (print_command_line): Delete unused "tmp_chain" variable.  Clean
        up flow control by having cases exit in the same manner.
        Before executing a command or evaluating an expression, substitute
        the current $arg0..$arg9 values if the command/expression uses them.
        (arg_cleanup): New function.
        (setup_user_args, locate_arg, insert_args): Likewise.
        (execute_user_command): Allow arguments to user defined commands.

        * Allow if/while commands to be used within a breakpoint command
        list.
        * breakpoint.c (bpstat_do_actions): Call execute_control_command
        rather than execute_command (passes entire command structure rather
        than just the command line text).
        (breakpoint_1): Use "print_command_line" to print a breakpoint
        command line (including control structures).
        * gdbcmd.h (execute_control_command): Provide extern decl.
        (print_command_line): Likewise.
        * top.c (execute_control_command): No longer static.
        (print_command_line): New function to recursively print a command
        line, including control structures.
1994-12-30 19:53:39 +00:00
Jeff Law 706dc3ce33 * breakpoint.c (watchpoint_check): Don't bother restoring the
"selected" frame anymore, it's not necessary.  Initialize the
	frame cache before trying to find the current frame in the frame
	chain.
1994-12-27 21:52:00 +00:00
Jim Kingdon 16726dd15b The point of these changes is to avoid reading the frame pointer
and stack pointer during stepping, to speed things up.
	A.  Changes to not select a frame until we need a selected frame:
	    * blockframe.c (flush_cached_frames): Call select_frame (NULL, -1).
	    * infrun.c (wait_for_inferior): Move call to select_frame back to
	    normal_stop.  This reverts a change of 13 Apr 94 (it says Jeff
	    Law, but the change was my idea); the only reason for that change
	    was so we could save and restore the selected frame in
	    wait_for_inferior, and now that flush_cached frames clears the
	    selected frame, that should work OK now.
	B.  Changes to not create a current_frame until we need one:
	    * blockframe.c (get_current_frame): If current_frame is NULL, try
	    to create an innermost frame.
	    * sparc-tdep.c (sparc_pop_frame), infcmd.c (run-stack_dummy),
	    infrun.c (wait_for_inferior), thread.c (thread_switch),
	    convex-tdep.c (set_thread_command), a29k-tdep.c (pop_frame),
	    alpha-tdep.c (alpha_pop_frame), convex-xdep.c (core_file_command),
	    h8300-tdep.c (h8300_pop_frame), h8500-tdep.c (h8300_pop_frame),
	    hppa-tdep.c (hppa_pop_frame), i386-tdep.c (i386_pop_frame),
	    i960-tdep.c (pop_frame), m68k-tdep.c
	    (m68k_pop_frame), mips-tdep.c (mips_pop_frame), rs6000-tdep.c
	    (push_dummy_frame, pop_dummy_frame, pop_frame), sh-tdep.c
	    (pop_frame), config/arm/tm-arm.h (POP_FRAME),
	    config/convex/tm-convex.h (POP_FRAME), config/gould/tm-pn.h
	    (POP_FRAME), config/ns32k/tm-merlin.h (POP_FRAME),
	    config/ns32k/tm-umax.h (POP_FRAME), config/tahoe/tm-tahoe.h
	    (POP_FRAME), config/vax/tm-vax.h (POP_FRAME): Don't
	    call create_new_frame.
	    * corelow.c (core_open), altos-xdep.c (core_file_command),
	    arm-xdep.c (core_file_command), gould-xdep.c (core_file_command),
	    m3-nat.c (select_thread), sun386-nat.c (core_file_command),
	    umax-xdep.c (core_file_command): Don't call create_new_frame; do
	    call flush_cached_frames.
	    * blockframe.c (reinit_frame_cache): Don't call create_new_frame
	    or select_frame.
	C.  Changes to get rid of stop_frame_address and instead only
	fetch the frame pointer when we need it.
	    * breakpoint.c (bpstat_stop_status): Remove argument
	    frame_address; use FRAME_FP (get_current_frame ()).
	    * infrun.c (wait_for_inferior): Don't pass frame pointer to
	    bpstat_stop_status.
	    * infrun.c (wait_for_inferior): Use FRAME_FP (get_current_frame
	    ()) instead of stop_frame_address.
	    * infrun.c (save_inferior_status, restore_inferior_status),
	    inferior.h (struct inferior_status): Don't save and restore
	    stop_frame_address.
	    * inferior.h, infcmd.c, thread.c (thread_switch), m3-nat.c
	    (select_thread): Remove stop_frame_address and uses thereof.
	D.  Same thing for the stack pointer.
	    * infrun.c (wait_for_inferior): Remove stop_sp and replace
	    uses thereof with read_sp ().
	E.  Change to eliminate one nasty little spot where we were
	wanting to know the frame pointer from before the current step
	(idea from GDB 3.5, which saved my ass, because my other ideas of
	how to fix it were very baroque).
	    * infrun.c: Remove prev_frame_address.
	    * infrun.c (wait_for_inferior, step_over_function): Use
	    step_frame_address instead of prev_frame_address.
	F.  Same basic idea for the stack pointer.
	    * inferior.h, infcmd.c: New variable step_sp.
	    * infcmd.c (step_1, until_next_command): Set it.
	    * infrun.c: Remove prev_sp and replace uses by step_sp.
	    * infrun.c (wait_for_inferior): If we get out of the step
	    range, then set step_sp to the current stack pointer before we
	    start going again.
1994-10-08 03:41:21 +00:00
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