Author: chromatic
Date: Mon Aug 11 16:39:29 2008
New Revision: 30172
Modified:
trunk/include/parrot/embed.h
trunk/src/embed.c
trunk/src/runops_cores.c
Log:
[debugger] Fixed a segfault waiting to happen in Parrot_debug(). Of course,
nothing uses this right now, but crashes delayed are crashes denied.
Modified: trunk/include/parrot/embed.h
==============================================================================
--- trunk/include/parrot/embed.h (original)
+++ trunk/include/parrot/embed.h Mon Aug 11 16:39:29 2008
@@ -56,7 +56,7 @@
PARROT_API void Parrot_destroy(Parrot_Interp);
-PARROT_API Parrot_Opcode * Parrot_debug(Parrot_Interp, Parrot_Opcode *pc);
+PARROT_API Parrot_Opcode * Parrot_debug(Parrot_Interp, Parrot_Interp,
Parrot_Opcode *pc);
PARROT_API void Parrot_disassemble(Parrot_Interp);
Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c (original)
+++ trunk/src/embed.c Mon Aug 11 16:39:29 2008
@@ -965,10 +965,9 @@
PARROT_API
PARROT_CAN_RETURN_NULL
opcode_t *
-Parrot_debug(NOTNULL(Parrot_Interp debugger), opcode_t * pc)
+Parrot_debug(PARROT_INTERP, NOTNULL(Parrot_Interp debugger), opcode_t * pc)
{
const char *command;
- Interp *interp;
PDB_t * const pdb = debugger->pdb;
pdb->cur_opcode = pc;
Modified: trunk/src/runops_cores.c
==============================================================================
--- trunk/src/runops_cores.c (original)
+++ trunk/src/runops_cores.c Mon Aug 11 16:39:29 2008
@@ -209,7 +209,7 @@
return runops_trace_core(interp, pc);
#if 0
if (interp->debugger && interp->debugger->pdb)
- return Parrot_debug(interp->debugger, pc);
+ return Parrot_debug(interp, interp->debugger, pc);
#endif
while (pc) {