user51511
user51511

Reputation:

Is there a GCC pragma to override generation of debug info (-g) for some section of code?

I'd like to include some debug information in an application, but hide certain symbols from appearing. Is there any way to do this with GCC 4.0 (or 4.2)? This is on OSX.

Upvotes: 3

Views: 1346

Answers (1)

Aaron Digulla
Aaron Digulla

Reputation: 328760

Move all such code into a single source file and compile that without -g. Note that you can't omit global symbol names for obvious reasons.

Upvotes: 2

Related Questions