Commit Graph

26 Commits

Author SHA1 Message Date
Stu Grossman
6131622e34 * annotate.c, breakpoint.c, defs.h, gdbtk.c, top.c: Replace
enable/disable_breakpoint_hook with modify_breakpoint_hook.
	* gdbtk.c:  General cleanups, get rid of unused variables.  Redo
	handling of stdout/stderr to just return output as the result of
	the tcl command that caused the output.  Cleanup -Wall stuff.
	* (breakpoint_notify):  Now returns just action and breakpoint
	number.
	* (gdb_get_breakpoint_list):  New routine.  Does the obvious.
	* (gdb_get_breakpoint_info):  Mostly derived from the old
	breakpoint_notify, but returns lots more info.
	* (dsprintf_append_element):  Helper routine, works like printf,
	but appends a tcl element onto the specified DString.  Good for
	building up lists as return values.
	* (gdbtk_enable/disable_breakpoint):  Go away.  Replaced with
	gdbtk_modify_breakpoint.
	* (*many routines*):  Use new result protocol.
	* (call_wrapper):  Make sure that recursive calls don't trash results.
	* gdbtk.tcl:  New windows, autocmd, and breakpoints.
	* (gdbtk_tcl_fputs):  Don't use $current_output_win redirection
	anymore.  It's not needed (in fact, this routine may not be needed
	anymore).
	* (gdbtk_tcl_breakpoint):  Change to reflect new breakpoint
	notification protocol.
	* (gdbtk_tcl_busy gdbtk_tcl_idle):  Straighten out buttons, remove
	catches.
	* (interactive_cmd):  Use this wrapper around button invocations
	of many commands.  This will catch errors and put the results into
	the command window.  It also updates all the other windows.
	* Also, change reliefs of most things to sunken.  This actually
	looks better.
	* (create_file_win):  Fix margin binding to allow breakpoints to
	work again.
	* (create_asm_win):  Use return value of gdb_disassemble instead
	of implicit I/O to the command window.
	* (create_command_window):  Use new result protocol to get output
	from commands.
1995-02-15 01:45:39 +00:00
Stu Grossman
78daa95e3a * gdbtk.tcl (create_file_win): Disable old popup menu for source
window.
1995-01-31 01:41:55 +00:00
Stu Grossman
b66051ec19 * gdbtk.c (gdbtk_init): Prevent segfault when gdbtk.tcl can't be
found.
	* gdbtk.tcl:  Initialize expr_update_list() to prevent errors when
	popping up expression window for the first time.
1995-01-26 02:27:06 +00:00
Stu Grossman
8e5bc49fe5 * gdbtk.tcl (create_registers_window): Work around a radiobutton
widget bug to make Options|Natural button work.
1995-01-25 00:36:33 +00:00
Stu Grossman
c81a3fa9b6 * gdbtk.c (gdb_disassemble): Fix problem with source+assembly and
g++ caused by out-of-order pc's.
	* gdbtk.tcl (files_command):  Remove duplicate file names.  Also,
	add scrollbar.
1995-01-24 21:49:11 +00:00
Stu Grossman
6bd7d9fad8 * gdbtk.tcl: Take .gdbtkinit if it exists. Makes gdbtk match the
doc!
1995-01-24 01:23:18 +00:00
Stu Grossman
4604b34cd3 * gdbtk.c gdbtk.tcl: Update/add copyright.
* gdbtk.tcl (build_framework):  Several fixes for filespec widget,
	including dismiss button, and better error handling.
	* (create_command_win):  Bind button 2 to retrieve selection.
1995-01-12 23:10:48 +00:00
Stu Grossman
280c564c76 * gdbtk.tcl: Add button to control mixed source disassembly.
* Use text widgets in expr window.  The give me more control over
	layout.
	* Add auto-updating of exprs in expression window.
	* Handle expressions out of scope a bit better.
	* Make selected window pop up to the top when invoked via the
	menubar.
	* Make copyright message have raised relief.
1995-01-12 02:10:05 +00:00
Stu Grossman
0972203902 * Makefile.in (install_only uninstall): Indent for clarity
* core.c (dis_asm_read_memory):  Add call to
	dis_asm_read_memory_hook to provide alternate way for disassembler
	to read memory.

	* defs.h:  Protect from multiple inclusion.  Add decl for
	dis_asm_read_memory_hook.

	* gdbtk.c (finish_saving_output):  Don't do anything if not saving
	output.
	* (breakpoint_notify):  Don't send null filename to tcl.
	* (gdb_eval):  New tcl command to eval an expression.
	* (gdb_disassemble):  New tcl command to do disassembly.  This
	allows tcl code to choose between exec file and target memeory,
	and can also do mixed source and assembly.
	* (gdbtk_init):  Move reading of gdbtk.tcl to the end to make sure
	that more of the environment is set up.  Also, create link between
	gdb and tcl vars disassemble{-_}from{-_}exec.

	* gdbtk.tcl:  New expression window support.
	* Make assembly window be 80 columns wide.
	* Use new disassembly method.  Add menu items to select
	disassembly from exec file or target.
	* Change View menubar item to Options.

	* Get rid of Stack, Breakpoints, Signals, and Variables Windows,
	since they don't exist yet.

	* Pop up a copyright window on startup.

	* top.c:  Make window startup be the default.
	* Add dis_asm_read_memory_hook.
