mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Connect up the Mach-O reader to the new DiImage abstractions.
git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13430
This commit is contained in:
parent
5ab0775dc8
commit
d14f385579
@ -184,6 +184,15 @@ static inline DiSlice ML_(sli_from_cur)( DiCursor cur, DiOffT size ) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a slice which exactly covers the given image. */
|
||||
static inline DiSlice ML_(sli_from_img)( DiImage* img ) {
|
||||
if (img) {
|
||||
return mk_DiSlice(img, 0, ML_(img_size)(img));
|
||||
} else {
|
||||
return DiSlice_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------*/
|
||||
/*--- Functions that operate on DiCursors ---*/
|
||||
@ -253,6 +262,13 @@ static inline void ML_(cur_read_get) ( /*OUT*/void* dst,
|
||||
ML_(img_get)(dst, c.img, c.ioff, size);
|
||||
}
|
||||
|
||||
// Fetch an arbitrary number of bytes from the cursor, and advance it.
|
||||
static inline void ML_(cur_step_get) ( /*OUT*/void* dst,
|
||||
DiCursor* c, SizeT size) {
|
||||
ML_(img_get)(dst, c->img, c->ioff, size);
|
||||
c->ioff += size;
|
||||
}
|
||||
|
||||
// memdup from the given cursor. Caller must ML_(dinfo_free) the
|
||||
// resulting block.
|
||||
static inline UChar* ML_(cur_read_memdup)( DiCursor c, SizeT size,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -176,7 +176,7 @@ static void usage_NORETURN ( Bool debug_help )
|
||||
" --extra-debuginfo-path=path absolute path to search for additional\n"
|
||||
" debug symbols, in addition to existing default\n"
|
||||
" well known search paths.\n"
|
||||
" --debuginfo-server=ipaddr:port\n also query this server"
|
||||
" --debuginfo-server=ipaddr:port also query this server\n"
|
||||
" (valgrind-di-server) for debug symbols\n"
|
||||
" --smc-check=none|stack|all|all-non-file [stack]\n"
|
||||
" checks for self-modifying code: none, only for\n"
|
||||
@ -259,7 +259,7 @@ static void usage_NORETURN ( Bool debug_help )
|
||||
" 0000 0010 show after reg-alloc\n"
|
||||
" 0000 0001 show final assembly\n"
|
||||
" 0000 0000 show summary profile only\n"
|
||||
" (Nb: you need --trace-notbelow and/or --trace-notabove "
|
||||
" (Nb: you need --trace-notbelow and/or --trace-notabove\n"
|
||||
" with --trace-flags for full details)\n"
|
||||
"\n"
|
||||
" debugging options for Valgrind tools that report errors\n"
|
||||
|
||||
@ -1041,6 +1041,16 @@ struct ByteRangeLockPB2
|
||||
#define vki_aiocb aiocb
|
||||
|
||||
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#define VKI_TCP_NODELAY TCP_NODELAY
|
||||
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#define VKI_IPPROTO_TCP IPPROTO_TCP
|
||||
|
||||
|
||||
// XXX: for some reason when I #include <sys/kernel_types.h> I get a syntax
|
||||
// error. Hmm. So just define things ourselves.
|
||||
//#include <sys/kernel_types.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user