是否可以“跳跃"/“跳过"?在 GDB 调试器中? [英] Is it possible to "jump"/"skip" in GDB debugger?

查看:28
本文介绍了是否可以“跳跃"/“跳过"?在 GDB 调试器中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 GDB 中调试时是否可以跳转到代码/可执行文件中的某个位置/地址?

Is it possible to jump to some location/address in the code/executable while debugging in GDB ?

假设我有类似以下内容

int main()
{
  caller_f1() {  

   f1();  // breakpoint  
   f2() } // want to skip f2() and jump 

  caller_f2() { // jump to this this location ??       
   f1();  
   f2(); }  
}

推荐答案

似乎有一个跳转命令正是您要找的:

There seems to be a jump command which is exactly what you are looking for:

http://idlebox.net/2010/apidocs/gdb-7.0.zip/gdb_18.html#SEC163

更新链接:http://web.archive.org/web/20140101193811/http://idlebox.net/2010/apidocs/gdb-7.0.zip/gdb_18.html#SEC163

这篇关于是否可以“跳跃"/“跳过"?在 GDB 调试器中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