30 Jul 2012 15:58
[RFC] Register commands using add_setshow_zuinteger_cmd
Yao Qi <yao <at> codesourcery.com>
2012-07-30 13:58:12 GMT
2012-07-30 13:58:12 GMT
Hi, I am examing the usage of zuinteger_cmd and zinteger_cmd today, and I find that a lot of zinteger_cmd commands should be registered as zuinteger_cmd. For example, all the debug commands, such as 'set debug infrun 1' should be registered as 'zuinteger_cmd', because we never do 'set debug FOO -2'. This patch is not indented to commit anything to CVS, but describe what I try to do. If it is the right way to go, I'll convert other zinteger_cmd to zuinteger_cmd if appropriate. What do you think? gdb: 2012-07-30 Yao Qi <yao <at> codesourcery.com> * serial.c (global_serial_debug_p): Add 'unsigned'. (_initialize_serial): Call add_setshow_zuinteger_cmd instead of add_setshow_zinteger_cmd. * target.c (targetdebug): Add 'unsigned'. (initialize_targets): Call add_setshow_zuinteger_cmd instead of add_setshow_zinteger_cmd. --- gdb/serial.c | 12 ++++++------ gdb/target.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gdb/serial.c b/gdb/serial.c index df18b2f..62d7fa9 100644 --- a/gdb/serial.c +++ b/gdb/serial.c <at> <at> -27,7 +27,7 <at> <at> extern void _initialize_serial (void);(Continue reading)
RSS Feed