diff options
author | iximeow <me@iximeow.net> | 2021-08-22 15:11:38 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-08-22 15:12:53 -0700 |
commit | 7b994612e4cf90c9c8669cdab4def7d0777a0f48 (patch) | |
tree | 4215fae1f70c7976eb7b154afbebc6b34a81ce10 | |
parent | 35e325a7246d61d184b0336a89370d638bea0a81 (diff) |
support field annotations in decoding using yaxpeax-arch=0.2.70.1.1
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | src/lib.rs | 11 |
3 files changed, 16 insertions, 3 deletions
@@ -1,3 +1,7 @@ +# 0.1.1 + +add support for `yaxpeax_arch::AnnotatingDecoder` + # 0.1.0 update yaxpeax-arch to 0.2.3, apply API updates @@ -1,14 +1,14 @@ [package] name = "yaxpeax-msp430" -version = "0.1.0" +version = "0.1.1" authors = [ "iximeow <me@iximeow.net>" ] license = "0BSD" repository = "http://git.iximeow.net/yaxpeax-msp430/" description = "msp430 decoders for the yaxpeax project" [dependencies] -yaxpeax-arch = { version = "0.2.3", default-features = false, features = [] } +yaxpeax-arch = { version = "0.2.7", default-features = false, features = [] } "serde" = { version = "1.0", optional = true } "serde_derive" = { version = "1.0", optional = true } @@ -8,7 +8,7 @@ extern crate serde; extern crate yaxpeax_arch; use yaxpeax_arch::{Arch, AddressDiff, Decoder, LengthedInstruction, Reader, StandardDecodeError, U16le}; -use yaxpeax_arch::{AnnotatingDecoder, DescriptionSink, NullSink}; +use yaxpeax_arch::annotation::{AnnotatingDecoder, DescriptionSink, NullSink}; mod display; pub use display::NoContext; @@ -197,6 +197,15 @@ pub struct MSP430FieldDescription { id: u32, } +impl yaxpeax_arch::annotation::FieldDescription for MSP430FieldDescription { + fn id(&self) -> u32 { + self.id + } + fn is_separator(&self) -> bool { + false + } +} + #[derive(Clone, PartialEq, Eq)] pub enum MSP430Field { Opcode(Opcode), |