This is the mail archive of the gdb-patches@sourceware.org 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] |
On 03/22/2013 02:29 AM, Pedro Alves wrote:
The change to zuinteger_unlimited command, meant that -1 is left as -1 in the command's control variable (lines_to_list), and the code in source.c isn't expecting that -- it only expects positive numbers. I find that the simplest and clearest to handle this is the approach of this patch. Keep the command as zuinteger_unlimited and have source.c itself map -1 to a largest source line number GDB could handle, which is the same as "unlimited" in practice, which is what also was done (albeit not explicitly) when the command was var_integer.
Probably we can do the same as var_integer. In do_set_command, if VAL is -1, set it to INT_MAX and in do_show_command, if c->var is INT_MAX, print "unlimited". In this way, the CLI API users don't have to convert their command values. However, this change is conflict with setting trace buffer size, which needs -1 explicitly, so your approach is fine.
-- Yao (éå)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |