Skip to content

Instantly share code, notes, and snippets.

@Arnold1
Created June 2, 2015 19:25
Show Gist options
  • Save Arnold1/4e76ea73f98c200fa163 to your computer and use it in GitHub Desktop.
Save Arnold1/4e76ea73f98c200fa163 to your computer and use it in GitHub Desktop.
disassemble4
gdb rust_blink
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 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 "arm-linux-gnueabihf".
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"...
Reading symbols from rust_blink...done.
(gdb) run
Starting program: /home/rust_blink
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x2a0041d8 in main::h7c904f0c83bbf9ffXma ()
(gdb) disassemble
Dump of assembler code for function _ZN4main20h7c904f0c83bbf9ffXmaE:
0x2a004088 <+0>: push {r4, r5}
0x2a00408c <+4>: mrc 15, 0, r4, cr13, cr0, {3}
0x2a004090 <+8>: mov r5, sp
0x2a004094 <+12>: ldr r4, [r4, #4]
0x2a004098 <+16>: cmp r4, r5
0x2a00409c <+20>: bcc 0x2a0040bc <_ZN4main20h7c904f0c83bbf9ffXmaE+52>
0x2a0040a0 <+24>: mov r4, #216 ; 0xd8
0x2a0040a4 <+28>: mov r5, #0
0x2a0040a8 <+32>: stmfd sp!, {lr}
0x2a0040ac <+36>: bl 0x2a004420 <__morestack>
0x2a0040b0 <+40>: ldmfd sp!, {lr}
0x2a0040b4 <+44>: pop {r4, r5}
0x2a0040b8 <+48>: bx lr
0x2a0040bc <+52>: pop {r4, r5}
0x2a0040c0 <+56>: push {r4, r5, r6, lr}
0x2a0040c4 <+60>: sub sp, sp, #200 ; 0xc8
0x2a0040c8 <+64>: add r4, sp, #88 ; 0x58
0x2a0040cc <+68>: mov r0, r4
0x2a0040d0 <+72>: bl 0x2a006e04 <_ZN2fs11OpenOptions3new20h20814d83a2bb3049m2eE>
0x2a0040d4 <+76>: mov r0, r4
---Type <return> to continue, or q <return> to quit---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment