summaryrefslogtreecommitdiff
path: root/rts/Printer.c
diff options
context:
space:
mode:
authorAlp Mestanogullari <alp@well-typed.com>2018-09-12 18:06:02 -0400
committerBen Gamari <ben@smart-cactus.org>2018-09-12 18:06:44 -0400
commit900c47f88784b91517c00be3e1087322e62f698e (patch)
tree7d599df22acf069948988607f474708cb3441e26 /rts/Printer.c
parent5c48c41239ee2a6228ff469cab8e06763d485c77 (diff)
downloadhaskell-900c47f88784b91517c00be3e1087322e62f698e.tar.gz
rts/Printer.c: always define the findPtr symbol
It was previously only defined (and therefore shipped) when DEBUG is defined. This patch defines it regardless of DEBUG. This will help fix hadrian on OS X [1]. [1]: https://github.com/snowleopard/hadrian/issues/614 Test Plan: The error from hadrian#614 is gone Reviewers: bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5138
Diffstat (limited to 'rts/Printer.c')
-rw-r--r--rts/Printer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/rts/Printer.c b/rts/Printer.c
index 291f529e8f..7f7e83cb8b 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -24,6 +24,8 @@
#include <string.h>
+void findPtr(P_ p, int follow);
+
#if defined(DEBUG)
#include "Disassembler.h"
@@ -775,8 +777,6 @@ 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,7 +876,12 @@ 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 */
/* -----------------------------------------------------------------------------