Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: "Tedeschi\, Walfred" <walfred.tedeschi@intel.com>
Cc: "Joel Brobecker \(brobecker\@adacore.com\)"
	<brobecker@adacore.com>,
	 "Yao Qi \(qiyaoltc\@gmail.com\)" <qiyaoltc@gmail.com>,
	 "Pedro Alves \(palves\@redhat.com\)" <palves@redhat.com>,
	 "gdb\@sourceware.org" <gdb@sourceware.org>
Subject: Re: New siginfo type in kernel how to make gdb back compatible.
Date: Fri, 17 Jul 2015 15:41:00 -0000	[thread overview]
Message-ID: <86mvyuiygx.fsf@gmail.com> (raw)
In-Reply-To: <AC542571535E904D8E8ADAE745D60B194444ED12@IRSMSX104.ger.corp.intel.com>	(Walfred Tedeschi's message of "Fri, 17 Jul 2015 12:35:09 +0000")

"Tedeschi, Walfred" <walfred.tedeschi@intel.com> writes:

> GDB should be nevertheless back compatible, i.e. capable of displaying the siginfo for applications running on systems having  older glibc.
>
> In case this is desirable and I do think it is.
>
> How should we think about resolving that in terms of the siginfo type redefined inside of GDB?

GDB creates a type for "struct siginfo" in
linux-tdep.c:linux_get_siginfo_type, and it should work well on both old
kernel and new kernel, because the new fields are added the end of
_sigfault.

If you want to show these new added fields $_siginfo, then, I am not
very sure.  How are these two fields used?  Are they only used when MPX
is enabled in linux kernel?  If so probably we can overwrite the default
linux one (linux_get_siginfo_type) with a new one
(linux_get_siginfo_type_1, for example) if i386_mpx_enabled is true.
linux_get_siginfo_type_1 returns the type with new fields, and we call
set_gdbarch_get_siginfo_type in i386_linux_init_abi like this,

  if (i386_mpx_enabled)
    set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type_1);

-- 
Yao (齐尧)


      reply	other threads:[~2015-07-17 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 12:35 Tedeschi, Walfred
2015-07-17 15:41 ` Yao Qi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86mvyuiygx.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=palves@redhat.com \
    --cc=walfred.tedeschi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox