[PATCH v5] [PR mi/29554] New PRINT-VALUES option '--scalar-values'.

Eli Zaretskii eliz@gnu.org
Fri Mar 10 12:05:56 GMT 2023


> From: Gareth Rees <grees@undo.io>
> Date: Fri, 10 Mar 2023 11:04:42 +0000
> Cc: gdb-patches@sourceware.org
> 
> This also makes sense to me, but this is not a decision that I am in a
> position to make! The experienced GDB developers -- in particular, you
> and Eli -- need to come to an agreement about which approach is best
> in this case: do you prefer to take the risk of a backward-
> incompatible change (GDB/MI clients can no longer get the values for
> references to compound types in C++ programs using --simple-values) or
> do you prefer to accept the cost of leaving (what looks like) a
> mistake to stand forever? I can implement whichever you think is best.
> 
> For the moment I will prepare a revised patch implementing solution #1
> and addressing your other review comments. If Eli can also follow up
> and help us reach a conclusion on the best design, that would be
> great.

The reason why I preferred #2 is simple: it avoids incompatible
changes in the behavior of existing options.  Since it was not really
clear-cut that the previous behavior was a bug, the backward
incompatibility could cause trouble to some application or use case
which didn't consider it was a bug and relied on that behavior.
Introducing a new option is free from this problem.


More information about the Gdb-patches mailing list