开发者

How can I add breakpoint to internal function

开发者 https://www.devze.com 2023-04-05 20:00 出处:网络
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?

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

精彩评论

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