1

I set up a breakpoint, and when I run the program in debug mode, and click "step into" when it reaches that breakpoint, it doesn't step into it.

Why?

EDIT: I'm compiling with these flags:

-Wall -pedantic -pedantic-errors -Wunused -Wunreachable-code -g -ggdb

EDIT 2: When I turn on the instruction stepping mode and immediately afterwards step into the function that I marked with a breakpoint, and then repeatedly call "step into", I get this:

No source available for "Indexer::index() at 0x8054de6" 
Maria Ines Parnisari
  • 16,584
  • 9
  • 85
  • 130

2 Answers2

0

Your debugger cannot find the source for the code you are debugging. You should be able to debug it as assembler though. In order to fix the problem I would suggest that you find the source code for Indexer and make sure that your code paths are correctly set.

Dennis
  • 3,683
  • 1
  • 21
  • 43
0

I fixed it, there was a problem with my makefile...

I was missing this:

%.o: %.cpp %.h
    $(CC) -c $(CFLAGS) $<
Maria Ines Parnisari
  • 16,584
  • 9
  • 85
  • 130
  • You should let people know how you did it in case they are looking at a similar issue. – Dennis May 30 '13 at 13:59
  • @I19 : Hi, I am encountering the same problem. Could you explain your solution so that I could learn and apply to my code? Thanks so much. – user2751691 Feb 18 '15 at 18:33
  • @user2751691 i think you're better off creating a new question – Maria Ines Parnisari Feb 18 '15 at 19:36
  • @I19 : http://stackoverflow.com/questions/28572335/eclipse-cdt-cannot-debug-to-step-into-function-definition-in-same-directory I created this one but the solution provided did not work. – user2751691 Feb 19 '15 at 18:20
  • @I19 : http://stackoverflow.com/questions/28614280/eclipse-cdt-cannot-step-into-functions-in-other-files I made the question more clear. Please help to take a look. Thank you. – user2751691 Feb 19 '15 at 18:42