Commit Graph

484 Commits

Author SHA1 Message Date
Jim Ingham 63d138d980 Merging the Tracepoint changes back into the Trunk:
Wed Nov  4 12:41:42 1998  Jim Ingham  <jingham@cygnus.com>

	* actiondlg.tcl: Get the stack collect string from an instance
	variable.  Need to implement some way to get this from the
	target settings...
	* global_pref.tcl (toggle_tracing_mode): Add & remove hooks
	when you go in and out of tracing mode.  Also reset the B1
	behavior when you leave tracing mode
	* interface.tcl (gdbtk_tcl_trace_find_hook): Added the trace
	find hook, so you can switch the GUI state when the tfind
	command is used to enter & leave browse mode.
	* srcbar.tcl (constructor, destructor trace_find_hook): Added
	the trace_find_hook to the source toolbar, and added the
	necessary hooks to handle it.
	* srctextwin.tcl (trace_find_hook): Added a trace find hook to
	the sourcebar as well.
	* stack.tcl (update): protect against errors in gdb_stack.
	Just return "NO STACK" if we couldn't get it.
	* src_pref.tcl (constructor, cancel): Put all the saved prefs
	in an array, on cancel, see if any have changed and only
	rebuild the window if there have been changes.

Mon Nov  2 13:24:10 1998  Jim Ingham  <jingham@cygnus.com>

	* bp.tcl (update): The hook function was passing more
	arguments than this function expected.

Mon Nov  2 11:16:10 1998  Jim Ingham  <jingham@cygnus.com>

	* toolbar.tcl: Added Tdump image.

Fri Oct 30 17:36:05 1998  Jim Ingham  <jingham@cygnus.com>

	* src.tcl (set_execution_status): Changed status messages,
	tracing is not the same as async debugging...

Fri Oct 30 17:06:31 1998  Jim Ingham  <jingham@cygnus.com>

	* bp.tcl (bp_all): Only remove tracepoints in the tracepoint
	window, and breakpoints in the breakpoint window.

Fri Oct 30 11:22:23 1998  Jim Ingham  <jingham@cygnus.com>

	* actiondlg.tcl: Added special tag "Collect Stack".  This
	still needs to get hooked into the target database to deal
	with targets that need to do something special to collect the
	stack.  Also moved some repeated code into loops.
	* main.tcl (source_file): Source in a file of gdb commands.
	* srcbar.tcl (constructor): Added source file menu entry, and
	made stack buttons belong to both the Trace & Control classes.
	* srctextwin.tcl (constructor): One too many separators in the
	trace trace popup menu.
	* tclIndex: regenerated.
	* tfind_args.tcl: Added "tfind frame"
	* toolbar.tcl (create_button): Allow a button to belong to
	more than one class.
	* toolbar.tcl (enable_ui): Eliminate redundant code, and allow
	a button to belong to more than one class.
	* toolbar.tcl (create_trace_menu): Added save tracepoints &
	Tfind frame menu items.
	* tracedlg.tcl: Added deletion of actions, and fixed a
	the whiile-stepping combobox callback for the new combobox.
	* util.tcl (save_trace_commands): new proc.

1998-10-29  Michael Snyder  <msnyder@demo-laptop2.cygnus.com>

	* target.tcl: add /dev/cua0 for Linux.

