public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/29836] New: [gdb/symtab] Use current pc and location lists to evaluate DW_OP_entry_value for current frame
@ 2022-11-29 13:01 vries at gcc dot gnu.org
  2022-11-29 21:47 ` [Bug symtab/29836] " cvs-commit at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-29 13:01 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29836

            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 looking
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 list
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)) == DW_OP_reg3 (r3).

Note that this only works for the current frame.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-29 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29 13:01 [Bug symtab/29836] New: [gdb/symtab] Use current pc and location lists to evaluate DW_OP_entry_value for current frame vries at gcc dot gnu.org
2022-11-29 21:47 ` [Bug symtab/29836] " cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).