binutils-gdb/gdb/python
Andrew Burgess 6bf5f25bb1 gdb/python: make the gdb.unwinder.Unwinder class more robust
This commit makes a few related changes to the gdb.unwinder.Unwinder
class attributes:

  1. The 'name' attribute is now a read-only attribute.  This prevents
  user code from changing the name after registering the unwinder.  It
  seems very unlikely that any user is actually trying to do this in
  the wild, so I'm not very worried that this will upset anyone,

  2. We now validate that the name is a string in the
  Unwinder.__init__ method, and throw an error if this is not the
  case.  Hopefully nobody was doing this in the wild.  This should
  make it easier to ensure the 'info unwinder' command shows sane
  output (how to display a non-string name for an unwinder?),

  3. The 'enabled' attribute is now implemented with a getter and
  setter.  In the setter we ensure that the new value is a boolean,
  but the real important change is that we call
  'gdb.invalidate_cached_frames()'.  This means that the backtrace
  will be updated if a user manually disables an unwinder (rather than
  calling the 'disable unwinder' command).  It is not unreasonable to
  think that a user might register multiple unwinders (relating to
  some project) and have one command that disables/enables all the
  related unwinders.  This command might operate by poking the enabled
  attribute of each unwinder object directly, after this commit, this
  would now work correctly.

There's tests for all the changes, and lots of documentation updates
that both cover the new changes, but also further improve (I think)
the general documentation for GDB's Unwinder API.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Reviewed-By: Tom Tromey <tom@tromey.com>
2023-03-30 10:25:46 +01:00
..
lib/gdb gdb/python: make the gdb.unwinder.Unwinder class more robust 2023-03-30 10:25:46 +01:00
py-all-events.def Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-arch.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-auto-load.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-block.c Remove ALL_BLOCK_SYMBOLS_WITH_NAME 2023-02-19 12:51:06 -07:00
py-bpevent.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-breakpoint.c gdb: fix mi breakpoint-deleted notifications for thread-specific b/p 2023-02-28 10:56:28 +00:00
py-cmd.c gdb, gdbserver, gdbsupport: fix whitespace issues 2023-03-09 16:32:00 -05:00
py-connection.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-continueevent.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-dap.c Simplify interp::exec / interp_exec - let exceptions propagate 2023-02-08 17:28:42 +00:00
py-disasm.c gdb/python: replace strlen call with std::string::size call 2023-03-03 09:56:21 +00:00
py-event-types.def Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-event.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-event.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-events.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-evtregistry.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-evts.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-exitedevent.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-finishbreakpoint.c gdb: fix mi breakpoint-deleted notifications for thread-specific b/p 2023-02-28 10:56:28 +00:00
py-frame.c Fix value chain use-after-free 2023-02-27 15:46:31 -07:00
py-framefilter.c Turn value_type into method 2023-02-13 15:21:06 -07:00
py-function.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-gdb-readline.c Python QUIT processing updates 2023-02-27 16:20:39 -07:00
py-inferior.c Turn remaining value_contents functions into methods 2023-02-13 15:22:16 -07:00
py-infevents.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-infthread.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-instruction.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-instruction.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-lazy-string.c Fix value chain use-after-free 2023-02-27 15:46:31 -07:00
py-linetable.c Constify linetables 2023-03-11 08:48:10 -07:00
py-membuf.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-micmd.c gdb, gdbserver, gdbsupport: fix whitespace issues 2023-03-09 16:32:00 -05:00
py-newobjfileevent.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-objfile.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-param.c GDB: Allow arbitrary keywords in integer set commands 2023-01-19 21:15:56 +00:00
py-prettyprint.c Fix value chain use-after-free 2023-02-27 15:46:31 -07:00
py-progspace.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-record-btrace.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-record-btrace.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-record-full.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-record-full.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-record.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-record.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-ref.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-registers.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-signalevent.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-stopevent.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-stopevent.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-symbol.c Python QUIT processing updates 2023-02-27 16:20:39 -07:00
py-symtab.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-threadevent.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-tui.c gdb/python: Fix --disable-tui build 2023-03-06 17:31:57 +01:00
py-type.c Fix value chain use-after-free 2023-02-27 15:46:31 -07:00
py-unwind.c Fix value chain use-after-free 2023-02-27 15:46:31 -07:00
py-utils.c Python QUIT processing updates 2023-02-27 16:20:39 -07:00
py-value.c Python QUIT processing updates 2023-02-27 16:20:39 -07:00
py-varobj.c Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00
py-xmethods.c Fix value chain use-after-free 2023-02-27 15:46:31 -07:00
python-config.py gdb/python-config: replace deprecated distutils.sysconfig 2022-09-01 04:51:33 -04:00
python-internal.h gdb: fix mi breakpoint-deleted notifications for thread-specific b/p 2023-02-28 10:56:28 +00:00
python.c gdb, gdbserver, gdbsupport: fix whitespace issues 2023-03-09 16:32:00 -05:00
python.h Update copyright year range in header of all files managed by GDB 2023-01-01 17:01:16 +04:00