2007-12-30 17:41:49 +01:00
|
|
|
/***************************************************************************
|
|
|
|
|
2009-08-17 12:41:51 +02:00
|
|
|
gbx_debug.c
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2011-03-21 01:04:10 +01:00
|
|
|
(c) 2000-2011 Benoît Minisini <gambas@users.sourceforge.net>
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2009-08-17 12:41:51 +02:00
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
2007-12-30 17:41:49 +01:00
|
|
|
any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2011-06-03 02:51:09 +02:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA.
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#define __GBX_DEBUG_C
|
|
|
|
|
|
|
|
#include "gb_common.h"
|
|
|
|
#include "gb_common_buffer.h"
|
|
|
|
#include "gb_common_case.h"
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "gb_buffer.h"
|
|
|
|
#include "gb_array.h"
|
|
|
|
#include "gb_error.h"
|
|
|
|
#include "gbx_exec.h"
|
|
|
|
#include "gbx_api.h"
|
|
|
|
#include "gbx_class.h"
|
|
|
|
#include "gbx_c_array.h"
|
2009-08-18 00:36:54 +02:00
|
|
|
#include "gbx_project.h"
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
#include "gbx_debug.h"
|
|
|
|
|
|
|
|
|
2008-01-17 22:39:26 +01:00
|
|
|
DEBUG_INTERFACE DEBUG;
|
|
|
|
DEBUG_INFO *DEBUG_info = NULL;
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2009-07-08 21:57:50 +02:00
|
|
|
static bool calc_line_from_position(CLASS *class, FUNCTION *func, PCODE *addr, ushort *line)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
ushort pos = addr - func->code;
|
|
|
|
ushort *post;
|
|
|
|
|
|
|
|
if (func->debug)
|
|
|
|
{
|
|
|
|
post = func->debug->pos;
|
|
|
|
for (i = 0; i < (func->debug->nline - 1); i++)
|
|
|
|
{
|
|
|
|
if (pos >= post[i] && pos < post[i + 1])
|
|
|
|
{
|
|
|
|
*line = i + func->debug->line;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*printf("pos = %d addr=%p func->code=%p\n", pos, addr, func->code);*/
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-01-17 22:39:26 +01:00
|
|
|
const char *DEBUG_get_position(CLASS *cp, FUNCTION *fp, PCODE *pc)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
#if DEBUG_MEMORY
|
|
|
|
static char buffer[256];
|
|
|
|
#endif
|
|
|
|
ushort line = 0;
|
|
|
|
|
|
|
|
if (!cp || !pc)
|
|
|
|
return "?";
|
|
|
|
|
|
|
|
if (fp != NULL && fp->debug)
|
|
|
|
calc_line_from_position(cp, fp, pc, &line);
|
|
|
|
|
|
|
|
#if DEBUG_MEMORY
|
2008-01-06 21:06:44 +01:00
|
|
|
snprintf(buffer, sizeof(buffer), "%s.%s.%d",
|
2007-12-30 17:41:49 +01:00
|
|
|
cp ? cp->name : "?",
|
|
|
|
(fp && fp->debug) ? fp->debug->name : "?",
|
|
|
|
line);
|
|
|
|
|
|
|
|
return buffer;
|
2008-01-05 02:18:28 +01:00
|
|
|
#else
|
|
|
|
snprintf(COMMON_buffer, COMMON_BUF_MAX, "%.64s.%.64s.%d",
|
2007-12-30 17:41:49 +01:00
|
|
|
cp ? cp->name : "?",
|
|
|
|
(fp && fp->debug) ? fp->debug->name : "?",
|
|
|
|
line);
|
|
|
|
|
|
|
|
return COMMON_buffer;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-01-17 22:39:26 +01:00
|
|
|
const char *DEBUG_get_current_position(void)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
return DEBUG_get_position(CP, FP, PC);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-01-17 22:39:26 +01:00
|
|
|
void DEBUG_init(void)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
if (!EXEC_debug)
|
|
|
|
return;
|
|
|
|
|
|
|
|
COMPONENT_load(COMPONENT_create("gb.debug"));
|
|
|
|
LIBRARY_get_interface_by_name("gb.debug", DEBUG_INTERFACE_VERSION, &DEBUG);
|
|
|
|
|
2009-05-22 16:52:36 +02:00
|
|
|
DEBUG_info = DEBUG.Init((GB_DEBUG_INTERFACE *)(void *)GAMBAS_DebugApi, EXEC_fifo, EXEC_fifo_name);
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
if (!DEBUG_info)
|
|
|
|
ERROR_panic("Cannot initializing debug mode");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-01-17 22:39:26 +01:00
|
|
|
void DEBUG_exit(void)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
if (!EXEC_debug)
|
|
|
|
return;
|
|
|
|
|
|
|
|
DEBUG.Exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-01-17 22:39:26 +01:00
|
|
|
void DEBUG_where(void)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
2010-06-05 01:48:53 +02:00
|
|
|
//static bool breakpoint = FALSE;
|
|
|
|
const char *where = DEBUG_get_current_position();
|
|
|
|
/*if (!breakpoint && !strcmp(where, "FForm._new.97"))
|
|
|
|
{
|
|
|
|
breakpoint = TRUE;
|
|
|
|
BREAKPOINT();
|
|
|
|
}*/
|
|
|
|
fprintf(stderr, "%s: ", where);
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-01-17 22:39:26 +01:00
|
|
|
bool DEBUG_get_value(const char *sym, int len, GB_VARIANT *ret)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
VALUE value;
|
|
|
|
LOCAL_SYMBOL *lp;
|
|
|
|
GLOBAL_SYMBOL *gp;
|
|
|
|
CLASS_VAR *var;
|
|
|
|
char *addr;
|
|
|
|
CLASS *class;
|
2010-05-19 14:43:57 +02:00
|
|
|
void *ref;
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
if (DEBUG_info->fp)
|
|
|
|
{
|
|
|
|
for (i = 0; i < DEBUG_info->fp->debug->n_local; i++)
|
|
|
|
{
|
|
|
|
lp = &DEBUG_info->fp->debug->local[i];
|
|
|
|
if (len == lp->sym.len && strncasecmp(sym, lp->sym.name, len) == 0)
|
|
|
|
{
|
|
|
|
value = DEBUG_info->bp[lp->value];
|
|
|
|
goto __FOUND;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (DEBUG_info->cp)
|
|
|
|
{
|
|
|
|
for (i = 0; i < DEBUG_info->cp->load->n_global; i++)
|
|
|
|
{
|
|
|
|
gp = &DEBUG_info->cp->load->global[i];
|
|
|
|
if (len != gp->sym.len || strncasecmp(sym, gp->sym.name, len) != 0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (CTYPE_get_kind(gp->ctype) == TK_VARIABLE)
|
|
|
|
{
|
|
|
|
if (!CTYPE_is_static(gp->ctype) && DEBUG_info->op)
|
|
|
|
{
|
|
|
|
var = &DEBUG_info->cp->load->dyn[gp->value];
|
|
|
|
addr = (char *)DEBUG_info->op + var->pos;
|
2010-05-19 14:43:57 +02:00
|
|
|
ref = DEBUG_info->op;
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
var = &DEBUG_info->cp->load->stat[gp->value];
|
|
|
|
addr = (char *)DEBUG_info->cp->stat + var->pos;
|
2010-05-19 14:43:57 +02:00
|
|
|
ref = DEBUG_info->cp;
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
|
|
|
|
2010-05-19 14:43:57 +02:00
|
|
|
VALUE_class_read(DEBUG_info->cp, &value, addr, var->type, ref);
|
2007-12-30 17:41:49 +01:00
|
|
|
goto __FOUND;
|
|
|
|
}
|
|
|
|
else if (CTYPE_get_kind(gp->ctype) == TK_CONST)
|
|
|
|
{
|
|
|
|
VALUE_class_constant(DEBUG_info->cp, &value, gp->value);
|
|
|
|
goto __FOUND;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//class = CLASS_look_global(sym, len);
|
|
|
|
class = CLASS_look(sym, len);
|
|
|
|
if (class)
|
|
|
|
{
|
|
|
|
if (class->auto_create && class->instance)
|
|
|
|
{
|
|
|
|
value._object.class = class;
|
|
|
|
value._object.object = class->instance;
|
|
|
|
value._object.super = NULL;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
value.type = T_CLASS;
|
|
|
|
value._class.class = class;
|
2008-12-28 20:01:39 +01:00
|
|
|
value._class.super = NULL;
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
|
|
|
goto __FOUND;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
__FOUND:
|
|
|
|
|
|
|
|
/*printf("%.*s =", (int)len, sym);
|
|
|
|
print_value(&value);*/
|
|
|
|
|
|
|
|
BORROW(&value);
|
2010-05-14 23:30:54 +02:00
|
|
|
/*if (value.type == T_ARRAY)
|
2007-12-30 17:41:49 +01:00
|
|
|
value._array.keep = TRUE;
|
2010-05-14 23:30:54 +02:00
|
|
|
else*/
|
2010-06-05 01:48:53 +02:00
|
|
|
VALUE_conv_variant(&value);
|
2007-12-30 17:41:49 +01:00
|
|
|
UNBORROW(&value);
|
|
|
|
|
|
|
|
*((VALUE *)ret) = value;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2009-08-24 16:19:32 +02:00
|
|
|
int DEBUG_set_value(const char *sym, int len, VALUE *value)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
LOCAL_SYMBOL *lp;
|
|
|
|
GLOBAL_SYMBOL *gp;
|
|
|
|
CLASS_VAR *var;
|
|
|
|
char *addr;
|
|
|
|
VALUE *where;
|
|
|
|
bool ret = GB_DEBUG_SET_OK;
|
|
|
|
|
|
|
|
TRY
|
|
|
|
{
|
|
|
|
if (DEBUG_info->fp)
|
|
|
|
{
|
|
|
|
for (i = 0; i < DEBUG_info->fp->debug->n_local; i++)
|
|
|
|
{
|
|
|
|
lp = &DEBUG_info->fp->debug->local[i];
|
|
|
|
if (len == lp->sym.len && strncasecmp(sym, lp->sym.name, len) == 0)
|
|
|
|
{
|
|
|
|
where = &DEBUG_info->bp[lp->value];
|
|
|
|
VALUE_conv(value, where->type);
|
|
|
|
RELEASE(where);
|
|
|
|
*where = *value;
|
|
|
|
BORROW(where);
|
|
|
|
goto __FOUND;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (DEBUG_info->cp)
|
|
|
|
{
|
|
|
|
for (i = 0; i < DEBUG_info->cp->load->n_global; i++)
|
|
|
|
{
|
|
|
|
gp = &DEBUG_info->cp->load->global[i];
|
|
|
|
if (len != gp->sym.len || strncasecmp(sym, gp->sym.name, len) != 0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (CTYPE_get_kind(gp->ctype) == TK_VARIABLE)
|
|
|
|
{
|
|
|
|
if (!CTYPE_is_static(gp->ctype) && DEBUG_info->op)
|
|
|
|
{
|
|
|
|
var = &DEBUG_info->cp->load->dyn[gp->value];
|
|
|
|
addr = (char *)DEBUG_info->op + var->pos;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
var = &DEBUG_info->cp->load->stat[gp->value];
|
|
|
|
addr = (char *)DEBUG_info->cp->stat + var->pos;
|
|
|
|
}
|
|
|
|
|
|
|
|
VALUE_class_write(DEBUG_info->cp, value, addr, var->type);
|
|
|
|
goto __FOUND;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = GB_DEBUG_SET_READ_ONLY;
|
|
|
|
|
|
|
|
__FOUND:
|
|
|
|
|
|
|
|
0;
|
|
|
|
}
|
|
|
|
CATCH
|
|
|
|
{
|
|
|
|
ret = GB_DEBUG_SET_ERROR;
|
2010-08-29 22:51:10 +02:00
|
|
|
EXEC_set_native_error(TRUE);
|
2009-08-24 16:19:32 +02:00
|
|
|
}
|
|
|
|
END_TRY
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2009-02-16 22:39:07 +01:00
|
|
|
int DEBUG_get_object_access_type(void *object, CLASS *class, int *count)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
CLASS_DESC *desc;
|
|
|
|
char type;
|
|
|
|
int index;
|
2009-02-16 22:39:07 +01:00
|
|
|
int access = GB_DEBUG_ACCESS_NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
//fprintf(stderr, "DEBUG_can_be_used_like_an_array: %p %s ?\n", object, class->name);
|
|
|
|
|
|
|
|
if (!object)
|
2009-02-16 22:39:07 +01:00
|
|
|
goto __NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2008-04-22 01:15:48 +02:00
|
|
|
if (class == CLASS_Class || OBJECT_is_class(object))
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
class = (CLASS *)object;
|
|
|
|
object = NULL;
|
|
|
|
CLASS_load(class);
|
|
|
|
}
|
|
|
|
|
|
|
|
index = class->special[SPEC_GET];
|
|
|
|
if (index == NO_SYMBOL)
|
|
|
|
{
|
|
|
|
//fprintf(stderr, "No _get method\n");
|
2009-02-16 22:39:07 +01:00
|
|
|
goto __NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
2009-02-16 22:39:07 +01:00
|
|
|
|
2007-12-30 17:41:49 +01:00
|
|
|
desc = class->table[index].desc;
|
2009-02-16 22:39:07 +01:00
|
|
|
if (desc->method.npmin != 1 || desc->method.npmax != 1)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
//fprintf(stderr, "No _get(Arg AS Integer) method\n");
|
2009-02-16 22:39:07 +01:00
|
|
|
goto __NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
2009-02-16 22:39:07 +01:00
|
|
|
|
|
|
|
if (*desc->method.signature == T_INTEGER)
|
|
|
|
access = GB_DEBUG_ACCESS_ARRAY;
|
|
|
|
//else if (*desc->method.signature == T_STRING)
|
|
|
|
// access = GB_DEBUG_ACCESS_COLLECTION;
|
|
|
|
else
|
|
|
|
goto __NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
index = CLASS_find_symbol(class, "Count");
|
|
|
|
if (index == NO_SYMBOL)
|
|
|
|
{
|
|
|
|
//fprintf(stderr, "No Count symbol\n");
|
2009-02-16 22:39:07 +01:00
|
|
|
goto __NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
desc = class->table[index].desc;
|
|
|
|
type = CLASS_DESC_get_type(desc);
|
|
|
|
|
2009-02-16 22:39:07 +01:00
|
|
|
// The two only possible cases:
|
|
|
|
// A static read-only property, and object == NULL
|
|
|
|
// or a dynamic read-only property, and object != NULL
|
|
|
|
|
|
|
|
if (!((type == 'r' && object) || (type == 'R' && !object)))
|
|
|
|
goto __NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
if (desc->property.native)
|
|
|
|
{
|
|
|
|
if (EXEC_call_native(desc->property.read, object, desc->property.type, 0))
|
|
|
|
{
|
|
|
|
//fprintf(stderr, "Count has failed\n");
|
2009-02-16 22:39:07 +01:00
|
|
|
goto __NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
EXEC.class = desc->property.class;
|
|
|
|
EXEC.object = object;
|
|
|
|
EXEC.nparam = 0;
|
|
|
|
EXEC.native = FALSE;
|
2008-01-17 22:39:26 +01:00
|
|
|
EXEC.index = (int)(intptr_t)desc->property.read;
|
2007-12-30 17:41:49 +01:00
|
|
|
//EXEC.func = &class->load->func[(int)desc->property.read];
|
|
|
|
|
|
|
|
EXEC_function_keep();
|
|
|
|
|
|
|
|
TEMP = *RP;
|
|
|
|
UNBORROW(RP);
|
|
|
|
RP->type = T_VOID;
|
|
|
|
}
|
|
|
|
|
2010-06-03 01:23:50 +02:00
|
|
|
VALUE_conv_integer(&TEMP);
|
2009-02-16 22:39:07 +01:00
|
|
|
*count = TEMP._integer.value;
|
|
|
|
return access;
|
|
|
|
|
|
|
|
__NORMAL:
|
|
|
|
return GB_DEBUG_ACCESS_NORMAL;
|
2007-12-30 17:41:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-28 09:47:49 +02:00
|
|
|
void DEBUG_print_backtrace(ERROR_INFO *err)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
2010-05-28 09:47:49 +02:00
|
|
|
int i, n;
|
|
|
|
STACK_CONTEXT *sc = (STACK_CONTEXT *)(STACK_base + STACK_size) - err->bt_count;
|
2008-02-02 11:54:13 +01:00
|
|
|
|
2010-05-28 09:47:49 +02:00
|
|
|
fprintf(stderr, "0: %s\n", DEBUG_get_position(err->cp, err->fp, err->pc));
|
|
|
|
for (i = 0, n = 0; i < err->bt_count; i++)
|
|
|
|
{
|
|
|
|
//fprintf(stderr, "%d: %s\n", i, DEBUG_get_position(bt[i].cp, bt[i].fp, bt[i].pc));
|
|
|
|
if (!sc[i].pc)
|
|
|
|
continue;
|
|
|
|
n++;
|
|
|
|
fprintf(stderr, "%d: %s\n", n, DEBUG_get_position(sc[i].cp, sc[i].fp, sc[i].pc));
|
|
|
|
}
|
2008-02-02 11:54:13 +01:00
|
|
|
}
|
|
|
|
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2010-05-28 09:47:49 +02:00
|
|
|
GB_ARRAY DEBUG_get_string_array_from_backtrace(ERROR_INFO *err)
|
2007-12-30 17:41:49 +01:00
|
|
|
{
|
|
|
|
GB_ARRAY array;
|
|
|
|
int i, n;
|
2010-05-28 09:47:49 +02:00
|
|
|
STACK_CONTEXT *sc = (STACK_CONTEXT *)(STACK_base + STACK_size) - err->bt_count;
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2010-05-28 09:47:49 +02:00
|
|
|
for (i = 0, n = 1; i < err->bt_count; i++)
|
|
|
|
{
|
|
|
|
if (!sc[i].pc)
|
|
|
|
continue;
|
|
|
|
n++;
|
|
|
|
}
|
|
|
|
|
2007-12-30 17:41:49 +01:00
|
|
|
GB_ArrayNew(&array, GB_T_STRING, n);
|
2010-06-05 01:48:53 +02:00
|
|
|
*((char **)GB_ArrayGet(array, 0)) = STRING_new_zero(DEBUG_get_position(err->cp, err->fp, err->pc));
|
2010-05-28 09:47:49 +02:00
|
|
|
for (i = 0, n = 1; i < err->bt_count; i++)
|
|
|
|
{
|
|
|
|
if (!sc[i].pc)
|
|
|
|
continue;
|
2010-06-05 01:48:53 +02:00
|
|
|
*((char **)GB_ArrayGet(array, n)) = STRING_new_zero(DEBUG_get_position(sc[i].cp, sc[i].fp, sc[i].pc));
|
2010-05-28 09:47:49 +02:00
|
|
|
n++;
|
|
|
|
}
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
return array;
|
|
|
|
}
|
2009-07-29 02:16:48 +02:00
|
|
|
|
|
|
|
GB_CLASS DEBUG_find_class(const char *name)
|
|
|
|
{
|
|
|
|
CLASS *class;
|
|
|
|
CLASS *save = CP;
|
|
|
|
|
2009-08-21 21:43:40 +02:00
|
|
|
// As the startup class is automatically exported, this is the only way for the debugger to find it.
|
2010-08-14 15:28:27 +02:00
|
|
|
if (PROJECT_class && !strcmp(name, PROJECT_class->name))
|
2009-08-18 00:36:54 +02:00
|
|
|
return (GB_CLASS)PROJECT_class;
|
|
|
|
|
2009-07-29 02:16:48 +02:00
|
|
|
CP = NULL;
|
|
|
|
class = CLASS_find(name);
|
|
|
|
CP = save;
|
|
|
|
|
2009-08-03 00:48:08 +02:00
|
|
|
return (GB_CLASS)class;
|
2009-07-29 02:16:48 +02:00
|
|
|
}
|
|
|
|
|