Skip to content

Commit 91e3865

Browse files
authored
Merge pull request gimli-rs#433 from philipc/release
Release 0.19.0
2 parents 2d8c8e2 + f090ef4 commit 91e3865

File tree

5 files changed

+46
-10
lines changed

5 files changed

+46
-10
lines changed

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
--------------------------------------------------------------------------------
44

5+
## 0.19.0
6+
7+
Released 2019/07/08.
8+
9+
### Breaking changes
10+
11+
* Small API changes related to `.debug_loc` and `.debug_loclists`:
12+
added `read::RawLocListEntry::AddressOrOffsetPair` enum variant,
13+
added `write::Sections::debug_loc/debug_loclists` public members,
14+
and replaced `write::AttributeValue::LocationListsRef` with `LocationListRef`.
15+
[#425](https://github.com/gimli-rs/gimli/pull/425)
16+
17+
### Added
18+
19+
* Added `read::Attribute::exprloc_value` and `read::AttributeValue::exprloc_value`.
20+
[#422](https://github.com/gimli-rs/gimli/pull/422)
21+
22+
* Added support for writing `.debug_loc` and `.debug_loclists` sections.
23+
[#425](https://github.com/gimli-rs/gimli/pull/425)
24+
25+
* Added `-G` flag to `dwarfdump` example to display global offsets.
26+
[#427](https://github.com/gimli-rs/gimli/pull/427)
27+
28+
* Added `examples/simple.rs`.
29+
[#429](https://github.com/gimli-rs/gimli/pull/429)
30+
31+
### Fixed
32+
33+
* `write::LineProgram::from` no longer requires `DW_AT_name` or `DW_AT_comp_dir`
34+
attributes to be present in the unit DIE.
35+
[#430](https://github.com/gimli-rs/gimli/pull/430)
36+
37+
--------------------------------------------------------------------------------
38+
539
## 0.18.0
640

741
Released 2019/04/25.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "Apache-2.0/MIT"
88
name = "gimli"
99
readme = "./README.md"
1010
repository = "https://github.com/gimli-rs/gimli"
11-
version = "0.18.0"
11+
version = "0.19.0"
1212
exclude = ["/ci/*", "/releases/*", "/.travis.yml"]
1313
edition = "2018"
1414

@@ -28,7 +28,7 @@ crossbeam = "0.7.1"
2828
getopts = "0.2"
2929
memmap = "0.7"
3030
num_cpus = "1"
31-
object = "0.11"
31+
object = "0.12"
3232
rayon = "1.0"
3333
regex = "1"
3434
test-assembler = "0.1.3"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Add this to your `Cargo.toml`:
3030

3131
```toml
3232
[dependencies]
33-
gimli = "0.18.0"
33+
gimli = "0.19.0"
3434
```
3535

3636
The minimum supported rust version is 1.32.0.
@@ -41,6 +41,8 @@ The minimum supported rust version is 1.32.0.
4141

4242
* Example programs:
4343

44+
* [A simple parser](./examples/simple.rs)
45+
4446
* [A `dwarfdump` clone](./examples/dwarfdump.rs)
4547

4648
* [An `addr2line` clone](https://github.com/gimli-rs/addr2line)

examples/dwarfdump.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn add_relocations(
158158
}
159159
let offset = offset as usize;
160160
match relocation.kind() {
161-
object::RelocationKind::Direct32 | object::RelocationKind::Direct64 => {
161+
object::RelocationKind::Absolute => {
162162
if let Some(symbol) = file.symbol_by_index(relocation.symbol()) {
163163
let addend = symbol.address().wrapping_add(relocation.addend() as u64);
164164
relocation.set_addend(addend as i64);
@@ -209,7 +209,7 @@ impl<'a, R: gimli::Reader<Offset = usize>> Relocate<'a, R> {
209209
fn relocate(&self, offset: usize, value: u64) -> u64 {
210210
if let Some(relocation) = self.relocations.get(&offset) {
211211
match relocation.kind() {
212-
object::RelocationKind::Direct32 | object::RelocationKind::Direct64 => {
212+
object::RelocationKind::Absolute => {
213213
if relocation.has_implicit_addend() {
214214
// Use the explicit addend too, because it may have the symbol value.
215215
return value.wrapping_add(relocation.addend() as u64);
@@ -515,7 +515,7 @@ where
515515
if flags.eh_frame {
516516
// TODO: this might be better based on the file format.
517517
let address_size = match file.machine() {
518-
object::Machine::Arm | object::Machine::X86 => 4,
518+
object::Machine::Arm | object::Machine::Mips | object::Machine::X86 => 4,
519519
object::Machine::Arm64 | object::Machine::X86_64 => 8,
520520
object::Machine::Other => mem::size_of::<usize>() as u8,
521521
};

src/write/line.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ mod tests {
19191919
encoding,
19201920
&debug_line_str_offsets,
19211921
&debug_str_offsets,
1922-
)
1922+
)
19231923
.unwrap();
19241924

19251925
let read_debug_line = read::DebugLine::new(debug_line.slice(), LittleEndian);
@@ -1930,7 +1930,7 @@ mod tests {
19301930
// Testing missing comp_dir/comp_name.
19311931
None,
19321932
None,
1933-
)
1933+
)
19341934
.unwrap();
19351935

19361936
let dwarf = read::Dwarf::default();
@@ -1943,8 +1943,8 @@ mod tests {
19431943
&mut convert_line_strings,
19441944
&mut convert_strings,
19451945
convert_address,
1946-
)
1947-
.unwrap();
1946+
)
1947+
.unwrap();
19481948
}
19491949
}
19501950
}

0 commit comments

Comments
 (0)