Commit Graph

1126 Commits

Author SHA1 Message Date
pancake
6ae845c991
Move asm/wasm into anal, and add new opasm() callback ##abi
* ABI break for all anal plugins
2022-01-09 22:55:34 +01:00
Sergi Àlvarez i Capilla
ab1e0de94c Remove asm.hexagon, anal one is enough ##refactor 2022-01-07 03:24:07 +01:00
Sergi Àlvarez i Capilla
ffcca7dfb5 Increase local buffer to avoid some scary long instruction truncation 2022-01-07 01:07:04 +01:00
Sergi Àlvarez i Capilla
75f813a4a9 Update tests and help about asm.leahints -> asm.hint.lea 2022-01-07 00:56:27 +01:00
Sergi Àlvarez i Capilla
478c7d2d1d Fix capstone v5 regression 2022-01-07 00:56:27 +01:00
Sergi Àlvarez i Capilla
d7117df242 Do not use sdb_fmt in arm.cs plugin 2022-01-06 23:21:00 +01:00
Sergi Àlvarez i Capilla
1eaee48370 Initial implementation of the 'aafs' command ##analysis
* Find function entrypoints and creates a single basic block function
* Useful for fast initial analysis instead of aaa (30min vs 5s)
* Handy to get xrefs context in function boundaries
2021-12-23 18:58:38 +01:00
junchao-loongson
efd05bc7e9
Add support for the new loongarch architecture ##analysis
* Disasm, emulation, analysis and ELF support updated
2021-12-23 12:37:29 +01:00
Lazula
ad749a0b1a Fix static/R_API function definition formatting
* Remove spaces before parens
* Remove spaces after asterisks
2021-12-21 20:58:12 +01:00
pancake
681323267d
Refactor, improve and move chip8 support out of libr/asm ##asm 2021-12-17 11:21:52 +01:00
pancake
d24bf5b654 More build fixes, googlefuzz integration, add r_asm_cpus() api via the wip 'al' command 2021-12-17 00:15:38 +01:00
pancake
9986b6e464
Remove asm.ebc and merge disasm into the anal ##refactor 2021-12-16 18:27:45 +01:00
Sergi Àlvarez i Capilla
cc217494b2 Disable the disassembler logic in the asm plugin for 8051 ##asm
* Avoid compile+link the same code twice for asm & anal
2021-12-14 10:16:58 +01:00
pancake
2ddcdea581 Use cs_disasm_iter in anal.x86.cs to use less heap ##analysis 2021-12-12 21:48:09 +01:00
pancake
2e49776cce Use cs_disasm_iter to save few allocations ##disasm 2021-12-12 21:48:09 +01:00
pancake
49f40816d3 Fix indent issues, pass out buffer size and fix disasm return value 2021-12-09 09:51:29 +01:00
gogo
2f950f5ebe add registers sreg, adcl and adch
replace spaces by tabs and add registers rampz and eind

remove comments from avr analysis plugin

add some registers to the register list

add more registers

add more registers

ajust register sizes

list all remininders full registers

analyze the binary

check for environment variable to fix tests

Use r_str_get() instead of manual string null checks in AVR plugin

move sreg instruction in numerical order

split the .assemble function with new files assemble.c and assemble.h

reassemble new instructions with operand spl and sreg

can reassemble old hex input as well as new input with register names. Register sph added.

use r_strbuf apis

Add file disassemble.c to meson

Fix is_register_found is ONLY set to true when current_register is != NULL

Fix size logic on return value.

Modify tests

