summaryrefslogtreecommitdiff
path: root/src
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 /src
parent35e325a7246d61d184b0336a89370d638bea0a81 (diff)
support field annotations in decoding using yaxpeax-arch=0.2.70.1.1
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs11
1 files changed, 10 insertions, 1 deletions
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),