From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id C026C385840D for ; Wed, 1 Dec 2021 22:04:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C026C385840D Received: by mail-il1-x132.google.com with SMTP id 15so17887524ilq.2 for ; Wed, 01 Dec 2021 14:04:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=LJmY7Cvi6SQsLlVl4wjxLl+P9Wyk1aU/ajYmYt7UY+c=; b=Noz5nNqfHlIgnnrExXtuRniifjrCgrMhB4QciaTr1+LBTh+7SRqZcwpLhJJxjzr2PN l9TUx0tcZcDW4bYphK6YOoBRmNL5DtdZ9MMkk/nRqtM47X6V0QZoflLNnX+BhPHObZdI JsIZwJNaFDurdqHkiM7DhGqkLwRzKPbd1lC6fla9y2b/6QGVGzfyDI7C4FxPCsphrRDk sN1AgPKL23M+4dWuliOIsC8Y7gkJbXjTo2iJ/F1CwSfgqtgrg+JDvyGzuuFiDLdFgbjm cBRErp4NQauF/FoTCMreTh9e1hR9q1DNX6+Kx2zt9+ldBloRBnr7VHPvFpFR5/9IpIkq +VJA== X-Gm-Message-State: AOAM533EHkQRxOg9YAx93luI6WIlEYVf8f2uaG1CbhOO6s7dL90blMZ+ G2Wi86ir8bwTjfxiLWPR3Tla7vF7/HJKUw== X-Google-Smtp-Source: ABdhPJzENUpXlDTpM7tqDRqh/FlIE9rNa+YeGWNgh8V+vRzLhGadMPkqjaieMOohFUFLmnkGyWiTtQ== X-Received: by 2002:a92:c012:: with SMTP id q18mr11954926ild.216.1638396276162; Wed, 01 Dec 2021 14:04:36 -0800 (PST) Received: from murgatroyd.Home (97-122-84-67.hlrn.qwest.net. [97.122.84.67]) by smtp.gmail.com with ESMTPSA id l18sm622298iob.17.2021.12.01.14.04.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:04:35 -0800 (PST) From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 0/6] Handle split functions in call site chains Date: Wed, 1 Dec 2021 15:04:26 -0700 Message-Id: <20211201220432.4105152-1-tromey@adacore.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2021 22:04:38 -0000 This series fixes a bug in DW_OP_entry_value handling. A large customer program that is compiled with optimization has a function that is split into hot and cold parts. The DWARF uses DW_AT_ranges to represent this. However, the call site code only looks at the low and high PCs. This means that the entry value computation fails to find the correct outer frame, and so cannot evaluate a certain local variable. This series changes the code to record multiple addresses in a call site target. This change lets this particular case work. Some of this series is refactoring to make it simpler to deal with call_site_target. Patch #4 could use an extra examination, both because I convert explicit state management to recursion (IMO ok because these call chains tend to be short); but also because I think I found a bug in the current code. Regression tested on x86-64 Fedora 34. Let me know what you think. Tom