gdb/python: use return values of add_setshow functions in add_setshow_generic
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 27 May 2021 17:59:00 +0000 (13:59 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 27 May 2021 18:00:07 +0000 (14:00 -0400)
commit7bd22f56a3cf47c6743f7f7989a6fa07f935d31b
tree5d825ebce7ef9b3e2b75f1812451885946ae7e7e
parent9f26053690299e3a5d295d78c4ceeaf840344f0b
gdb/python: use return values of add_setshow functions in add_setshow_generic

In add_setshow_generic, we create set/show commands using add_setshow_*
functions, then look up the commands by name to set the context pointer.
It would be simpler and more efficient to use the return values of the
add_setshow_* functions, do that.

gdb/ChangeLog:

* python/py-param.c (add_setshow_generic): Use return values of
add_setshow functions.

Change-Id: I04d50736e1001ddb732d81e088468876df9c88ff
gdb/ChangeLog
gdb/python/py-param.c