'char **environ' woes with cygwin

Andrew Cagney ac131313@cygnus.com
Mon Sep 25 12:28:00 GMT 2000


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


More information about the Gdb mailing list