Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include <inttypes.h> |
| 18 | #include <stdint.h> |
| 19 | #include <stdio.h> |
| 20 | #include <stdlib.h> |
| 21 | #include <unistd.h> |
| 22 | |
| 23 | #include <gtest/gtest.h> |
| 24 | |
| 25 | #include <string> |
| 26 | #include <vector> |
| 27 | |
Christopher Ferris | 150db12 | 2017-12-20 18:49:01 -0800 | [diff] [blame^] | 28 | #include <unwindstack/JitDebug.h> |
Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 29 | #include <unwindstack/Maps.h> |
| 30 | #include <unwindstack/Memory.h> |
Christopher Ferris | d06001d | 2017-11-30 18:56:01 -0800 | [diff] [blame] | 31 | #include <unwindstack/RegsArm.h> |
| 32 | #include <unwindstack/RegsArm64.h> |
Christopher Ferris | 150db12 | 2017-12-20 18:49:01 -0800 | [diff] [blame^] | 33 | #include <unwindstack/RegsX86.h> |
Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 34 | #include <unwindstack/Unwinder.h> |
| 35 | |
Christopher Ferris | d06001d | 2017-11-30 18:56:01 -0800 | [diff] [blame] | 36 | #include "MachineArm.h" |
| 37 | #include "MachineArm64.h" |
Christopher Ferris | 150db12 | 2017-12-20 18:49:01 -0800 | [diff] [blame^] | 38 | #include "MachineX86.h" |
Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 39 | |
| 40 | #include "ElfTestUtils.h" |
| 41 | |
| 42 | namespace unwindstack { |
| 43 | |
| 44 | static std::string DumpFrames(Unwinder& unwinder) { |
| 45 | std::string str; |
| 46 | for (size_t i = 0; i < unwinder.NumFrames(); i++) { |
| 47 | str += unwinder.FormatFrame(i) + "\n"; |
| 48 | } |
| 49 | return str; |
| 50 | } |
| 51 | |
| 52 | TEST(UnwindOfflineTest, pc_straddle_arm32) { |
| 53 | std::string dir(TestGetFileDirectory() + "offline/straddle_arm32/"); |
| 54 | |
| 55 | MemoryOffline* memory = new MemoryOffline; |
| 56 | ASSERT_TRUE(memory->Init((dir + "stack.data").c_str(), 0)); |
| 57 | |
| 58 | FILE* fp = fopen((dir + "regs.txt").c_str(), "r"); |
| 59 | ASSERT_TRUE(fp != nullptr); |
| 60 | RegsArm regs; |
| 61 | uint64_t reg_value; |
| 62 | ASSERT_EQ(1, fscanf(fp, "pc: %" SCNx64 "\n", ®_value)); |
| 63 | regs[ARM_REG_PC] = reg_value; |
| 64 | ASSERT_EQ(1, fscanf(fp, "sp: %" SCNx64 "\n", ®_value)); |
| 65 | regs[ARM_REG_SP] = reg_value; |
| 66 | ASSERT_EQ(1, fscanf(fp, "lr: %" SCNx64 "\n", ®_value)); |
| 67 | regs[ARM_REG_LR] = reg_value; |
| 68 | regs.SetFromRaw(); |
| 69 | fclose(fp); |
| 70 | |
| 71 | fp = fopen((dir + "maps.txt").c_str(), "r"); |
| 72 | ASSERT_TRUE(fp != nullptr); |
| 73 | // The file is guaranteed to be less than 4096 bytes. |
| 74 | std::vector<char> buffer(4096); |
| 75 | ASSERT_NE(0U, fread(buffer.data(), 1, buffer.size(), fp)); |
| 76 | fclose(fp); |
| 77 | |
| 78 | BufferMaps maps(buffer.data()); |
| 79 | ASSERT_TRUE(maps.Parse()); |
| 80 | |
Christopher Ferris | d06001d | 2017-11-30 18:56:01 -0800 | [diff] [blame] | 81 | ASSERT_EQ(ARCH_ARM, regs.Arch()); |
Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 82 | |
| 83 | std::shared_ptr<Memory> process_memory(memory); |
| 84 | |
| 85 | char* cwd = getcwd(nullptr, 0); |
| 86 | ASSERT_EQ(0, chdir(dir.c_str())); |
| 87 | Unwinder unwinder(128, &maps, ®s, process_memory); |
| 88 | unwinder.Unwind(); |
| 89 | ASSERT_EQ(0, chdir(cwd)); |
| 90 | free(cwd); |
| 91 | |
| 92 | std::string frame_info(DumpFrames(unwinder)); |
| 93 | ASSERT_EQ(4U, unwinder.NumFrames()) << "Unwind:\n" << frame_info; |
| 94 | EXPECT_EQ( |
| 95 | " #00 pc 0001a9f8 libc.so (abort+63)\n" |
| 96 | " #01 pc 00006a1b libbase.so (_ZN7android4base14DefaultAborterEPKc+6)\n" |
| 97 | " #02 pc 00007441 libbase.so (_ZN7android4base10LogMessageD2Ev+748)\n" |
Christopher Ferris | 150db12 | 2017-12-20 18:49:01 -0800 | [diff] [blame^] | 98 | " #03 pc 00015147 /does/not/exist/libhidlbase.so\n", |
Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 99 | frame_info); |
| 100 | } |
| 101 | |
Christopher Ferris | e7b6624 | 2017-12-15 11:17:45 -0800 | [diff] [blame] | 102 | TEST(UnwindOfflineTest, pc_in_gnu_debugdata_arm32) { |
| 103 | std::string dir(TestGetFileDirectory() + "offline/gnu_debugdata_arm32/"); |
| 104 | |
| 105 | MemoryOffline* memory = new MemoryOffline; |
| 106 | ASSERT_TRUE(memory->Init((dir + "stack.data").c_str(), 0)); |
| 107 | |
| 108 | FILE* fp = fopen((dir + "regs.txt").c_str(), "r"); |
| 109 | ASSERT_TRUE(fp != nullptr); |
| 110 | RegsArm regs; |
| 111 | uint64_t reg_value; |
| 112 | ASSERT_EQ(1, fscanf(fp, "pc: %" SCNx64 "\n", ®_value)); |
| 113 | regs[ARM_REG_PC] = reg_value; |
| 114 | ASSERT_EQ(1, fscanf(fp, "sp: %" SCNx64 "\n", ®_value)); |
| 115 | regs[ARM_REG_SP] = reg_value; |
| 116 | regs.SetFromRaw(); |
| 117 | fclose(fp); |
| 118 | |
| 119 | fp = fopen((dir + "maps.txt").c_str(), "r"); |
| 120 | ASSERT_TRUE(fp != nullptr); |
| 121 | // The file is guaranteed to be less than 4096 bytes. |
| 122 | std::vector<char> buffer(4096); |
| 123 | ASSERT_NE(0U, fread(buffer.data(), 1, buffer.size(), fp)); |
| 124 | fclose(fp); |
| 125 | |
| 126 | BufferMaps maps(buffer.data()); |
| 127 | ASSERT_TRUE(maps.Parse()); |
| 128 | |
| 129 | ASSERT_EQ(ARCH_ARM, regs.Arch()); |
| 130 | |
| 131 | std::shared_ptr<Memory> process_memory(memory); |
| 132 | |
| 133 | char* cwd = getcwd(nullptr, 0); |
| 134 | ASSERT_EQ(0, chdir(dir.c_str())); |
| 135 | Unwinder unwinder(128, &maps, ®s, process_memory); |
| 136 | unwinder.Unwind(); |
| 137 | ASSERT_EQ(0, chdir(cwd)); |
| 138 | free(cwd); |
| 139 | |
| 140 | std::string frame_info(DumpFrames(unwinder)); |
| 141 | ASSERT_EQ(2U, unwinder.NumFrames()) << "Unwind:\n" << frame_info; |
| 142 | EXPECT_EQ( |
| 143 | " #00 pc 0006dc49 libandroid_runtime.so " |
| 144 | "(_ZN7android14AndroidRuntime15javaThreadShellEPv+80)\n" |
| 145 | " #01 pc 0006dce5 libandroid_runtime.so " |
| 146 | "(_ZN7android14AndroidRuntime19javaCreateThreadEtcEPFiPvES1_PKcijPS1_)\n", |
| 147 | frame_info); |
| 148 | } |
| 149 | |
Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 150 | TEST(UnwindOfflineTest, pc_straddle_arm64) { |
| 151 | std::string dir(TestGetFileDirectory() + "offline/straddle_arm64/"); |
| 152 | |
| 153 | MemoryOffline* memory = new MemoryOffline; |
| 154 | ASSERT_TRUE(memory->Init((dir + "stack.data").c_str(), 0)); |
| 155 | |
| 156 | FILE* fp = fopen((dir + "regs.txt").c_str(), "r"); |
| 157 | ASSERT_TRUE(fp != nullptr); |
| 158 | RegsArm64 regs; |
| 159 | uint64_t reg_value; |
| 160 | ASSERT_EQ(1, fscanf(fp, "pc: %" SCNx64 "\n", ®_value)); |
| 161 | regs[ARM64_REG_PC] = reg_value; |
| 162 | ASSERT_EQ(1, fscanf(fp, "sp: %" SCNx64 "\n", ®_value)); |
| 163 | regs[ARM64_REG_SP] = reg_value; |
| 164 | ASSERT_EQ(1, fscanf(fp, "lr: %" SCNx64 "\n", ®_value)); |
| 165 | regs[ARM64_REG_LR] = reg_value; |
| 166 | ASSERT_EQ(1, fscanf(fp, "x29: %" SCNx64 "\n", ®_value)); |
| 167 | regs[ARM64_REG_R29] = reg_value; |
| 168 | regs.SetFromRaw(); |
| 169 | fclose(fp); |
| 170 | |
| 171 | fp = fopen((dir + "maps.txt").c_str(), "r"); |
| 172 | ASSERT_TRUE(fp != nullptr); |
| 173 | // The file is guaranteed to be less than 4096 bytes. |
| 174 | std::vector<char> buffer(4096); |
| 175 | ASSERT_NE(0U, fread(buffer.data(), 1, buffer.size(), fp)); |
| 176 | fclose(fp); |
| 177 | |
| 178 | BufferMaps maps(buffer.data()); |
| 179 | ASSERT_TRUE(maps.Parse()); |
| 180 | |
Christopher Ferris | d06001d | 2017-11-30 18:56:01 -0800 | [diff] [blame] | 181 | ASSERT_EQ(ARCH_ARM64, regs.Arch()); |
Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 182 | |
| 183 | std::shared_ptr<Memory> process_memory(memory); |
| 184 | |
| 185 | char* cwd = getcwd(nullptr, 0); |
| 186 | ASSERT_EQ(0, chdir(dir.c_str())); |
| 187 | Unwinder unwinder(128, &maps, ®s, process_memory); |
| 188 | unwinder.Unwind(); |
| 189 | ASSERT_EQ(0, chdir(cwd)); |
| 190 | free(cwd); |
| 191 | |
| 192 | std::string frame_info(DumpFrames(unwinder)); |
| 193 | ASSERT_EQ(6U, unwinder.NumFrames()) << "Unwind:\n" << frame_info; |
| 194 | EXPECT_EQ( |
| 195 | " #00 pc 0000000000429fd8 libunwindstack_test (SignalInnerFunction+24)\n" |
| 196 | " #01 pc 000000000042a078 libunwindstack_test (SignalMiddleFunction+8)\n" |
| 197 | " #02 pc 000000000042a08c libunwindstack_test (SignalOuterFunction+8)\n" |
| 198 | " #03 pc 000000000042d8fc libunwindstack_test " |
| 199 | "(_ZN11unwindstackL19RemoteThroughSignalEij+20)\n" |
| 200 | " #04 pc 000000000042d8d8 libunwindstack_test " |
| 201 | "(_ZN11unwindstack37UnwindTest_remote_through_signal_Test8TestBodyEv+32)\n" |
| 202 | " #05 pc 0000000000455d70 libunwindstack_test (_ZN7testing4Test3RunEv+392)\n", |
| 203 | frame_info); |
| 204 | } |
| 205 | |
Christopher Ferris | 150db12 | 2017-12-20 18:49:01 -0800 | [diff] [blame^] | 206 | static void AddMemory(std::string file_name, MemoryOfflineParts* parts) { |
| 207 | MemoryOffline* memory = new MemoryOffline; |
| 208 | ASSERT_TRUE(memory->Init(file_name.c_str(), 0)); |
| 209 | parts->Add(memory); |
| 210 | } |
| 211 | |
| 212 | TEST(UnwindOfflineTest, jit_debug_x86_32) { |
| 213 | std::string dir(TestGetFileDirectory() + "offline/jit_debug_x86_32/"); |
| 214 | |
| 215 | MemoryOfflineParts* memory = new MemoryOfflineParts; |
| 216 | AddMemory(dir + "descriptor.data", memory); |
| 217 | AddMemory(dir + "stack.data", memory); |
| 218 | for (size_t i = 0; i < 7; i++) { |
| 219 | AddMemory(dir + "entry" + std::to_string(i) + ".data", memory); |
| 220 | AddMemory(dir + "jit" + std::to_string(i) + ".data", memory); |
| 221 | } |
| 222 | |
| 223 | FILE* fp = fopen((dir + "regs.txt").c_str(), "r"); |
| 224 | ASSERT_TRUE(fp != nullptr); |
| 225 | RegsX86 regs; |
| 226 | uint64_t reg_value; |
| 227 | ASSERT_EQ(1, fscanf(fp, "eax: %" SCNx64 "\n", ®_value)); |
| 228 | regs[X86_REG_EAX] = reg_value; |
| 229 | ASSERT_EQ(1, fscanf(fp, "ebx: %" SCNx64 "\n", ®_value)); |
| 230 | regs[X86_REG_EBX] = reg_value; |
| 231 | ASSERT_EQ(1, fscanf(fp, "ecx: %" SCNx64 "\n", ®_value)); |
| 232 | regs[X86_REG_ECX] = reg_value; |
| 233 | ASSERT_EQ(1, fscanf(fp, "edx: %" SCNx64 "\n", ®_value)); |
| 234 | regs[X86_REG_EDX] = reg_value; |
| 235 | ASSERT_EQ(1, fscanf(fp, "ebp: %" SCNx64 "\n", ®_value)); |
| 236 | regs[X86_REG_EBP] = reg_value; |
| 237 | ASSERT_EQ(1, fscanf(fp, "edi: %" SCNx64 "\n", ®_value)); |
| 238 | regs[X86_REG_EDI] = reg_value; |
| 239 | ASSERT_EQ(1, fscanf(fp, "esi: %" SCNx64 "\n", ®_value)); |
| 240 | regs[X86_REG_ESI] = reg_value; |
| 241 | ASSERT_EQ(1, fscanf(fp, "esp: %" SCNx64 "\n", ®_value)); |
| 242 | regs[X86_REG_ESP] = reg_value; |
| 243 | ASSERT_EQ(1, fscanf(fp, "eip: %" SCNx64 "\n", ®_value)); |
| 244 | regs[X86_REG_EIP] = reg_value; |
| 245 | regs.SetFromRaw(); |
| 246 | fclose(fp); |
| 247 | |
| 248 | fp = fopen((dir + "maps.txt").c_str(), "r"); |
| 249 | ASSERT_TRUE(fp != nullptr); |
| 250 | // The file is guaranteed to be less than 4096 bytes. |
| 251 | std::vector<char> buffer(4096); |
| 252 | ASSERT_NE(0U, fread(buffer.data(), 1, buffer.size(), fp)); |
| 253 | fclose(fp); |
| 254 | |
| 255 | BufferMaps maps(buffer.data()); |
| 256 | ASSERT_TRUE(maps.Parse()); |
| 257 | |
| 258 | ASSERT_EQ(ARCH_X86, regs.Arch()); |
| 259 | |
| 260 | std::shared_ptr<Memory> process_memory(memory); |
| 261 | |
| 262 | char* cwd = getcwd(nullptr, 0); |
| 263 | ASSERT_EQ(0, chdir(dir.c_str())); |
| 264 | JitDebug jit_debug(process_memory); |
| 265 | Unwinder unwinder(128, &maps, ®s, process_memory); |
| 266 | unwinder.SetJitDebug(&jit_debug, regs.Arch()); |
| 267 | unwinder.Unwind(); |
| 268 | ASSERT_EQ(0, chdir(cwd)); |
| 269 | free(cwd); |
| 270 | |
| 271 | std::string frame_info(DumpFrames(unwinder)); |
| 272 | ASSERT_EQ(69U, unwinder.NumFrames()) << "Unwind:\n" << frame_info; |
| 273 | EXPECT_EQ( |
| 274 | " #00 pc 00068fb8 libarttestd.so (_ZN3artL13CauseSegfaultEv+72)\n" |
| 275 | " #01 pc 00067f00 libarttestd.so (Java_Main_unwindInProcess+10032)\n" |
| 276 | " #02 pc 000021a8 (offset 0x2000) 137-cfi.odex (boolean Main.unwindInProcess(boolean, int, " |
| 277 | "boolean)+136)\n" |
| 278 | " #03 pc 0000fe81 anonymous:ee74c000 (boolean Main.bar(boolean)+65)\n" |
| 279 | " #04 pc 006ad4d2 libartd.so (art_quick_invoke_stub+338)\n" |
| 280 | " #05 pc 00146ab5 libartd.so " |
| 281 | "(_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+885)\n" |
| 282 | " #06 pc 0039cf0d libartd.so " |
| 283 | "(_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_" |
| 284 | "11ShadowFrameEtPNS_6JValueE+653)\n" |
| 285 | " #07 pc 00392552 libartd.so " |
| 286 | "(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_" |
| 287 | "6JValueEb+354)\n" |
| 288 | " #08 pc 0039399a libartd.so " |
| 289 | "(_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadERKNS_" |
| 290 | "20CodeItemDataAccessorEPNS_11ShadowFrameE+234)\n" |
| 291 | " #09 pc 00684362 libartd.so (artQuickToInterpreterBridge+1058)\n" |
| 292 | " #10 pc 006b35bd libartd.so (art_quick_to_interpreter_bridge+77)\n" |
| 293 | " #11 pc 0000fe04 anonymous:ee74c000 (int Main.compare(Main, Main)+52)\n" |
| 294 | " #12 pc 006ad4d2 libartd.so (art_quick_invoke_stub+338)\n" |
| 295 | " #13 pc 00146ab5 libartd.so " |
| 296 | "(_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+885)\n" |
| 297 | " #14 pc 0039cf0d libartd.so " |
| 298 | "(_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_" |
| 299 | "11ShadowFrameEtPNS_6JValueE+653)\n" |
| 300 | " #15 pc 00392552 libartd.so " |
| 301 | "(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_" |
| 302 | "6JValueEb+354)\n" |
| 303 | " #16 pc 0039399a libartd.so " |
| 304 | "(_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadERKNS_" |
| 305 | "20CodeItemDataAccessorEPNS_11ShadowFrameE+234)\n" |
| 306 | " #17 pc 00684362 libartd.so (artQuickToInterpreterBridge+1058)\n" |
| 307 | " #18 pc 006b35bd libartd.so (art_quick_to_interpreter_bridge+77)\n" |
| 308 | " #19 pc 0000fd3c anonymous:ee74c000 (int Main.compare(java.lang.Object, " |
| 309 | "java.lang.Object)+108)\n" |
| 310 | " #20 pc 006ad4d2 libartd.so (art_quick_invoke_stub+338)\n" |
| 311 | " #21 pc 00146ab5 libartd.so " |
| 312 | "(_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+885)\n" |
| 313 | " #22 pc 0039cf0d libartd.so " |
| 314 | "(_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_" |
| 315 | "11ShadowFrameEtPNS_6JValueE+653)\n" |
| 316 | " #23 pc 00392552 libartd.so " |
| 317 | "(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_" |
| 318 | "6JValueEb+354)\n" |
| 319 | " #24 pc 0039399a libartd.so " |
| 320 | "(_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadERKNS_" |
| 321 | "20CodeItemDataAccessorEPNS_11ShadowFrameE+234)\n" |
| 322 | " #25 pc 00684362 libartd.so (artQuickToInterpreterBridge+1058)\n" |
| 323 | " #26 pc 006b35bd libartd.so (art_quick_to_interpreter_bridge+77)\n" |
| 324 | " #27 pc 0000fbdc anonymous:ee74c000 (int " |
| 325 | "java.util.Arrays.binarySearch0(java.lang.Object[], int, int, java.lang.Object, " |
| 326 | "java.util.Comparator)+332)\n" |
| 327 | " #28 pc 006ad6a2 libartd.so (art_quick_invoke_static_stub+418)\n" |
| 328 | " #29 pc 00146acb libartd.so " |
| 329 | "(_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+907)\n" |
| 330 | " #30 pc 0039cf0d libartd.so " |
| 331 | "(_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_" |
| 332 | "11ShadowFrameEtPNS_6JValueE+653)\n" |
| 333 | " #31 pc 00392552 libartd.so " |
| 334 | "(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_" |
| 335 | "6JValueEb+354)\n" |
| 336 | " #32 pc 0039399a libartd.so " |
| 337 | "(_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadERKNS_" |
| 338 | "20CodeItemDataAccessorEPNS_11ShadowFrameE+234)\n" |
| 339 | " #33 pc 00684362 libartd.so (artQuickToInterpreterBridge+1058)\n" |
| 340 | " #34 pc 006b35bd libartd.so (art_quick_to_interpreter_bridge+77)\n" |
| 341 | " #35 pc 0000f625 anonymous:ee74c000 (boolean Main.foo()+165)\n" |
| 342 | " #36 pc 006ad4d2 libartd.so (art_quick_invoke_stub+338)\n" |
| 343 | " #37 pc 00146ab5 libartd.so " |
| 344 | "(_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+885)\n" |
| 345 | " #38 pc 0039cf0d libartd.so " |
| 346 | "(_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_" |
| 347 | "11ShadowFrameEtPNS_6JValueE+653)\n" |
| 348 | " #39 pc 00392552 libartd.so " |
| 349 | "(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_" |
| 350 | "6JValueEb+354)\n" |
| 351 | " #40 pc 0039399a libartd.so " |
| 352 | "(_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadERKNS_" |
| 353 | "20CodeItemDataAccessorEPNS_11ShadowFrameE+234)\n" |
| 354 | " #41 pc 00684362 libartd.so (artQuickToInterpreterBridge+1058)\n" |
| 355 | " #42 pc 006b35bd libartd.so (art_quick_to_interpreter_bridge+77)\n" |
| 356 | " #43 pc 0000eedc anonymous:ee74c000 (void Main.runPrimary()+60)\n" |
| 357 | " #44 pc 006ad4d2 libartd.so (art_quick_invoke_stub+338)\n" |
| 358 | " #45 pc 00146ab5 libartd.so " |
| 359 | "(_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+885)\n" |
| 360 | " #46 pc 0039cf0d libartd.so " |
| 361 | "(_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_" |
| 362 | "11ShadowFrameEtPNS_6JValueE+653)\n" |
| 363 | " #47 pc 00392552 libartd.so " |
| 364 | "(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_" |
| 365 | "6JValueEb+354)\n" |
| 366 | " #48 pc 0039399a libartd.so " |
| 367 | "(_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadERKNS_" |
| 368 | "20CodeItemDataAccessorEPNS_11ShadowFrameE+234)\n" |
| 369 | " #49 pc 00684362 libartd.so (artQuickToInterpreterBridge+1058)\n" |
| 370 | " #50 pc 006b35bd libartd.so (art_quick_to_interpreter_bridge+77)\n" |
| 371 | " #51 pc 0000ac22 anonymous:ee74c000 (void Main.main(java.lang.String[])+98)\n" |
| 372 | " #52 pc 006ad6a2 libartd.so (art_quick_invoke_static_stub+418)\n" |
| 373 | " #53 pc 00146acb libartd.so " |
| 374 | "(_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+907)\n" |
| 375 | " #54 pc 0039cf0d libartd.so " |
| 376 | "(_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_" |
| 377 | "11ShadowFrameEtPNS_6JValueE+653)\n" |
| 378 | " #55 pc 00392552 libartd.so " |
| 379 | "(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_" |
| 380 | "6JValueEb+354)\n" |
| 381 | " #56 pc 0039399a libartd.so " |
| 382 | "(_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadERKNS_" |
| 383 | "20CodeItemDataAccessorEPNS_11ShadowFrameE+234)\n" |
| 384 | " #57 pc 00684362 libartd.so (artQuickToInterpreterBridge+1058)\n" |
| 385 | " #58 pc 006b35bd libartd.so (art_quick_to_interpreter_bridge+77)\n" |
| 386 | " #59 pc 006ad6a2 libartd.so (art_quick_invoke_static_stub+418)\n" |
| 387 | " #60 pc 00146acb libartd.so " |
| 388 | "(_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+907)\n" |
| 389 | " #61 pc 005aac95 libartd.so " |
| 390 | "(_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_" |
| 391 | "8ArgArrayEPNS_6JValueEPKc+85)\n" |
| 392 | " #62 pc 005aab5a libartd.so " |
| 393 | "(_ZN3art17InvokeWithVarArgsERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_" |
| 394 | "jmethodIDPc+362)\n" |
| 395 | " #63 pc 0048a3dd libartd.so " |
| 396 | "(_ZN3art3JNI21CallStaticVoidMethodVEP7_JNIEnvP7_jclassP10_jmethodIDPc+125)\n" |
| 397 | " #64 pc 0018448c libartd.so " |
| 398 | "(_ZN3art8CheckJNI11CallMethodVEPKcP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDPcNS_" |
| 399 | "9Primitive4TypeENS_10InvokeTypeE+1964)\n" |
| 400 | " #65 pc 0017cf06 libartd.so " |
| 401 | "(_ZN3art8CheckJNI21CallStaticVoidMethodVEP7_JNIEnvP7_jclassP10_jmethodIDPc+70)\n" |
| 402 | " #66 pc 00001d8c dalvikvm32 " |
| 403 | "(_ZN7_JNIEnv20CallStaticVoidMethodEP7_jclassP10_jmethodIDz+60)\n" |
| 404 | " #67 pc 00001a80 dalvikvm32 (main+1312)\n" |
| 405 | " #68 pc 00018275 libc.so\n", |
| 406 | frame_info); |
| 407 | } |
| 408 | |
Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 409 | } // namespace unwindstack |