Mail Archives: djgpp-workers/2004/01/17/13:26:02
> 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 -