Commit Graph

1840 Commits

Author SHA1 Message Date
Liumeo
724d3f7685
Update repository links (#16663) 2020-04-21 11:41:19 +08:00
pancake
8e65149d88
Do not redefine assert in reiserfs.c (#16656) 2020-04-20 17:50:22 +08:00
Liumeo
4ca3a5c54b
Fix LGTM alerts (#16645) 2020-04-20 13:59:15 +08:00
David CARLIER
2019d9a78e
gdb arch reg profile memory leak fix ##debug (#16641) 2020-04-20 01:03:59 +02:00
Riccardo Schirone
784aa48c05
Fix cmd_substitution in grep_specifier ##newshell (#16625)
* Allow cmd_substitution in grep_specifier and set core->tmpseek
2020-04-18 11:07:25 +02:00
Riccardo Schirone
58cbee4144
Add support for foreach commands ##newshell (#16607) 2020-04-17 10:33:45 +02:00
Riccardo Schirone
b4b3013197
Add support for pf commands (#16586) 2020-04-16 13:23:54 +08:00
Liumeo
871b68bb8c
Fix wrong format for long in mpc (#16474) 2020-04-09 18:15:14 +08:00
Florian Märkl
fdb17b6329
Sync SDB (#16491)
SDB Commit: 9cbdd20d8da21fb58486e6207dc486c6cc5b402f
2020-04-09 18:14:29 +08:00
Alexis Ehret
88d8357767
Fix empty struct and add test (#16408) ##types 2020-04-03 13:07:00 +02:00
radare
5a1df188f6
Build fixes to make emscripten builds happy (#16406) ##build 2020-04-02 17:52:03 +02:00
pancake
090450401f Implement tc* and fix tc glitch ##types 2020-03-30 15:31:36 +02:00
pancake
77bd3eb05e Add NSString and size_t types in tcc+r2 ##types 2020-03-30 15:31:36 +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
Riccardo Schirone
0cd90b6b7e Update radare2-shell-parser for new macro syntax and fix tests 2020-03-24 15:23:35 +01:00
Rikard Falkeborn
0972661a4d
Fix small memory leak if allocation fails (#16245) 2020-03-18 00:04:30 +01:00
Florian Märkl
0eb98d24be
Fix all Warnings for GCC 9 (#16223) 2020-03-17 13:31:28 +01:00
Florian Märkl
0b5e78e923
Make size arg of r_file_slurp() size_t (#16221) 2020-03-15 23:34:38 +01:00
radare
72093ac706
Fix #16138 - Do not preincrement when it's not necessary (#16151) 2020-03-05 19:06:59 +01:00
radare
5e1d5faebd
Support iter_hit_command and update radare2-shell-parser (#16132) ##core 2020-03-05 14:41:37 +01:00
Riccardo Schirone
d88a76d2df
tree-sitter: support iter commands (#16111) ##core
* radare2-shell-parser: shrink to single-command output when substituing

Before this patch, when substituing arguments the entire input string
was considered, making the process potentially slow if the input was
long. With this patch, substitute_args and parse_args work on a shrinked
version of the input, which includes only the current command.

Not only it improves performance, but it also prevents issues where
other non-related parts of the input string could be replaced during
apply_edits.

* radare2-shell-parser: implement some iter commands
* Add support for number_command and recursive help
* cmd_ignbithints should be set everywhere for consistency
* Save rnum->value before doing a cmd substitution
* Update radare2-shell-parser to fix null deref in html_disable_command
2020-03-03 12:42:38 +01:00
Paul I
3a8388bab6
Fix bug in windbg_read_reg() (#16086) 2020-03-02 13:38:17 +08:00
Óscar Carrasco
aa8c7de595
Implement function names with dots in signatures ##anal (#15993)
* Allow function names containing dots in tcc
2020-02-26 14:23:47 +01:00
pancake
22ac83ca8a Upgrade capstone v4 and next branches 2020-02-25 02:36:56 +01:00
Riccardo Schirone
f322c1b1bc
Add support for @* commands in new r2-shell-parser (#16038)
* Use TSSymbol instead of comparing type strings

This patch uses ts_node_symbol instead of ts_node_type to check whether
a node is of a given type. Since TSSymbol is just an integer, the check
will be much faster. Also, it allows to store commands handler in an
hashtable, instead of having if-cascade.

* Make sure r_config_hold works even when keys do not exist or are freed

* Add support for all _tmp_commands

* Make sure to always reuse the same TSLanguage

* Update both tree-sitter and radare2-shell-parser

This way we use TSLanguage version 11, which fixes some problems with
TSSymbols.

* Compute is_last_cmd on each single command and fix logging

is_last_cmd should be set on a per-command basis, so if you analyze
things like `pd 3; .; .; .;` the `.` refers to `pd 3`.

This also fixes logging, so when an invalid command is parsed, it is
still available in the history.

* Add comment about directly using r2-shell-parser in r_core_cmd_lines

r_core_cmd_lines tries to parse the input and split it in lines, but at
least in theory, we don't need it as the new parser can already handle
full scripts.

* Allow other tasks to run between commands even in the new parser

* Update radare2-shell-parser
2020-02-24 09:46:15 +01:00
Riccardo Schirone
a295504570 Use the "concatenation" concept in radare2-shell-parser 2020-02-20 00:35:41 +01:00
Khairulmizam Samsudin
e0e27b8c51
sdb header file dependency for external plugin i.e. pyc (#16004) 2020-02-19 19:39:43 +01:00
Khairul Kasmiran
78e21373be Revert "ONE_STREAM_HACK & scr.onestream: Force expected ONE_STREAM order if necessary (#15535)"
This reverts commit 39b40cdedd.
2020-02-17 00:00:46 +01:00
Riccardo Schirone
78db2b12dc new parser: fix multiple words in grep and add support for > $alias 2020-02-14 16:29:36 +01:00
Riccardo Schirone
037a521d39
Use state struct and start handling cmd_substition_arg in tree-sitter (#15966) ##core
* Fix escape/unescape in new shell parser
2020-02-13 20:41:00 +01:00
Hye Sung Jung
757c23d5db Fix spelling errors (#15904) 2020-01-27 07:43:47 +01:00
Riccardo Schirone
65d959f299
Run a travis job that uses the radare2-shell-parser (#15879)
* Run a travis job to use the radare2-shell-parser
* radare2-shell-parser: add support for grep_commands, pipes, and others
2020-01-23 09:10:28 +01:00
Riccardo Schirone
6c2ed0d81b
Update radare2-shell-parser and improve tree-sitter related code in cmd.c (#15875)
* A bit of refactoring in the code that deals with tree-sitter cmds
* Fix redirect_command parsing
* Better handling of last_commands and update radare2-shell-parser
* Fix printing of helps for @, @@, @@@
2020-01-22 11:05:24 +01:00
pancake
35b05d8697 Fix warnings 2020-01-19 17:11:07 -05:00
Riccardo Schirone
f410795ec4 Update radare2-shell-parser 2020-01-19 22:57:40 +01:00
Florian Märkl
3ead80cca8 Remove Custom Analysis for Java (#15817) ##anal 2020-01-16 11:25:49 +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
Itay Cohen
29c1344ff3 Improve realname support for symbols (#15702) ##bin
* Initial implementation of libname for flags in imports
* Initial support for PE and real flag
* Read libname for PE exports
* implement pj for imports
* Remove imp. prefix from symbol names
* Fix r_core_bin_impaddr()
* Fix some mdmp import stuff
* Print libname in ii
* Fix some imp. checks and reloc meta
* Fix r_bin_filter_sym() for imports
* Use realname for noreturn check
* Fix asm.flags.real for direct calls
* Fix realname for direct calls with fcn
* Fix resolving names from ordinal

Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2020-01-12 03:09:12 +01:00
Anton Kochkov
f3a0a3d01c Some coverity fixes 2020-01-10 12:30:23 +01:00
Riccardo Schirone
46e0a8d169
Do not compile radare2-shell-parser by default (#15769)
Last release (4.1.0) did compile it by default, but the build requires
internet access to download the repositories. For now, since the feature
is anyway very experimental, we disable it at compile time so that
distributions can just compile their packages without internet access.
In the future we may want to use submodules or augment the release
tarball to include the tree-sitter and radare2-shell-parser archives.
2020-01-07 13:37:04 +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
radare
38b5791b63
More improvements for the cmd tests using r2r.v (#15728) 2019-12-30 15:33:09 +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
Florian Märkl
e408789e34 Fix some Race Conditions with the thready task scheduler (#15667) ##core
* Fix lock ordering of RCoreTaskScheduler.lock vs. RCoreTask.dispatch_lock
* Remove RThreadLock.refs
* Fix a race in tasks
2019-12-18 16:54:37 +01:00
Riccardo Schirone
595cb21ad4 Compile tree-sitter with std=c99 flag (#15654) 2019-12-16 23:21:43 +01:00
Anton Kochkov
d5d5cd3bfa
Some coverity fixes (#15643) 2019-12-16 04:36:46 -06:00
Paul I
9a4578a915 Replace some strstr() calls with strchr() 2019-12-15 23:37:27 +01:00
yossizap
6f546149cf Fixed gdbr warnings and a dpt crash after debug was over ##debug (#15636)
RDebugPid not being initialized with NULL resulted in a free on an invalid
pointer after gdbr_threads_list failed.
2019-12-15 04:45:11 -06:00
Anton Kochkov
e11b2a9145
Some Coverity defect fixes (#15626) 2019-12-13 11:25:19 -06:00