Commit graph

214 commits

Author SHA1 Message Date
GustavoLCR
79c2ea11f0 DMP/WinKD: Check KOBJECTS are thread/proc on read 2022-03-03 21:52:41 +08:00
GustavoLCR
d187251d1c DMP/WinKD: Fixes for selecting thread/process 0
* Use `ctx->ethread/eprocess` as the way to identify if there is currently a target selected
* Fixes listing kernel modules if current process cid is 0
* Fixes listing threads if current process cid is 0
2022-03-03 21:52:41 +08:00
GustavoLCR
84fbd53c7d WinKD/DMP: Use RzLog API 2022-03-03 21:52:41 +08:00
GustavoLCR
555c011165 WinKD/DMP: Reorder function parameters for consistency with RzIO 2022-03-03 21:52:41 +08:00
GustavoLCR
11c366583e DMP: Fix ETHREAD address on triage dump
* Gets `ETHREAD` address from `KPRCB`
2022-03-03 21:52:41 +08:00
GustavoLCR
7c6810e2ee DMP: Read context from KPCRB if target is on a cpu
* Get `KiProcessorBlock` address from PDB
* Read KPCRBs and check if selected thread is running in one of the
  processors
* Read context from it if so
2022-03-03 21:52:41 +08:00
GustavoLCR
246cf762ff DMP: Dynamically create profile if not found
* Adds `rz_type` dependency to `rz_debug`
2022-03-03 21:52:41 +08:00
GustavoLCR
ce97cb50df DMP: Fixes for Triage Dump
* Fix ETHREAD and EPROCESS mapping for Triage Dumps
* Fix VA mapping for Triage Dumps
* Save register context inside `DmpCtx`
* Fix attaching to thread
* Fix selecting process/thread 0
2022-03-03 21:52:41 +08:00
GustavoLCR
54af096151 WinKD/DMP: Add WindCtx->target_thread
* Make `WindCtx->target` a structure instead of a pointer
2022-03-03 21:52:41 +08:00
GustavoLCR
8237987f2d WinKD/DMP: Implement winkd_download_module_and_pdb()
debug\meson.build add rz_bin
2022-03-03 21:52:41 +08:00
GustavoLCR
284c11134f WinKD/DMP: Add timestamp to WindModule 2022-03-03 21:52:41 +08:00
GustavoLCR
ff0d411610 WinKD/DMP: Fix reading from before a page mapping 2022-03-03 21:52:41 +08:00
GustavoLCR
ed66d75d0a Make WindCtx structure more generic to support both kd and dmp 2022-03-03 21:52:41 +08:00
Florian Märkl
df915b85b1
Update capstone-next (#2370)
This fixes the operands of casp in arm64.
See for example aoj of 827c2048.
2022-02-28 16:27:50 +01:00
Giovanni
bfec86a12e
Add option to install sigdb systemwise and custom user location for additional signatures (#2328) 2022-02-28 14:32:38 +01:00
Giovanni
6d000e1122
Update fallback urls (#2355) 2022-02-22 19:47:49 +00:00
Anton Kochkov
e170bfe80e
Fix Meson subprojects language option (#2341) 2022-02-21 20:22:26 +08:00
Khairul Azhar Kasmiran
9a9ccc95f1
Use 1 regex for both .( and ..( (#2206) 2022-01-14 20:47:57 +08:00
Khairul Azhar Kasmiran
4a9d3f2438
Fix #2135: Add ..( command (#2184)
* Fix #2135 - Add `..(` command
* Use `RZ_LOG_ERROR` instead of `eprintf` inside `macro_call()`
* Improve `(?`
2022-01-13 18:10:23 +08:00
Giovanni
e90d770e4a
Fix muon issue due type casting (#2198) 2022-01-12 18:37:21 +01:00
Riccardo Schirone
6f40dfe493
Move remaining things from shlr/ to meson subprojects (#2126)
* Move binrz meson directives to binrz/ dir

* Move rizin-shell-parser to a subproject

* Move bochs to a meson subproject

* Move rzqnx to meson subproject

* Move winkd to a meson subproject

* Move rzar to a meson subproject

* Move rzw32dbg_wrap to a meson subproject

* Move ptrace-wrap to a meson subproject

* Move rzgdb to a meson subproject

* Rename w32dbg_wrap to rzw32dbg_wrap

* Update CODEOWNERS

* Remove old references to shlr

* Move shlr/heap stuff in core and remove shlr/arm

* Move spp to a meson subproject

* Remove last references to shlr

* Remove use_webui option

* Move include files directives to librz/include/meson.build

* Move librz meson directives into librz/meson.build

* Handle d/ directories inside the specific module meson.build

* Move plugins listing to specific module meson.build

* Move rzheap to its own subproject

* Fix js linter and licenses

* Use meson.override_dependency for all rz_ modules
2021-12-22 09:20:39 +08:00
Riccardo Schirone
9465cca0f5 Replace AES code with Nettle one which is LGPLv3
Code taken from https://git.lysator.liu.se/nettle/nettle and placed in
its own subproject.
2021-12-17 09:18:47 +01:00
Giovanni
bda1e9cfca
Disable GPL code and Add RISC-V support via Capstone 5 (#2087)
* -Duse_gpl=false is supported by rizin and added riscv_cs for capstone v5
* Added GPL build workflow in CI
2021-12-11 13:30:01 +01:00
Khairul Azhar Kasmiran
98e4816b03
Update capstone-bundled for -Wunneeded-internal-declaration (#2058) 2021-12-02 15:53:09 +01:00
Khairul Azhar Kasmiran
c0642a3c90
Update capstone-bundled to capstone:v4 HEAD (#2051) 2021-11-30 17:43:50 +08:00
Khairul Azhar Kasmiran
ffc0b9cf74
Use --werror with Linux Clang builds (#2043) 2021-11-29 22:37:45 +08:00
Florian Märkl
a978564527
Add Big-Endian Patch to Tree-Sitter Subproject (#1969) 2021-11-12 14:53:15 +01:00
Florian Märkl
35cae73427 Update SDB for macOS 10.5 fix 2021-10-26 10:50:22 +02:00
Florian Märkl
3bf5534380 Check for arc4random_buf in libzip 2021-10-26 10:50:22 +02:00
Giovanni
7745d2f1df
Bump libdemangle to fix Coverity and ASAN findings (#1878) 2021-10-24 10:20:55 +08:00
Giovanni
18569e6cf0
enforce c99/gnu99 on libdemangle (#1785) 2021-10-01 20:10:22 +02:00
Giovanni
e224ee7b28
Add demangling as plugins and libdemangle as external dependency (#1656)
* Added demangling as plugins and libdemangle as external dependency
* Added iDl to return the list of demanglers
* moved demangling tests into rz-libdemangle and keep only bin tests
2021-10-01 10:45:38 +00:00
Florian Märkl
65d567282b
Remove length restrictions in analysis classes and various serializations (#1718) 2021-09-18 16:48:14 +02:00
Giovanni
efce1f3713 Bump SDB revision 2021-09-14 21:35:56 +08:00
Riccardo Schirone
0ef69ba2e8
Update tree-sitter to 0.19.5 (#1633) 2021-09-09 08:21:55 +08:00
Giovanni
c96ab70432
Use source_fallback_url when failing (#1604) 2021-09-06 17:12:52 +02:00
wargio
7146b3af75 Revert "Added support to swift demangling (#1595)"
This reverts commit b6259bd31f.
2021-09-06 17:09:51 +02:00
Giovanni
b6259bd31f
Added support to swift demangling (#1595) 2021-09-06 15:14:14 +02:00
Anton Kochkov
aacd6421e6
Fix #683 - enable SPDX linter checks (#1578)
* Fix #683 - enable SPDX linter checks
* Add license to the last remaining file
2021-09-03 00:54:40 +08:00
Anton Kochkov
3c59df7e98
Refactor RzTypes to use structs instead of SDB + New Tree-Sitter based C Parser (#1047)
- Removed oldshell version of `t` (types) commands
- Removed `tk` command because types storage switched to the hashtable
- Added `tfc` command to show the calling convention of the function or set it
- Added `tsl` (RZ_OUTPUT_MODE_LONG) to show structure members' sizes and offsets
- Added `tul` (RZ_OUTPUT_MODE_LONG) to show union members' sizes
- Switched the types storage to the hashtable instead of SDB
- Added load and export from/to SDB for standard type libraries and serialization for Projects
- Changed all `char *type` occurences to the proper `RzType`
- Added `RzCallable` type for the function/class method types
- Changed all function types API to use the `RzCallable` API
- Switched the function types (`RzCallable`) storage to the hashtable instead of SDB
- Added a connection between `RzAnalysisFunction` and `RzCallable` - `rz_analysis_function_derive_type()` API function to derive new `RzCallable` type from the `RzAnalysisFunction` even if it doesn't exist in the RzTypeDB.
- Moved type links to the RzAnalysis where they belong
- Removed TCC and MPC-based parsers
- Added Tree-Sitter-based parser for C grammar (see `librz/type/parser/*`)
- Reworked type databases in `librz/analysis/d/` to be consistent with C standard, libc, platform-specific definitions
- Switched the type links from `char *` to `RzType`
- Switched the type links from SDB to the hashtable
- Added concept of the "type paths", e.g. `a.b[20].c` where `b` is a member of `a` (`a` is either structure or a union) and `c` is a member of `b`, and `b` is an array where we take 20-th element.
- Added concept of the typeclasses (a bit similar to Haskell) for numerical types: `None` (the most generic one), `Num` (includes `Integral` and `Floating`), `Integral` (includes `Signed Integral` and `Unsigned Integral`), `Floating`.
- Added concept of type equality (`rz_types_equal(a, b)` API function)
- Added Doxygen documentation to every API function in the `librz/type/*`.
- Updated the project format from **V2** to **V3**, added migration.
2021-07-20 01:46:45 +08:00
Riccardo Schirone
243e43978e Update SDB subproject 2021-07-08 14:42:44 +02:00
Khairul Azhar Kasmiran
13d18c2b29
Use -Wno-error=stringop-truncation for capstone v3 (#1128) 2021-05-13 23:08:01 +08:00
Khairul Azhar Kasmiran
b845c8a110
Update capstone-bundled for warning-free asan build (#1127) 2021-05-13 22:32:28 +08:00
0xfd000000
2c436e1a42
libzip.wrap: add fallback url (#1116)
Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2021-05-09 11:47:03 +02:00
Riccardo Schirone
4fba31d38f
Update sdb to 9e3917094700a8bea44c6467af716c7bbb6fe97f (#1016) 2021-04-14 17:43:59 +08:00
Paul I
752736ed32
Link sdb and spp libs wholly to rz_util (#951) 2021-04-07 02:32:48 +08:00
Anton Kochkov
1fb5356dea
Update SDB to 29ce97365dead99bf6892d07bd2692aa169ff2ac (#931) 2021-03-29 19:53:52 +02:00
Riccardo Schirone
f4304f17f4
Update rizin-shell-parser to tree-sitter 0.19.4 (#928) 2021-03-29 19:14:16 +02:00
Khairul Azhar Kasmiran
1c38bb644e
Update sdb to fix asm.arch/bits/os syscall memleaks (#915) 2021-03-27 21:00:44 +08:00
Khairul Azhar Kasmiran
7a4f9b3201
Set CI buildtypes to highest opt level possible and set default buildtype to debugoptimized (#260)
* Set default meson buildtype to debugoptimized
* Add separate Codecov build and remove linux-meson-gcc-build build
* Set test buildtypes to highest optimization level possible
* Run Codecov build only on dev branch
2021-03-10 18:00:56 +08:00
Riccardo Schirone
53bf5c497f SPDX Copyright text for all files based on history
- Add LICENSES directory
- Download additional licenses used
- Add .reuse directory
- Add doc about SPDX/reuse

Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2021-03-05 19:39:15 +08:00
Anton Kochkov
f6678698ac Update SDB subproject 2021-03-02 17:50:53 +08:00
Riccardo Schirone
4e98ff8f86
libzip: use conf_data not zipconf_data in meson.build for HAVE_SHARED (#629) 2021-02-15 17:02:10 +01:00
Riccardo Schirone
c0710a8406
Move mpc to subprojects: keep it in-repo because small (#599) 2021-02-13 05:57:14 +08:00
Khairul Azhar Kasmiran
f89fd4e1e0
Get zlib using https (#601) 2021-02-12 21:33:19 +08:00
Riccardo Schirone
1ea1d265b6 Move libuv to meson subproject wrap
* disable werror on libuv, it would fail otherwise
* ci.yml: use --werror instead of changing CFLAGS
* keep libuv optional but used by default
2021-02-12 11:08:51 +08:00
Riccardo Schirone
540c70d229 Move yxml to meson subprojects wrap 2021-02-12 11:08:51 +08:00
Riccardo Schirone
fe05c9710a Move xxhash to meson subproject wrap 2021-02-12 11:08:51 +08:00
Riccardo Schirone
9349b2f3ed Move libzip to meson subproject wrap
* optionally depend on lzma, bzip2 and openssl for additional zip support
* add use_sys_libzip_openssl meson option to choose if openssl should be
  used in libzip or not
* avoid optional dependencies on windows to avoid troubles
2021-02-12 11:08:51 +08:00
Riccardo Schirone
130aed6582 Move lz4 to meson subproject wrap 2021-02-12 11:08:51 +08:00
Riccardo Schirone
95d4564434 Move zlib to meson subproject wrap 2021-02-12 11:08:51 +08:00
Khairul Azhar Kasmiran
c7cc05e883
Update sdb subproject (#544) 2021-02-09 17:01:19 +08:00
Paul I
82d6b86075
Update sdb subproject (#536) 2021-02-07 23:14:47 +08:00
Riccardo Schirone
f8291ee3c1
Switch to meson subprojects and wraps
* Remove tree-sitter/sdb git submodules and move them to meson subprojects/wraps
* Use meson subprojects/wraps to get capstone
* Remove capstone patches as they are already applied to rizinorg/capstone repository
* Use meson from master branch to create the release tarball, as all released versions so far have a bug that prevent wrap-git to be patched correctly when creating the tarball with meson dist
* Add check_meson_subproject script to do a quick check if the currently downloaded subprojects are updated
* Add subprojects_check meson option to skip the check_meson_subproject script
* Update documentation to remove references to git submodules.
2021-02-03 14:31:11 +01:00