Find the answer to your Linux question:
Results 1 to 5 of 5
Hi I don't quite know how to explain this problem, and I'm not too sure if it's in the right section of the forums, but I'll do my best. I'm ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    3

    Unhappy 'Problems' in stl_vector and others while debugging


    Hi

    I don't quite know how to explain this problem, and I'm not too sure if it's in the right section of the forums, but I'll do my best. I'm using Kubuntu 9.04 and writing a small program to do some processing of some data. I've tried this with multiple IDEs (KDevelop 3.5.3 and Code:Blocks 8.0.2 with gdb 6.8.3). Programming in c++. Whenever I go into debugging it gets to the breakpoint I set perfectly fine.

    Here's where the problem comes in. When I press the button to step over to the next line in both IDEs, instead it goes into stl_vector and other libraries. At this point in KDevelop, an error pops up under the problems tab at the bottom suggesting syntax errors at various points in those libraries.

    The actual code runs fine and outputs what it should so far, but for later sections I'll need the debugger to check things are working ok. What's interesting is that it's only this code, any other project or code works fine. I tried making a new file and copying the code in but the same thing still happened.

    Does anyone have any ideas as to why this is happening or any ideas as to what I could do to get around this problem?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,754
    Have you tried debugging directly with gdb? The STL generates a huge amount of inline code that can confuse an IDE, so while you want to step over a line, hidden behind that are hundreds (possibly) of lines of inline code, so the IDE gets confused. Personally, I don't find that IDE's improve my productivity at all, whereas a really good programming editor does wonders, but then I'm just an old-fashioned sort of guy!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,754
    Also, the version of gcc, g++, gdb that you are using with your IDE may contribute to the problem. Which version of the gcc tool chain are you using?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2008
    Posts
    3
    I'm not too sure what you mean by tool chain, but the version of gcc is 4.3.3. Presumably you meant something else?

    Just out of interest, what programming editor do you use?

  6. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,754
    GCC 4.3.3 is the information I was trying to get. The tool chain is the compiler suite, linker, debugger, and other tools used to build/debug/load applications and libraries. 4.3.x is fairly recent, but you might want to update to 4.4. The latest is 4.5.1, but that is pretty much bleading edge. I have a number of versions installed on my development system, including 4.5.1, but mostly I use 4.4 these days - it's stable and closely follows the current C/C++ standards.

    My personal favorite editor in a GUI environment is nedit. When I have to edit in a console environment then I use VIM. I've been using nedit since the late 80's. It was developed at Fermi National Laboratory in Illinois for the world-wide high-energy physics community who do a lot of software development. These are the same people who brought us the world-wide web, web browsers, and all the stuff we take for granted these days. I've run it on everything from embedded ARM computers to mainframe-class HP, DEC, and Sun clusters, and every PC operating system from QNX to Windows to Linux/Unix. Anyway, it is currently fully open source and hosted on SourceForge.net.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •