httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Marr <gr...@alum.wpi.edu>
Subject [PATCH] Easier debugging of release builds under Windows
Date Mon, 26 Jul 1999 18:06:35 GMT
Making the following changes to the .dsp files (and thus the exported
makefiles) will make for easier debugging of release builds under Windows.

(I only have VC6 currently installed, so I can't provide actual diffs.)

For the projects: ap, regex, apacheos, apachecore, and apache
In project settings, on the C/C++ tab, general category, change Debug Info
from none to "Program Database"

For the projects: apachecore and apache
In project settings, on the Link tab, general category, check "Generate
debug info"

For the project: apachecore
In project settings, on the link tab, output category, enter 0x20000000 in
the Base Address field.

If the person that builds the Win32 binaries saves the .pdb files from
released versions, then bug reports of the form "The instruction at
"0x00d248b6" referenced memory at "0x03ffc1fa" the memory could not be
read" can be traced to the specific line in the code using the PDBs and
freely available software.

The value in the "Base Address" field serves two purposes.  The first is to
allow tracing of addresses in ApacheCore.dll.  By default, all DLLs in
windows are given the base address 0x10000000.  When a program starts and
loads DLLs into its address space, the linker adjusts the memory location
of any dlls whose address space conflicts with any other dll already loaded
by that program.  This prevents reliable determination of function and line
information from a crash.  It also increases the time it takes to start an
application, because it creates extra work for the linker.  If a DLL's
address space (defined by its Base Address and physical size) doesn't
overlap the address space of anything else loaded so far by the
application, then the linker doesn't have to adjust function pointers, and
so the application starts faster, (or the DLL loads faster in the case of a
LoadLibrary call.)

Applying similar changes to all the projects in the modules directory will
provide similar improvements.  This will take slightly more work since
non-overlapping address spaces will have to be determined for each.

Another method can be used on the final DLLs:
place all the DLLs in a single directory, and execute the following command
editbin /rebase:base=0x20000000 *.dll

The source of most of this information is the April 98 MSJ BugSlayer column:
http://windows.microsoft.com/msj/0498/bugslayer0498.htm


Mime
View raw message