The attached patch is a hack that uses the 0200 flag in --imcc-debug
to mean 'create debug segment regardless optimization level'
$ ./parrot -O --imcc-debug=0200 t/compilers/imcc/syn/const_24.pir
Null PMC access in get_string()
current instr.: 'main' pc 5 (t/compilers/imcc/syn/const_24.pir:11)
--
Salu2
Index: compilers/imcc/pbc.c
===================================================================
--- compilers/imcc/pbc.c (revisión: 27474)
+++ compilers/imcc/pbc.c (copia de trabajo)
@@ -1737,7 +1737,8 @@
/* add debug if necessary */
if (!IMCC_INFO(interp)->optimizer_level
- || IMCC_INFO(interp)->optimizer_level == OPT_PASM) {
+ || IMCC_INFO(interp)->optimizer_level == OPT_PASM
+ || IMCC_INFO(interp)->debug & 0x0200) {
const char * const sourcefile = unit->file;
/* FIXME length and multiple subs */