From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32209 invoked by alias); 12 Oct 2005 14:41:34 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32202 invoked by uid 22791); 12 Oct 2005 14:41:32 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 12 Oct 2005 14:41:32 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EPhnO-0005kS-LG; Wed, 12 Oct 2005 10:41:30 -0400 Date: Wed, 12 Oct 2005 14:41:00 -0000 From: Daniel Jacobowitz To: Andreas Schwab Cc: gdb-patches@sources.redhat.com Subject: Re: Broken cast in linux-thread-db Message-ID: <20051012144130.GA21870@nevyn.them.org> Mail-Followup-To: Andreas Schwab , gdb-patches@sources.redhat.com References: <20051012142427.GA21308@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-10/txt/msg00107.txt.bz2 On Wed, Oct 12, 2005 at 04:33:27PM +0200, Andreas Schwab wrote: > Daniel Jacobowitz writes: > > > I think the current behavior is actually more correct despite any > > warning. > > GCC _always_ sign extends, which is definitely wrong here. Well presumably it honors POINTERS_EXTEND_UNSIGNED. > > Were you fixing an observed problem? > > If notify.u.bptaddr has the high bit set it will be sign extended, but the > breakpoint address when the thread event breakpoint is hit will be zero > extended, so they don't match and the breakpoint is not recognized. Then this will break thread debugging on MIPS, where the breakpoint address will be sign extended. We'll only be in linux-thread-db.c if we have enough symbols to load shared libraries; maybe bfd_get_sign_extend_vma (exec_bfd) and assert that exec_bfd is provided? -- Daniel Jacobowitz CodeSourcery, LLC