Home  >  Q&A  >  body text

c++ - gdb调试,如果一行有多个函数,如何指定步入哪一个?

QueryVarVal vv(VAR_VAL_SCHEMA, variable, sc, sc->getId());

我想步入的是外面这个函数vv(),但是实际调试的时候它步入的是后面的函数sc->getId()

阿神阿神2764 days ago578

reply all(4)I'll reply

  • 黄舟

    黄舟2017-04-17 11:36:17

    If no additional breakpoints are added:

    s        # enter sc->getId()
    finish   # exit sc->getId()
    s        # enter vv()
    

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:36:17

    Execution order issue.
    vv

    will be entered after executing sc->getId()

    reply
    0
  • PHPz

    PHPz2017-04-17 11:36:17

    b vv
    continue

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 11:36:17

    Use the call command to call a function, or try jumping

    reply
    0
  • Cancelreply