This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 'char **environ' woes with cygwin


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]