• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
gdb source code out of sync
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdb source code out of sync


  • Subject: gdb source code out of sync
  • From: "Eric Feigenson" <email@hidden>
  • Date: Tue, 7 Feb 2006 13:56:33 -0500


Howdy all...

I started out with Xcode, and took it out of the equation, so that gdb seems to be the culprit.

The problem is that if I say to gdb "break Myclass::Mymethod" (I'm in C++), it shows the breakpoint being set several lines BEFORE the start of the function. In many cases, this is in the middle of a block comment before the start of the function definition. gdb will break at that point (when the function is invoked), but it will show the current line to be (for example) in the middle of the comment, so I have no idea where it really is. Stepping into the function doesn't get it back in sync.

Some files seem to be OK in this regard, others (the ones I need to debug, of course) show this problem consistantly. The files are compiled with -g and -O0 (no optimization). There is only one copy of the source file on the machine (so gdb wouldn't be getting the wrong one.)  I've also erased the object files (ALL of them) and recompiled & linked without any change.  Note that this isn't an Xcode project, it was developed outside of Xcode and I was trying to debug it using Xcode, had this out of sync problem, and went direct to gdb which is where the actually problem seems to be.


Other particulars:
GNU gdb 6.1-20040303 (Apple version gdb-437) (Sun Dec 25 08:31:29 GMT 2005)
g++-3.3 (GCC) 3.3 20030304 (Apple Computer, Inc. build 1819)

Has anyone else seen this problem, or better yet, know of a fix? It's driving me nutz! When I searched the list archives the last relevant post I saw was 2004, so I'm hoping there's been some progress since then

Thanks!

-Eric
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: gdb source code out of sync
      • From: Jim Ingham <email@hidden>
  • Prev by Date: Re: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4?
  • Next by Date: Re: STL vector debugging
  • Previous by thread: Re: generating a core file in 10.4.4.
  • Next by thread: Re: gdb source code out of sync
  • Index(es):
    • Date
    • Thread