From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98182 invoked by alias); 31 Aug 2016 15:06:44 -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 98018 invoked by uid 89); 31 Aug 2016 15:06:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Respect, HX-Received:10.98.144.144, him X-HELO: mail-pf0-f196.google.com Received: from mail-pf0-f196.google.com (HELO mail-pf0-f196.google.com) (209.85.192.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Aug 2016 15:06:30 +0000 Received: by mail-pf0-f196.google.com with SMTP id g202so2912847pfb.1 for ; Wed, 31 Aug 2016 08:06:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=LIFvQkixLivyBw87JmzKVL+STk8ph9B0O4iFJXi5FW4=; b=ZslSJUfjYc2KTmKkZOp0X668tnqIbtf+azwdVOgrubwQaVE70MapUHnNR7DYcuuKQZ K5iKWsEB5f0MB2UXi5Ic0pOeqpXdIf3ZhY++VBdYlIqihDMZwJE8u80gYEP6kqLHvTh+ yFbBI8KQWC6yypFJKvAv1knxRpnKH/p25UCHTw/Nr8W3ccWc+9vGwoPBZHwgbTKpoCUl f9gh5YcIwNJ+emCHFB4LXo2PtDcMqHIICpEejdvL+ESi/eaBcrepcScdwlK2TTP+XvPJ uHZit20KgTxUKdO564jOYNLxQ9VgLl4nn+DIejjonqcuue6HpefNmWnJ9WKjFuukUAP1 T3WA== X-Gm-Message-State: AE9vXwM8XkXJeZ0Vq+hMZbrjElXo7NM3rbfm9SRpibYBFKNKP7mLDuCFGNDyG2xko8WXVQ== X-Received: by 10.98.144.144 with SMTP id q16mr17753677pfk.98.1472655988208; Wed, 31 Aug 2016 08:06:28 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc115.osuosl.org. [140.211.9.73]) by smtp.gmail.com with ESMTPSA id c125sm464809pfc.40.2016.08.31.08.06.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Aug 2016 08:06:27 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 13/13] Remove arm_override_mode Date: Wed, 31 Aug 2016 15:06:00 -0000 Message-Id: <1472655965-12212-14-git-send-email-yao.qi@linaro.org> In-Reply-To: <1472655965-12212-1-git-send-email-yao.qi@linaro.org> References: <1472655965-12212-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00320.txt.bz2 GDB can determine the kind of single step breakpoint by gdbarch breakpoint_kind_from_current_state, so global variable arm_override_mode is no longer needed. This patch removes it. gdb: 2016-08-30 Yao Qi * arm-tdep.c (arm_override_mode): Remove. (arm_pc_is_thumb): Update. (arm_insert_single_step_breakpoint): Update. --- gdb/arm-tdep.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 37b68ed..3e5a775 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -143,13 +143,6 @@ static const char *const arm_mode_strings[] = static const char *arm_fallback_mode_string = "auto"; static const char *arm_force_mode_string = "auto"; -/* Internal override of the execution mode. -1 means no override, - 0 means override to ARM mode, 1 means override to Thumb mode. - The effect is the same as if arm_force_mode has been set by the - user (except the internal override has precedence over a user's - arm_force_mode override). */ -static int arm_override_mode = -1; - /* Number of different reg name sets (options). */ static int num_disassembly_options; @@ -422,10 +415,6 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr) if (IS_THUMB_ADDR (memaddr)) return 1; - /* Respect internal mode override if active. */ - if (arm_override_mode != -1) - return arm_override_mode; - /* If the user wants to override the symbol table, let him. */ if (strcmp (arm_force_mode_string, "arm") == 0) return 0; @@ -4204,15 +4193,9 @@ arm_insert_single_step_breakpoint (struct gdbarch *gdbarch, struct address_space *aspace, CORE_ADDR pc) { - struct cleanup *old_chain - = make_cleanup_restore_integer (&arm_override_mode); - - arm_override_mode = IS_THUMB_ADDR (pc); pc = gdbarch_addr_bits_remove (gdbarch, pc); insert_single_step_breakpoint (gdbarch, aspace, pc); - - do_cleanups (old_chain); } /* Given BUF, which is OLD_LEN bytes ending at ENDADDR, expand -- 1.9.1