开发者

How can I add breakpoint to internal function

I'm using GDB to step through the code.

The problem is my code has functions from external files. Is there a way on stepping through inner functions?

like this:

    int main 
    { 
    string a ="AAA开发者_运维百科"; 
    DoString(a);
    }

Is there a way on stepping through execution of DoString with GDB?


You mention assembly in the tags, so I assume the function is not in C. Just use si (short for stepi) GDB command to step one machine instruction at a time. See the manual.


After breaking at the function with break DoString , executing step will take you further down into the call and next will just step over it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