Tue Oct 27 13:46:03 1998  Jim Ingham  <jingham@cygnus.com>

	* Many little bug fixes all over in order to get tracing to work
        along with normal program control.
	* toolbar.tcl: Rewrote much of the code here to put commonly
	used code into functions, and clean up adding menus and
	buttons.  Added the ability to disable particular menu items,
	not just whole menus.  Added the ability to delete and insert
	buttons on the fly.
	* srcbar.tcl: Pushed the changes to toolbar.tcl into this file.
	* srctextwin.tcl: Changed the code dealing with breakpoints
	and tracepoints to use the text tags more consistently.  Use
	only one set of menus for the whole widget, rather than having
	a separate set for the SRC+ASM case.  Rewrote a lot of the
	code to separate out the tracing & program control functions.
	* interface.tcl (gdbtk_tcl_breakpoint): pass more information
	to the scrtextwin when a breakpoint changes state, so it can
	do the right thing without having to guess...
	* tracedlg.tcl (build_win): get the packing right so the
	window expands correctly.
	* main.tcl: do_tstop -> tstop,  do_tstart -> tstart to avoid
	confusion with the methods in ScrBar.tcl.
	* prefs.tcl: Added two new preferences B1_Behavior to control
	whether B1 sets breakpoints or tracepoints.
	* src_prefs.tcl: Put in support for the B1_Behavior.
        * global_prefs.tcl: Put back tracing checkbox.
        * tdump.tcl: Fixed an incorrect (1 rather than 1.0) text
	widget line specification.
	* tfind_args.tcl (build_win): Bind return in the entry to the
	OK button.  Clear the entry field if the Type has changed.
	* utils.tcl: Added comments for the debug commands.
	* watch.tcl (build_win): Flash the OK button before invoking it.

Wed Nov  4 12:41:42 1998  Jim Ingham  <jingham@cygnus.com>

	* gdbtk-cmds.c (gdb_set_bp_addr): Pass the type, enable & thread
	to gdbtk_tcl_breakpoint.
	* gdbtk-hooks.c (gdbtk_trace_find): Added this function.  It is
	the hook function for tfind commands.
	* tracepoint.c (trace_find_command): Added the trace_find_hook,
	run when you do trace_find_command.
	* tracepoint.h: Define the trace_find_hook.

Mon Nov  2 11:16:10 1998  Jim Ingham  <jingham@cygnus.com>

	* gdbtk-cmds (gdb_get_tracepoint_info): Demangle C++ function names.

Fri Oct 30 11:22:23 1998  Jim Ingham  <jingham@cygnus.com>

	* gdbtk-cmds (gdb_get_tracepoint_info): Fixed typo.

Wed Oct 28 10:14:33 1998  Jim Ingham   <jingham@cygnus.com>

	* gdbtk-cmds.c: Made the bdtypes & bpdisp arrays shared so they
	could be used in gdbtk-hooks.c (breakpoint_notify).
	Also fixed a few error messages to actually print the bp number
	rather that #%d...
	* gdbtk-hooks.c (breakpoint_notify): pass more of the information
	about the breakpoint into the Tcl command, so it does not have to
	try and guess about information we have on the C side.
	* gdbtk.h: Export the bptypes & pbdisp arrays.
1998-11-05 18:12:23 +00:00
Michael Snyder 2e7eeba99d Thu Oct 29 10:04:20 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
[Support for trace debugging: registers that were not collected.]
        * remote.c (remote_fetch_registers): accept 'xxxx' in the register
        packet, with the meaning "register value is not available".
        Set register_valid to -1, which will connote "no value available".
        * findvar.c (read_relative_register_raw_bytes): return failure if
        register_valid == -1.  (value_of_register): return failure if
        register_valid == -1.  (read_var_value): return error if
        value_of_register fails for a register variable.
        (value_from_register): return failure if register_valid == -1.
        * eval.c (evaluate_subexp_standard): return error if
        value_of_register fails for a register used in an expression.
        * infcmd.c (do_registers_info): display "value not available"
        for registers for which register_valid == -1.

        * tracepoint.c (set_raw_tracepoint): just save the filename as is
        from the symbol table, rather than trying to prepend the dir name.
        Also save the bfd section.  (tracepoints_info): use the section
        when looking up the function name.
        * tracepoint.h: add section field to tracepoint struct.
