[PATCH] gdb/testsuite: introduce parse_options procedure

Simon Marchi simon.marchi@polymtl.ca
Tue May 26 18:19:26 GMT 2020


On 2020-05-26 1:45 p.m., Keith Seitz wrote:
> On 5/26/20 6:02 AM, Simon Marchi via Gdb-patches wrote:
>> In the testsuite, I really like when procedures take optional arguments
>> using shell-like options that start with dash (for example,
>> gdb_test_multiple).  I think this leads to clearer code than using
>> parameters with defaults value.
> 
> Is this sufficiently more robust than parse_args to warrant two variations
> of a similar theme? Can they be merged into one implementation?
> 
> Keith
> 

Damn, I completely missed this!  No, there's no point in adding another such
function.  I'll try to use parse_args for what I initially wanted to do (adding
an -inferior-args option to gdb_run_cmd).  If parse_args doesn't do what I need,
I'll look into improving it.

Thanks for letting me know about that.

Simon


More information about the Gdb-patches mailing list