[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Problem specifying path to Debugger script in Debug Configuration
|
Well, that doesn't work for me either. I've got /home/tblack in my PATH and I put my script there:
/home/tblack/gdb_root.sh:
#! /bin/bash
sudo gdb $*
I verifed that I can run my script from the command line and that it indeed executes the app-under-debug as root. I can run this script from any cwd bc it is in my PATH. However, in Eclipse when I specify "gdb_root.sh" as the Debugger command in a Debug Configuration and debug, I get:
Exception occurred during launch
Reason:
Error while launching command: gdb_root.sh --version
Why is --version appended to my command? When I execute "gdb_root.sh --version" from command line I get the expected gdb version info. Is this "--version" suffix the reason for my Eclipse Debug error? Why is it there?
On Thu, Apr 1, 2010 at 1:27 PM, Marc Khouzam
<marc.khouzam@xxxxxxxxxxxx> wrote:
You are right, I couldnt' get a relative path to
work.
However, what you can do (which I use all the time) is use
a simple command name like "scriptName.sh" and simply make sure that file is in
your PATH
Marc
I am debugging a C/C++ application that I am setuid'ing to run as
root. This app runs fine from the command line. When I ran it in eclipse, the
apparent user was still me instead of root, so it looks like the effective uid
didn't get boosted. So for a test, I changed the Debugger invokation in the
Debugger tab of Debug Configuration from "gdb" to a bash script that does
"sudo gdb $*". Since I am a sudoer, this allows eclipse to run gdb as root,
and my application runs as expected. All the above may be a misunderstanding
on my part of how gdb works. The problem I wanted to convey to you is
that this only works if I browse and set an absolute path to the script (in
the Debugger tab of Debug Configuration). Just "scriptName.sh" or
"./scriptName.sh" don't work. I don't like this because I think this inserts
an absolute path in my .launch file, which I want to share with others. This
behavior occurs with Eclipse 3.5.2/CDT6.0 and Eclipse
3.6M6/CDT7.0.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev