debuging ?

Programming, for all ages and all languages.
Post Reply
User avatar
Sam111
Member
Member
Posts: 385
Joined: Mon Nov 03, 2008 6:06 pm

debuging ?

Post by Sam111 »

I have code from c calling asm functions. I am using eclipse or netbeans to develop/ debug the code.

When I set a break point in the c code I can step thru the code. But when I try to step into a ASM function it just steps over to the next line. It should go into the ASM file ,...etc

I am wanting a way to step thru each line of the code.

Also is their a way to make it so you can step into a built in/standard library function like printf or tan , sin ,....etc ???
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: debuging ?

Post by Solar »

Eclipse and / or Netbeans aren't exactly what you'd call mainstream C IDE's...

GDB is easily the most powerful debugger for C/C++/ASM code. If you don't feel like tackling its text interface (but you should!), try one of the available GUIs (intent, DDD).

Seriously: GDB can help you in places where no other debugger can. Getting familiar with it will widen your horizons when it comes to hunting bugs.
Every good solution is obvious once you've found it.
User avatar
Sam111
Member
Member
Posts: 385
Joined: Mon Nov 03, 2008 6:06 pm

Re: debuging ?

Post by Sam111 »

ya, I am using gdb in eclipse and netbeans (I have it set as the debugger to use). But when I click the debug button in those enviroments and have a break point setup.
When I try to step into the ASM code. It doesn't... it jumps to the next line of the c code ?

I want to know how I can step into a break point in the ASM....?

Also is their away to step into a function like printf ,...etc when I try steping into this code from eclipse or netbeans enviroment I just get it steping to the next line in my file ... basically stepping over?

I would like to have this gdb debugging fully working in eclipse and netbeans and not have to use gdb from command line.
Setting steps ,...etc just being able to use the buttons on eclipse / netbeans enviroment, ie. step over , into , out , set watches , breakpoints ,...etc from their. Not having to be at the command line out of the IDE enviroment to debug.
User avatar
Sam111
Member
Member
Posts: 385
Joined: Mon Nov 03, 2008 6:06 pm

Re: debuging ?

Post by Sam111 »

I guess what I want to know is even if I get good with gdb at command line steping thru the code the step ,...etc

How can I set the equivalent for the IDE to stop at the exact line where their is a break point.

I am looking in the compiler/linker/debugger settings and I don't see what I have to do to get this to work from inside the IDE?
Post Reply