Commit graph

307 commits

Author SHA1 Message Date
Thomas Strömberg
a65be1e6cd
Fix Illumos/Solaris platform support (#5972) 2026-02-27 13:01:40 +08:00
Khairul Azhar Kasmiran
2d49628aee
Remove rz_list_iter_get_data() (#5900)
* Remove rz_list_iter_get_data()
* Use rz_list_val() instead of rz_list_iter_get_data()
2026-02-10 22:03:37 +08:00
Sergey Fedorov
0bfc15ea4e
Fix condition for libproc in xnu_debug.h (#5871)
libproc exists since 10.5, it is supported for powerpc in 10.5-10.6.
xnu_threads.c uses PROC_PIDTHREADINFO which needs libproc header.
This fixes the build on 10.6 for ppc.
2026-02-05 23:02:05 +08:00
Giovanni
d7b2f85c89
Remove RzIO brainfuck/rzweb/rzpipe & RzDebug brainfuck (#5810) 2026-01-17 22:55:47 +08:00
Khairul Azhar Kasmiran
8494ae3c47
Remove rz_list_iter_cur() (#5808)
* Remove rz_list_iter_cur()
* Remove `rz_list_delete(bp->traces, .)` comment
2026-01-17 14:29:50 +08:00
Giovanni
ea21a4a7b4
Implement colors for tables and move RzListInfo out of table.c (#5729) 2026-01-05 21:34:41 +08:00
Giovanni
827a0ed1bb
Fix doxygen comments to use \<something> notation (#5720) 2026-01-02 19:05:37 +08:00
Anton Kochkov
e96b1ad95f debug: remove globals from XNU native debugger 2025-12-27 02:46:55 +08:00
Khairul Azhar Kasmiran
c1fc1419e4
Rename some rz_list funcs to rz_list_XXX_val (part 1) (#5671)
* Rename rz_list_find_ptr() to rz_list_find_val()
* Rename rz_list_delete_data() to rz_list_delete_val()
2025-12-25 22:01:49 +08:00
Khairul Azhar Kasmiran
b96202ad48
Rename rz_list_first() / rz_list_last() to rz_list_first_val() / rz_list_last_val() (#5654) 2025-12-20 17:08:59 +08:00
Ayush Goyal
a9fc5d3ca6
Fix: asn and asr command #3885 (#5477) 2025-11-04 23:38:16 +08:00
billow
7a77b8f7bd
linter: update clang-format installation to version 20 (#5451)
* fix: format with clang-format-20
* fix: fix clang-format linter with rewrite '^#define.*/\*.*\\$'
* fix: update clang-format to version 20 in workflows and documentation
* fix: add SPDX license information to .git-blame-ignore-revs
2025-10-12 08:02:03 +08:00
NOT XVilka
58f02ec36d
debug: fix coredump compilation for ARM64 (#5380)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2025-09-16 02:39:24 +08:00
Rot127
e8c04e0cf9
Separate the setters for binfile objects and current binfile in RzBin. (#5342) 2025-09-07 12:19:29 +00:00
well-mannered-goat
a77afb0a29
Refactor debug native plugin archos-wise and other minor refactors (#5295)
- separate plugin archos wise.
- move all register profiles under reg directory.
- move architecture specific from linux_debug.c and bsd_debug.c to respective files.
- replace eprintf with rz_sys_perror and RZ_LOG_*
- remove debug_native.c and reg.c
- refactor librz/debug/meson.build to compile the native plugins archos wise.

This improves code readability and maintainibility.
2025-09-01 00:00:35 +08:00
Khairul Azhar Kasmiran
a47402ad9e
Add util lib to FreeBSD debug deps (#5301) 2025-08-17 17:44:39 +08:00
well-mannered-goat
48c53b0296
Add openBSD debug tests and fix errors (#5226) 2025-06-27 22:10:35 +08:00
Anton Kochkov
58b0b3715b
Add FreeBSD x86_64 debug tests (#3273)
Co-authored-by: well-mannered-goat <takshformal@gmail.com>
Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
2025-06-24 21:19:31 +08:00
well-mannered-goat
7117ba75ea
librz/debug: add NetBSD debug tests and fix errors (#5208)
* Fix netbsd-x86_64 register profile
* Fix native_wait in netbsd.c
* Fix netbsd attach to show error
* Add netbsd-x64 debug tests
2025-06-20 00:22:33 +08:00
well-mannered-goat
b25a0d0a55
Add tests for PPC64LE debugger support (#5184) 2025-06-03 11:36:19 +05:30
Giovanni
76d41f75f8
Fixes for Haiku OS (#5149)
* Fix sys.c unused variable.
* Add native/unsupported.c
* Clean rz_debug.h from comments and functions which does not exists
* Add fall-thru comment for haiku os case
* Fix warning: "MIN" redefined /boot/system/develop/headers/posix/sys/param.h:18: note: this is the location of the previous definition
2025-05-18 20:17:40 +08:00
Giovanni
144b47d455
Move RzBreakpoint into RzDebug (#5124)
- Move trap/sw breakpoint into RzArch
- Remove RzBreakpointPlugin & RzBreakpointArch
- Add get_sw_breakpoint_at/get_sw_breakpoint_size_at binds
- Remove `dbh-`
- Change `dbh` to just list supported archs for sw breakpoints
- Implement correct PPC traps
- Add missing x86 breakpoint callback
2025-05-13 01:57:37 +08:00
NOT XVilka
30ae60a759
Remove RAP protocol (#5046)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2025-03-27 00:55:06 +08:00
Rot127
6d10861ace String/Hex-Search 1/9: Add hexadecimal number helpers, doxygen and type annotations.
Part 1/9. Likely won't build in between parts.

Co-authored-by: wargio <deroad@kumo.xn--q9jyb4c>
2025-02-22 04:12:49 +08:00
Rot127
87b75910b5
Port remaining debug commands to RzShell (#4753)
* Port `dmhb` to RzShell
* Port `dmhf` to RzShell
* Remove 'to' argument from rz_core_debug_continue_until(). It was never used in the whole function. Hence, whatever it was supposed to do, it didn't
* Port `dcu` to RzShell
* Fix tests of `dmh[bf]` commands
* Port `dmi` commands to RzShell
* Port `dmx` to RzShell
* Remove `dta` command.

Originally it limited the addresses to trace.
But it was not used in any test, and the implementation was not optimal.
It allowed only specific addresses (no range).
Also worked on strings (not ut64 values).
Also, the usefulness is limited, considering the alternative
to just not tracing a certain address.

* Add quiet and quietest mode to `dmi` commands.

This also removes the test for `dmias`.
The command was not documented and it doesn't seem to
do anything special `dmia` can't do.
2024-12-06 08:10:25 +08:00
Giovanni
e78a7be614
Remove dead code (#4705) 2024-11-08 18:46:13 +08:00
Rot127
30953d3bf6
refactor: Use HtSP for storing plugins. (#4687)
* Refactor: Use HtSP for storing plugins.

This saves iterations when searching for a plugin of a given name.
It also allows to save plugin configurations and data in hash table,
all addressed by their name. Hence, usage is more streamlined.

* Fix: iterators iterate over pointers of pointers.

* Soften the NULL check.

If arch is passed on from another struct, NULL is an allowed invalid value.

* Fix some leaks

* Fix NULL checks and incorrect inits

* Fix more leaks

* Add warning if plugin with same name was added before and is overwritten.

* Document rz_str_cmp

* Add function to create new list from iterator.

* Sort plugins alphabetically when listed.

* Fix parameter attributes, NULL checks, leaks and single rename.
2024-10-26 16:31:13 +08:00
Giovanni
db1e4993a0
Replace strdup with rz_str_dup (#4634) 2024-09-15 19:12:07 +08:00
Tushar Jain
526946f552
debug: Travis CI compilation error fixes (#4615) 2024-09-07 01:14:18 +08:00
Tushar Jain
1057cf6eb6
debug: refactor native debugger (#4604) 2024-09-05 01:39:35 +08:00
Claudio Jeker
0ef349398e
Adjust OpenBSD code to set the process state to be less wrong. (#4579)
Use the p_stat of the main thread to decide in which state the process is.
For multi-threaded applications this is still not quite correct but at
least this compiles on OpenBSD-current.

See also 5d4f90ee10

Fix for #4576
2024-07-28 10:05:46 +00:00
zhangwenlong
cbd086a7ec
Fix build error on loongarch64 (#4558) 2024-07-05 15:00:17 +08:00
Khairul Azhar Kasmiran
5129fdb5b1
Fix NetBSD 10 build (#4524)
* Fix NetBSD 10 build
* It's TRAP_BRKPT, not TRAP_BKPT
2024-06-01 23:34:42 +08:00
pelijah
9c34738977
Remove SdbList (#4496) 2024-05-17 19:23:04 +08:00
pelijah
706a6bf6c2
sdb: remove unused cas and expire features (#4487) 2024-05-12 18:27:54 +08:00
pelijah
f818ca4296
Refactor sdb_foreach and related APIs (#4471)
* Refactor sdb_foreach and related APIs
* Strengthen bounds check in sdb_dump_next()
* Switch to RzPVector
* Use length info in filter_noreturn()
* Fix cmp function
* Remove unused sdb_like() API
* Pass SdbKv to SdbForeachCallback
* Add sdbkv_dup_value() helper
2024-05-07 07:57:52 +08:00
Anton Kochkov
63d6d93195 debug: fix Android X86 builds 2024-04-27 16:44:21 +08:00
pelijah
b8ebd5ac42
Add missing vector foreach macros to clang-format cfg (#4456)
* Add rz_vector_foreach to clang-format cfg
* Add other vector foreach macros
2024-04-22 07:16:46 +08:00
z3phyr
0551f2545f
Fix memory leaks in linux heap parser (#4426)
* Fix memory leaks in debug path
* Fix memory leaks in mach and mdmp format
* Update the fix for mach
* Add support for aarch64 tcache parsing
* Test case fix
* Comment update

---------

Co-authored-by: Giridhar Prasath R <giridh1337@gmail.com>
2024-04-21 12:14:06 +08:00
Florian Märkl
2cacf880c1
Add missing newlines to some RZ_LOG_* calls (#4439) 2024-04-18 00:04:38 +08:00
pelijah
f2d8e0db3d
Add HtSP, HtSS, HtSU, SetS (#4415)
- All `ht_*_new0()` are removed
- `freefn` field of HT options was renamed to `finiKV`
- `finiKV_user` fields was added to HT options
- Added `ht_*_new_opt_size` API
- `HtSP` and `HtUP` are created with `ValueFree` callback  that allows to reduce extra LOC and prevent bugs
- `SetP` replaced with `SetS` (based on `HtSP`)
- `rz_th_ht_*_new0()` and `rz_th_ht_*_new_opt()` are replaced with `rz_th_ht_*_new(HtXX *)`
2024-04-16 20:27:48 +08:00
Florian Märkl
149453bd51 Fix debugger build on Mac OS X 10.5/x86
Some more APIs were incorrectly checked for with __POWERPC__, even
though they have nothing to do with the architecture, but were only
introduced in Mac OS X 10.6.
2024-04-09 10:54:12 +02:00
Florian Märkl
505893bdce Fix debugger build on Mac OS X 10.5/ppc
Debugging itself is still not working, but now it does not prevent a successful
build for static analysis.
2024-04-09 10:54:12 +02:00
Rot127
efd5f2532d
Add note to not use rz_time_now() for timestamps. (#4388) 2024-03-25 19:20:25 +08:00
wargio
c53b053b61 Remove useless semicolon 2024-03-25 18:36:02 +08:00
z3phyr
39278ab891
debug: Android doesn't have gs_base (#4384)
Co-authored-by: Giridhar Prasath R <giridh1337@gmail.com>
2024-03-25 07:45:50 +08:00
Anton Kochkov
957a2997b3
debug: i386 register profile lacks gs_base (#4382) 2024-03-24 12:18:13 +08:00
Anton Kochkov
fb5bc404b6
debug: i386 register profile lacks gs_base (#4380) 2024-03-23 12:58:25 +08:00
z3phyr
ab593b3c7e
Make TLS detection only X86-specific (#4378) 2024-03-22 21:37:39 +08:00
z3phyr
de4a3c7419
Enhance dmht tcache command (#4355)
- Add tcache heap heuristics
- Fetch glibc version from libc
- Add unit testcases for glibc version

Co-authored-by: Giridhar Prasath R <giridh1337@gmail.com>
2024-03-22 11:00:58 +08:00