Patrick Monnerat [Sun, 16 Aug 2015 16:47:06 +0000 (17:47 +0100)]
Implement a subclass for the tracepoint window.
This prevents the confusion between the breakpont and the tracepoint windows.
It allows to have both open at the same time.
* gdbtk/library/managedwin.itb (ManagedWin::_open): Do not match an object
with a class if it's not the top class.
* gdbtk/library/srcbar.itcl (create_view_menu): Direct the tracepoints menu
entry to open a Tpwin tracepoint window.
Remove redundant "-tracepoints 0" on the breakpoints menu entry.
(create_window_buttons): The Tracepoints button opens a TpWin, not a Bpwin.
* gdbtk/library/srctextwin.itb (SrcTextWin::do_key): Key "tracepoints" opens
a TpWin, not a BpWin.
* gdbtk/library/tpwin.itcl: New file. Defines the TpWin subclass of BpWin.
* gdbtk/library/tclIndex: Defines the TpWin related indexes.
Patrick Monnerat [Sun, 16 Aug 2015 13:08:20 +0000 (14:08 +0100)]
Avoid accessing non-existing event "disposition" on a tracepoint.
* gdbtk/library/bpwin.itb (BpWin::bp_add): Get disposition event only for
breakpoints. Fix a typo.
(BpWin::bp_modify): Get disposition event only for breakpoints.
Patrick Monnerat [Fri, 14 Aug 2015 18:30:25 +0000 (20:30 +0200)]
Make the "Set Tracepoint" dialog working.
This is achieved by accepting configure arguments in the Labelledframe
constructor and avoiding a null-pointer dereferencing when no action is
associated.
* gdbtk/generic/gdbtk-bp.c (gdb_actions_command): When no action is given,
parse commands from a zero-length string.
* libgui/library/lframe.tcl (constructor): Accept arguments and configure.
Patrick Monnerat [Fri, 14 Aug 2015 15:52:28 +0000 (17:52 +0200)]
Make trace find feature working again.
The trace frame find GUI feature was connected to the deprecated_trace_find_hook
that gdb still defines, but does not call anymore.
The same function is now achieved via a traceframe_changed observer.
* gdbtk/generic/gdbtk-hooks.c:
(gdbtk_trace_find): Change prototype to match the traceframe_changed observer.
Pass the new arguments to tcl/tk.
(gdbtk_add_hooks): Connect gdbtk_trace_find as an observer, not a hook.
* gdbtk/library/interface.tcl (gdbtk_tcl_trace_find_hook):
Use observer parameters.
* gdbtk/library/srcbar.itcl (handle_trace_find_hook): Use observer parameters.
* gdbtk/library/srctextwin.it[bh] (trace_find_hook): Use observer parameters.
Patrick Monnerat [Thu, 13 Aug 2015 13:04:59 +0000 (15:04 +0200)]
gdbtk: adapt to the new explicit locations API
* gdb/generic/gdbtk-bp.c: Include location.h.
(gdb_get_breakpoint_info): Use event_location_to_string instead of
`addr_string'.
(gdb_set_bp): Use string_to_event_location and pass this to
create_breakpoint instead of an address string.
(tracepoint_exists): Use string_to_event_location and pass this to
decode_line_1 instead of an address string.
* gdb/generic/gdbtk-cmds.c: Include location.h.
(gdb_get_line_command): Use string_to_event_location and pass this to
decode_line_1 instead of an address string.
(gdb_get_file_command): Likewise.
(gdb_get_function_command): Likewise.
* gdb/generic/gdbtk-stack.c: Include location.h.
(gdb_get_vars_command):Use string_to_event_location and pass this to
decode_line_1 instead of an address string.
Patrick Monnerat [Tue, 11 Aug 2015 14:30:54 +0000 (16:30 +0200)]
Tcl does not like defining an array item as a global variable.
Only the array name may be declared global.
* gdbtk/library/targetselection.itb (set_run): Comment out global declaration.
Patrick Monnerat [Tue, 11 Aug 2015 14:25:54 +0000 (16:25 +0200)]
Match allocator to destructor: bfd_openr --> gdb_bfd_openr.
This avoids a segmentation fault at cleanup time.
* gdbtk/generic/gdbtk-cmds.c (gdb_load_info): Use gdb_bfd_openr().
Upgrade submodule. Update gui code according to submodule change.
Replace (suppressed) deprecated_register_changed_hook by observer.
* generic/gdbtk-hooks.c (gdbtk_register_changed): Alter prototype for use as
an observer.
(gdbtk_add_hooks): Remove reference to deprecated_register_changed_hook. Use
observer_attach_register_changed() instead.
Upgrade submodule. Adapt sources according to submodule changes.
GDB suppressed the deprecated_selected_frame_level_changed_hook: the following
changes have been made to accomodate gdbtk to this new situation:
* gdbtk/generic/gdbtk-hooks.c (deprecated_selected_frame_level_changed_hook):
Remove assignment.
* gdbtk/generic/gdbtk-hooks.c (gdbtk_selected_frame_changed): No longer used.
Remove.
* gdbtk/generic/gdbtk-stack.c (gdb_selected_frame_level): New Tcl function.
* gdbtk/library/stackwin.itb (StackWin::update): replace use of
gdb_selected_frame_level global variable by a call to gdb_selected_frame_level.
Patrick Monnerat [Fri, 13 Mar 2015 16:58:47 +0000 (17:58 +0100)]
Make it compilable under MinGW.
Improve tcl/tk platform detection.
Apply a new patch to gnulib for MinGW compatibility.
Rebuild autotool files in gnulib.
Rework configure.ac for MinGW use.
Patrick Monnerat [Tue, 10 Mar 2015 19:13:57 +0000 (20:13 +0100)]
Make it compilable under Cygwin.
Cygwin version of tcl/tk is implemented as a "unix" version, so it has no
Windows API. This commit determines the tcl/tk installation platform at
configure time, and uses this result for conditional compilation instead of
_WIN32.