This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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 gdb/23504] New: index cache: Produce and consume DWARF5 format


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

            Bug ID: 23504
           Summary: index cache: Produce and consume DWARF5 format
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: simon.marchi at ericsson dot com
  Target Milestone: ---

Currently, the DWARF index cache only produces and consumes files in GDB's own
index format.  We should make it use the DWARF5 format too.

The main difficulty is that producing a DWARF5 format generates two files:

- The index itself (.debug_names)
- An addendum to the string section (.debug_str)

It is expected that the .debug_str addendum will be appended to the possibly
existing .debug_str section of the existing binary.  There are offset values in
.debug_names that are therefore larger than the size of the original
.debug_str, if they point to strings in the addendum.

With the index cache, we don't modify the original binary.  So when loading a
DWARF5 index from the index cache, we need some special treatment: if
requesting a string at an offset larger than the size of the original
.debug_str, we actually need to look it up in the .debug_str addendum (with the
offset adjusted, of course).

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

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