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

Side by Side Diff: src/debug.cc

Issue 3120011: LiveEdit: implement stack manipulations for x64 (Closed)
Patch Set: follow codereview 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
« no previous file with comments | « src/debug.h ('k') | src/ia32/debug-ia32.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 ASSERT(from <= storage + ArchiveSpacePerThread()); 575 ASSERT(from <= storage + ArchiveSpacePerThread());
576 return storage + ArchiveSpacePerThread(); 576 return storage + ArchiveSpacePerThread();
577 } 577 }
578 578
579 579
580 int Debug::ArchiveSpacePerThread() { 580 int Debug::ArchiveSpacePerThread() {
581 return sizeof(ThreadLocal) + sizeof(registers_); 581 return sizeof(ThreadLocal) + sizeof(registers_);
582 } 582 }
583 583
584 584
585 // Frame structure (conforms InternalFrame structure):
586 // -- code
587 // -- SMI maker
588 // -- function (slot is called "context")
589 // -- frame base
590 Object** Debug::SetUpFrameDropperFrame(StackFrame* bottom_js_frame,
591 Handle<Code> code) {
592 ASSERT(bottom_js_frame->is_java_script());
593
594 Address fp = bottom_js_frame->fp();
595
596 // Move function pointer into "context" slot.
597 Memory::Object_at(fp + StandardFrameConstants::kContextOffset) =
598 Memory::Object_at(fp + JavaScriptFrameConstants::kFunctionOffset);
599
600 Memory::Object_at(fp + InternalFrameConstants::kCodeOffset) = *code;
601 Memory::Object_at(fp + StandardFrameConstants::kMarkerOffset) =
602 Smi::FromInt(StackFrame::INTERNAL);
603
604 return reinterpret_cast<Object**>(&Memory::Object_at(
605 fp + StandardFrameConstants::kContextOffset));
606 }
607
608 const int Debug::kFrameDropperFrameSize = 4;
609
610
611
612
613
585 // Default break enabled. 614 // Default break enabled.
586 bool Debug::disable_break_ = false; 615 bool Debug::disable_break_ = false;
587 616
588 // Default call debugger on uncaught exception. 617 // Default call debugger on uncaught exception.
589 bool Debug::break_on_exception_ = false; 618 bool Debug::break_on_exception_ = false;
590 bool Debug::break_on_uncaught_exception_ = true; 619 bool Debug::break_on_uncaught_exception_ = true;
591 620
592 Handle<Context> Debug::debug_context_ = Handle<Context>(); 621 Handle<Context> Debug::debug_context_ = Handle<Context>();
593 Code* Debug::debug_break_return_ = NULL; 622 Code* Debug::debug_break_return_ = NULL;
594 Code* Debug::debug_break_slot_ = NULL; 623 Code* Debug::debug_break_slot_ = NULL;
(...skipping 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after
3014 { 3043 {
3015 Locker locker; 3044 Locker locker;
3016 Debugger::CallMessageDispatchHandler(); 3045 Debugger::CallMessageDispatchHandler();
3017 } 3046 }
3018 } 3047 }
3019 } 3048 }
3020 3049
3021 #endif // ENABLE_DEBUGGER_SUPPORT 3050 #endif // ENABLE_DEBUGGER_SUPPORT
3022 3051
3023 } } // namespace v8::internal 3052 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.h ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698