This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Remote gdb target desc init order


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]