Created
February 24, 2012 00:04
-
-
Save bioinfornatics/1895954 to your computer and use it in GitHub Desktop.
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
$ ldc2 -shared test.d -soname test.so -g | |
$ gcc test.c -L. -ltest -otest -g | |
$ LD_LIBRARY_PATH=`pwd`gdb ./test | |
./test: error while loading shared libraries: test.so: cannot open shared object file: No such file or directory | |
$ LD_LIBRARY_PATH=`pwd` gdb ./test | |
(gdb) b 5 | |
Breakpoint 1 at 0x400608: file test.c, line 5. | |
(gdb) r | |
Starting program: /home/jonathan/gist1895766-f0e685b77e79cb33e4bf55282f991e627ec703cb/test | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib64/libthread_db.so.1". | |
Breakpoint 1, main () at test.c:5 | |
5 test_func(); | |
(gdb) l | |
1 void test_func(); | |
2 | |
3 int main() | |
4 { | |
5 test_func(); | |
6 return 0; | |
7 } | |
(gdb) s | |
Program received signal SIGSEGV, Segmentation fault. | |
0x00007ffff7dfbafa in std.stdio.__T7writelnTAyaZ.writeln() (_param_0=...) at /usr/include/d/std/stdio.d:1550 | |
1550 enforce(fprintf(.stdout.p.handle, "%.*s\n", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you get this fixed at some point? I have similar issues.