Commit Graph

63 Commits

Author SHA1 Message Date
Keith Seitz 2c04e0d951 * gdbtk-hooks.c (gdbtk_exec_file_changed): New function which handles
exec_file changes.
        (gdbtk_add_hooks): Define exec_file_display_hook (to gdbtk_exec_file_changed)

        * gdbtk-cmds.c (gdb_stop): target_stop is ALWAYS defined, so
        compare against something a little more meaningful (target_ignore).
1998-10-02 19:55:41 +00:00
Keith Seitz 4ce8d0e977 * gdbtk.c (gdbtk_wait): Don't run the timer for ice targets.
* v850ice.c (WM_ADDR_TO_SYM): New message.
        (v850ice_wndproc): Add handler for WM_SOURCE.
        (v850ice_wait): Call the ui_loop_hook occasionally.
        (ice_cont): Acknowledge message before doing anything.
        (ice_stepi): Ack message and let gdbtk do stepping.
        (ice_nexti): Ack message and let gdbtk do stepping.
        (view_source): New function ICE calls to display source code.
1998-09-25 15:22:23 +00:00
Drew Moseley fa41e1a3fa Added sanitize-ide markers 1998-09-21 18:37:32 +00:00
Keith Seitz 864e89fc9d * gdbtk-cmds.c (get_frame_name): Demangle function names, too. 1998-09-18 23:45:45 +00:00
Jim Ingham d0757953c9 Thu Sep 10 22:10:29 1998 Jim Ingham <jingham@cygnus.com>
*gdbtk-cmds.c (gdb_disassemble): Make sure the symtab's linetable is not
	null before trying to use it...
1998-09-11 05:13:57 +00:00
Keith Seitz b2a9dbf70f * gdbtk-cmds.c (gdb_cmd): Do not run the timer when downloading --
the ui_progress_hook that has been installed will actually
        update the gui for us.
1998-09-02 19:01:13 +00:00
Tom Tromey d5adad6aa2 * top.c (context_hook): Define.
* gdbtk-hooks.c (context_hook): Don't define.
1998-08-31 22:43:21 +00:00
Keith Seitz 4af2d83a66 * gdbtk-cmds.c (gdb_listfuncs): When stripping out "global destructors"
and "global constructors", do not append any elements to the result.
 	(gdb_get_vars_command): Install patch from Jun 9 1998 which appears
        to have been lost.

        Clean up some tabbing mess.
1998-08-31 21:34:09 +00:00
Martin Hunt 4ff5d55a08 Sun Aug 30 00:49:18 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (Gdbtk_Init): Link C variable gdb_context
	with tcl variable gdb_context_id.

	* gdbtk-hooks.c (gdbtk_context_change): Implement new hook called
	context_hook.  Called when threads change.

	* gdbtk.c: Initialize gdb_context.

	* gdbtk.h: Declare gdb_context.

	* infrun (wait_for_inferior): Call context_hook.

	* thread.c (thread_command): Call context_hook.

	* defs.h: Declare context_hook.
1998-08-30 07:53:29 +00:00
Martin Hunt 973b0216f6 Fri Aug 28 12:14:49 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (gdb_loadfile): Open the file after doing
	the symtab lookup and calling symtab_to_filename(). This
	makes GDBtk work with the GDB "dir" command.
1998-08-28 19:18:38 +00:00
Keith Seitz 3d64f1e050 * gdbtk-hooks.c (gdbtk_add_hooks): Set selected_frame_level_changed_hook
.
        (gdbtk_selected_frame_changed): New function.

        * gdbtk-cmds.c (Gdbtk_Init): Add command gdb_stack into interpreter.
        Link gdb's global selected_frame_level with interpreter global
        gdb_selected_frame_level.
        (gdb_stack): New function to faciltate speedier backtraces from
        gdbtk.
        (get_frame_name): New helper function for gdb_stack.
1998-08-19 02:25:21 +00:00
Martin Hunt 1aecc7dccb Tue Aug 18 15:42:40 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (gdb_listfuncs): Strip out global constructors
	and destructors from the function list.
1998-08-18 22:43:18 +00:00
Drew Moseley c076f1ed1c Added Foundry SDK changes. 1998-08-13 20:24:45 +00:00
Drew Moseley 1dd251f99d Added a scope-level around the contents of an #ifdef in
gdbtk_cleanup() so that the variable declarations in there
would not be illegal in a C compilation.
1998-08-13 20:15:20 +00:00
Martin Hunt 6f5af15b07 Mon Jul 27 13:07:16 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_call_command): Removed because it is now
	in gdbtk-hooks.c
	(null_routine): Removed.

	* gdbtk-hooks.c (tracepoint_notify): Fix sprintf to
	match number of arguments.

	* gdbtk-cmds.c (gdb_loc): When calling gdb_loc with an
	argument, call find_pc_line() to get a complete
	symtab_and_line struct.
