summaryrefslogtreecommitdiff
path: root/rts/Printer.c
diff options
context:
space:
mode:
authorAlp Mestanogullari <alp@well-typed.com>2018-11-22 11:47:48 -0500
committerBen Gamari <ben@smart-cactus.org>2018-11-22 13:14:01 -0500
commit561748cb507505bd5b7bd76bdc57796d896b62a2 (patch)
tree8e68f471e46a95cf0860faf177107ea2a017433e /rts/Printer.c
parent19ffddc1f479fcd5a0f265330cc1041366e8c43d (diff)
downloadhaskell-561748cb507505bd5b7bd76bdc57796d896b62a2.tar.gz
rts.cabal.in: force inclusion of findPtr/_findPtr symbol only with debug flag
The previous strategy caused problems on Windows, as pointed out at [1] [1]: https://phabricator.haskell.org/rGHC900c47f88784#133905 Reviewers: Phyx, bgamari, erikd, simonmar Reviewed By: Phyx Subscribers: rwbarton, carter GHC Trac Issues: #15671 Differential Revision: https://phabricator.haskell.org/D5356
Diffstat (limited to 'rts/Printer.c')
-rw-r--r--rts/Printer.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/rts/Printer.c b/rts/Printer.c
index 7f7e83cb8b..291f529e8f 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -24,8 +24,6 @@
#include <string.h>
-void findPtr(P_ p, int follow);
-
#if defined(DEBUG)
#include "Disassembler.h"
@@ -777,6 +775,8 @@ extern void DEBUG_LoadSymbols( const char *name STG_UNUSED )
#endif /* USING_LIBBFD */
+void findPtr(P_ p, int); /* keep gcc -Wall happy */
+
int searched = 0;
static int
@@ -876,12 +876,7 @@ void printObj( StgClosure *obj )
debugBelch("obj 0x%p (enable -DDEBUG for more info) " , obj );
}
-void findPtr(P_ p, int follow)
-{
- // we're printing the arguments just to silence the unused parameter warning
- debugBelch("recompile your program with -debug in order to run ");
- debugBelch("findPtr(0x%p, %d)\n", p, follow);
-}
+
#endif /* DEBUG */
/* -----------------------------------------------------------------------------