[Lldb-commits] [PATCH] ObjectFileELF::GetSectionHeaderInfo sets arch_spec unnecessarily
mg11 at csr.com
Fri Jul 11 00:08:38 PDT 2014
Todd Fiala wrote:
> Your patch looks good to me. I would like Greg and/or Ed to have a
> look at it too. If they don’t object, I can submit it.
> I ran tests on Linux and MacOSX with the patch applied (with a slight
> indentation fix to the patch to fix some kind of strange spacing in my
> Chrome browser with this line:
> The tests came back clean.
Cool, however a better patch may be to prevent
ObjectFileELF::GetArchitecture from calling ParseSectionHeaders again. I
do allude to this in my last email on this thread. I've attached a patch
for doing this. Hopefully we can submit either this or my earlier one.
(But I think this one is best :-).
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (revision 212686)
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (working copy)
@@ -2569,8 +2569,11 @@
- // Allow elf notes to be parsed which may affect the detected
+ if (m_section_headers.empty())
+ // Allow elf notes to be parsed which may affect the detected
arch = m_arch_spec;
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 654 bytes
Desc: not available
More information about the lldb-commits