Commit Graph

1857 Commits

Author SHA1 Message Date
Riccardo Schirone
9b6160cf5f
Fix ; at the end of the value of eq_sep_args (#16988) 2020-06-01 11:07:13 +02:00
Riccardo Schirone
7985537330
Fix pfo command without arguments (#16961)
* Fix pfo command without arguments
* Fix radare2-ci-tree-sitter tests
2020-05-28 16:29:44 +03: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
Khairul Azhar Kasmiran
a103293ec4
Unpin AppVeyor's Meson ##build (#16925)
* Unpin AppVeyor's Meson
* Don't use absolute path from meson.current_source_dir() with static_library()
2020-05-20 11:55:15 +08:00
pancake
b49609af7f
Fix static build (#16926) 2020-05-20 00:35:06 +08:00
Riccardo Schirone
9e39499279
Fix & to list tasks (#16848) 2020-05-19 00:51:16 +08:00
Ishi Tatsuyuki
1390d1fc4e
Move yxml into shlr (#16799) 2020-05-12 11:58:10 +02:00
Riccardo Schirone
39865315c0
CentOS tree sitter fix using gnu99 when available ##build
* Update ACR to use the new CHKFLG
2020-05-05 18:43:25 +02:00
Óscar Carrasco
990a6dfa23
Fix #16343 - Do not generate numeric structs from unnamed typedefs in "ts" ##types (#16485) 2020-05-05 15:51:17 +02:00
Liumeo
7ffb7cf77a
Do not redefine assert in dis.c (#16694) 2020-04-28 19:35:29 +02:00
GustavoLCR
ac5355fb3d
Fixes for windows debugger - ##windows ##debug (#16717)
* Fix #15937 - Fix debuggee hanging when attaching to it
* Fix `dm` not working for attached processes
* Fix debuggee crashing when opening a file dialog
* Unify RIOW32Dbg and w32dbg_wrap_instance under W32DbgWInst
* Don't signal threads on select, only on continue
2020-04-26 11:54:36 +08:00
Liumeo
34be38f96e
remove dl.h and dl.c (#16696) 2020-04-24 09:17:36 +02:00
Riccardo Schirone
34b41e1d20
Add support for >? help_command (#16699) 2020-04-23 16:32:53 +02:00
Eli Schwartz
03bc3c59b5
Add an option to build with system tree-sitter (#16679)
As of https://github.com/tree-sitter/tree-sitter/pull/602 it is possible
to install tree-sitter as a system shared library, and distributions that want to
be able to disable vendored code.
2020-04-23 13:54:52 +08:00
Riccardo Schirone
2d3be881cb
Handle 'q' to interrumpt prompt in newshell ##newshell (#16681) 2020-04-22 21:48:43 +02:00
Riccardo Schirone
06ab29b93c
Compile new shell parser by default (#16660)
* Move radare2-shell-parser/tree-sitter into shlr
* compile new shell parser by default, available with cfg.newshell variable
* Add README for radare2-shell-parser
* Improve CI
* Add gitattributes file
2020-04-21 13:44:30 +02:00
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