Mail Archives: djgpp/2001/06/28/21:15:11
invalid AT erehwon DOT invalid (Graaagh the Mighty) wrote in message news:<3b3b4662 DOT 211401101 AT news DOT primus DOT ca>...
> On Tue, 26 Jun 2001 16:12:23 +0300 (IDT), Eli Zaretskii
> <eliz AT is DOT elta DOT co DOT il> sat on a tribble, which squeaked:
>
> >> 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.
>
> Now imagine that the startup code is isolated into a separate module,
> say -lcrt, instead of included in libc. (Maybe this is already the
> case.) There are, in fact, *two* versions of libcrt.a, one for a
> certain debugging scenario, the other for general usage. The decision
> as to which one to link is made based on a flag passed from the
> compiling stage, possibly hidden inside one or more of the .o files.
>
> Doesn't look so impossible now, does it?
<snip>
> You guys are supposed to be pretty wizardly hackers. Here I have at
> least one viable idea, while you stubbornly claim it's impossible.
<snip>
The whole point is if you really think something is needed, you do it,
and contribute it to the general effort.
The really viable idea is to sit down and actually debug your program.
Try to come up with a minimal version that still exhibits the problem,
then you will find the cause.
Which features get implemented, if they are feasible at all, depend on
both the cost and benefit from implementing them. The possibility that
the benefit from a feature may be positive does not necessarily imply
the feature should be implmented. The benefit must be greater than the
cost of implementing it. (The cost being the time and energy of the
people whom you are asking to implement).
Clearly, a majority has decided that their time is better served
debugging their programs so as not to trash everything in sight. Now,
if, to you, the benefit from implementing a feature that would allow
cwsdpmi to divine the contents of memory locations that may have been
overwritten is greater than the cost of implementing that feature,
then you know where to get the sources and fix it.
Sinan
--
A. Sinan Unur
http://www.unur.com/
- Raw text -