OSDN Git Service

Set default visibility on art_sigsegv_fault.
authorOleksiy Vyalov <ovyalov@google.com>
Sun, 14 Jun 2015 22:17:26 +0000 (15:17 -0700)
committerNarayan Kamath <narayan@google.com>
Wed, 17 Jun 2015 08:16:09 +0000 (09:16 +0100)
libart.so is built with flag -fvisibility=protected
which complicates setting breakpoints on art_sigsegv_fault.
According to the GCC manual "Protected visibility indicates
that the symbol will be placed in the dynamic symbol table,
but that references within the defining module will bind
to the local symbol.". This implies that a breakpoint on
a protected symbol will not be hit.

Without this change gdbclient with ART debugging enabled
doesn't break at art_sigsegv_fault as expected.

Change-Id: Ib73344e710966eddf55a6facb29558504a511f00

runtime/fault_handler.cc

index 4a352dd..f5baa66 100644 (file)
@@ -73,6 +73,8 @@ namespace art {
 FaultManager fault_manager;
 
 extern "C" {
+
+__attribute__ ((visibility ("default")))
 void art_sigsegv_fault() {
   // Set a breakpoint here to be informed when a SIGSEGV is unhandled by ART.
   VLOG(signals)<< "Caught unknown SIGSEGV in ART fault handler - chaining to next handler.";