This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: Should users be protected from badly-recursive pretty printers?


>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> Above pretty printer is infinitely recursive, even though this may
Paul> not be apparent to a casual GDB user.

I've also been wondering whether we want pretty-printing at both the
value_ and the val_ layers.  It seems a bit weird.

Paul> Using that pretty printer also produces "strange" result (there is no
Paul> "out-of-stack due to recursion too deep" inidication):

That is odd.

Paul> What (if anything) could (or should?) be done about this?

We could keep a hash of values that we have seen and throw an
exception if one is reused.  This is a mild pain due to the val_print
code.  Alternatively we could avoid recursion by disabling
pretty-printing the second time.

Tom


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