diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-07-15 18:37:57 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-07-15 18:37:57 -0700 |
| commit | 88574c3cea87bc8f789883bcd518b8a91fb1a776 (patch) | |
| tree | f2dcff20295f232fa00932383d9bfd3d3e83911d /src/rt/rust_upcall.cpp | |
| parent | f6f7f6190809d698f39f5f3dde9a10cb28661795 (diff) | |
| download | rust-88574c3cea87bc8f789883bcd518b8a91fb1a776.tar.gz rust-88574c3cea87bc8f789883bcd518b8a91fb1a776.zip | |
rustc: Implement interior string logging in DPS
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index b6b8fb28668..d734625fa30 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -76,6 +76,16 @@ upcall_log_str(rust_task *task, uint32_t level, rust_str *str) { } extern "C" CDECL void +upcall_log_istr(rust_task *task, uint32_t level, rust_ivec *str) { + LOG_UPCALL_ENTRY(task); + if (task->sched->log_lvl < level) + return; + const char *buf = (const char *) + (str->fill ? str->payload.data : str->payload.ptr->data); + task->sched->log(task, level, "rust: %s", buf); +} + +extern "C" CDECL void upcall_trace_word(rust_task *task, uintptr_t i) { LOG_UPCALL_ENTRY(task); task->sched->log(task, 2, "trace: 0x%" PRIxPTR "", i, i, (char) i); |
