Commit Graph

189 Commits

Author SHA1 Message Date
pancake
29fad286b2 Adjust bpcount and use typedefs instead of structs in bps ##debug 2023-04-12 00:32:22 +00:00
pancake
9a43f62e53 Define RISCV breakpoint instructions ##debug 2023-04-12 00:27:43 +00:00
pancake
df34a54407 Add Pz[ie] command to import/export project in zip format ##projects 2023-03-02 22:11:23 +01:00
pancake
b8e6b52aac Also replace __UNIX__ with R2__UNIX__ 2022-12-10 20:32:10 +01:00
pancake
95eff67851
Enable the leading spaces linter rule and fix them all ##lint 2022-09-24 03:43:21 +02:00
pancake
45c82f50a0 Boolified the breakpoint api 2022-09-14 16:28:20 +02:00
pancake
7a35f03471 More source spacing linting 2022-08-18 14:37:29 +02:00
pancake
41cf0bcf39 Add the 'i<' lint 2022-08-18 10:27:00 +02:00
Richard Patel
b78855c38d Refactor a few eprintf 'Cannot …' to R_LOG_ERROR 2022-08-01 16:46:46 +02:00
pancake
e2bbe2b14e
Add a linting to avoid R_LOG calls ending with a dot ##lint 2022-07-04 17:42:25 +02:00
pancake
304a3a7fcf
Use more R_LOG instead of eprintfs and add more linting checks ##refactor 2022-06-28 11:24:06 +02:00
Richard Patel
363df75c06
Replace some instances of eprintf with R_LOG_ 2022-06-28 02:49:42 +02:00
pancake
3645aed1a9 Rename corebind fields to coreb, for consistency with analb, iob ##abi
* This change will break some more plugins
2022-05-07 11:58:38 +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
Sergi Àlvarez i Capilla
aef278ee9c Make -Dblob=true statically link all r2 libraries ##build 2022-03-02 11:30:28 +01:00
Lazula
ad749a0b1a Fix static/R_API function definition formatting
* Remove spaces before parens
* Remove spaces after asterisks
2021-12-21 20:58:12 +01:00
pancake
a7c08c15ce Don't scream out WARNINGs, capitalizing it is enough 2021-03-19 11:02:54 +01:00
pancake
298888dfec Fix issues spotted with gcc -Werror 2021-01-13 01:28:10 +01:00
Liumeo
c83cf92661
Use pj in bp.c & add test ##refactor (#18133)
Co-authored-by: Lazula
2020-12-29 10:13:43 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
yossizap
0cf6ce0bdd Add a warning when a breakpoint is placed in an invalid map ##debug 2020-12-03 00:15:12 -06:00
yossizap
fd0dcd5370 Fixed failure in bp placement when no architecture plugin is available ##debug
The r_bp_get_bytes check in r_bp_add made it impossible to set a
breakpoint for an architecture without a bp plugin even though the debug
backend might support setting a breakpoint.
2020-12-03 00:15:12 -06:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +02:00
Riccardo Schirone
594b940b7c
Fixes some of the issues in Travis (#17267)
* Do not check with r_return_ if the convention is present

Let's just assume the NULL default in such a case, so that architectures
for which we don't have a defined calling convention can still be
processed somehow by the analysis code. It won't be precise, but it's
better than nothing.

Also add a warning message so users are aware when the calling
convention is not defined.

* Fix oob-read when # is at the end of the cmd string

* Do not set TMPDIR when the new value is the empty string

When TMPDIR is set to empty value, clang+ld behaves in weird ways and
you cannot compile files from within the r2 shell (e.g. when using #!c
or #!cpipe)

* Use meson and add -lasan to pkgconfig files when sanitizer are used
2020-07-16 20:47:30 +08:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
Anton Kochkov
ffe743ef39
Fix #4056 - rename DEPS to R2DEPS ##build (#17020)
* Rename DEPS to R2DEPS
* Cleanup of sys/build.sh
2020-06-12 10:49:28 +08:00
Kārlis Seņko
b0ff7f5285 Fix double free in r_bp_del_index and other breakpoint index bugs
* Lack of cleanup in r_bp_del_all causing use after free in other dbi
commands
* Copy paste error turning dbix into dbx
* Add dbi- command
* Allow dbi commands to operate with index 0
2020-01-05 18:34:03 +01:00
yossizap
313d4b4893 Refactor breakpoint validation (#15754) ##debug
* Added RCoreBind.syncDebugMaps() and RCoreBind.getDebugMaps() api
* Refactor breakpoint validation ##debug
* Reenable db tests and add new tests to check validity
* Add perm check to isMapped and remove map sync to improve performance
2020-01-04 01:54:24 +01:00
pancake
836ea638b7 Revert "Validate bp addr on rebase and restore instead of preventing creation ##debug (#15750)"
This reverts commit e503bdd9c2.
2020-01-03 01:35:05 +01:00
yossizap
e503bdd9c2 Validate bp addr on rebase and restore instead of preventing creation ##debug (#15750)
This way it is possible to set breakpoints before starting debug through
'db' and the user will be notified when a breakpoint points to an
invalid map.
2020-01-03 00:57:18 +01:00
yossizap
0c34ef3c0a Prevent the restoration of disabled breakpoints ##debug (#15707)
Previously, disabled breakpoints were restored and then hit during
execution. The debug logic ignored them and continued but that's
an unnecessary slow down. To achieve this type of behavior the user
should use tracepoints.
2019-12-27 02:45:54 -06:00
fcasal
c2f01218f2 Rebase Breakpoints for PIEs ##debug (#12801) 2019-12-06 10:52:26 +01:00
Khairul Kasmiran
84ce2a7d04 r_list_new() -> r_list_new () 2019-11-10 14:06:02 +08:00
Anton Kochkov
20e19d6023 More spelling fixes in the code 2019-06-20 13:36:02 +08:00
radare
571a080ca7
s/CORELIB/R2_PLUGIN_INCORE/g (#14295) 2019-06-13 19:12:51 +02:00
lzutao
1365948cee Do not use reversed keyword of meson ##build
`files` is a reversed keyword in meson. Try to avoid using it.
2019-01-10 14:15:50 +01:00
lzutao
9cc6d2d291 meson: Do not use glob with meson ##build
* meson: Explicit is better than implicit
* meson: Fix deprecated warnings in Meson 0.49.0
* meson: Do not need separate array for installed files

libr/socket/meson.build:30: DEPRECATION: Library r_socket was passed to
the "libraries" keyword argument of a previous call to generate() method
instead of first positional argument. Adding r_socket to "Requires" field,
but this is a deprecated behaviour that will change in a future version
of Meson. Please report the issue if this warning cannot be avoided in
your case.
2018-12-27 14:17:54 +01:00
dav1901
9b0fbf1ee4 Minor code cleanups - free/R_FREE/etc 2018-11-13 00:23:49 +01:00
pancake
565094a487 Fix null deref in bp 2018-09-26 10:05:44 -07:00
pancake
41ec949204 Fix #11112 - Rename {srwx,flags,perms} to perm. (-21 LOC)
Unify R_IO, R_BIN, R_BP, .. into R_PERM_* using 1 letter syntax
2018-09-22 11:31:45 +02:00
Paul I
bf29250ddd Fix #11487 (#11534) 2018-09-15 22:52:12 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Riccardo Schirone
eee1385466
Meson private (#11331)
* meson: refactor library cflags
* meson: use visibility=hidden by default
* remove unused var
* magic/meson: replace tabs with spaces
2018-09-03 10:07:28 +02:00
AsFaBw
84852de244 Fix 10811 - Improvements in gdbclient breakpoints (#10940) 2018-08-07 12:15:11 +02:00
Riccardo Schirone
7572f315ea
meson improvements (#10617)
* meson.build: fix meson build when not on git
* meson.build: make capstone a dependency
* meson.build: make r_magic library optional
* meson.build: capstone include is already in the dependency
* meson.build: use dependencies instead of manual linking + includes
* meson.build: add travis
* flag/meson.build: include sdb dependency
* travis-script: print messages based on install system
* io/meson.build: add sdb as dependency
* syscall/meson.build: missing sdb dependency
* {parse,config}/meson.build: add sdb dependency
* travis.yml: pass INSTALL_SYSTEM var to docker
* {bin/shlr}/meson.build: add sdb_dep to r2java and bin
* install meson and ninja-build in r2-travis docker
* travis.yml: allow meson build to fail for now
* anal/meson.build: add sdb and java dependencies
* egg/meson.build: add sdb dependency
* travis.yml: meson build env should be also in the includes list
* core/meson.build: add java dep
* meson.build: use dependencies also to create main r2 dependency
* rasm2/meson.build: replace link_with with dependencies
* rasm2/meson.build: add sdb as dependency
* meson.builds: convert link_with to dependencies and fix tabs
* travis-script: change meson install prefix and set PKG_CONFIG_PATH
* travis-script: add lib64 to LD_LIBRARY_PATH
2018-07-09 16:58:38 +02:00
pancake
f5f090b709 Implement named breakpoints with support for expressions 2018-06-19 12:27:57 +02:00
pancake
d22fc94d40 Fix realloc misussage in r_bp 2018-06-19 11:34:13 +02:00
pancake
cd1662903d Make breakpoints at offset 0 work 2018-06-19 11:33:50 +02:00
pancake
1288473703 Implement 'dbi addr' and dbi. 2018-06-19 11:24:56 +02:00
pancake
9c49aeda0b Fix UAF issues in RBreakpoint (there are probably more) 2018-06-19 11:07:16 +02:00