* [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB
@ 2020-06-17 15:56 Keith Seitz
2020-06-17 16:40 ` Tom Tromey
2020-06-17 18:37 ` Simon Marchi
0 siblings, 2 replies; 6+ messages in thread
From: Keith Seitz @ 2020-06-17 15:56 UTC (permalink / raw)
To: gdb-patches
gdb.debuginfod/fetch_src_and_symbols.exp attempts to ascertain
whether GDB was built with debuginfod support by executing
"$GDB --configuration".
That seems harmless enough. However, if GDB is not already installed
on the host, the command will fail:
$ ./gdb --config
Exception caught while booting Guile.
Error in function "open-file":
No such file or directory: "/usr/share/gdb/guile/gdb/boot.scm"
./gdb: warning: Could not complete Guile gdb module initialization from:
/usr/share/gdb/guile/gdb/boot.scm.
Limited Guile support is available.
Suggest passing --data-directory=/path/to/gdb/data-directory.
Python Exception <class 'ModuleNotFoundError'> No module named 'gdb':
./gdb: warning:
Could not load the Python gdb module from `/usr/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
This GDB was configured as follows:
configure --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu
[abbreviated output]
The problem here is, of course, that while running in the test suite,
we must pass INTERNAL_GDBFLAGS in order to pick up the --data-directory
option.
gdb/testsuite/ChangeLog
2020-06-17 Keith Seitz <keiths@redhat.com>
* gdb.deuginfod/fetch_src_and_symbols.exp: Pass INTERNAL_GDBFLAGS
when executing "gdb --configuration".
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
index 0bf18f2d12..fbab3b1f48 100644
--- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
+++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
@@ -30,7 +30,8 @@ if { [which curl] == 0 } {
}
# Skip testing if gdb was not configured with debuginfod
-if { [string first "with-debuginfod" [exec $GDB --configuration]] == -1 } {
+if { [string first "with-debuginfod" \
+ [eval exec $GDB $INTERNAL_GDBFLAGS --configuration]] == -1 } {
untested "gdb not configured with debuginfod"
return -1
}
--
2.25.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB
2020-06-17 15:56 [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB Keith Seitz
@ 2020-06-17 16:40 ` Tom Tromey
2020-06-17 17:45 ` Keith Seitz
2020-06-17 18:37 ` Simon Marchi
1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2020-06-17 16:40 UTC (permalink / raw)
To: Keith Seitz via Gdb-patches
>>>>> "Keith" == Keith Seitz via Gdb-patches <gdb-patches@sourceware.org> writes:
Keith> The problem here is, of course, that while running in the test suite,
Keith> we must pass INTERNAL_GDBFLAGS in order to pick up the --data-directory
Keith> option.
Keith> gdb/testsuite/ChangeLog
Keith> 2020-06-17 Keith Seitz <keiths@redhat.com>
Keith> * gdb.deuginfod/fetch_src_and_symbols.exp: Pass INTERNAL_GDBFLAGS
Keith> when executing "gdb --configuration".
Looks reasonable to me. Thanks.
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB
2020-06-17 16:40 ` Tom Tromey
@ 2020-06-17 17:45 ` Keith Seitz
0 siblings, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2020-06-17 17:45 UTC (permalink / raw)
To: Keith Seitz via Gdb-patches
On 6/17/20 9:40 AM, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Keith> The problem here is, of course, that while running in the test suite,
> Keith> we must pass INTERNAL_GDBFLAGS in order to pick up the --data-directory
> Keith> option.
>
> Keith> gdb/testsuite/ChangeLog
> Keith> 2020-06-17 Keith Seitz <keiths@redhat.com>
>
> Keith> * gdb.deuginfod/fetch_src_and_symbols.exp: Pass INTERNAL_GDBFLAGS
> Keith> when executing "gdb --configuration".
>
> Looks reasonable to me. Thanks.
>
Pushed. Thanks for the looksy.
Keith
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB
2020-06-17 15:56 [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB Keith Seitz
2020-06-17 16:40 ` Tom Tromey
@ 2020-06-17 18:37 ` Simon Marchi
2020-06-17 22:09 ` Keith Seitz
1 sibling, 1 reply; 6+ messages in thread
From: Simon Marchi @ 2020-06-17 18:37 UTC (permalink / raw)
To: Keith Seitz, gdb-patches
On 2020-06-17 11:56 a.m., Keith Seitz via Gdb-patches wrote:
> gdb.debuginfod/fetch_src_and_symbols.exp attempts to ascertain
> whether GDB was built with debuginfod support by executing
> "$GDB --configuration".
>
> That seems harmless enough. However, if GDB is not already installed
> on the host, the command will fail:
>
> $ ./gdb --config
> Exception caught while booting Guile.
> Error in function "open-file":
> No such file or directory: "/usr/share/gdb/guile/gdb/boot.scm"
> ./gdb: warning: Could not complete Guile gdb module initialization from:
> /usr/share/gdb/guile/gdb/boot.scm.
> Limited Guile support is available.
> Suggest passing --data-directory=/path/to/gdb/data-directory.
> Python Exception <class 'ModuleNotFoundError'> No module named 'gdb':
> ./gdb: warning:
> Could not load the Python gdb module from `/usr/share/gdb/python'.
> Limited Python support is available from the _gdb module.
> Suggest passing --data-directory=/path/to/gdb/data-directory.
> This GDB was configured as follows:
> configure --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu
> [abbreviated output]
>
> The problem here is, of course, that while running in the test suite,
> we must pass INTERNAL_GDBFLAGS in order to pick up the --data-directory
> option.
>
> gdb/testsuite/ChangeLog
> 2020-06-17 Keith Seitz <keiths@redhat.com>
>
> * gdb.deuginfod/fetch_src_and_symbols.exp: Pass INTERNAL_GDBFLAGS
> when executing "gdb --configuration".
Watch out the typoe in "debuginfod".
Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB
2020-06-17 18:37 ` Simon Marchi
@ 2020-06-17 22:09 ` Keith Seitz
2020-06-18 2:24 ` Simon Marchi
0 siblings, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2020-06-17 22:09 UTC (permalink / raw)
To: Simon Marchi, gdb-patches
On 6/17/20 11:37 AM, Simon Marchi wrote:
>> gdb/testsuite/ChangeLog
>> 2020-06-17 Keith Seitz <keiths@redhat.com>
>>
>> * gdb.deuginfod/fetch_src_and_symbols.exp: Pass INTERNAL_GDBFLAGS
>> when executing "gdb --configuration".
>
> Watch out the typoe in "debuginfod".
I don't know if your typo was intentional or not, but it made me laugh!
I've pushed a quick rev to fix this. Thank you for letting me know. My
fingers have been misbehaving badly this week.
Keith
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB
2020-06-17 22:09 ` Keith Seitz
@ 2020-06-18 2:24 ` Simon Marchi
0 siblings, 0 replies; 6+ messages in thread
From: Simon Marchi @ 2020-06-18 2:24 UTC (permalink / raw)
To: Keith Seitz, gdb-patches
On 2020-06-17 6:09 p.m., Keith Seitz via Gdb-patches wrote:
> I don't know if your typo was intentional or not, but it made me laugh!
Haha, unfortunately no.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-18 2:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 15:56 [PATCH] Pass INTERNAL_GDBFLAGS when executing GDB Keith Seitz
2020-06-17 16:40 ` Tom Tromey
2020-06-17 17:45 ` Keith Seitz
2020-06-17 18:37 ` Simon Marchi
2020-06-17 22:09 ` Keith Seitz
2020-06-18 2:24 ` Simon Marchi
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).