2002-08-04 18:00:11 +00:00
|
|
|
/** GSWDebug.m - <title>GSWeb: Debug</title>
|
|
|
|
|
2003-03-21 14:32:57 +00:00
|
|
|
Copyright (C) 1999-2003 Free Software Foundation, Inc.
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
|
|
|
Date: Jan 1999
|
|
|
|
|
|
|
|
$Revision$
|
|
|
|
$Date$
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
This file is part of the GNUstep Web Library.
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
<license>
|
2000-01-22 12:49:49 +00:00
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library 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
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2002-08-04 18:00:11 +00:00
|
|
|
</license>
|
|
|
|
**/
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-03-21 14:32:57 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
RCS_ID("$Id$")
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-01-22 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/Makefile.postamble:
o use $(LN_S) -f in install-WO-headers
o added $(MKDIRS) $(GNUSTEP_HEADERS)/$(GSWExtensions_wo_HEADER_FILES_INSTALL_DIR);
* GSWExtensionsGSW.framework/Makefile.postamble: use $(LN_S) -f in install-WO-headers
2003-01-20 David Ayers <d.ayers@inode.at>
* Makefile.postamble
o added support for make gswnames=(gsw,wo,all) (corrected
typo)
o reinserted support for $(INSTALL_ROOT_DIR)
* config.h.in
o added HAVE_GDL2
* configure
o added support for --with-gswnames=(gsw,wo,all)
o set LIBWRAP during configure
o added config.mak.in as configurable file
* configure.ac
o (see configure)
* config.mak: removed (replaced by config.mak.in)
* config.mak.in: new file
o added support for make gswnames=(gsw,wo,all)
* gsweb.make.in
o add GSANTLR as auxiliary lib
o add gsweb libs to AUXILIARY_GSW_LIBS
o include correct extensions for GSW/WO-libs
* gsweb_wo.make: new file
* GSWeb/GSWConfig.h
o changed support for GSWEB_WONAMES
o conditionally import file GSWWOCompatiblity
here instead of in GSWeb.h
* GSWeb/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o removed reference to unused files:
GSWeb.m, GSWWOCompatibility.m
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWeb/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
o remove Makefile.preamble during distclean
* GSWeb/Makefile.preamble.in
o fixed typo
* GSWeb/GSWeb.h
o moved GSW/WO-Name-mapping to GSWWOCompatibility.h
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWeb.m: removed
* GSWeb/GSWWOCompatibility.h
o changed GSWEB_WONAMES handling
o removed hybrid namespace WO subclasses
o moved & reorganized GSW/WO-Name-mapping from GSWeb.h
o inlucluded missing GSW/WO-Name-mappings
* GSWeb/GSWWOCompatibility.m: removed
* GSWeb/*.m
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWApplication.m
o remove special GSW/WO handling of WOApp
* GSWeb/WebObject/WO*: removed
* GSWeb/WebObject/WebObjects
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWExtensions/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWExtensions/Makefile.preamble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
* GSWExtensions/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
* GSWExtensions/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtWOCompatibility.h"
o replaces inclusions of
<GSWExtensions/file.h> with "file.h"
* GSWExtensions/GSWExtensions.h: new file
* GSWExtensions/WOExtensions.h: new file
* GSWExtensions/GSWExtWOCompatibility.h: new file
* GSWExtensionsGSW/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new file GSWExtGSWWOCompatibility.h
o added support to create WO header files
* GSWExtensionsGSW/Makefile.pramble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
o removed GSWExtensions from ADDITIONAL_LIB_DIRS
* GSWExtensionsGSW/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtGSWWOCompatibility.h"
* GSWExtensions/GSWExtGSWWOCompatibility.h: new file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15675 72102866-910b-0410-8b05-ffd578937521
2003-01-22 12:24:26 +00:00
|
|
|
#include "GSWeb.h"
|
|
|
|
#include "GSWDebug.h"
|
2000-01-22 12:49:49 +00:00
|
|
|
#include <Foundation/NSThread.h>
|
|
|
|
#include <Foundation/NSAutoreleasePool.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#define USTART NSAutoreleasePool* arp=[NSAutoreleasePool new];
|
|
|
|
#define USTOP DESTROY(arp);
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
2002-11-18 11:14:55 +00:00
|
|
|
NSString* GSWDebugMethodMsg(id obj, SEL sel, const char *file, int line, NSString *fmt)
|
|
|
|
{
|
|
|
|
NSString *message;
|
|
|
|
Class cls = (Class)obj;
|
|
|
|
char c = '+';
|
|
|
|
|
|
|
|
if ([obj isInstance] == YES)
|
|
|
|
{
|
|
|
|
c = '-';
|
|
|
|
cls = [obj class];
|
|
|
|
}
|
|
|
|
message = [NSString stringWithFormat: @"File %s: %d. In object %p [%@ %c%@] %@",
|
|
|
|
file, line, obj,NSStringFromClass(cls), c, NSStringFromSelector(sel), fmt];
|
|
|
|
return message;
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2000-03-20 15:50:51 +00:00
|
|
|
void GSWLogC_(CONST char* file,int line,CONST char* string)
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
int len=0;
|
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
|
|
|
const char *thread=[[GSCurrentThread() description] cString];
|
|
|
|
|
|
|
|
fprintf(stderr,"%s (%d) ", thread, (int)getpid());
|
2000-03-20 15:50:51 +00:00
|
|
|
fprintf(stderr,"File %s: %d. ",file,line);
|
2000-01-22 12:49:49 +00:00
|
|
|
fprintf(stderr,string);
|
|
|
|
len=strlen(string);
|
|
|
|
if (len<=0 || string[len-1]!='\n')
|
|
|
|
fprintf(stderr,"\n");
|
|
|
|
fflush(stderr);
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
NSString* objectDescription(id object)
|
|
|
|
{
|
|
|
|
NSString* description=nil;
|
|
|
|
if ([object respondsToSelector:@selector(description)])
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
NS_DURING
|
|
|
|
{
|
|
|
|
description=[object description];
|
|
|
|
}
|
|
|
|
NS_HANDLER
|
|
|
|
{
|
|
|
|
}
|
|
|
|
NS_ENDHANDLER;
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
return description;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
NSString* IVarInString(const char* aType,void* aValue)
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
if (aType && aValue)
|
|
|
|
{
|
|
|
|
switch (*aType)
|
|
|
|
{
|
|
|
|
case _C_ID:
|
|
|
|
{
|
|
|
|
id* pvalue=(id*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"object:%ld Class:%s Description:%@",
|
|
|
|
(long)(*pvalue),
|
|
|
|
[*pvalue class],
|
|
|
|
objectDescription(*pvalue)];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_CLASS:
|
|
|
|
{
|
|
|
|
Class* pvalue=(Class*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"Class:%s",
|
|
|
|
class_get_class_name(*pvalue)];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_SEL:
|
|
|
|
{
|
|
|
|
SEL* pvalue=(SEL*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"SEL:%s",
|
|
|
|
sel_get_name(*pvalue)];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_CHR:
|
|
|
|
{
|
|
|
|
char* pvalue=(char*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"CHAR:%c",
|
|
|
|
*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_UCHR:
|
|
|
|
{
|
|
|
|
unsigned char* pvalue=(unsigned char*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"UCHAR:%d",
|
|
|
|
(int)*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_SHT:
|
|
|
|
{
|
|
|
|
short* pvalue=(short*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"SHORT:%d",
|
|
|
|
(int)*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_USHT:
|
|
|
|
{
|
|
|
|
unsigned short* pvalue=(unsigned short*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"USHORT:%d",
|
|
|
|
(int)*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_INT:
|
|
|
|
{
|
|
|
|
int* pvalue=(int*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"INT:%d",
|
|
|
|
*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_UINT:
|
|
|
|
{
|
|
|
|
unsigned int* pvalue=(unsigned int*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"UINT:%u",
|
|
|
|
*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_LNG:
|
|
|
|
{
|
|
|
|
long* pvalue=(long*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"LONG:%ld",
|
|
|
|
*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_ULNG:
|
|
|
|
{
|
|
|
|
unsigned long* pvalue=(unsigned long*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"ULONG:%lu",
|
|
|
|
*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_FLT:
|
|
|
|
{
|
|
|
|
float* pvalue=(float*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"FLOAT:%f",
|
|
|
|
(double)*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_DBL:
|
|
|
|
{
|
|
|
|
double* pvalue=(double*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"DOUBLE:%f",
|
|
|
|
*pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_VOID:
|
|
|
|
{
|
|
|
|
void* pvalue=(void*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"VOID:*%lX",
|
|
|
|
(unsigned long)pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_CHARPTR:
|
|
|
|
{
|
|
|
|
char* pvalue=(void*)aValue;
|
|
|
|
return [NSString stringWithFormat:@"CHAR*:%s",
|
|
|
|
pvalue];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_PTR:
|
|
|
|
{
|
|
|
|
return [NSString stringWithFormat:@"PTR"];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_STRUCT_B:
|
|
|
|
{
|
|
|
|
return [NSString stringWithFormat:@"STRUCT"];
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return [NSString stringWithFormat:@"Unknown"];
|
|
|
|
};
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-08-04 18:00:11 +00:00
|
|
|
return [NSString stringWithString:@"NULL type or NULL pValue"];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
NSString* TypeToNSString(const char* aType)
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
if (aType)
|
|
|
|
{
|
|
|
|
switch (*aType)
|
|
|
|
{
|
|
|
|
case _C_ID:
|
|
|
|
{ // '@'
|
|
|
|
const char *t = aType + 1;
|
|
|
|
if (*t == '"')
|
|
|
|
{
|
|
|
|
const char *start = t + 1;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
t++;
|
|
|
|
}
|
|
|
|
while ((*t != '"') && (*t != '\0'));
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
return [[NSString stringWithCString:start
|
|
|
|
length:(t - start)]
|
|
|
|
stringByAppendingString:@" *"];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return @"id";
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
case _C_CLASS: return @"Class";
|
|
|
|
case _C_SEL: return @"SEL";
|
|
|
|
case _C_CHR: return @"char";
|
|
|
|
case _C_UCHR: return @"unsigned char";
|
|
|
|
case _C_SHT: return @"short";
|
|
|
|
case _C_USHT: return @"unsigned short";
|
|
|
|
case _C_INT: return @"int";
|
|
|
|
case _C_UINT: return @"unsigned int";
|
|
|
|
case _C_LNG: return @"long";
|
|
|
|
case _C_ULNG: return @"unsigned long";
|
|
|
|
// case _C_LNG_LNG: return @"long long";
|
|
|
|
// case _C_ULNG_LNG: return @"unsigned long long";
|
|
|
|
case _C_FLT: return @"float";
|
|
|
|
case _C_DBL: return @"double";
|
|
|
|
case _C_VOID: return @"void";
|
|
|
|
case _C_CHARPTR: return @"char *";
|
|
|
|
case _C_PTR:
|
|
|
|
return [NSString stringWithFormat:@"%@ *",
|
|
|
|
TypeToNSString(aType + 1)];
|
|
|
|
break;
|
|
|
|
case _C_STRUCT_B:
|
|
|
|
{
|
|
|
|
NSString *structName = nil;
|
|
|
|
const char *t = aType + 1;
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
if (*t == '?')
|
|
|
|
structName = @"?";
|
|
|
|
else
|
|
|
|
{
|
|
|
|
const char *beg = t;
|
|
|
|
while ((*t != '=') && (*t != '\0') && (*t != _C_STRUCT_E))
|
|
|
|
t++;
|
|
|
|
structName = [NSString stringWithCString:beg length:(t - beg)];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
return [NSString stringWithFormat:@"struct %@ {...}", structName];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
default:
|
|
|
|
return [NSString stringWithFormat:@"%s", aType];
|
|
|
|
};
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-08-04 18:00:11 +00:00
|
|
|
return [NSString stringWithString:@"NULL type"];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2000-03-20 15:50:51 +00:00
|
|
|
void DumpIVar(id object,struct objc_ivar* ivar,int deep)
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2000-03-20 15:50:51 +00:00
|
|
|
if (ivar && object && deep>=0)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
void* pValue=((void*)object) + ivar->ivar_offset;
|
|
|
|
NSString* pType=TypeToNSString(ivar->ivar_type);
|
|
|
|
NSString* pIVar=IVarInString(ivar->ivar_type,pValue);
|
|
|
|
NSDebugFLog(@"IVar %s type:%@ value:%@\n",
|
|
|
|
ivar->ivar_name,
|
|
|
|
pType,
|
|
|
|
pIVar);
|
|
|
|
if (deep>0 && ivar->ivar_type && *ivar->ivar_type==_C_ID && pValue)
|
|
|
|
{
|
|
|
|
GSWLogDumpObjectFn(NULL,0,*((id*)pValue),deep);
|
|
|
|
};
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2000-03-20 15:50:51 +00:00
|
|
|
//Dump object
|
2002-07-04 11:01:56 +00:00
|
|
|
void GSWLogDumpObjectFn(CONST char* file,int line,id object,int deep)
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
USTART
|
2002-08-04 18:00:11 +00:00
|
|
|
if (object && deep>0)
|
|
|
|
{
|
|
|
|
struct objc_ivar_list *ivars=NULL;
|
|
|
|
Class class = [object class];
|
|
|
|
if (class)
|
|
|
|
{
|
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
|
|
|
NSDebugFLog(@"--%s %d [%d] Dumping object %p of Class %s "
|
|
|
|
@"Description:%@",
|
|
|
|
((file && isalpha(*file) && line>=0 && line<=20000)
|
|
|
|
? file : ""),
|
2002-08-04 18:00:11 +00:00
|
|
|
line,
|
|
|
|
deep,
|
|
|
|
(void*)object,
|
|
|
|
class->name,
|
|
|
|
objectDescription(object));
|
|
|
|
while (class)
|
|
|
|
{
|
|
|
|
ivars = class->ivars;
|
|
|
|
class = class->super_class;
|
|
|
|
if (ivars)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < ivars->ivar_count; i++)
|
|
|
|
{
|
|
|
|
DumpIVar(object,&ivars->ivar_list[i],deep-1);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
USTOP
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2000-03-20 15:50:51 +00:00
|
|
|
//--------------------------------------------------------------------
|
2004-01-08 16:23:47 +00:00
|
|
|
void GSWLogAssertGoodFn(CONST char* file,int line,id object)
|
2000-03-20 15:50:51 +00:00
|
|
|
{
|
|
|
|
if (object)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
2004-01-08 16:23:47 +00:00
|
|
|
if (object->class_pointer==((Class)0xdeadface))
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
[GSWApp statusDebugWithFormat:@"DEAD FACE: object %p isa=%p in %s at %d\n",
|
|
|
|
(void*)object,
|
2004-01-08 16:23:47 +00:00
|
|
|
(void*)object->class_pointer,
|
2002-08-04 18:00:11 +00:00
|
|
|
file,
|
|
|
|
line];
|
2004-01-08 16:23:47 +00:00
|
|
|
NSCParameterAssert(object->class_pointer==(Class)0xdeadface);
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
|
|
|
}
|
2000-03-20 15:50:51 +00:00
|
|
|
else
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
[GSWApp statusDebugWithFormat:@"NULL: object %p in %s at %d\n",
|
|
|
|
(void*)object,
|
|
|
|
file,
|
|
|
|
line];
|
|
|
|
NSCParameterAssert(object);
|
|
|
|
};
|
2000-03-20 15:50:51 +00:00
|
|
|
};
|
|
|
|
#endif
|