diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2010-07-02 08:15:27 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2010-07-02 08:15:27 -0700 |
| commit | 99be02a28d9d810d101d85f6ed552fc2754e1fd8 (patch) | |
| tree | cb776bfb144b39be4637f3451f4630e36e415cf8 /src/rt/rust_crate_reader.cpp | |
| parent | 8370b947a45e8d02012b6352507e639a273b86b1 (diff) | |
| download | rust-99be02a28d9d810d101d85f6ed552fc2754e1fd8.tar.gz rust-99be02a28d9d810d101d85f6ed552fc2754e1fd8.zip | |
Indent/outdent when logging dwarf at runtime.
Diffstat (limited to 'src/rt/rust_crate_reader.cpp')
| -rw-r--r-- | src/rt/rust_crate_reader.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/rt/rust_crate_reader.cpp b/src/rt/rust_crate_reader.cpp index 3c36729ff26..ece0281c5d9 100644 --- a/src/rt/rust_crate_reader.cpp +++ b/src/rt/rust_crate_reader.cpp @@ -255,6 +255,7 @@ rust_crate_reader::die::die(die_reader *rdr, uintptr_t off) if (!ab_idx) { ab = NULL; dom->log(rust_log::DWARF, "DIE <0x%" PRIxPTR "> (null)", off); + dom->get_log().outdent(); } else { ab = rdr->abbrevs.get_abbrev(ab_idx); dom->log(rust_log::DWARF, "DIE <0x%" PRIxPTR "> abbrev 0x%" @@ -451,19 +452,21 @@ rust_crate_reader::die::next() const { rdr_sess use(rdr); if (start_attrs()) { - attr a; - while (step_attr(a)) { - I(dom, !(a.is_numeric() && a.is_string())); - if (a.is_numeric()) - dom->log(rust_log::DWARF, " attr num: 0x%" - PRIxPTR, a.get_num(dom)); - else if (a.is_string()) - dom->log(rust_log::DWARF, " attr str: %s", - a.get_str(dom)); - else - dom->log(rust_log::DWARF, " attr ??:"); - } + attr a; + while (step_attr(a)) { + I(dom, !(a.is_numeric() && a.is_string())); + if (a.is_numeric()) + dom->log(rust_log::DWARF, " attr num: 0x%" + PRIxPTR, a.get_num(dom)); + else if (a.is_string()) + dom->log(rust_log::DWARF, " attr str: %s", + a.get_str(dom)); + else + dom->log(rust_log::DWARF, " attr ??:"); + } } + if (has_children()) + dom->get_log().indent(); } return die(rdr, rdr->tell_off()); } |
