Re: Can you get XCode to expand macros before debugging?
Re: Can you get XCode to expand macros before debugging?
- Subject: Re: Can you get XCode to expand macros before debugging?
- From: Chris Espinosa <email@hidden>
- Date: Wed, 4 Feb 2004 15:45:04 -0800
On Feb 4, 2004, at 2:36 PM, Karan, Cem (Civ,ARL/CISD) wrote:
I've been using a series of macros to rubber stamp out code that is too
time critical to put into a function,
Try using inline functions. The benefits of rubber-stamping code, but
without the complications of macros.
but have run into debugging
problems. Basically, you can't set breakpoints or otherwise work with
the internals of macros from XCode (or anything else AFAIK).
This is endemic to use of the preprocessor.
My current
workaround solution is to go to the terminal, run gcc -E, clean up the
output, put it back into my code, and then debug, but this seems like a
pretty nasty way of doing things.
With the source file open and your Current Target pulldown set to a
target that includes it, choose Preprocess... from the Build menu. In
a little while a window will open with your preprocessed source code.
If you include framework headers (like Carbon.h or Cocoa.h) it may be
very large and take up to a minute to load, and your source will be
down at the very bottom.
I know that I'll have this code
debugged very shortly no matter what happens, but I was wondering if
there is a simple way of debugging code that is in macros from XCode.
If there isn't, I'll put this in as a feature request for sometime in
the future.
Some versions of gcc and gdb support extensions to the -g flag that
generate macro information for gdb to use; unfortunately, the Mac OS X
implementation does not support these extensions.
Chris Espinosa
Apple
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.