Refactoring fixes in debug/linux (#6339)

This commit is contained in:
Eugene 2016-12-18 15:20:31 +04:00 committed by radare
parent 865267fc86
commit 4530585132
3 changed files with 4 additions and 3 deletions

View File

@ -591,7 +591,7 @@ static linux_map_entry_t *linux_get_mapped_files(RDebug *dbg, ut8 filter_flags)
pmentry->anonymous, pmentry->kernel_mapping,
pmentry->file_backed, pmentry->dumpeable);
if (pmentry->file_backed) {
const const char *name = pmentry->name;
const char *name = pmentry->name;
if (!name) {
name = "";
}

View File

@ -127,7 +127,7 @@ RDebugReasonType linux_ptrace_event (RDebug *dbg, int pid, int status) {
return R_DEBUG_REASON_ERROR;
}
eprintf ("PTRACE_EVENT_FORK new_pid=%d\n", data);
eprintf ("PTRACE_EVENT_FORK new_pid=0x%"PFMT64x"\n", data);
dbg->forked_pid = data;
// TODO: more handling here?
/* we have a new process that we are already tracing */
@ -139,7 +139,7 @@ RDebugReasonType linux_ptrace_event (RDebug *dbg, int pid, int status) {
r_sys_perror ("ptrace GETEVENTMSG");
return R_DEBUG_REASON_ERROR;
}
eprintf ("PTRACE_EVENT_EXIT pid=%d, status=%d\n", pid, data);
eprintf ("PTRACE_EVENT_EXIT pid=%d, status=0x%"PFMT64x"\n", pid, data);
return R_DEBUG_REASON_EXIT_PID;
default:
eprintf ("Unknown PTRACE_EVENT encountered: %d\n", pt_evt);

View File

@ -82,6 +82,7 @@ typedef ut64 mips64_regs_t [274];
//API
bool linux_set_options (RDebug *dbg, int pid);
int linux_step (RDebug *dbg);
RDebugReasonType linux_ptrace_event (RDebug *dbg, int pid, int status);
int linux_attach (RDebug *dbg, int pid);