From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A71223858C60 for ; Mon, 31 Jul 2023 07:16:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A71223858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690787797; 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=7rbhAb9hESTh20Zcm+cC7jA/w4QqIKqqCicszrZN7UI=; b=br9GgR/NlLJpzKzlSceW4ycvolXKfXRsIhIuOFqDT97YdtFEYdjpgjpHHSmZxQQrJIdP7b exYZOUwpjrbTOpK4/tdZ4DD6GJ2RfYUtDAyMskqbls+F9LLq7bXLVyn0i9xOndb6GSMB+O Yy+A7ziG8bLcvvpPZJQYSeo/xhMYEvU= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-260-NNf-6o2TNcuA-K3nsReu-Q-1; Mon, 31 Jul 2023 03:16:36 -0400 X-MC-Unique: NNf-6o2TNcuA-K3nsReu-Q-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-99bca0b9234so287049566b.2 for ; Mon, 31 Jul 2023 00:16:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690787795; x=1691392595; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7rbhAb9hESTh20Zcm+cC7jA/w4QqIKqqCicszrZN7UI=; b=Rm+EkLgffU5749JUDgsBhmzsul8RB8ou8JelSd/vPfbyAwifNquXLQoOoEQtOWw2R5 rWVm8LfT8OIIH9lpdcalLOMk7jppC1yq6PF7/XI0DS8cVkbDi3e/2KfcijMlEySyfDQs tHGkRonyguAt9NnOLpl0OYXCUm+Q2rx48H2GsXpi7DiT44YUnn+R+ReeV2ALh8/9gwap ov7FOdsr/nG8J8T/pQcRXafPOvfRC/d8RlUaz3HmsCpS8yftGljNAcXBmxhjmtwDMpQP Heec4rE/x1TTGn8505To0vlSZ8S8N5JpleOGhOdS4l1fioyXRzNQ4VUTqgXL7Hf+eMu1 NW6A== X-Gm-Message-State: ABy/qLbPriLfVodJ2wEue0gBS9G+UHi9qxIqJVzPNiG0elqAOAyNohME 6V07P0FFQWPfm98xmtcrf7kdPk7CkPVgcZMcW6tDTFvB4JIxpbZNEMGDqnSgW6UIERJbgjEX/VN C2flI5Jo071plwlHfD23+tg== X-Received: by 2002:a17:907:2ccf:b0:96f:e5af:ac5f with SMTP id hg15-20020a1709072ccf00b0096fe5afac5fmr5389516ejc.47.1690787795094; Mon, 31 Jul 2023 00:16:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFjrU5N9Abu2AZj0JqsU6F2rbyG071nZ5qnMqvRZZEaMd3miETqZCBsyHFlRqHcY9DithqZA== X-Received: by 2002:a17:907:2ccf:b0:96f:e5af:ac5f with SMTP id hg15-20020a1709072ccf00b0096fe5afac5fmr5389506ejc.47.1690787794770; Mon, 31 Jul 2023 00:16:34 -0700 (PDT) Received: from [192.168.0.129] (ip-94-112-225-44.bb.vodafone.cz. [94.112.225.44]) by smtp.gmail.com with ESMTPSA id kf7-20020a17090776c700b0099bc5e5742asm5777405ejc.70.2023.07.31.00.16.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jul 2023 00:16:34 -0700 (PDT) Message-ID: <7384fec1-04e3-e5f3-5627-0c53484b7604@redhat.com> Date: Mon, 31 Jul 2023 09:16:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 1/4] gdb, dwarf: add support for DW_AT_trampoline in DWARF reader To: "Ijaz, Abdul B" , "gdb-patches@sourceware.org" Cc: "JiniSusan.George@amd.com" , "tom@tromey.com" , "eliz@gnu.org" , Nils-Christian Kempke References: <20230710225643.32280-1-abdul.b.ijaz@intel.com> <20230710225643.32280-2-abdul.b.ijaz@intel.com> <27931c60-cdee-e430-13bf-37cbbcc926aa@redhat.com> From: Bruno Larsen In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: On 29/07/2023 13:36, Ijaz, Abdul B wrote: > 3) >>> + struct trampoline_target *self_trampoline_target; >> This member should have a comment describing it. >> Also, why did you call it self_trampoline_target instead of trampoline_target? The only other member prefixed with self_ in this struct is self_type, and that has it because when a method wants to know the type pointed at by the "self" or "this" variable, it will check that pointer, not due to self referencing stuff, if I understood it correctly. > Intention behind self_ is only that the trampoline calls itself are just for calling to the target function. So each trampoline entry is just pointing to the target call. Not sure if self_* usage is restricted for this where source is just referencing to the target. So please let me know if adding comment with this information will be sufficient otherwise I will remove the self_ suffix from the variable name. I think adding a comment is enough. As far as I know there isn't any actual restriction in that regard, I just thought it was an odd choice. The explanation makes sense, thank you! > > 4) >> After some time looking into how GDB calculates names and what not, I don't think calling this "physname" is a good idea, I think it would be better to call it TRAMPOLINE_TARGET_MANGLED_NAME. >> My reasoning for that is that physname is not some well defined thing, it is a name that a GDB developer came up with to call what happens when GDB needs to calculate mangled names ourselves because the compiler didn't add a linkage name, as far as I understood it. Since the struct trampoline_target doesn't care about how a mangled name was calculated, and mangled name is a well defined thing while physname is not, I think its better to use the latter. > Since as per (1) comment above we are first going to read mangled and if not then demangled name. So I would then just prefer to call it TRAMPOLINE_TARGET_NAME, hopefully it would be fine with you. Yeah, TRAMPOLINE_TARGET_NAME works just fine. Thank you! -- Cheers, Bruno