mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-08 22:30:30 +00:00
Fix last covs
This commit is contained in:
parent
b703010171
commit
e821230045
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user