From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id v739LPIb42kyLyQAWB0awg (envelope-from ) for ; Sat, 18 Apr 2026 01:51:46 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=QAG42zTz; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 98D441E093; Sat, 18 Apr 2026 01:51:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 B86991E093 for ; Sat, 18 Apr 2026 01:51:45 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 191064D108D0 for ; Sat, 18 Apr 2026 05:51:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 191064D108D0 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=QAG42zTz Received: from mail-dy1-x132e.google.com (mail-dy1-x132e.google.com [IPv6:2607:f8b0:4864:20::132e]) by sourceware.org (Postfix) with ESMTPS id F36474AA51FE for ; Sat, 18 Apr 2026 05:51:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F36474AA51FE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F36474AA51FE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::132e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776491481; cv=none; b=XS6F3rRKTghpiOAE6MT/uL0NmJFuGE84OyWtLwTWts9VxIhinx6LyiMTl2A9j86WGF1oPkQM7mCY4KHMzvickd1yNtecbGhmolINr39VQiFT5EM7fsQ//N5r1zX5TSsQsJ9gDc6iiPKGA9kPaizk/tA/G7GQ+5X0spfi1m+JJ6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776491481; c=relaxed/simple; bh=gAwdtQI4eJlBZdsKDjE3e1gCzzV8Xpvqot1wB2FkafQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RDtvQtmY4b0KwGDfZos4Knd6otUAEv+AO92xb/8LmMCoaHSTAXkWgb6mG/a2iXWNbV2/c1WlSUXxvjxCD4MKJqwxwgwWrrv+DvWhdeL3hto887FB1fI6aYJsNgq6SU6FrvzSowD1nQaC0YCkHm1akwafaomqIjFXHimPaIav5Z8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F36474AA51FE Received: by mail-dy1-x132e.google.com with SMTP id 5a478bee46e88-2dee127b3c5so866432eec.1 for ; Fri, 17 Apr 2026 22:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776491480; x=1777096280; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=nIgc1zeCAXuSm7YZybIM2ZIcRLxaGl2zfv8Go+W7hho=; b=QAG42zTzn8h2KvJcmQdxDL9rNcgYqVHowkZtqSkuJjDrfJ5/n8y32zeBUmL7h5WpEJ q+Co1Bx/hfEgN9GjKdrc4DF0Uve0SG+PyhGYiXLnOHZMqMsuhoD43KxkwhmVhC+ByKGX 3xCRBuSsZ0qKQVE9EqzTviFYc2+L35GfB5HQDFeunrIrCioaEx7mWp3y0Syd9IlAS4W9 e76V3DInsAn5cRfdMB0q455dprE6UH5bU123CBu5IjTLfxsF2HvCRgIJ85B3VTEiO7H5 Sz51LYR9nqrQYmRAryUH9L7vdrXTTYcFjKc4X7q0hLXPv0SsGP470wXjj4oL6Wik/Zlj vWlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776491480; x=1777096280; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=nIgc1zeCAXuSm7YZybIM2ZIcRLxaGl2zfv8Go+W7hho=; b=NI7/0woS6XB1wMJNw5VCW7ueMx+s9t/cVmkuWZ3XL8Zblv5JZB6/wKmSsGWE18PBM2 3n3eIATow4wGYYAEhc6xHLKujmLeM8/2voXHvCUk50D4JzMCnYMqvkQ3VsDmRZORP6z8 nAER21i8r0kI5/tTg+Io6/HjBDDjV61XmDJ4yLVR8GLeAxON5dJxNTTPKFUICSPN8Rr1 5RPMtmqtZvY0mYfhK3YKCC/OhQWAEni6v4lo7kiZfsiQtDCAvtt02IZv9YIyT/xRmOcR h30xAtqdcXcLxqyHuFeXRD7AJ4ForGzMlAF4b++HCqE7s5P/VvGs0gLn08kYAfmRGiiT 8lfA== X-Gm-Message-State: AOJu0YzvQtHCub+ogo4PQ0yCl12UvRagJ1hHyUidEJcpAesm2FmyhNd8 fUcxv44Fipop4kkNdJoLrSRrizxcCr9whEMmt7tXlrtVXTOW9cqSIn+BxBRz6QEx8UkGcWxP7AY 8Nlle X-Gm-Gg: AeBDiestrYpXRufojFZyUB+GUVT+Y87BvmrH/0DfCyTmaS++XFQNf+eAES8/bfB/n9s oLYKpuJ+2h5lCsKTpwoFbY8g+IbUBBregjA4bqNpowD4MPhbH2l9nJsU2w9u4TxeeDSlg9WOvEn 3ENvzaGB5JUdna7oZk2u6QpMAI3vxSdw2N0NM8qgfg1gRElpIAXweaQYRXt6QKoJPEddTVH7j77 iVYI8KCKnzb85EfaGRtpUNVjXaVh/dWM6se7N+mZ0lLkFK0qbk158h0ZqWMdX2DmBy/XycqQMP9 6knFShUOPdNoKD7RXF+IyXluKvI38wqulfUKq/pLmU9XtjaYAc5ZGDXLqiiSk4bn3toe0PYOows i/h9gYGR+fz+1YwQS4fm4IEhlTDOOOIaJpXWgF9tvm7tb06beQahOO8cbos65+sQv3M96CLSinw Sktz3mEJlTmHKFa6yhoIae8M4bhLoMSQ4HEoWyPkBI/ryB X-Received: by 2002:a05:7300:8607:b0:2c0:c5e4:605f with SMTP id 5a478bee46e88-2e478c20545mr3137465eec.24.1776491479834; Fri, 17 Apr 2026 22:51:19 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2e53a4a8bd2sm5162267eec.11.2026.04.17.22.51.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2026 22:51:19 -0700 (PDT) From: Thiago Jung Bauermann To: Guinevere Larsen Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 6/6] gdb/record: Define new version of the record-save section In-Reply-To: <20260415185836.2732968-7-guinevere@redhat.com> (Guinevere Larsen's message of "Wed, 15 Apr 2026 15:58:36 -0300") References: <20260415185836.2732968-1-guinevere@redhat.com> <20260415185836.2732968-7-guinevere@redhat.com> User-Agent: mu4e 1.14.0; emacs 30.2 Date: Sat, 18 Apr 2026 02:51:17 -0300 Message-ID: <87v7do95pm.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Guinevere Larsen writes: > With the changes to the internal representation of the history, we can > no longer support the previous record save format. This commit makes it > official, documenting the new format and changing the magic number. > --- > gdb/NEWS | 3 +++ > gdb/record-full.c | 35 +++++++++++++++++++++++++++++++---- > 2 files changed, 34 insertions(+), 4 deletions(-) Assuming that the order switch between number of effect entries and signal I mention below is fixed (or I misunderstood it): Reviewed-by: Thiago Jung Bauermann > diff --git a/gdb/record-full.c b/gdb/record-full.c > index 297b5b76ae7..f7cfe5ca1e9 100644 > --- a/gdb/record-full.c > +++ b/gdb/record-full.c > @@ -76,7 +76,8 @@ > ( (record_full_next_insn != record_full_list.size ()) \ > || ::execution_direction == EXEC_REVERSE) > > -#define RECORD_FULL_FILE_MAGIC netorder32(0x20091016) > +#define RECORD_FULL_FILE_MAGIC_OLD netorder32(0x20091016) > +#define RECORD_FULL_FILE_MAGIC netorder32(0x20260415) Out of curiosity: how was the magic number chosen? It doesn't seem to based on ASCII. Is it worth adding a comment to explain it? > /* These are the core structs of the process record functionality. > > @@ -2161,6 +2162,27 @@ record_full_core_target::has_execution (inferior *inf) > 8 bytes: memory address (network byte order). > n bytes: memory value (n == memory length). > > + Version 3 (all numbers are in network order). > + 4 bytes: Magic number (0x20260415). > + NOTE: be sure to change whenever this file format changes! > + > + Records: > + record_full_instruction: > + 4 bytes: number of reg and mem entries for this instruction. > + 1 byte: signal. Looking at the code in record_full_restore, signal comes before the number of effect entries. > + 4 bytes: instruction count. Maybe it's just me or I'm a bit tired, but "instruction sequence number" sounds clearer to me than "instruction count". > + 4 bytes: PC register ID. Considering that we know that it will be the PC in this "register slot", it's slightly wasteful to include the register ID here. But I suppose it's not a problem in practice. > + N bytes: PC address of instruction (N == size of PC). > + Effects: > + record_full_reg: > + 1 byte: record_type (record_full_reg, see enum record_full_type). > + 4 bytes: Register ID. > + n bytes: register value (n == actual register size). > + record_full_mem: > + 1 byte: record_type (record_full_mem, see enum record_full_type). > + 4 bytes: memory length. > + 8 bytes: memory address. > + n bytes: memory value (n = memory length). > */ > > /* bfdcore_read -- read bytes from a core file section. */ -- Thiago