Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse - C++ - Cannot step into function
Eclipse - C++ - Cannot step into function [message #200333] Mon, 27 August 2007 16:44 Go to next message
Eclipse UserFriend
Originally posted by: someone.nospam.net

I am using Eclipse Europa under Redhat Enterprise 3
I have set up a test project to get used to the environment and see if it is
usable for work.

I made a hello world program
calls
foo() from libtest.a
bar() from libtest2.a

Everything compiles and runs fine. I debug and it stop at main. I use F5 to
Step into and F6 to step over. It will try to step into cout but cannot find
the source, which is fine. However, when I try to step into the foo() or
bar() functions it just skips over them instead of stepping into them. I
really need to be able to step into functions for this to be a usable
environment!

It further confuses me that I can right click the function call in
HelloWorld, and click go to definition, and it finds the source. So, why
can't the debugger step into the function?

1) Helloworld, libtest.a, and libtest2.a are all compiled using g++ -g in
thier Makefiles, and are all part of the Eclipse workspace
2) HelloWorld has libtest.a and libtest2.a directories listed under
Properties -> C/C++ Include Paths and symbols -> Discovered Paths ->
Include Paths
3) libtest.a and libtest2.a are both checked under HelloWorld ->
Properties -> Project References
4) HelloWorld -> Properties -> Run/Debug Settings -> HelloWorld -> Edit ->
Source -> Default has both libraries directories listed
5) HelloWorld -> Properties -> Run/Debug Settings -> HelloWorld -> Edit ->
Source -> Workspace has both libraries directories listed
6) HelloWorld -> Properties -> Run/Debug Settings -> HelloWorld -> Edit ->
Debugger has:
debugger: gdb debugger
main tab -> GDB debugger: gdb
main tab -> GDB command file: <blank>
main tab -> Protocol: default

Does anyone have any ideas on why Eclipse skips over the functions I want to
step into?
Re: Eclipse - C++ - Cannot step into function [message #200387 is a reply to message #200333] Mon, 27 August 2007 21:13 Go to previous message
Eclipse UserFriend
Originally posted by: someone.nospam.net

"Christopher Pisz" <someone@nospam.net> wrote in message
news:fauv1p$8p6$1@build.eclipse.org...
>I am using Eclipse Europa under Redhat Enterprise 3
> I have set up a test project to get used to the environment and see if it
> is usable for work.
>
> I made a hello world program
> calls
> foo() from libtest.a
> bar() from libtest2.a
>
> Everything compiles and runs fine. I debug and it stop at main. I use F5
> to Step into and F6 to step over. It will try to step into cout but cannot
> find the source, which is fine. However, when I try to step into the foo()
> or bar() functions it just skips over them instead of stepping into them.
> I really need to be able to step into functions for this to be a usable
> environment!
>
> It further confuses me that I can right click the function call in
> HelloWorld, and click go to definition, and it finds the source. So, why
> can't the debugger step into the function?
>
> 1) Helloworld, libtest.a, and libtest2.a are all compiled using g++ -g in
> thier Makefiles, and are all part of the Eclipse workspace
> 2) HelloWorld has libtest.a and libtest2.a directories listed under
> Properties -> C/C++ Include Paths and symbols -> Discovered Paths ->
> Include Paths
> 3) libtest.a and libtest2.a are both checked under HelloWorld ->
> Properties -> Project References
> 4) HelloWorld -> Properties -> Run/Debug Settings -> HelloWorld -> Edit ->
> Source -> Default has both libraries directories listed
> 5) HelloWorld -> Properties -> Run/Debug Settings -> HelloWorld -> Edit ->
> Source -> Workspace has both libraries directories listed
> 6) HelloWorld -> Properties -> Run/Debug Settings -> HelloWorld -> Edit ->
> Debugger has:
> debugger: gdb debugger
> main tab -> GDB debugger: gdb
> main tab -> GDB command file: <blank>
> main tab -> Protocol: default
>
> Does anyone have any ideas on why Eclipse skips over the functions I want
> to step into?
>



Found the problem. It was my makefile macros. I had one for include paths
and if it was empty it figured the following -g was the path instead of the
debug flag.
Previous Topic:Launching CDT-Debug: java.lang. NullPointerException & others !!!
Next Topic:Indexer Fails for Some but not All Projects
Goto Forum:
  


Current Time: Sun Jul 07 20:19:37 GMT 2024

Powered by FUDForum. Page generated in 0.03390 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top