summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-08-22 15:11:38 -0700
committeriximeow <me@iximeow.net>2021-08-22 15:12:53 -0700
commit7b994612e4cf90c9c8669cdab4def7d0777a0f48 (patch)
tree4215fae1f70c7976eb7b154afbebc6b34a81ce10
parent35e325a7246d61d184b0336a89370d638bea0a81 (diff)
support field annotations in decoding using yaxpeax-arch=0.2.70.1.1
-rw-r--r--CHANGELOG4
-rw-r--r--Cargo.toml4
-rw-r--r--src/lib.rs11
3 files changed, 16 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0c9b6f0..5239408 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
diff --git a/Cargo.toml b/Cargo.toml
index c4f97b8..1209f10 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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 }
diff --git a/src/lib.rs b/src/lib.rs
index ea83289..c700094 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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),