This is the mail archive of the gdb-prs@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]

[Bug python/16286] value.string(length = x) broken for common variable length arrays idiom


http://sourceware.org/bugzilla/show_bug.cgi?id=16286

--- Comment #9 from brobecker at adacore dot com ---
> value.string() can be invoked for any purpose the user chooses, not
> just printing.  It can also be invoked when building a pretty-printed
> result out of pieces (where a lazy string is problematic).  So if we
> add a knob, it needs to be more general than for just printing.  I'm
> then left with wondering what kind of knob?  Should it just be for
> value.string() or should it be more general?  And is it something we
> want in the API?

It's something we already do for Ada. We call it varsize limit,
and I just realized that we forgot to contribute the "set/show"
commands! In my 13 years at AdaCore, and the few years before that
as a lambda user, we never had a case where the error triggered
by this limit was not symptomatic of a real problem - usually
undefined data.

I think it would be fine to generalize varsize limit core GDB,
instead of keeping it within ada-lang. I agree it's not perfect,
like all heuristics, but it's been working really well for us.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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