News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

debugging libraries

Started by wiseguyin, July 02, 2009, 07:55:42 AM

Previous topic - Next topic

wiseguyin

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 ??

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Jenna

Quote from: 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 ??

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.

wiseguyin

@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

Jenna

Quote from: wiseguyin on July 02, 2009, 05:29:50 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.

wiseguyin

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...

wiseguyin

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:

** (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...