Skip to content

Instantly share code, notes, and snippets.

@vwvw
Created October 13, 2018 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vwvw/55f7e8a4815c9db4de44260b72e35808 to your computer and use it in GitHub Desktop.
Save vwvw/55f7e8a4815c9db4de44260b72e35808 to your computer and use it in GitHub Desktop.
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
Reading /root/qemu/i386-linux-user/qemu-i386 from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /root/qemu/i386-linux-user/qemu-i386 from remote target...
Reading symbols from target:/root/qemu/i386-linux-user/qemu-i386...done.
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading symbols from target:/lib64/ld-linux-x86-64.so.2...Reading /lib64/ld-2.23.so from remote target...
Reading /lib64/.debug/ld-2.23.so from remote target...
(no debugging symbols found)...done.
0x00007ffff7dd7c30 in ?? () from target:/lib64/ld-linux-x86-64.so.2
(gdb) ni 256
Reading /lib/x86_64-linux-gnu/libglib-2.0.so.0 from remote target...
Reading /lib/x86_64-linux-gnu/librt.so.1 from remote target...
Reading /lib/x86_64-linux-gnu/libm.so.6 from remote target...
Reading /lib/x86_64-linux-gnu/libpthread.so.0 from remote target...
Reading /lib/x86_64-linux-gnu/libc.so.6 from remote target...
Reading /lib/x86_64-linux-gnu/libpcre.so.3 from remote target...
Reading /lib/x86_64-linux-gnu/librt-2.23.so from remote target...
Reading /lib/x86_64-linux-gnu/.debug/librt-2.23.so from remote target...
Reading /lib/x86_64-linux-gnu/libm-2.23.so from remote target...
Reading /lib/x86_64-linux-gnu/.debug/libm-2.23.so from remote target...
Reading /lib/x86_64-linux-gnu/libc-2.23.so from remote target...
Reading /lib/x86_64-linux-gnu/.debug/libc-2.23.so from remote target...
Reading /lib/x86_64-linux-gnu/libpcre.so.3.13.2 from remote target...
Reading /lib/x86_64-linux-gnu/.debug/libpcre.so.3.13.2 from remote target...
Warning:
Cannot insert breakpoint 0.
Cannot access memory at address 0x8
0x00007ffff7dd7c49 in ?? () from target:/lib64/ld-linux-x86-64.so.2
(gdb) ni 256
[New Thread 5516.5519]
0x00000000600354af 287 trapnr = cpu_x86_exec(env);
(gdb) n 483
287 trapnr = cpu_x86_exec(env);
(gdb) bt
#0 cpu_loop (env=0x62415d00) at /root/qemu/linux-user/main.c:287
#1 0x0000000060037273 in main (argc=8, argv=0x7fffffffe428,
envp=0x7fffffffe470) at /root/qemu/linux-user/main.c:4412
(gdb) n
Thread 1 "qemu-i386" received signal SIGSEGV, Segmentation fault.
0x000000006005c4d9 in ldub_p (ptr=0x7ffefc55d013)
at /root/qemu/include/qemu/bswap.h:235
235 return *(uint8_t *)ptr;
(gdb) bt
#0 0x000000006005c4d9 in ldub_p (ptr=0x7ffefc55d013)
at /root/qemu/include/qemu/bswap.h:235
#1 0x000000006006d704 in cpu_ldub_code (env=0x62415d00, ptr=19)
at /root/qemu/include/exec/cpu_ldst_useronly_template.h:56
#2 0x0000000060078c98 in disas_insn (env=0x62415d00,
s=0x7fffffffd8f0, pc_start=19)
at /root/qemu/target-i386/translate.c:4432
#3 0x0000000060083601 in gen_intermediate_code_internal (
cpu=0x6240dab0, tb=0x7ffff357b4f0, search_pc=false)
at /root/qemu/target-i386/translate.c:8028
#4 0x00000000600838f8 in gen_intermediate_code (env=0x62415d00,
tb=0x7ffff357b4f0) at /root/qemu/target-i386/translate.c:8109
#5 0x0000000060008d3e in cpu_x86_gen_code (env=0x62415d00,
tb=0x7ffff357b4f0, gen_code_size_ptr=0x7fffffffda38)
at /root/qemu/translate-all.c:160
#6 0x0000000060009db7 in tb_gen_code (cpu=0x6240dab0, pc=19,
cs_base=0, flags=4194483, cflags=0)
at /root/qemu/translate-all.c:1064
#7 0x000000006000b708 in tb_find_slow (env=0x62415d00, pc=19,
cs_base=0, flags=4194483) at /root/qemu/cpu-exec.c:299
#8 0x000000006000b875 in tb_find_fast (env=0x62415d00)
at /root/qemu/cpu-exec.c:327
#9 0x000000006000bcc6 in cpu_x86_exec (env=0x62415d00)
at /root/qemu/cpu-exec.c:485
#10 0x00000000600354b7 in cpu_loop (env=0x62415d00)
at /root/qemu/linux-user/main.c:287
#11 0x0000000060037273 in main (argc=8, argv=0x7fffffffe428,
envp=0x7fffffffe470) at /root/qemu/linux-user/main.c:4412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment