Date: Thu, 28 Jun 2001 22:24:36 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <1190-Thu28Jun2001222436+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 In-reply-to: <3b3b4662.211401101@news.primus.ca> (invalid@erehwon.invalid) Subject: Re: Peculiar behavior of program. References: <3b3b4662 DOT 211401101 AT news DOT primus DOT ca> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: invalid AT erehwon DOT invalid (Graaagh the Mighty) > Newsgroups: comp.os.msdos.djgpp > Date: Thu, 28 Jun 2001 15:11:52 GMT > > >> That suggests to make such a scheme be used when code is compiled with > >> -g and not -fomit-frame-pointer. > > > >The problem is, -fomit-frame-pointer is a compiler switch, while the > >setup of the runtime environment is done in the library. How will the > >library startup code know that -fomit-frame-pointer was used or not? > > That's easy. What decides what file to use to link in the standard > library? I don't see anyone having to link with -libc. So the tools > are doing it automagically. No, they aren't. See djgpp.djl. > Doesn't look so impossible now, does it? Yep, it does. > >In any case, forcing the programmer to change compilation switches to > >debug is a Bad Idea (tm): one more general-purpose register makes a > >world of difference on x86, so you are essentially debugging a > >different program. > > This is already done when one uses -fomit-frame-pointer simply to get > a more extensive traceback. People do it all the time What ``people''? _I_ don't, and neither does anyone who works with me. You can debug a program even if it was compiled with "-fomit-frame-pointer". I _never_ debug or test a program compiled with switches different from the switches used for the production build. > >There are other DPMI hosts that support this feature. > > Such as? 386Max and OS/2 Warp, to give just two examples.