From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTP id D66973AAA0A5 for ; Fri, 13 Mar 2020 19:09:05 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id CFF63561B7; Fri, 13 Mar 2020 15:09:05 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bnDSj-+RrROz; Fri, 13 Mar 2020 15:09:05 -0400 (EDT) Received: from murgatroyd.Home (184-96-250-69.hlrn.qwest.net [184.96.250.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 8DC11561B4; Fri, 13 Mar 2020 15:09:05 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v3 27/29] Introduce win32_target_ops::decr_pc_after_break Date: Fri, 13 Mar 2020 13:08:53 -0600 Message-Id: <20200313190855.28662-28-tromey@adacore.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200313190855.28662-1-tromey@adacore.com> References: <20200313190855.28662-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-25.0 required=5.0 tests=GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 19:09:06 -0000 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. gdbserver/ChangeLog 2020-03-13 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. --- gdbserver/ChangeLog | 7 +++++++ gdbserver/win32-arm-low.cc | 1 + gdbserver/win32-i386-low.cc | 1 + gdbserver/win32-low.h | 4 ++++ 4 files changed, 13 insertions(+) diff --git a/gdbserver/win32-arm-low.cc b/gdbserver/win32-arm-low.cc index 77200112df1..238ee4b05be 100644 --- a/gdbserver/win32-arm-low.cc +++ b/gdbserver/win32-arm-low.cc @@ -148,6 +148,7 @@ struct win32_target_ops the_low_target = { 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/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc index eac15b5694a..48893af33b2 100644 --- a/gdbserver/win32-i386-low.cc +++ b/gdbserver/win32-i386-low.cc @@ -506,6 +506,7 @@ struct win32_target_ops the_low_target = { 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/gdbserver/win32-low.h b/gdbserver/win32-low.h index 56ff8a9baf2..d2b39a46fd9 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -63,6 +63,10 @@ struct win32_target_ops 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. */ -- 2.21.1