gdb/testsuite: DWARF assembler: add context parameters to _location
The _location proc is used to assemble a location description. It needs
to know some contextual information:
- size of an address
- size of an offset (into another DWARF section)
- DWARF version
It currently get all this directly from global variables holding the
compilation unit information. This is fine because as of now, all
location descriptions are generated in the context of creating a
compilation unit. However, a subsequent patch will generate location
descriptions while generating a .debug_loclists section. _location
should therefore no longer rely on the current compilation unit's
properties.
Change it to accept these values as parameters instead of accessing the
values for the CU.
No functional changes intended.
gdb/testsuite/ChangeLog:
* lib/dwarf.exp (_location): Add parameters.
(_handle_DW_FORM): Adjust.
Change-Id: Ib94981979c83ffbebac838081d645ad71c221637