From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA7673858C20; Tue, 29 Nov 2022 13:01:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA7673858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669726893; bh=yJWaCcjeff50aWBLeFOYwB5KhhMx79VD+SReX4zs7rk=; h=From:To:Subject:Date:From; b=XM9tyuNiwPEQxZIAN+rwE0K1q01l3sg/Mz1QcWdj7jnUnCLAKMhl4Keo9IKJLAGOn z5rlxJs7f+tGqCJ7yvOR3JXE3a+Tm1PW1oPIRg3a+iOG9OjXCkIm5eJKfCUeZ/vcb6 HJt0npYkD2ypAehdymFw1d+ruFJE0I7sELXiMdZY= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/29836] New: [gdb/symtab] Use current pc and location lists to evaluate DW_OP_entry_value for current frame Date: Tue, 29 Nov 2022 13:01:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29836 Bug ID: 29836 Summary: [gdb/symtab] Use current pc and location lists to evaluate DW_OP_entry_value for current frame Product: gdb Version: unknown Status: NEW Severity: enhancement Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- [ Spinoff PR of PR29813. ] In some cases we can't evaluate a DW_OP_entry_value the usual way, by looki= ng at call site information. We could try to use the .debug_loc information for the formal parameters of= the current function. For instance, for a function f1, with parameter i, we find have location li= st entries: ... 0037 1000067c 10000680 (DW_OP_reg3 (r3)) 004a 10000680 10000690 (DW_OP_GNU_entry_value: (DW_OP_reg3 (r3)); DW_OP_stack_value) ... and we could use the fact that the current pc is in the 1000067c-10000680 range, and that the range starts at the start of the function to deduce that DW_OP_GNU_entry_value: (DW_OP_reg3 (r3)) =3D=3D DW_OP_reg3 (r3). Note that this only works for the current frame. --=20 You are receiving this mail because: You are on the CC list for the bug.=