Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* New siginfo type in kernel how to make gdb back compatible.
@ 2015-07-17 12:35 Tedeschi, Walfred
  2015-07-17 15:41 ` Yao Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Tedeschi, Walfred @ 2015-07-17 12:35 UTC (permalink / raw)
  To: Joel Brobecker (brobecker@adacore.com),
	Yao Qi (qiyaoltc@gmail.com), Pedro Alves (palves@redhat.com)
  Cc: gdb

Hello All,

With Memory protection extensions the siginfo type has got new fields and new interpretation for a segmentation fault.
A segmentation fault can be now a signal for a bound violation. This is represented by segmentation fault with sigcode 3.

The new siginfo structure can be found here:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/include/uapi/asm-generic/siginfo.h?id=refs/tags/v4.1.2

to be more elucidative the sigfault part of the sifields is now:

		struct {
			void __user *_addr; /* faulting insn/memory ref. */
#ifdef __ARCH_SI_TRAPNO
			int _trapno;	/* TRAP # which caused the signal */
#endif
			short _addr_lsb; /* LSB of the reported address */
			struct {
				void __user *_lower;   /* <<<<<---- new field */
				void __user *_upper; /* <<<<<---- new field */
			} _addr_bnd;
		} _sigfault;


Glibc will have also to follow those changes.

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?

I first thought about using the __libc_version, but not sure if this is a brilliant idea.


Thanks a lot and best regards,
-Fred

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-17 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17 12:35 New siginfo type in kernel how to make gdb back compatible Tedeschi, Walfred
2015-07-17 15:41 ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox