Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: wiseguyin on July 02, 2009, 07:55:42 am

Title: debugging libraries
Post by: wiseguyin on July 02, 2009, 07:55:42 am
Hi Gurus,
I am debugging a library and have set a host application for it. But on starting the debug, it exits immediately
with the message:
Process terminated with status 255 (0 minutes, 0 seconds)

If it helps: the host application is nautilus (since i am coding a nautilus extension)

Any ideas what I need to do ??
Title: Re: debugging libraries
Post by: ollydbg on July 02, 2009, 08:03:35 am
Did you means this?

http://en.wikipedia.org/wiki/Nautilus_%28file_manager%29
Title: Re: debugging libraries
Post by: Jenna on July 02, 2009, 09:47:51 am
Hi Gurus,
I am debugging a library and have set a host application for it. But on starting the debug, it exits immediately
with the message:
Process terminated with status 255 (0 minutes, 0 seconds)

If it helps: the host application is nautilus (since i am coding a nautilus extension)

Any ideas what I need to do ??

Is your host program a console application (Right click the project's properties goto "Build targets", chose your target and see which application type is chosen) ?

If yes, you need xterm to be installed on your system, or change the "Terminal to launch console programs:" in "Settings -> Environment... -> General settings".
The first works definitely, the second depends on the console-program and needs at least some tweaking of the parameters and might not work at all.
Title: Re: debugging libraries
Post by: wiseguyin on July 02, 2009, 05:29:50 pm
@ollydbg: Yeah thats the one...

@jens: Its a library - that I am coding... it gets called by nautilus..... which is the "windows explorer" for gnome ...

I can debug using gdb on my terminal ... but since I am new to Linux programming I don't want to spend time learning GDB too.

Regards,
Sunil
Title: Re: debugging libraries
Post by: Jenna on July 02, 2009, 06:05:15 pm
@jens: Its a library - that I am coding... it gets called by nautilus..... which is the "windows explorer" for gnome ...

I know nautilus, even if I'm not using gnome.

I thought you have a test application for your library (overread that nautilus itself is the host app).

You can turn on the debuggers debug log ("Settings -> Compiler and debugger... -> Debugger settings -> Display debuggers debug log"), and post it's content, if the debug-session fails.
Title: Re: debugging libraries
Post by: wiseguyin on July 05, 2009, 12:05:47 am
Tried this today --- nothing happened. The debugger log was empty. Though, nautilus did run, because I could see a new "explorer" window.

I guess I will have to learn gdb (freakin - command line!!) commands .... Is this something that the C::B team can enhance ..?

May be the debugging cannot be done on nautilus because I am not running it with sudo privileges...
Title: Re: debugging libraries
Post by: wiseguyin on July 05, 2009, 03:09:26 am
By the way, launching code::Blocks from the terminal as root, I am able to launch the debugging sesion.. But adding a breakpoint results in the following message:

Code
** (nautilus:20909): WARNING **: Unable to add monitor: Operation not supported
Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

I am not even sure what it means...