[PATCH 2/2] [gdb/symtab] Fix assert in read_addrmap_from_aranges

Simon Marchi simark@simark.ca
Fri Aug 5 20:03:04 GMT 2022



> +save_vars { Dwarf::_add_dummy_cus } {
> +
> +    set Dwarf::_add_dummy_cus 0

Could we make that an option to Dwarf::assemble?  Just an idea, turn:

  proc assemble {filename body}

into

  proc assemble {options body}

... where options could be:

  Dwarf::assemble {
    filename $asm_file
    add_dummy_cus 0
  } {
    ... body ...
  }

And if $options is of length one, you transform it into

  {filename $options}

such that existing test cases don't have to be changed.

Simon


More information about the Gdb-patches mailing list