|
|
| Gnu Debugger (GDB) |
|
rswhite
Member #10,279
October 2008
|
After my last Thread Game Crash i learnt to use GDB. Quote:
Hot tip, thanks But i wanted to test gdb now, but if i start gdb this comes and then it crash like the game before: BFD: C:\Windows\system32\atiumdva.dll (.text): Section flag IMAGE_SCN_MEM_NOT_PAGED (0x8000000) ignored
I have searched for this but i couldn't find an answer which i understand :/ How i start it: Quote: gdb map.exe and then run, after that it crash :/ |
|
ReyBrujo
Moderator
January 2001
|
Compile it with -ggdb3 and try again. Looks like you crashed your graphic driver bad. -- |
|
weapon_S
Member #7,859
October 2006
|
backtrace it afterwards? And perhaps make sure gdb knows to find your source files. |
|
rswhite
Member #10,279
October 2008
|
How i use ggdb3? ggdb3 and gdb3 don't works - must i install anything else? backtrace? you mean that i write instead "run" - "backtrace" or what? |
|
kazzmir
Member #1,786
December 2001
|
ggdb3 is a compilation flag to gcc. $ gcc -ggdb3 foo.c -o foo |
|
rswhite
Member #10,279
October 2008
|
I have changed my Makefile to this: Quote: CPP=g++ #CPPFLAGS=-mwindows -D__GTHREAD_HIDE_WIN32API -Wall OBJECTS=main.o util.o sprite.o map.o joypad.o player.o world.o character.o monster.o rules.o map: ${OBJECTS} But if i compile now (with aware error) and start then gdb with "gdb map.exe" this error comes: Quote:
GNU gdb 5.2.1 An internal GDB error was detected. This may make further
edit: rswhite said: Starting program: C:\Users\White\Desktop\programmierung\c++\map_objects\step2\my_kapitel 28/map.exe BFD: C:\Windows\system32\atiumdva.dll (.text): Section flag IMAGE_SCN_MEM_NOT_PAGED (0x8000000) ignored
|
|
kazzmir
Member #1,786
December 2001
|
FWIW, gdb is crap on windows. I highly recommend you try compiling your project with MSVC (express is free) and using its debugger. |
|
ReyBrujo
Moderator
January 2001
|
Is it too big to post the full code to test it? I would suggest you to comment functions until it doesn't crash, it is probably memory corruption. -- |
|
rswhite
Member #10,279
October 2008
|
I have found all mistakes, hence, the following code functions completely perfectly, has packed him sometimes by Zip. And what concerns MSVC, I hate the thing:) Permanently new projects put in, complicated use in contrast to other editors... no, i use rather textmate |
|
kazzmir
Member #1,786
December 2001
|
Yes I agree but for a good debugging experience your choices seem to be: You could try to install a VM with ubuntu in it and debug in that in the future. |
|
rswhite
Member #10,279
October 2008
|
You mean, that i must work with MSVC? -.- |
|
kazzmir
Member #1,786
December 2001
|
You could try the intel debugger (idb). Intel's compiler is like 99% backwards compatible with g++ so you don't have to change anything to get it to work. You can download the intel compiler for free for non-commercial use, just google around for it. |
|
ImLeftFooted
Member #3,935
October 2003
|
What's wrong with gdb on windows? |
|
GullRaDriel
Member #3,861
September 2003
|
I was asking myself the same thing... "Code is like shit - it only smells if it is not yours" |
|
rswhite
Member #10,279
October 2008
|
I don't know why the error which i posted comes. edit: Quote:
-------------- Build: default in test --------------- What happend now? What's going wrong? oO |
|
Kitty Cat
Member #2,815
October 2002
|
Dustin Dettmer said: What's wrong with gdb on windows? It doesn't work too well. GDB is designed to work with signals (eg. SIGABRT, SIGSEGV), but Windows likes to use exceptions. This causes GDB to not catch signals reliably, and sometimes crash GDB itself instead of the app. -- |
|
rswhite
Member #10,279
October 2008
|
I thanks all for their help - i have read many manuals and now my Code::Blocks works, i program at now with this. |
|
Tobias Dammers
Member #2,604
August 2002
|
Dustin Dettmer said: What's wrong with gdb on windows? gdb also seems to have quite some trouble with the windows threading model. rswhite said: I hate it, because i must create new projects and can't use existing folders as projects, it is too complicated, i hate complicate things...
MSVC creates the projects for you, and you can simply add everything inside a folder to your project. It's not THAT complicated. It used to be quite bad and counter-intuitive, but the 2008 version is actually pretty good. And even though MSVC creates a project file for you, it doesn't touch your source files unless you tell it to. Quote: Exist no other debugger for windows?
For the die-hards, there is always "manual debugging". It works as follows: --- |
|
GullRaDriel
Member #3,861
September 2003
|
Just a note: it's been a long time since the last time gdb crashed or not helped me to debug my apps correctly on windows. "Code is like shit - it only smells if it is not yours" |
|
|