12d902961b2f119dfccd71523041949ff1668c6e |
|
14-Mar-2018 |
David Srbecky <dsrbecky@google.com> |
Cache DWARF location rules for a given pc. Decoding the DWARF opcodes is expensive so make sure we cache it. This speeds unwinding in simpleperf by over a factor of 3x. Add unit tests for this new behavior. Bug: 77258731 Test: libbacktrace/libunwindstack unit tests on host and target. Test: Ran debuggerd -b on various processes on target. Change-Id: Ia516c0fa5d3e5f76746190bb4b6fdf49fd1c9388 (cherry picked from commit 3386ebade2d28fd3ef68c576bb0375bd226a1320)
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
414df3e583c21023a22a11b64e703cd4ab38b29a |
|
15-Mar-2018 |
Yabin Cui <yabinc@google.com> |
Always set the sp reg to the cfa for DWARF. There are a few places where it is assumed that this register is set to the cfa value when interpreting DWARF information. Add a testcase for unwinding art_quick_osr_stub on ARM. Bug: 73954823 Test: Ran libunwindstack/libbacktrace unit tests. Test: Random debuggerd -b of process on a hikey. Test: Ran the 137 art test on host. Change-Id: Ida6ccdc38c3cfeea6b57fe861a0cc127b150b790 (cherry picked from commit 11e96fe48a74e6ab97d4de899684d3a61a9d1129)
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
c4772ae94c847878594ab9dc855586a96adbf255 |
|
08-Mar-2018 |
David Srbecky <dsrbecky@google.com> |
Don't implicitly dereference DW_CFA_def_cfa_expression. The specification isn't entirely clear. Follow the gdb interpretation. Bug: 73954823 Test: libunwindstack_test Change-Id: If72717f54eed84e442f43af19e615143a9796b68 (cherry picked from commit 3692f251990ecb063bb9a3f8af1f820782be9973)
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
559c7f209295a7070515bba9fa3985edf53d13a0 |
|
13-Feb-2018 |
Christopher Ferris <cferris@google.com> |
Implement new DEX PC lookup scheme. GDB wasn't handling the old one gracefully. - Create a RegsInfo structure that can be used to properly eval expression data. - Remove the versions on Dwarf ops. It doesn't work the in the real world and doesn't add useful information. - Fix dex pc frame number bug. Test: testrunner.py -j40 --host --cdex-fast -t 137 Test: libunwindstack_test Test: All unit tests pass. Change-Id: Iac4fea651b81cb6087fd237a9a5027a352a49245
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
2fcf4cf13e9aefa8c312084af12ca2d712a6ead3 |
|
24-Jan-2018 |
Christopher Ferris <cferris@google.com> |
Add error propagation into Unwinder/Elf objects. The backtrace offline code uses these error codes to diagnose errors. In addtion, I've had cases where seeing these errors would help diagnose failures. This also allows us to add a few features to indicate why an unwind terminated (such as max frames exceeded). Bug: 65682279 Test: Updated unit tests pass. Change-Id: If82b5092698e8a194016d670efff1320f9b44d50
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
98984b41da78448df24d8d9ced842066328d5f11 |
|
17-Jan-2018 |
Christopher Ferris <cferris@google.com> |
Add support for getting a dex pc. Changes: - Change the register type from int16_t to uint32_t for the location data and the Eval processing. This is because the special dex pc is > 65535. - Add the ability for Dwarf register location information to point to a register that is itself a Dwarf location register. - Add dex_pc to the frame information. - Modify the unwind tool to print the dex pc if non-zero. This does not implement the printing of the dex information in anything but the unwind tool. It's not the final form of this printing. Bug: 72070049 Test: Ran new unit tests. Test: Dumped stack while in interpreter running 137-cfi art test and Test: verified dex pc is set to non-zero. Change-Id: I6ce8a6b577fb4f92abacbd433b1f68977e272542
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
c9dee84d81e4672dee5dd08890c904d1ab841e56 |
|
03-Nov-2017 |
Christopher Ferris <cferris@google.com> |
Add support for only a .eh_frame. Static executables only have a .eh_frame section and no .eh_frame_hdr section. Add support for this by rearranging the class hierarchy and creating a DwarfEhFrameWithHdr class and a DwarfEhFrame class to handle the different cases. Add new unit tests for DwarfEhFrame and for the new functionality. Bug: 68820189 Test: Passes new unit tests, unwinds static executables. Change-Id: I63d7cb8c52a686e96579a2266e18c0d06bbb6e63
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
fda7edd13ec5970e43e9677dae066f52b277a470 |
|
01-Nov-2017 |
Christopher Ferris <cferris@google.com> |
Move sp/pc not changing check into Unwinder. Remove this check from the DwarfSection class. Rather than have every step function make the check, doing it at the top level avoids having every function do the same check. Bug: 68167269 Test: New unit tests, ran debuggerd -b on processes. Change-Id: I23b7c799faaf26c93c1b72848df18c78de6c42fb
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
2502a60ea1a5d612ce5d0c44a121fe314c3ef930 |
|
23-Oct-2017 |
Christopher Ferris <cferris@google.com> |
If the pc is set to zero, the unwind is done. Bug: 68047085 Test: Ran new unit tests, verified new unwinder does not show an Test: extra pc zero frame for arm 32 bit processes. Change-Id: Ic6532e56fbb786a8b7d41638abae777c2d0f1d59
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
f6f691b63c1b2166ed005a462a6fba5001786eda |
|
26-Sep-2017 |
Christopher Ferris <cferris@google.com> |
Update the Unwinder object and add tests. Changes: - Remove unused GetReturnAddressFromDefault function and tests. - Modify the unwinder to stop when a pc/sp in a device map. - Modify the unwinder to skip initial frames based on map names. - Unit tests that exercise all of the paths in the unwinder code. - Move the test Elf/ElfInterface objects into their own file. - Update RegsFake to handle extra cases. - Modify libbacktrace code to use this unwinder. The new unwinder does not implement the ignore frame functionality since this is not used very often and is better implemented using a skip frames in named libraries functionality. Test: Ran new unit tests, ran backtrace tests. Change-Id: Ifd65e9acd66ac5e2d0e04bd32a9ad870b54610ff
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
b9de87f7edefd7a2473134b267716c5fd750e89f |
|
20-Sep-2017 |
Christopher Ferris <cferris@google.com> |
Add a new unwind method on error. If a function crashes by jumping into unexecutable code, the old method could not unwind through that. Add a fallback method to set the pc from the default return address location. In addition, add a new finished check for steps. This will provide a method to indicate that this step is the last step. This prevents cases where the fallback method might be triggered incorrectly. Update the libbacktrace code to unwind using the new methodology. Update the unwind tool to use the new unwind methodology. Add a new option to crasher that calls through a null function. Create a new object, Unwinder, that encapsulates the a basic unwind. For now, libbacktrace will still use the custom code. Added new unit tests to cover the new cases. Also add a test that crashes calling a nullptr as a function, and then has call frames in the signal stack. Bug: 65842173 Test: Pass all unit tests, verify crasher dumps properly. Change-Id: Ia18430ab107e9f7bdf0e14a9b74710b1280bd7f4
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
d226a5140989f509a0ed3e2723f05d5fc93ce8df |
|
14-Jul-2017 |
Christopher Ferris <cferris@google.com> |
Make the library usable as a library. - Add namespace unwindstack everywhere so that it's easier for other code to use the library. - Move some of the header files into include/unwindstack so that they can be exposed. - Modify the headers so that only a limited number need to be exposed. - Update the tools to use the new headers. - Add a GetLoadBias() call on the Elf object. This prevents the need to get the interface object out of the Elf object. - Move the GetRelPc() call out of the Reg class, to the Elf class. It's not always the case that a Reg object will be around when you want to get a relative pc. The tests for this moved to ElfTest.cpp. Bug: 23762183 Test: Unit tests pass. Change-Id: Iac609dac1dd90ed83d1a1e24ff2579c96c023bc3
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|
53a3c9b4ab57f04b46bc3abf42e36bdfa821f7f3 |
|
11-May-2017 |
Christopher Ferris <cferris@google.com> |
Add DwarfSection classes. Bug: 23762183 Test: Ran new unit tests. Change-Id: Icca2a73c50d467718ba4ac41e1c8f541488620dd
/system/core/libunwindstack/tests/DwarfSectionImplTest.cpp
|