OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/gdb-jit.h" | 5 #include "src/gdb-jit.h" |
6 | 6 |
| 7 #include <memory> |
| 8 |
7 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
8 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
9 #include "src/bootstrapper.h" | 11 #include "src/bootstrapper.h" |
10 #include "src/compiler.h" | 12 #include "src/compiler.h" |
11 #include "src/frames-inl.h" | 13 #include "src/frames-inl.h" |
12 #include "src/frames.h" | 14 #include "src/frames.h" |
13 #include "src/global-handles.h" | 15 #include "src/global-handles.h" |
14 #include "src/messages.h" | 16 #include "src/messages.h" |
15 #include "src/objects.h" | 17 #include "src/objects.h" |
16 #include "src/ostreams.h" | 18 #include "src/ostreams.h" |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 DCHECK(state < STACK_STATE_MAX); | 1010 DCHECK(state < STACK_STATE_MAX); |
1009 return stack_state_start_addresses_[state]; | 1011 return stack_state_start_addresses_[state]; |
1010 } | 1012 } |
1011 | 1013 |
1012 void SetStackStateStartAddress(StackState state, uintptr_t addr) { | 1014 void SetStackStateStartAddress(StackState state, uintptr_t addr) { |
1013 DCHECK(state < STACK_STATE_MAX); | 1015 DCHECK(state < STACK_STATE_MAX); |
1014 stack_state_start_addresses_[state] = addr; | 1016 stack_state_start_addresses_[state] = addr; |
1015 } | 1017 } |
1016 #endif | 1018 #endif |
1017 | 1019 |
1018 base::SmartArrayPointer<char> GetFilename() { | 1020 std::unique_ptr<char[]> GetFilename() { |
1019 return String::cast(script()->name())->ToCString(); | 1021 return String::cast(script()->name())->ToCString(); |
1020 } | 1022 } |
1021 | 1023 |
1022 int GetScriptLineNumber(int pos) { return script()->GetLineNumber(pos) + 1; } | 1024 int GetScriptLineNumber(int pos) { return script()->GetLineNumber(pos) + 1; } |
1023 | 1025 |
1024 | 1026 |
1025 private: | 1027 private: |
1026 const char* name_; | 1028 const char* name_; |
1027 Code* code_; | 1029 Code* code_; |
1028 SharedFunctionInfo* shared_info_; | 1030 SharedFunctionInfo* shared_info_; |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2212 LineInfo* line_info = reinterpret_cast<LineInfo*>(event->user_data); | 2214 LineInfo* line_info = reinterpret_cast<LineInfo*>(event->user_data); |
2213 PutLineInfo(reinterpret_cast<Address>(event->code_start), line_info); | 2215 PutLineInfo(reinterpret_cast<Address>(event->code_start), line_info); |
2214 break; | 2216 break; |
2215 } | 2217 } |
2216 } | 2218 } |
2217 } | 2219 } |
2218 #endif | 2220 #endif |
2219 } // namespace GDBJITInterface | 2221 } // namespace GDBJITInterface |
2220 } // namespace internal | 2222 } // namespace internal |
2221 } // namespace v8 | 2223 } // namespace v8 |
OLD | NEW |