[PATCH v5 6/8] GDB: Allow arbitrary keywords in integer set commands

Maciej W. Rozycki macro@embecosm.com
Wed Mar 30 10:58:51 GMT 2022


On Wed, 30 Mar 2022, Simon Sobisch wrote:

> > Rather than just `unlimited' allow the integer set commands (or command
> > options) to define arbitrary keywords for the user to use, removing
> > hardcoded arrangements for the `unlimited' keyword.
> > 
> > Make obsolete the confusingly named `var_zinteger', `var_zuinteger' and
> > `var_zuinteger_unlimited' `set'/`show' command variable types redefining
> > them in terms of `var_uinteger', `var_integer' and `var_pinteger', which
> > have the range of [0;UINT_MAX], [INT_MIN;INT_MAX], and [0;INT_MAX] each.
> 
> Those "confusingly named" parts go into python, too; maybe someone could
> create a follow-up patch or adjust this one.
> I think keeping them aligned is very useful (if renamed the old python
> names should stay as aliases for the new ones, and ideally the doc
> should reference a "until GDB 12: named ..." entry as this helps a lot
> when creating python extensions).

 I can't think of user-visible Python syntax for such a redefinition, and 
my lack of knowledge of the language does not help either, so someone more 
experienced in this area would have to step in.  It would be great to have 
the ability to add arbitrary keywords from Python code too I suppose.

 And the old keywords have to stay anyway, just as I have retained, e.g. 
`add_setshow_zuinteger_unlimited_cmd' in C++ code so that callers do not 
have to repeat an explicit reference to `zuinteger_unlimited_literals'.

  Maciej


More information about the Gdb-patches mailing list