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

Side by Side Diff: src/debug.cc

Issue 195373004: Revert "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/flag-definitions.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 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 2352
2353 // Move back to where the call instruction sequence started. 2353 // Move back to where the call instruction sequence started.
2354 thread_local_.after_break_target_ = 2354 thread_local_.after_break_target_ =
2355 addr - Assembler::kPatchReturnSequenceAddressOffset; 2355 addr - Assembler::kPatchReturnSequenceAddressOffset;
2356 } else if (at_debug_break_slot) { 2356 } else if (at_debug_break_slot) {
2357 // Address of where the debug break slot starts. 2357 // Address of where the debug break slot starts.
2358 addr = addr - Assembler::kPatchDebugBreakSlotAddressOffset; 2358 addr = addr - Assembler::kPatchDebugBreakSlotAddressOffset;
2359 2359
2360 // Continue just after the slot. 2360 // Continue just after the slot.
2361 thread_local_.after_break_target_ = addr + Assembler::kDebugBreakSlotLength; 2361 thread_local_.after_break_target_ = addr + Assembler::kDebugBreakSlotLength;
2362 } else if (IsDebugBreak(Assembler::target_address_at(addr, *code))) { 2362 } else if (IsDebugBreak(Assembler::target_address_at(addr))) {
2363 // We now know that there is still a debug break call at the target address, 2363 // We now know that there is still a debug break call at the target address,
2364 // so the break point is still there and the original code will hold the 2364 // so the break point is still there and the original code will hold the
2365 // address to jump to in order to complete the call which is replaced by a 2365 // address to jump to in order to complete the call which is replaced by a
2366 // call to DebugBreakXXX. 2366 // call to DebugBreakXXX.
2367 2367
2368 // Find the corresponding address in the original code. 2368 // Find the corresponding address in the original code.
2369 addr += original_code->instruction_start() - code->instruction_start(); 2369 addr += original_code->instruction_start() - code->instruction_start();
2370 2370
2371 // Install jump to the call address in the original code. This will be the 2371 // Install jump to the call address in the original code. This will be the
2372 // call which was overwritten by the call to DebugBreakXXX. 2372 // call which was overwritten by the call to DebugBreakXXX.
2373 thread_local_.after_break_target_ = 2373 thread_local_.after_break_target_ = Assembler::target_address_at(addr);
2374 Assembler::target_address_at(addr, *original_code);
2375 } else { 2374 } else {
2376 // There is no longer a break point present. Don't try to look in the 2375 // 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 2376 // 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 2377 // care of the case where the last break point is removed from the function
2379 // and therefore no "original code" is available. 2378 // and therefore no "original code" is available.
2380 thread_local_.after_break_target_ = 2379 thread_local_.after_break_target_ = Assembler::target_address_at(addr);
2381 Assembler::target_address_at(addr, *code);
2382 } 2380 }
2383 } 2381 }
2384 2382
2385 2383
2386 bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) { 2384 bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) {
2387 HandleScope scope(isolate_); 2385 HandleScope scope(isolate_);
2388 2386
2389 // If there are no break points this cannot be break at return, as 2387 // If there are no break points this cannot be break at return, as
2390 // the debugger statement and stack guard bebug break cannot be at 2388 // the debugger statement and stack guard bebug break cannot be at
2391 // return. 2389 // return.
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3805 { 3803 {
3806 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); 3804 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_));
3807 isolate_->debugger()->CallMessageDispatchHandler(); 3805 isolate_->debugger()->CallMessageDispatchHandler();
3808 } 3806 }
3809 } 3807 }
3810 } 3808 }
3811 3809
3812 #endif // ENABLE_DEBUGGER_SUPPORT 3810 #endif // ENABLE_DEBUGGER_SUPPORT
3813 3811
3814 } } // namespace v8::internal 3812 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698