+2013-06-12 Pedro Alves <palves@redhat.com>
+
+ * linux-x86-low.c (linux_is_elf64): Delete global.
+ (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
+ with local linux_pid_exe_is_elf_64_file use.
+
2013-06-11 Pedro Alves <palves@redhat.com>
* linux-low.c (regset_disabled, disable_regset): New functions.
}
}
-/* Is this process 64-bit? */
-static int linux_is_elf64;
#endif /* __x86_64__ */
/* Convert a native/host siginfo object, into/from the siginfo in the
x86_siginfo_fixup (siginfo_t *native, void *inf, int direction)
{
#ifdef __x86_64__
+ unsigned int machine;
+ int tid = lwpid_of (get_thread_lwp (current_inferior));
+ int is_elf64 = linux_pid_exe_is_elf_64_file (tid, &machine);
+
/* Is the inferior 32-bit? If so, then fixup the siginfo object. */
if (!is_64bit_tdesc ())
{
return 1;
}
/* No fixup for native x32 GDB. */
- else if (!linux_is_elf64 && sizeof (void *) == 8)
+ else if (!is_elf64 && sizeof (void *) == 8)
{
if (sizeof (siginfo_t) != sizeof (compat_x32_siginfo_t))
fatal ("unexpected difference in siginfo");