[sldev] CMake 2.6.2 RC 3

Bill Hoffman bill.hoffman at kitware.com
Wed Sep 10 09:44:09 PDT 2008


Aimee Walton wrote:
> On 9 Sep 2008, at 20:07, Bill Hoffman wrote:
> 
>> Can you send me the CMakeCache.txt from both?
>>
>> Thanks.
>>
>> One thing I did notice is that the 2.6.2 one is using -gdwarf-2 for 
>> some reason...
>>
>> Also, what version of Xcode are you using?
>>
>> -Bill
> 
> This is on Xcode 3.1
> 
> Aimee.
> 
OK, wait, I am able to reproduce this with Xcode 3.0, and you are 
getting debug symbols...


If you look at the build log you sent me you can see:

...
     setenv DEBUGGING_SYMBOLS YES
     setenv DEBUG_INFORMATION_FORMAT dwarf
    setenv GCC_GENERATE_DEBUGGING_SYMBOLS YES
...

  /Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -fmessage-length=0 -pipe 
-Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -mdynamic-no-pic 
-DCMAKE_INTDIR="Debug" -gdwarf-2 ...

-gdwarf-2 is adding debug to the project, just not with -g.


In the cmake 2.4.8 project, it has this:
    setenv DEBUGGING_SYMBOLS YES
     setenv DEBUG_INFORMATION_FORMAT dwarf
    setenv GCC_GENERATE_DEBUGGING_SYMBOLS NO
    setenv OTHER_CFLAGS "-Wall -Wno-sign-compare -Wno-trigraphs -Werror 
  -mlong-branch -g  "

So, in 2.4.8 it was doing it the wrong way.  It was adding -g to the 
cflags instead of using the native Xcode debugging approach.  If I 
generate a project via the Xcode GUI, it works like the CMake 2.6.2 
project, and uses -gdwarf-2 instead of -g.

One of the other CMake developers said this:

"I had a problem debugging stuff a couple weeks ago and had to uncheck 
the "Load symbols lazily" checkbox in the Xcode Debugging Preferences 
dialog."

What makes you think it does not have debug symbols?

-Bill





-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518-371-3971 (phone and fax)


More information about the SLDev mailing list