Commit graph

28440 commits

Author SHA1 Message Date
Dhruv Maroo
2bcdb40bd3 Set eflags after shift instruction 2023-06-14 11:04:34 +08:00
Dhruv Maroo
349e699098 Jump addresses are not relative 2023-06-14 11:04:34 +08:00
Dhruv Maroo
b4b873de82 Save the result in operand for shift instructions
* Also return `NULL` for unimplemented instructions (for the sake of
      tracetesting)
    * Check for `rex.w` in rotate instructions
2023-06-14 11:04:34 +08:00
Dhruv Maroo
d2c475e4d2 Pass the correct value of pc 2023-06-14 11:04:34 +08:00
Dhruv Maroo
0053fc62a4 Add ins_size field in x86 instruction struct 2023-06-14 11:04:34 +08:00
Dhruv Maroo
388404880d Remove PC registers from the register profile 2023-06-14 11:04:34 +08:00
Anton Kochkov
7d64d8b2bf
Move RzPanel types from RzCons to RzCore (#3576) 2023-06-14 07:15:10 +08:00
Anton Kochkov
89551db165
Move RzPanels from RzCore to RzCoreVisual (#3575) 2023-06-13 11:42:21 +08:00
Anton Kochkov
a53598cab2
Remove mention of pz from help (#3574)
`pz` was removed before, remove the mention from help too
2023-06-12 21:19:37 +08:00
Anton Kochkov
3f935c11c6
Remove last global from TUI (#3573) 2023-06-12 19:41:40 +08:00
Giovanni
5f590d144e
Add FNEQ and fix FEQ (#3571) 2023-06-12 14:57:18 +08:00
Heersin
295faad6ca
Fix forder return type and add feq macro (#3570) 2023-06-12 10:05:10 +08:00
Daniel
70a0244e04
Rename separator_get_first and word_get_first ##refactor (#3559) 2023-06-11 19:38:42 +08:00
Luca Borzacchiello
d0426f9edd
Fix arguments alignment in PYC disassembler (#3569) 2023-06-11 18:38:28 +08:00
wargio
b52ebcc62f Fix mnemonic mask for bf 2023-06-10 09:17:44 +08:00
wargio
5f30f1c966 Re-add rz_core_sym_name & rz_core_sym_is_export wrongly removed. 2023-06-10 09:17:44 +08:00
wargio
4186be8b56 Add tests for printing IL 2023-06-10 09:17:44 +08:00
wargio
09b24bca84 Fix mnemonic mask for 6502 2023-06-10 09:17:44 +08:00
wargio
2f5da62e17 Add agI and aoi for printing RzIL statments as graph or pretty printing 2023-06-10 09:17:44 +08:00
wargio
4dbe18da08 Sort meson IL source files. 2023-06-10 09:17:44 +08:00
Anton Kochkov
3ac8a36c7b
Remove tiny graphs (#3567) 2023-06-09 17:59:04 +08:00
billow
6f3969f8c0
Fixes for variables and arguments diplay in disasm (#3561)
* Remove ConsoleTheme from disasm.c
* Add `rz_core_analysis_var_to_string()` API method
* Avoid variable overriding arguments
* Fix tests
2023-06-08 17:22:07 +08:00
Brian Randall
099439fcb3
Modify capitalize flag to make entire OP uppercase ##disasm (#3556) 2023-06-07 02:12:01 +08:00
billow
6eb14128ad
Adding tricore support for rz_debug_plugin_gdb (#3557) 2023-06-06 12:53:51 +08:00
Giovanni
0efc031365
Bump libdemangle version (#3558) 2023-06-06 12:18:43 +08:00
billow
ff6817e084 Fix multiple memory leaks 2023-06-05 22:41:20 +08:00
billow
d0732c5c88 Update tests 2023-06-05 22:41:20 +08:00
billow
0742b32b1d Unified function signatures
- Add `cc-tricore-32.sdb.txt`
- Add `map_dwarf_reg_to_tricore_reg`
- Add `RzAnalysisFunction->has_debuginfo`
- `rz_analysis_var_is_arg`: Register variables are no longer always arguments, but depend on debug information and call conventions
2023-06-05 22:41:20 +08:00
billow
94f2fae87e
Fix compile warnings (#3550) 2023-06-02 13:07:51 +08:00
wargio
53e1fee6c5 Fixed regressions 2023-06-02 09:51:35 +08:00
wargio
8cfc86a82e Fix all tests and add aaC test 2023-06-01 23:16:09 +08:00
wargio
77b822d5fc Add aaC command
`aaa` command performs class recovery from the rz_bin data.
This step cannot be executed alone because there was no equivalent
command.
2023-06-01 23:16:09 +08:00
wargio
c85b1afa4c Rewrite how bins are loaded into RzBinObject
This commit rewrites completely how RzBinPlugin are used to load info
into the RzBinObject structure.

Main changes are:
- Avoid looping multiple times to set the same data:
  now the data is cycled only once to rebase addresses, demangle strings
  and to make each loaded structure similar to each other.

- rz_bin_demangle is now demangling only strings:
  the old implementation was a hack over a hack to add classes & methods
  into the RzBinObject while demangling a string.
  This allowed methods and classes to be added to RzBinObject when for
  example invoking `is` or other printing commands.
  This was meant to be an "optimization" to avoid looping and doing
  things on-the-fly.

- Now the demangling is done after guessing the language used in the bin.
  This is done to avoid looping to various demanglers hoping that a
  string is going to be correctly demangled.
  After each string is demangled, the string is given to the language
  related function which adds classes, methods and fields into the
  RzBinObject fields.

- Swift handling is a special case, since the demangler can be disabled
  via -Duse_swift_demangler.
  The issue with the swift demangler is that is not correctly demangling
  strings and outputting swift code, but instead is creating something
  that sometimes works, sometimes doesn't.
  Also the old code only added fields and never methods for "reasons",
  and the new code just uses what the old code was doing as is.

- The new code also takes advantage of the language detection, which now
  happens before the demangling of symbols, imports and relocs.
2023-06-01 23:16:09 +08:00
Florian Märkl
aab3cc7610
Fix endian in Mach-O CPU_TYPE_ARM64 reading (#3542)
The 34Li1i format was wrong (using big endian) and not fitting the
structure. Other changes are related cleanups.
2023-06-01 09:38:10 +08:00
Giovanni
b943e1d05f
Ensure the concurrency job group is unique (#3538) 2023-05-30 17:55:08 +08:00
billow
c0154a26a0
Fix function arguments augmentation with DWARF (#3530)
* Add `VariableKind` to Dwarf `Variable`
* Refactor `rz_analysis_dwarf_integrate_functions`
* Add `RzAnalysisVarKind` to `RzAnalysisVar`
* Add function parameters tests for x86, ARM, Tricore
2023-05-30 16:40:09 +08:00
Anton Kochkov
163fd3bfec Remove dead code from DWARF parser 2023-05-30 12:31:39 +08:00
Florian Märkl
ea04e76d1b
Add support for dyldcache headers up to dyld-1042.1 (#3536)
Newer dyldcaches have more fields in the header. This change adds
heuristics for determining the version and reading and displaying the
newer fields if available.
2023-05-29 19:27:45 +02:00
Florian Märkl
c5978e158c
Fix oob write in dyldcache accel loading (#3534) 2023-05-28 22:17:20 +02:00
dvertx
86511a16c9
fix pointer casting to integer (#3532) 2023-05-28 19:22:29 +08:00
dvertx
d1a3f9333e
Fix unregistered comiss type (#3533) 2023-05-28 19:21:45 +08:00
Anton Kochkov
e924ea7f11
Remove incomplete ESIL support for RSP (#3531) 2023-05-26 14:36:00 +08:00
Florian Märkl
4c077e341a
Fix oob read from corrupt dyldcache dependents (#3527)
k < dep_array_count check was missing, so without 0xffff termination or
an invalid .dependentsStartArrayIndex, the loop would read out of
bounds.
2023-05-25 16:10:49 +02:00
billow
abfa59c1a1 Fix rz_core_file_reopen_debug 2023-05-24 08:49:05 +08:00
billow
ac326f23b2 Fix rz_core_theme_load 2023-05-24 08:49:05 +08:00
billow
73c546ddc0
Fix compile warnings (#3522) 2023-05-23 09:52:47 +08:00
Siddharth Mishra
5960cf6527
Add Float Operation Builder Macros in RzIL OpBuilder (#3516) 2023-05-22 00:00:59 +08:00
Florian Märkl
daffe8bbbb
Fix arm64 adrp assembler (#3519)
Fixed the calculation of the immediate value and more spaces, e.g.
"adrp     x0, 0x1234000" are allowed now.
2023-05-21 11:16:37 +08:00
Giovanni
105bc0ed50
Revert "Add float to raw bitvector conversion. (#3509)" (#3517)
This reverts commit 74c044ad63.
2023-05-20 15:39:31 +08:00
Giovanni
f03e1d5114
Automatically cancel any previous workflow on new push. (#3510) 2023-05-20 13:10:50 +08:00