static char gstr_type[256][9] = {
"NULL", // 0x00
- "PROGRAM", // 0x01
- "MASTER", // 0x02
+ "MASTER", // 0x01
+ "PROGRAM", // 0x02
"PROGHDR", // 0x03
"SECTION", // 0x04
- "FUNCTION", // 0x05
- "OBJECT", // 0x06
- "COMMON", // 0x07
- "TLS", // 0x08
- "REL", // 0x09
- "OBJFILE", // 0x0a
+ "OBJFILE", // 0x05
+ "FUNCTION", // 0x06
+ "OBJECT", // 0x07
+
+ "COMMON", // 0x08
+ "TLS", // 0x09
+ "REL", // 0x0a
"", // 0x0b
"", // 0x0c
"", // 0x0d
- "", // 0x0e
- "", // 0x0f
-
- "TYPE(SIG)", // 0x10
- "TYPE(MUL)", // 0x11
- "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
-
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
-
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
-
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", ""
+ "TYPE(SIG)", // 0x0e
+ "TYPE(MUL)", // 0x0f
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "NONE",
+
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
};
/*====================================================================*/
Debug_ObjectInfo_Print_Section( p_obj, pstr_space, b_level );
break;
+ case OBJINFO_TYPE_OBJFILE:
+ break;
+
case OBJINFO_TYPE_FUNCTION:
Debug_ObjectInfo_Print_Function( p_obj, pstr_space, b_level );
break;
LibGoblin_ObjectInfo *p_objmaster;
// Alloc ---
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x00000000, 0x00100000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x00000000, 0x00100000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 1, 0, NO_OBJ, NO_OBJ, NO_OBJ );
CU_ASSERT( 0 == p_pginfo->objinfo.i_topid );
// Scenery 1 ......................................................
// Alloc ---
qw_addr = 0x0000000000000000;
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, 0x10000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, 0x10000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 1, 0, NO_OBJ, NO_OBJ, NO_OBJ );
qw_addr += 0x00100000;
for( i_cnt = 2; i_cnt < 10000; i_cnt++ ) {
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, 0x10000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, 0x10000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, i_cnt, 0, NO_OBJ, i_cnt - 1, NO_OBJ );
qw_addr += 0x00000100;
// Scenery 2 ......................................................
// Alloc ---
qw_size = 0x0000000000000001;
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x1000000000000000, qw_size, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x1000000000000000, qw_size, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 9999, 0, NO_OBJ, NO_OBJ, NO_OBJ );
for( i_cnt = 2; i_cnt < 10; i_cnt++ ) {
qw_size <<= 1;
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x1000000000000000, qw_size, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x1000000000000000, qw_size, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, (10000 - i_cnt), 0, NO_OBJ, NO_OBJ, (10001 - i_cnt) );
}
// Scenery 3 ......................................................
// Alloc ---
qw_addr = 0x10000000;
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, 0x20000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, 0x20000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 9999, 0, NO_OBJ, NO_OBJ, NO_OBJ );
for( i_cnt = 2; i_cnt < 10; i_cnt++ ) {
qw_addr += 0x10000000;
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, 0x20000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, 0x20000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, (10000 - i_cnt), 0, NO_OBJ, (10001 - i_cnt), NO_OBJ );
}
// Alloc ---
qw_addr = 0x10000000;
qw_size = 0x10000000;
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, qw_size, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, qw_size, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 1, 0, NO_OBJ, NO_OBJ, NO_OBJ );
for( i_cnt = 2; i_cnt < 6; i_cnt++ ) {
qw_addr += 0x00010000;
qw_size >>= 1;
p_objparent = p_objinfo;
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, qw_size, p_objparent, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, qw_size, p_objparent, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, i_cnt, p_objparent->i_id, NO_OBJ, NO_OBJ, NO_OBJ );
Test_ObjectInfo_CUAssert_GrpLink( p_objparent, (i_cnt - 1), (i_cnt - 2), i_cnt, NO_OBJ, NO_OBJ );
}
qw_addr += 0x00010000;
qw_size >>= 1;
p_objparent = p_objinfo;
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, qw_size, NULL, 0x01 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, qw_addr, qw_size, NULL, 0x01, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, i_cnt, p_objparent->i_id, NO_OBJ, NO_OBJ, NO_OBJ );
Test_ObjectInfo_CUAssert_GrpLink( p_objparent, (i_cnt - 1), (i_cnt - 2), i_cnt, NO_OBJ, NO_OBJ );
}
// Scenery 1 ......................................................
// Alloc ---
// ID01: 00000000h-40000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x00000000, 0x40000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x00000000, 0x40000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 1, 0, NO_OBJ, NO_OBJ, NO_OBJ );
// ID02: 80000000h-c0000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x80000000, 0x40000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x80000000, 0x40000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 2, 0, NO_OBJ, 1, NO_OBJ );
// ID03: 40000000h-80000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x40000000, 0x40000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x40000000, 0x40000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 3, 0, NO_OBJ, 1, 2 );
// ID04: 20000000h-30000000h
p_objparent = OBJINFO( p_pginfo, 1 );
Test_ObjectInfo_CUAssert_GrpLink( p_objparent, 1, 0, NO_OBJ, NO_OBJ, 3 );
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x20000000, 0x10000000, NULL, 0x01 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x20000000, 0x10000000, NULL, 0x01, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 4, 1, NO_OBJ, NO_OBJ, NO_OBJ );
CU_ASSERT( 4 == p_objparent->grplink.i_child_topid );
// ID05: 30000000h-40000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x30000000, 0x10000000, p_objparent, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x30000000, 0x10000000, p_objparent, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 5, 1, NO_OBJ, 4, NO_OBJ );
// ID06: 38000000h-58000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x38000000, 0x20000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x38000000, 0x20000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 6, 0, NO_OBJ, 1, 3 );
// ID07: 60000000h-70000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x60000000, 0x10000000, NULL, 0x01 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x60000000, 0x10000000, NULL, 0x01, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 7, 3, NO_OBJ, NO_OBJ, NO_OBJ );
// ID08: 70000000h-80000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x70000000, 0x10000000, p_objparent, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x70000000, 0x10000000, p_objparent, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 8, 1, NO_OBJ, 5, NO_OBJ );
// ID09: 80000000h-a0000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x80000000, 0x20000000, NULL, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x80000000, 0x20000000, NULL, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 9, 0, NO_OBJ, 2, NO_OBJ );
// ID10: 21000000h-25000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x21000000, 0x04000000, NULL, 0x01 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x21000000, 0x04000000, NULL, 0x01, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 10, 4, NO_OBJ, NO_OBJ, NO_OBJ );
// ID11: 25000000h-29000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x25000000, 0x04000000, NULL, 0x01 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x25000000, 0x04000000, NULL, 0x01, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 11, 4, NO_OBJ, 10, NO_OBJ );
// ID12: 38000000h-40000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x38000000, 0x08000000, NULL, 0x01 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x38000000, 0x08000000, NULL, 0x01, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 12, 5, NO_OBJ, NO_OBJ, NO_OBJ );
// ID13: 40000000h-44000000h
p_objparent = OBJINFO( p_pginfo, 5 );
Test_ObjectInfo_CUAssert_GrpLink( p_objparent, 5, 1, 12, 4, 8 );
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x40000000, 0x04000000, p_objparent, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x40000000, 0x04000000, p_objparent, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 13, 5, NO_OBJ, 12, NO_OBJ );
// ID14: 80000000h-88000000h
p_objparent = OBJINFO( p_pginfo, 6 );
Test_ObjectInfo_CUAssert_GrpLink( p_objparent, 6, 0, NO_OBJ, 1, 3 );
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x80000000, 0x08000000, p_objparent, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x80000000, 0x08000000, p_objparent, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 14, 6, NO_OBJ, NO_OBJ, NO_OBJ );
// ID15: 84000000h-8c000000h
- p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x84000000, 0x08000000, p_objparent, 0x00 );
+ p_objinfo = ObjectInfo_InsetObject( p_pginfo, 0x84000000, 0x08000000, p_objparent, 0x00, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 15, 6, NO_OBJ, 14, NO_OBJ );
// Check ---
// ID01: 10000000h - 10100000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x10000000, 0x00100000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 1, 0, NO_OBJ, NO_OBJ, NO_OBJ );
// ID02: 10000000h - 20000000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x10000000, 0x10000000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 2, 0, 1, NO_OBJ, NO_OBJ );
// ID03: 30000000h - 40000000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x30000000, 0x10000000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 3, 0, NO_OBJ, 2, NO_OBJ );
// ID04: 50000000h - 60000000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x50000000, 0x10000000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 4, 0, NO_OBJ, 3, NO_OBJ );
// ID05: 70000000h - 70001000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x70000000, 0x00001000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 5, 0, NO_OBJ, 4, NO_OBJ );
// ID06: 90101000h - 90102000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x90101000, 0x00001000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 6, 0, NO_OBJ, 5, NO_OBJ );
// ID07: 90100000h - 90200000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x90100000, 0x00100000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 7, 0, 6, 5, NO_OBJ );
// ID08: 90000000h - a0000000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x90000000, 0x10000000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 8, 0, 7, 5, NO_OBJ );
// ID09: 70000000h - 80000000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x70000000, 0x10000000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 9, 0, 5, 4, 8 );
// ID10: 00000000h - f0000000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x00000000, 0xf0000000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 10, 0, 2, NO_OBJ, NO_OBJ );
// ID11: 65000000h - b5000000h
p_objinfo = ObjectInfo_InsetObject(
p_pginfo, 0x65000000, 0x50000000, NULL,
- OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET );
+ OBJINFO_INSETMODE_ADOPT | OBJINFO_INSETMODE_INSET, OBJINFO_TYPE_NONE );
Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, 11, 10, 9, 4, NO_OBJ );