Switch to r_sys_perror for errors and fix two typos

This commit is contained in:
Joshua J. Drake 2016-05-16 02:49:30 -05:00 committed by pancake
parent 3bac42eda7
commit 16c27891a0
3 changed files with 5 additions and 5 deletions

View File

@ -405,7 +405,7 @@ static void cmd_debug_pid(RCore *core, const char *input) {
"dpf", "", "Attach to pid like file fd // HACK",
"dpk", " <pid> [<signal>]", "Send signal to process (default 0)",
"dpn", "", "Create new process (fork)",
"dpnt", "", "Create new thread (clone)",
"dptn", "", "Create new thread (clone)",
"dpt", "", "List threads of current pid",
"dpt", " <pid>", "List threads of process",
"dpt=", "<thread>", "Attach to thread",
@ -443,7 +443,7 @@ static void cmd_debug_pid(RCore *core, const char *input) {
r_debug_kill (core->dbg, 0, false, sig);
} else eprintf ("cmd_debug_pid: Invalid arguments (%s)\n", input);
break;
case 'n': // dpn
case 'n': // "dpn"
eprintf ("TODO: debug_fork: %d\n", r_debug_child_fork (core->dbg));
break;
case 't': // "dpt"

View File

@ -659,7 +659,7 @@ repeat:
if (b) {
/* check if cur bp demands tracing or not */
if (b->trace)
eprintf("hit tracepoit at: %"PFMT64x"\n",pc);
eprintf("hit tracepoint at: %"PFMT64x"\n",pc);
else
eprintf("hit breakpoint at: %"PFMT64x"\n",pc);
if (dbg->trace->enabled)

View File

@ -432,7 +432,7 @@ int linux_reg_write (RDebug *dbg, int type, const ut8 *buf, int size) {
if (ptrace (PTRACE_POKEUSER, dbg->pid, r_offsetof (
struct user, u_debugreg[i]), val[i])) {
eprintf ("ptrace error for dr %d\n", i);
perror ("ptrace");
r_sys_perror ("ptrace POKEUSER");
}
}
return sizeof (R_DEBUG_REG_T);
@ -470,7 +470,7 @@ RList *linux_desc_list (int pid) {
snprintf (path, sizeof (path), "/proc/%i/fd/", pid);
if (!(dd = opendir (path))) {
eprintf ("Cannot open /proc\n");
r_sys_perror ("opendir /proc/x/fd");
return NULL;
}
ret = r_list_new ();