This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

New siginfo type in kernel how to make gdb back compatible.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]