[Lldb-commits] [PATCH] D70745: [LLDB] [PECOFF] Look for the truncated ".eh_fram" section name

Adrian McCarthy via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 26 16:14:54 PST 2019


amccarth added a comment.

Is `.eh_frame` the only one that matters?  Should this be more general and compare `const_sect_name` to the full name and the truncated name for any known section names?

If the giant cascade of else-if were factored into a separate function, then a trivial unit test could verify that it returns the right section_type for a variety of full and truncated names (as well as other combinations of section headers).

Although not directly relevant to this patch, it seems like a lot this cascade could be made more readable and maintainable by replacing the simple if-name-set-section_type cases were replaced with a lookup into a table (and that lookup could be the one place to check both the full name and the truncated name).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70745/new/

https://reviews.llvm.org/D70745





More information about the lldb-commits mailing list