Commit Graph

240 Commits

Author SHA1 Message Date
pancake
d89274c8a5 Minor code cleanup in the gdb code 2023-11-10 19:54:32 +01:00
Luc Tielen
2400ded5e9 Migrate gdb plugin ##debug 2023-07-06 17:00:51 +02:00
Luc Tielen
c477dfd7a4
Some more Rm 590 2023-06-12 17:53:18 +02:00
pancake
e56c1ee7fe Fix reading and parsing /proc/pid/maps from remote gdb on android ##debug
* Tested on Android12 / arm64
2023-06-08 11:35:01 +02:00
Ildar
6e70a4c79e Replace strtok by thread-safe r_str_tok_r 2023-04-22 20:52:23 +02:00
pancake
bed9f722b3 Fix uninitialized oobread in the elf parser 2023-03-28 22:57:33 +02:00
pancake
a215f295a8 Migrate the pdp11 plugin ##arch 2023-03-28 15:42:28 +02:00
Vitaly Bogdanov
8bd67c93a1 Add A0 register into MIPS register profiles
A0 register is required to successfully apply the profile.
2023-01-17 13:48:52 +01:00
Vitaly Bogdanov
7f101ba546 Add required A0 register into x86 register profile provided by GDB ##debug 2023-01-16 18:34:18 +01:00
Vitaly Bogdanov
77c19aa18d Use proper type for the XMM register inside profile recieved ##debug 2023-01-16 18:33:52 +01:00
Vitaly Bogdanov
88bdb74385 Mark libgdbr_t.server_debug field as deprecated 2023-01-08 22:54:39 +01:00
Vitaly Bogdanov
e433acc266 Remove libgdbr_t.server_debug flag and =g! command
After replacing eprintf by R_LOG_ calls one can enable GDB server
packets logging using `e log.level=5` command.
2023-01-08 20:07:38 +01:00
Vitaly Bogdanov
159e7d922a Replace eprintf by R_LOG_ calls inside GDB module 2023-01-08 20:07:38 +01:00
pancake
b8e6b52aac Also replace __UNIX__ with R2__UNIX__ 2022-12-10 20:32:10 +01:00
pancake
97a6439055 Do the same for __WINDOWS__ -> R2__WINDOWS__ 2022-12-10 20:32:10 +01:00
pancake
a79add6dff
Update sdb to remove double include paths ##build
* Updated pkg-config paths
2022-11-19 01:05:18 +01:00
pancake
53e908d802
Generalize vector instruction types instead of following intel-specific ##analysis
* MMX -> VEC64
* XMM -> VEC128
* YMM -> VEC256
* ZMM -> VEC512
2022-11-02 14:02:40 +01:00
pancake
b6e7292019 Enable linting for trailing tabs ##lint 2022-08-22 23:25:40 +02:00
Richard Patel
dcd740dd53
Refactor a few eprintf to R_LOG_ERROR ##refactor 2022-08-01 00:21:21 +02:00
pancake
475398b88f Fix infinite loop in gdbserver =g ##crash 2022-06-08 20:47:48 +02:00
pancake
4039c23f3e
Cleanup gdb:// uri handling in r2's main.c 2022-06-08 20:18:38 +02:00
pancake
dbff56ff60
Fix gcc12 warnings. Ref #20087 2022-05-27 12:42:58 +02:00
pancake
c8ae21f68f
Only build library archives when -Dblob is provided ##build
* Lowers the amount of objects from 2400 to 1500
2022-03-22 11:59:13 +01:00
pancake
f8a35da205
Dont use != NULL as its implicit in C, even for bool casts ##refactor
$ find binr libr -name "*.c" -exec sed -i -e 's/ != NULL//g' {} \;
2022-03-15 19:54:04 +01:00
pancake
4648f448e1 Fix some static meson blob dependency leftovers ##build 2022-03-15 19:29:16 +01:00
Lazula
d507bda91c Remove R_EMPTY and R_EMPTY2 2022-03-13 11:26:10 +01:00
pancake
f2995c2949
Introduce r_strf and stop using sdb_fmt ##util 2022-01-18 18:35:31 +01:00
M. George Dan
c25595a767
Fix gdb reg parsing and gdb 'G' reg writing issues ##debug 2021-08-27 02:56:00 +02:00
pancake
f8b00a57df Remove mandatory assert from gdbclient 2021-07-13 00:37:42 +02:00
pancake
7c14bac05b
Add initial support for building r2 on WASI ##build 2021-06-20 17:14:43 +02:00
pancake
23ad9b50ee
Fix #12335 - ignore system-installed r2 includes ##build 2021-05-28 00:45:48 +02:00
pancake
530c737d5d
Fix incorrect use of non-const strings and fiz zousans of warnings (#18544)
Co-authored-by: pancake <pancake@nopcode.org>
2021-04-06 12:45:19 +02:00
pancake
bd0b0be77b
Two coverity findings less 2021-03-30 00:56:04 +02:00
pancake
a7c08c15ce Don't scream out WARNINGs, capitalizing it is enough 2021-03-19 11:02:54 +01:00
pancake
7ff2673dd9
Random uninitialized variable uses fixups (#18453) 2021-03-15 02:23:39 +01:00
Kamil Rytarowski
9d761f6a88
Avoid array subscript type issues (#18295)
Cast char to unsigned char for standard reasons and security purposes.

Fixes build issues on NetBSD.
2021-01-26 13:08:58 +01:00
pancake
51145a117a Fix some of the last coverities related to UAF and OOBREAD 2021-01-25 03:08:33 +01:00
pancake
171b994831 Fix #18212 - Detect RISCV gdb servers ##debug 2021-01-13 13:30:07 +01:00
yossizap
ac229c3216
Attach to target pid/tid on remote lldb connect ##debug (#17847) 2020-11-01 01:42:31 +01:00
Riccardo Schirone
2d160f2509
Avoid sdb double headers (#17249) ##build
* Avoid duplication of SDB headers in libr/include

SDB is an external project and as such it should live in shlr. However,
for simplicity in dealing with the include flags, the SDB headers were
copied in libr/include as well. This patch just keeps the SDB files
confined in shlr/sdb and make sure various r_* libs use the headers from
there.

* Fix pkgconfig file generation
2020-07-21 10:28:43 +02:00
Zi Fan
e968c9442a
Fix out-of-bounds write in arch_parse_reg_profile (#16956) 2020-05-27 14:39:17 +02:00
Zi Fan
3bea2cf5ed
Fix incorrect offset and type when parsing target description via remote gdb (#16948)
* Change regsize and regoff to mean bitsize instead of byte size
* Account for both "group" and "type" fields when extracting regs
2020-05-26 22:53:36 +08:00
David CARLIER
2019d9a78e
gdb arch reg profile memory leak fix ##debug (#16641) 2020-04-20 01:03:59 +02:00
Zi Fan
fec0aea039
Decouple shlr/gdb registers profile from code (#16312) ##debug
* Sync r2 debugger registers profile with shlr/gdb
* Add new set_reg_profile function to r_debug plugin
* Add set_reg_profile to r_debug_plugin_gdb
* Change "drp" to sync r_debug plugin register profile
* Fix incorrect pointer arithmetic and code style
2020-03-27 02:00:27 +01:00
Hye Sung Jung
757c23d5db Fix spelling errors (#15904) 2020-01-27 07:43:47 +01:00
yossizap
f64f2211fb Added reverse step and continue support to gdbr ##debug
This feature only works with server implementations that have ReverseStep
and ReverseContinue enabled, such as rr. The official gdbserver doesn't support it.
2020-01-15 09:49:03 +01:00
Anton Kochkov
f3a0a3d01c Some coverity fixes 2020-01-10 12:30:23 +01:00
yossizap
df8c96d260 Add packed sizes to gdb vector registers and improve mapping of target description to r2 regs ##debug
Some xmm registers were printed as fpu and bnd registers were shown in
all drt categories.
2020-01-04 11:36:48 +01:00
yossizap
bdd597376d Fix gdbr race conditions ##debug
gdbr lock depth wasn't handled in a mutex and there were two point where
a function would exit in a way that breaks the lock count
2019-12-20 13:17:36 +01:00
yossizap
bfa40cd5db Fix gdbr reg sync and concurrency ##debug 2019-12-20 10:17:58 +09:00