From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27128 invoked by alias); 18 Oct 2012 09:10:46 -0000 Received: (qmail 27109 invoked by uid 22791); 18 Oct 2012 09:10:43 -0000 X-SWARE-Spam-Status: No, hits=-7.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Oct 2012 09:10:34 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9I9AW8j025318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Oct 2012 05:10:32 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9I9AUOL011213; Thu, 18 Oct 2012 05:10:31 -0400 Message-ID: <507FC786.50400@redhat.com> Date: Thu, 18 Oct 2012 09:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 MIME-Version: 1.0 To: Joel Brobecker CC: Tom Tromey , gdb-patches@sourceware.org Subject: Re: RFA: probable rs6000-aix-tdep.c bug found by clang References: <87mwzk279g.fsf@fleche.redhat.com> <20121017212417.GP3050@adacore.com> In-Reply-To: <20121017212417.GP3050@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2012-10/txt/msg00316.txt.bz2 On 10/17/2012 10:24 PM, Joel Brobecker wrote: > >> Based on indentation and logic I think that the fix is to remove the ";". >> However, I have no decent way to test this and would appreciate someone >> else looking at it. > [...] >> 2012-10-17 Tom Tromey >> >> * rs6000-aix-tdep.c (rs6000_aix_osabi_sniffer): Remove extraneous >> semicolon. I suspect this is the root cause of PR8966 (AIX 5.1 single_step configuration is broken). http://sourceware.org/bugzilla/show_bug.cgi?id=8966 We're always returning the _UNKNOWN osabi, so this is unreachable: static void rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); /* RS6000/AIX does not support PT_STEP. Has to be simulated. */ set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > In fact, going one step further, do we need the check at all? > This is how the sniffer is registered: > > gdbarch_register_osabi_sniffer (bfd_arch_rs6000, > bfd_target_xcoff_flavour, > rs6000_aix_osabi_sniffer); > gdbarch_register_osabi_sniffer (bfd_arch_powerpc, > bfd_target_xcoff_flavour, > rs6000_aix_osabi_sniffer); > > So, isn't rs6000_aix_osabi_sniffer going to be called if, and only > if, the bfd has a bfd_target_xcoff_flavour, thus making the check > superfluous? Sure looks like it. -- Pedro Alves