public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/20002] New: Provide more context for DWARF errors
@ 2016-04-26 18:26 mjw at redhat dot com
  0 siblings, 0 replies; only message in thread
From: mjw at redhat dot com @ 2016-04-26 18:26 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 20002
           Summary: Provide more context for DWARF errors
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: mjw at redhat dot com
  Target Milestone: ---

Currently stap does provide some context when a DWARF location expression for
an argument or variable cannot be resolved, but if the issue is with the DWARF
producer (GCC) we need more context when reporting a bug.

Given a probe location (pc address) and a variable or argument name stap (-v)
or a separate tool (loc2c-test can already provide something) we should at
least provide:

- The DW_AT_name, comp_dir and producer (which includes the GCC flags used) of
the containing DW_TAG_compile_unit. e.g. shell.c /usr/src/debug/bash-4.3 GNU
C11 5.1.1 20150618 (Red Hat 5.1.1-4) -m64 -mtune=generic -march=x86-64 -g -O2
-fexceptions -fstack-protector-strong --param ssp-buffer-size=4 -fPIE
- The objdump/disassemble of the containing
- Either ^ intermixed with source (-S) [but that is sometimes confusing]
  or the source code for the containing DW_TAG_subprogram and all relevant
address ranges of the DW_TAG_inlined_subroutines (take the low_pc/high_pc of
each and use the line table to translate to file/line).
- A dump of the relevant DIE for the DW_TAG_formal_parameter or variable
including the full DWARF location expression (this must include the relevant
location list entry for the pc address if necessary).

The above should be enough for an early evaluation. For a complete reproducer
we would also need the preprocessed sources, but stap alone cannot easily
provide those (although we could try using comp_dir, CU file name and producer
string gcc flags).

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-26 18:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 18:26 [Bug translator/20002] New: Provide more context for DWARF errors mjw at redhat dot com

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).