This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/20002] New: Provide more context for DWARF errors


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]