return -0x05;
}
+ //Debug_Index_DWARFInfo_DumpObjectInfo( p_binfo, 0xff );
+
// XXX: for DEBUG!
Debug_ObjectInfo_Print_AllGroupLink( p_pginfo, 0xff );
printf( " UnImplement DWARF Tag(Array): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
/*----------------------------------------------------------------------
printf( " UnImplement DWARF Tag(Class): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
/*----------------------------------------------------------------------
printf( " UnImplement DWARF Tag(CompileUnit): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
{
// XXX
printf( " ERROR: Unknown DWARF Tag: %02xh\n", dw_tag);
- return 0x00;
+ return NO_OBJ;
}
{
printf( " UnImplement DWARF Tag(Exception): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
/*----------------------------------------------------------------------
{
printf( " UnImplement DWARF Tag(Function): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
printf( " UnImplement DW_TAG_subprogram: %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
{
printf( " UnImplement DWARF Tag(Not C/C++ Lang.): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
/*----------------------------------------------------------------------
{
printf( " UnImplement DWARF Tag(Parameter): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
/*----------------------------------------------------------------------
printf( " UnImplement DWARF Tag(Struct): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
/*----------------------------------------------------------------------
printf( " UnImplement DWARF Tag(Type): %s [%02xh]\n",
Debug_DWARF_GetTAGname( dw_tag ), dw_tag );
- return 0x00;
+ return NO_OBJ;
}
Byte b_level )
{
int i_objid = NO_OBJ;
- int i_start;
- int i_end;
- int i_now;
int i_cnt;
LibGoblin_BinaryFile *p_bfile;
LibGoblin_Index_DWARFInfo *p_offset;
- LibGoblin_Index_DWARFInfo *p_offbase;
if( 0x00 < b_level )
p_bfile = BinaryFile_GetBinaryFile( p_binfo->i_binfile );
assert( NULL != p_bfile );
- p_offbase = p_bfile->dwarf.p_offset;
+ p_offset = p_bfile->dwarf.p_offset;
for( i_cnt = 0; i_cnt < p_bfile->dwarf.i_max_offset; i_cnt++, p_offset++ ) {
printf(" [%3d] %8ph -> ObjID: %3d\n",
LibGoblin_BinaryFile *p_bfile;
LibGoblin_Index_DWARFInfo *p_offset;
LibGoblin_Index_DWARFInfo *p_offbase;
-
+
p_bfile = BinaryFile_GetBinaryFile( p_binfo->i_binfile );
assert( NULL != p_bfile );
+ if( 0 == p_bfile->dwarf.i_max_offset ) { return NO_OBJ; }
+
p_offbase = p_bfile->dwarf.p_offset;
i_start = 0;
- i_end = p_bfile->dwarf.i_max_offset;
+ i_end = p_bfile->dwarf.i_max_offset - 1;
do {
i_now = (i_start + i_end) / 2;
p_offset = p_offbase + i_now;
if( pb_dwinfo < p_offset->pb_dwinfo )
- { i_end = (( 0 < i_now ) ? (i_now - 1) : 0); }
+ { i_end = i_now; }
else if( p_offset->pb_dwinfo < pb_dwinfo )
{ i_start = (( i_now < i_end ) ? (i_now + 1) : i_end); }
else {
i_objid = p_offset->i_obj_id;
break;
}
- }while( i_start != i_end );
+ }while( i_start < i_end );
return i_objid;
}
pb_dwinfo = pobj_now->info.type.p_dwtype;
i_objid_parent = Index_DWARFInfo_SearchObjectInfo( p_binfo, pb_dwinfo );
+
+/*
+ printf(" Link: ObjID=%d dwinfo=%8ph -> LinkAddr=%8p => parent: %d (old: %d)\n",
+ pobj_now->i_id, pobj_now->dwarf.pb_info, pobj_now->info.type.p_dwtype,
+ i_objid_parent, pobj_now->grplink.i_parent_id );
+*/
+
if( NO_OBJ != i_objid_parent ) {
pobj_parent = OBJINFO( p_pginfo, i_objid_parent );
i_result = ObjectInfo_AdoptObjectInfo( p_pginfo, pobj_parent, pobj_now );
+
+ pobj_now->info.type.i_objid_type = i_objid_parent;
}
goto_ObjectInfo_PostProc_ResolvTypeLink_post: