This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: 'char **environ' woes with cygwin
- To: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Subject: Re: 'char **environ' woes with cygwin
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 25 Sep 2000 15:24:49 -0400
- Cc: cgf at cygnus dot com, dj at delorie dot com, gdb at sourceware dot cygnus dot com
- References: <200008251825.LAA32754@train2.cygnus.com>
Michael Elizabeth Chastain wrote:
>
> Ok, here's a patch against sourceware that rips out the "environ" crap.
> I haven't even built with it.
>
> After doing the math, the fixed address "&environ" cancels out. So this
> won't make things any worse (or better) for djgpp or other systems where
> malloc() does more than increment an sbrk pointer.
>
> Chris, do you think this makes your life easier enough to warrant some
> testing and integration into sourceware?
>
> Michael
Can this change be simplified further? Vis:
o save an sbrk() call
at the start to get the current
top of heap
o call sbrk () at the display time
time and use that to compute
the size.
Also can the nasty bit of math used to make the computation be pushed
into a function somewhere?
I think your proposed change just needs to be pushed a little bit
further so that all the nasties are eliminated :-)
enjoy,
Andrew