binutils-gdb/gdb/testsuite/gdb.dlang
Tom de Vries 590d3faada [gdb/testsuite] Improve argument syntax of proc arange
The current syntax of proc arange is:
...
  proc arange { arange_start arange_length {comment ""} {seg_sel ""} } {
...
and a typical call looks like:
...
  arange $start $len
...

This style is somewhat annoying because if you want to specify the last
parameter, you need to give the default values of all the other optional ones
before as well:
...
  arange $start $len "" $seg_sel
...

Update the syntax to:
...
    proc arange { options arange_start arange_length } {
       parse_options {
           { comment "" }
           { seg_sel "" }
       }
...
such that a typical call looks like:
...
  arange {} $start $len
...
and a call using seg_sel looks like:
...
  arange {
    seg_sel $seg_sel
  } $start $len
...

Also update proc aranges, which already has an options argument, to use the
new proc parse_options.

Tested on x86_64-linux.

Co-Authored-By: Simon Marchi <simon.marchi@polymtl.ca>
2021-08-30 10:30:26 +02:00
..
circular.c
circular.exp
debug-expr.exp
demangle.exp
expression.exp
primitive-types.exp
properties.exp
watch-loc.c [gdb/testsuite] Generate .debug_aranges in gdb.dlang/watch-loc.exp 2021-08-27 17:10:23 +02:00
watch-loc.exp [gdb/testsuite] Improve argument syntax of proc arange 2021-08-30 10:30:26 +02:00