1998-07-27 20:23:58 +00:00
Keith Seitz 850e1491cc * gdbtk-cmds.c (gdb_search): Add missing NULL to switches.
Add missing flags to result_ptr.
        Pass along any errors caused by getting the list of files from
        tcl.
        Allocate correct amount of memory for the file list.
        Don't do any unecessary cleanups.
1998-07-24 22:02:39 +00:00
Martin Hunt 6e77819495 Fri Jul 24 01:08:37 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (gdb_loadfile): When there are no
	linenumbers, use only one tab.
1998-07-24 08:09:03 +00:00
Martin Hunt 4d14b2522a Sun Jul 19 02:11:45 1998 Martin M. Hunt <hunt@cygnus.com>
* symtab.c (decode_line_2): Instead of printing a prompt
	and calling command_line_input() without a prompt, just
	call it with the proper args.  This makes the GUI work too.

Sat Jul 18 12:28:39 1998  Martin M. Hunt  <hunt@cygnus.com>

	* gdbtk.c (gdbtk_cleanup): Add call to tcl function
	gdbtk_cleanup. We need this so the GUI gets to clean
	up no matter how GDB exits.
1998-07-19 09:33:34 +00:00
Jim Ingham f3b86a30f9 Wed Jul 1 13:10:58 1998 Jim Ingham <jingham@cygnus.com>
* Moved gdbtk_hooks.c & gdbtk_cmds.c to gdbtk-hooks.c &
	gdbtk-cmds.c to comply with the gdb conventions.  Changed the
	configure & makefile to reflect the change...
1998-07-01 20:17:31 +00:00
Jim Ingham ca4e7e143d Wed Jul 1 11:07:21 1998 Jim Ingham <jingham@cygnus.com>
* main.tcl (gdbtk_preloop): Call gdbtk_idle on spec.  If there was an
        error in loading an executible specified on the command line,
	then the pre_add_symbol hook would have called gdbtk_busy but
        the corresponding call to gdbtk_idle would not have occured.

        Also changed some catch calls so they didn't use
        "catch {set foo [real_command]}"
	    but rather the more efficient:
	"catch {real_command} foo"

	* register.tcl: more catch cleanups
	* src.tcl: more catch cleanups
	* stack.tcl: more catch cleanups
	* target.tcl: more catch cleanups
	* tdump.tcl: more catch cleanups
	* variables.tcl: more catch cleanups
	* watch.tcl: more catch cleanups

	* gdbtk.c (gdbtk_init): Fixed a bug in the startup code on Windows
	that caused gdbtk not to find the share directory unless
	GDBTK_LIBRARY was set.

	* gdbtk.c: removed all the commands and hooks from this file so
	now it contains only the startup code.
 	* gdbtk_cmds.c: New file - this contains all the Tcl commands that
	gdb defines.  All the old commands were moved here, the
	string-based commands were converted to object commands, and the
	object-based commands were all converted to uniformly use the
	call_wrapper.  A new function, Gdbtk_Init was added to centralize
	initializing the gdb package.  Also added gdbtk as a package
	into gdbtk_interp.
	* gdbtk_hooks.c: New file - All the hooks were moved here, and a new
	function, gdbtk_add_hooks was added to centralize adding all these
	hook functions.  gdbtk_fputs was also modified to handle the new
	result_ptr structure.  See the comments in gdbtk.h for more
	details.
	* gdbtk.h: New file - this contains all the defines and globals
	shared by gdbtk.c, gdbtk_cmds.c & gdbtk_hooks.c
	* Makefile.in, configure.in & configure: mutatis mutandi for the
	new files.
1998-07-01 19:29:14 +00:00
Keith Seitz 509b70ac80 * main.c (main): Don't include gdbtk test code if GDBTK is
not defined by configure.

        * configure.in: When enabling gdbtk, add "-DGDBTK" to ENABLE_CFLAGS.

        * configure: Regenerate.
