From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SZKYNVrqCWkNrR8AWB0awg (envelope-from ) for ; Tue, 04 Nov 2025 06:58:18 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Rf5C44Z/; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C7FDD1E057; Tue, 04 Nov 2025 06:58:18 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,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 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 3D1E01E057 for ; Tue, 04 Nov 2025 06:58:18 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CCF5B3857735 for ; Tue, 4 Nov 2025 11:58:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCF5B3857735 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Rf5C44Z/ Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 8B386385772E for ; Tue, 4 Nov 2025 11:53:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B386385772E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8B386385772E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762257227; cv=none; b=ZsN8p1Ub1pKcFUboK2XPuUPf4f57zhnSnrvwnYzp5TMQ9UJXm50EKZ+xSFREmG3quMZuH1Tgo5/kbG1MoFGSVC7iPGPnJFplOF/ncn/OZFY+R5sQmwS8h8bU6NFTv1LMJxhxxzSQ5DJE3qBoAVhg27/Q3L13wzAghsQM3F1t6Hs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762257227; c=relaxed/simple; bh=GRlEOmV7T2kNRydupCSjUuSVBbJNSUh7f1Xv+g+n+1E=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=SqC2bA/OGWfp8VoVYQPwpDo8YcSCLZ4X0NF3Okcq61oMk9J7bfWD9PscBHeGVRPCj1OGsE5/SFXz96LbB/QMx8BySfRpAe8XtPVDy4uM6eP/WdqiPSg8XaHb+iotusHQxQR9np7n53/3QJ0F7pbYf+mYeje3mUcWgAOC7bUti3Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B386385772E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762257227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oQ9zkCN77ejPCdIR8jGfB05m5MdiStB3USMzUGsNMEo=; b=Rf5C44Z/UeBuZmU8DYl+K35DHfGLdVlc5bcmYGNUeqhjv5iXYz1BZh2AJkvBLvzBQqba5w 3NfUV0uiY6hx85hGrSd/7ft9EQFb24povbSrDPS8vgB8bbvBzlFoNd0cY2c0adEJ/r6B8I IoL4dbeKNGdOsI45MeuJ6RPzG4OPpzw= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-271-VYYKQVzbMOuoqxXfFnxYIw-1; Tue, 04 Nov 2025 06:53:45 -0500 X-MC-Unique: VYYKQVzbMOuoqxXfFnxYIw-1 X-Mimecast-MFC-AGG-ID: VYYKQVzbMOuoqxXfFnxYIw_1762257224 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-3307af9b55eso4782806a91.2 for ; Tue, 04 Nov 2025 03:53:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762257224; x=1762862024; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oQ9zkCN77ejPCdIR8jGfB05m5MdiStB3USMzUGsNMEo=; b=tnKkU6O+5ZkwbGJAuV7KpuIzorKDbN6eGg0CjXmXGQKZWaE2egBGK3HwQ8vuTXldl/ iiranXVpUfAuBnhN4/9GESodZh9FV2kRQboafbTashW7mIbBWzyFR68w9NcPXDtMP9Gl Xba764vl7bGF5MmTgnX4uApqsy3ppHxF4VYA0bCCDZgAjnaSX95YiHLeoaKUz8zSmd4L uYN3aAILtE2C+GsP3mQWjwdxyfg4wKcKAc/5OmOW5NRTGgK+ggrFFPxZ3mk6CdOWfq7P QJ1tyaflf0ZPAwWLLPHpPVE99JpMALuPa+Wf5aIVsux+F+EGesgp1/tIfky1J1ghv07y FXYg== X-Gm-Message-State: AOJu0YwSiTWckSDt15PvMeDwgOoT0mg17AXtz3blj/wO/SsDEghJgJg7 7e/73bMLujEVhVeMYv5TgR3ZY1gt0WltmA7Jtq5Zsl4SsSFYuge4k3w6JCSJlpZsu0nkIYEw1XD 63DMrZytomZolGGALZ6oFyAjFe6K4IhE7HG6e9DD0g/oosI74Mj0lwP+gzRH6kmo= X-Gm-Gg: ASbGncuaDqjTbSt9EAeJZUmmZIw0BvnacV5Epa0zh6prqhzazcatGrIyDJritlKAiZz Fd96/S+eFf6yVCSqZTs9RxwNZdqetw7pnJhcfSoOaMzZjuGWQlo8DfH44oKXbSlf1EWo754VtjY P148RSgLvPMbZj3t5gd3gISklSPnYSHT8T4aGFcpOI3HW9xffCb71Oqj8YPEgB4cebDiKLUVzxr RmjikOFTVNG4nZRNfQdZlEH+IIzzKo+lUk8JgRmcPge35jYq7V8XkPSuPoHA6o7JgLsECZpkL10 1FhX8qlnEDKeW9I935MzvTAs/992Fp15NfUF6dg84D8VWQ3KAM29rbx/mxNvVSR1e62QeyxfSJc C9dEoCRMyXv4= X-Received: by 2002:a17:902:d483:b0:295:8da6:24b6 with SMTP id d9443c01a7336-2958da62993mr121771075ad.40.1762257224041; Tue, 04 Nov 2025 03:53:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXF9ZOb/Cu2PkMnhosLZsvYuqGRUraPOU4iiQsFvnX6lYonpROsLCz3BuwZNIJeZVUnFodMA== X-Received: by 2002:a17:902:d483:b0:295:8da6:24b6 with SMTP id d9443c01a7336-2958da62993mr121770855ad.40.1762257223652; Tue, 04 Nov 2025 03:53:43 -0800 (PST) Received: from ?IPV6:2804:14d:8084:9a69::1000? ([2804:14d:8084:9a69::1000]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2960199901dsm24321075ad.34.2025.11.04.03.53.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Nov 2025 03:53:43 -0800 (PST) Message-ID: Date: Tue, 4 Nov 2025 08:53:39 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/9] gdb: Implement 'bt shadow' to print the shadow stack backtrace. To: "Schimpe, Christina" , 'Simon Marchi' , 'Eli Zaretskii' Cc: "'gdb-patches@sourceware.org'" , "'thiago.bauermann@linaro.org'" References: <20250923111842.4091694-1-christina.schimpe@intel.com> <20250923111842.4091694-7-christina.schimpe@intel.com> <86y0q5crwq.fsf@gnu.org> <86plbebrf1.fsf@gnu.org> <3b44b772-7936-4c39-b743-716f585bd334@simark.ca> From: Guinevere Larsen In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UVIQ5BDY__iKzdhvOpt_OHSuYSJPUeJGFMw5dj_mFCM_1762257224 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 On 11/3/25 4:47 PM, Schimpe, Christina wrote: >> -----Original Message----- >> From: Guinevere Larsen >> Sent: Mittwoch, 29. Oktober 2025 16:28 >> To: Schimpe, Christina ; 'Simon Marchi' >> ; 'Eli Zaretskii' >> Cc: 'gdb-patches@sourceware.org' ; >> 'thiago.bauermann@linaro.org' >> Subject: Re: [PATCH 6/9] gdb: Implement 'bt shadow' to print the shadow stack >> backtrace. >> >> On 10/29/25 12:05 PM, Schimpe, Christina wrote: >>> Kindly pinging for feedback on this discussion to clarify if we should >>> better use >>> - "bt -shadow" (command line option) >>> - "bt shadow" (subcommand approach, current implementation). >>> >>> My personal opinion is still to use the subcommand approach, but, as I >>> already said, I think "bt -shadow" would be fine, too. >>> >>> Please also see this discussion with Thiago: >>> https://sourceware.org/pipermail/gdb-patches/2025-October/221660.html >> If it makes any difference, I personally prefer the command line option >> approach. That's based on looking at how record, record full and record btrace >> works, it is much easier to understand the code if the decision is made on the >> command's function itself > Hi Guinevere, > > I might be missing something here. Aren’t record, record full, and record btrace considered subcommands? > If that’s the case, wouldn’t the example of the record command actually support the subcommand approach? Or are you pointing to record as a negative example? I am using it as a negative example, yes, sorry if it was confusing. record full and record btrace are subcommands of record, and I found it needlessly confusing to figure out how the code decided what to do. I didn't even know that commands with subcommands were supported to be quite honest, so I expected "full" and "btrace" to be handled like options, and was quite confused when that wasn't the case. > > About your comment: > "it is much easier to understand the code if the decision is made on the command's function itself" > Could you clarify what you mean? Are you referring to making it easier for a reviewer or developer to go through my patches? > From my perspective, the most important thing is that the GDB user can find the subcommand or command-line option easily and intuitively. I mean making it easier to maintain as a GDB developer, yes. However, I do think this will also make things more confusing to end-users. Right now, backtrace accepts '-' prefixed options and a few non '-' prefixed options for backwards compatibility. from the POV of an end-user who doesn't know the difference between a command option and a subcommand, you'd be introducing a new option in the backwards compatible (but not preferred) style. Or worse, they'd think that "backtrace full", "backtrace no-filters" and "backtrace hide" were also subcommands but now the list of backtrace subcommands would no longer show those,  which makes it sound like they stopped being supported or that the help text is incorrect. -- Cheers, Guinevere Larsen It/she > > Looking forward to your thoughts! > Christina > Intel Deutschland GmbH > Registered Address: Dornacher Straße 1, 85622 Feldkirchen, Germany > Tel: +49 89 991 430, www.intel.de > Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell > Chairperson of the Supervisory Board: Nicole Lau > Registered Seat: Munich > Commercial Register: Amtsgericht München HRB 186928 >