1998-10-29 18:07:01 +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
Michael Snyder 74c1b0ba6b Fri Sep 11 14:02:49 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* tracepoint.c: clean up several unused variables and such.
1998-09-11 21:03:29 +00:00
Michael Snyder 98760699c7 Mon Aug 24 18:29:03 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* tracepoint.c (collect_symbol): Handle register doubles that
        are stored in two registers.
1998-08-25 01:31:06 +00:00
Michael Snyder 0745a748dd Mon Jul 27 16:11:42 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* tracepoint.c (remote_set_transparent_ranges): new function.
        Send the start and end addresses of all loadable read-only
        sections down to the trace target, so that it can treat them
        as "transparent" (ie. don't care if they were collected or not).
1998-07-27 23:13:22 +00:00
Michael Snyder 8d6476c711 Fri Jul 24 14:41:19 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* tracepoint.c (encode_actions): Treat register names and simple
        variable names as special cases and don't convert them to byte-
        codes: these things can be collected far more efficiently
        without invoking the bytecode interpreter.
1998-07-24 21:44:14 +00:00
Michael Snyder f32fa05325 Thu Jul 23 17:01:17 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* tracepoint.c (collect_symbol): handle LOC_ARG case.
1998-07-24 00:02:07 +00:00
Nick Clifton e1f1ed1ad7 Cope with setting trace points on symbols which do not have an associated directory. 1998-07-15 18:00:49 +00:00
Michael Snyder 9fe11cd106 merged from EMC branch into devo 1998-06-03 20:14:26 +00:00
Tom Tromey 4a3456fc9e * tracepoint.c (memrange_cmp): Another typo fix; `memrbnge' ->
`memrange'.
1998-04-29 01:48:05 +00:00
Tom Tromey 94415c7e2e * tracepoint.c (memrange_cmp): Fixed typo in function intro. 1998-04-29 01:44:40 +00:00
Jason Molenda 59813131fd Tue Apr 28 17:41:20 1998 Philippe De Muyter <phdm@macqel.be>
* symfile.c (overlay_auto_command): Add forgotten parameter definitions.
        (overlay_manual_command, overlay_off_command): Likewise.
        (overlay_load_command): Likewise.
        * tracepoint.c (memrange_cmp): Parameters have type void *, not
        struct memrange *.
1998-04-29 00:42:28 +00:00
Jason Molenda 74d6ac44de Thu Apr 23 12:27:43 1998 Philippe De Muyter <phdm@macqel.be>
* symfile.c (simple_overlay_update_1): Do not prefix array address
        by `&'.
        * bcache.h (BCACHE_DATA_ALIGNMENT): Ditto.
        * tracepoint.c (encode_actions): Ditto.
        * language.c, complaints.c, utils.c (varargs.h): Do not include that
        file here, it is already included indirectly by defs.h.
        * dbxread.c (dbx_symfile_init, process_one_symbol): Cast xmalloc return
        value to the appropriate pointer type.
        * utils.c (floatformat_from_doublest): Ditto.
        * tracepoint.c (read_actions, _initialize_tracepoint): Ditto.
        (add_memrange): Likewise with xrealloc return value.
        * stabsread.c (ref_add): Ditto.
        * coffread.c (coff_symfile_init): Likewise for xmmalloc return value.
        * elfread.c (elf_symfile_read): Ditto.
        * os9kread.c (os9k_symfile_init): Ditto.
1998-04-23 19:31:51 +00:00
Keith Seitz 57a3982409 * tracepoint.c (trace_start_command): Set trace_running_p.
(trace_stop_command): Clear trace_running_p.
1998-03-29 23:20:18 +00:00
Elena Zannoni 411589588a Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: (gdb_trace_status) new function.
        (gdbtk_init) added command "gdb_is_tracing".
        (tracepoint_notify) added passcount information.

        * tracepoint.c (trace_status_command): Recognize a boolean return
        value from the stub to indicate whether trace experiment is
        running.  Export this value as a global state variable
        (trace_running_p) for use by the GUI. (from Michael Snyder)
        (trace_pass_command) added call to modify_tracepoint_hook.

        * tracepoint.h export trace_running_p
1998-03-27 03:36:27 +00:00
Jason Molenda 60c7c37625 Fri Mar 13 15:37:02 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* config/m68k/xm-sun3os4.h:  Remove malloc declarations, they
        are handled via autoconf now.
        * remote.c (remote_ops, extended_remote_ops):  Replace static
        forward declaration by moving the static definition to the top of
        the file, for old K&R compilers.
        * tracepoint.c (collect_symbol, trace_start_command):
        Replace ANSI string concatenation with K&R compatible simple string.
1998-03-13 23:43:05 +00:00
Keith Seitz a5f4fbff1d * tracepoint.c (tracepoint_operation): Call the modify_tracepoint_hook
if it exists.
        Remove static declaration of free_actions.

        * tracepoint.h: Add declaration of free_actions.

        * gdbtk.c (gdbtk_modify_tracepoint): Define new tracepoint modification
hook.
        (gdbtk_print_frame_info): Define this hook so that current_source_symtab
        is set properly.
        (gdb_actions_command): Use free_actions () from tracepoint.c/h.
1998-02-11 02:33:22 +00:00
Michael Snyder d9ba1c3faf Thu Feb 5 11:57:06 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (tracepoint_operation): call free_actions instead
        of free.  (free_actions): eliminate some memory leaks for actions.
        (validate_actionline): pass string arg by reference, so we can
        change the pointer.  Change all memrange collection arguments to
        canonical form (literal address and size), to enforce early
        evaluation.  Accept UNOP_MEMVAL (assembly variables) for
        trace collection.  (parse_and_eval_memrange): accept expressions
        for the address and size fields of a memrange (and evaluate
        them immediately).  (several places): use -1 instead of zero
        to distinguish an absolute memrange from a register-relative one.
        (encode_actions): add handling for UNOP_MEMVAL (assembly variable).
1998-02-05 20:13:58 +00:00
Michael Snyder 99fa2de001 Fri Jan 2 17:06:05 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (finish_tfind_command): improved algorithm for
        deciding when we've "stepped" into a new stack frame.
        (map_args_over_tracepoints): loop over tracepoint list "safely",
        since list elements may be deleted during loop.
        (read_actions): add actions to history list.
1998-01-02 17:09:12 +00:00
Michael Snyder 7a880bf32d Wed Dec 17 10:47:05 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (set_raw_tracepoint): initialize addr_string
        to NULL; (trace_actions_command): call readline_begin_hook only
        if from_tty is true.
1997-12-17 10:49:19 +00:00
Michael Snyder bf1aae13f0 Thu Dec 11 14:28:01 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (trace_find_command): don't error if going
        backwards thru the trace buffer in a loop.
        * (struct tracepoint): delete unused field.
1997-12-11 22:34:09 +00:00
Michael Snyder 5d187fd318 Mon Dec 8 14:28:49 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (memrange_sortmerge): allow for memranges
        that overlap.  (collect_pseudocommand etc.) cleanup decls.
1997-12-08 22:32:35 +00:00
Keith Seitz e59ddd6e88 * tracepoint.c: add declaration for x_command
* printcmd.c (x_command): remove static declaration
1997-12-03 20:45:12 +00:00
Michael Snyder c677110ca3 Wed Dec 3 12:00:42 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (finish_tfind_command): call do_display so that
        auto-displays are updated by tfind.  Also, keep track of frame
        and current-function so that tfind behaves like stepping (only
        show the stack frame if we step into a new function or return).
1997-12-03 20:03:46 +00:00
Michael Snyder 28ad0632ee Tue Dec 2 14:53:09 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c: make "tdump" command handle literal memranges.
1997-12-02 22:55:04 +00:00
Michael Snyder 728c7f37da Tue Dec 2 11:34:48 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c: use "lookup_cmd" to parse actions commands
        (thus allowing unambiguous prefixes and aliases).
1997-12-02 19:36:26 +00:00
Michael Snyder 2b146fa098 Tue Dec 2 10:14:15 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c: move prototype of validate_actionline(), and
        make it consistent with the function declaration.
1997-12-02 18:22:16 +00:00
Michael Snyder 8b9c29f5cb Mon Dec 1 17:13:53 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c: modify error behavior of the tfind commands.
	  Add some comments.
1997-12-02 01:14:40 +00:00
Keith Seitz 6c3908dba3 * gdbtk.c (gdb_loc): symtab_to_filename can return NULL
(breakpoint_notify): symtab_to_filename can return NULL
        (gdb_get_breakpoint_info): symtab_to_filename can return NULL

        * tracepoint.c (set_raw_tracepoint): fix typo
1997-11-26 23:50:45 +00:00
Keith Seitz 018d76dddb * tracepoint.c (set_raw_tracepoint): make sure there's a trailing slash on
the directory name

        * Merge (lots) with foundry-971118-build

        * Makefile.in (install-only): install the new gdbtk, not the old

        * top.h: add declaration of get_prompt

        * top.c (get_prompt): new function

        * gdbtk.c (gdbtk_call_command): also run idle hooks for class_trace
        commands
        (gdbtk_init): add new commands "gdb_get_locals", "gdb_get_args",
        "gdb_get_function", "gdb_get_line", "gdb_get_file",
        "gdb_tracepoint_exists", "gdb_get_tracepoint_info", "gdb_actions",
        and "gdb_prompt"
        (gdb_get_vars_command): new function
        (gdb_get_line_command): new function
        (gdb_get_file_command): new function
        (gdb_get_function_command): new function
        (gdb_get_tracepoint_info): new function
        (gdbtk_create_tracepoint): new function
        (gdbtk_delete_tracepoint): new function
        (tracepoint_notify): new function
        (tracepoint_exists): new function
        (gdb_actions_command): new function
        (gdb_tracepoint_exists_command): new function
        (gdb_prompt_command): new function

        * main.tcl: initialize gdbtk_state(readline)

        * console.tcl (invoke): get realine working
        (activate): add prompt argument for readline
        (setprompt): add prompt argument for readline

        * interface.tcl (gdbtk_tcl_readline): hack to get readline working

        * lots: Merge with foundry-971118-build

        * console.tcl (setprompt): get prompt from gdb

        * prefs.tcl (pref_set_defaults): add tracepoint defaults

        * interface.tcl (gdbtk_tcl_tracepoint): new function

        * src.tcl (constructor): set default behavior of left click, make
        a tracepoint dot, too
        (fill_files): "new" function: ripped out of "location"
        (location): use fill_files instead
        (do_bp): add support for tracepoints
        (bp_line): add support for tracepoints
        (set_tracepoint): new function
        (config_win): add "Set tracepoint here" to right-click menu

        * actiondlg.tcl: new file to help with tracepoint data collection actions

        * tracedlg.tcl: new file to help with tracepoints
1997-11-26 22:38:10 +00:00
Michael Snyder 6156728be0 A ton of my most recent changes, mostly to add post-mortem data analysis,
plus some better error checking and reporting.  Still not publically
visible (not mentioned in the makefile or changelog).
1997-11-24 20:02:28 +00:00
Michael Snyder 57c0b02655 Some early changes by Keith Seitz to support the Tcl/Tk GUI.
Note: these files are still not publically visible; just keeping
their history at this point.
1997-11-24 19:47:05 +00:00
Michael Snyder 6a02d20100 Create CVS files tracepoint.c and tracepoint.h. This is new work,
not yet ready for public release, so no changelog entry yet (and I'm
sanitizing the files out).  Just want to get them into the repository
for now, so I can begin keeping their history.  Not checking in the
Makefile change that would cause them to be built and linked.
1997-11-24 19:38:44 +00:00