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

Side by Side Diff: src/arm/frames-arm.cc

Issue 3141047: Cleanup the way the debugger stores live registers when entering at a break... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 | Annotate | Revision Log
« no previous file with comments | « src/arm/frames-arm.h ('k') | src/arm/macro-assembler-arm.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 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const int offset = StandardFrameConstants::kMarkerOffset; 48 const int offset = StandardFrameConstants::kMarkerOffset;
49 Object* marker = Memory::Object_at(state->fp + offset); 49 Object* marker = Memory::Object_at(state->fp + offset);
50 if (!marker->IsSmi()) return JAVA_SCRIPT; 50 if (!marker->IsSmi()) return JAVA_SCRIPT;
51 return static_cast<StackFrame::Type>(Smi::cast(marker)->value()); 51 return static_cast<StackFrame::Type>(Smi::cast(marker)->value());
52 } 52 }
53 53
54 54
55 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { 55 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) {
56 if (fp == 0) return NONE; 56 if (fp == 0) return NONE;
57 // Compute frame type and stack pointer. 57 // Compute frame type and stack pointer.
58 Address sp = fp + ExitFrameConstants::kSPDisplacement; 58 Address sp = fp + ExitFrameConstants::kSPOffset;
59 const int offset = ExitFrameConstants::kCodeOffset; 59
60 Object* code = Memory::Object_at(fp + offset);
61 bool is_debug_exit = code->IsSmi();
62 if (is_debug_exit) {
63 sp -= kNumJSCallerSaved * kPointerSize;
64 }
65 // Fill in the state. 60 // Fill in the state.
66 state->sp = sp; 61 state->sp = sp;
67 state->fp = fp; 62 state->fp = fp;
68 state->pc_address = reinterpret_cast<Address*>(sp - 1 * kPointerSize); 63 state->pc_address = reinterpret_cast<Address*>(sp - 1 * kPointerSize);
64 ASSERT(*state->pc_address != NULL);
69 return EXIT; 65 return EXIT;
70 } 66 }
71 67
72 68
73 void ExitFrame::Iterate(ObjectVisitor* v) const { 69 void ExitFrame::Iterate(ObjectVisitor* v) const {
74 v->VisitPointer(&code_slot()); 70 v->VisitPointer(&code_slot());
75 // The arguments are traversed as part of the expression stack of 71 // The arguments are traversed as part of the expression stack of
76 // the calling frame. 72 // the calling frame.
77 } 73 }
78 74
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 Address InternalFrame::GetCallerStackPointer() const { 110 Address InternalFrame::GetCallerStackPointer() const {
115 // Internal frames have no arguments. The stack pointer of the 111 // Internal frames have no arguments. The stack pointer of the
116 // caller is at a fixed offset from the frame pointer. 112 // caller is at a fixed offset from the frame pointer.
117 return fp() + StandardFrameConstants::kCallerSPOffset; 113 return fp() + StandardFrameConstants::kCallerSPOffset;
118 } 114 }
119 115
120 116
121 } } // namespace v8::internal 117 } } // namespace v8::internal
122 118
123 #endif // V8_TARGET_ARCH_ARM 119 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/frames-arm.h ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698