News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

debuging with idbc

Started by darmar, January 03, 2012, 09:21:05 AM

Previous topic - Next topic

darmar

I am interesting in the use of Intel's debugger with C::B. I tried to use "idbc" debugger with option -gdb, which imitates the commands of GDB debugger. Theoretically should be possible to use idbc instead of gdb without any changes (except of adding option -gdb). Unfortunately, the C::B becomes unresponsive after the start of debugger plugin.

I looked into the code of plugin. Debugger plugin uses prompt "cb_gdb:" to find an end of command output. But the problem is that plugin doesn't catch this prompt when idbc is used (C::B uses the wxProcess object for this purpose).

Could somebody explain why the prompt "cb_gdb:" is not caught in idbc case?

oBFusCATed

Can you post the full debug log of the debugger.
The debug log is not enabled by default and you should enable it in 'Settings -> Compiler & Debugger-> Debugger -> Debugger's debug log'.

And keep in mind that the idbg should produce the same output to the commands as gdb,
if the output format is different a new debugger plugin should be written to implement correct communication with idbg.

Also we have a branch, where we have done many improvements to the debugging in C::B, you can check it out, it is named wxpropgrid_debugger.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

darmar

Thanks for reply.

And keep in mind that the idbg should produce the same output to the commands as gdb,
if the output format is different a new debugger plugin should be written to implement correct communication with idbg.


I understand this.

Also we have a branch, where we have done many improvements to the debugging in C::B, you can check it out, it is named wxpropgrid_debugger.


I will test this branch.

As I said, I can't understand, why "cb_gdb:" prompt is not caught. I think that problem is with wxProcess not with C::B. Could it be?
Below is debug log of the debugger. Because  "cb_gdb:" prompt is not caught, C::B never comes to the second command in the queue. If I debug a test program using command line in the terminal, the output of gdb and idbc debuggers looks the same.

LD_LIBRARY_PATH=.:"/bin/ia32:/debugger/lib/ia32:/debugger/gui/ia32"
Command-line: /opt/intel/composerxe-2011.2.137/bin/ia32/idbc -gdb -nx -fullname  -quiet -args bin/Debug/gdb_test
Working dir : /home/darius/Programavimas/idb_test/
> set prompt >>>>>>cb_gdb:
Executing: xterm -T 'Program Console' -e sleep 84792
Executing: ps x -o tty,pid,command
Reading symbols from /home/darius/Programavimas/idb_test/bin/Debug/idb_test...done.
PS result: pts/1     5000 ps x -o tty,pid,command
PS result: pts/1     4999 bin/Debug/idb_test
PS result: pts/6     4997 sleep 84792
TTY is[/dev/pts/6]
GetConsoleTTY[/dev/pts/6]ConsolePid[4995]
Queued:[tty /dev/pts/6]

oBFusCATed

Is this the whole log?
What about pasting the log from a fully working command line session with idbc?

p.s. Please use  code tags to enclose pastes of logs or source
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]