diff options
author | dim <dim@FreeBSD.org> | 2011-09-03 11:41:00 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-09-03 11:41:00 +0000 |
commit | 8e7c067b29e212e945f97d0fd375bdac77d5f73c (patch) | |
tree | 9650086a654d88a064f39a4ebec93a63964b0db3 /sys/kern/subr_kdb.c | |
parent | a6059bf016f4f1c6ce4e37142d4e06ed08e69759 (diff) | |
download | FreeBSD-src-8e7c067b29e212e945f97d0fd375bdac77d5f73c.zip FreeBSD-src-8e7c067b29e212e945f97d0fd375bdac77d5f73c.tar.gz |
When libexec/rtld-elf/rtld.c is compiled with clang, the r_debug_state()
function (a hook necessary for gdb support), is inlined, but since the
function contains no code, no calls to it are generated. When gdb is
debugging a dynamically linked program, this causes backtraces to be
corrupted.
Fix it by marking the function __noinline, and inserting an empty asm
statement, that pretends to clobber memory. This forces the compiler to
emit calls to r_debug_state() throughout rtld.c.
Approved by: re (kib)
Diffstat (limited to 'sys/kern/subr_kdb.c')
0 files changed, 0 insertions, 0 deletions