From patchwork Fri Oct 23 17:02:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 9344 Received: (qmail 67673 invoked by alias); 23 Oct 2015 17:02:35 -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 67565 invoked by uid 89); 23 Oct 2015 17:02:35 -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, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f74.google.com Received: from mail-oi0-f74.google.com (HELO mail-oi0-f74.google.com) (209.85.218.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 23 Oct 2015 17:02:32 +0000 Received: by oifu63 with SMTP id u63so3419729oif.1 for ; Fri, 23 Oct 2015 10:02:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:message-id:date:subject:from:to :content-type; bh=x5aCO1YqP/7JpYNhyNwu6HRAFN0/URKkoyFwPadtvng=; b=EZ4N7Cw441rDmPFj7367lGy7XH8TQp1k/9jYg9tjJprpUO8UcStNG9oq2h6h3iHrdN Cw3i116HD+hmL8VpJ6ZS2myPbeBG74lrIttKyUpQnHSq1+ogI7nm/8krHDmZ13eqBRIa Y1oL1Stp1ocvTPVqrExTUZPVsT55cOOPOZBWB+2All0Prl55A0qEagVD+2zPhM9ow/VS 9BTIuosXvN0x/HX5PNJ/FNKMIu8uP6hJvAtl6x6zYiah5um/e+KYC1DAaEnHw/A587a6 Dlz4GQTW5lmSPjgulS7lIBEsKCviV/WzEx+SfDr8SUmGso5LOrNbwN7QrB+2muh2cZ7I txjw== X-Gm-Message-State: ALoCoQlnzjMmA34hk+Jnsck+AQF7cyTxgKSDtJlr1A3BIMQed9yF+Os74hMQ3ZOfgk/8ZYsyk4sDq3CUaI4H25n/KUe7jdooBSdzdT+jtXhmnx63KgZkKLuGOWqCXglYCH2+P1dE3RZTRN3U5mFXbkaJ7tni8wmOntlD8zYy3x1r72wYYJH7qiw= MIME-Version: 1.0 X-Received: by 10.50.134.199 with SMTP id pm7mr4318511igb.0.1445619750430; Fri, 23 Oct 2015 10:02:30 -0700 (PDT) Message-ID: <047d7b2e15d1b4d8a50522c8934a@google.com> Date: Fri, 23 Oct 2015 17:02:30 +0000 Subject: [PATCH 2/3, not 2/4] musl: Move W_STOPCODE to common/gdb_wait.h. From: Doug Evans To: gdb-patches@sourceware.org X-IsSubscribed: yes Hi. Sorry, I miscounted, the patch series as 3 patches, not 4 as mentioned here: https://sourceware.org/ml/gdb-patches/2015-10/msg00495.html 2015-10-23 Doug Evans * common/gdb_wait.h (W_STOPCODE): Define, moved here from gdbserver/linux-low.c. (WSETSTOP): Simplify. * gdbserver/linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h. diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h index 9b250d2..412f813 100644 --- a/gdb/common/gdb_wait.h +++ b/gdb/common/gdb_wait.h @@ -85,12 +85,12 @@ # endif #endif +#ifndef W_STOPCODE +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#endif + #ifndef WSETSTOP -# ifdef W_STOPCODE #define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig)) -# else -#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8))) -# endif #endif /* For native GNU/Linux we may use waitpid and the __WCLONE option. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index ac8fae3..7482a2b 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -70,10 +70,6 @@ #define O_LARGEFILE 0 #endif -#ifndef W_STOPCODE -#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#endif - /* This is the kernel's hard limit. Not to be confused with SIGRTMIN. */ #ifndef __SIGRTMIN