From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4855 invoked by alias); 23 Aug 2013 07:23:19 -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 4837 invoked by uid 89); 23 Aug 2013 07:23:19 -0000 X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.2 Received: from mail-vc0-f171.google.com (HELO mail-vc0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 23 Aug 2013 07:22:51 +0000 Received: by mail-vc0-f171.google.com with SMTP id ij15so188220vcb.2 for ; Fri, 23 Aug 2013 00:22:49 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.58.211.227 with SMTP id nf3mr15419824vec.20.1377242569129; Fri, 23 Aug 2013 00:22:49 -0700 (PDT) Received: by 10.220.53.132 with HTTP; Fri, 23 Aug 2013 00:22:49 -0700 (PDT) In-Reply-To: <20130823004837.GC5221@adacore.com> References: <20130822233234.GA13292@adacore.com> <20130823004837.GC5221@adacore.com> Date: Fri, 23 Aug 2013 07:23:00 -0000 Message-ID: Subject: Re: [RFA/ppc-aix] fix thread support breakage (was: "Re: [PATCH 4/5] powerpc64-aix ptrace64 when defined.") From: David Edelsohn To: Joel Brobecker Cc: Raunaq 12 , GDB Patches , Mark Kettenis , Ulrich Weigand Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-08/txt/msg00665.txt.bz2 On Thu, Aug 22, 2013 at 8:48 PM, Joel Brobecker wrote: > Hello again, > >> Actually, I just found that it breaks thread support on 32bit AIX, >> at least. A simpler way to show the problem is: >> >> (gdb) x /x &__n_pthreads >> 0xf06a8258 <__n_pthreads>: Cannot access memory at address 0xf06a8258 >> >> Prior to the patch, we have: >> >> (gdb) x /x &__n_pthreads >> 0xf06a8258 <__n_pthreads>: 0x00000003 > > Attached is the patch I checked in locally at AdaCore: > > gdb/ChangeLog: > > * rs6000-nat.c (rs6000_ptrace32): Cast "addr" to "uintptr_t" > instead of "long long" in call to ptrace64. > > Tested on ppc-aix in full 32bit mode (both GDB and inferior are > 32bit). I think the other scenario would be 64bit GDB debugging > a 32bit inferior, but I don't have a 64bit compiler to try it. > > I'd like to commit this patch, unless there are comments/suggestions. LGTM. Is there a testcase that can be added to the GDB testsuite to catch this type of regression? Thanks, David