Mail Archives: djgpp-workers/1999/06/06/04:00:50
It turns out v2loadimage was still defaulting to a 256K stack size
when loading unstubified COFF files. I changed that to take the stack
and the size of the transfer buffer from the debugger; this way, users
can get predictable results by stubediting the debugger.
Here are the diffs:
*** src/debug/common/v2load.c~0 Sun Aug 31 19:40:40 1997
--- src/debug/common/v2load.c Fri Jun 4 21:22:42 1999
***************
*** 21,29 ****
--- 21,32 ----
#include <sys/stat.h>
#define SIMAGIC "go32stub"
+ #define __tb_size _go32_info_block.size_of_transfer_buffer
+
AREAS areas[MAX_AREA];
extern char **environ;
+ extern unsigned _stklen;
static int read_section(int pf, unsigned ds, unsigned foffset, unsigned soffset, unsigned size)
{
*************** int v2loadimage(const char *program, con
*** 89,96 ****
coff_offset = 0;
strcpy(si.magic, "go32stub, V 2.00");
si.size = 0x44;
! si.minstack = 0x40000;
! si.minkeep = 16384; /* transfer buffer size */
memset(&si.basename, 0, 24); /* Asciiz strings */
}
if (header[0] != 0x014c) { /* COFF? */
--- 92,102 ----
coff_offset = 0;
strcpy(si.magic, "go32stub, V 2.00");
si.size = 0x44;
! /* The default size of the stack and the transfer buffer are taken
! from the debugger's values, so that users could get predictable
! results by stubediting the debugger. */
! si.minstack = _stklen;
! si.minkeep = __tb_size; /* transfer buffer size */
memset(&si.basename, 0, 24); /* Asciiz strings */
}
if (header[0] != 0x014c) { /* COFF? */
- Raw text -