/* deb.c
*
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
* 2000, 2001, 2002, by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
*/
/*
* "Didst thou think that the eyes of the White Tower were blind? Nay, I
* have seen more than thou knowest, Gray Fool." --Denethor
*/
#include "EXTERN.h"
#define PERL_IN_DEB_C
#include "perl.h"
#if defined(PERL_IMPLICIT_CONTEXT)
void
{
#ifdef DEBUGGING
dTHX;
#endif /* DEBUGGING */
}
#endif
void
{
#ifdef DEBUGGING
#endif /* DEBUGGING */
}
void
{
#ifdef DEBUGGING
#ifdef USE_5005THREADS
#else
#endif /* USE_5005THREADS */
#endif /* DEBUGGING */
}
{
#ifdef DEBUGGING
#endif /* DEBUGGING */
return 0;
}
/* dump the contents of a particular stack
* Display stack_base[stack_min+1 .. stack_max],
* and display the marks whose offsets are contained in addresses
* PL_markstack[mark_min+1 .. mark_max] and whose values are in the range
* of the stack values being displayed
*
* Only displays top 30 max
*/
STATIC void
{
#ifdef DEBUGGING
if (i < stack_min)
i = stack_min;
if (*markscan >= i)
break;
if (i > stack_min)
do {
++i;
do {
++markscan;
}
}
if (i > stack_max)
break;
}
while (1);
#endif /* DEBUGGING */
}
/* dump the current stack */
{
#ifndef SKIP_DEBUGGING
return 0;
0,
#endif /* SKIP_DEBUGGING */
return 0;
}
#ifdef DEBUGGING
static char * si_names[] = {
"UNKNOWN",
"UNDEF",
"MAIN",
"MAGIC",
"SORT",
"SIGNAL",
"OVERLOAD",
"DESTROY",
"WARNHOOK",
"DIEHOOK",
"REQUIRE"
};
#endif
/* display all stacks */
void
{
#ifdef DEBUGGING
/* rewind to start of chain */
si_ix=0;
for (;;)
{
char *si_name;
if (si_name_ix>= sizeof(si_names))
si_name = "????";
else
);
/* substitution contexts don't save stack pointers etc) */
else {
/* Find the the current context's stack range by searching
* forward for any higher contexts using this stack; failing
* that, it will be equal to the size of the stack for old
* stacks, or PL_stack_sp for the current stack
*/
/* there's a separate stack per SI, so only search
* this one */
continue;
break;
}
if (cx_n) {
}
else if (si == PL_curstackinfo) {
}
else {
}
/* for the other stack types, there's only one stack
* shared between all SIs */
i = ix;
for (;;) {
i++;
if (si_n == PL_curstackinfo)
break;
else {
i = 0;
}
}
continue;
break;
}
if (cx_n) {
}
else {
}
: "(null)"
);
}
}
} /* next context */
if (si == PL_curstackinfo)
break;
si_ix++;
if (!si)
break; /* shouldn't happen, but just in case.. */
} /* next stackinfo */
#endif /* DEBUGGING */
}