Skip to content

Commit

Permalink
feat: Switched over to addr for appropriate interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Mar 24, 2018
1 parent 3a9f06e commit 719dde7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ url = "1.7.0"
serde = "1.0.34"
serde_derive = "1.0.34"
serde_json = "1.0"
serde_plain = "0.3.0"
url_serde = "0.2.0"
chrono = { version = "0.4.0", features = ["serde"] }
uuid = { version = "0.6.2", features = ["serde", "v4"] }
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
#[macro_use]
extern crate serde_plain;
extern crate url;
extern crate url_serde;
extern crate uuid;
Expand Down
10 changes: 5 additions & 5 deletions src/protocol/v7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ pub struct FileLocation {
pub struct InstructionInfo {
/// If known the location of the image.
#[serde(skip_serializing_if = "Option::is_none")]
pub image_addr: Option<u64>,
pub image_addr: Option<Addr>,
/// If known the location of the instruction.
#[serde(skip_serializing_if = "Option::is_none")]
pub instruction_addr: Option<u64>,
pub instruction_addr: Option<Addr>,
/// If known the location of symbol.
#[serde(skip_serializing_if = "Option::is_none")]
pub symbol_addr: Option<u64>,
pub symbol_addr: Option<Addr>,
}

/// Represents template debug info.
Expand Down Expand Up @@ -407,11 +407,11 @@ pub struct AppleDebugImage {
/// Alternatively a macho cpu subtype.
pub cpu_subtype: Option<u32>,
/// The starting address of the image.
pub image_addr: u64,
pub image_addr: Addr,
/// The size of the image in bytes.
pub image_size: u64,
/// The address where the image is loaded at runtime.
pub image_vmaddr: u64,
pub image_vmaddr: Addr,
/// The unique UUID of the image.
pub uuid: Uuid,
}
Expand Down
10 changes: 5 additions & 5 deletions tests/test_protocol_v7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ fn test_full_exception_stacktrace() {
package: Some("hello.whl".into()),
module: Some("hello".into()),
instruction_info: v7::InstructionInfo {
image_addr: Some(0),
instruction_addr: Some(0),
symbol_addr: Some(0),
image_addr: Some(v7::Addr(0)),
instruction_addr: Some(v7::Addr(0)),
symbol_addr: Some(v7::Addr(0)),
}
},
],
Expand All @@ -481,8 +481,8 @@ fn test_full_exception_stacktrace() {
\"hello.py\",\"abs_path\":\"/app/hello.py\",\"lineno\":7,\"\
colno\":42,\"pre_context\":[\"foo\",\"bar\"],\"context_line\":\
\"hey hey hey\",\"post_context\":[\"foo\",\"bar\"],\"in_app\":true,\
\"vars\":{\"var\":\"value\"},\"image_addr\":0,\"instruction_addr\":0,\
\"symbol_addr\":0}],\"frames_omitted\":[1,2]}}]}}"
\"vars\":{\"var\":\"value\"},\"image_addr\":\"0x0\",\"instruction_addr\":\"0x0\",\
\"symbol_addr\":\"0x0\"}],\"frames_omitted\":[1,2]}}]}}"
);
}

Expand Down

0 comments on commit 719dde7

Please sign in to comment.