Created
September 9, 2015 14:17
-
-
Save pnkfelix/772b08ccc6915a626366 to your computer and use it in GitHub Desktop.
transcript of running demo_3f under gdb and disassembling resulting code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% cargo run --example demo_3f | |
Running `target/debug/examples/demo_3f` | |
; ModuleID = 'simple' | |
; Function Attrs: nounwind readnone | |
define double @thr(double) #0 { | |
entry: | |
ret double 3.000000e+00 | |
} | |
attributes #0 = { nounwind readnone } | |
An unknown error occurred | |
To learn more, run the command again with --verbose. | |
% gdb ./target/debug/examples/demo_3f | |
GNU gdb (GDB) 7.9.1 | |
Copyright (C) 2015 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-unknown-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"... | |
Reading symbols from ./target/debug/examples/demo_3f...done. | |
warning: Missing auto-load scripts referenced in section .debug_gdb_scripts | |
of file /home/pnkfelix/Dev/Rust/lang-gc/llvm-rs/target/debug/examples/demo_3f | |
Use `info auto-load python-scripts [REGEXP]' to list them. | |
(gdb) r | |
Starting program: /home/pnkfelix/Dev/Rust/lang-gc/llvm-rs/target/debug/examples/demo_3f | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
; ModuleID = 'simple' | |
; Function Attrs: nounwind readnone | |
define double @thr(double) #0 { | |
entry: | |
ret double 3.000000e+00 | |
} | |
attributes #0 = { nounwind readnone } | |
Program received signal SIGSEGV, Segmentation fault. | |
0x00007ffff7ff4000 in thr () | |
(gdb) disassemble thr | |
Dump of assembler code for function thr: | |
=> 0x00007ffff7ff4000 <+0>: movsd xmm1,QWORD PTR ds:0xfffffffff7ff3000 | |
0x00007ffff7ff4009 <+9>: movsd QWORD PTR [rsp-0x8],xmm0 | |
0x00007ffff7ff400f <+15>: movaps xmm0,xmm1 | |
0x00007ffff7ff4012 <+18>: ret | |
End of assembler dump. | |
(gdb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment