This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: vdso
- From: vijay nag <vijunag at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 3 Jul 2013 14:36:39 +0530
- Subject: Re: vdso
- References: <CAKhyrx_TULNrWwSJ0zPq4tgd8MOpkhSRYZfbMRFcRLw7P0mj4Q at mail dot gmail dot com> <20130703084207 dot GA598 at host2 dot jankratochvil dot net> <CAKhyrx9xNG6xEtVf51ig-dC93=C9vrzgi98RzjA4QLyfuE+hkw at mail dot gmail dot com> <20130703090259 dot GA1854 at host2 dot jankratochvil dot net>
On Wed, Jul 3, 2013 at 2:32 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Wed, 03 Jul 2013 10:48:48 +0200, vijay nag wrote:
>> 5: ffffe400 20 FUNC GLOBAL DEFAULT 6 __kernel_vsyscall@@LINUX_2.5
>
> So your Linux kernel is OK. You should check GDB function add_vsyscall_page
> on your system why it did not do what it should do.
>
>
> Regards,
> Jan
Below are the code excerpts from that function. My gdb version is 7.5
dd_vsyscall_page (struct target_ops *target, int from_tty)
{
CORE_ADDR sysinfo_ehdr;
if (target_auxv_search (target, AT_SYSINFO_EHDR, &sysinfo_ehdr) > 0
&& sysinfo_ehdr != (CORE_ADDR) 0)
{
struct bfd *bfd;
struct symbol_file_add_from_memory_args args;
if (core_bfd != NULL)
bfd = core_bfd;
else if (exec_bfd != NULL)
bfd = exec_bfd;
else
/* FIXME: cagney/2004-05-06: Should not require an existing
BFD when trying to create a run-time BFD of the VSYSCALL
page in the inferior. Unfortunately that's the current
interface so for the moment bail. Introducing a
``bfd_runtime'' (a BFD created using the loaded image) file
format should fix this. */
{
warning (_("Could not load vsyscall page "
"because no executable was specified\n"
"try using the \"file\" command first."));
return;
}
args.bfd = bfd;
args.sysinfo_ehdr = sysinfo_ehdr;
args.name = xstrprintf ("system-supplied DSO at %s",
paddress (target_gdbarch, sysinfo_ehdr));
/* Pass zero for FROM_TTY, because the action of loading the
vsyscall DSO was not triggered by the user, even if the user
typed "run" at the TTY. */
args.from_tty = 0;
catch_exceptions (current_uiout, symbol_file_add_from_memory_wrapper,
&args, RETURN_MASK_ALL);
}
}