GDB and Reverse Debugging

2023-11-19

Overview

GDB version 7.0 (due September 2009) will be the first public release of gdb to support reverse debugging (the ability to make the program being debugged step and continue in reverse)

Presently, only certain target debugging environments will support reverse debugging. Those targets currently include:

All of those targets, plus any additional ones in the future, will support a common user interface for reverse debugging in gdb, including the new commands:

  • reverse-continue ('rc') -- Continue program being debugged but run it in reverse
  • reverse-finish -- Execute backward until just before the selected stack frame is called
  • reverse-next ('rn') -- Step program backward, proceeding through subroutine calls.
  • reverse-nexti ('rni') -- Step backward one instruction, but proceed through called subroutines.
  • reverse-step ('rs') -- Step program backward until it reaches the beginning of a previous source line
  • reverse-stepi -- Step backward exactly one instruction
  • set exec-direction (forward/reverse) -- Set direction of execution.
    All subsequent execution commands (continue, step, until etc.) will run the program being debugged in the selected direction.

We must use "record" command to record the stack infomation etc. And use "record stop" command to stop recording the stack infomation and so on.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

GDB and Reverse Debugging 的相关文章

  • Nginx:配置worker进程的所属用户

    Nginx的配置文件 etc nginx nginx conf中定义了启动worker时的所属用户 全局块 user www data worker进程的所属用户 nginx默认设置为www data 但如果该用户配置的不正确 可能造成业务
  • Linux内核模块管理

    模块的全称是动态可加载内核模块 它是具有独立功能的程序 可以被单独编译 但不能独立运行 模块是为内核或其他模块提供功能的代码集合 这些模块可以是 Linux 源码中自带的 也可以是由硬件厂商开发的 可以想象成驱动 安装模块一般有两种方法 第
  • linux服务器 top 查看 内存占用详情

    前言 前几天登录云服务器突然发现没几个服务内存竟然快占满了 于是赶快top查看 发现直接top查看的话 也不太好分析是哪个应用占用的内存比较大 于是谷歌了一番记录了以下几种查内存占用情况的方法 查看内存占用情况的几种方法 free命令 命令
  • linux常用命令总结

    linux常用命令总结 1 在根目录下查找xxx文件 2 列出程序启动时搜索库路径的过程 3 查看程序或so的依赖 1 查看Test程序依赖的so文件 2 也可以查看so依赖的文件 4 SSH相关 5 查看当前登录的用户 6 查看重启 登录
  • Linux清除原有ssh密钥方法

    Linux清除原有ssh密钥方法 1 问题现象 以前在mac的终端下面使用ssh user localhost输入密码就可以连接到远程的SSH服务器 今天连接的时候老是提示如下错误 KENFORFORLIN kenforstar sudo
  • gdb如何调试动态链接库

    gdb file
  • Googletest 实现简要分析

    借助于 Googletest 测试框架 我们只需编写测试用例代码 并定义简单的 main 函数 编译之后并运行即可以把我们的测试用例跑起来 更详细的内容可参考 Googletest 入门 但 main 函数调用 RUN ALL TESTS
  • Linux异步IO实现方案总结

    一 glibc aio 1 名称 由于是glibc提供的aio函数库 所以称为glibc aio glibc是GNU发布的libc库 即c运行库 另外网上还有其他叫法posix aio 都是指glibc提供的这套aio实现方案 2 主要接口
  • Android/Linux EAS优化-schedtune

    Linux cgroups机制中的cpu cpuset schedtune子系统 跟linux android进程调度策略有关 记录下各项功能参数的用法 SchedTune SchedTune是一项与CPU调频相关的性能提升技术 它实现为一
  • x86中vdso数据段的初始化及更新和使用

    1 vdso 数据段的初始化 1 数据段的定义 vdso 数据段由内核进行声明和定义 其中 在链接脚本 arch x86 entry vdso vdso layout lds S 里指定了 vdso 的数据段的名称和位置 相关内容如下 SE
  • ubuntu+vscode构建c++开发调试环境

    1 vscode下载与安装 下载 Visual Studio Code Mac Linux Windows下载deb文件 运行指令安装vscode sudo dpkg i xxx deb 如果报 dpkg 错误 另外一个进程已经为 dpkg
  • Linux下的时间(ZZ)

    1 Linux下的时间 1 1 Linux下的时间系统 1 2 Linux下与时间有关的数据结构 2 获得当前时间 3 延时 4 定时器 4 1 alarm 4 2 setitimer 1 Linux下的时间1 1 Linux下的时间系统
  • Ubuntu搭建Nginx服务器

    Ubuntu搭建Nginx服务器 安装Nginx 配置文件 全局配置文件 子配置文件管理 sites availables和sites enabled default配置文件 启动 停止 重启Nginx 启动 停止 重启 查询 其他设置 自
  • valgrind 在开发板上运行以及使用

    前言 bedug无处不在 今天花落我家 现象 一个月出现一次异常 难易复现排查 借助神器valgrind排查 1 下载及编译准备 下载地址 https www valgrind org tar jxvf valgrind 3 16 1 ta
  • Linux的c编程-文件节点的打开与读写操作

    1 open 打开文件 相关函数 read write fcntl close link stat umask unlink fopen 表头文件 include
  • /sys/module 模块信息与 /proc/modules

    看到一篇关于 proc moduels 以及 sys module 相关介绍 转载一下 http linux chinaunix net techdoc system 2008 07 18 1018163 shtml 在编译模块的时候 如果
  • Ubuntu(20.04):设置DNS

    编辑文件 etc systemd resolved conf 设置DNS 8 8 8 8 114 114 114 114 保存退出后 以sudo身份运行 systemctl restart systemd resolved systemct
  • 通过进入单用户模式解决linux中的rc.local修改后无法启动的问题

    问题 本想将teamviewer这个软件随linux自启动 所以将其启动命令放在rc local中 但是重启后发现linux启动不起来了 系统前面都是正常启动的 就是无法进入帐户登陆界面 无法输入root帐号密码 不能登陆到系统 按了ctr
  • GDB and Reverse Debugging

    Overview GDB version 7 0 due September 2009 will be the first public release of gdb to support reverse debugging the abi
  • linux 复位usb设备 模拟热插拔脚本

    获取USB设备数量 DEVICE NUM lspci grep USB awk F print 1 wc l 获取设备号 DEVICE lspci grep USB awk F print 0000 1 sed n i p 设备解绑 ech

随机推荐