Code::Blocks Forums

User forums => Help => Topic started by: GNEPO on April 14, 2016, 10:36:41 am

Title: What's difference in callstack window between jump on doubleclick and switch on
Post by: GNEPO on April 14, 2016, 10:36:41 am
Consider the following code, but not the question about code.
#include <iostream>

void CallC()
{
    // put a break point here and then click debug start
    std::cout << "C called" << std::endl;
}

void CallB()
{
    std::cout << "B called" << std::endl;
    CallC();
}

void CallA()
{
    CallB();
    CallC();
}

int main()
{
    CallA();

    return 0;
}

I wonder what's difference they are, i have try both of them, but nothing difference happens. But i know here have difference between them. Thanks for your answer :)
Title: Re: What's difference in callstack window between jump on doubleclick and switch on
Post by: scarphin on April 14, 2016, 12:31:14 pm
Jump: jumps to the function,
Switch: switches to the stack frame that is allocated for the function.
Title: Re: What's difference in callstack window between jump on doubleclick and switch on
Post by: oBFusCATed on April 14, 2016, 06:44:03 pm
Jump to function just moves the cursor to the file:line for that stack frame.
Switch to frame tells the debugger that this frame is the active frame and so all watches are evaluated for this frame.
Title: Re: What's difference in callstack window between jump on doubleclick and switch on
Post by: GNEPO on April 16, 2016, 04:07:25 pm
Thanks :) well done.