52 Commits
Author SHA1 Message Date
pancake 5417ccc164 Add source user installs and verify released r2pm binaries v0.0.1 2026-11-06 04:21:27 +01:00
pancake 9df012ee10 Fix release builds and SQL session cleanup 2026-11-06 04:00:53 +01:00
pancake 104599f12a Build fixes for r2-6.2.6 2026-11-06 03:28:33 +01:00
pancake c4b6114464 Check for stale libxsql in the Makefile 2026-10-15 11:06:55 +02:00
Elias Bachaalany 248bcdc83f Document agent workflows and fix Windows runtime DLL placement 2026-10-14 07:52:38 +02:00
Elias Bachaalany 16da52e29f projects: DELETE does not stop on radare2's deletion prompt
With scr.interactive on, P- asks "Confirm project deletion? (Y/n)" on the
console (r_core_project_delete) and waits. A DELETE FROM projects therefore
blocked the statement, and over =h the request with it. The DELETE is the
confirmation: switch scr.interactive off around P- and restore it.
2026-10-11 01:07:35 +02:00
Elias Bachaalany 70184621db xrefs: the full scan reads every reference, like the pushdowns
The libr full scan walked each analysed function's own refs, so it missed
references whose source lies outside every function (a call past a
function's last analysed block). WHERE to_addr = X and WHERE from_addr = X
read radare2's global xref store, so the plans disagreed: on a real 64-bit
PE, to_addr = X returned 157 rows and the filtered scan 148.

Scan the same store (r_anal_refs_get(anal, UT64_MAX), what axj lists) and
resolve from_func per row with the same owner lookup the pushdowns use. A
source address inside two functions is now one row, not one per function.
2026-10-11 01:07:35 +02:00
pancake 46f00dd9a1 Use native metadata APIs and literal SQL command dispatch 2026-10-05 10:27:07 +02:00
pancake 69e959d898 Prevent command expansion in SQL assembly and gadget searches 2026-10-05 10:27:07 +02:00
pancake 7eaaedc12c Remove the obsolete r2pipe backend 2026-10-05 10:27:07 +02:00
pancake 5836f83068 Recommend r2pm and document manual plugin loading 2026-10-03 11:00:56 +02:00
Elias Bachaalany 2d32ad72dc README: load the plugin with L, and correct three stale lines
- r2 -i <plugin> fails on Windows with radare2 6.2.2, which reads a .dll
  given to -i as a script ('Invalid l subcommand'). The examples now load
  it with -c 'L <path>', which works on every platform
- libxsql is pinned to a release tag (v1.0.21) in all three builds, no
  longer 'a current libxsql'
- the core library links radare2's r_util since r_name_check, so it is no
  longer backend-neutral
- 'may lag; see below' pointed at nothing
2026-10-03 11:00:56 +02:00
pancake 25776ca418 Fix plugin installs and name release assets for r2pm 2026-10-03 09:09:12 +02:00
pancake 3f9ae4cfa0 Fix Linux CI libpath under the custom r2prefix 2026-10-03 08:10:06 +02:00
Elias Bachaalany d92f9d962d Pin libxsql to v1.0.21 instead of tracking main
This series needs libxsql 1.0.21 (exact_int64 / exact_text /
Int64KeyRange). All three build paths fetched libxsql main, so a later
libxsql change could break a build of this exact source. CMake's
GIT_TAG, the meson wrap's revision and the Makefile's clone now name the
release tag; bump them together.
2026-10-02 17:25:55 +02:00
Elias Bachaalany 2618735bd4 Describe measurements instead of pointing at research outside this repo
Comments pointed at research notes, named by directory and file, that a
reader of this repository cannot open. The measurements are kept; only
the pointers go.
2026-10-02 17:25:55 +02:00
Elias Bachaalany c46ccb42b6 Compare constraint and INSERT values exactly, as native columns would
SQLite hands a virtual table's constraint values over with no column
affinity, and every plan here sets omit=1, so it never re-checks a row.
Reading them with as_int64()/as_c_str() answered wrongly: `addr = 4096.5`
looked up 4096, `pattern = NULL` searched for "", a blob was read as its
bytes. The factories of byte_search, read_cstr, assemble, search_asm,
rop_gadgets, demangle and the instructions start_addr/count window now use
libxsql 1.0.21's exact_int64 / exact_text / Int64KeyRange: a value nothing
can equal yields no rows and issues no command, while '4096' and 4096.0
still mean 4096.

byte_search's window used -1 for "unset", so an address at or above 2^63
(a kernel image; negative in the int64 addr column) silently disabled the
bound. It is now an Int64KeyRange in the column's own signed order.

INSERT values get no affinity either, so `INSERT INTO comments(addr, ...)
VALUES ('main', ...)` wrote at address 0. Integer INSERT arguments of
comments, flags, bookmarks, funcs, patches and io_maps, and the bytes
UPDATE value, are now taken exactly or refused.
2026-10-02 17:25:55 +02:00
Elias Bachaalany 956d60a11a funcs: answer WHERE addr = X with one lookup, compute cost only when read
On radare2 6.2 a join or correlated subquery onto funcs timed out: every
probe rebuilt the whole table, and r_anal_function_cost (which decodes
every instruction) was ~70% of each build.

- funcs: filter_eq on addr -> func_at (libr: r_anal_get_function_at;
  r2pipe: afij @ X, refusing an address inside a function), rowid = addr,
  row_lookup, and key-based mutation snapshots so a multi-row
  UPDATE/DELETE stays correct with the filter in place
- libr: funcs_scan and func_at share fill_func_row, and the pipe path's
  aflj and afij rows share func_row_from_json, so a looked-up row cannot
  drift from a scanned one
- cost is computed only when the query reads that column

Pairs with libxsql 1.0.21, which builds a query-scoped table once per
cursor instead of once per xFilter.
2026-10-02 17:25:55 +02:00
Elias Bachaalany 58cd6ebde4 Fix three radare2 6.2 regressions
- libr data-dir probe: an explicit prefix is probed as given. radare2
  6.2's r_sys_prefix(arg) returns the executable-derived prefix instead
  of arg, so the probe checked the wrong directory and types, syscalls
  and calling conventions came back nearly empty
- relocs: io->cachemode is a bool, so 'cachemode & R_PERM_W' was always
  0 and io.cache was always switched on; test the bool
- bininfo.file is SQL NULL when radare2 reports no file, not ''
2026-10-02 17:25:55 +02:00
Elias Bachaalany eca186fa6e Build with CMake, and against radare2 6.2.2 as well as master
- CMake: the core library's table sources now include <r_util.h> for
  r_name_check, but the r2xsql target had no radare2 include path or
  library, so eight files failed with 'r_util.h: No such file'. Link it
  to Radare2::r_util (the Makefile and meson builds already pass
  radare2's flags to every source)
- r_io_desc_info replaced r_io_desc_is_dbg in radare2 38e23d0018 (ABI
  144); 6.2.2, which CI pins, is ABI 142. Pick by R2_ABIVERSION
- restore json_utils::r2_quote, which the demangle commit removed but
  the types table's td fallback still calls
- the name-rule error messages describe r_name_check's rule
2026-10-02 17:25:55 +02:00
pancake 96f2f8a3c7 Use the r_bin_demangle native api instead of iD command 2026-10-02 17:25:55 +02:00
pancake 64b5e218e3 Fix build 2026-09-30 17:44:11 +02:00
pancake b5316d5e9d Use r_name_check instead of json_utils::valid_flag_name 2026-09-30 06:54:26 +02:00
pancake 05d598ded0 Document native readers and command-backed operations 2026-09-27 19:02:28 +02:00
pancake f6373445b4 Estimate table sizes through native collection APIs 2026-09-27 19:02:28 +02:00
pancake 977d4ac84b Read ESIL operations from native instruction analysis 2026-09-27 19:02:28 +02:00
pancake cd1582798e Read binary metadata and relocations without JSON commands 2026-09-27 19:02:28 +02:00
pancake 42ba6fabb7 Read type definitions and members from the native type database 2026-09-27 19:02:28 +02:00
pancake 489339db54 Use native APIs for analysis and runtime catalogs 2026-09-27 19:02:28 +02:00
pancake 306c3e88a0 Read IO maps and write cache through native APIs 2026-09-27 19:02:28 +02:00
pancake 4d3690a6fc Read symbols and composite tables through native binary APIs 2026-09-27 19:02:28 +02:00
pancake e68a24e15b Read bookmarks through native flag APIs 2026-09-27 19:02:28 +02:00
pancake c5f87adf8d Use native function lookups for xrefs and analysis helpers 2026-09-27 19:02:28 +02:00
pancake 808f9bc83c Fix stale Make objects and migrate regression tests to r2r 2026-09-22 00:46:48 +08:00
Elias Bachaalany 528b22f41d Require exact function starts in scoped SQL queries 2026-09-21 18:19:47 +02:00
Elias Bachaalany 71f291bd9c Update the agent guide for native plugin commands 2026-09-21 18:08:24 +02:00
Elias Bachaalany 7c4b868c8f Refresh live library register and relocation tables 2026-09-21 18:04:15 +02:00
Elias Bachaalany ce0786a7a9 Replace project and type SQL wrappers with native commands 2026-09-21 18:00:25 +02:00
Elias Bachaalany 8f3bab2b8b Name release artifacts after the radare2 plugin 2026-09-21 17:58:56 +02:00
Elias Bachaalany 15da1ebba0 Derive SQL catalogs from the live schema 2026-09-21 17:57:31 +02:00
Elias Bachaalany 8769217bfa Render SQL results with native radare2 tables 2026-09-21 17:34:15 +02:00
Elias Bachaalany 1c5f4b8ae1 Fix flag self-renames and report refused command renames 2026-09-21 17:32:09 +02:00
Elias Bachaalany 89b982a022 Build the radare2 plugin by default with CMake 2026-09-21 17:31:04 +02:00
Elias Bachaalany 2ea9853988 Add sqlj for JSON SQL script results 2026-09-21 17:23:25 +02:00
pancake 647b30c111 Add CI badge in the readme and update to r2-6.2.2 2026-09-21 15:46:55 +02:00
Elias Bachaalany ca934bf64a Remove CLI Tool Completely 2026-09-21 15:42:06 +02:00
Elias Bachaalany b7bda1601b Remove standalone http server, reuse r2 one 2026-09-21 14:56:27 +02:00
Elias Bachaalany 75d9f471ca Remove the standalone mcp support
- Dont dup r2mcp responsabilities
2026-09-19 03:30:36 +02:00
pancake 12a4b92f29 Use RCoreHelp when using sql? 2026-08-21 13:38:26 +02:00
pancake 3df985badf Fix build with latest r2 2026-08-21 13:38:26 +02:00