]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.base/exec-invalid-sysroot.exp
authorTom de Vries <tdevries@suse.de>
Wed, 4 Jun 2025 07:58:07 +0000 (09:58 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 4 Jun 2025 07:58:07 +0000 (09:58 +0200)
Since commit d462550c91c ("gdb/testsuite: also compile foll-exec.exp as C++"),
we run into:
...
Running gdb.base/exec-invalid-sysroot.exp ...
gdb compile failed, foll-exec.c: In function 'main':
foll-exec.c:35:52: error: 'EXECD_PROG' undeclared (first use in this function)
   printf ("foll-exec is about to execlp(%s)...\n", EXECD_PROG);
                                                    ^~~~~~~~~~
foll-exec.c:35:52: note: each undeclared identifier is reported only once \
  for each function it appears in
...

Fix this by default-defining EXECD_PROG to "execd-prog".

Tested on x86_64-linux.

gdb/testsuite/gdb.base/foll-exec.c

index 548f045c789f4c080f4c318898884638981c1397..291f8032cc7cc6e59ec9e07b7428bb6bf73bdae2 100644 (file)
 
 int global_i = 100;
 
+#ifndef EXECD_PROG
+#define EXECD_PROG "execd-prog"
+#endif
+
 int main (int argc, char ** argv)
 {
   int local_j = global_i + 1;