Remote gdb target desc init order

Rich Felker <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
I'm trying to add fdpic abi support to the linux-sh target, and the
old patch I'm working from introduces a check in sh_linux_init_abi
based on elf_elfheader(info.abfd)->e_flags to determine if the target
is fdpic. This works as long as the program to be debugged is loaded
on the client side before connecting, but fails if it's loaded over
the wire, since target_find_description is called by
remote_start_remote before the binary is transferred.

Commenting out that call and letting the subsequent call in the
!target_is_non_stop_p code path take its place makes detection work as
expected.

Is there a reason target_find_description needs to be called early
like it is now? Should I be using some other mechanism (aside from
ELF header) to determine if the remote program to be debugged is
fdpic, and if so, how would the abi init function have access to that?

Rich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.