From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 28B7B3858D38; Tue, 20 Feb 2024 14:37:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28B7B3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708439827; bh=BIs4jnzGWqzWMMrUpBwX6R0TaPvVLdf9XfWrCLrr5Nw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fsQKlhmM8Z6on+cm/DnjUA0I08W5rK/KjjFpnzMe7ivc5OsaZWWm8Adjk1wAKQJ0X grWaqQXG2QosVNbld0Fp/fVyCA5TPEyiqRtZ3U6C2DQmAuOwzsOGCemEJmx4nBuacd ww/L1VV+R0hfQxZKJYi0a+lyzqpE7S3LdXNv4/1A= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug rust/31401] Error when placing watchpoint rust debug build Date: Tue, 20 Feb 2024 14:37:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: rust X-Bugzilla-Version: 15.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution cc 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=3D31401 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID CC| |tromey at sourceware dot o= rg --- Comment #1 from Tom Tromey --- Hi. Thanks for the bug report. (gdb) watch *0x123456789 Attempt to take contents of a non-pointer value. Here you're attempting to dereference just some random int. gdb used to allow this in the old days (maybe it still does in C mode, not sure). However you really need a typed pointer here. Or you can just watch an expression -- best is with "-location", like: (gdb) watch -location a (gdb) watch *(char*)0x123456789 unexpected token This one is C syntax, not Rust. (gdb) watch "0x7fffffffd214" Watchpoint 2: "0x7fffffffd214" This one watches that particular string, which is not really what you want. Perhaps this should be an error, except strings are coerced to memory and so gdb thinks this might actually change at some point. > Both of the examples above work normally in the release build. This probably works because gdb doesn't see any Rust debug info and so defaults to the "minimal" language, which is basically the same as C. Anyway I don't think there's a bug here. I'm going to close this report. --=20 You are receiving this mail because: You are on the CC list for the bug.=