From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53047 invoked by alias); 17 Apr 2015 16:46:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 53038 invoked by uid 89); 17 Apr 2015 16:46:03 -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,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f171.google.com Received: from mail-wi0-f171.google.com (HELO mail-wi0-f171.google.com) (209.85.212.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 17 Apr 2015 16:46:02 +0000 Received: by wiun10 with SMTP id n10so26904700wiu.1 for ; Fri, 17 Apr 2015 09:45:59 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.133.133 with SMTP id pc5mr7517601wjb.31.1429289159743; Fri, 17 Apr 2015 09:45:59 -0700 (PDT) Received: by 10.28.184.8 with HTTP; Fri, 17 Apr 2015 09:45:59 -0700 (PDT) In-Reply-To: <55313315.1010203@redhat.com> References: <1429287116-20216-1-git-send-email-jcmvbkbc@gmail.com> <55313315.1010203@redhat.com> Date: Fri, 17 Apr 2015 16:46:00 -0000 Message-ID: Subject: Re: [PATCH] gdb: fix xtensa build with custom overlay From: Max Filippov To: Pedro Alves Cc: gdb-patches@sourceware.org, Maxim Grigoriev , Woody LaRue , Marc Gauthier , "linux-xtensa@linux-xtensa.org" , Baruch Siach Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-04/txt/msg00695.txt.bz2 On Fri, Apr 17, 2015 at 7:21 PM, Pedro Alves wrote: > On 04/17/2015 05:11 PM, Max Filippov wrote: >> The commit 14e361d7aa3bbd8601b0457ee8558344e444c651 ("xtensa-config.c: >> missing defs.h include") fixed the build of default xtensa configuration >> by including defs.h in the beginning of xtensa-config.c. Unfortunately >> this fix doesn't work when gdb is configured for another xtensa core, as >> the file xtensa-config.c is a part of configuration overlay and it gets >> overwritten. To fix the build for all existing configurations include >> defs.h into gdb/xtensa-tdep.h, where the issue (reference to undeclared >> uint32_t) actually is. > > Hmm, I think that's news to me. Can you please expand a bit > on why is this mechanism necessary? xtensa cores may have greatly varying register and instruction sets, depending on options configured at processor creation time. So parts of gdb that deal with registers and instructions are generated during processor build and need to be replaced in the gdb source code to produce gdb that can work with a particular xtensa core. > In any case, that mechanism must already by outputting: > > #include "xtensa-config.h" > #include "xtensa-tdep.h" > > Just make it output #include "defs.h" as well? Yes, that can be done for the newly generated files, but there are existing configuration overlays which we need to patch in this case. It can be done, it's just much more changes. And more importantly, builds that used to work before 54bff650843cacd3c17a0afdb0fe32e15e1b65b0 "gdb: xtensa: fix on 64-bit host" were broken by that change. -- Thanks. -- Max