mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
* Refactored TDebugInfoDwarf2.appenddef_object, no functional changes, to easy code-reuse for Dwarf3s appenddef_object
git-svn-id: trunk@16742 -
This commit is contained in:
parent
8f7ada0db0
commit
d5de153e39
@ -3414,27 +3414,28 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDebugInfoDwarf2.appenddef_object(list:TAsmList;def: tobjectdef);
|
procedure TDebugInfoDwarf2.appenddef_object(list:TAsmList;def: tobjectdef);
|
||||||
procedure doappend;
|
procedure doappend(const createlabel: boolean; const objectname: PShortString);
|
||||||
begin
|
begin
|
||||||
{ Objective-C class: same as regular class, except for
|
if createlabel then
|
||||||
a) Apple-specific tag that identifies it as an Objective-C class
|
begin
|
||||||
b) use extname^ instead of objname
|
if not(tf_dwarf_only_local_labels in target_info.flags) then
|
||||||
}
|
current_asmdata.asmlists[al_dwarf_info].concat(tai_symbol.create_global(def_dwarf_class_struct_lab(def),0))
|
||||||
if (def.objecttype=odt_objcclass) then
|
else
|
||||||
|
current_asmdata.asmlists[al_dwarf_info].concat(tai_symbol.create(def_dwarf_class_struct_lab(def),0));
|
||||||
|
end;
|
||||||
|
if assigned(objectname) then
|
||||||
append_entry(DW_TAG_structure_type,true,[
|
append_entry(DW_TAG_structure_type,true,[
|
||||||
DW_AT_name,DW_FORM_string,def.objextname^+#0,
|
DW_AT_name,DW_FORM_string,objectname^+#0,
|
||||||
DW_AT_byte_size,DW_FORM_udata,tobjectsymtable(def.symtable).datasize,
|
|
||||||
DW_AT_APPLE_runtime_class,DW_FORM_data1,DW_LANG_ObjC
|
|
||||||
])
|
|
||||||
else if assigned(def.objname) then
|
|
||||||
append_entry(DW_TAG_structure_type,true,[
|
|
||||||
DW_AT_name,DW_FORM_string,def.objname^+#0,
|
|
||||||
DW_AT_byte_size,DW_FORM_udata,tobjectsymtable(def.symtable).datasize
|
DW_AT_byte_size,DW_FORM_udata,tobjectsymtable(def.symtable).datasize
|
||||||
])
|
])
|
||||||
else
|
else
|
||||||
append_entry(DW_TAG_structure_type,true,[
|
append_entry(DW_TAG_structure_type,true,[
|
||||||
DW_AT_byte_size,DW_FORM_udata,tobjectsymtable(def.symtable).datasize
|
DW_AT_byte_size,DW_FORM_udata,tobjectsymtable(def.symtable).datasize
|
||||||
]);
|
]);
|
||||||
|
{ Apple-specific tag that identifies it as an Objective-C class }
|
||||||
|
if (def.objecttype=odt_objcclass) then
|
||||||
|
append_attribute(DW_AT_APPLE_runtime_class,DW_FORM_data1,[DW_LANG_ObjC]);
|
||||||
|
|
||||||
finish_entry;
|
finish_entry;
|
||||||
if assigned(def.childof) then
|
if assigned(def.childof) then
|
||||||
begin
|
begin
|
||||||
@ -3489,27 +3490,25 @@ implementation
|
|||||||
case def.objecttype of
|
case def.objecttype of
|
||||||
odt_cppclass,
|
odt_cppclass,
|
||||||
odt_object:
|
odt_object:
|
||||||
doappend;
|
doappend(false,def.objname);
|
||||||
odt_interfacecom,
|
odt_interfacecom,
|
||||||
odt_interfacecorba,
|
odt_interfacecorba,
|
||||||
odt_dispinterface,
|
odt_dispinterface,
|
||||||
odt_class,
|
odt_class:
|
||||||
odt_objcclass:
|
|
||||||
begin
|
begin
|
||||||
if (def.objecttype<>odt_objcclass) then
|
{ implicit pointer }
|
||||||
begin
|
append_entry(DW_TAG_pointer_type,false,[]);
|
||||||
{ implicit pointer }
|
append_labelentry_ref(DW_AT_type,def_dwarf_class_struct_lab(def));
|
||||||
append_entry(DW_TAG_pointer_type,false,[]);
|
finish_entry;
|
||||||
append_labelentry_ref(DW_AT_type,def_dwarf_class_struct_lab(def));
|
|
||||||
finish_entry;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if not(tf_dwarf_only_local_labels in target_info.flags) then
|
doappend(true,def.objname);
|
||||||
current_asmdata.asmlists[al_dwarf_info].concat(tai_symbol.create_global(def_dwarf_class_struct_lab(def),0))
|
|
||||||
else
|
|
||||||
current_asmdata.asmlists[al_dwarf_info].concat(tai_symbol.create(def_dwarf_class_struct_lab(def),0));
|
|
||||||
doappend;
|
|
||||||
end;
|
end;
|
||||||
|
odt_objcclass:
|
||||||
|
{ Objective-C class: same as regular class, except for
|
||||||
|
a) Apple-specific tag that identifies it as an Objective-C class
|
||||||
|
b) use extname^ instead of objname
|
||||||
|
}
|
||||||
|
doappend(true,def.objextname);
|
||||||
odt_objcprotocol:
|
odt_objcprotocol:
|
||||||
begin
|
begin
|
||||||
append_entry(DW_TAG_pointer_type,false,[]);
|
append_entry(DW_TAG_pointer_type,false,[]);
|
||||||
|
Loading…
Reference in New Issue
Block a user