add Instruction::is_pseudo_ins()
This commit is contained in:
parent
095ce2ce93
commit
88ecc534a2
1 changed files with 16 additions and 0 deletions
|
|
@ -2106,6 +2106,22 @@ impl Instruction {
|
||||||
Ok(serde_json::from_str(json)?)
|
Ok(serde_json::from_str(json)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Test if the instruction is a dalvik instruction or a pseudo instruction like a label or a
|
||||||
|
/// debug info.
|
||||||
|
pub fn is_pseudo_ins(&self) -> bool {
|
||||||
|
matches!(
|
||||||
|
self,
|
||||||
|
Self::Try { .. }
|
||||||
|
| Self::Label { .. }
|
||||||
|
| Self::DebugLocal { .. }
|
||||||
|
| Self::DebugEndLocal { .. }
|
||||||
|
| Self::DebugEndPrologue {}
|
||||||
|
| Self::DebugBeginEpilogue {}
|
||||||
|
| Self::DebugSourceFile { .. }
|
||||||
|
| Self::DebugLine { .. }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn __str__(&self) -> String {
|
pub fn __str__(&self) -> String {
|
||||||
match self {
|
match self {
|
||||||
Self::Nop {} => "nop".into(),
|
Self::Nop {} => "nop".into(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue