Commit graph

78 commits

Author SHA1 Message Date
Khairul Azhar Kasmiran
1173a1fb66
Move rz_str_get/get2 into rz_str.h and rename them to rz_str_get_null/get (#521) 2021-02-06 20:40:36 +08:00
Alexis Ehret
f2107767a4
Refacto function assemble librz/asm/arch/z80/z80asm.c (#507) 2021-02-04 11:45:40 +00:00
Khairul Azhar Kasmiran
458c2cb3ca 8051_ass.c: Remove never-executed break 2021-01-30 19:25:51 +01:00
Alexis Ehret
42c261b79f Fix dead assignment librz/asm/asm.c 2021-01-28 23:52:57 +01:00
Alexis Ehret
2a589a8233 Fix dead assignment librz/asm/arch/sh/gnu/sh-dis.c 2021-01-28 23:52:57 +01:00
Alexis Ehret
f5472f2c5a Fix dead assignment librz/asm/arch/pyc/pyc_dis.c 2021-01-28 23:52:57 +01:00
Alexis Ehret
fdf2b24398 Fix dead assignment librz/asm/arch/ebc/ebc_disas.c 2021-01-28 23:52:57 +01:00
Alexis Ehret
60a176c9ae Fix dead nested assignment librz/asm/p/asm_x86_nz.c 2021-01-28 23:19:13 +01:00
Alexis Ehret
1fe63a1516 Fix dead nested assignment librz/asm/arch/z80/z80asm.c 2021-01-28 23:19:13 +01:00
Khairul Azhar Kasmiran
8041263391
Fix strncpy truncation warnings (#479) 2021-01-28 23:55:10 +08:00
Riccardo Schirone
2c54547ec0 Clean dependencies between modules and put them in order 2021-01-28 11:57:28 +01:00
Riccardo Schirone
cee8d470c2 Remove Makefiles and many related scripts 2021-01-28 11:57:28 +01:00
Alexis Ehret
2f62fad57d Fix dead nested assignment librz/asm/arch/arm/armass.c 2021-01-28 10:25:55 +01:00
Alexis Ehret
ead62af3cb Fix dead assignment librz/asm/arch/arm/gnu/arm-dis.c 2021-01-28 09:43:02 +01:00
Alexis Ehret
5c5d6f22bd Fix dead assignment librz/asm/arch/arm/armass.c 2021-01-28 09:43:02 +01:00
Alexis Ehret
99353119cd Fix dead assignment librz/asm/arch/arc/gnu/arcompact-dis.c 2021-01-28 09:43:02 +01:00
Alexis Ehret
e3b43a1a69 Fix dead assignment librz/asm/arch/arc/gnu/arcompact-dis.c 2021-01-27 11:48:35 +01:00
Alexis Ehret
eb689a177c Fix dead assignment librz/asm/arch/arc/gnu/arc-dis.c 2021-01-27 11:48:35 +01:00
Khairul Azhar Kasmiran
98b964168b
Fix "‘%s’ directive argument is null" warnings (#464) 2021-01-27 17:03:53 +08:00
Alexis Ehret
996e63ad27 Fix dead nested assignment librz/asm/asm.c 2021-01-27 00:42:15 +01:00
Alexis Ehret
8c4dbcd68e Fix dead nested assignment librz/asm/arch/gb/gbasm.c 2021-01-27 00:42:15 +01:00
Alexis Ehret
dc2a32e1fd Fix dead nested assignment librz/asm/arch/arc/gnu/arcompact-dis.c 2021-01-27 00:42:15 +01:00
Riccardo Schirone
c803e5bb8c Re-order dependencies between modules 2021-01-21 16:38:38 +01:00
Anton Kochkov
a0be4e2e64 Run clang-format 2021-01-21 22:05:44 +08:00
Anton Kochkov
171e5c1354 Fix for clang-format parsing error 2021-01-21 22:05:44 +08:00
Khairul Azhar Kasmiran
d5601cc2fe
Replace naked rz_sys_system/write/read/freopen calls with their wrapped counterparts (#388) 2021-01-19 00:07:19 +08:00
Giovanni
e4cdedcb30
AVR: Fixed profile, (null) instruction and analysis (#361)
* Fixed missing SN alias in AVR profile.

* Fixed "(null)" instruction and analysis when unknown type is found.

* Added tests for AVR regarding (null) and invalid analysis

* AVR test is broken, due random behavior on clang.
2021-01-17 00:36:29 +08:00
Qijia Liu
7fd5903ab3 Fix memleak in db/asm/arm_64 2021-01-16 14:13:18 +01:00
eagleoflqj
a725b7b1d4 sync to llvm, support orr alias 2021-01-14 20:05:24 +08:00
eagleoflqj
94c4569348 Fix arm64 movk, movn, movz 2021-01-14 20:05:24 +08:00
wargio
d496445476 Fixed ACR build scripts to build AVR disassembler and analysis plugins 2021-01-14 09:27:40 +08:00
wargio
14e02d53dc Fixed AVR analysis plugin warning due unpopulated mnemonic
No more `WARNING: Analysis plugin avr did not return disassembly`
2021-01-14 09:27:40 +08:00
eagleoflqj
0724b04feb Support sbfm/ubfm in arm64 ##asm 2021-01-11 17:54:24 +08:00
eagleoflqj
23f365e035 Initial support for arm64 asm extendtype ##asm 2021-01-11 17:54:24 +08:00
Giovanni
1c5b008bcd
Fixing clang flow warnings (#321)
* Fixed memleak on rz_diffchar_new
* extended_arg is not used after line 87
* useless assignment
* use imm not opnd->addr.offset.imm
* fixing usage of op and memleaks related to it
* invalid cc usage on rz_debug_arg_get
* null ptr deref and memleak in gdb_to_rz_profile
* Fixed logic on instruction decoding on amd29k
* Fixed undef negative shift and memleak on mips assembler
2021-01-10 19:38:43 +01:00
Anton Kochkov
e9d91af698 More Rizin renames 2021-01-05 05:21:41 -06:00
Liumeo
6f4c7c6efb Test arm part of arm.winedbg (#18132) 2020-12-30 23:20:41 -06:00
Liumeo
b23b6aab1d Add test and update arm.winedbg (#18117) ##asm 2020-12-30 23:20:41 -06:00
Sylvain Pelissier
c3eaed924f Update RISC-V ESIL with sign extention operator (#18109) ##esil 2020-12-30 23:20:41 -06:00
Liumeo
70f38ac821 fix arm32 db/asm/snes_16 (#18061) 2020-12-22 08:26:41 +08:00
Florian Märkl
40a29cba29
Remove Pseudo-Sandbox (#239) 2020-12-21 21:31:32 +01:00
Maijin
fb7981c09e
Remove dcpu16/main.c (#242)
Remove dcpu16/main.c
2020-12-21 19:38:12 +01:00
Riccardo Schirone
286f930b93 Use O_CLOEXEC when creating pipes so they are closed on exec
By default, pipes file descriptors are not closed on exec. This means
they are inherited by the child process. However, this may be a problem
in particular in multi-threading programs (e.g. rz-test), because EOF is
not sent to a pipe until the last pipe file descriptor is closed.

This commit makes sure that by default pipes are created with O_CLOEXEC,
so they are closed whenever an exec syscall is executed. Usually pipe
file descriptors are duplicated to be stdin/stdout/stderr of the
children process and those dupped file descriptors won't be closed on
exec.

In case pipe2 is not available (e.g. MacOS), we do a pipe + fcntl, which
is in theory racy (see man open(2)). For this reason pipe, exec, system,
etc. are wrapped in rz_sys and they use a global mutex to make sure a
pipe is either created and set as O_CLOEXEC or not created at all before
an exec operation is done.

On very old systems, O_CLOEXEC may not be available at all. In those
cases, which should be rare, we just keep a list of file descriptors
created with rz_sys_pipe that we need to close before executing another
process.

Interaction with external libs may be tricky. We expect external libs to
create files/pipes that need to be closed on exec with the right flags
and we expect rizin code to manually close pipes file descriptors as
appropriate if the exec syscall is executed by an external library
(non-rizin code).

Make sure execl is found by acr/make
2020-12-15 10:18:50 +01:00
pancake
5eba08a154 Fix #15264 - Implement AND and BIC instructions in the ARM64 assembler ##asm (#18021)
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Francesco Tamagni <mrmacete@protonmail.ch>
2020-12-14 11:23:54 +01:00
Florian Märkl
f0d3199872
Add Basic SPC700 Analysis Plugin (#132) 2020-12-08 20:29:57 +01:00
Florian Märkl
d53d1e3845
Final Analysis Renaming (#124)
* Rename missing Analysis Defines
* Rename analysis config vars and other lower case stuff
* Rename test/db/analysis
* Fix analysis tests

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2020-12-08 15:05:24 +08:00
GustavoLCR
0c26b5a4ea Fix ARM MTE addg/subg and big endian decoding ##anal (#17995)
* ARM: Fix addg/subg instruction decoding
* ARM: Fix MTE intruction decoding in big endian mode
2020-12-07 23:18:29 -06:00
Anton Kochkov
ad36954adb
More renames of *anal* to *analysis* (#123) 2020-12-07 13:20:29 +01:00
Anton Kochkov
041d73dce3
Change the "anal" abbreviation to "Analysis" in Code (#117) 2020-12-06 19:25:27 +01:00
Giovanni
35a9ef94c9
Code and comments cleanup (#108) 2020-12-04 18:11:51 +08:00