This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: Laziness



> 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


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