Right now, if we want to dump symbol at specified offset, we need to use grep.
And it can only show surrounding symbols in layout (not in lexical scope sense).
This adds similar options to dump command as llvm-dwarfdump to allow users
to dump symbol record at specified offset and its parents or children with
spcified depth.
--symbol-offset= must be used with --modi to dump only one symbol at given
offset.
--show-parents/--show-children must be used with --symbol-offset to
dump all symbols that are parents/children of the symbol at given offset.
--parent-recurse-depth/--children-recurse-depth must be used with
--show-parents/--show-children to specify the max up/down depth.
Rather than having these fields, I think it might make more sense to have a new method, visitSymbolStreamFiltered(Syms, FilterOptions), which implements this new behavior. It would be slightly more functional and less stateful. WDYT?
I'm imagining a simple struct combining all the options, in case we want to add more later: