[Lldb-commits] [PATCH] D35223: Report inferior SIGSEGV/SIGILL/SIGBUS/SIGFPE as a signal instead of an exception on freebsd
Karnajit Wangkhem via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 10 14:31:36 PDT 2017
karnajitw added a comment.
Adding the associated bugzilla link for this issue
https://bugs.llvm.org/show_bug.cgi?id=23699
[Before Fix]
[/home/karnajitw/llvm_50_public/build.symbol] $ bin/lldb ~/lldb_test_execs/sigsegv
(lldb) target create "/home/karnajitw/lldb_test_execs/sigsegv"
Current executable set to '/home/karnajitw/lldb_test_execs/sigsegv' (x86_64).
(lldb) run
Process 19312 launching
Process 19312 launched: '/home/karnajitw/lldb_test_execs/sigsegv' (x86_64)
Trying to write on a read only memory...
Process 19312 stopped
- thread #1, name = 'sigsegv', stop reason = signal SIGSEGV: address access protected (fault address: 0x4007e6) frame #0: 0x000000000040077c sigsegv`main at sigsegv.c:9 6 7 printf("Trying to write on a read only memory...\n"); 8
-> 9 *s = 'h';
10
11 printf("Exited normally...\n");
12
(lldb) c
Process 19312 resuming
Process 19312 stopped
- thread #1, name = 'sigsegv', stop reason = signal SIGSEGV: address access protected (fault address: 0x4007e6) frame #0: 0x000000000040077c sigsegv`main at sigsegv.c:9 6 7 printf("Trying to write on a read only memory...\n"); 8
-> 9 *s = 'h';
10
11 printf("Exited normally...\n");
12
[/home/karnajitw/llvm_50_public/build.symbol] $ bin/lldb ~/lldb_test_execs/sigill
(lldb) target create "/home/karnajitw/lldb_test_execs/sigill"
Current executable set to '/home/karnajitw/lldb_test_execs/sigill' (x86_64).
(lldb) run
Process 19141 launching
Process 19141 launched: '/home/karnajitw/lldb_test_execs/sigill' (x86_64)
Trying to trigger SIGILL
Process 19141 stopped
- thread #1, name = 'sigill', stop reason = unknown crash reason frame #0: 0x00000008008e45ca libc.so.7`__sys_thr_kill + 10
libc.so.7`__sys_thr_kill:
-> 0x8008e45ca <+10>: jb 0x800975474
0x8008e45d0 <+16>: retq
0x8008e45d1: nop
0x8008e45d2: nop
[After Fix]
[/usr/home/karnajitw/llvm_50_public/build.symbol] $ bin/lldb ~/lldb_test_execs/a.out
(lldb) target create "/home/karnajitw/lldb_test_execs/a.out"
Current executable set to '/home/karnajitw/lldb_test_execs/a.out' (x86_64).
(lldb) run
Process 17945 launching
Process 17945 launched: '/home/karnajitw/lldb_test_execs/a.out' (x86_64)
Trying to write on a read only memory...
Process 17945 stopped
- thread #1, name = 'a.out', stop reason = signal SIGSEGV frame #0: 0x000000000040077c a.out`main at sigsegv.c:9 6 7 printf("Trying to write on a read only memory...\n"); 8
-> 9 *s = 'h';
10
11 printf("Exited normally...\n");
12
(lldb) c
Process 17945 resuming
Process 17945 exited with status = -1 (0xffffffff)
[/home/karnajitw/llvm_50_public/build.symbol] $ bin/lldb ~/lldb_test_execs/sigill
(lldb) target create "/home/karnajitw/lldb_test_execs/sigill"
Current executable set to '/home/karnajitw/lldb_test_execs/sigill' (x86_64).
(lldb) run
Process 18529 launching
Process 18529 launched: '/home/karnajitw/lldb_test_execs/sigill' (x86_64)
Trying to trigger SIGILL
Process 18529 stopped
- thread #1, name = 'sigill', stop reason = signal SIGILL frame #0: 0x00000008008e45ca libc.so.7`__sys_thr_kill + 10
libc.so.7`__sys_thr_kill:
-> 0x8008e45ca <+10>: jb 0x800975474
0x8008e45d0 <+16>: retq
0x8008e45d1: nop
0x8008e45d2: nop
Repository:
rL LLVM
https://reviews.llvm.org/D35223
More information about the lldb-commits
mailing list