| running gdb as root without running eclipse as root [message #187264] |
Wed, 07 March 2007 05:35  |
|
Originally posted by: lambert_anne.club.lemonde.fr
Hi,
I am developing a small program that uses the libpcap library. For the
program to work I need to start it as root. By using setuid I managed to
have the program working when using the Run perspective but how do I get
the same with the debugger??
I tried adding an alias: gdb sudo gdb but when started with eclipse I am
still the owner of the process... If I try to start gdb outside of
Eclipse, no problem, owner is root.
Any idea?
Thanks for any help
Anne
|
|
|
|
|
| Re: running gdb as root without running eclipse as root [message #187332 is a reply to message #187310] |
Thu, 08 March 2007 14:07   |
|
Originally posted by: brons_eclipsepost.rinspin.com
Anne Lambert wrote:
> Unfortunately it does not work. Thanks for the help!
> I get:
>
> Exec Error: Cannot run ... gdb_root.sh
>
> with gdb_root.sh =
> #!/bin/bash
> #
> sudo gdb $*
>
> Anyone as another idea?
Silly question... did you set executable permission on the script?
|
|
|
| Re: running gdb as root without running eclipse as root [message #187340 is a reply to message #187310] |
Thu, 08 March 2007 14:08   |
|
Originally posted by: brons_eclipsepost.rinspin.com
Anne Lambert wrote:
> Unfortunately it does not work. Thanks for the help!
> I get:
>
> Exec Error: Cannot run ... gdb_root.sh
>
> with gdb_root.sh =
> #!/bin/bash
> #
> sudo gdb $*
>
> Anyone as another idea?
Silly question... did you set executable permisson on the script?
|
|
|
|
|
| Re: running gdb as root without running eclipse as root [message #192881 is a reply to message #192790] |
Fri, 08 June 2007 04:16   |
|
Originally posted by: J.Kilner.surrey.ac.uk
On Thu, 2007-06-07 at 10:07 +0300, Hasan Ceylan wrote:
> Anne Lambert wrote:
> > Not a silly question at all... I tried so many different things in the
> > last few days, that I did not check that! So yes with executable
> > permission it does work!!
> >
> > Thanks a lot for your help!
> > Anne
> >
> >
> I need help on this issue as well.
>
> I get "Error creating session
> sudo: sorry, you must have a tty to run sudo"
>
> Is there a way I can work this around?
>
> Ceylan
You might need one of the graphical versions of sudo. If you are using
kde try using kdesu , and if you are using gnome try gksu instead of the
sudo command.
Joe
|
|
|
|
|
| Re: running gdb as root without running eclipse as root [message #1011871 is a reply to message #193067] |
Wed, 20 February 2013 06:59  |
Volodia 1 Messages: 1 Registered: February 2013 |
Junior Member |
|
|
Hi;
I'm having the same problem and tried the above solutions,
(setting debugger to sudo gdb, or to batch file running as gdb as root user)
but I keep getting an error message in Eclipse "Cannot run program" "unknown reason",
when trying to debug.
Please advise me what I'm doing wrong.
|
|
|
Powered by
FUDForum. Page generated in 0.01866 seconds