News:

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

Main Menu

gdb with custom makefiles: unabled to interrupt while running

Started by pasdVn, February 13, 2011, 09:16:24 PM

Previous topic - Next topic

oBFusCATed

Can you add these two commands in the Debugger initialization commands in the Settings -> Compiler & Debugger -> Debugger?


catch fork
catch vfork

If there is fork, gdb should stop... or print something in the log

Here is some info on the matter: http://sourceware.org/gdb/onlinedocs/gdb/Forks.html

I'll do some tests and probably will give you a better patch to test...
(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!]

pasdVn

Ok, I'll try that.

I tried to get it work in Eclipse CDT in the meantime. The suprising thing: Same Problem there O.o I start to believe that it really has not to  with codeblocks but with the architecture of this application...

Edit:
>>>>>>cb_gdb:
> catch fork
catch vfork
Catchpoint 2 (fork)
>>>>>>cb_gdb:Catchpoint 3 (vfork)


Oh no, sry. This is just the initialisation. No breaks or other logs occured. Tried it also with DDD in the meanwhile, where it works.

oBFusCATed

Can you paste full log with the patch attached?

p.s. Eclipse has two debugger implementations, as far as I know, so you could try both
p.s.s. Can you past a log from DDD?
(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!]

pasdVn

GDB Log from cb:

LD_LIBRARY_PATH=.:
Command-line: /usr/bin/gdb -nx -fullname  -quiet -args ../mangos-server/bin/mangosd
Working dir : /home/tobias/Entwicklung/mangos/origin/builddir/
Reading symbols from /home/tobias/Entwicklung/mangos/origin/mangos-server/bin/mangosd...
> set prompt >>>>>>cb_gdb:
Queued:[tty /dev/pts/11]
done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set print elements -1
>>>>>>cb_gdb:
> set disassembly-flavor intel
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source /home/tobias/Entwicklung/codeblocks/branches/wxpropgrid_debugger/binbin/share/codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> catch fork
catch vfork
Catchpoint 2 (fork)
>>>>>>cb_gdb:Catchpoint 3 (vfork)
> cd ../mangos-server/bin
>>>>>>cb_gdb:
> directory /home/tobias/Entwicklung/mangos/origin/builddir/
>>>>>>cb_gdb:
> directory /home/tobias/Entwicklung/mangos/origin/
>>>>>>cb_gdb:
> tty /dev/pts/11
>>>>>>cb_gdb:>>>>>>cb_gdb:
> run
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff541b700 (LWP 31862)]
[Thread 0x7ffff541b700 (LWP 31862) exited]
Code::Blocks is trying to interrupt process with pid: 31862; child pid: 31862 gdb pid: 31853



GDB-log from DDD:

GNU DDD 3.3.12 (x86_64-pc-linux-gnu), by Dorothea Lütkehaus and Andreas Zeller.
Copyright © 1995-1999 Technische Universität Braunschweig, Germany.
Copyright © 1999-2001 Universität Passau, Germany.
Copyright © 2001 Universität des Saarlandes, Germany.
Copyright © 2001-2004 Free Software Foundation, Inc.
(gdb) file /home/tobias/Entwicklung/mangos/origin/mangos-server/bin/mangosd
(gdb) run
[Thread debugging using libthread_db enabled]
^C[New Thread 0x7ffff541b700 (LWP 32194)]
[Thread 0x7ffff541b700 (LWP 32194) exited]
[New Thread 0x7ffff541b700 (LWP 32195)]
[New Thread 0x7ffff4a0d700 (LWP 32196)]
[New Thread 0x7ffff420c700 (LWP 32197)]
[New Thread 0x7fffefc64700 (LWP 32198)]
[New Thread 0x7fffef463700 (LWP 32199)]
[New Thread 0x7fffeec62700 (LWP 32200)]
[New Thread 0x7fffee461700 (LWP 32201)]

Program received signal SIGINT, Interrupt.
0x00007ffff5e02285 in pthread_join () from /lib/libpthread.so.0
(gdb)


pasdVn

It suddenly works!! :)

Just updated to a new nightly build of the debugger branch (rev 7040). Who ever fixed this:
Thanks a lot!