www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2004/01/17/13:26:02

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Date: Sat, 17 Jan 2004 20:19:52 +0200
From: "Eli Zaretskii" <eliz AT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <1438-Sat17Jan2004201952+0200-eliz@elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <Pine.OSF.4.58.0401151136500.19575@sirppi.helsinki.fi> (message
from Esa A E Peuha on Thu, 15 Jan 2004 11:45:36 +0200 (EET))
Subject: Re: Use of FILE in sprintf/sscanf
References: <Pine DOT OSF DOT 4 DOT 58 DOT 0401051334160 DOT 4628 AT sirppi DOT helsinki DOT fi> <4002FE15 DOT 8040707 AT phekda DOT gotadsl DOT co DOT uk> <Pine DOT OSF DOT 4 DOT 58 DOT 0401131249170 DOT 16534 AT sirppi DOT helsinki DOT fi> <u4quzwyc5 DOT fsf AT elta DOT co DOT il> <Pine DOT OSF DOT 4 DOT 58 DOT 0401151136500 DOT 19575 AT sirppi DOT helsinki DOT fi>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Thu, 15 Jan 2004 11:45:36 +0200 (EET)
> From: Esa A E Peuha <peuha AT cc DOT helsinki DOT fi>
> 
> What kind of other problems does it cause?

It simply isn't appropriate, IMHO, to have executable code on a header
file.  For starters, consider the poor developer who wants to find the
source for such a function.

> > You cannot easily put a breakpoint or step thru such functions, and
> 
> Why would you expect to?

Because sometimes you need to know what's going on in those functions.
There are bugs in the library as well, you know, and sometimes we need
to debug them.

> > COFF debug info doesn't support included code at all.
> 
> That's not really true: COFF files are quite capable of handling any
> number of source files per one object file (the DJGPP FAQ 12.6 is
> simply wrong), because clearly DJGPP programs (which are just COFF
> files) can have more than one source file and still contain proper
> debug info.

The debug info is wrong because it mentions the wrong source file.
Whether this is a GCC bug or a COFF debug info limitation, I don't
know for sure (I thought it was the latter, but I might be mistaken).

In practice, it doesn't make any difference: code included from other
files cannot be debugged on the source level using COFF debug info.

Anyway, I said I wanted to avoid a prolonged discussion.  If you think
my reservations aren't important enough to restructure your changes,
then feel free to disregard them.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019