From patchwork Thu Dec 18 09:37:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 4338 Received: (qmail 18495 invoked by alias); 18 Dec 2014 09:38:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 18481 invoked by uid 89); 18 Dec 2014 09:38:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pa0-f50.google.com Received: from mail-pa0-f50.google.com (HELO mail-pa0-f50.google.com) (209.85.220.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 18 Dec 2014 09:38:43 +0000 Received: by mail-pa0-f50.google.com with SMTP id bj1so1061568pad.37 for ; Thu, 18 Dec 2014 01:38:42 -0800 (PST) X-Received: by 10.68.97.225 with SMTP id ed1mr1606029pbb.153.1418895521856; Thu, 18 Dec 2014 01:38:41 -0800 (PST) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by mx.google.com with ESMTPSA id o10sm6156243pdr.96.2014.12.18.01.38.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Dec 2014 01:38:40 -0800 (PST) From: Doug Evans To: gdb-patches@sourceware.org Subject: [COMMITTED PATCH] infcmd.c (jump_command): Minor simplification. Date: Thu, 18 Dec 2014 01:37:49 -0800 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi. A minor simplification, that stands by itself, but is also preparatory work for looking up primitive types as symbols. https://sourceware.org/ml/gdb-patches/2014-12/msg00169.html 2014-12-18 Doug Evans * infcmd.c (jump_command): Minor simplification. diff --git a/gdb/infcmd.c b/gdb/infcmd.c index de0d24d..9d0a527 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1199,9 +1199,12 @@ jump_command (char *arg, int from_tty) if (sfn != NULL) { + struct obj_section *section; + fixup_symbol_section (sfn, 0); - if (section_is_overlay (SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (sfn), sfn)) && - !section_is_mapped (SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (sfn), sfn))) + section = SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (sfn), sfn); + if (section_is_overlay (section) + && !section_is_mapped (section)) { if (!query (_("WARNING!!! Destination is in " "unmapped overlay! Jump anyway? ")))