[svn:parrot] r48666 - in trunk/src: . runcore
nwellnhof at svn.parrot.org
nwellnhof at svn.parrot.org
Thu Aug 26 12:42:06 UTC 2010
Author: nwellnhof
Date: Thu Aug 26 12:42:06 2010
New Revision: 48666
URL: https://trac.parrot.org/parrot/changeset/48666
Log:
Fix gcdebug runcore
Fix GC flags. Store 0xdeadbeef in data pointer because vtable is used
as free list now.
Modified:
trunk/src/pmc.c
trunk/src/runcore/cores.c
trunk/src/runcore/trace.c
Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c Thu Aug 26 11:51:46 2010 (r48665)
+++ trunk/src/pmc.c Thu Aug 26 12:42:06 2010 (r48666)
@@ -127,7 +127,7 @@
#ifndef NDEBUG
- pmc->vtable = (VTABLE *)0xdeadbeef;
+ pmc->data = (DPOINTER *)0xdeadbeef;
#endif
Modified: trunk/src/runcore/cores.c
==============================================================================
--- trunk/src/runcore/cores.c Thu Aug 26 11:51:46 2010 (r48665)
+++ trunk/src/runcore/cores.c Thu Aug 26 12:42:06 2010 (r48666)
@@ -675,7 +675,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"attempt to access code outside of current code segment");
- Parrot_gc_mark_and_sweep(interp, GC_TRACE_FULL);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), pc);
DO_OP(pc, interp);
@@ -717,7 +717,7 @@
"attempt to access code outside of current code segment");
if (interp->pdb->state & PDB_GCDEBUG)
- Parrot_gc_mark_and_sweep(interp, 0);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
if (interp->pdb->state & PDB_TRACING) {
trace_op(interp,
Modified: trunk/src/runcore/trace.c
==============================================================================
--- trunk/src/runcore/trace.c Thu Aug 26 11:51:46 2010 (r48665)
+++ trunk/src/runcore/trace.c Thu Aug 26 12:42:06 2010 (r48666)
@@ -127,15 +127,15 @@
return;
}
- if (!pmc->vtable || (UINTVAL)pmc->vtable == 0xdeadbeef) {
- Parrot_io_eprintf(debugger, "<!!no vtable!!>");
- return;
- }
-
if (PObj_on_free_list_TEST(pmc))
Parrot_io_eprintf(debugger,
"**************** PMC is on free list *****\n");
+ if (!pmc->vtable) {
+ Parrot_io_eprintf(debugger, "<!!no vtable!!>");
+ return;
+ }
+
if (pmc->vtable->pmc_class == pmc) {
STRING * const name = trace_class_name(interp, pmc);
Parrot_io_eprintf(debugger, "Class=%Ss:PMC(%#p)", name, pmc);
More information about the parrot-commits
mailing list