This change ensures that debuggered properly releases
the signal handler that invoked it after the PTRACE_ATTACH.
The previous code simply did a close() of the file descriptor,
but for some reason, this didn't always make the read() blocking
the signal handler exit. Instead, the thread would stay blocked
and never fault, preventing the generation of a useful stack
trace.
Change-Id: I6b0579041165a710d74ec1bece113ff7b828aed4
Change 44659e90f (6cc4923087 in AOSP) introduced walking
both the symbol table and dynamic symbol table. The problem
is that it was dereferencing values whether or not the two tables
were both present, which could wind up reading from invalid memory.
The read from a bad address would cause debuggerd itself to crash,
which isn't handled.
Change-Id: Ie936f660018b1980dee5b6ed669588db861f1a79
Change 44659e90f (6cc4923087 in AOSP) introduced walking
both the symbol table and dynamic symbol table. The problem
is that it was dereferencing values whether or not the two tables
were both present, which could wind up reading from invalid memory.
The read from a bad address would cause debuggerd itself to crash,
which isn't handled.
Change-Id: Ie936f660018b1980dee5b6ed669588db861f1a79
Merge commit '5c5ff87ded019537bbaf6383618ef2956aaa0407'
* commit '5c5ff87ded019537bbaf6383618ef2956aaa0407':
Print out the signal code along with signal number and address.
Merge commit '83c6b052918178033875e7ea54ca746cf7303f87' into gingerbread-plus-aosp
* commit '83c6b052918178033875e7ea54ca746cf7303f87':
Print out the signal code along with signal number and address.
Merge commit '891180320f0b08758d053a8562dfcd601ef846b0' into gingerbread-plus-aosp
* commit '891180320f0b08758d053a8562dfcd601ef846b0':
Fix bug in debuggerd so it can successfully find the exidx section in
This change enables debuggerd to provide backtraces with function
names in tombstone files and log messages. It does this by reading
the image file that the address is found in, and parsing the dynamic
symbol table to try to extract the symbol corresponding to the given
address.
This works best when "-Wl,-export-dynamic" is added to the LDFLAGS
of each library and executable, because this will cause all symbols
to be added to the dynamic symbol table. If this flag is not present,
it will still work, but it will only be able to identify functions
which are part of the external API of the library/executable.
Change-Id: I618baaff9ed9143b7d1a1f302224e9f21d2b0626
Changed "process has crashed" message:
- say ":5039" instead of ":port" so mouse-paste of command is trivial
- removed trailing spaces, which consume log buffer to little effect
- improved (I hope) the short explanation of what's going on and
what the HOME key does
Fixed typo ("ignorning").