[Lldb-commits] [PATCH] D55214: Introduce ObjectFileBreakpad

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 5 07:26:48 PST 2018

labath marked 3 inline comments as done.
labath added inline comments.

Comment at: source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h:74
+  bool IsStripped() override { return false; }
markmentovai wrote:
> labath wrote:
> > zturner wrote:
> > > Is this always true for breakpad files?
> > Well.. the whole point of these files is to provide symbol information, so it would be weird if they were stripped. The breakpad `dump_syms` allows you to omit generating unwind information, but I don't think that's enough to call this "stripped". It is certainly possible to create a file by hand which contains just a `MODULE` directive and nothing else, but I would say that is a (non-stripped) file which describes an empty module, and not a stripped file.
> > 
> > In reality, this doesn't really matter, as this function is called from just one place <https://github.com/llvm-mirror/lldb/blob/master/source/Core/Module.cpp#L506>, and I don't think that will be relevant for breakpad files.
> Correct, "stripped" isn't really useful for Breakpad dump_syms output. What does LLDB do with the result of IsStripped()?
> Stripped dump_syms output would be what you get from running dump_syms on a stripped module. I can't imagine why anyone would do this intentionally, but you'd also be hard-pressed to tell that's what had happened given only the dumped symbol file.
Not much. The only relevant use is linked to above. I don't fully understand that code, but my rough idea is the following: we create a "synthetic" symbol in the main object file when we know some symbol must be at the given address, but we don't know it's name. Then when we are looking up an address and it resolves to this synthetic symbol (and the object file is marked as stripped), we go to the symbol file (if we have one) to see if it can provide us with a name for it.

So this isn't even relevant for breakpad files, as they will never be the "main" object file, but I had to put something here, and "false" seems the best option.



More information about the lldb-commits mailing list