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

gdb/765: RFA: Convert to add_setshow_cmd


>Number:         765
>Category:       gdb
>Synopsis:       RFA: Convert to add_setshow_cmd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 27 17:48:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     ac131313@redhat.com
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
See:
http://sources.redhat.com/ml/gdb-patches/2002-07/msg00008.html

(suggested that it be split in two).

This patch changes gdb to use add_setshow_cmd everywhere it used to
use add_show_from_set.  This patch actually consists of several
different parts.  I couldn't think of a simple way to separate the
parts that didn't involve a lot of redundant work on my part.  I've
already done several passes over the source; the thought of more is
unpalatable.  Though more are in my future :-(

* Add a new `print doc' argument to add_setshow_cmd.
  This is used to format the `show foo' output

* Add a corresponding field to struct cmd_list_element

* Update test suite to reflect (minor) changes to gdb's output

* Removed set_verbose function.  It was easier to remove than to fix,
  and anyway the joke is stale now.

* Added add_setshow_enum_cmd, updated all callers

* Added argument to add_setshow_auto_boolean_cmd and
  add_setshow_boolean_cmd.  This is the `print doc' argument as with
  add_setshow_cmd.  Updated all callers.

In some of the appended, all the strings in a given file are marked.
I can try to back out that part of the patch if you'd prefer to review
those changes separately.

This runs the gdb test suite on my box (x86 Red Hat Linux 7.3) with no
regressions.  It also compiles with -Werror enabled.  I've only built
the native configuration.

Once this goes in my plan is to remove add_show_from_set entirely.

Comments?  Critiques?  Questions?  Ok to commit?

Tom
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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