Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 4184 invoked by uid 6000); 26 Jul 1999 18:07:11 -0000 Received: (qmail 4000 invoked from network); 26 Jul 1999 18:07:06 -0000 Received: from ligarius-fe0.ultra.net (146.115.8.189) by taz.hyperreal.org with SMTP; 26 Jul 1999 18:07:06 -0000 Received: from gregmm (207-172-97-163.s417.tnt2.sbo.ma.dialup.rcn.com [207.172.97.163]) by ligarius-fe0.ultra.net (8.8.8/ult/n20340/mtc.v2) with SMTP id OAA11537 for ; Mon, 26 Jul 1999 14:06:59 -0400 (EDT) Message-Id: <4.1.19990726133735.00a037c0@pop.ma.ultranet.com> X-Sender: gregmm@pop.ma.ultranet.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Mon, 26 Jul 1999 14:06:35 -0400 To: new-httpd@apache.org From: Greg Marr Subject: [PATCH] Easier debugging of release builds under Windows Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org 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