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.
* 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.
* 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.
* 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.
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.
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.
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.
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.
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).
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.
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.
* 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.
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.
--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.