aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk.tcl
AgeCommit message (Collapse)AuthorFilesLines
1996-11-19 Fixes for Tcl 7.6 / Tk 4.2:Tom Tromey1-660/+1
* gdbtk.tcl (apply_filespec): Use tk_getOpenFile. Removed old fileselect code. * gdbtk.c (Tcl_Alloc): Renamed from Tcl_Malloc.
1996-09-27 * top.c (print_gdb_version): Rewrote to comply with new GNU codingFred Fish1-2/+2
standards for the --version option. (print_gnu_advertisement): Remove, now part of print_gdb_version. (show_version): Remove call to print_gnu_advertisement. * top.h (print_gnu_advertisement): Remove prototype. * main.c (print_gdb_help): Move help to static function and add prototype. (main): Call print_gdb_help rather than inlining it. (main): Remove call to print_gnu_advertisement. * gdbtk.tcl (create_copyright_window): Increase timeout from 15 seconds to 30 seconds.
1996-07-21 * gdbtk.tcl (files_command): Reorder the binding tags forFred Fish1-1/+6
the listbox widget to avoid referencing the listbox after the containing widget has been destroyed by the action of a previous binding.
1996-07-20 * gdbtk.tcl (delete_expr): Unset corresponding element ofFred Fish1-6/+15
expr_update_list when destroying an expression. (create_expr_window): Initialize expr_num, delete_expr_num, and expr_update_list here when each new expression window is created, rather than once at startup. PR 9383
1996-06-21 * gdbtk.tcl (populate_register_window): Make initial window oneFred Fish1-1/+1
line taller to account for new column header line.
1996-06-21 * gdbtk.tcl (create_register_windows): Include missing '$'s.Fred Fish1-7/+14
Add global declarations for various reg_format_* variables.
1996-06-21 * gdbtk.c (get_register): Support for printing raw formats.Fred Fish1-110/+250
* gdbtk.tcl: Add hint for using debug_interface. (center_window, add_breakpoint_frame, delete_breakpoint_frame): Enclose arg in braces for consistency. (create_registers_window, populate_reg_window, update_registers): Major rewrite to support displaying multiple formats in the register window. (init_reg_info): New function. (recompute_reg_display_list): Reset reg_display_list, start register display lines at line 2. PR 9457
1996-06-20 * gdbtk.tcl (gdbtk_tcl_readline_begin): Handle backspace toFred Fish1-0/+29
avoid backing up over prompt. At every input, make sure insert point is at least after command start, handle control-u to delete current input line. (tclsh): Handle backspace to avoid backing up over prompt. Handle control-u to delete current input line.
1996-05-20 * defs.h (read_command_lines, query_hook): Update prototypes.Fred Fish1-2/+82
(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-18 * gdbtk.tcl (create_command_window): Change a misspelled "get"Fred Fish1-5/+14
to the intended "cget". (delete_line): Fix so it deletes the current line at the insertion cursor.
1996-05-17 * gdbtk.tcl (gdb_prompt): Set this early on.Fred Fish1-2/+15
(create_command_window): Use gdb_prompt rather than "(gdb) ". (gdbtk_tcl_preloop): Proc executed just prior to Tk main loop. (tclsh): If an evaluation window already exists, just bring it to the front instead of trying to create another. * gdbtk.c (tk_command_loop): New function. (gdbtk_init): Call tk_command_loop rather than Tk_MainLoop.
1996-05-16 * gdbtk.tcl (evaluate_tcl_command, tclsh): New functions thatFred Fish1-0/+62
implement a tcl evaluation window for gdbtk maintainers to use.
1996-05-16 * gdbtk.tcl (files_command): Correctly insert list of files intoTom Tromey1-15/+2
listbox widget.
1996-05-16 * gdbtk.tcl (files_command): listbox command no longer acceptsTom Tromey1-1/+1
-geometry.
1996-05-16 * gdbtk.tcl (create_command_window): If command window's bufferStan Shebs1-3/+14
is disabled, don't execute any of the key bindings.
1996-05-03 * gdbtk.tcl (debug_interface): New global, use to aid debugging.Stan Shebs1-52/+65
(insert_breakpoint_tag, delete_breakpoint_tag): Fix range. (file_popup_menu): Delete, never used. (listing_window_popup): Rename from listing_window_button_1, remove breakpoint toggling code. (toggle_breakpoint): New procedure. (create_file_win): Bind popup menu to button 2, toggle breakpoints with button 1 in breakpoint area, add display of tagged areas if debugging on.
1996-04-05 * gdbtk.c (running_now): New global variable.Stan Shebs1-1/+6
(gdb_cmd): Test it before executing any command. (gdbtk_call_command): Set it when inferior is running. * gdbtk.tcl (gdbtk_tcl_busy, gdbtk_tcl_idle): Enable and disable interaction with command window's text appropriately.
1996-02-07 * gdbtk.tcl (create_file_win): Eliminate text widget B1 binding soTom Tromey1-9/+54
double-clicking will work again. (create_asm_win): Put "break" at end of all B1 bindings. (create_file_win): Lower "sel" tag, don't raise it. (ensure_line_visible): New proc. (update_listing, update_assembly): Use it. (create_copyright_window): Destroy window on Leave event. (create_command_window): Put "break" at end of all B2 bindings.
1996-01-24Look for -ldl or -ldld where needed by Tcl 7.5.Tom Tromey1-1/+1
Updated copyrights. Close backquote in 'lint' target.
1996-01-24Updated for Tcl 7.5a2 and Tk 4.1a2Tom Tromey1-558/+553
1995-08-20Wire up the breakpoint window so that it works. Also, fix a typo thatMichael Tiemann1-7/+27
kept the breakpoints in the source window from updating when enabled or disabled.
1995-08-02Update FSF address.Fred Fish1-1/+1
1995-06-20 * gdbtk.tcl (add_breakpoint_frame): Add more fields.Stu Grossman1-8/+124
* (create_file_win create_asm_win build_framework): Create null bindings for meta keys to keep window from dropping down to insertion point when meta is pressed by itself. New bindings: Up/Down - Scroll up/down one line at a time Next/Prior - Scroll up/down one page at a time Home/End - Warp to current pc/end of file * (build_framework): Turn on breakpoint menu. * (create_command_window): Implement tab completion. Add binding for ^C to stop target.
1995-02-15 * annotate.c, breakpoint.c, defs.h, gdbtk.c, top.c: ReplaceStu Grossman1-121/+336
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-01-31 * gdbtk.tcl (create_file_win): Disable old popup menu for sourceStu Grossman1-1/+1
window.
1995-01-26 * gdbtk.c (gdbtk_init): Prevent segfault when gdbtk.tcl can't beStu Grossman1-0/+1
found. * gdbtk.tcl: Initialize expr_update_list() to prevent errors when popping up expression window for the first time.
1995-01-25 * gdbtk.tcl (create_registers_window): Work around a radiobuttonStu Grossman1-8/+8
widget bug to make Options|Natural button work.
1995-01-24 * gdbtk.c (gdb_disassemble): Fix problem with source+assembly andStu Grossman1-3/+27
g++ caused by out-of-order pc's. * gdbtk.tcl (files_command): Remove duplicate file names. Also, add scrollbar.
1995-01-24 * gdbtk.tcl: Take .gdbtkinit if it exists. Makes gdbtk match theStu Grossman1-0/+4
doc!
1995-01-12 * gdbtk.c gdbtk.tcl: Update/add copyright.Stu Grossman1-22/+47
* 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 * gdbtk.tcl: Add button to control mixed source disassembly.Stu Grossman1-46/+86
* 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-06 * Makefile.in (install_only uninstall): Indent for clarityStu Grossman1-27/+139
* 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-05 * gdbtk.tcl (build_framework): Add standard commands menu, moreStan Shebs1-13/+54
windows to standard windows menu. (not_implemented_yet): Clarify message.
1994-12-31 * gdbtk.tcl (FSBox): New proc, File Selection Box code from exmh.Stan Shebs1-3/+703
(not_implemented_yet): New proc. (build_framework): Add various file commands to file menu.
1994-12-19 * gdbtk.tcl (update_assembly): Force update to make sure that pcStu Grossman1-0/+1
is visible when creating new assembly windows.
1994-12-19 * gdbtk.c (gdbtk_wait gdbtk_init): Use different method ofStu Grossman1-44/+46
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-16 * defs.h, gdbtk.c (gdbtk_fputs), main.c (gdb_fputs), top.c: Add stream argStu Grossman1-101/+147
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-13 * gdbtk.tcl (reg_config_menu create_registers_windowStu Grossman1-12/+19
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-12 * gdbtk.c: New tcl commands: gdb_fetch_registers,Stu Grossman1-143/+367
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-11-28 * gdbtk.tcl (build_framework): Fix bug with setting window titles.Stu Grossman1-1/+1
1994-11-28 * gdbtk.tcl (build_framework): Add "Report bug" to help menu.Stu Grossman1-0/+2
1994-11-28 * gdbtk.tcl: Re-arrange windows using new, consistent layout. CleanStu Grossman1-151/+196
up lots of code and centralize framework initialization.
1994-11-02 * Makefile.in: Use $(objdir)/tcl and $(objdir)/tk if they areStu Grossman1-4/+4
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-10-21 * defs.h, infrun.c (wait_for_inferior), top.c: CallStu Grossman1-15/+141
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-09-18 * gdbtk.tcl: Let ^U delete lines in the command window.Stu Grossman1-0/+9
1994-09-16 * defs.h (QUIT): Call interactive_hook to allow GUI to interrupt.Stu Grossman1-31/+77
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-14 * gdbtk.tcl: Add ref counts to breakpoint tags.Stu Grossman1-23/+149
* 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-13 * gdbtk.c (gdbtk_flush gdbtk_fputs): Buffer up output to makeStu Grossman1-68/+792
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-07-28 * Makefile.in (INSTALLED_LIBS, CLIBS, DEPFILES): Add support forStu Grossman1-0/+399
--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.