Laziness

David Lecomber david@lecomber.net
Mon Oct 10 21:05:00 GMT 2005



> Perhaps we should redefine set print elements to only print anything
> pertaining to the original number of elements.

That's a fine idea!

> > Should we really really be reading all that memory, just to print the
> > first element?  I mean, not only is that slow, but it imposes a memory
> > overhead in the GDB too!
> 
> Not really, for the latter complaint; we discard them as they're read
> in.

Well, after they're read in, right? -- so that at peak it could be as
much as the memory of the actual array.  Not much of a problem for a
small code, but imagine some vast numerical code where an array is more
than half the actual available memory on the system - then GDB would
fail..  These codes really do exist.

Cheers
David



More information about the Gdb mailing list