This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Fwd: Addresses in pretty-printing
- From: Tom Tromey <tromey at redhat dot com>
- To: Jim Blandy <jimb at red-bean dot com>
- Cc: gdb ml <gdb at sourceware dot org>
- Date: Mon, 19 Nov 2012 14:56:23 -0700
- Subject: Re: Fwd: Addresses in pretty-printing
- References: <CAHgb+0=pttEZ2uOcO6xfqJ4yvnzCCTJs0DTAZgLKKKwgZiocQQ@mail.gmail.com> <CAHgb+0mRE449yJwRN9OBuDMhXTdRmuH_pq0CfFd2JoJAWf4XJg@mail.gmail.com>
>>>>> "Jim" == Jim Blandy <jimb@red-bean.com> writes:
Jim> Here is proposed documentation for gdb.Value.format, and two
Jim> accompanying functions, gdb.value_print_options and
Jim> gdb.set_value_print_options. I'd be willing to implement something
Jim> like this.
It seems like a worthwhile facility to me.
I think one possible objection is that this kind of thing will let
pretty-printer authors effectively override user settings. However,
we've see that they already do this, and it isn't really possible (or
perhaps arguably desirable) to stop them. Your proposal makes the
resulting code cleaner and is also, I think, useful for writing
new commands.
Jim> @findex gdb.set_value_print_options
Jim> @defun gdb.set_value_print_options (options)
Jim> Set the value printing options as given in @var{options}, a dictionary
Jim> whose items' keys name value printing options, and whose values are
Jim> the values to which those options should be set. Permitted keys are as
Jim> for @code{gdb.value_print_options}, described above.
This is just shorthand for a bunch of calls to gdb.execute, to set the
various parameters?
Tom