OLD | NEW |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 | 62 |
63 // Check whether the JS frame exit code has been patched with a debug break. | 63 // Check whether the JS frame exit code has been patched with a debug break. |
64 bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) { | 64 bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) { |
65 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode())); | 65 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode())); |
66 // Opcode E8 is call. | 66 // Opcode E8 is call. |
67 return (*(rinfo->pc()) == 0xE8); | 67 return (*(rinfo->pc()) == 0xE8); |
68 } | 68 } |
69 | 69 |
70 | 70 |
71 #define __ masm-> | 71 #define __ DEFINE_MASM(masm) |
72 | 72 |
73 | 73 |
74 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, | 74 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
75 RegList pointer_regs, | 75 RegList pointer_regs, |
76 bool convert_call_to_jmp) { | 76 bool convert_call_to_jmp) { |
77 // Save the content of all general purpose registers in memory. This copy in | 77 // Save the content of all general purpose registers in memory. This copy in |
78 // memory is later pushed onto the JS expression stack for the fake JS frame | 78 // memory is later pushed onto the JS expression stack for the fake JS frame |
79 // generated and also to the C frame generated on top of that. In the JS | 79 // generated and also to the C frame generated on top of that. In the JS |
80 // frame ONLY the registers containing pointers will be pushed on the | 80 // frame ONLY the registers containing pointers will be pushed on the |
81 // expression stack. This causes the GC to update these pointers so that | 81 // expression stack. This causes the GC to update these pointers so that |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // ----------------------------------- | 211 // ----------------------------------- |
212 Generate_DebugBreakCallHelper(masm, 0, false); | 212 Generate_DebugBreakCallHelper(masm, 0, false); |
213 } | 213 } |
214 | 214 |
215 | 215 |
216 #undef __ | 216 #undef __ |
217 | 217 |
218 #endif // ENABLE_DEBUGGER_SUPPORT | 218 #endif // ENABLE_DEBUGGER_SUPPORT |
219 | 219 |
220 } } // namespace v8::internal | 220 } } // namespace v8::internal |
OLD | NEW |