Date: Tue, 23 Jul 1996 09:19:15 +0200 (IST) From: Eli Zaretskii To: John Joseph Newbigin <079519 AT bud DOT cc DOT swin DOT edu DOT au> Cc: djgpp AT delorie DOT com Subject: Re: Please help me In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 23 Jul 1996, John Joseph Newbigin wrote: > I have been using DJGPP for a few weeks now and I think it is realy good but am > having some problems which don't seem to be covered in the FAQ. > > Firstly, I wrote a program to see how much memory I could allocate by looping > and allocating blocks of memory. When I use large blocks like 1meg, everything > seems to work fine but when I use smaller blocks, the program has a sigsev > thingy and dies (under DOS and CWSDPMI, but not WIndows). This is not realy a > problem as it would be quite unlikly to reach this limit in a normal program. I > would be greatful if anyone could tell me what causes this and how to overcome it. This is all explained in the FAQ (v2/faq201b.zip). Section 15.4-15.5 explain the Windows peculiarities, and section 6.4 explains the problem with a lot of small allocations when using CWSDPMI. > My second problem is about gdb. I thought I would find out what was causing the > problems described above so I read up the FAQ and was soon debuging my program > but when I tried to single step, I got a message that the program had not been > started. When I start the program, it runs till the end, or has an error. Could > someone tell me hot to start a program so that I can step through it? The FAQ is no substitute for the real docs, and you should really read the GDB manual before debugging. To step through your program you need to set a breakpoint at the entry point to your `main' function, then run it, and when it hits the breakpoint, start stepping: b main RET r RET n RET RET RET ... You can also use `tb' instead of `b', and you might need `s' instead of `n'. Read the docs to learn more about these.