Skip to content

Commit

Permalink
Rename LineTableRow.address to addr
Browse files Browse the repository at this point in the history
We use addr as opposed to address in many places. Rename the
LineTableRow.address member to go with the flow.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o authored and danielocfb committed Oct 26, 2023
1 parent f7c4edd commit f41ac1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/gsym/linetab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl LineTableHeader {

#[derive(Clone, Debug)]
pub struct LineTableRow {
pub address: Addr,
pub addr: Addr,
pub file_idx: u32,
pub file_line: u32,
}
Expand All @@ -80,7 +80,7 @@ impl LineTableRow {
/// * `symaddr` - the address of the symbol that `header` belongs to.
pub fn from_header(header: &LineTableHeader, symaddr: Addr) -> Self {
Self {
address: symaddr,
addr: symaddr,
file_idx: 1,
file_line: header.first_line,
}
Expand Down Expand Up @@ -113,7 +113,7 @@ pub fn run_op(
}
ADVANCE_PC => {
let (adv, _bytes) = ops.read_u64_leb128()?;
ctx.address += adv as Addr;
ctx.addr += adv as Addr;
Some(RunResult::NewRow)
}
ADVANCE_LINE => {
Expand Down Expand Up @@ -144,7 +144,7 @@ pub fn run_op(
}

ctx.file_line = file_line as u32;
ctx.address += addr_delta as Addr;
ctx.addr += addr_delta as Addr;
Some(RunResult::NewRow)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/gsym/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl<'dat> GsymResolver<'dat> {
Some(RunResult::Ok) => {}
Some(RunResult::NewRow) => {
row_cnt += 1;
if addr < lntab_row.address {
if addr < lntab_row.addr {
if row_cnt == 1 {
// The address is lower than the first row.
return Ok(None)
Expand Down

0 comments on commit f41ac1e

Please sign in to comment.