From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IhekBSRP9mSWFREAWB0awg (envelope-from ) for ; Mon, 04 Sep 2023 17:41:56 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=oLGzfs3U; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 09FC11E0C2; Mon, 4 Sep 2023 17:41:56 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 78B521E092 for ; Mon, 4 Sep 2023 17:41:53 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD20B3858C1F for ; Mon, 4 Sep 2023 21:41:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD20B3858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693863712; bh=qCCp5/qjrk+mKqz6tO583DhR1Hl++FU7xcVXnACobLA=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=oLGzfs3UWPopQkwf3Ik/kw5V/f6vmeYycPRWx1MLbID3AVAPI6uRGxbbT5Zc+cJBx yocsKuDJe/2ONWcbr1pYkMedvX5qZMmnl5309wcjc15kFfpunYwdIBdPNz1Y7dzW4N Cv3ClzOz8yluh3tFH85KRszbCoEdsMpTW1uJaFds= Received: from mail-4018.proton.ch (mail-4018.proton.ch [185.70.40.18]) by sourceware.org (Postfix) with ESMTPS id EC1B93858D32 for ; Mon, 4 Sep 2023 21:41:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC1B93858D32 Date: Mon, 04 Sep 2023 21:41:18 +0000 To: GDB mailing list Subject: MI and modifying register value Message-ID: <459b4b9d5f83a6b03b66486a45f5c4e4daa0b5e7.camel@vrany.io> Feedback-ID: 40767693:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jan Vrany via Gdb Reply-To: Jan Vrany Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Hi,=20 while investigating MI client issue when setting a register value from debugger I realized two things:=20 1) There's an MI command to set register value: -data-write-register-values This command is not documented and looking at the code, seems to be some= what half-implemented - does not use parameter its comment mentions = and only works for frame 0 (but using --frame 1 does not result in an error, it just silently changes value in frame 0).=20 Is this command some leftover that should not be used (but kept for some old clients)? Or is it something to fix?=20 2) Another way to change register value is CLI command `set r4 =3D 0x4`. Th= ere's no mechanism the MI client gets notified about the change - there's no = =3Dregister-changed async event.=C2=A0 Is this by purpose? I'd expect some kind of notification, just like ther= e's =3Dmemory-changed event. Also, in Python API, there's memory_ckanged event which get trigg= ered when using `set` to modify register.=20 Best, Jan =20