Jump to content
  • Advertisement
Sign in to follow this  
bluemoon

gdb problems when debugging

This topic is 4566 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi @ all: I am using the gcc compiler on a windows platform.now i want to debug my program using gdb. i can start it with gdb main. But as soon as I want to type break jmphere //command line (gdb) break jmphere it says: "Function jmphere not defined". Does anybody know whats going wrong ?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Well, is jmphere a function in your program or not? If it is, did you instruct gcc to generate debugging symbols?

Share this post


Link to post
Share on other sites
jmphere is a label (where I want the debugger to stop)

I am quite new to gcc. Also I do not compile C-Code. I used NASM to assemble some quite simple asm code.

When I use: gcc -g -o main.exe main.o its giving me an error:

main.c: undefined reference to `WinMain@16'


so i used the linker directly with: ld -g -o main.exe main.o
This builds the program but i cant use gdb (see post above)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!