Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: src/x64/assembler-x64-inl.h

Issue 171107: X64: Implement debugger hooks. (Closed)
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/x64/assembler-x64-inl.h
diff --git a/src/x64/assembler-x64-inl.h b/src/x64/assembler-x64-inl.h
index 196f2eedbd474cf855b7a1ecef304e5b6f9c0ff6..772c669cf80cbc8b0bbd466aa2dddd3844f31d79 100644
--- a/src/x64/assembler-x64-inl.h
+++ b/src/x64/assembler-x64-inl.h
@@ -228,43 +228,42 @@ void RelocInfo::set_target_object(Object* target) {
bool RelocInfo::IsCallInstruction() {
- UNIMPLEMENTED(); // IA32 code below.
- return *pc_ == 0xE8;
+ // TODO(X64) If allowing short (relative32 offset) jumps, also
+ // recognize 0xE8!
+ return pc_[11] != 0xCC;
Søren Thygesen Gjesse 2009/08/18 13:10:44 Please explain why non int3 instruction at pc + 11
Lasse Reichstein 2009/08/19 07:07:55 Has been elaborated. We only need to distinguish a
}
Address RelocInfo::call_address() {
- UNIMPLEMENTED(); // IA32 code below.
ASSERT(IsCallInstruction());
- return Assembler::target_address_at(pc_ + 1);
+ return
+ Assembler::target_address_at(pc_ + Assembler::kReturnAddrPatchPrefixSize);
}
void RelocInfo::set_call_address(Address target) {
- UNIMPLEMENTED(); // IA32 code below.
ASSERT(IsCallInstruction());
- Assembler::set_target_address_at(pc_ + 1, target);
+ Assembler::set_target_address_at(pc_ + Assembler::kReturnAddrPatchPrefixSize,
William Hesse 2009/08/19 08:44:00 I really think this name is bad. Maybe there shou
Lasse Reichstein 2009/08/19 10:12:32 I can't see a good and quick way to separate it. I
+ target);
}
Object* RelocInfo::call_object() {
- UNIMPLEMENTED(); // IA32 code below.
ASSERT(IsCallInstruction());
return *call_object_address();
}
void RelocInfo::set_call_object(Object* target) {
- UNIMPLEMENTED(); // IA32 code below.
ASSERT(IsCallInstruction());
*call_object_address() = target;
}
Object** RelocInfo::call_object_address() {
- UNIMPLEMENTED(); // IA32 code below.
ASSERT(IsCallInstruction());
- return reinterpret_cast<Object**>(pc_ + 1);
+ return
+ reinterpret_cast<Object**>(pc_ + Assembler::kReturnAddrPatchPrefixSize);
}
// -----------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698