From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91137 invoked by alias); 7 Mar 2017 10:20:52 -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 91123 invoked by uid 89); 7 Mar 2017 10:20:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f66.google.com Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Mar 2017 10:20:49 +0000 Received: by mail-wm0-f66.google.com with SMTP id n11so116010wma.0 for ; Tue, 07 Mar 2017 02:20:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=fb7DhlE6JgGWqjfO+ze4JYyzuVlsVNt6ChN7NmfDn8s=; b=JDXbIXS9/6Hz5HoPQRy9F8oNXw+lA50hKmDPbvzs8GyqZcqxjUgPhHcHgAkJoME/rn WzjaJBvxvm2WEdphl+UReai4et7TVfQSxKxsYIcyjN1DPfkQE1gBdenIUiMPD6URk7yf TSsAV1pEAD5dtS3EWusQfpqKWVhLvYkbcv3b15JU48ONIt9GwQ4KfsaP/iC+r6uvwbBr qeoTK9BYRkhRE3lQVltLGC3V6q2zjXXBBZCvXmp9aPWRTSIlTThqVCFFKR+CaS53Mzpu tCWA/q8m2cY9o44Lkpn+yy+ltUTi/LX9ejZ7poiN0V1TDDb8v1Mxnw/Fx4iECTBO0jT/ rIfA== X-Gm-Message-State: AMke39mdgd1AS/LBBIg0MbEtIX778i73VUIGfb7QeD0860I7Wq09NvMc79PRINusSbb35g== X-Received: by 10.28.101.68 with SMTP id z65mr62515wmb.102.1488882047066; Tue, 07 Mar 2017 02:20:47 -0800 (PST) Received: from E107787-LIN ([194.214.185.158]) by smtp.gmail.com with ESMTPSA id t194sm18357127wmd.13.2017.03.07.02.20.45 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 07 Mar 2017 02:20:46 -0800 (PST) From: Yao Qi To: Steve Ellcey Cc: gdb-patches Subject: Re: [Patch v2 1/2] Enable ILP32 mode in gdb on aarch64 References: <1488837762.2866.268.camel@caviumnetworks.com> Date: Tue, 07 Mar 2017 10:20:00 -0000 In-Reply-To: <1488837762.2866.268.camel@caviumnetworks.com> (Steve Ellcey's message of "Mon, 06 Mar 2017 14:02:42 -0800") Message-ID: <867f41wfph.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00057.txt.bz2 Steve Ellcey writes: > I believe most of the new failures are due to two problems.=C2=A0=C2=A0On= e is > unwinding through signal handlers and the other is accessing thread Do the answers in this thread help? https://sourceware.org/ml/gdb/2017-02/msg00056.html > local data.=C2=A0=C2=A0I think the thread problem may be due to a version > mismatch between the thread_db library that gdb (a 64 bit process) > is using and a newer thread_db library that the 32 bit executables Do you mean libpthread? thread_db is only used in with gdb. It can be the issue you described but could you provide more information? Just make sure ptrace NT_ARM_TLS is right on ILP32 between user space and kernel. > I am working on the signal unwinding problem but I was hoping that > the part that is already working is sufficiently useful to check in > while I work on fixing this problem. =C2=A0The current code handles the > usual gdb functionality of breakpoints, stepping, printing variables, > etc. The patch can be pushed in after all questions/issues are resolved (I still have one question asked above) and after ILP32 kernel patches are merged. > diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c > index 0d472e2..0caac7f 100644 > --- a/gdb/aarch64-linux-nat.c > +++ b/gdb/aarch64-linux-nat.c > @@ -49,6 +49,9 @@ > #define TRAP_HWBKPT 0x0004 > #endif >=20=20 > +/* Check if we are on arm (as opposed to aarch64). */ > +#define IS_ARM32(gdbarch) (gdbarch_bfd_arch_info(gdbarch)->arch =3D=3D b= fd_arch_arm) > + This line is too long. > @@ -460,8 +463,7 @@ ps_err_e > ps_get_thread_area (struct ps_prochandle *ph, > lwpid_t lwpid, int idx, void **base) > { > - int is_64bit_p > - =3D (gdbarch_bfd_arch_info (target_gdbarch ())->bits_per_word =3D=3D= 64); > + int is_64bit_p =3D !IS_ARM32 (target_gdbarch ()); >=20=20 > return aarch64_ps_get_thread_area (ph, lwpid, idx, base, > is_64bit_p); Can you rename the variable to "is_aarch64_p"? --=20 Yao (=E9=BD=90=E5=B0=A7)