1995-01-06 01:55:45 +00:00
Stan Shebs
c4a5c37cfc * gdbtk.tcl (build_framework): Add standard commands menu, more
windows to standard windows menu.
	(not_implemented_yet): Clarify message.
1995-01-05 03:58:18 +00:00
Stan Shebs
e12533e3e9 * gdbtk.tcl (FSBox): New proc, File Selection Box code from exmh.
(not_implemented_yet): New proc.
	(build_framework): Add various file commands to file menu.
1994-12-31 00:00:53 +00:00
Stu Grossman
0af608b8a1 * gdbtk.tcl (update_assembly): Force update to make sure that pc
is visible when creating new assembly windows.
1994-12-19 17:58:11 +00:00
Stu Grossman
546b8ca760 * gdbtk.c (gdbtk_wait gdbtk_init): Use different method of
enabling I/O interrupts for SVR4 (streams).
	* (start_saving_output save_output get_saved_output
	finish_saving_output flush_holdbuf gdbtk_flush gdbtk_fputs
	gdbtk_init):
	Totally revamp to use TCLs dynamic string functions.  Also, quote
	all data passed back to TCL to prevent errors with unmatched
	braces, odd characters, etc...  This fixes several wierd problems
	with outputting strings containing unmatched braces.
	* (breakpoint_notify gdb_loc):  Use long hex format to output
	addresses of breakpoints and PCs.  This fixes some Alpha problems.
	* (breakpoint_notify):  Add stream arg to call to gdbtk_fputs.
	* (gdb_listfiles):  Also, go through the symtabs when looking for
	files.  This makes xcoff work (sort of), but probably breaks
	something else.
	* (gdb_stop):  Return TCL_OK instead of nothing.  This fixes odd
	TCL errors when hitting stop button.
	* (tk_command):  Don't pass interp->result on to Tcl_{Var}Eval, as
	that will trash the result.  strdup the result instead and pass
	that on.  Improve error handling as well.

	* gdbtk.tcl (gdbtk_tcl_flush):  Use global def of
	current_output_win.  Makes flushing actually work!
	* (asm_win_name create_asm_win update_assembly):  Bunch of fixes
	to make assembly windows stop flashing when loading a new file.
	* (gdbtk_tcl_busy gdbtk_tcl_idle):  Use catch to prevent gdb_cmd
	errors from losing control.
	* (create_source_window):  Add source file selection to View menu.
	* (create_command_window (<Key-Return> binding):  Quote text fed
	into gdb_cmd to prevent eval errors.
1994-12-19 08:01:45 +00:00
Stu Grossman
86db943ceb * defs.h, gdbtk.c (gdbtk_fputs), main.c (gdb_fputs), top.c: Add stream arg
to fputs_unfiltered_hook.  Differentiate stdout from stderr when
	passing text into tcl land.
	* defs.h, top.c, utils.c (error):  Add error_hook.
	* gdbtk.c:  Improve mechanism for capturing output values.
	* (full_filename):  Remove.
	* (gdb_cmd call_wrapper gdbtk_init):  Protect all calls from tcl
	land with call_wrapper.  This prevents longjmps (usually via
	error()) from jumping out of tcl/tk and leaving things in an
	indeterminate state.
	* gdbtk.tcl:  New view option to disable line numbers.  Put catch
	around most uses of gdb_cmd.  Add update button to reg config
	window.  Stop doing immediate updates when selecting registers.
	Change register view values into checkbuttons.
1994-12-16 01:07:35 +00:00
Stu Grossman
cb3313c147 * gdbtk.tcl (reg_config_menu create_registers_window
recompute_reg_display_list):  Use array instead of individual vars
	for register display list.
	* (recompute_reg_display_list update_registers):  Fix bug with not
	displaying all registers.
1994-12-13 01:04:38 +00:00
Stu Grossman
746d1df4a9 * gdbtk.c: New tcl commands: gdb_fetch_registers,
gdb_changed_register_list, and gdb_regnames.
	* gdbtk.tcl:  Use monochrome color model for now.
	* (delete_breakpoint_tag create_file_win):  Add breakdot support.
	* (create_file_win create_asm_win update_listing build_framework
	create_source_window create_command_window):  Re-org window
	creation to give all windows consistent look and feel.
	* (update_listing update_asm):  Change pc pointer to '->'.
	* (registers_command reg_config_menu create_registers_window
	populate_reg_window update_registers):  Revamp register window.
	Allow selection of registers to be displayed.  Highlight changed
	registers.
1994-12-12 20:50:08 +00:00
Stu Grossman
04576ab6cc * gdbtk.tcl (build_framework): Fix bug with setting window titles. 1994-11-28 18:20:21 +00:00
Stu Grossman
c981300c38 * gdbtk.tcl (build_framework): Add "Report bug" to help menu. 1994-11-28 18:01:31 +00:00
Stu Grossman
006e71e956 * gdbtk.tcl: Re-arrange windows using new, consistent layout. Clean
up lots of code and centralize framework initialization.
1994-11-28 17:23:13 +00:00
Stu Grossman
cd2df226a7 * Makefile.in: Use $(objdir)/tcl and $(objdir)/tk if they are
available.
	* configure.in (ENABLE_CLIBS):  Use $(TCL) and $(TK) instead of
	-ltcl and -ltk.
	* gdbtk.c:  Get rid of lots of unnecessary #includes.
	* (gdbtk_init):  Use ConnectionNumber macro instead of referencing
	Display structure directly.
	* gdbtk.tcl:  Change exit button to quit button (makes shebs
	happy).
1994-11-02 00:50:12 +00:00
Stu Grossman
479f0f18d4 * defs.h, infrun.c (wait_for_inferior), top.c: Call
target_wait_hook to allow GUI to handle blocking for inferior.  Call
	call_command_hook in execute_command to provide means for wrapping
	commands with GUI state change updates.
	* gdbtk.c (gdb_cmd):  Force GUI into idle mode when errors occur.
	* (gdb_stop):  New tcl command to stop the target process.
	* (x_event, gdbtk_wait):  Allow GUI to interrupt gdb out of target
	waits.
	* (gdbtk_call_command):  Wrapper around command processing to
	alert GUI of target state changes.
	* (gdbtk_init):  Get the fd of X server for doing async
	notification of X events (via x_event).  Setup new hooks.
	* gdbtk.tcl:  Add scrollbars to assembly and command windows.
	* Change window foreground & background colors.
	* Create margin tag for breakpoints in source and assembly windows.
	* Add new routines to be invoked when target state changes to/from
	idle.
	* Add start of expression window.
	* Change bindings of mouse button 1 in assembly and source window
	to just set or clear breakpoints when in the margin tag.
	* Change shape of register window to be more vertical to better
	reflect it's contents.
	* Add stop button.
	* Cleanup some code around command window bindings.

	* infrun.c (wait_for_inferior):  Make sure
	through_sigtramp_breakpoint is non-null before deleting.
1994-10-21 00:59:20 +00:00
Stu Grossman
a5cffdc44a * gdbtk.tcl: Let ^U delete lines in the command window. 1994-09-18 00:07:56 +00:00
Stu Grossman
637b166117 * defs.h (QUIT): Call interactive_hook to allow GUI to interrupt.
Also, add decl for symtab_to_filename.
	* gdbtk.c:  Replace calls to full_filename with symtab_to_filename.
	* gdbtk.tcl:  New routine pc_to_line replaces in line code.  New
	routine decr replaces in line code.
	* (create_file_win):  Use catch to handle open failures more
	elegantly.  Also, create special window to display file open
	failure message.  Move opening of file prior to creation of text
	widget.
	* (create_asm_win):  Add PC as argument.  We now base disassembly
	on PC instead of function name, since function names can be
	ambiguous (usually seen with shared libs).  Also, use catch to
	simplify code where we don't care about failures.
	* source.c (symtab_to_filename):  New.  Returns the file
	associated with a symtab.
	* top.c:  Define interactive_hook.  Called during QUIT to animate
	the GUI.
1994-09-16 22:57:37 +00:00
Stu Grossman
335129a977 * gdbtk.tcl: Add ref counts to breakpoint tags.
* Put quotes around function name in disassemble command to better
	handle assembler names containing `.'.
	* Make pclist element 0 be filler to avoid off-by-one problem with
	line numbers.
	* Set names of top-level windows.
	* Add register display window.
	* Add PC to label of assembly window.
1994-09-14 08:02:51 +00:00
Stu Grossman
8532893d17 * gdbtk.c (gdbtk_flush gdbtk_fputs): Buffer up output to make
disassembly more efficient.
	* (breakpoint_notify):  Include pc in gdbtk_tcl_breakpoint
	callback.
	* (gdb_loc):  Include pc in return value.  Also, return function
	name if arg was specified.
	* (gdb_cmd_stub):  Call gdb_flush to drain internal GDB buffers
	after command completes.
	* (gdbtk_init):  Improve error handling.

	* gdbtk.tcl:  Add lots of comments.  Clean up code.
	* (gdbtk_tcl_fputs):  Make output window redirectable.
	* Add assembly window, and breapoint support.
	* Make button 1 in margin toggle breakpoints.
	* Use stippling to indicate breakpoint disabling.
1994-09-13 16:24:01 +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