On 5/26/07, mop <[EMAIL PROTECTED]> wrote:
> I wish to debug a code that has a lot of #ifdef statements. The code is old
> and as I understand it, it is no longer maintained. It's a Linux/Unix
> application and it appears that the #ifdef statements relate to the
> differnet operating systems. It makes it an absolute bitch to trace through
> in a debugger, and to work out what to expect the code to do. Is there a way
> to pre-process the source code on the operating system that I am using to
> remove the #ifdef statements leaving only the code for that system? I am
> trying to get it working on Debian. With gcc I could use the -E switch, but
> will require quite a bit of manual source code editing.
>
> Does anyone have any other suggestions?
Using -E with gcc (or using cpp, which amounts to the same thing,
generating pre-processed source code) is about all you can do here,
aside from rewriting the code, unless there is some way to
conditionally pre-process...
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi