diff --git a/Makefile.linux b/Makefile.linux index 505fa34ac..ec3299a30 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -32,6 +32,11 @@ CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNEED_STRUPR LDFLAGS += -lz -ljpeg `sdl-config --libs` `pkg-config gtk+-2.0 --libs` $(FMOD_PREFIX)/lib/libfmodex${X64}.so NASMFLAGS += -f elf -DM_TARGET_LINUX +ifdef VALGRIND + NOSTRIP = 1 + NASMFLAGS += -DVALGRIND_AWARE +endif + SRCDIRS = src/ $(addprefix src/,g_doom/ g_heretic/ g_hexen/ g_raven/ g_shared/ g_strife/ oplsynth/ sound/ sdl/ textures/ thingdef/ xlat/ timidity/) VPATH = $(SRCDIRS) INCLUDES = $(addprefix -I,$(SRCDIRS)) @@ -71,6 +76,8 @@ else LDFLAGS += -Wl,-Map=$(ZDOOM).map ifndef NOSTRIP LDFLAGS += -s + else + CFLAGS += -g endif ZDOOMBIN = $(ZDOOM) endif diff --git a/docs/rh-log.txt b/docs/rh-log.txt index eb86a25ee..5fc4ef856 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +June 7, 2008 +- Added self-modifying code notifications for Valgrind. + Build with make VALGRIND=1 to turn them on. + June 6, 2008 - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. diff --git a/src/a.nas b/src/a.nas index d4c4cf68f..cdcbd7f0f 100644 --- a/src/a.nas +++ b/src/a.nas @@ -3,6 +3,8 @@ ; See the included license file "BUILDLIC.TXT" for license info. ; This file has been modified from Ken Silverman's original release +%include "src/valgrind.inc" + SECTION .data %ifndef M_TARGET_LINUX @@ -56,6 +58,7 @@ setvlinebpl_: mov [fixchain1m+2], eax mov [fixchain2ma+2], eax mov [fixchain2mb+2], eax + selfmod fixchain1a, fixchain2mb+6 ret ; pass it log2(texheight) @@ -87,6 +90,7 @@ setupvlineasm: dec eax mov dword [machvsh2+2], eax ;(1<