PR #16073 exposed that the linux implementation of r_socket_is_connected
returned -1 from recv with errno set to EAGAIN. This broke gdbr and
probably other remote capabilities since r_socket_connect would fail.
I switched the implementation to getsockopt which is more reliable
instaed of playing with non blocking settings.
PR #16131 broke rebase by changing the order in which cfg.debug was set,
causing r_core_file_reopen to treat the debugee as a regular file and
skip the baseaddr calculation.
* Introduce escaping in grep specifiers
Grep specifiers (the part after `~`) can accept a lot of characters.
However, some of those have a special meaning in some contexts and they
should be parsed for better consistency.
For example, `(` and `)` can have particular meanings inside a macro
definition and it's important to allow escaping to differentiate:
(foo; pd~hello)) -> parsing error, there are 2 closing parenthesis
(foo; pd~hello\)) -> user wants to grep for string 'hello)'
* Add some tests for escaped characters in grep specifier
This change is to ease the switch to the new parser and make the syntax
more consistent and easy. As things were before this patch, ',' could be
part of an argument of a command, but at the same time it was used as a
separator when defining a new macro. This difference in how `,` is
interpreter, makes parsing commands harder, as grep specifiers,
arguments, etc. should be parsed differently based on whether they are
inside a macro body or not.
By switching to using `;` as separator in the macro body, arguments,
grep specifiers, etc. can be parsed as they would be outside of a macro
body, making the new parser more consistent and easier.
* Fix by implementing r_anal_fcn_to_str
* Refactor function syntax
* Fix testsuite
* Fix leaking pointers and code review
* Move __add_vars_sdb from aaft to af
* Fix more tests
* Rename r_function_get_name to r_function_get_signature
* Fix regression and remove extra semicolon
* Fix last regressions