From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lndn.lancelotsix.com (vps-42846194.vps.ovh.net [IPv6:2001:41d0:801:2000::2400]) by sourceware.org (Postfix) with ESMTPS id D5C773832354 for ; Wed, 14 Dec 2022 10:05:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D5C773832354 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=lancelotsix.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lancelotsix.com Received: from ubuntu.lan (cust120-dsl54.idnet.net [212.69.54.120]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 1D5BC80018; Wed, 14 Dec 2022 10:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lancelotsix.com; s=2021; t=1671012304; bh=JYztoIqXdg8X7J9lEF7iRNxNDGKbGYoFcoXb3tRm3GI=; h=Date:From:To:Subject:References:In-Reply-To:From; b=lQOVhIobeiqWhTOXdoYS5d3evu+ups7u4o8dJDh1+5NWpdfv6jUIadSU2bbSpPuHu v08S2zJlyu+eSSZ7oaz9N1eYvcebcfpMjshQfIdF7qVl2coAEB6g5UNZUOZceBo+nj sE4dkqBzBcZpe7Jk2iecar0iIa+5Ho+xzLzaFcsGOLQ6qs0w9tai/XYuPggqWZg7D8 u4CYHyTR5YuF8ohV79j11mtTFZoAX4IIZ4XJYvoQo+53/km2pE8mWDcgP6mgDsnpgU LxcHBpU4g7/+fwDe8SYO7M/me+dgg5YsbPb32tZtVf+lCiocbb1w8KQomVMN0OcOrH aPM+wfo2MtqFg== Date: Wed, 14 Dec 2022 10:04:27 +0000 From: Lancelot SIX To: Bruno Larsen , gdb-patches@sourceware.org Subject: Re: [PATCH v2] gdb: add 'maintenance print record-instruction' command Message-ID: <20221214100427.wubrugmrrjud4zqm@ubuntu.lan> References: <20221212104417.136536-1-blarsen@redhat.com> <20221214004529.3hgz2yuhv6rx2r4c@ubuntu.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221214004529.3hgz2yuhv6rx2r4c@ubuntu.lan> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Wed, 14 Dec 2022 10:05:04 +0000 (UTC) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > struct value_print_options opts; > get_user_print_options (&opts); > auto mark = value_mark (); Hi, I forgot about scoped_value_mark which is probably much better than manually doing the value_mark () ; value_free_to_mark () dance. Lancelot. > type *regtype = gdbarch_register_type (target_gdbarch (), > to_print->u.reg.num); > value *val > = value_from_contents (regtype, record_full_get_loc (to_print)); > > gdb_printf ("Register %s changed: %s\n", > gdbarch_register_name (target_gdbarch (), > to_print->u.reg.num)); > value_print (val, gdb_stdout, &opts); > gdb_printf ("\n"); > value_free_to_mark (mark);