#define for Debug Mode?

Sysprogs forums Forums VisualGDB #define for Debug Mode?

  • This topic has 2 replies, 3 voices, and was last updated 4 weeks ago by Arek.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12823
    codex653
    Participant

    Hi,

    I’m curious if there is some kind of macro or define statement that would allow me to structure certain portions of my code to execute under the OpenOCD debugger with VisualGDB. Ideally it would be something like:

    if (IN_DEBUG_MODE)
    
    {
    
           //Execute debug specific code here that won't run normally
    
           // like the printf() statement to the ARM Semihosting Console
    
    }
    #12832
    support
    Keymaster

    Hi,

    Please try using #ifdef DEBUG.

    #36173
    Arek
    Participant

    Apparently DEBUG symbol is not visible during assembling (.S file)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.