Please put it as review in Phabricator so others can comment too. I am 
wondering how we can test this behaviour.

One can use -fno-asynchronous-unwind-tables with clang to disable generation of 
.eh_frame but the startup code

still brings in that section.


You also need to run clang-format to make sure formatting is right and I see 
some strange characters in the patch file.


> +      // Try to find .debug_frame section even if .eh_frame doesn't exist.

s/even if/if/


Thanks,

Abid

________________________________
From: Tatyana Krasnukha <tatyana.krasnu...@synopsys.com>
Sent: Tuesday, May 23, 2017 6:20 PM
To: Abid, Hafiz; lldb-commits@lists.llvm.org
Subject: RE: [Lldb-commits] Patch for fixing FDE indexing when scan debug_info 
section

Done. I have also added a little change which allow to use debug_info section 
when eh_frame is absent. This case really can take place on some platforms.

Thanks,
Tatyana

From: Abid, Hafiz [mailto:hafiz_a...@mentor.com]
Sent: Tuesday, 23 May, 2017 3:31 PM
To: Tatyana Krasnukha <tatyana.krasnu...@synopsys.com>; 
lldb-commits@lists.llvm.org
Subject: Re: [Lldb-commits] Patch for fixing FDE indexing when scan debug_info 
section

It looks ok to me. Please put the differences of .eh_frame and
.debug_frame that you described below in code comments too.?

Thanks,
Abid



________________________________
From: lldb-commits 
<lldb-commits-boun...@lists.llvm.org<mailto:lldb-commits-boun...@lists.llvm.org>>
 on behalf of Tatyana Krasnukha via lldb-commits 
<lldb-commits@lists.llvm.org<mailto:lldb-commits@lists.llvm.org>>
Sent: Thursday, May 18, 2017 9:37 PM
To: lldb-commits@lists.llvm.org<mailto:lldb-commits@lists.llvm.org>
Subject: [Lldb-commits] Patch for fixing FDE indexing when scan debug_info 
section

Fix FDE indexing while scan debug_info section.

There are some differences between eh_frame and debug_frame formats that are 
not considered by DWARFCallFrameInfo::GetFDEIndex.
An FDE entry contains CIE_pointer in debug_frame in same place as cie_id in 
eh_frame. As described in dwarf 
standard<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dwarfstd.org_doc_dwarf-2D2.0.0.pdf&d=DwMFAw&c=DPL6_X_6JkXFx7AXWqB0tg&r=yfnu24japkhNGh-WqJObHXmH3mINtC_2FO828lrNpM0&m=6bXYUUYhGtSz4V-aPy_DuviU1kYtmn9rHUU-2aIGDzE&s=kMPV12z6OBKSq3lC8HgNgMkv23SamtORaFALS-I-Vts&e=>
 (section 6.4.1),
CIE_pointer is an "offset into the .debug_frame section". So, variable 
cie_offset should be equal cie_id for debug_frame.
FDE entries with zeroth CIE pointer (which is actually placed in cie_id 
variable) shouldn't be ignored also.

I had same issue as described here 
http://lists.llvm.org/pipermail/lldb-dev/2014-October/005520.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_pipermail_lldb-2Ddev_2014-2DOctober_005520.html&d=DwMFAw&c=DPL6_X_6JkXFx7AXWqB0tg&r=yfnu24japkhNGh-WqJObHXmH3mINtC_2FO828lrNpM0&m=6bXYUUYhGtSz4V-aPy_DuviU1kYtmn9rHUU-2aIGDzE&s=7NGym3Cx6gVwlzBRE44Zm6Teee6tMi9Iq-BTRMjM6Pc&e=>
 , and these changes have fixed it for me (with "m_is_eh_frame" set to false, 
of course).

Tatyana Krasnukha
Software Engineer, Sr. I, Solutions Group, Synopsys Inc.
w +7.812.408.7463 | m +7 981 757-4491 | 
taty...@synopsys.com<mailto:taty...@synopsys.com>

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to