Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions libr/core/numvars.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,21 +1007,21 @@ static ut64 num_callback(RNum *userptr, const char *str, bool *ok) {
...
}
#endif
if ((flag = r_flag_get (core->flags, str))) {
ret = flag->addr;
// check for reg alias
RRegItem *r = r_reg_get (core->dbg->reg, str, -1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also use r_reg_getv

if (r) {
if (ok) {
*ok = true;
}
ret = r_reg_get_value (core->dbg->reg, r);
return ret;
}

// check for reg alias
RRegItem *r = r_reg_get (core->dbg->reg, str, -1);
if (r) {

if ((flag = r_flag_get (core->flags, str))) {
ret = flag->addr;
if (ok) {
*ok = true;
}
ret = r_reg_get_value (core->dbg->reg, r);
return ret;
}
}
Expand Down
2 changes: 1 addition & 1 deletion libr/socket/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ R_API bool r_run_config_env(RRunProfile *p) {
r_socket_free (fd);
return false;
}
r_socket_block_time(fd, true, 99999, 0);
r_socket_block_time(fd, true, 0, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
r_socket_block_time(fd, true, 0, 0);
r_socket_block_time (fd, true, 0, 0);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This socket thing can be one pr. And the other flag reg thing in a separate one if u want.

If u add a config var to change the behaviour of num to pick values from rega instead of flags and disable it by default the tests will pass


if (p->_pty) {
if (!redirect_socket_to_pty (fd)) {
Expand Down
Loading