mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-04 19:47:31 +00:00
Implement 'dd-' using code injection
This commit is contained in:
parent
f1d70a76c8
commit
9a6c149768
@ -851,7 +851,8 @@ static int cmd_debug(void *data, const char *input) {
|
||||
break;
|
||||
case '-':
|
||||
// close file
|
||||
r_core_syscallf (core, "close", "%d", atoi (input+2));
|
||||
//r_core_syscallf (core, "close", "%d", atoi (input+2));
|
||||
r_core_cmdf (core, "dis close %d", atoi (input+2));
|
||||
// TODO: run
|
||||
break;
|
||||
case ' ':
|
||||
@ -865,6 +866,8 @@ static int cmd_debug(void *data, const char *input) {
|
||||
r_cons_printf ("Usage: dd[*sdrw-?]\n"
|
||||
" dd list filedescriptors\n"
|
||||
" dd* list filedescriptors (in radare commands)\n"
|
||||
" dd-1 close stdout fd\n"
|
||||
" dd file open and map that file into the UI\n"
|
||||
" dd? show this help\n");
|
||||
break;
|
||||
}
|
||||
|
@ -246,7 +246,9 @@ R_API int r_debug_wait(RDebug *dbg) {
|
||||
if (ret == R_DBG_REASON_SIGNAL) {
|
||||
/* handle signal on continuations here */
|
||||
int what = r_debug_signal_what (dbg, dbg->signum);
|
||||
r_cons_printf ("[+] signal %d received\n", dbg->signum);
|
||||
const char *name = r_debug_signal_resolve_i (dbg, dbg->signum);
|
||||
r_cons_printf ("[+] signal %d aka %s received\n",
|
||||
dbg->signum, name);
|
||||
if (what & R_DBG_SIGNAL_SKIP) {
|
||||
dbg->signum = 0;
|
||||
// TODO: use ptrace-setsiginfo to ignore signal
|
||||
|
Loading…
Reference in New Issue
Block a user