Re: [PATCH 1/6] gdb/testsuite/dwarf: use single abbrev table in .dwo files

Simon Marchi
2025-11-19T20:31:48Z

On 2025-11-19 11:05, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>
>>> # Must be run on local host due to use of objcopy.
>>> if {[is_remote host]} {
>>> return -1
>>> }
>
> Simon> I don't understand why that wouldn't be possible if debugging on a
> Simon> remote host. Here, we are building target objects, we have a toolchain
> Simon> for the target, so we should have an objcopy for the target that we can
> Simon> run. It should be possible, in theory. Am I missing something?
>
> Most likely just nobody ever wanted to try it.
>
> Simon> Since build_executable_and_dwo_files returns -1 if the host is remote,
> Simon> causing the test to exit early an cleanly (although we could perhaps add
> Simon> an untested call somewhere), do we really need the require at the top?
>
> No opinion on that but I do agree that build_executable_and_dwo_files is
> missing some 'untested' invocations -- some "return -1" paths call it
> and some do not.

Ok, so I'll make a patch to add untested calls to these code paths. And
I'll remove the gdb_remote_download call from the test: if someone wants
to make build_executable_and_dwo_files work with remote hosts, they will
have to modify all tests using build_executable_and_dwo_files anyway
(or, build_executable_and_dwo_files will do the gdb_remote_download, in
which case individual tests won't need to).

Simon