Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
f1402e2c
Commit
f1402e2c
authored
Oct 16, 2003
by
sof
Browse files
[project @ 2003-10-16 20:54:12 by sof]
printStackChunk(): attempt to handle RET_FUNs
parent
1c9f0be1
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/rts/Printer.c
View file @
f1402e2c
/* -----------------------------------------------------------------------------
* $Id: Printer.c,v 1.6
0
2003/
05/14 09:13:59 simonmar
Exp $
* $Id: Printer.c,v 1.6
1
2003/
10/16 20:54:12 sof
Exp $
*
* (c) The GHC Team, 1994-2000.
*
...
...
@@ -21,6 +21,7 @@
#include
"Storage.h"
#include
"Bytecodes.h"
/* for InstrPtr */
#include
"Disassembler.h"
#include
"Apply.h"
#include
<stdlib.h>
#include
<string.h>
...
...
@@ -598,7 +599,38 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
case
RET_VEC_BIG
:
barf
(
"todo"
);
case
RET_FUN
:
{
StgFunInfoTable
*
fun_info
;
StgRetFun
*
ret_fun
;
nat
size
;
ret_fun
=
(
StgRetFun
*
)
sp
;
fun_info
=
get_fun_itbl
(
ret_fun
->
fun
);
size
=
ret_fun
->
size
;
fprintf
(
stderr
,
"RET_FUN (%p) (type=%d)
\n
"
,
ret_fun
,
fun_info
->
fun_type
);
switch
(
fun_info
->
fun_type
)
{
case
ARG_GEN
:
printSmallBitmap
(
spBottom
,
sp
+
1
,
BITMAP_BITS
(
fun_info
->
bitmap
),
BITMAP_SIZE
(
fun_info
->
bitmap
));
break
;
case
ARG_GEN_BIG
:
printLargeBitmap
(
spBottom
,
sp
+
2
,
(
StgLargeBitmap
*
)
fun_info
->
bitmap
,
BITMAP_SIZE
(
fun_info
->
bitmap
));
break
;
default:
printSmallBitmap
(
spBottom
,
sp
+
1
,
BITMAP_BITS
(
stg_arg_bitmaps
[
fun_info
->
fun_type
]),
BITMAP_SIZE
(
stg_arg_bitmaps
[
fun_info
->
fun_type
]));
break
;
}
continue
;
}
default:
fprintf
(
stderr
,
"unknown object %d
\n
"
,
info
->
type
);
barf
(
"printStackChunk"
);
}
}
...
...
@@ -1038,7 +1070,11 @@ findPtr(P_ p, int follow)
nat
s
,
g
;
P_
q
,
r
;
bdescr
*
bd
;
#if defined(__GNUC__)
const
int
arr_size
=
1024
;
#else
#define arr_size 1024
#endif
StgPtr
arr
[
arr_size
];
int
i
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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