This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Under Linux/Glibc, GDB read DT_DEBUG from gdbserver too early?
- From: don dot lee at sunplusct dot com
- To: gdb at sourceware dot org
- Date: Tue, 15 Sep 2009 17:08:28 +0800
- Subject: Under Linux/Glibc, GDB read DT_DEBUG from gdbserver too early?
Hi all,
I'm now working on shared library support on a target GDB porting
(based on GDB 6.6), and we using Linux/Glibc as OS.
When I run 'target remote the-target:1234', GDB try to read
'.dynamic' section in the inferior address space, but looks like
at this moment the inferior is stopped at dynamic loader, and
the DT_DEBUG didn't get a meaningful value.
Did I do something wrong?
don
Here is my osabi init function:
static void
score_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
int target_mach = info.bfd_arch_info->mach;
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
/* Shared library handling. */
set_gdbarch_skip_trampoline_code (gdbarch,
find_solib_trampoline_target);
set_gdbarch_skip_solib_resolver (gdbarch, score_linux_skip_resolver);
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
svr4_fetch_objfile_link_map);
switch (target_mach)
{
case bfd_mach_score7:
tramp_frame_prepend_unwinder (gdbarch,
&score7_linux_rt_sigreturn_tramp_frame);
/* Core file support. */
set_gdbarch_regset_from_core_section (gdbarch,
score7_linux_regset_from_core_section);
break;
}
}