Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: mickagame on March 22, 2009, 11:20:10 am

Title: How to debug macros
Post by: mickagame on March 22, 2009, 11:20:10 am
Does someone know how to set code::block to allow debug of macros?
I've tried to compile with -gdwarf-2 -g3 flags but no results ...
Title: Re: How to debug macros
Post by: ollydbg on March 22, 2009, 01:46:41 pm
Does someone know how to set code::block to allow debug of macros?
I've tried to compile with -gdwarf-2 -g3 flags but no results ...
What do you mean by "debug macros"? Could you give a simple example?
Title: Re: How to debug macros
Post by: mickagame on March 22, 2009, 01:53:23 pm
Have the possibility to do "step by step" in macros defined in .h files.
Actually when the current step in debugger is a macro when you do step by step the debugger doesn't go in the macro.
Title: Re: How to debug macros
Post by: ollydbg on March 22, 2009, 02:00:03 pm
Really?
I don't think CB can do this :D
I haven't heard this function before.
Which IDE can do this? :shock:
Title: Re: How to debug macros
Post by: Ceniza on March 22, 2009, 03:59:08 pm
Macros are not compilable code, they are "generators". In other words, macros do not generate symbols or binary code at all, so there is no way you can step into them. What you can do, at most, is to preprocess a source file and see how macros were expanded... and that's it.
Title: Re: How to debug macros
Post by: mickagame on March 22, 2009, 07:56:16 pm
Before i was using dev cpp and i m sure i could do that !!!
Title: Re: How to debug macros
Post by: Seronis on March 22, 2009, 10:18:15 pm
are your macros simple enough that you could use an inline function instead?  do that and you can step into it.