Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
04089f99
Commit
04089f99
authored
Mar 14, 2006
by
Simon Marlow
Browse files
improve panic messages a bit, with the GHC version and platform
parent
aa056e7f
Changes
4
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/Makefile
View file @
04089f99
...
...
@@ -261,9 +261,9 @@ stage1/$(PLATFORM_H) : stage_dirs $(FPTOOLS_TOP)/mk/config.mk Makefile
@
echo
"#ifndef __PLATFORM_H__"
>
$@
@
echo
"#define __PLATFORM_H__"
>>
$@
@
echo
>>
$@
@
echo
"#define BuildPlatform_
TYP
E
$(B
uildPlatform_CPP)
"
>>
$@
@
echo
"#define HostPlatform_
TYP
E
$(H
ostPlatform_CPP)
"
>>
$@
@
echo
"#define TargetPlatform_
TYPE
$(TargetPlatform_CPP)
"
>>
$@
@
echo
"#define BuildPlatform_
NAM
E
\"
$(B
UILDPLATFORM)
\"
"
>>
$@
@
echo
"#define HostPlatform_
NAM
E
\"
$(H
OSTPLATFORM)
\"
"
>>
$@
@
echo
"#define TargetPlatform_
NAME
\"
$(TARGETPLATFORM)
\"
"
>>
$@
@
echo
>>
$@
@
echo
"#define
$(BuildPlatform_CPP)
_BUILD 1"
>>
$@
@
echo
"#define
$(HostPlatform_CPP)
_HOST 1"
>>
$@
...
...
@@ -307,9 +307,9 @@ stage2/$(PLATFORM_H) : stage_dirs $(FPTOOLS_TOP)/mk/config.mk Makefile
@
echo
"#ifndef __PLATFORM_H__"
>
$@
@
echo
"#define __PLATFORM_H__"
>>
$@
@
echo
>>
$@
@
echo
"#define BuildPlatform_
TYP
E
$(H
ostPlatform_CPP)
"
>>
$@
@
echo
"#define HostPlatform_
TYP
E
$(T
argetPlatform_CPP)
"
>>
$@
@
echo
"#define TargetPlatform_
TYPE
$(TargetPlatform_CPP)
"
>>
$@
@
echo
"#define BuildPlatform_
NAM
E
\"
$(H
OSTPLATFORM)
\"
"
>>
$@
@
echo
"#define HostPlatform_
NAM
E
\"
$(T
ARGETPLATFORM)
\"
"
>>
$@
@
echo
"#define TargetPlatform_
NAME
\"
$(TARGETPLATFORM)
\"
"
>>
$@
@
echo
>>
$@
@
echo
"#define
$(HostPlatform_CPP)
_BUILD 1"
>>
$@
@
echo
"#define
$(TargetPlatform_CPP)
_HOST 1"
>>
$@
...
...
ghc/compiler/utils/Panic.lhs
View file @
04089f99
...
...
@@ -120,11 +120,10 @@ showGhcException (InstallationError str)
showGhcException (Interrupted)
= showString "interrupted"
showGhcException (Panic s)
= showString ("panic! (the
`
impossible' happened
, GHC version
"
++
cProjectVersion
++ "):\n\t"
= showString ("panic! (the
'
impossible' happened
)\n
"
++
" (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME
++ "):\n\t"
++ s ++ "\n\n"
++ "Please report this as a compiler bug. See:\n"
++ " http://www.haskell.org/ghc/reportabug\n")
++ "Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\n")
#if __GLASGOW_HASKELL__ < 603
myMkTyConApp = mkAppTy
...
...
ghc/rts/Makefile
View file @
04089f99
...
...
@@ -124,6 +124,8 @@ SRC_HC_OPTS += -static
endif
# SRC_HC_OPTS += -fPIC
RtsMessages_CC_OPTS
+=
-DProjectVersion
=
\"
$(ProjectVersion)
\"
ifeq
"$(way)" "mp"
SRC_HC_OPTS
+=
-I
$$
PVM_ROOT/include
endif
...
...
ghc/rts/RtsMessages.c
View file @
04089f99
...
...
@@ -107,6 +107,9 @@ isGUIApp()
}
#endif
#define xstr(s) str(s)
#define str(s) #s
void
rtsFatalInternalErrorFn
(
char
*
s
,
va_list
ap
)
{
...
...
@@ -135,7 +138,8 @@ rtsFatalInternalErrorFn(char *s, va_list ap)
}
vfprintf
(
stderr
,
s
,
ap
);
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
" Please report this as a compiler bug. See:
\n
http://www.haskell.org/ghc/reportabug
\n
"
);
fprintf
(
stderr
,
" (GHC version %s for %s)
\n
"
,
ProjectVersion
,
xstr
(
HostPlatform_TYPE
));
fprintf
(
stderr
,
" Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
\n
"
);
fflush
(
stderr
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment