首页 > 解决方案 > 如何在 pwndbg 中为使用 -g 选项编译的可执行文件打印更多代码行?

问题描述

我想用于使用选项pwndbg编译的可执行文件-g,我想查看pwndbg. 使用命令context code仅显示 8 行代码:

   1 #include <stdio.h>
   2 
 ► 3 int main() {
   4    unsigned int a = 4127;
   5    int b = -27714;
   6    short c = 1475;
   7    int v[] = {0xCAFEBABE, 0xDEADBEEF, 0x0B00B135, 0xBAADF00D, 0xDEADC0DE};
   8 

不幸的是,我需要更多的行,并且该命令context code <number_of_lines>不起作用。还有其他方法可以打印更多行代码吗?

标签: cgdbpwntools

解决方案


推荐阅读