https://bugs.kde.org/show_bug.cgi?id=434057

--- Comment #11 from Paul Floyd <pjfl...@wanadoo.fr> ---
When I saw this

+/* For accept4 and execvpe.  */
+#define _GNU_SOURCE
 #include "vgdb.h"

I had a bit of a bad feeling, which was confirmed when I tried to build.

vgdb.c:1185:16: warning: implicit declaration of function 'execvpe' is invalid
in C99 [-Wimplicit-function-declaration]
         res = execvpe ("valgrind",
               ^
vgdb.c:1186:35: error: use of undeclared identifier 'environ'
                        val_argv, environ);
                                  ^
vgdb.c:1190:16: warning: implicit declaration of function 'execvpe' is invalid
in C99 [-Wimplicit-function-declaration]
         res = execvpe (val_argv[0], val_argv, environ);
               ^
vgdb.c:1190:48: error: use of undeclared identifier 'environ'
         res = execvpe (val_argv[0], val_argv, environ);

MUSL has a manpage for execvpe but not macOS, FreeBSD or Illumos.

There is  'execle' it's POSIX and has been around forever, but there's no clean
way to use it with the unknown number of args.

macOS has "execve", MUSL also has "execvpe". 

FreeBSD does have exect, I gave that a quick try but I get

execve valgrind: No such file or directory
09:05:24.560189 Running "./malloc1" on the remote target failed
(gdb) OOPS! couldn't launch valgrind No such file or directory

I tried plain execvp (since environ isn't uyet being used) and I could get as
far as a gdb prompt but couldn't do much, getting errors like

relaying data between gdb and process 57204
Protocol error: qXfer:features:read (target-features) conflicting enabled
responses.

Cannot find bounds of current function

+       DEBUG(1, "packed recieved: '%s'\n", buf);
^^^
That should be "packet received"

Will the option "--launched-with-multi" ever be used by humans? If not no
worry, but if it is then it should be more self explanatory.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to