Re: [PATCH v2 00/42] Share DWARF partial symtabs between objfiles

Simon Marchi
2020-06-04T18:04:11Z

On 2020-06-04 1:55 p.m., Tom de Vries wrote:
> I've also tested this with the gdb_cmd_file-twice patch with these two
> target boards, and everything looks good.

Thanks for testing.
> [ FWIW, the gdb.base/index-cache.exp with the gdb_cmd_file-twice patch
> and native is still there. ]

I'll take a look at that now.

> That looks more elaborate than necessary, how about:
> ...
> diff --git a/gdb/testsuite/gdb.base/share-psymtabs-bt.exp
> b/gdb/testsuite/gdb.base/share-psymtabs-bt.exp
> index f4ca58e30b..65ea728f66 100644
> --- a/gdb/testsuite/gdb.base/share-psymtabs-bt.exp
> +++ b/gdb/testsuite/gdb.base/share-psymtabs-bt.exp
> @@ -25,20 +25,14 @@
> # 3. Check that this frame's information is complete in the "backtrace"
> # output.
>
> -standard_testfile share-psymtabs-bt.c share-psymtabs-bt-2.c
> +standard_testfile .c share-psymtabs-bt-2.c
>
> -set sources [list \
> - "${srcdir}/${subdir}/${srcfile}" \
> - "${srcdir}/${subdir}/${srcfile2}" \
> -]
> -
> -if { [gdb_compile $sources $binfile executable {debug}] != "" } {
> +if { [prepare_for_testing "failed to prepare" $testfile "$srcfile
> $srcfile2" \
> + {debug}] } {
> untested "failed to compile"
> return -1
> }
>
> -clean_restart $binfile
> -
> # Load $binfile a second time. The second created objfile will re-use the
> # partial symtabs created by the first one.
> if { [gdb_file_cmd $binfile] != 0 } {
> ...
> ?

Thanks, I pushed the patch after integrating your suggestion.

Simon