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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 2883042: Breakpoint position should be inside function body. (Closed)
Patch Set: Created 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 __ bind(&return_label_); 200 __ bind(&return_label_);
201 if (FLAG_trace) { 201 if (FLAG_trace) {
202 __ push(rax); 202 __ push(rax);
203 __ CallRuntime(Runtime::kTraceExit, 1); 203 __ CallRuntime(Runtime::kTraceExit, 1);
204 } 204 }
205 #ifdef DEBUG 205 #ifdef DEBUG
206 // Add a label for checking the size of the code used for returning. 206 // Add a label for checking the size of the code used for returning.
207 Label check_exit_codesize; 207 Label check_exit_codesize;
208 masm_->bind(&check_exit_codesize); 208 masm_->bind(&check_exit_codesize);
209 #endif 209 #endif
210 CodeGenerator::RecordPositions(masm_, function()->end_position()); 210 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1);
211 __ RecordJSReturn(); 211 __ RecordJSReturn();
212 // Do not use the leave instruction here because it is too short to 212 // Do not use the leave instruction here because it is too short to
213 // patch with the code required by the debugger. 213 // patch with the code required by the debugger.
214 __ movq(rsp, rbp); 214 __ movq(rsp, rbp);
215 __ pop(rbp); 215 __ pop(rbp);
216 __ ret((scope()->num_parameters() + 1) * kPointerSize); 216 __ ret((scope()->num_parameters() + 1) * kPointerSize);
217 #ifdef ENABLE_DEBUGGER_SUPPORT 217 #ifdef ENABLE_DEBUGGER_SUPPORT
218 // Add padding that will be overwritten by a debugger breakpoint. We 218 // Add padding that will be overwritten by a debugger breakpoint. We
219 // have just generated "movq rsp, rbp; pop rbp; ret k" with length 7 219 // have just generated "movq rsp, rbp; pop rbp; ret k" with length 7
220 // (3 + 1 + 3). 220 // (3 + 1 + 3).
(...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 __ ret(0); 3261 __ ret(0);
3262 } 3262 }
3263 3263
3264 3264
3265 #undef __ 3265 #undef __
3266 3266
3267 3267
3268 } } // namespace v8::internal 3268 } } // namespace v8::internal
3269 3269
3270 #endif // V8_TARGET_ARCH_X64 3270 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/full-codegen.cc ('K') | « src/runtime.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698