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: $n for pretty-printed elements?


Sorry for the delay in replying to this.
I'm very behind :(

Roland> Consider:
Roland> (gdb) p _m_path
Roland> $161 = std::list = {
Roland>   [0] = {

[...]

Roland> (gdb) p _m_path
Roland> $161 = std::list = {
Roland>   [0] = $162 = {

This seems like a good idea to me.

There are some subtleties.  We may be seeing the result of several
printers there.  E.g., consider a std::list<std::string>.  I think for
that we'd see:

$61 = std::list = {
  [0] = $162 = "hi bob";
};

... where I suppose $162 would refer to the char* underneath it all.
I suppose my point is that there are some operations, like assignments,
which wouldn't always make sense.

I'll put this on my list.

Tom


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