| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/disassembler.h" | 5 #include "vm/disassembler.h" |
| 6 | 6 |
| 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 8 #if defined(TARGET_ARCH_X64) | 8 #if defined(TARGET_ARCH_X64) |
| 9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 AppendToBuffer(" '%s'", ObjectToCStringNoGC(obj)); | 831 AppendToBuffer(" '%s'", ObjectToCStringNoGC(obj)); |
| 832 } else { | 832 } else { |
| 833 // 'addr' is not an object, but probably a code address. | 833 // 'addr' is not an object, but probably a code address. |
| 834 const char* name_of_stub = StubCode::NameOfStub(addr); | 834 const char* name_of_stub = StubCode::NameOfStub(addr); |
| 835 if (name_of_stub != NULL) { | 835 if (name_of_stub != NULL) { |
| 836 AppendToBuffer(" [stub: %s]", name_of_stub); | 836 AppendToBuffer(" [stub: %s]", name_of_stub); |
| 837 } else { | 837 } else { |
| 838 // Print only if jumping to entry point. | 838 // Print only if jumping to entry point. |
| 839 const Code& code = Code::Handle(Code::LookupCode(addr)); | 839 const Code& code = Code::Handle(Code::LookupCode(addr)); |
| 840 if (!code.IsNull() && (code.EntryPoint() == addr)) { | 840 if (!code.IsNull() && (code.EntryPoint() == addr)) { |
| 841 const String& name = String::Handle(code.UserName()); | 841 const String& name = String::Handle(code.PrettyName()); |
| 842 const char* name_c = name.ToCString(); | 842 const char* name_c = name.ToCString(); |
| 843 AppendToBuffer(" [%s]", name_c); | 843 AppendToBuffer(" [%s]", name_c); |
| 844 } | 844 } |
| 845 } | 845 } |
| 846 } | 846 } |
| 847 } | 847 } |
| 848 | 848 |
| 849 | 849 |
| 850 // Returns number of bytes used, including *data. | 850 // Returns number of bytes used, including *data. |
| 851 int DisassemblerX64::JumpShort(uint8_t* data) { | 851 int DisassemblerX64::JumpShort(uint8_t* data) { |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1967 pc); | 1967 pc); |
| 1968 pc += instruction_length; | 1968 pc += instruction_length; |
| 1969 } | 1969 } |
| 1970 | 1970 |
| 1971 return; | 1971 return; |
| 1972 } | 1972 } |
| 1973 | 1973 |
| 1974 } // namespace dart | 1974 } // namespace dart |
| 1975 | 1975 |
| 1976 #endif // defined TARGET_ARCH_X64 | 1976 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |