Commit graph

15 commits

Author SHA1 Message Date
Andy McFadden
1db6f2db49 Test flags before using "info"
Our debugger signal catcher expects to receive three args, but if
somebody cleared SA_SIGINFO we only get one, and bad things happen
when we try to use the second one.  Test to see if SA_SIGINFO is
still set before we try to use the argument.

(cherry-pick of f84bc8d6f6368f1c846124a8168761ee8cc589c0.)

Bug: 7272866
Change-Id: I69a65c25e833aea70acb78f9ba40ed93308583e6
2012-10-03 17:20:06 -07:00
Elliott Hughes
4688279db5 Clean up the linker a bit, remove prelinking support.
Also make the errors more readable, since none of us seemed to know
what they actually meant. The new style is still as verbose as the
old, but that's probably necessary in the absence of chained exceptions
in C. Here's what you'd see if you try to boot after removing
libsurfaceflinger.so:

  32267 32267 E AndroidRuntime: java.lang.UnsatisfiedLinkError: Cannot load library: (linker.c:1629, pid 32259) soinfo_link_image: could not load library "libsystem_server.so" needed by "libandroid_servers.so"; caused by (linker.c:1629, pid 32259) soinfo_link_image: could not load library "libsurfaceflinger.so" needed by "libsystem_server.so"; caused by (linker.c:709, pid 32259) load_library: library "libsurfaceflinger.so" not found

This patch also fixes almost all of the compiler warnings.

Change-Id: I64bb59aed6d4e039c15ea45be2367f319ef879f8
2012-08-07 11:41:10 -07:00
Raghu Gandham
d7daacb463 MIPS support to the linker
Change-Id: I37ec2d6c51d82bb9e9dbfef4b38c85366bead255
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Raghu Gandham <raghu@mips.com>
Signed-off-by: Bhanu Chetlapalli <bhanu@mips.com>
2012-08-02 14:39:50 -07:00
Jeff Brown
b7630f018a Use new debuggerd protocol.
Bug: 6615693
Change-Id: Ibfddc0de3fa2a882f7d0238ab797e5b29296b54b
2012-06-06 18:37:48 -07:00
Andy McFadden
ca9a0712b8 Re-throw signals
If we catch a fatal signal that won't automatically re-throw when
the thread resumes, re-throw it manually.  (Common examples are
SIGPIPE and the SIGFPE from integer division by zero.)

Change-Id: I329e6d4db907047c555957b42cbd09c50fc808e7
2012-03-08 11:14:37 -08:00
Marco Nelissen
3df3e672f5 Log the thread id and name for fatal signals.
This adds the thread id and name to the "Fatal signal" logging,
making it easier to track down where in process it actually crashed.

Change-Id: I17a365042b2f10b161debe98bc2e7070af055dfb
2012-03-07 12:32:15 -08:00
Andy McFadden
1fc51769de Log debuggerd connection failures
Write a message to the log file if the signal handler is not able
to connect to debuggerd.  This is especially handy if the failure
was caused by running out of file descriptors, since there's some
chance that the lack of fds relates to the crash.

Sample:

 F libc    : Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
 F libc    : Unable to open connection to debuggerd: Too many open files

Bug 5926330

Change-Id: I0ff210d82ab1db39b08f328bae5e08f67a69e5d7
2012-01-26 13:40:38 -08:00
Andy McFadden
ec92af8fe5 Log signal info at time of receipt
When a fatal signal is received, we now write a message to the log
that looks like this:

  F/libc    ( 1540): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)

This is useful for debugging fatal signals that turn out not to be
fatal.  This also changes the signal reset from SIG_IGN to SIG_DFL,
so that future non-fatal fatal signals are fatal.

The code that blocked SIGUSR1 to avoid being interrupted by the GC
has been removed.

Also, fix minor issues in format_buffer().

Bug 5035703

Change-Id: I8940af47297b5dcf3cf33537e3483ca5334ed565
2011-08-04 14:48:15 -07:00
David 'Digit' Turner
8bff9a31aa linker: remove libcutils dependency by re-implementing simpler socket_local_client.
Change-Id: I87f29fd59454d713b9ddfb13e6cf114822f52efd
2010-06-10 22:58:22 -07:00
David 'Digit' Turner
7934a799e1 Prevent spurious EINTR to freeze process debugging 2009-10-16 12:14:04 -07:00
The Android Open Source Project
1dc9e472e1 auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
The Android Open Source Project
1767f908af auto import from //depot/cupcake/@135843 2009-03-03 18:28:13 -08:00
The Android Open Source Project
9f65adf2ba auto import from //branches/cupcake/...@130745 2009-02-10 15:43:56 -08:00
The Android Open Source Project
4e468ed2eb Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:48 -08:00
The Android Open Source Project
a27d2baa0c Initial Contribution 2008-10-21 07:00:00 -07:00