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

Side by Side Diff: src/debug.cc

Issue 183803022: Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 2353
2354 // Move back to where the call instruction sequence started. 2354 // Move back to where the call instruction sequence started.
2355 thread_local_.after_break_target_ = 2355 thread_local_.after_break_target_ =
2356 addr - Assembler::kPatchReturnSequenceAddressOffset; 2356 addr - Assembler::kPatchReturnSequenceAddressOffset;
2357 } else if (at_debug_break_slot) { 2357 } else if (at_debug_break_slot) {
2358 // Address of where the debug break slot starts. 2358 // Address of where the debug break slot starts.
2359 addr = addr - Assembler::kPatchDebugBreakSlotAddressOffset; 2359 addr = addr - Assembler::kPatchDebugBreakSlotAddressOffset;
2360 2360
2361 // Continue just after the slot. 2361 // Continue just after the slot.
2362 thread_local_.after_break_target_ = addr + Assembler::kDebugBreakSlotLength; 2362 thread_local_.after_break_target_ = addr + Assembler::kDebugBreakSlotLength;
2363 } else if (IsDebugBreak(Assembler::target_address_at(addr))) { 2363 } else if (IsDebugBreak(Assembler::target_address_at(addr, *code))) {
2364 // We now know that there is still a debug break call at the target address, 2364 // We now know that there is still a debug break call at the target address,
2365 // so the break point is still there and the original code will hold the 2365 // so the break point is still there and the original code will hold the
2366 // address to jump to in order to complete the call which is replaced by a 2366 // address to jump to in order to complete the call which is replaced by a
2367 // call to DebugBreakXXX. 2367 // call to DebugBreakXXX.
2368 2368
2369 // Find the corresponding address in the original code. 2369 // Find the corresponding address in the original code.
2370 addr += original_code->instruction_start() - code->instruction_start(); 2370 addr += original_code->instruction_start() - code->instruction_start();
2371 2371
2372 // Install jump to the call address in the original code. This will be the 2372 // Install jump to the call address in the original code. This will be the
2373 // call which was overwritten by the call to DebugBreakXXX. 2373 // call which was overwritten by the call to DebugBreakXXX.
2374 thread_local_.after_break_target_ = Assembler::target_address_at(addr); 2374 thread_local_.after_break_target_ =
2375 Assembler::target_address_at(addr, *original_code);
2375 } else { 2376 } else {
2376 // There is no longer a break point present. Don't try to look in the 2377 // There is no longer a break point present. Don't try to look in the
2377 // original code as the running code will have the right address. This takes 2378 // original code as the running code will have the right address. This takes
2378 // care of the case where the last break point is removed from the function 2379 // care of the case where the last break point is removed from the function
2379 // and therefore no "original code" is available. 2380 // and therefore no "original code" is available.
2380 thread_local_.after_break_target_ = Assembler::target_address_at(addr); 2381 thread_local_.after_break_target_ =
2382 Assembler::target_address_at(addr, *code);
2381 } 2383 }
2382 } 2384 }
2383 2385
2384 2386
2385 bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) { 2387 bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) {
2386 HandleScope scope(isolate_); 2388 HandleScope scope(isolate_);
2387 2389
2388 // If there are no break points this cannot be break at return, as 2390 // If there are no break points this cannot be break at return, as
2389 // the debugger statement and stack guard bebug break cannot be at 2391 // the debugger statement and stack guard bebug break cannot be at
2390 // return. 2392 // return.
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3804 { 3806 {
3805 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); 3807 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_));
3806 isolate_->debugger()->CallMessageDispatchHandler(); 3808 isolate_->debugger()->CallMessageDispatchHandler();
3807 } 3809 }
3808 } 3810 }
3809 } 3811 }
3810 3812
3811 #endif // ENABLE_DEBUGGER_SUPPORT 3813 #endif // ENABLE_DEBUGGER_SUPPORT
3812 3814
3813 } } // namespace v8::internal 3815 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698