Changeset 4271 for trunk/tools
- Timestamp:
- Sep 16, 2000, 5:17:07 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/dbginfo/kHll.cpp
r4130 r4271 1 /* $Id: kHll.cpp,v 1.1 5 2000-08-31 03:02:27 bird Exp $1 /* $Id: kHll.cpp,v 1.16 2000-09-16 15:17:07 bird Exp $ 2 2 * 3 3 * kHll - Implementation of the class kHll. … … 2234 2234 lPosDebug = e32.e32_debuginfo; 2235 2235 else 2236 lPosDebug = (cbLXFile + 0x400) & ~0x1FF; //try do some alignment. 2236 lPosDebug = cbLXFile; 2237 //lPosDebug = (cbLXFile + 0x400) & ~0x1FF; //try do some alignment. 2237 2238 2238 2239 /* … … 2248 2249 { 2249 2250 /* 2250 * Update exeheader.2251 * Write dummy signature (_VerifySignature in the OS2KRNL checks this). 2251 2252 */ 2252 e32.e32_debuglen = cch; 2253 e32.e32_debuginfo = lPosDebug; 2254 if (fseek(phFile, lPosLXHdr, SEEK_SET) == 0) 2253 static char aFakeSig[0x200] = {0}; 2254 if (fseek(phFile, 0, SEEK_END) == 0) 2255 2255 { 2256 /* 2257 * Write the updated header to disk. 2258 */ 2259 cch = fwrite(&e32, 1, sizeof(e32), phFile); 2260 if (cch == sizeof(e32)) 2261 rc = NO_ERROR; 2256 if (fwrite(&aFakeSig[0], 1, sizeof(aFakeSig), phFile) == sizeof(aFakeSig)) 2257 { 2258 cch += sizeof(aFakeSig); 2259 2260 /* 2261 * Update exeheader. 2262 */ 2263 e32.e32_debuglen = cch; 2264 e32.e32_debuginfo = lPosDebug; 2265 if (fseek(phFile, lPosLXHdr, SEEK_SET) == 0) 2266 { 2267 /* 2268 * Write the updated header to disk. 2269 */ 2270 cch = fwrite(&e32, 1, sizeof(e32), phFile); 2271 if (cch == sizeof(e32)) 2272 rc = NO_ERROR; 2273 else 2274 rc = ERROR_WRITE_FAULT; 2275 } 2276 else 2277 rc = ERROR_SEEK; 2278 } 2262 2279 else 2280 { 2281 fprintf(stderr, "warning - failed to write fake signature.\n"); 2263 2282 rc = ERROR_WRITE_FAULT; 2283 } 2264 2284 } 2265 2285 else
Note:
See TracChangeset
for help on using the changeset viewer.