From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24566 invoked by alias); 17 Jul 2015 12:35:34 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 24551 invoked by uid 89); 17 Jul 2015 12:35:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_40,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Jul 2015 12:35:31 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 17 Jul 2015 05:35:12 -0700 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 17 Jul 2015 05:35:12 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.171]) by IRSMSX102.ger.corp.intel.com ([169.254.2.85]) with mapi id 14.03.0224.002; Fri, 17 Jul 2015 13:35:10 +0100 From: "Tedeschi, Walfred" To: "Joel Brobecker (brobecker@adacore.com)" , "Yao Qi (qiyaoltc@gmail.com)" , "Pedro Alves (palves@redhat.com)" CC: "gdb@sourceware.org" Subject: New siginfo type in kernel how to make gdb back compatible. Date: Fri, 17 Jul 2015 12:35:00 -0000 Message-ID: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00028.txt.bz2 Hello All, With Memory protection extensions the siginfo type has got new fields and n= ew interpretation for a segmentation fault. A segmentation fault can be now a signal for a bound violation. This is rep= resented 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/i= nclude/uapi/asm-generic/siginfo.h?id=3Drefs/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 redef= ined inside of GDB? I first thought about using the __libc_version, but not sure if this is a b= rilliant 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