| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 // Read the symbols. | 1352 // Read the symbols. |
| 1353 if (!LoadSymbols(process_handle)) return kStackWalkError; | 1353 if (!LoadSymbols(process_handle)) return kStackWalkError; |
| 1354 | 1354 |
| 1355 // Capture current context. | 1355 // Capture current context. |
| 1356 CONTEXT context; | 1356 CONTEXT context; |
| 1357 RtlCaptureContext(&context); | 1357 RtlCaptureContext(&context); |
| 1358 | 1358 |
| 1359 // Initialize the stack walking | 1359 // Initialize the stack walking |
| 1360 STACKFRAME64 stack_frame; | 1360 STACKFRAME64 stack_frame; |
| 1361 memset(&stack_frame, 0, sizeof(stack_frame)); | 1361 memset(&stack_frame, 0, sizeof(stack_frame)); |
| 1362 #if V8_OS _WIN64 | 1362 #if V8_OS_WIN64 |
| 1363 stack_frame.AddrPC.Offset = context.Rip; | 1363 stack_frame.AddrPC.Offset = context.Rip; |
| 1364 stack_frame.AddrFrame.Offset = context.Rbp; | 1364 stack_frame.AddrFrame.Offset = context.Rbp; |
| 1365 stack_frame.AddrStack.Offset = context.Rsp; | 1365 stack_frame.AddrStack.Offset = context.Rsp; |
| 1366 #else | 1366 #else |
| 1367 stack_frame.AddrPC.Offset = context.Eip; | 1367 stack_frame.AddrPC.Offset = context.Eip; |
| 1368 stack_frame.AddrFrame.Offset = context.Ebp; | 1368 stack_frame.AddrFrame.Offset = context.Ebp; |
| 1369 stack_frame.AddrStack.Offset = context.Esp; | 1369 stack_frame.AddrStack.Offset = context.Esp; |
| 1370 #endif | 1370 #endif |
| 1371 stack_frame.AddrPC.Mode = AddrModeFlat; | 1371 stack_frame.AddrPC.Mode = AddrModeFlat; |
| 1372 stack_frame.AddrFrame.Mode = AddrModeFlat; | 1372 stack_frame.AddrFrame.Mode = AddrModeFlat; |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1988 limit_mutex = CreateMutex(); | 1988 limit_mutex = CreateMutex(); |
| 1989 } | 1989 } |
| 1990 | 1990 |
| 1991 | 1991 |
| 1992 void OS::TearDown() { | 1992 void OS::TearDown() { |
| 1993 delete limit_mutex; | 1993 delete limit_mutex; |
| 1994 } | 1994 } |
| 1995 | 1995 |
| 1996 | 1996 |
| 1997 } } // namespace v8::internal | 1997 } } // namespace v8::internal |
| OLD | NEW |