mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 07:08:12 +02:00
* If ds_dwarf_cpp (C++ emulation) is enabled, add DW_AT_linkage_name attribute for methods.
LLDB uses it to display fully qualified method names. Add a simple C++ mangled name without params to achieve at least "Class::Method()" instead of just "Method" in LLDB. git-svn-id: trunk@40498 -
This commit is contained in:
parent
1bde958889
commit
ad269dedd4
@ -2265,7 +2265,7 @@ implementation
|
||||
|
||||
var
|
||||
procendlabel : tasmlabel;
|
||||
procentry : string;
|
||||
procentry,s : string;
|
||||
cc : Tdwarf_calling_convention;
|
||||
st : tsymtable;
|
||||
vmtoffset : pint;
|
||||
@ -2318,6 +2318,19 @@ implementation
|
||||
append_entry(DW_TAG_subprogram,true,
|
||||
[DW_AT_name,DW_FORM_string,def.mangledname+#0]);
|
||||
|
||||
if (ds_dwarf_cpp in current_settings.debugswitches) and (def.owner.symtabletype in [objectsymtable,recordsymtable]) then
|
||||
begin
|
||||
{ If C++ emulation is enabled, add DW_AT_linkage_name attribute for methods.
|
||||
LLDB uses it to display fully qualified method names.
|
||||
Add a simple C++ mangled name without params to achieve at least "Class::Method()"
|
||||
instead of just "Method" in LLDB. }
|
||||
s:=tabstractrecorddef(def.owner.defowner).objrealname^;
|
||||
procentry:=Format('_ZN%d%s', [Length(s), s]);
|
||||
s:=symname(def.procsym, false);
|
||||
procentry:=Format('%s%d%sEv'#0, [procentry, Length(s), s]);
|
||||
append_attribute(DW_AT_linkage_name,DW_FORM_string, [procentry]);
|
||||
end;
|
||||
|
||||
append_proc_frame_base(list,def);
|
||||
|
||||
{ Append optional flags. }
|
||||
|
Loading…
Reference in New Issue
Block a user