From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57194 invoked by alias); 2 Feb 2016 12:26:42 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 57175 invoked by uid 89); 2 Feb 2016 12:26:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 spammy=Hx-languages-length:1840, serving X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 02 Feb 2016 12:26:40 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Adaptation of siginfo fixup for the new bnd fields From: sergiodj+buildbot@redhat.com To: gdb-testers@sourceware.org Message-Id: <3f2f6cb5e8922b680de9d67ad83d3b571d3b2a46@gdb-build> Date: Tue, 02 Feb 2016 12:26:00 -0000 X-SW-Source: 2016-q1/txt/msg04024.txt.bz2 *** TEST RESULTS FOR COMMIT 3f2f6cb5e8922b680de9d67ad83d3b571d3b2a46 *** Author: Walfred Tedeschi Branch: master Commit: 3f2f6cb5e8922b680de9d67ad83d3b571d3b2a46 Adaptation of siginfo fixup for the new bnd fields New bnds fields will be always present for x86 architecture. Fixup for compatibility layer 32bits has to be fixed. It was added the nat_siginfo to serving as intermediate step between kernel provided siginfo and the fix up routine. When executing compat_siginfo_from_siginfo or compat_x32_siginfo_from_siginfo first the buffer read from the kernel are converted into the nat_signfo for homogenization, then the fields of nat_siginfo are use to set the compat and compat_x32 siginfo fields. In other to make this conversion independent of the system where gdb is compiled the most complete version of the siginfo, named as native siginfo, is used internally as an intermediate step. Conversion using nat_siginfo is exemplified below: compat_siginfo_from_siginfo or compat_x32_siginfo_from_siginfo: buffer (from the kernel) -> nat_siginfo -> 32 / X32 siginfo (memcpy) (field by field) siginfo_from_compat_x32_siginfo or siginfo_from_compat_siginfo: 32 / X32 siginfo -> nat_siginfo -> buffer (to the kernel) (field by field) (memcpy) Caveat: No support for MPX on x32. 2016-02-02 Walfred Tedeschi gdb/ChangeLog: * amd64-linux-siginfo.c (nat_siginfo_t, nat_sigval_t, nat_timeval): New types. (compat_siginfo): New bound fields added. (compat_x32_siginfo): New field added. (cpt_si_addr_lsb): New define. (compat_siginfo_from_siginfo): Use nat_siginfo. (siginfo_from_compat_siginfo): Use nat_siginfo. (compat_x32_siginfo_from_siginfo): Likewise. (siginfo_from_compat_x32_siginfo): Likewise.