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: pretty-printing update


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> (gdb) p intmap
Tom> $2 = number of elements = 2
Tom> [5] = 0x804c057 "liver"
Tom> [23] = 0x804c046 "maude"

Tom> The internal problem is that the value-printing code does not know
Tom> that gdb printed "$2 = ".

FYI, I implemented a quick fix for this.  Now the pretty-printer will
indent subsequent lines according to the indentation where it started:

(gdb) p intmap
$1 = std::map with 2 elements
     [5] = 0x804c277 "liver"
     [23] = 0x804c266 "maude"

I think this looks pretty good.  It also looks ok inside structures:

(gdb) p val
$1 = {
  x = [0] = 23
      [1] = 24
      [2] = 25, 
  s = 0x804e03c "maude"
}

Tom


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