Using gdb to single-step assembly code outside specified executable causes error “cannot find bounds of current function”

后端 未结 3 1253
孤独总比滥情好
孤独总比滥情好 2020-12-02 04:47

I\'m outside gdb\'s target executable and I don\'t even have a stack that corresponds to that target. I want to single-step anyway, so that I can verify what\'s going on in

3条回答
  •  离开以前
    2020-12-02 05:17

    The most useful thing you can do here is display/i $pc, before using stepi as already suggested in R Samuel Klatchko's answer. This tells gdb to disassemble the current instruction just before printing the prompt each time; then you can just keep hitting Enter to repeat the stepi command.

    (See my answer to another question for more detail - the context of that question was different, but the principle is the same.)

提交回复
热议问题