KUNAI Static Analyzer
Kunai is a library for doing static binary analysis of Dalvik.
Loading...
Searching...
No Matches
dalvik_opcodes.hpp
1//--------------------------------------------------------------------*- C++ -*-
2// Kunai-static-analyzer: library for doing analysis of dalvik files
3// @author Farenain <kunai.static.analysis@gmail.com>
4// @author Ernesto Java <javaernesto@gmail.com>
5//
6// @file dalvik_opcodes.hpp
7// @brief Utilities for managing opcodes from the dalvik machine
8
9#ifndef KUNAI_DEX_DVM_DALVIK_OPCODES_HPP
10#define KUNAI_DEX_DVM_DALVIK_OPCODES_HPP
11
12#include "Kunai/DEX/parser/encoded.hpp"
13#include "Kunai/DEX/DVM/dvm_types.hpp"
14#include <iostream>
15
16namespace KUNAI
17{
18namespace DEX
19{
23 {
24 public:
26 DalvikOpcodes() = default;
28 ~DalvikOpcodes() = default;
29
34 static const std::string& get_instruction_name(std::uint32_t instruction);
38 static TYPES::Kind get_instruction_type(std::uint32_t instruction);
42 static const std::string& get_instruction_type_string(std::uint32_t instruction);
46 static TYPES::Operation get_instruction_operation(std::uint32_t instruction);
50 static std::string get_method_access_flags(EncodedMethod* method);
54 static std::string get_field_access_flags(EncodedField* field);
58 static std::string get_access_flags_str(TYPES::access_flags flags);
59 };
60} // namespace DEX
61} // namespace KUNAI
62
63
64#endif
65
Class with static functions to manage information about the dalvik opcodes.
Definition dalvik_opcodes.hpp:23
DalvikOpcodes()=default
Constructor of Dalvik Opcodes.
static std::string get_method_access_flags(EncodedMethod *method)
Get a string representation of the access flags from a method.
static const std::string & get_instruction_type_string(std::uint32_t instruction)
Get an instruction type given an instruction opcode in string format.
static std::string get_access_flags_str(TYPES::access_flags flags)
Get a string representation of any access flags.
static const std::string & get_instruction_name(std::uint32_t instruction)
Find the instruction opcode in a map to obtain the instruction name.
~DalvikOpcodes()=default
Destructor of Dalvik Opcodes.
static TYPES::Operation get_instruction_operation(std::uint32_t instruction)
Find the instruction operation given an instruction opcode.
static std::string get_field_access_flags(EncodedField *field)
Get a string representation of the access flags from a field.
static TYPES::Kind get_instruction_type(std::uint32_t instruction)
Find the instruction type given an instruction opcode.
Class that represent field information it contains a FieldID and also the access flags.
Definition encoded.hpp:266
Class that represent the information from a Method.
Definition encoded.hpp:635
utilities
Definition analysis.hpp:23