[PATCH 1/2] [gdb/testsuite] Add proc _location_no_split
Tom de Vries
tdevries@suse.de
Fri Jan 17 15:14:24 GMT 2025
On 9/23/24 20:57, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> Proc _location splits its first argument into a list of lines.
> Tom> That approach is somewhat cumbersome when using it recursively.
>
> Tom> Add a variant _location_no_split that treats its first argument as a list of
> Tom> lines.
>
> This is also kind of cumbersome though as it leads to weird-looking
> "double quoted" code.
>
> I think a more Tcl-ish approach would be to split by lines, and then
> reassemble lines by reading until "info complete" reports a complete
> line.
>
> There's a FIXME to this effect just before the proc... I just didn't do
> this since I was feeling lazy & didn't need it.
>
> Then your test:
>
> + { DW_AT_location {
> + DW_OP_entry_value { {DW_OP_bregx $::dwarf_regnum 0} {DW_OP_deref_size 4 } }
> + DW_OP_stack_value
> + } SPECIAL_expr }
>
> could be written as
>
> DW_OP_entry_value {
> DW_OP_bregx $::dwarf_regnum 0
> DW_OP_deref_size 4
> }
>
> ... and I think this would work fine.
>
Hi Tom,
thanks for the review.
I've managed to make that work, so I've dropped this 1/2 patch and
submitted a v2 of the 2/2 patch of this series (
https://sourceware.org/pipermail/gdb-patches/2025-January/214834.html ).
Thanks,
- Tom
> thanks,
> Tom
More information about the Gdb-patches
mailing list