diff options
| author | Graydon Hoare <[email protected]> | 2010-12-31 10:35:39 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-12-31 10:35:39 -0800 |
| commit | c0d4e88428296b8da6f2616f47c760b32abf66ed (patch) | |
| tree | 1a374f814eec606eef3163b20dd27d08a83ecff9 /src/rt/rust_builtin.cpp | |
| parent | Teach ty.unify about ty_obj. (diff) | |
| download | rust-c0d4e88428296b8da6f2616f47c760b32abf66ed.tar.xz rust-c0d4e88428296b8da6f2616f47c760b32abf66ed.zip | |
Add std.dbg.trap(str msg) for help debugging.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index cb16fbf0..84111d82 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -363,6 +363,14 @@ debug_ptrcast(rust_task *task, return ptr; } +extern "C" CDECL void +debug_trap(rust_task *task, rust_str *s) +{ + task->log(rust_log::STDLIB, "trapping: %s", s->data); + // FIXME: x86-ism. + __asm__("int3"); +} + // // Local Variables: |