Some dumb fixes.

This commit is contained in:
Eric Pouech 2001-09-21 21:03:53 +00:00 committed by Alexandre Julliard
parent 50f7bc5af5
commit f19887971a
4 changed files with 12 additions and 11 deletions

View File

@ -320,7 +320,7 @@ static int dump_cv_sst_align_sym(OMFDirEntry* omfde)
static void dump_codeview_all_modules(OMFDirHeader *omfdh)
{
int i;
unsigned i;
OMFDirEntry *dirEntry;
const char* str;
@ -376,7 +376,7 @@ static void dump_codeview_headers(unsigned long base, unsigned long len)
OMFDirHeader *dirHeader;
OMFSignature *signature;
OMFDirEntry *dirEntry;
int i;
unsigned i;
int modulecount = 0, alignsymcount = 0, srcmodulecount = 0, librariescount = 0;
int globalsymcount = 0, globalpubcount = 0, globaltypescount = 0;
int segmapcount = 0, fileindexcount = 0, staticsymcount = 0;

View File

@ -273,7 +273,7 @@ int main (int argc, char *argv[])
VERBOSE = 1;
symbol_init (&symbol, globals.input_name);
if (symbol_demangle (&symbol) == -1);
if (symbol_demangle (&symbol) == -1)
fatal( "Symbol hasn't got a mangled name\n");
if (symbol.flags & SYM_DATA)
printf (symbol.arg_text[0]);

View File

@ -487,7 +487,7 @@ static char *demangle_datatype (char **str, compound_type *ct,
/* FIXME: P6 = Function pointer, others who knows.. */
if (isdigit (*iter))
{
if (*iter == 6) printf("Function pointer in argument list is not handled yet\n");
if (*iter == '6') printf("Function pointer in argument list is not handled yet\n");
return NULL;
}

View File

@ -18,7 +18,7 @@
#include "pe.h"
static void* base;
static long total_len;
static unsigned long total_len;
static IMAGE_NT_HEADERS* nt_headers;
enum FileSig {SIG_UNKNOWN, SIG_DOS, SIG_PE, SIG_DBG};
@ -114,7 +114,7 @@ static void dump_pe_header(void)
char *str;
IMAGE_FILE_HEADER *fileHeader;
IMAGE_OPTIONAL_HEADER *optionalHeader;
int i;
unsigned i;
printf("File Header\n");
fileHeader = &nt_headers->FileHeader;
@ -220,7 +220,7 @@ static void dump_pe_header(void)
static void dump_sections(void* addr, unsigned num_sect)
{
IMAGE_SECTION_HEADER* sectHead = addr;
int i;
unsigned i;
printf("Section Table\n");
for (i = 0; i < num_sect; i++, sectHead++)
@ -655,14 +655,15 @@ int pe_analysis(const char* name, void (*fn)(void), enum FileSig wanted_sig)
int fd;
enum FileSig effective_sig;
int ret = 1;
struct stat s;
setbuf(stdout, NULL);
fd = open(name, O_RDONLY);
if (fd == -1) fatal("Can't open file");
total_len = lseek(fd, 0, SEEK_END);
if (total_len < 0) fatal("Can't get size");
if (fstat(fd, &s) < 0) fatal("Can't get size");
total_len = s.st_size;
base = mmap(NULL, total_len, PROT_READ, MAP_PRIVATE, fd, 0);
if (base == (void*)-1) fatal("Can't map file");
@ -682,7 +683,7 @@ int pe_analysis(const char* name, void (*fn)(void), enum FileSig wanted_sig)
ret = 0; break;
case SIG_PE:
printf("Contents of \"%s\": %ld bytes\n\n", name, total_len);
do_dump();
(*fn)();
break;
case SIG_DBG:
dump_separate_dbg();