mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
FpDebug: DWARF-4, DW_AT_high_pc can be constant/offset
This commit is contained in:
parent
7f9391a737
commit
a0f66fb2b9
@ -5010,9 +5010,15 @@ begin
|
||||
then begin
|
||||
ReadAddressValue(Attrib, Form, Info.StartPC);
|
||||
|
||||
if LocateAttribute(Scope.Entry, DW_AT_high_pc, AttribList, Attrib, Form)
|
||||
then ReadAddressValue(Attrib, Form, Info.EndPC)
|
||||
else Info.EndPC := Info.StartPC;
|
||||
if LocateAttribute(Scope.Entry, DW_AT_high_pc, AttribList, Attrib, Form) then begin
|
||||
ReadAddressValue(Attrib, Form, Info.EndPC);
|
||||
if (Form = DW_FORM_data1) or (Form = DW_FORM_data2) or (Form = DW_FORM_data4) or
|
||||
(Form = DW_FORM_data8) or (Form = DW_FORM_udata) or (Form = DW_FORM_sdata)
|
||||
then
|
||||
Info.EndPC := Info.StartPC + Info.EndPC;
|
||||
end
|
||||
else
|
||||
Info.EndPC := Info.StartPC;
|
||||
|
||||
// TODO (dafHasName in Abbrev.flags)
|
||||
if (dafHasName in AttribList.Abbrev^.flags) and
|
||||
@ -5261,8 +5267,13 @@ begin
|
||||
if LocateAttribute(Scope.Entry, DW_AT_low_pc, AttribList, Attrib, Form)
|
||||
then ReadAddressValue(Attrib, Form, FMinPC);
|
||||
|
||||
if LocateAttribute(Scope.Entry, DW_AT_high_pc, AttribList, Attrib, Form)
|
||||
then ReadAddressValue(Attrib, Form, FMaxPC);
|
||||
if LocateAttribute(Scope.Entry, DW_AT_high_pc, AttribList, Attrib, Form) then begin
|
||||
ReadAddressValue(Attrib, Form, FMaxPC);
|
||||
if (Form = DW_FORM_data1) or (Form = DW_FORM_data2) or (Form = DW_FORM_data4) or
|
||||
(Form = DW_FORM_data8) or (Form = DW_FORM_udata) or (Form = DW_FORM_sdata)
|
||||
then
|
||||
FMaxPC := FMinPC + FMaxPC;
|
||||
end;
|
||||
|
||||
if FMinPC = 0 then FMinPC := FMaxPC;
|
||||
if FMaxPC = 0 then FMAxPC := FMinPC;
|
||||
|
Loading…
Reference in New Issue
Block a user