Philip M. Gollucci wrote:
> William A. Rowe, Jr. wrote:
>> Keep in mind, using the official build of httpd you have .pdb debug
>> files that can be downloaded that exactly match the .exe/.dll's/.so's
>> that we ship.  That means you can -debug- these segfaults.
> Am I able to make these from UNIX ?
> Where can I read about this?
> 
> Randy/Steve ?

I do -not- know what sort of debugging symbol tables are emitted from mingw
or cyg toolchains, but VC compile flag /Zi shoves out the symbols into a
compiler database (/Fd directs the output to a particular database name)
and the link flags /debug /opt:ref /incremental:no creates an .exe and
run time symbol database by the same name as the linked file (httpsd.exe
gains httpsd.pdb).

Here's where things get confusing and why devs disable or throw these .pdb
files away.  1 - compiler .pdb's aren't runtime symbol databases (different
formats, even - although both are named .pdb).  You would only hang onto
a compiler .pdb that corresponds to a distributed link .lib binary.  And
2 - the /Zi flag doesn't inhibit or change the optimization, and 3 - the
link flags /debug /opt:ref /incremental:no only differ from a /release
build by a couple of PE flags that identify the emitted .pdb.  Finally,
4 - you must keep the exact .pdb's that correspond to the binaries.  You
can't regenerate them reliably, and especially cannot generate them after
the fact with a slightly different version of the compiler.

Think of .exe + .pdb as an unstripped unix pe binary, the symbols in this
case -are- stripped, over to the .pdb.  Users don't need the .pdb, but the
original binaries and .pdb file(s) must be present to open a user.dmp crash
file in a debugger, or for Dr Watson to produce truly intelligible output.

If you don't have a .pdb, and the compiler flag /Oy- is given, you can still
unwind the backtrace (with very limited clues).  But /O2 (without /Oy-) will
optimize the calling frames - so without a .pdb such backtraces are illegible.

Hope this offers a few clues; I've started to toggle /Oy- always since it
makes a Dr Watson backtrace offer a few clues about a crash without having
to grab the user.dmp file.  More hints are here;

  http://httpd.apache.org/dev/debugging.html#backtrace-win

See




Reply via email to