Fix last covs

This commit is contained in:
pancake 2018-11-22 16:17:21 +01:00
parent b703010171
commit e821230045
3 changed files with 13 additions and 6 deletions

View File

@ -98,8 +98,10 @@ static RList *parseSegments(RBuffer *buf, int off, int count) {
int B = r_read_le32 (b + X + 16 + 8);
// eprintf ("0x%08x segment 0x%08x 0x%08x %s\n",
// x, A, A + B, b + X);
const char *name = (const char *)(b + X);
const char *cname = (const char *)(b + X);
char *name = r_str_ndup (cname, r_str_nlen (cname, 16));
RBinSection *section = newSection (name, A, A + B, true);
free (name);
r_list_append (segments, section);
x += 32;
X += 32;
@ -571,7 +573,7 @@ static RList *sections(RBinFile *bf) {
}
static ut64 baddr(RBinFile *bf) {
return 0;
return 0LL;
}
static RBinInfo *info(RBinFile *bf) {

View File

@ -1,3 +1,5 @@
/* radare - LGPL - Copyright 2009-2018 - pancake */
#include <r_anal.h>
#include "bt/generic-x86.c"
@ -31,7 +33,10 @@ struct frames_proxy_args {
static void *backtrace_proxy(void *user) {
struct frames_proxy_args *args = user;
return args->cb (args->dbg, args->at);
if (args->cb) {
return args->cb (args->dbg, args->at);
}
return NULL;
}
#endif
@ -57,7 +62,7 @@ static RList *r_debug_native_frames(RDebug *dbg, ut64 at) {
}
RList *list;
if(dbg->btalgo && !strcmp (dbg->btalgo, "trace")) {
if (dbg->btalgo && !strcmp (dbg->btalgo, "trace")) {
list = r_list_clone (dbg->call_frames);
} else {
#if HAVE_PTRACE

View File

@ -27,10 +27,10 @@ static RList *backtrace_x86_32(RDebug *dbg, ut64 at) {
bio->read_at (bio->io, (ebp2-5)-(ebp2-5)%4, (void *)&buf, 4);
// TODO: arch_is_call() here and this fun will be portable
if (buf[(ebp2-5)%4]==0xe8) {
if (buf[(ebp2-5)%4] == 0xe8) {
RDebugFrame *frame = R_NEW0 (RDebugFrame);
frame->addr = ebp2;
frame->size = esp-_esp;
frame->size = esp - _esp;
r_list_append (list, frame);
}
esp += 4;