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

--- Comment #12 from Mark Wielaard <m...@klomp.org> ---
(In reply to Paul Floyd from comment #11)
> 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);
>                                   ^

Aha, yeah execvpe and environ are GNU extensions.
But since we aren't really handling changes in environment at the moment
(although there is some code there in case gdb tells us about it) we can use
execvp for now.

I see accept4 (which is used to set SOCK_CLOEXEC) is also a GNU extension. But
that does also work on other systems?

> 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

That is interesting. We have an XXX for propagating the qSupported response and
it might be this is caused by that missing.

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

Thanks, fixed.

> 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.

--launched-with-multi is only supposed to be used by vgdb when running
valgrind, so it is only documented with valgrind --help-debug:

    --launched-with-multi=no|yes  valgrind launched in vgdb multi mode [no]

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

Reply via email to