简体   繁体   English

gdb 内核无法访问 memory

[英]gdb core cannot access memory

When I use gdb check the core file.当我使用 gdb 检查核心文件。 I find I can trace the source from GDB.我发现我可以从 GDB 追踪来源。 And gdb gives>:而gdb给出>:

(gdb) bt
#0  0x00b677a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00ba77f5 in raise () from /lib/tls/libc.so.6
#2  0x00ba92f1 in abort () from /lib/tls/libc.so.6
#3  0x0804c7a6 in segmentViolation (sig=11) at util.c:49
#4  <signal handler called>
#5  0x34393930 in ?? ()
#6  0x424f0a0d in ?? ()
#7  0x53455459 in ?? ()
#8  0x3332323a in ?? ()
#9  0x0d303936 in ?? ()
#10 0x0000000a in ?? ()
#11 0x00000000 in ?? ()
(gdb) frame
#0  0x00b677a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) info threads
  3 process 12059  0x00b677a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
  2 process 12061  0x00b677a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
* 1 process 12060  0x00b677a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) up
#1  0x00ba77f5 in raise () from /lib/tls/libc.so.6
(gdb) up
#2  0x00ba92f1 in abort () from /lib/tls/libc.so.6
(gdb) up
#3  0x0804c7a6 in segmentViolation (sig=11) at util.c:49
49      util.c: No such file or directory.
        in util.c
(gdb) up
#4  <signal handler called>
(gdb) up
#5  0x34393930 in ?? ()
(gdb) up
#6  0x424f0a0d in ?? ()
(gdb) info stack
#0  0x00b677a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00ba77f5 in raise () from /lib/tls/libc.so.6
#2  0x00ba92f1 in abort () from /lib/tls/libc.so.6
#3  0x0804c7a6 in segmentViolation (sig=11) at util.c:49
#4  <signal handler called>
#5  0x34393930 in ?? ()
#6  0x424f0a0d in ?? ()
#7  0x53455459 in ?? ()
#8  0x3332323a in ?? ()
#9  0x0d303936 in ?? ()
#10 0x0000000a in ?? ()
#11 0x00000000 in ?? ()
(gdb) frame 5
#5  0x34393930 in ?? ()
(gdb) frame 10
#10 0x0000000a in ?? ()
(gdb) info locals
No symbol table info available.
(gdb) info frame
Stack level 10, frame at 0xb7fe5378:
 eip = 0xa; saved eip 0x0
 called by frame at 0xb7fe537c, caller of frame at 0xb7fe5374
 Arglist at 0xb7fe5370, args: 
 Locals at 0xb7fe5370, Previous frame's sp is 0xb7fe5378
 Saved registers:
  eax at 0xb7fe50b4, ecx at 0xb7fe50b0, edx at 0xb7fe50ac, ebx at 0xb7fe50a8, ebp at 0xb7fe50a0,
  esi at 0xb7fe509c, edi at 0xb7fe5098, eip at 0xb7fe5374, cs at 0xb7fe50c4, ss at 0xb7fe50d0, ds at 0xb7fe5094,
  es at 0xb7fe5090, fs at 0xb7fe508c, gs at 0xb7fe5088
(gdb) frame 9

Can some one help me,, it's headacke!谁能帮帮我,太头疼了!

It looks like you stripped the symbols from the library.看起来您从库中删除了符号。 Do not do that, and you should see the backtrace.不要那样做,你应该看到回溯。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM