[Qt-creator] Debugging as super-user
Bryce Schober
bryce.schober at gmail.com
Wed Apr 14 23:28:27 CEST 2010
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 <
andre.poenitz at mathematik.tu-chemnitz.de> 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
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
--
Bryce Schober
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100414/0e199534/attachment.html
More information about the Qt-creator-old
mailing list