This is the mail archive of the gdb-patches@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: [RFA] Add handling of null Ada arrays


"Pierre Muller" <muller at ics.u-strasbg.fr> writes:
>   At least in pascal language it is quite
> common to use things like 
> type
>   BigArray = Array [1..0xffffffff] of integer;
> if you want to be sure that you will never get into 
> troubles due to range checking...
>
>   Of course you cannot allocate a pointer to such a type
> directly, and it would eat up a lot of memory space.
>   But this kind of types always gave problems
> inside gdb, because when you wanted to look at
> the value gdb would try to copy the whole array...
> even if cases where it would only display the first elements,
> which is kind of silly, no?

Interesting.  I see print_command_1 calls record_latest_value, which
says:

  /* We don't want this value to have anything to do with the inferior anymore.
     In particular, "set $1 = 50" should not affect the variable from which
     the value was taken, and fast watchpoints should be able to assume that
     a value on the value history never changes.  */
  if (value_lazy (val))
    value_fetch_lazy (val);

If GDB were to support those types of values nicely, how would GDB
save such values in the value history without reading the whole thing?

Even if that could be addressed, the common val_print routine expects
to have the whole object in memory.  That's a shame.


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