From patchwork Tue Oct 29 17:57:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 35429 Received: (qmail 53431 invoked by alias); 29 Oct 2019 17:58: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 50346 invoked by uid 89); 29 Oct 2019 17:58:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=5007 X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Oct 2019 17:58:18 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 2D24C21325; Tue, 29 Oct 2019 13:58:14 -0400 (EDT) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id E44D820D4D for ; Tue, 29 Oct 2019 13:57:56 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id D66BD2A7D9 for ; Tue, 29 Oct 2019 13:57:56 -0400 (EDT) X-Gerrit-PatchSet: 1 Date: Tue, 29 Oct 2019 13:57:56 -0400 From: "Tom Tromey (Code Review)" To: gdb-patches@sourceware.org Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] Introduce win32_target_ops::decr_pc_after_break X-Gerrit-Change-Id: I2f412d4f597406d9045bcf5a18a205c6d8974db2 X-Gerrit-Change-Number: 431 X-Gerrit-ChangeURL: X-Gerrit-Commit: 766c63529c62660d53d21b099996c4d3d834ee92 References: Reply-To: tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-74-g460fb0f7e9 Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/431 ...................................................................... Introduce win32_target_ops::decr_pc_after_break This adds a decr_pc_after_break member to win32_target_ops and updates the two Windows targets to set it. Note that I can't test the win32-arm-low.c change. Change-Id: Ie0092b0cecb913e80d05e4e3e72fe800e090305e gdb/gdbserver/ChangeLog 2019-10-29 Tom Tromey * win32-low.h (struct win32_target_ops) : New field. * win32-i386-low.c (the_low_target): Update. * win32-arm-low.c (the_low_target): Update. Change-Id: I2f412d4f597406d9045bcf5a18a205c6d8974db2 --- M gdb/gdbserver/ChangeLog M gdb/gdbserver/win32-arm-low.c M gdb/gdbserver/win32-i386-low.c M gdb/gdbserver/win32-low.h 4 files changed, 13 insertions(+), 0 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index fb2fbef..a6896d6 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,12 @@ 2019-10-29 Tom Tromey + * win32-low.h (struct win32_target_ops) : New + field. + * win32-i386-low.c (the_low_target): Update. + * win32-arm-low.c (the_low_target): Update. + +2019-10-29 Tom Tromey + * win32-low.c (win32_read_pc, win32_write_pc): New functions. (win32_target_ops): Update. * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New diff --git a/gdb/gdbserver/win32-arm-low.c b/gdb/gdbserver/win32-arm-low.c index f2052c6..ee1e7f5 100644 --- a/gdb/gdbserver/win32-arm-low.c +++ b/gdb/gdbserver/win32-arm-low.c @@ -142,6 +142,7 @@ NULL, /* single_step */ (const unsigned char *) &arm_wince_breakpoint, arm_wince_breakpoint_len, + 0, arm_win32_get_pc, arm_win32_set_pc, /* Watchpoint related functions. See target.h for comments. */ diff --git a/gdb/gdbserver/win32-i386-low.c b/gdb/gdbserver/win32-i386-low.c index 421f969..b5766b7 100644 --- a/gdb/gdbserver/win32-i386-low.c +++ b/gdb/gdbserver/win32-i386-low.c @@ -500,6 +500,7 @@ i386_single_step, &i386_win32_breakpoint, i386_win32_breakpoint_len, + 1, i386_win32_get_pc, i386_win32_set_pc, i386_supports_z_point_type, diff --git a/gdb/gdbserver/win32-low.h b/gdb/gdbserver/win32-low.h index 73ceb4b..3ada7c8 100644 --- a/gdb/gdbserver/win32-low.h +++ b/gdb/gdbserver/win32-low.h @@ -63,6 +63,10 @@ const unsigned char *breakpoint; int breakpoint_len; + /* Amount by which to decrement the PC after a breakpoint is + hit. */ + int decr_pc_after_break; + /* Get the PC register from REGCACHE. */ CORE_ADDR (*get_pc) (struct regcache *regcache); /* Set the PC register in REGCACHE. */