1998-06-29 19:04:30 +00:00
Keith Seitz 7f6cb62ee6 * symtab.h (enum namespace): Add new namespaces FUNCTIONS_NAMESPACE,
TYPES_NAMESPACE, METHODS_NAMESPACE, and VARIABLES_NAMESPACE used by
        new search_symbols.
        Add prototype for search_symbols and free_search_symbols.

        * symtab.c (list_symbols): Rewrite to use new search_symbols.
        (file_matches): New helper function for search_symbols.
        (free_search_symbols): New function which frees data returned from
        search_symbols.
        (print_symbol_info): New helper function which prints info about a
        matched symbol to stdout. Extracted from old list_symbols.
        (print_msymbol_info): New helper function which prints info about
        a matched msymbol to stdout. Extracted from old list_symbols.
        (symtab_symbol_info): Extracted from old list_symbols.
        (variables_info): Use symtab_symbol_info.
        (functions_info): Use symtab_symbol_info.
        (types_info): Use symtab_symbol_info.
        (rbreak_command): Rewrite to use new search_symbols.

        * gdbtk.c: Change all references to static global "interp" to
        "gdbtk_interp" and export this global.
        (gdbtk_init): If gdbtk_source_filename is not NULL, source this file
        into the interpreter when it goes idle.
        Add new command "gdb_search".
        (gdb_search): New function which searches the symbol table.
        (gdbtk_test): New function called by main when the --tclcommand
        option is used.

        * main.c (main): Add a new option "--tclcommand" which is used
        by the testsuite to source a file into the interpreter when it
        goes idle.
1998-06-27 00:45:20 +00:00
release 9682b440c6 install tracing help files 1998-06-18 02:14:08 +00:00
Jim Ingham 0436459d40 Mon Jun 15 13:18:21 1998 Jim Ingham <jingham@cygnus.com>
* gdbtk.c (gdbtk_init): Add elements to the auto_path AS LIST
       ELEMENTS.  This allows gdbtk to work when installed in a directory
       which has a space in the path.  D. Moseley pointed out the bug.
1998-06-16 19:36:47 +00:00
Keith Seitz 649bc0554d * gdbtk.c (gdb_get_vars_command): Return static variables and
variables stored in registers.

        * main.c (main): Call pre/post_add_symbol_hook's when loading
        executables and symbol files.

	* symfile.c (symbol_file_add): revert previous change
1998-06-09 22:21:33 +00:00
Keith Seitz fadce6f696 * symfile.c (symbol_file_add): Always call the
pre/post_add_symbol_hooks.

	* gdbtk.c (gdb_get_vars_command): Return static variables and
	variables stored in registers.
1998-06-09 21:15:46 +00:00
Martin Hunt aa3b21bfdc Fri Jun 5 00:16:22 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_init): Change all references to
	GDBTK_IDE to IDE_ENABLED.
1998-06-05 07:13:27 +00:00
Martin Hunt 94a6f14fa4 Thu Jun 4 18:31:53 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_init): Initialize tkTable.
1998-06-05 01:29:10 +00:00
Elena Zannoni fed03c013d Thu Jun 4 10:15:03 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: merged:

	- Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
        (call_obj_wrapper): in case of error, copy the
        error message from the result to the error_string.
        (gdbtk_fputs): add comments.
        (gdb_actions_command): call validate_actionline when installing the
        tracepoint, to do the syntax checking of the actions for us.
        - Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
        (gdb_get_trace_frame_num): new function to get the
        trace frame number from gdb.
        (gdbtk_init): added new command gdb_get_trace_frame_num.
        - Jim Blandy  <jimb@zwingli.cygnus.com>
        (struct wrapped_call_objs): Change the `func' member to
        be a Tcl_ObjCmdProc, not an Tcl_CmdProc, since it accepts a vector
        of objects as arguments.  Change the object vector to be const,
        since that's what all the users of this structure seem to expect.
        (call_obj_wrapper): Cast clientData properly before storing it in
        the wrapped_args structure.
1998-06-04 18:10:21 +00:00
Keith Seitz 4779296003 * main.c (main): Check for NULL from getenv on CYGWIN32.
* gdbtk.c (_initialize_gdbtk): Get rid of the console. Patch from
        Chris Faylor (cgf@cygnus.com).

        * configure.in: Link cygwin32 with subsystem console.

        * configure: Regenerated
1998-05-29 01:20:46 +00:00
Keith Seitz 21b3bc779c * ser-unix.c (wait_for): Do not reset timeout_remaining for cygwin32 so
that
        we can use this member to track real timeouts.
        (hardwire_readchar): Modify for cygwin32 so that we only ever use a real
        system timeout of one second. Track the "real" timeout as a series of th
ese
        one second timeouts.
        Call ui_loop_hook to keep the gui alive.

        * top.c: Define new hook for cygwin32, "ui_loop_hook".

        * gdbtk.c (gdbtk_init): Add ui_loop_hook for CygWin32 to work around
        update problems.
1998-05-24 21:05:12 +00:00
Elena Zannoni cb43207965 Thu May 21 13:56:24 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: reinserted the changes that were accidentally deleted:
        (_initialize_gdbtk): Use correct device names in
        cygwin-specific call (cosmetic change).
        (gdbtk_ignorable_warning): removed va_list parameter,
        which was unused.
        (_initialize_gdbtk): add cygwin32 specific code to
        allow `gdb -nw' to work when specified specified from a windows
        console-mode command line.

        * ChangeLog: moved Chris Faylor's comment to ChangeLog-gdbtk
