public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/31698] New: Support DWARF index files larger than 4GB for index cache
@ 2024-05-03 12:11 mhov at undo dot io
  2024-05-03 13:47 ` [Bug symtab/31698] " tromey at sourceware dot org
  2024-05-04  4:22 ` sam at gentoo dot org
  0 siblings, 2 replies; 3+ messages in thread
From: mhov at undo dot io @ 2024-05-03 12:11 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31698
           Summary: Support DWARF index files larger than 4GB for index
                    cache
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: mhov at undo dot io
  Target Milestone: ---

The maximum size of an index file is limited by the maximum value capable of
being represented by the "offset_type":

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/dwarf2/index-write.c;hb=347775edd49c0d8f6fda3d13a39c8cac6196da30#l1170

This is currently defined as a 32-bit type:

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/dwarf2/index-common.h;hb=347775edd49c0d8f6fda3d13a39c8cac6196da30#l33

thus limiting index files to ~4GB.

This is not enough for some of the large applications we work with.

---

I assume increasing this size limit is not as easy as increasing the size of
offset_type. The size of offset_size is used to define the structure of the
index file, and is used to encode the offsets of each section in the index file
header.

It is not immediately clear to me whether the DWARF-5 index
(.debug_names/.debug_str addendum) supports larger than 4GB indices. If DWARF-5
does not have the same limitation then resolving
https://sourceware.org/bugzilla/show_bug.cgi?id=23504 could be sufficient.

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

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

* [Bug symtab/31698] Support DWARF index files larger than 4GB for index cache
  2024-05-03 12:11 [Bug symtab/31698] New: Support DWARF index files larger than 4GB for index cache mhov at undo dot io
@ 2024-05-03 13:47 ` tromey at sourceware dot org
  2024-05-04  4:22 ` sam at gentoo dot org
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2024-05-03 13:47 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-05-03
     Ever confirmed|0                           |1

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Magne Hov from comment #0)

> I assume increasing this size limit is not as easy as increasing the size of
> offset_type. The size of offset_size is used to define the structure of the
> index file, and is used to encode the offsets of each section in the index
> file header.

You'd have to bump the index version; but then to support older versions
it would probably have to support both lengths.  So, unfortunately, probably
not quite that easy.

If this is being done, maybe adding a flag or something so that 64 bit is
only used when needed would be good. 

> It is not immediately clear to me whether the DWARF-5 index
> (.debug_names/.debug_str addendum) supports larger than 4GB indices. If
> DWARF-5 does not have the same limitation then resolving
> https://sourceware.org/bugzilla/show_bug.cgi?id=23504 could be sufficient.

I think this format should support 64 bit offsets just fine.

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

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

* [Bug symtab/31698] Support DWARF index files larger than 4GB for index cache
  2024-05-03 12:11 [Bug symtab/31698] New: Support DWARF index files larger than 4GB for index cache mhov at undo dot io
  2024-05-03 13:47 ` [Bug symtab/31698] " tromey at sourceware dot org
@ 2024-05-04  4:22 ` sam at gentoo dot org
  1 sibling, 0 replies; 3+ messages in thread
From: sam at gentoo dot org @ 2024-05-04  4:22 UTC (permalink / raw)
  To: gdb-prs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

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

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

end of thread, other threads:[~2024-05-04  4:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-03 12:11 [Bug symtab/31698] New: Support DWARF index files larger than 4GB for index cache mhov at undo dot io
2024-05-03 13:47 ` [Bug symtab/31698] " tromey at sourceware dot org
2024-05-04  4:22 ` sam at gentoo dot 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).