public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Handle null inferiors in target::read_description
@ 2023-07-06 17:23 John Baldwin
  2023-07-06 17:23 ` [PATCH v2 1/4] *-fbsd-nat: Handle null inferior in read_description John Baldwin
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: John Baldwin @ 2023-07-06 17:23 UTC (permalink / raw)
  To: gdb-patches

Change since V1:

- Call the beneath target's read_description method instead of
  returning nullptr.

- ppc-linux-nat now calls the beneath method instead of calling
  ppc_linux_match_description with ppc_linux_no_features.
  ppc_linux_no_features has a wordsize of 0, so
  ppc_linux_match_description would have hit an assertion failure.

- mips-linux-nat is slightly smarter in that it only falls back to
  assuming no DSP if have_dsp < 0.  If have_dsp has previously been
  read and the result cached, then there's no ptrace call to avoid.

- Simplifications to the have_native_target helper function suggested
  by Simon.

John Baldwin (4):
  *-fbsd-nat: Handle null inferior in read_description.
  *-linux-nat: Handle null inferior in read_description.
  Add a have_native_target helper function for use with require.
  Test that native targets can read a tdesc without a process attached.

 gdb/aarch64-fbsd-nat.c                        |  3 +++
 gdb/aarch64-linux-nat.c                       |  3 +++
 gdb/amd64-fbsd-nat.c                          |  3 +++
 gdb/arm-fbsd-nat.c                            |  3 +++
 gdb/arm-linux-nat.c                           |  3 +++
 gdb/i386-fbsd-nat.c                           |  3 +++
 gdb/mips-linux-nat.c                          |  4 +++
 gdb/ppc-linux-nat.c                           |  3 +++
 gdb/riscv-linux-nat.c                         |  3 +++
 gdb/s390-linux-nat.c                          |  3 +++
 .../gdb.base/auto-connect-native-target.exp   | 18 +------------
 .../gdb.base/native-target-noproc-tdesc.exp   | 27 +++++++++++++++++++
 gdb/testsuite/lib/gdb.exp                     | 14 ++++++++++
 gdb/x86-linux-nat.c                           |  3 +++
 14 files changed, 76 insertions(+), 17 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/native-target-noproc-tdesc.exp

-- 
2.40.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-07 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06 17:23 [PATCH v2 0/4] Handle null inferiors in target::read_description John Baldwin
2023-07-06 17:23 ` [PATCH v2 1/4] *-fbsd-nat: Handle null inferior in read_description John Baldwin
2023-07-06 17:23 ` [PATCH v2 2/4] *-linux-nat: " John Baldwin
2023-07-06 17:23 ` [PATCH v2 3/4] Add a have_native_target helper function for use with require John Baldwin
2023-07-06 17:23 ` [PATCH v2 4/4] Test that native targets can read a tdesc without a process attached John Baldwin
2023-07-07 16:15 ` [PATCH v2 0/4] Handle null inferiors in target::read_description Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).