Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/7] gdb/testsuite: Remove gdb_can_simple_compile_nodebug
Date: Tue, 11 Aug 2026 02:45:53 +0100	[thread overview]
Message-ID: <20260811014558.3606251-3-pedro@palves.net> (raw)
In-Reply-To: <20260811014558.3606251-1-pedro@palves.net>

gdb_can_simple_compile_nodebug is a thin wrapper around
gdb_can_simple_compile that only differs in its default compile
options.  It has a single caller, is_64_target, and AFACT, there is no
reason for this caller to be special -- the sibling is_lp64_target,
and the other is_*_target probes, all call gdb_can_simple_compile
directly.

This commit thus removes the gdb_can_simple_compile_nodebug wrapper
and makes is_64_target call gdb_can_simple_compile directly.

This simplifies the following commits, which adjust/rename the
"nodebug" gdb_compile option.

Change-Id: I4725f45478e70a16f7e04bfb460aa623a921f18d
---
 gdb/testsuite/lib/gdb.exp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 6fb04869605..d34ac30f2f0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4147,7 +4147,7 @@ gdb_caching_proc is_lp64_target {} {
 # This cannot be decided simply from looking at the target string,
 # as it might depend on externally passed compiler options like -m64.
 gdb_caching_proc is_64_target {} {
-    return [gdb_can_simple_compile_nodebug is_64_target {
+    return [gdb_can_simple_compile is_64_target {
 	int function(void) { return 3; }
 	int dummy[sizeof (&function) == 8 ? 1 : -1];
     }]
@@ -6364,13 +6364,6 @@ proc gdb_can_simple_compile {name code {type object} {compile_flags ""} {default
     return $ret
 }
 
-# As gdb_can_simple_compile, but defaults to using nodebug instead of debug.
-proc gdb_can_simple_compile_nodebug {name code {type object} {compile_flags ""}
-				     {default_compile_flags "nodebug nowarning quiet"}} {
-    return [gdb_can_simple_compile $name $code $type $compile_flags \
-		$default_compile_flags]
-}
-
 # Some targets need to always link a special object in.  Save its path here.
 global gdb_saved_set_unbuffered_mode_obj
 set gdb_saved_set_unbuffered_mode_obj ""
-- 
2.54.0


  parent reply	other threads:[~2026-08-11  1:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  1:45 [PATCH 0/7] gdb_compile nodebug => symtab Pedro Alves
2026-08-11  1:45 ` [PATCH 1/7] gdb/testsuite: Don't build a program for cvexpr.exp's last tests Pedro Alves
2026-08-11  1:45 ` Pedro Alves [this message]
2026-08-11  1:45 ` [PATCH 3/7] gdb/testsuite: Let gdb_simple_compile take empty default flags Pedro Alves
2026-08-11  1:45 ` [PATCH 4/7] gdb/testsuite: Don't pass "nodebug" to object compilations Pedro Alves
2026-08-11  1:45 ` [PATCH 5/7] gdb/testsuite: Rename nodebug => symtab Pedro Alves
2026-08-11  1:45 ` [PATCH 6/7] gdb/testsuite: Pass "symtab" to testcases that rely on minsyms Pedro Alves
2026-08-12 21:41   ` Luis
2026-08-11  1:45 ` [PATCH 7/7] gdb/testsuite: Handle "symtab" option on windows-msvc Pedro Alves

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=20260811014558.3606251-3-pedro@palves.net \
    --to=pedro@palves.net \
    --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