improve hash table entry debug prints
This commit is contained in:
parent
867a10ac2b
commit
40ab3ddfd3
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ CC ?= gcc
|
||||
ARCH = -m32
|
||||
CFLAGS += -Wall -Werror -Wfatal-errors -Wno-error=unused-variable -fstack-protector -std=c2x -g
|
||||
CFLAGS += -DDEBUG
|
||||
#CFLAGS += -DDEBUG_PRINT
|
||||
CFLAGS += -DDEBUG_PRINT
|
||||
LDFLAGS = -lm
|
||||
OPT ?= -O0
|
||||
DEPFLAGS = -MMD -MP
|
||||
|
@ -161,8 +161,8 @@ static void class_resolver_create_methods_hash_table(struct class_entry * class_
|
||||
struct constant * descriptor_constant = &class_file->constant_pool[descriptor_index - 1];
|
||||
assert(descriptor_constant->tag == CONSTANT_Utf8);
|
||||
debugf("hash table entry for method: ");
|
||||
print_utf8_string(name_constant);
|
||||
debugf("\n");
|
||||
debug_print__constant__method_name(name_constant, descriptor_constant);
|
||||
debugc('\n');
|
||||
|
||||
hash_table_add2(methods_hash_table_length,
|
||||
methods_hash_table,
|
||||
|
@ -30,3 +30,12 @@ void debug_print__method_info__method_name(struct class_entry * class_entry, str
|
||||
assert(method_descriptor_constant->tag == CONSTANT_Utf8);
|
||||
debug_print__constant__utf8_string(method_descriptor_constant);
|
||||
}
|
||||
|
||||
void debug_print__constant__method_name(struct constant * name_constant, struct constant * descriptor_constant)
|
||||
{
|
||||
assert(name_constant->tag == CONSTANT_Utf8);
|
||||
debug_print__constant__utf8_string(name_constant);
|
||||
debugc(' ');
|
||||
assert(descriptor_constant->tag == CONSTANT_Utf8);
|
||||
debug_print__constant__utf8_string(descriptor_constant);
|
||||
}
|
||||
|
@ -6,3 +6,4 @@
|
||||
void debug_print__constant__utf8_string(struct constant * constant);
|
||||
void debug_print__class_entry__class_name(struct class_entry * class_entry);
|
||||
void debug_print__method_info__method_name(struct class_entry * class_entry, struct method_info * method_info);
|
||||
void debug_print__constant__method_name(struct constant * name_constant, struct constant * descriptor_constant);
|
||||
|
Loading…
x
Reference in New Issue
Block a user