Name Description Size
arch.rs 25145
common.rs 13670
constants.rs Constant definitions. The DWARF spec's `DW_AT_*` type is represented as `struct DwAt(u16)`, `DW_FORM_*` as `DwForm(u16)`, etc. There are also exported const definitions for each constant. 40316
endianity.rs Types for compile-time and run-time endianity. 6020
leb128.rs Read and write DWARF's "Little Endian Base 128" (LEB128) variable length integer encoding. The implementation is a direct translation of the psuedocode in the DWARF 4 standard's appendix C. Read and write signed integers: ``` # #[cfg(all(feature = "read", feature = "write"))] { use gimli::{EndianSlice, NativeEndian, leb128}; let mut buf = [0; 1024]; // Write to anything that implements `std::io::Write`. { let mut writable = &mut buf[..]; leb128::write::signed(&mut writable, -12345).expect("Should write number"); } // Read from anything that implements `gimli::Reader`. let mut readable = EndianSlice::new(&buf[..], NativeEndian); let val = leb128::read::signed(&mut readable).expect("Should read number"); assert_eq!(val, -12345); # } ``` Or read and write unsigned integers: ``` # #[cfg(all(feature = "read", feature = "write"))] { use gimli::{EndianSlice, NativeEndian, leb128}; let mut buf = [0; 1024]; { let mut writable = &mut buf[..]; leb128::write::unsigned(&mut writable, 98765).expect("Should write number"); } let mut readable = EndianSlice::new(&buf[..], NativeEndian); let val = leb128::read::unsigned(&mut readable).expect("Should read number"); assert_eq!(val, 98765); # } ``` 18401
lib.rs `gimli` is a library for reading and writing the [DWARF debugging format](https://dwarfstd.org/). See the [read](./read/index.html) and [write](./write/index.html) modules for examples and API documentation. ## Cargo Features Cargo features that can be enabled with `gimli`: * `std`: Enabled by default. Use the `std` library. Disabling this feature allows using `gimli` in embedded environments that do not have access to `std`. Note that even when `std` is disabled, `gimli` still requires an implementation of the `alloc` crate. * `read`: Enabled by default. Enables the `read` module. Use of `std` is optional. * `write`: Enabled by default. Enables the `write` module. Always uses the `std` library. 2166
read
test_util.rs 1510
write