1 // |
1 // |
2 // Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. |
2 // Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. |
3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 // |
4 // |
5 // This code is free software; you can redistribute it and/or modify it |
5 // This code is free software; you can redistribute it and/or modify it |
6 // under the terms of the GNU General Public License version 2 only, as |
6 // under the terms of the GNU General Public License version 2 only, as |
7 // published by the Free Software Foundation. |
7 // published by the Free Software Foundation. |
139 // |
139 // |
140 source %{ |
140 source %{ |
141 |
141 |
142 // emit an interrupt that is caught by the debugger |
142 // emit an interrupt that is caught by the debugger |
143 void emit_break(CodeBuffer &cbuf) { |
143 void emit_break(CodeBuffer &cbuf) { |
144 *(cbuf.code_end()) = (unsigned char)(0xcc); |
144 cbuf.insts()->emit_int8((unsigned char) 0xcc); |
145 cbuf.set_code_end(cbuf.code_end() + 1); |
|
146 } |
145 } |
147 |
146 |
148 void MachBreakpointNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { |
147 void MachBreakpointNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { |
149 emit_break(cbuf); |
148 emit_break(cbuf); |
150 } |
149 } |