From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 4/4] Test that native targets can read a tdesc without a process attached.
Date: Fri, 26 May 2023 10:57:42 -0700 [thread overview]
Message-ID: <20230526175742.66885-5-jhb@FreeBSD.org> (raw)
In-Reply-To: <20230526175742.66885-1-jhb@FreeBSD.org>
This ensures that 'unset tdesc filename' does not generate any output
on a "bare" native target inferior without an attached process.
---
.../gdb.base/native-target-noproc-tdesc.exp | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 gdb/testsuite/gdb.base/native-target-noproc-tdesc.exp
diff --git a/gdb/testsuite/gdb.base/native-target-noproc-tdesc.exp b/gdb/testsuite/gdb.base/native-target-noproc-tdesc.exp
new file mode 100644
index 00000000000..820d9941c71
--- /dev/null
+++ b/gdb/testsuite/gdb.base/native-target-noproc-tdesc.exp
@@ -0,0 +1,27 @@
+# Copyright 2023 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test "unset tdesc filename" without an attached process on native
+# targets.
+
+clean_restart
+
+require have_native_target
+
+# Manually attach the native target
+gdb_test "target native" "Done. Use the \"run\" command to start a process."
+
+# Load a default target description
+gdb_test_no_output "unset tdesc filename"
--
2.40.0
next prev parent reply other threads:[~2023-05-26 17:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 17:57 [PATCH 0/4] Handle null inferiors in target::read_description John Baldwin
2023-05-26 17:57 ` [PATCH 1/4] *-fbsd-nat: Handle null inferior in read_description John Baldwin
2023-07-06 16:18 ` Simon Marchi
2023-07-06 16:56 ` John Baldwin
2023-05-26 17:57 ` [PATCH 2/4] *-linux-nat: " John Baldwin
2023-06-12 8:56 ` Luis Machado
2023-06-12 17:43 ` John Baldwin
2023-05-26 17:57 ` [PATCH 3/4] Add a have_native_target helper function for use with require John Baldwin
2023-07-06 16:24 ` Simon Marchi
2023-07-06 17:18 ` John Baldwin
2023-05-26 17:57 ` John Baldwin [this message]
2023-06-09 16:55 ` [PING] [PATCH 0/4] Handle null inferiors in target::read_description John Baldwin
2023-06-30 14:22 ` John Baldwin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230526175742.66885-5-jhb@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).