Neither option works for me. Our application, which is a PC-build-variant of
our embedded application, calls mlockall(), which fails with EPERM. Normal
command-line usage of sudo works great, either for running or debugging with
gdb, but I'm not sure how I would get equivalent permissions through
qt-creator.

On Wed, Apr 14, 2010 at 12:42 PM, Andre Poenitz <
[email protected]> wrote:

> > On Tue, Apr 13, 2010 at 09:12:07AM -0700, Bryce Schober wrote:
> > > Is there a way to get Qt Creator to launch gdb as super-user?
> Obviously, I
> > > can start Qt Creator as super-user, but that leaves all the modified
> source
> > > and outputs with superuser perms, which screws up normal-user
> operations
> > > like svn, etc. I tried several different ways of wrapping gdb, and
> > > specifying the wrapper in Qt creator's gdb settings, but have had no
> > > success.
>
> Would
>
> echo '
>    #include <stdio.h>
>    #include <unistd.h>
>
>    int main(int argc, char *argv[])
>    {
>        setreuid(geteuid(), geteuid());
>        setregid(getegid(), getegid());
>        return execvp("/usr/bin/gdb", argv);
>    }
> ' | gcc -xc - -o /tmp/gdb-su && chmod +s /tmp/gdb-su
>
> as root and pointing Qt Creator to /tmp/gdb-su in the 'gdb Location'
> setting do the trick?
>
> Note that this would give anyone on the system a root shell.
>
> Andre'
> _______________________________________________
> Qt-creator mailing list
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>



-- 
Bryce Schober
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to