From patchwork Wed Jun 3 17:29:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Turney X-Patchwork-Id: 7031 Received: (qmail 72504 invoked by alias); 3 Jun 2015 17:30:43 -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 72437 invoked by uid 89); 3 Jun 2015 17:30:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 X-HELO: rgout0501.bt.lon5.cpcloud.co.uk Received: from rgout0501.bt.lon5.cpcloud.co.uk (HELO rgout0501.bt.lon5.cpcloud.co.uk) (65.20.0.222) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Jun 2015 17:30:41 +0000 X-OWM-Source-IP: 31.51.205.195(GB) X-OWM-Env-Sender: jonturney@btinternet.com X-CTCH-RefID: str=0001.0A090201.556F39C0.00DF, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-Junkmail-Premium-Raw: score=27/50, refid=2.7.2:2015.6.2.130915:17:27.888, ip=31.51.205.195, rules=__HAS_FROM, __TO_MALFORMED_2, __TO_NO_NAME, __HAS_MSGID, __SANE_MSGID, __HAS_X_MAILER, __IN_REP_TO, __REFERENCES, __ANY_URI, URI_ENDS_IN_HTML, __URI_NO_WWW, __URI_NO_PATH, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_2000_2999, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, __URI_NS, SXL_IP_DYNAMIC[195.205.51.31.fur], HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_7000_LESS, REFERENCES X-CTCH-Spam: Unknown Received: from localhost.localdomain (31.51.205.195) by rgout05.bt.lon5.cpcloud.co.uk (8.6.122.06) (authenticated as jonturney@btinternet.com) id 556DA854008F28B5; Wed, 3 Jun 2015 18:30:33 +0100 From: Jon Turney To: gdb-patches@sourceware.org Cc: Jon Turney Subject: [PATCH 2/4] windows-nat: Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__ Date: Wed, 3 Jun 2015 18:29:50 +0100 Message-Id: <1433352592-9728-4-git-send-email-jon.turney@dronecode.org.uk> In-Reply-To: <1433352592-9728-1-git-send-email-jon.turney@dronecode.org.uk> References: <1433352592-9728-1-git-send-email-jon.turney@dronecode.org.uk> Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__ __COPY_CONTEXT_SIZE was added to Cygwin's headers in 2006. Versions of Cygwin which don't define __COPY_CONTEXT_SIZE are long obsolete. Also see the thread starting at https://sourceware.org/ml/gdb-patches/2015-03/msg00989.html for some discussion Note that __COPY_CONTEXT_SIZE should just be sizeof(CONTEXT) (which is a platform constant), but isn't due to historical mistakes in Cygwin headers. gdb/ChangeLog: 2015-06-03 Jon Turney * windows-nat.c (do_windows_fetch_inferior_registers) (handle_output_debug_string): Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__. Signed-off-by: Jon Turney --- gdb/ChangeLog | 6 ++++++ gdb/windows-nat.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ee9f1df..d170f7c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2015-06-03 Jon Turney + * windows-nat.c (do_windows_fetch_inferior_registers) + (handle_output_debug_string): Replace __COPY_CONTEXT_SIZE + conditional with __CYGWIN__. + +2015-06-03 Jon Turney + * windows-nat.c (handle_output_debug_string): Trim trailing '\n' from OutputDebugString. diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index b56b916..9d2e3c2 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -432,7 +432,7 @@ do_windows_fetch_inferior_registers (struct regcache *regcache, int r) if (current_thread->reload_context) { -#ifdef __COPY_CONTEXT_SIZE +#ifdef __CYGWIN__ if (have_saved_context) { /* Lie about where the program actually is stopped since @@ -825,7 +825,7 @@ handle_output_debug_string (struct target_waitstatus *ourstatus) warning (("%s"), s); } } -#ifdef __COPY_CONTEXT_SIZE +#ifdef __CYGWIN__ else { /* Got a cygwin signal marker. A cygwin signal is followed by