Page 1 of 1

[GN UPGRADED] Debugging Ogre app with gdb

PostPosted: 29 Apr 2012, 22:09
by paul424
When you want to debug OD code with gdb , by say setting trap, breakpoint or even starting the execution with the spell " step " you might get stuck with mouse coursor not being "released from the OD's window". That is, you might not be able to get the X -cursor working until you kill -9 gdb from separte console.

OLN gave that Ogre forum link, setting the AllowDeactivateGrabs option in your X server config : http://www.ogre3d.org/forums/viewtopic.php?t=20690


UPDATE: THIS does not seem to work on Xorg server version 1.10 . ( as claimed on Xorg freenode's channel it's disabled for that version).
Instead I try the following :
0. Switch to text console via alt ctl f1-9 ( important that cannot be an runnig instance of Xorg terminal ) In here Osuse its 12.1
1. Start the second separate server by cmd 'startx -- :1' . That defines DISPLAY:1 as well
2. Switch back to DISPLAY:0 CTL F6-7 :P
3. START OD.
4. Switch back to DISPLAY:1 and start gdb ./Opendungeons.bin <OD_PID>

Find the pid with 'ps aux' and ' grep ' of course.

Re: [GN UPGRADED] Debugging Ogre app with gdb

PostPosted: 06 Jun 2012, 10:57
by paul424
How do you catch code throwing a particular exception, not neceserrily in our code ( it might be libs etc. ).
GDB in its docs only claims being able to do that, it is known that this feature was never implemented in GDB.