Skip to content

Commit

Permalink
read/cfi: replace Expression with offset/length
Browse files Browse the repository at this point in the history
This avoids the need to store `Reader` in the `UnwindContext`,
which simplifies lifetime management.
  • Loading branch information
philipc committed Mar 12, 2024
1 parent 567c636 commit 80fddf4
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 144 deletions.
11 changes: 8 additions & 3 deletions crates/examples/src/bin/dwarfdump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,10 @@ fn dump_cfi_instructions<R: Reader, W: Write>(
factored_offset
)?;
}
DefCfaExpression { expression: _ } => {
DefCfaExpression {
offset: _,
length: _,
} => {
writeln!(w, " DW_CFA_def_cfa_expression (...)")?;
}
Undefined { register } => {
Expand Down Expand Up @@ -1033,7 +1036,8 @@ fn dump_cfi_instructions<R: Reader, W: Write>(
}
Expression {
register,
expression: _,
offset: _,
length: _,
} => {
writeln!(
w,
Expand All @@ -1043,7 +1047,8 @@ fn dump_cfi_instructions<R: Reader, W: Write>(
}
ValExpression {
register,
expression: _,
offset: _,
length: _,
} => {
writeln!(
w,
Expand Down
Loading

0 comments on commit 80fddf4

Please sign in to comment.