1998-05-21 18:03:25 +00:00
Jim Ingham b33b741a76 Wed May 13 11:12:58 1998 James Ingham <jingham@leda.cygnus.com>
* gdbtk.c: Fixed a goof in the definition of the gdb_get_args &
	gdb_get_locals Tcl commands.  Moved the previous ChangeLog entry
	from ChangeLog to ChangeLog-gdbtk...
1998-05-13 18:23:59 +00:00
Jeff Holcomb cc1ad64568 Tue May 12 13:29:20 1998 Jeff Holcomb <jeffh@cygnus.com>
* Makefile.in (install-only): Add images/icons.txt and
	images2/icons.txt to files that need to be installed.
1998-05-12 20:53:08 +00:00
Christopher Faylor dfe9d3099d Tue May 5 09:30:25 1998 Christopher Faylor <cgf@cygnus.com>
* gdbtk.c (_initialize_gdbtk): Use correct device names in
	cygwin-specific calls (cosmetic change).
1998-05-05 13:33:37 +00:00
Elena Zannoni 5eb2b01c91 Wed Apr 29 15:53:16 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c (gdbtk_ignorable_warning): removed va_list parameter,
        which was unused.
1998-04-30 16:20:17 +00:00
Keith Seitz e4a3374fe0 * Makefile.in (install-only): Install help files. 1998-04-24 02:06:00 +00:00
Stan Shebs 3c59320fa9 End of another (shorter :-) ) era. Now only gdbtcl2 has a gdbtk interface. 1998-04-15 19:14:15 +00:00
Martin Hunt d2a3ee23fb Mon Apr 13 16:17:52 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdb_loadfile): Change fstat() call to stat().
	Needed because you can't convert a FILE* to an fd.
1998-04-13 23:18:21 +00:00
Elena Zannoni e6e9507d63 Mon Apr 13 16:28:07 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* utils.c: (warning) added call to warning_hook

        * source.c: (find_source_lines) modified to call warning in case
        of source vs. executable time stamp mismatch. Simplified object
        file check. Initialized mtime to 0.

        * defs.h: added warning_hook prototype

        * top.c: added warning_hook prototype.

        * gdbtk.c: (perror_with_name_wrapper) new function to call
        perror_with_name safely.
        (gdb_loadfile) added source vs. executable time stamp check.
        (gdbtk_warning) new function to pass a warning message to the gui.
        (gdbtk_ignorable_warning) new function to pass a warning
        to the gui. Used only for the src. vs. exec check.
        (gdbtk_init) added warning_hook
        added include <sys/stat.h>
1998-04-13 21:54:22 +00:00
Keith Seitz 7234efcb53 * gdbtk.c (gdbtk_start_timer): Include on all platforms. Decrease
timer interval a little.
        (gdbtk_stop_timer): Include on all platforms.
        (gdbtk_wait): No more signals! Use a timer on all platforms to keep the
        GUI alive.
        (gdbtk_init): Remove FIOASYNC and all x_fd references. Now using timers
        on all platforms.
1998-04-13 20:05:15 +00:00
Jason Molenda 6da4c15f22 Fri Apr 10 15:48:10 1998 Jason Molenda (crash@bugshack.cygnus.com)
* gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.


Harumph, my change got lost in the foundry->devo merge.
1998-04-10 22:49:13 +00:00
Martin Hunt 1a509d60c2 Thu Apr 9 14:20:59 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_init): Remove redundant variable "IDE".
1998-04-09 22:03:19 +00:00
Stan Shebs c3292c179f end of an era 1998-04-07 22:17:30 +00:00
Keith Seitz 4350602ff5 * gdbtk.c (gdb_cmd): NEVER call the busy, update, and idle hooks. 1998-04-07 20:05:02 +00:00
Keith Seitz 390ca26a02 * gdbtk.c (gdb_loadfile): Don't use the return result from sprintf, whi
ch
        returns a char * under SunOS4.
1998-03-31 23:42:51 +00:00
Ian Lance Taylor 8b5befef7f * configure.in: Add $(LIBIDETCL) as well as $(LIBIDE) if
--enable-ide.
	* Makefile.in (IDE_CFLAGS_X): Add -I for libidetcl/src.
	(LIBIDETCL): Define.
	* configure: Rebuild.
1998-03-31 22:19:53 +00:00
Keith Seitz c62a71b625 * gdbtk.c (gdb_get_tracepoint_info): Change formatting of address.
(tracepoint_exists): Remove code which confuses assembly traces.
1998-03-30 05:18:29 +00:00
Keith Seitz 0b7148e4f5 * gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks
should not be called.
1998-03-28 20:16:06 +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