binutils-gdb/gdb/python
Andrew Burgess 1925bba80e gdb/python: add gdb.InferiorThread.__repr__() method
Add a gdb.InferiorThread.__repr__() method.  Before this patch we
would see output like this:

  (gdb) pi
  >>> gdb.selected_thread()
  <gdb.InferiorThread object at 0x7f4dcc49b970>

After this patch, we now see:

  (gdb) pi
  >>> gdb.selected_thread()
  <gdb.InferiorThread id=1.2 target-id="Thread 0x7ffff7da1700 (LWP 458134)">

More verbose, but, I hope, more useful.

If the gdb.InferiorThread becomes invalid, then we will see:

  (gdb) pi
  >>> invalid_thread_variable
  <gdb.InferiorThread (invalid)>

Which is inline with how other invalid objects are displayed.

Approved-By: Tom Tromey <tom@tromey.com>
2024-01-12 11:21:26 +00:00
..
lib/gdb Avoid exception from attach in DAP 2023-12-22 09:57:49 -07:00
py-all-events.def gdb: add Python events for program space addition and removal 2023-10-02 17:06:40 +01:00
py-arch.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-auto-load.c gdb: add program_space parameters to some auto-load functions 2023-10-05 13:20:50 -04:00
py-block.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-bpevent.c Emit stop reason details in Python stop events 2023-12-11 10:51:32 -07:00
py-breakpoint.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-cmd.c gdb/python: display errors from command completion 2023-11-28 18:23:19 +00:00
py-connection.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-continueevent.c
py-dap.c [gdb/dap] Disable DAP for python <= 3.5 2023-08-02 23:14:58 +02:00
py-disasm.c gdb: Replace gdb::optional with std::optional 2023-11-21 11:52:35 +00:00
py-event-types.def gdb: add Python events for program space addition and removal 2023-10-02 17:06:40 +01:00
py-event.c
py-event.h gdb: add program_space parameter to emit_clear_objfiles_event 2023-10-05 13:20:50 -04:00
py-events.h
py-evtregistry.c
py-evts.c
py-exitedevent.c
py-finishbreakpoint.c Fix gdb.FinishBreakpoint when returning to an inlined function 2023-12-12 15:57:14 +01:00
py-frame.c gdb: change value_of_register and value_of_register_lazy to take the next frame 2023-12-14 16:04:49 +00:00
py-framefilter.c gdb: Replace gdb::optional with std::optional 2023-11-21 11:52:35 +00:00
py-function.c
py-gdb-readline.c gdb/python: avoid use of _PyOS_ReadlineTState 2023-12-13 10:46:44 +01:00
py-inferior.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-infevents.c
py-infthread.c gdb/python: add gdb.InferiorThread.__repr__() method 2024-01-12 11:21:26 +00:00
py-instruction.c
py-instruction.h
py-lazy-string.c Handle gdb.LazyString in DAP 2023-10-16 09:27:28 -06:00
py-linetable.c
py-membuf.c
py-mi.c Emit stop reason details in Python stop events 2023-12-11 10:51:32 -07:00
py-micmd.c gdb/python: generalize serialize_mi_result() 2023-10-10 11:22:56 +01:00
py-newobjfileevent.c gdb: add program_space parameter to emit_clear_objfiles_event 2023-10-05 13:20:50 -04:00
py-objfile.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-param.c [gdb/build] Fix enum param_types odr violation 2023-08-14 18:32:29 +02:00
py-prettyprint.c Introduce gdb.ValuePrinter 2023-09-26 09:29:14 -06:00
py-progspace.c gdb: implement missing debug handler hook for Python 2023-11-14 12:02:47 +00:00
py-record-btrace.c gdb: remove target_gdbarch 2023-10-10 10:44:35 -04:00
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c python, btrace: Fix some small formatting issues. 2023-05-31 09:27:17 +02:00
py-record.h
py-ref.h
py-registers.c
py-signalevent.c Emit stop reason details in Python stop events 2023-12-11 10:51:32 -07:00
py-stopevent.c Emit stop reason details in Python stop events 2023-12-11 10:51:32 -07:00
py-stopevent.h Emit stop reason details in Python stop events 2023-12-11 10:51:32 -07:00
py-symbol.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-symtab.c
py-threadevent.c gdb/Python: Added ThreadExitedEvent 2023-06-19 16:17:21 +02:00
py-tui.c Add keywords to TuiWindow.write 2023-12-30 12:21:44 -07:00
py-type.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-uiout.h Emit stop reason details in Python stop events 2023-12-11 10:51:32 -07:00
py-unwind.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-utils.c gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
py-value.c gdb/python: Add new gdb.Value.bytes attribute 2023-10-26 18:27:17 +01:00
py-varobj.c gdb: Use C++17's std::make_unique instead of gdb::make_unique 2023-11-21 11:52:35 +00:00
py-xmethods.c
python-config.py
python-internal.h gdb/python: hoist common invalid object repr code into py-utils.c 2024-01-12 11:21:25 +00:00
python.c gdb: move gdbpy_gil into python-internal.h 2023-12-13 10:46:39 +01:00
python.h