+
Skip to content

Release 0.19.0 #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@

--------------------------------------------------------------------------------

## 0.19.0

Released 2019/07/08.

### Breaking changes

* Small API changes related to `.debug_loc` and `.debug_loclists`:
added `read::RawLocListEntry::AddressOrOffsetPair` enum variant,
added `write::Sections::debug_loc/debug_loclists` public members,
and replaced `write::AttributeValue::LocationListsRef` with `LocationListRef`.
[#425](https://github.com/gimli-rs/gimli/pull/425)

### Added

* Added `read::Attribute::exprloc_value` and `read::AttributeValue::exprloc_value`.
[#422](https://github.com/gimli-rs/gimli/pull/422)

* Added support for writing `.debug_loc` and `.debug_loclists` sections.
[#425](https://github.com/gimli-rs/gimli/pull/425)

* Added `-G` flag to `dwarfdump` example to display global offsets.
[#427](https://github.com/gimli-rs/gimli/pull/427)

* Added `examples/simple.rs`.
[#429](https://github.com/gimli-rs/gimli/pull/429)

### Fixed

* `write::LineProgram::from` no longer requires `DW_AT_name` or `DW_AT_comp_dir`
attributes to be present in the unit DIE.
[#430](https://github.com/gimli-rs/gimli/pull/430)

--------------------------------------------------------------------------------

## 0.18.0

Released 2019/04/25.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0/MIT"
name = "gimli"
readme = "./README.md"
repository = "https://github.com/gimli-rs/gimli"
version = "0.18.0"
version = "0.19.0"
exclude = ["/ci/*", "/releases/*", "/.travis.yml"]
edition = "2018"

Expand All @@ -28,7 +28,7 @@ crossbeam = "0.7.1"
getopts = "0.2"
memmap = "0.7"
num_cpus = "1"
object = "0.11"
object = "0.12"
rayon = "1.0"
regex = "1"
test-assembler = "0.1.3"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
gimli = "0.18.0"
gimli = "0.19.0"
```

The minimum supported rust version is 1.32.0.
Expand All @@ -41,6 +41,8 @@ The minimum supported rust version is 1.32.0.

* Example programs:

* [A simple parser](./examples/simple.rs)

* [A `dwarfdump` clone](./examples/dwarfdump.rs)

* [An `addr2line` clone](https://github.com/gimli-rs/addr2line)
Expand Down
6 changes: 3 additions & 3 deletions examples/dwarfdump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn add_relocations(
}
let offset = offset as usize;
match relocation.kind() {
object::RelocationKind::Direct32 | object::RelocationKind::Direct64 => {
object::RelocationKind::Absolute => {
if let Some(symbol) = file.symbol_by_index(relocation.symbol()) {
let addend = symbol.address().wrapping_add(relocation.addend() as u64);
relocation.set_addend(addend as i64);
Expand Down Expand Up @@ -209,7 +209,7 @@ impl<'a, R: gimli::Reader<Offset = usize>> Relocate<'a, R> {
fn relocate(&self, offset: usize, value: u64) -> u64 {
if let Some(relocation) = self.relocations.get(&offset) {
match relocation.kind() {
object::RelocationKind::Direct32 | object::RelocationKind::Direct64 => {
object::RelocationKind::Absolute => {
if relocation.has_implicit_addend() {
// Use the explicit addend too, because it may have the symbol value.
return value.wrapping_add(relocation.addend() as u64);
Expand Down Expand Up @@ -515,7 +515,7 @@ where
if flags.eh_frame {
// TODO: this might be better based on the file format.
let address_size = match file.machine() {
object::Machine::Arm | object::Machine::X86 => 4,
object::Machine::Arm | object::Machine::Mips | object::Machine::X86 => 4,
object::Machine::Arm64 | object::Machine::X86_64 => 8,
object::Machine::Other => mem::size_of::<usize>() as u8,
};
Expand Down
8 changes: 4 additions & 4 deletions src/write/line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ mod tests {
encoding,
&debug_line_str_offsets,
&debug_str_offsets,
)
)
.unwrap();

let read_debug_line = read::DebugLine::new(debug_line.slice(), LittleEndian);
Expand All @@ -1930,7 +1930,7 @@ mod tests {
// Testing missing comp_dir/comp_name.
None,
None,
)
)
.unwrap();

let dwarf = read::Dwarf::default();
Expand All @@ -1943,8 +1943,8 @@ mod tests {
&mut convert_line_strings,
&mut convert_strings,
convert_address,
)
.unwrap();
)
.unwrap();
}
}
}
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载