public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: gdb-patches@sourceware.org
Cc: Tom de Vries <tdevries@suse.de>, Doug Evans <dje@google.com>,
	Dominique Quatravaux <dominique.quatravaux@epfl.ch>,
	Sam Warner <samuuel.r.warner@me.com>,
	Louis-He <1726110778@qq.com>,
	Simon Marchi <simon.marchi@polymtl.ca>
Subject: [[RFC][PATCH][PR gdb/24069]] gdb/testsuite/README: update default value of INTERNAL_GDBFLAGS
Date: Sat, 19 Feb 2022 16:24:42 -0500	[thread overview]
Message-ID: <20220219212442.18136-1-levraiphilippeblain@gmail.com> (raw)

The INTERNAL_GDBFLAGS runtest variable was updated in 55c3ad88013
([gdb/testsuite] Prevent pagination in GDB_INTERNALFLAGS, 2020-10-26) to
disable pagination, and in aae1c79a03a (PR python/12227..., 2010-12-07)
to point to the data directory, but its default value mentioned in the
testsuite's README was not kept up to date.

Update the README accordingly, and mention where the default value is
set, so that it's easier for futur new contributors to check if the
default mentioned in the README is still current.
---

Notes:
    I noticed that while testing the fix for PR 24069, since I wanted
    to use my '~/.gdbinit' with 'set startup-with-shell off' for all tests,
    and found out that setting INTERNAL_GDBFLAGS to only '-nw' made some things
    a little worse (as GDB was then missing '-data-directory').

 gdb/testsuite/README | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/README b/gdb/testsuite/README
index 7552774c78b..1ba50c43f73 100644
--- a/gdb/testsuite/README
+++ b/gdb/testsuite/README
@@ -168,11 +168,14 @@ INTERNAL_GDBFLAGS
 
 Command line options passed to all GDB invocations.
 
-The default is "-nw -nx".
+The default is set in lib/gdb.exp and is currently
+"-nw -nx -data-directory /path/to/build/directory/gdb/data-directory -iex 'set height 0' -iex 'set width 0'".
 
 `-nw' disables any of the windowed interfaces.
 `-nx' disables ~/.gdbinit, so that it doesn't interfere with
 the tests.
+`-data-directory` points the the data directory in the build directory
+`-iex 'set {height,width} 0'` disable pagination
 
 This is actually considered an internal variable, and you
 won't normally want to change it.  However, in some situations,
@@ -193,7 +196,10 @@ a .gdbinit.  For example:
 	HOME=`pwd` runtest \
 	  GDB=/usr/bin/gdb \
 	  GDBSERVER=/usr/bin/gdbserver \
-	  INTERNAL_GDBFLAGS=-nw
+	  INTERNAL_GDBFLAGS="-nw -iex 'set height 0' -iex 'set width 0'"
+
+Note that we do not need to specify '-data-directory' here
+as we are testing an installed GDB.
 
 GDB_PARALLEL
 

base-commit: 0acf434a23768449cbb4b3732355f3f2febecaee
prerequisite-patch-id: aa40f05c60f391581f8aff17335000a5240d00cb
prerequisite-patch-id: cfae52dea4b1af9a4c14ac4dbdcae3cda9c946db
-- 
2.29.2


             reply	other threads:[~2022-02-19 21:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-19 21:24 Philippe Blain [this message]
2022-02-19 21:37 ` Philippe Blain

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=20220219212442.18136-1-levraiphilippeblain@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --cc=1726110778@qq.com \
    --cc=dje@google.com \
    --cc=dominique.quatravaux@epfl.ch \
    --cc=gdb-patches@sourceware.org \
    --cc=samuuel.r.warner@me.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=tdevries@suse.de \
    /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).