Gdb hangs when debugging SDL app

Hello,

I want to use gdb in order to debug a game I am working on. This game uses SDL,
for graphics and inputs things.

It seems that when the video is set using sdl (with SDL_SetVideoMode I guess), a
new thread is created by SDL, and gdb seems to hang :-------------------------------------
jon at linathlon avp $ gdb AvP
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “i686-pc-linux-gnu”…Using host libthread_db library
"/lib/libthread_db.so.1".

(gdb) run -w
Starting program: /home/jon/Prog/Projects/avp/AvP -w
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
[Thread debugging using libthread_db enabled]
[New Thread -1216159632 (LWP 31268)]
[LOG][0] You will play Alien demo !
– [0]
[New Thread -1227560016 (LWP 31271)]


After that (I have waited a couple of minutes), the solution I have is to kill
gdb (but my program still stay in memoory, I’m unable to kill it).

If I run the program without debugging, I don’t got something like that. This
part of the program run well.

I’m not sure if gdb has been compiled with thread support (it seems), but I’m
confident in is ability to deal with threads.
So, maybe there is a little tip to use gdb with SDL ?

Any help is appreciated :wink:

Jonathan