fix review
2021-12-09 09:51:29 +01:00
pancake
e6f2cd0b2a
Remove trailing spaces (#19460)
$ git grep ' $' | grep -v ^test/ | cut -d : -f 1 | sort -u > /tmp/trailing
$ for a in `cat /tmp/trailing` ; do sed -i -e 's/ *$//' $a ; done
2021-12-02 17:39:59 +01:00
slowhand99
3776e618a7 Changes to be committed:
modified:   libr/asm/p/asm_jdh8.c
	Updated TODO
2021-11-24 19:29:16 +01:00
condret
67db06009f Add jdh-8 asm-plugin template 2021-11-24 19:29:16 +01:00
Lazula
2255bf8b5d Many indentation style fixes
* Change several 8-space indents to tabs
* Apply tab indent style when breaking long lines
* Move operators from EOL to start of next line
* Fix ternary formatting
2021-11-18 10:43:52 +01:00
Sergi Àlvarez i Capilla
55dfb5cae8 Fix metadata for some asm/anal ARM plugins 2021-10-28 13:16:12 +02:00
pancake
6ae90339fd
Add armv7 to the arm.v35 plugin ##disasm 2021-10-19 20:21:36 +02:00
Sergi Àlvarez i Capilla
98a0bfaf84 Fix crash when using the pyc disassembler without pyc bin ##anal 2021-10-15 02:51:24 +02:00
pancake
58312182e8
Add the first multiarch assembler plugin: vasm ##asm 2021-10-12 21:49:11 +02:00
pancake
ba7ac2b853
Add support for the ALPHA disassembler ##disasm 2021-10-01 19:16:03 +02:00
pancake
e8e9cef1e2
Initial implementation of the RISCV assembler ##asm (#19144) 2021-09-28 11:18:23 +02:00
pancake
e3e64df6f3
Add PDP-11 disassembler support from binutils ##disasm (#19141) 2021-09-27 14:22:22 +02:00
Adwaith V Gautham
c6c498455f
Fix #19019 - Added OT_GPREG flag to instructions with byte, word, qword etc ##asm
* Updated code for a few x86 instructions and added tests for the same
2021-09-01 01:04:23 +02:00
Murphy
5e608cf01f
Fix #18876 - Check imm bounds for some instructions in the x86.nz assembler ##asm
* Add immediate_out_of_range function
* Add range limit to out imm8 instruction
* check imm range in opmov
2021-07-30 11:26:32 +02:00
pancake
35209b643e Add pushf/popf instructions to x86.nz ##asm 2021-07-30 01:23:03 +02:00
pancake
71f6069a46
Use NULL disassembler in the NULL asm plugin (#18945) 2021-07-28 12:09:36 +02:00
pancake
d1d9f7f774
Initial import of the arm64v35 disassembler and analysis plugins ##anal (#18753) 2021-07-15 12:08:41 +02:00
pancake
2e417ee938
Initial support for capstone-less compilations ##build 2021-06-21 17:48:00 +02:00
pancake
ff6bd5a99c Update the VAX disassembler from binutils ##asm 2021-06-20 17:13:28 +02:00
pancake
4d629aee72
Fix disasm alignment of data words in s390x disassembler plugins ##anal (#18746) 2021-05-24 20:26:24 +02:00
pancake
5da2f97e62
Fix s390.gnu disassembly and add test for 6 byte instructions ##anal (#18744) 2021-05-24 17:04:18 +02:00
pancake
162e223028
Rename sysz to s390 and add the s390.gnu plugin from binutils 2.36 ##asm 2021-05-04 04:01:22 +02:00
murphy
0c835fe5cb Fix 1452312 Dereference after null check 2021-04-26 20:49:55 +02:00
pancake
b59ba1c507 Fix signature 2021-04-26 11:10:19 +02:00
pancake
143ac8d9e8 Boolify check_features() 2021-04-25 17:57:57 +02:00
pancake
1a87b2c04d
Collapse all opcode_*.c files into opcode_all.c ##build (#18627) 2021-04-25 03:05:35 +02:00
pancake
2434c3ca74
Switch to Capstone5 as default ##asm (#18127)
* Add riscv for capstone5 in the meson
* Report capstone version in the asm plugins
* Many changes in the ppc analysis, seems like it's improved, (emulation quality and xrefs)
* Update all tests and report issues in capstone4 to upstream
* Fix-x86-16 test marked as broken as it needs better fix
2021-04-24 22:04:51 +02:00
Rin
caf09b9264
Improve MIPS support(mips.gnu) by migrating new codes from binutils (#18579) ##disasm
* Refresh old files with current binutils (copyright notes are not updated for now)
* Add remain components from binutils-gdb
* Update original copyright messages
* Modify MIPS disassembler to match output style
* Try to fix wrong jalx argument decoding
* Fix a gs264e disassembling bug caused by wrong definition
* Fix MSVC compiling problem, and add original binutils commit info
* Add disasm_obj.arch assignment back
* Add missing space character in comment
2021-04-15 18:24:41 +02:00
pancake
ab295f224a
Improve python disassembler and binary parser ##bin (#18561)
* Fix segfault when loading pyc9 file
* Lowercase all instructions (user can later decide asm.ucase)
* Use 1 space, not 20, between instruction and arg
* Detect pyc3.9 bins, not loading properly yet
2021-04-11 01:38:49 +02:00
pancake
5a29fa2856 Fix oobread in 6502 2021-04-05 03:11:33 +02:00
pancake
0ace091ff4 Add possible asm.ppc.cpu values 2021-04-05 02:19:21 +02:00
pancake
c150dc489f
Honor asm.cpu for asm.arch=ppc.gnu ##disasm (#18543) 2021-04-04 22:17:17 +02:00
pancake
bcd9e0aea0
Add the m68k.gnu disassembler plugin ##disasm 2021-04-04 18:07:26 +02:00
Khairul Azhar Kasmiran
d248a2230a dcpu16/dis.c: Use snprintf/strncpy instead of sprintf/strcpy 2021-03-15 06:09:50 +01:00