On 4/4/2013 8:15 AM, Mark Final wrote:
> Sorry to resurrect this, but I'm just about to look at the linux-gate
> symbols, and have a couple of questions.
>
> The linux-gate-intel.sym in the Breakpad source has a module id of
> 4FBDA58B5A1DF5A379E3CF19A235EA090, which apparently is not static.
> Bruce kindly supplied a shell script to show what he did with this -
> the argument to which appears to be a new module id.
>
> Question 1) where does this new module id come from? linux-gate.so is
> a virtual DSO from my understanding, so doesn't exist on disk, so I
> cannot run dump_sym on it. I've seen it referenced in a number of
> minidumps generated, and this does have a different module id in. Does
> it vary per distro? Is it a case of chicken-and-egg, that I need a
> minidump to see the new module id, before I can create a symbol share
> to inspect the minidump properly? I'm guessing that this is the case
> with reference to "publish ... to a half-dozen locations based on the
> debug identifiers I've seen".
I suspect Bruce is simply taking his existing set of crash reports,
pulling out the debug IDs for linux-gate.so from them, and then moving
the symbol files to match those IDs.
The module ID varies because the module ID we're generating is just a
hash of the first page of the virtual module's .text section, so if the
code changes then the ID will change.
> Question 2) is it important to have both linux-gate-intel.sym and
> linux-gate-amd.sym in a symbols share, in case software is run on
> either CPU vendor?
Probably, I'm not completely sure what the difference is here.
Nope, Breakpad finds linux-gate by referring to an entry in
/proc/self/auxv, not by name[1], and always writes "linux-gate.so"[2] as
the module name for it.
It strikes me that Breakpad could do better in this case, and have some
baked-in knowledge of how to unwind out of this module. I'm not sure how
hard that would be to implement in the general sense.
-Ted
1.
http://code.google.com/p/google-breakpad/source/browse/trunk/src/client/linux/minidump_writer/linux_dumper.cc#168
2.
http://code.google.com/p/google-breakpad/source/browse/trunk/src/client/linux/minidump_writer/linux_dumper.h#65