From patchwork Thu Jul 31 19:10:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 2260 Received: (qmail 21923 invoked by alias); 31 Jul 2014 19:10:27 -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 21842 invoked by uid 89); 31 Jul 2014 19:10:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f73.google.com Received: from mail-oi0-f73.google.com (HELO mail-oi0-f73.google.com) (209.85.218.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 31 Jul 2014 19:10:25 +0000 Received: by mail-oi0-f73.google.com with SMTP id u20so902960oif.2 for ; Thu, 31 Jul 2014 12:10:22 -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:mime-version :content-type; bh=1Aot/1OzitkqOUvYL/leYqpN9laRmWdVwqpHZFVyskE=; b=hRRbznCFwNAfCFOpx0/KItN/cD+/pfAHR6ru01BG2lb03POdg2Aig40nSMZNM1mh02 /2YJJjaly8tYdQIRSzCJUzU5ehMTvpJBmP5hd7kQ6+l36ghpmr318Rnb1MP/7V9U4x9D NcyMWyDkAZ4uXaH4XcS8h+UC3q2+2+bEakyETnBeMnz9ulJu7mo2XqHyUJhLYo3EnL6z 4Zc05Omvulegr/TqFTNuY2SIdfQEN4WA+LzgnLEN+N3i9JsTrvU7KxWL0pxPPSzXznPQ Jpmp7dwInaR5KffB1V41x7qpNG4y0Ry2ye0wuAgPd3hU8COr+hIDv91L8vmj9phzJzrM MI3A== X-Gm-Message-State: ALoCoQnj5I6FXKYDWcJcmI7bu7tROZjFtrTPLejWJ3cCTGQLZxY5VFcugLm75sal83gTQtL6rF+0 X-Received: by 10.182.230.133 with SMTP id sy5mr101902obc.22.1406833822172; Thu, 31 Jul 2014 12:10:22 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id v20si400743yhe.2.2014.07.31.12.10.22 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 Jul 2014 12:10:22 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 8F54F5A457C; Thu, 31 Jul 2014 12:10:21 -0700 (PDT) From: Doug Evans To: gdb-patches@sourceware.org, jan.kratochvil@redhat.com Subject: [PATCH] Delete struct inferior_suspend_state Date: Thu, 31 Jul 2014 12:10:21 -0700 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi. I happened across some #if 0's in the code and thought that odd. I found the relevant thread here: https://sourceware.org/ml/gdb-patches/2012-06/msg00370.html Any desire to continue to keep this, or can we delete it? [I don't have a strong preference, but it feels like it's time.] 2014-07-31 Doug Evans * inferior.h (struct inferior_suspend_state): Delete, unused. All references deleted. diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index 522b674..623977b 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -129,9 +129,7 @@ struct thread_control_state struct interp *command_interp; }; -/* Inferior thread specific part of `struct infcall_suspend_state'. - - Inferior process counterpart is `struct inferior_suspend_state'. */ +/* Inferior thread specific part of `struct infcall_suspend_state'. */ struct thread_suspend_state { diff --git a/gdb/inferior.h b/gdb/inferior.h index 668c888..3929d16 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -272,16 +272,6 @@ struct inferior_control_state enum stop_kind stop_soon; }; -/* Inferior process specific part of `struct infcall_suspend_state'. - - Inferior thread counterpart is `struct thread_suspend_state'. */ - -#if 0 /* Currently unused and empty structures are not valid C. */ -struct inferior_suspend_state -{ -}; -#endif - /* GDB represents the state of each program execution with an object called an inferior. An inferior typically corresponds to a process but is more general and applies also to targets that do not have a @@ -310,12 +300,6 @@ struct inferior See `struct inferior_control_state'. */ struct inferior_control_state control; - /* State of inferior process to restore after GDB is done with an inferior - call. See `struct inferior_suspend_state'. */ -#if 0 /* Currently unused and empty structures are not valid C. */ - struct inferior_suspend_state suspend; -#endif - /* True if this was an auto-created inferior, e.g. created from following a fork; false, if this inferior was manually added by the user, and we should not attempt to prune it diff --git a/gdb/infrun.c b/gdb/infrun.c index 33aa674..08b5556 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -6819,9 +6819,6 @@ siginfo_make_value (struct gdbarch *gdbarch, struct internalvar *var, struct infcall_suspend_state { struct thread_suspend_state thread_suspend; -#if 0 /* Currently unused and empty structures are not valid C. */ - struct inferior_suspend_state inferior_suspend; -#endif /* Other fields: */ CORE_ADDR stop_pc; @@ -6841,9 +6838,6 @@ save_infcall_suspend_state (void) { struct infcall_suspend_state *inf_state; struct thread_info *tp = inferior_thread (); -#if 0 - struct inferior *inf = current_inferior (); -#endif struct regcache *regcache = get_current_regcache (); struct gdbarch *gdbarch = get_regcache_arch (regcache); gdb_byte *siginfo_data = NULL; @@ -6877,9 +6871,6 @@ save_infcall_suspend_state (void) } inf_state->thread_suspend = tp->suspend; -#if 0 /* Currently unused and empty structures are not valid C. */ - inf_state->inferior_suspend = inf->suspend; -#endif /* run_inferior_call will not use the signal due to its `proceed' call with GDB_SIGNAL_0 anyway. */ @@ -6898,16 +6889,10 @@ void restore_infcall_suspend_state (struct infcall_suspend_state *inf_state) { struct thread_info *tp = inferior_thread (); -#if 0 - struct inferior *inf = current_inferior (); -#endif struct regcache *regcache = get_current_regcache (); struct gdbarch *gdbarch = get_regcache_arch (regcache); tp->suspend = inf_state->thread_suspend; -#if 0 /* Currently unused and empty structures are not valid C. */ - inf->suspend = inf_state->inferior_suspend; -#endif stop_pc = inf_state->stop_pc;