Teach the dwarf readers to handle udata, so we can link with util.option; add util.rs to std.rc.

This commit is contained in:
Graydon Hoare 2010-07-05 14:38:02 -07:00
parent ad61f02d36
commit b0aba6510a
3 changed files with 10 additions and 0 deletions

View File

@ -2724,6 +2724,7 @@ let read_dies
| DW_FORM_data1 -> DATA_num (ar.asm_get_u8())
| DW_FORM_data4 -> DATA_num (ar.asm_get_u32())
| DW_FORM_flag -> DATA_num (ar.asm_get_u8())
| DW_FORM_udata -> DATA_num (ar.asm_get_uleb())
| DW_FORM_block1 -> (adv_block1(); DATA_other)
| DW_FORM_block4 -> (adv_block4(); DATA_other)
| _ ->

View File

@ -16,6 +16,10 @@ mod _str;
mod _io;
mod sys;
// Utility modules.
mod util;
// Authorize various rule-bendings.
auth _io = unsafe;

View File

@ -347,6 +347,11 @@ rust_crate_reader::die::step_attr(attr &a) const
return rdr->is_ok() || rdr->at_end();
break;
case DW_FORM_udata:
rdr->get_uleb(u32);
return rdr->is_ok() || rdr->at_end();
break;
default:
rdr->mem.dom->log(rust_log::DWARF, " unknown dwarf form: 0x%"
PRIxPTR, a.form);