使用GDB扫描系统调用表

时间:2011-12-09 06:10:13

标签: memory operating-system gdb linux-kernel kernel

我试过扫描系统调用表来打印系统调用地址

$ sudo gdb /usr/src/linux-2.6.38.8/vmlinux /proc/kcore
(gdb) x/255x 0xc12ab280 
0xc12ab280: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab290: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab2a0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab2b0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab2c0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab2d0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab2e0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab2f0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab300: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab310: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab320: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab330: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab340: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab350: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab360: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab370: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab380: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab390: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab3a0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab3b0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab3c0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab3d0: 0x00000000  0x00000000  0x00000000  0x00000000
0xc12ab3e0: 0x00000000  0x00000000  0x00000000  0x00000000

我不明白为什么打印0x00000000 0x00000000 0x00000000 0x00000000

1 个答案:

答案 0 :(得分:1)

我不知道你从哪里得到那个地址但是:

x/255x (unsigned long*) sys_call_table

在我的linux上工作正常。