GDB refuseing to step into method from static library

I am haveing dificulty stepping into a class method belonging to a static library for which my code httpget.cpp is linked.  I am useing the gdb/insight debugger in a WinXP enviroment, where my compiler is MINGW (g++ 3.3.1 mingw-special)

In the code below, I wish to step into the constructor for Parse, which resides in the static library for which I linked against.  When I atempt to step into Parse, gdb lands inside HttpGetSocket.h which it should not.  Instead It should step into Parse.cpp:66

The source for the static library exists inside a seperate directory from which httpget.cpp exists.  The library was compiled with -g3 option, just the same I compiled httpget.cpp with -g3

Here is httpget.cpp

#include <HttpGetSocket.h>
#include <HttpsGetSocket.h>
#include <SocketHandler.h>
#include <Parse.h>

bool Get(const std::string& url_in)
      std::string sDelim = "://";
      Parse pa(url_in, sDelim);  // I want to step into this
      std::string protocol = pa.getword();
      std::string host = pa.getword();
      int port;
            Parse pa(host,":");
            port = pa.getvalue();
      std::string url = "/" + pa.getrest();
      std::string file;
            Parse pa(url,"/");
            std::string tmp = pa.getword();
            while (tmp.size())
                  file = tmp;
                  tmp = pa.getword();
      SocketHandler h;
      if (!strcasecmp(protocol.c_str(),"http"))
            HttpGetSocket s(h,host,port ? port : 80,url,file);
            while (h.GetCount())
            return s.Complete();
            printf("Unknown protocol: '%s'\n",protocol.c_str());
      return false;

int main(int argc,char *argv[])
       std::string sArgv = argv[1];
      for (int i = 1; i < argc; i++)
            if (!Get(sArgv))
                  printf("Failed: %s\n",argv[i]);

When i issue step on the line Parse pa(url_in, sDelim); I reach HttpGetSocket.h:44 but I should reach Parse.cpp:66 , Aditionaly, gdb remains stuck on line 44 for two dozen next commands untill it finaly returns to Get, without ever reaching Parse constructor.

I need a solution that will get me into the code for Parse.cpp:66 so that I can continue debugging.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It seems that your Debug databases are not up-to-date. Reinstalling MINGW (latest version) should solve the problem.

You also could try to include a copy of parse.h and parse.cpp (in project source directory) to your project, thus getting refreshed debug information. However, you might get linking problems when doing that.

Regards, Alex

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cntfind80Author Commented:
I got the new version 3.4.2 of mingw special,
GNU gdb 2003-09-20-cvs (cygwin-special),

Moved the library source into the directory containing httpget.cpp and rebuilt first the static library, then rebuilt httpget.cpp And it worked, I can now step into Parse.cpp:66 as well as step into other things I was previously haveing trubles jumping into.

Many thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.