简体   繁体   中英

gdb core cannot access memory

When I use gdb check the core file. I find I can trace the source from GDB. And gdb gives>:

(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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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