- symtab dirname, blockvector and objfile must now be accessed via
symtab->compunit ().
- reggroup_next() has been replaced by gdbarch_reggroups() that returns
a vector.
- Constify reggroup pointers.
- reggroup_type() and reggroup_name() functions have been replaced by
reggroup::type() and reggroup::name() methods.
Patrick Monnerat [Sun, 12 Dec 2021 18:34:18 +0000 (19:34 +0100)]
Support debuginfo auto-download
This new gdb feature is made available in insight through the following
changes:
- A new gdb/debuginfod preference accessible on the preferences/global
dialog. The "ask" feature is not supported.
- A new runstop status "debuginfo" dispatching the stop button action to
cancel the debuginfo ownloading.
- A debuginfo download progress interface in the source window. If the
total download size is unknown, the meter moves back-and-forth to
give an idea of download "liveness".
- A new gdbtk_ui_out class subclassing cli_ui_out and implementing the
progress callbacks.
- A gdb event polling mask, as Tcl progress functions may recursively
monitor events. This mask is only effective on no-wait event polling.
Patrick Monnerat [Wed, 10 Nov 2021 14:05:35 +0000 (15:05 +0100)]
Better fix for initial source display
This properly fixes displaying 'main' upon insight startup and removes
the cygwin hack.
The reasons for the problem are:
- deprecated_file_changed_hook is not invoked anymore upon initial
executable file loading.
- Update events can be generated by gdb even if the target is not running.
Patrick Monnerat [Fri, 22 Oct 2021 16:51:03 +0000 (18:51 +0200)]
Workaround an auto_mkindex bug
Tcl auto_mkindex do indexes "public proc" declarations within classes.
As this command processes source files in alphabetic order, xxx.ith
comes after xxx.ith, resulting in a loss of the correct proc index by
overwriting the latter.
This tcl bug prevents rebuilding tclIndex properly.
As a workaround, declare such procedures inside a public block: they
wont be indexed.
Patrick Monnerat [Fri, 22 Oct 2021 11:04:13 +0000 (13:04 +0200)]
set_execution status: avoid translating a non-existent address
In some cases due to event handling order randomness, set_execution_status
may be called when target_has_execution() returns true although the target
thread has already terminated. When this occurs, the program counter is
unknown. Avoid translating it.
Patrick Monnerat [Fri, 22 Oct 2021 00:32:48 +0000 (02:32 +0200)]
Upgrade submodule, sync patch and code.
Some class member fields' type has changed from "char *" to
"gdb::unique_xmalloc_ptr<char>" in struct breakpoint and struct
watchpoint. Use get() method on them for referencing data.
Patrick Monnerat [Fri, 22 Oct 2021 00:00:35 +0000 (02:00 +0200)]
Rework itcl autoloading
Around version 4.0, Itcl stopped autoloading class methods. It however
still autoloads class constructors, providing they are implemented as
methods.
A solution would then consist in systematically declare constructors as
methods and implement them in the same file as all the other class
methods: as the constructor is always the first used class method, all
others will be already loaded when used.
This cannot be applied if a class constructor has an initialization
part: in that case, explicitly load the implementation file at the end
of the file declaring the class.
Patrick Monnerat [Tue, 19 Oct 2021 16:34:55 +0000 (18:34 +0200)]
Fix startup source window display on cygwin.
Cygwin provides a file name for the target program startup code (crt0.c),
letting to chance to display main function by default before starting the
debugging.
As a dirty hack, consider file basename set to "crt0" as if it was unset.
Function get_prompt in gdb now returns an std::string: use c_str() on
it.
Variable source_path of gdb is not a character pointer anymore, but an
std::string, so it is not possible to access it directly from a Tcl
variable. Tcl variable has thus been replaced with a getter function with
the same name.
Patrick Monnerat [Thu, 29 Jul 2021 18:00:59 +0000 (20:00 +0200)]
Upgrade submodule, sync code.
Functions get_inferior_args() and set_inferior_args(const char *) in gdb
have been replaced by inferior methods args and set_args(std::string).
Command callback function const_cfunc has been renamed into simple_func.
Command func signature has changed.
* gdbtk/generic/gdbtk-cmds.c (gdb_get_inferior_args): Use inferior
method args().
(gdb_set_inferior_args): Use inferior method set_args().
* gdbtk/generic/gdbtk-interp.c (gdbtk_do_const_cfunc): Renamed
gdbtk_do_simple_func().
Change function signature.
Calls new callback name (simple_func).
(gdbtk_interp::init): Use new names.
Patrick Monnerat [Sat, 10 Apr 2021 00:09:26 +0000 (02:09 +0200)]
Fix stop button response
Two fixes are needed:
- The merge of gdb and Tcl event loops via a notifier blocked the
handling of Tcl events while waiting for the running target to stop.
- Updates to gdb introduced the need to disable commit_resumed state
for the target while stopping it.
* gdbtk/generic/gdbtk-cmds.c (gdb_stop): temporary disable
commit_resumed while stopping target.
* gdbtk/generic/gdbtk-hooks.c (gdbtk_call_command): allow reentering
Tcl for event processing.
* gdbtk/generic/gdbtk.[ch] (gdbtk_reenter_tcl): new procedure.
Patrick Monnerat [Fri, 26 Mar 2021 07:57:35 +0000 (08:57 +0100)]
Upgrade submodule, sync patches and code.
Function current_top_target() is gone.
Rename static function fromhex() to hexdigit(), avoiding name clash.
* gdbtk/generic/gdbtk-cmds.c (gdb_entry_point): use current_inferior.
(gdb_update_mem): likewise.
(fromhex): renamed to hexdigit.
(hex2bin): use hexdigit.
* gdbtk/generic/gdbtk.c (gdbtk_start_timer): use current_inferior.