-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete rewrite to make it far more modular
- Loading branch information
tyranid
committed
Jun 3, 2005
1 parent
44efaa3
commit f5c856d
Showing
20 changed files
with
2,526 additions
and
869 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
OUTPUT=prxtool | ||
CFLAGS=-Wall -O0 -ggdb | ||
OBJS=main.o | ||
INCS=-I. -I/usr/local/include | ||
CFLAGS=-Wall -O0 -ggdb | ||
OBJS=main.o ProcessElf.o NidMgr.o VirtualMem.o output.o ProcessPrx.o SerializePrx.o SerializePrxToIdc.o | ||
LDFLAGS=-L/usr/local/lib -ltinyxml | ||
CC=gcc | ||
CPP=g++ | ||
|
||
all: $(OUTPUT) | ||
|
||
clean: | ||
rm -rf $(OUTPUT) $(OBJS) | ||
|
||
$(OUTPUT): $(OBJS) | ||
$(CC) $(CFLAGS) -o $(OUTPUT) $(OBJS) $(LIBS) | ||
$(CPP) $(CFLAGS) -o $(OUTPUT) $(OBJS) $(LIBS) | ||
|
||
%.o: %.c | ||
$(CC) $(CFLAGS) -c -o $@ $< | ||
$(CC) $(CFLAGS) $(INCS) -c -o $@ $< | ||
|
||
%.o: %.C | ||
$(CPP) $(CFLAGS) $(INCS) -c -o $@ $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <tinyxml.h> | ||
#include "NidMgr.h" | ||
|
||
CNidMgr::CNidMgr() | ||
{ | ||
} | ||
|
||
CNidMgr::~CNidMgr() | ||
{ | ||
} | ||
|
||
/* Find the name based on our list of names, not currently implemented */ | ||
const char *CNidMgr::FindLibName(const char *lib, unsigned int nid) | ||
{ | ||
static char lib_name[512]; | ||
|
||
if(lib == NULL) | ||
{ | ||
snprintf(lib_name, sizeof(lib_name), "sys_%08X", nid); | ||
} | ||
else | ||
{ | ||
snprintf(lib_name, sizeof(lib_name), "%s_%08X", lib, nid); | ||
} | ||
|
||
return lib_name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef __NIDMGR_H__ | ||
#define __NIDMGR_H__ | ||
|
||
#include "types.h" | ||
|
||
#define LIB_NAME_MAX 32 | ||
#define LIB_SYMBOL_NAME_MAX 128 | ||
|
||
struct LibraryNid | ||
{ | ||
struct LibraryNid* pNext; | ||
u32 nid; | ||
char name[LIB_SYMBOL_NAME_MAX]; | ||
}; | ||
|
||
struct LibraryEntry | ||
{ | ||
struct LibraryEntry* pNext; | ||
char lib_name[LIB_NAME_MAX]; | ||
int entry_count; | ||
LibraryNid *pHead; | ||
}; | ||
|
||
class CNidMgr | ||
{ | ||
public: | ||
CNidMgr(); | ||
~CNidMgr(); | ||
const char *FindLibName(const char *lib, u32 nid); | ||
bool AddXmlFile(const char *szFilename); | ||
}; | ||
|
||
#endif |
Oops, something went wrong.