mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
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:
parent
2c6e27c547
commit
b67fd48c9f
2 changed files with 580 additions and 341 deletions
9
makefile
9
makefile
|
@ -215,6 +215,9 @@ BUILD_ZLIB = 1
|
||||||
# (default is SYMLEVEL = 2 normally; use 1 if you only need backtrace)
|
# (default is SYMLEVEL = 2 normally; use 1 if you only need backtrace)
|
||||||
# SYMLEVEL = 2
|
# 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
|
# uncomment next line to include profiling information from the compiler
|
||||||
# PROFILE = 1
|
# PROFILE = 1
|
||||||
|
|
||||||
|
@ -296,6 +299,7 @@ CC = @gcc
|
||||||
LD = @g++
|
LD = @g++
|
||||||
MD = -mkdir$(EXE)
|
MD = -mkdir$(EXE)
|
||||||
RM = @rm -f
|
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)
|
$(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBDASM) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(SOFTFLOAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
|
||||||
@echo Linking $@...
|
@echo Linking $@...
|
||||||
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
|
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
|
||||||
|
ifeq ($(TARGETOS),win32)
|
||||||
|
ifdef SYMBOLS
|
||||||
|
$(OBJDUMP) --section=.text --line-numbers --syms --demangle $@ >$(FULLNAME).sym
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue