mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 13:19:54 +00:00
Add missing files and remaining patches from import
This commit is contained in:
parent
7919b99305
commit
0dbc4ee537
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -138,6 +138,8 @@ jobs:
|
||||
path: binr/blob/radare2.xz
|
||||
- name: Static static r2 with meson
|
||||
run: |
|
||||
sudo apt-get --assume-yes install python3-wheel python3-setuptools
|
||||
sudo pip3 install meson==0.55.3 ninja==1.10.0
|
||||
CFLAGS="-static" LDFLAGS="-static" meson --prefix=${HOME}/.local --buildtype release --default-library static build
|
||||
ninja -C build && ninja -C build install
|
||||
- name: Pub
|
||||
|
4
dist/plugins-cfg/plugins.static.cfg
vendored
4
dist/plugins-cfg/plugins.static.cfg
vendored
@ -4,7 +4,6 @@ STATIC="anal.8051
|
||||
anal.arc
|
||||
anal.arm_cs
|
||||
anal.arm_gnu
|
||||
anal.avr
|
||||
anal.i4004
|
||||
anal.bf
|
||||
anal.chip8
|
||||
@ -40,7 +39,6 @@ asm.8051
|
||||
asm.arc
|
||||
asm.arm_cs
|
||||
asm.arm_gnu
|
||||
asm.avr
|
||||
asm.bf
|
||||
asm.chip8
|
||||
asm.cris_gnu
|
||||
@ -116,7 +114,6 @@ bin.pe64
|
||||
bin.pebble
|
||||
bin.smd
|
||||
bin.sms
|
||||
bin.avr
|
||||
bin.sfc
|
||||
bin.te
|
||||
bin.vsf
|
||||
@ -216,7 +213,6 @@ lang.vala
|
||||
parse.6502_pseudo
|
||||
parse.arm_pseudo
|
||||
parse.att2intel
|
||||
parse.avr_pseudo
|
||||
parse.chip8_pseudo
|
||||
parse.dalvik_pseudo
|
||||
parse.m68k_pseudo
|
||||
|
4
dist/plugins-cfg/plugins.static.nogpl.cfg
vendored
4
dist/plugins-cfg/plugins.static.nogpl.cfg
vendored
@ -4,7 +4,6 @@ STATIC="anal.8051
|
||||
anal.arc
|
||||
anal.arm_cs
|
||||
anal.arm_gnu
|
||||
anal.avr
|
||||
anal.i4004
|
||||
anal.bf
|
||||
anal.chip8
|
||||
@ -37,7 +36,6 @@ asm.8051
|
||||
asm.arc
|
||||
asm.arm_cs
|
||||
asm.arm_gnu
|
||||
asm.avr
|
||||
asm.bf
|
||||
asm.chip8
|
||||
asm.cris_gnu
|
||||
@ -109,7 +107,6 @@ bin.pe64
|
||||
bin.pebble
|
||||
bin.smd
|
||||
bin.sms
|
||||
bin.avr
|
||||
bin.sfc
|
||||
bin.te
|
||||
bin.vsf
|
||||
@ -197,7 +194,6 @@ parse.dalvik_pseudo
|
||||
parse.m68k_pseudo
|
||||
parse.mips_pseudo
|
||||
parse.sh_pseudo
|
||||
parse.avr_pseudo
|
||||
parse.wasm_pseudo
|
||||
parse.x86_pseudo
|
||||
parse.z80_pseudo"
|
||||
|
@ -1597,10 +1597,10 @@ OPCODE_DESC opcodes[] = {
|
||||
INST_LAST
|
||||
};
|
||||
|
||||
static void set_invalid_op(RAnalysisOp *op, ut64 addr) {
|
||||
static void set_invalid_op(RAnalOp *op, ut64 addr) {
|
||||
// Unknown or invalid instruction.
|
||||
op->family = R_ANALYSIS_OP_FAMILY_UNKNOWN;
|
||||
op->type = R_ANALYSIS_OP_TYPE_UNK;
|
||||
op->family = R_ANAL_OP_FAMILY_UNKNOWN;
|
||||
op->type = R_ANAL_OP_TYPE_UNK;
|
||||
op->addr = addr;
|
||||
op->nopcode = 1;
|
||||
op->cycles = 1;
|
||||
|
34
libr/asm/arch/avr/avr_instructionset.h
Normal file
34
libr/asm/arch/avr/avr_instructionset.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef AVR_DISASSEMBLER_INSTRUCTIONSET_H
|
||||
#define AVR_DISASSEMBLER_INSTRUCTIONSET_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Total number of assembly instructions, Maximum number of operands */
|
||||
#define AVR_TOTAL_INSTRUCTIONS 145
|
||||
#define AVR_MAX_NUM_OPERANDS 2
|
||||
|
||||
/* Enumeration for all types of AVR Operands */
|
||||
enum AVR_Operand_Types {
|
||||
OPERAND_NONE, OPERAND_REGISTER_GHOST,
|
||||
OPERAND_REGISTER, OPERAND_REGISTER_STARTR16,
|
||||
OPERAND_REGISTER_EVEN_PAIR, OPERAND_REGISTER_EVEN_PAIR_STARTR24,
|
||||
OPERAND_BRANCH_ADDRESS, OPERAND_RELATIVE_ADDRESS, OPERAND_LONG_ABSOLUTE_ADDRESS,
|
||||
OPERAND_IO_REGISTER, OPERAND_DATA, OPERAND_DES_ROUND, OPERAND_COMPLEMENTED_DATA, OPERAND_BIT, OPERAND_WORD_DATA,
|
||||
OPERAND_X, OPERAND_XP, OPERAND_MX,
|
||||
OPERAND_Y, OPERAND_YP, OPERAND_MY, OPERAND_YPQ,
|
||||
OPERAND_Z, OPERAND_ZP, OPERAND_MZ, OPERAND_ZPQ,
|
||||
};
|
||||
|
||||
/* Structure for each instruction in the instruction set */
|
||||
struct _instructionInfo {
|
||||
char mnemonic[7];
|
||||
/* Bitwise AND mask for just the instruction bits */
|
||||
uint16_t opcodeMask;
|
||||
int numOperands;
|
||||
/* Bitwise AND mask for each operand in the opcode */
|
||||
uint16_t operandMasks[AVR_MAX_NUM_OPERANDS];
|
||||
int operandTypes[AVR_MAX_NUM_OPERANDS];
|
||||
};
|
||||
typedef struct _instructionInfo instructionInfo;
|
||||
|
||||
#endif /* AVR_DISASSEMBLER_INSTRUCTIONSET_H */
|
6
libr/asm/arch/avr/disasm.h
Normal file
6
libr/asm/arch/avr/disasm.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef AVR_DISASSEMBLER_H
|
||||
#define AVR_DISASSEMBLER_H
|
||||
|
||||
int avr_decode (char *out, ut64 addr, cut8 *buf, int len);
|
||||
|
||||
#endif /* AVR_DISASSEMBLER_H */
|
@ -165,7 +165,7 @@ static int string_scan_range(RList *list, RBinFile *bf, int min,
|
||||
if (is_wide32) {
|
||||
str_type = R_STRING_TYPE_WIDE32;
|
||||
} else {
|
||||
bool is_wide = needle + rc + 2 < to && !w[0] && w[1] && !w[2];
|
||||
bool is_wide = needle + rc + 4 < to && !w[0] && w[1] && !w[2] && w[3] && !w[4];
|
||||
str_type = is_wide? R_STRING_TYPE_WIDE: R_STRING_TYPE_ASCII;
|
||||
}
|
||||
} else {
|
||||
|
@ -617,10 +617,10 @@ EXPECT=<<EOF
|
||||
0x00000000 2 r1_r0
|
||||
0x00000000 2 r17_r16
|
||||
0x00000000 2 r19_r18
|
||||
0x00000000 2 r21_rz0
|
||||
0x00000000 2 r23_rz2
|
||||
0x00000000 2 r25_rz4
|
||||
0x00000000 2 r27_rz6
|
||||
0x00000000 2 r21_r20
|
||||
0x00000000 2 r23_r22
|
||||
0x00000000 2 r25_r24
|
||||
0x00000000 2 r27_r26
|
||||
0x00000000 2 r31_r30
|
||||
0x00000000 2 x
|
||||
0x00000000 2 z
|
||||
@ -837,7 +837,7 @@ EXPECT=<<EOF
|
||||
0x000035d4 8 fcn.000035d4
|
||||
0x000035dc 30 fcn.000035dc
|
||||
0x000035fa 1 syscall.0.0
|
||||
0x00008000 2 r29_rz8
|
||||
0x00008000 2 r29_r28
|
||||
0x00008000 2 y
|
||||
0x00008000 2 sp
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user