mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 09:17:35 +02:00
Enhance debug capability via GC_DEBUG_TRACE
This commit is contained in:
parent
1343490c9b
commit
133adce4c1
1 changed files with 5 additions and 1 deletions
|
@ -60,8 +60,12 @@ const char *tag_names[] = {
|
|||
void Cyc_invalid_type_error(void *data, int tag, object found)
|
||||
{
|
||||
char buf[256];
|
||||
#if GC_DEBUG_TRACE
|
||||
// Object address can be very useful for GC debugging
|
||||
snprintf(buf, 255, "Invalid type: expected %s, found (%p) ", tag_names[tag], found);
|
||||
#else
|
||||
snprintf(buf, 255, "Invalid type: expected %s, found ", tag_names[tag]);
|
||||
//snprintf(buf, 255, "Invalid type: expected %s, found (%p) ", tag_names[tag], found);
|
||||
#endif
|
||||
Cyc_rt_raise2(data, buf, found);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue