From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32657 invoked by alias); 10 Oct 2011 14:47:06 -0000 Received: (qmail 32648 invoked by uid 22791); 10 Oct 2011 14:47:05 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate7.uk.ibm.com (HELO mtagate7.uk.ibm.com) (194.196.100.167) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Oct 2011 14:46:51 +0000 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p9AEknYb003280 for ; Mon, 10 Oct 2011 14:46:49 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9AEknbZ2379846 for ; Mon, 10 Oct 2011 15:46:49 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9AEknlB022653 for ; Mon, 10 Oct 2011 08:46:49 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p9AEklVX022612; Mon, 10 Oct 2011 08:46:47 -0600 Message-Id: <201110101446.p9AEklVX022612@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 10 Oct 2011 16:46:47 +0200 Subject: Re: [PATCH] Fix that different function breakpoints are set@same pc address (PR gdb/12703) To: yao@codesourcery.com (Yao Qi) Date: Mon, 10 Oct 2011 14:47:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <4E04692F.3030500@codesourcery.com> from "Yao Qi" at Jun 24, 2011 06:38:39 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2011-10/txt/msg00268.txt.bz2 Yao Qi wrote: > gdb/ > * arm-tdep.c (thumb_analyze_prologue): Check condition for 32-bit > Thumb-2 instructions. Huh. That check is indeed wrong. > - else if ((insn & 0xe000) == 0xe000) > + else if ((insn & 0xe000) == 0xe000 && (insn & 0x1800) != 0) > { Instead of open-coding the check, I think it would be preferable to use the thumb_insn_size routine instead. Note that there are a number of other places that either already open- code the correct check, or -worse- use the same incorrect check as the code above: - thumb_in_function_epilogue_p - thumb_get_next_pc_raw - arm_breakpoint_from_pc Would you mind converting them all to thumb_insn_size? Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com