From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 188F13959C5F; Mon, 3 Jun 2024 20:29:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 188F13959C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1717446570; bh=UWyE5t4Pctcr4lxYwhvdd/Dgmp2eM7FhCTw2hSBUNf8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=poUJkGxzSxdo02jiTQHPWq45oGvtvFI8Icex+HXVNcCPCtun7WTMjhaaqJZHKUyN2 fLsgWJM7xxdnuMnkCNEEBElThHTs7VFwkvoq6O/ojd1FW3syMMCi4bJi4lJTCm9V6Q zUdh3tz3KA6FbsRHFw/KYy/JNNsCKN30nMdVLURw= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/31705] gdb.base/watchpoint-running.exp fails on arm Date: Mon, 03 Jun 2024 20:29:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31705 --- Comment #14 from Tom de Vries --- Copied this approach from aarch64-linux-nat.c: ... diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index 50c24ecfcd2..f24e3b45ffb 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -92,6 +92,12 @@ class arm_linux_nat_target final : public linux_nat_targ= et bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override; + /* Override the GNU/Linux inferior startup hook. */ + void post_startup_inferior (ptid_t) override; + + /* Override the GNU/Linux post attach hook. */ + void post_attach (int pid) override; + const struct target_desc *read_description () override; /* Override linux_nat_target low methods. */ @@ -108,6 +114,8 @@ class arm_linux_nat_target final : public linux_nat_tar= get static arm_linux_nat_target the_arm_linux_nat_target; +static const struct arm_linux_hwbp_cap *arm_linux_get_hwbp_cap (void); + /* Get the whole floating point state of the process and store it into regcache. */ @@ -527,6 +535,24 @@ ps_get_thread_area (struct ps_prochandle *ph, return PS_OK; } +/* Implement the virtual inf_ptrace_target::post_startup_inferior method. = */ + +void +arm_linux_nat_target::post_startup_inferior (ptid_t ptid) +{ + arm_linux_get_hwbp_cap (); + linux_nat_target::post_startup_inferior (ptid); +} + +/* Implement the "post_attach" target_ops method. */ + +void +arm_linux_nat_target::post_attach (int pid) +{ + arm_linux_get_hwbp_cap (); + linux_nat_target::post_attach (pid); +} + const struct target_desc * arm_linux_nat_target::read_description () { ... --=20 You are receiving this mail because: You are on the CC list for the bug.=