Patrick Monnerat [Thu, 16 Apr 2020 18:32:10 +0000 (20:32 +0200)]
Upgrade submodule, sync patches and code.
Some gdb files have been removed/renamed/split. Insight is then updated to
include them from their new location.
* gdbtk/generic/gdbtk-hooks.c: include event-loop.h from gdbsupport.
* gdbtk/generic/gdbtk-interp.c: include event-loop.h from gdbsupport.
* gdbtk/generic/gdbtk.c: include event-loop.h and gdb_select.h from gdbsupport.
Include new file async-event.h.
Patrick Monnerat [Thu, 19 Mar 2020 14:37:59 +0000 (15:37 +0100)]
Allow 64-bit Debian to build a release tarball
New binutils-gdb patch "debian-tcltk-config" adds unconditional probing of
tclConfig.sh and tkConfig.sh in /usr/lib, even if /usr/lib32 and
/usr/lib64 exist.
Patrick Monnerat [Wed, 27 Nov 2019 13:10:26 +0000 (14:10 +0100)]
Upgrade submodule, sync patches and code.
SYMBOL_*_NAME and MSYMBOL_*_NAME macros in gdb have been replaced by
methods.
* gdbtk/generic/gdbtk-cmds.c (gdb_search): Use name methods.
(gdb_listfuncs): Likewise.
* gdbtk/generic/gdbtk-stack.c (gdb_block_vars): Use name methods.
(gdb_get_vars_command): Likewise.
* gdbtk/generic/gdbtk.h (GDBTK_SYMBOL_SOURCE_NAME): Use name methods.
(GDBTK_MSYMBOL_SOURCE_NAME): Likewise.
Patrick Monnerat [Wed, 16 Oct 2019 13:53:10 +0000 (15:53 +0200)]
Upgrade submodule, sync patches and code.
gdb's breakpoint_chain variable has disappeared. To walk all breakpoints,
function iterate_over_breakpoint must now be used by a lambda function as
argument.
Currently, gdb/main.c has to declare these two variables in the
.c file. This patch adds the declarations to the header so that
gdb can just use them.
gdbtk/ChangeLog:
2019-10-07 Christian Biesinger <cbiesinger@chromium.org>
* generic/gdbtk.h (gdbtk_test): Declare.
(external_editor_command): Declare.
(file): Prefix Tcl_Interp with "struct"
so that this compiles when Tcl headers aren't included.
* generic/gdbtk-interp.h: Likewise.
Access to the source line information has been moved from struct symtab
to source cache. Adapt code to this new situation.
* gdbtk/generic/gdbtk-cmds.c (gdbtk_load_source): Get line offsets from
source cache. Use normal open_source_file() since there are no offsets
loading anymore at this stage.
Patrick Monnerat [Fri, 12 Jul 2019 09:52:32 +0000 (11:52 +0200)]
Upgrade submodule, sync patches and code.
* gdbtk/generic/gdbtk-bp.c (get_point_list): first arg is now a bool function.
* gdbtk/generic/gdbtk-cmds.c: change resolution of STRINGIFY macro conflict.
* gdbtk/generic/gdbtk-hooks.c: likewise.
* gdbtk/generic/gdbtk.c: likewise.
gdb/common has been renamed: include version.h from gdb/gdbsupport.
Patrick Monnerat [Sun, 16 Jun 2019 04:01:43 +0000 (06:01 +0200)]
Upgrade submodule, sync patches and code.
* configure.ac: binutils-gdb/gdb/gnulib has moved up one level, so regenerate
at its new location.
* gdbtk/generic/gdbtk-cmds.c (gdbtk_load_source): find_source_lines() is not
exported anymore, but open_source_file_with_line_charpos() does it for you:
use the later instead of open_source_file().
Patrick Monnerat [Thu, 11 Apr 2019 15:34:08 +0000 (17:34 +0200)]
Upgrade submodule, sync patch and code.
The internal gdb exception TRY/CATCH support has been replaced by
C++ exceptions: adapt the code to this new situation.
* gdbtk/generic/gdbtk-bp.c (gdb_set_bp): use try/catch.
* gdbtk/generic/gdbtk-cmds.c (gdbtk_call_wrapper): use try/catch.
(gdbtk_load_asm): use try/catch/throw.
(gdb_loadfile): use try/catch.
* gdbtk/generic/gdbtk-varobj.c (variable_value): use try/catch.
(variable_print): use try/catch.
* gdbtk/generic/gdbtk-wrapper.c (GDBTK_CATCH_ERRORS): use try/catch.
* gdbtk/generic/gdbtk.c (gdbtk_source_start_file): use throw_error().
Function make_cleanup() has been removed: do not use it anymore. Instead,
use try/catch blocks and object destructors.
Move the global tcl interpreter pointer into the gdbtk_interp class. New
function gdbtk_get_interp() returns the current gdb interpreter, throwing
an exception if it is not a gdbtk_interp.
New header file gdbtk_interp.h holds the specific gdb interpreter's definitions.
* gdbtk/generic/gdbtk-bp.c (breakpoint_notify): get tcl interpreter from
gdbtk interpreter object.
* gdbtk/generic/gdbtk-cmds.c (Gdbtk_Init): use tcl interpreter parameter.
(gdbtk_load_asm): restore result pointer using a try/catch block.
* gdbtk/generic/gdbtk-hooks.c (gdbtk_two_elem_cmd, gdbtk_file::read,
gdbtk_getpid, report_error, gdbtk_ignorable_warning, gdbtk_register_changed,
gdbtk_memory_changed, x_event, gdbtk_readline, gdbtk_readline_end,
gdbtk_call_command, gdbtk_param_changed, gdbtk_load_hash,
gdbtk_post_add_symbol, gdbtk_query, gdbtk_trace_find, gdbtk_trace_start_stop,
gdbtk_annotate_signal, gdbtk_attach, gdbtk_detach,
gdbtk_architecture_changed): get tcl interpreter from current gdbtk
interpreter.
* gdbtk/generic/gdbtk-interp.c: Move class and global definitions to new
header file.
(gdbtk_interp::gdbtk_interp): New constructor.
(gdbtk_interp::~gdbtk_interp): New destructor.
(gdbtk_interp::init): Call gdbtk_init() with parameter.
(gdbtk_interp::resume): Call gdbtk_source_start_file() with parameter.
(gdbtk_interp::pre_command_loop): Use tcl interpreter from object.
(gdbtk_get_interp): New function.
* gdbtk/generic/gdbtk-register.c (get_register_size, get_register_collectable,
get_register_types): get tcl interpreter from current gdbtk interpreter.
* gdbtk/generic/gdbtk.c (TclDebug, gdbtk_cleanup, tk_command, view_command):
Use tcl interpreter from current gdbtk interpreter.
(gdbtk_uninstall_notifier): not static anymore.
(cleanup_init): Deleted since the tcl interpreter is deleted in the
gdbtk interpreter destructor.
(gdbtk_init): store the tcl interpreter in the gdbtk interpreter. Drop
cleanup chain.
(gdbtk_source_start_file): use tcl interpreter from new parameter.
* gdbtk/generic/gdbtk.h (gdbtk_tcl_interp): Deleted.
(gdbtk_init, gdbtk_source_start_file): New parameter gdbtk_interp *.
(gdbtk_uninstall_notifier): extern.
* gdbtk/generic/gdbtk-interp.h: New header file.
Upgrade submodule, sync patches and create a new one.
Recent changes to gdb/Makefile break gdbtk compilation: the solution is
to keep gdbtk object files in their sources directory.
New patch gdbtk-obj-in-subdir implements this strategy.
Patrick Monnerat [Sat, 10 Nov 2018 01:34:52 +0000 (02:34 +0100)]
Upgrade submodule, sync code.
* gdbtk/generic/gdbtk-cmds.c (gdbtk_load_source): open_source_file now
returns a scoped_fd: get the file descriptor and release scoped_fd.
(symtab_to_filename): let scoped_fd be closed automatically.
Rename variables hiding others defined on another scope.
* gdbtk/generic/gdbtk-cmds.c (gdb_find_file_command): rename struct stat st to
sbuf.
* gdbtk/generic/gdbtk-varobj.c (variable_update): rename Tcl_Obj *var to v.
* gdbtk/generic/gdbtk.c: global gdbtk_source_filename is now an std::string.
(gdbtk_source_start_file): drop const char *s, rephrase concatenation in C++.
(gdbtk_test): xstrdup is not needed anymore.