Winmain cleanup:

* created dynamic_bind<> template class to handle dynamically binding to
    optionally-supported functions
 * wrapped stack walking code in a class
 * wrapped symbol lookup code in a class
 * added support for parsing objdump-produced symbol dumps which include
    non-global functions for much better stack dumps and profiling in gcc builds

Also: modified makefile for win32 targets to automatically run objdump and
produce a .sym file if SYMBOLS is enabled.
This commit is contained in:
Aaron Giles 2010-07-02 03:49:56 +00:00
parent 2c6e27c547
commit b67fd48c9f
2 changed files with 580 additions and 341 deletions

View file

@ -215,6 +215,9 @@ BUILD_ZLIB = 1
# (default is SYMLEVEL = 2 normally; use 1 if you only need backtrace)
# SYMLEVEL = 2
# uncomment next line to dump the symbols to a .sym file
# DUMPSYM = 1
# uncomment next line to include profiling information from the compiler
# PROFILE = 1
@ -296,6 +299,7 @@ CC = @gcc
LD = @g++
MD = -mkdir$(EXE)
RM = @rm -f
OBJDUMP = @objdump
@ -695,6 +699,11 @@ $(VERSIONOBJ): $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $
$(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBDASM) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(SOFTFLOAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
@echo Linking $@...
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
ifeq ($(TARGETOS),win32)
ifdef SYMBOLS
$(OBJDUMP) --section=.text --line-numbers --syms --demangle $@ >$(FULLNAME).sym
endif
endif
endif

File diff suppressed because it is too large Load diff