Omgili - forum search, search forums  
  

Discussions about debug macros

Displaying 1 - 10 out of 4,937 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
Hello, I've got a pretty complicated macro inside my (unmanaged) C++ code. Is there any way to expand macros in VS debugger? Or maybe there is another way to debug macros there? F.e. I'd like to place a breakpoint inside it. (Yes, I know macros are bad...
Started by on , 7 posts by 7 people.  
Recompile and you should be able to step, whichever....
Insert the expanded macro into your code.
Can read about with the macros expanded.
You can debug macros with VS macros IDE.
Macros are not that bad if used wisely.
In C, what is the proper way to define a printf like macro that will print only when DEBUG symbol is defined? #ifdef DEBUG #define DEBUG_PRINT(???) ??? #else #define DEBUG_PRINT(???) ??? #endif where ??? is where I am not sure what to fill in
Started by on , 4 posts by 4 people.  
Something like: #ifdef DEBUG #define DEBUG_PRINT(fmt, args...) fprintf(stderr, fmt, ## args) #else #define DEBUG_PRINT(fmt, args...) /* Don't do anything in release builds */ #endif #ifdef DEBUG #define DEBUG_PRINT(....
In general, I occasionally have a chain of nested macros with a few preprocessor conditional elements in their definitions. These can be painful to debug since it's hard to directly see the actual code being executed. A while ago I vaguely remember finding...
Started by on , 6 posts by 6 people.  
This might not be applicable in your situation, but macros really do hamper debugging and often all together? You should probably....
Debug the dissasembly with the symbols loaded.
Gcc -E will output the preprocessed source to stdout.
Ask your Facebook Friends
Hi, I am using the following macro for printing debug information that I found on the web. It works great. However, I would like to turn-off debug printing for function A when debugging function B, which calls function A. I tried #define NDEBUG function...
Started by on , 3 posts by 3 people.  
#undef MY_DEBUG result = B(); #define MY_DEBUG....
You can do something like this though: #if defined(NDEBUG) || !defined(MY_DEBUG(WHERESTR _fmt, WHEREARG, __VA_ARGS__) #endif /* NDEBUG */ Then, in function A(): ...
Will not do anything.
What is the standard macro used to write text to the output window in Win32 (outside MFC)? I am looking for something which the pre-processor conditionally excludes from the release build. (This might sound like SO sacrilege but I've merely forgotten ...
Started by on , 4 posts by 4 people.  
Maybe you're thinking of ATLTRACE? Not quite "the standard macro", but pretty close for this, which is a debug....
There is a trace macro macros a try.
It'll send output to the debug channel.
OutputDebugString(char*).
A CrEaTiVe aRtZ Guide Mangos and Macros M&M's Here's a guide for a command that you've almost certainly passed by while relaxing on your server. The debug command. Perhaps you've heard of it. Chances are you've seen this command many times but simply ...
Started by on , 4 posts by 2 people.  
Pretty useful, + rep.
Screwed up the mount number to use for the debug command, it's now fixed.
I know that JavaScript doesn't support macros (Lisp-style ones) but I was wondering if anyone had a solution to maybe simulate macros? I Googled it, and one of the solutions suggested using eval(), but as he said, would be quite costly. They don't really...
Started by on , 7 posts by 7 people.  
That'll give you macros....
Most of the JavaScript: var a, b, c, d; d = c = b = a; Several methods in jQuery are all essentially macros, although you .
Is to use functions, shorthand and ternary conditions as a replacement for macros.
I've been working with a large codebase written primarily by programmers who no longer work at the company. One of the programmers apparently had a special place in his heart for very long macros. The only benefit I can see to using macros is being able...
Started by on , 10 posts by 10 people.  
If the macros exists of copying code....
Inline functions serve every useful purpose a macro, and replacing the macro output with function calls (inline if possible) or straight LOC.
I don't use macros at all.
What you describe.
What is the worst real-world macros/pre-processor abuse you've ever come across (please no contrived IOCCC answers *haha*)? Please add a short snippet or story if it is really entertaining. The goal is to teach something instead of always telling people...
Started by on , 59 posts by 54 people.  
MrValdez is annoyed by the GetObject macro found(-1); \ } \ I was pretty new to the practice of using macros and used this macro, but I expected to load the correct Roster....
Windows.h has a lot of functions that abused macros.
In my experience, not all macros have been evil. Along the course of my career, macros have been useful in a limited context. In MFC, message crackers provided a concise DSL-like description for message maps. Type-agnostic macros provided useful utility...
Started by on , 19 posts by 19 people.  
Macros in C++ are not always evil answer, for example, is probably....
Sure, if a macro language is designed right then it makes it easier, but I have yet to use", for any value of "thing" that can be written as a macro.
To debug.
Page: 1   2   3   4   5   6   7   8   9   10  

Related Message Boards & Forums

  • Stack Overflow
  • WoW EMU Guides & Tutorials [Archive] - OwnedCore - World of Warcraft Exploits Hacks Bots and Guides...
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost