[PATCH] D146852: [DWARF][GDB INDEX] Fix to deal with constant pool de-dupliation Summary:

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 16:00:54 PDT 2023


ayermolo added a comment.

gdb generated one

  .gdb_index contents:
    Version = 8
  
    CU list offset = 0x18, has 2 entries:
      0: Offset = 0x0, Length = 0x8a
      1: Offset = 0x8a, Length = 0x8e
  
    Types CU list offset = 0x38, has 0 entries:
  
    Address area offset = 0x38, has 2 entries:
      Low/High address = [0x201180, 0x20118f) (Size: 0xf), CU id = 0
      Low/High address = [0x201190, 0x20119d) (Size: 0xd), CU id = 1
  
    Symbol table offset = 0x60, size = 1024, filled slots:
      2: Name offset = 0x20, CU vector offset = 0x0
        String name: S, CU vector index: 0
      71: Name offset = 0x22, CU vector offset = 0x8
        String name: S2, CU vector index: 1
      489: Name offset = 0x25, CU vector offset = 0x10
        String name: main, CU vector index: 2
      661: Name offset = 0x2a, CU vector offset = 0x18
        String name: foo, CU vector index: 3
      732: Name offset = 0x2e, CU vector offset = 0x0
        String name: unsigned int, CU vector index: 0
      754: Name offset = 0x3b, CU vector offset = 0x0
        String name: int, CU vector index: 0
  
    Constant pool offset = 0x2060, has 4 CU vectors:
      0(0x0): 0x90000000
      1(0x8): 0x90000001
      2(0x10): 0x30000000
      3(0x18): 0x30000001

vs LLD generated one:

  .gdb_index contents:
    Version = 7
  
    CU list offset = 0x18, has 2 entries:
      0: Offset = 0x0, Length = 0x8a
      1: Offset = 0x8a, Length = 0x8e
  
    Types CU list offset = 0x38, has 0 entries:
  
    Address area offset = 0x38, has 2 entries:
      Low/High address = [0x201180, 0x20118f) (Size: 0xf), CU id = 0
      Low/High address = [0x201190, 0x20119d) (Size: 0xd), CU id = 1
  
    Symbol table offset = 0x60, size = 1024, filled slots:
      2: Name offset = 0x38, CU vector offset = 0x0
        String name: S, CU vector index: 0
      71: Name offset = 0x3a, CU vector offset = 0x8
        String name: S2, CU vector index: 1
      489: Name offset = 0x4a, CU vector offset = 0x1c
        String name: main, CU vector index: 3
      661: Name offset = 0x53, CU vector offset = 0x30
        String name: foo, CU vector index: 5
      732: Name offset = 0x3d, CU vector offset = 0x10
        String name: unsigned int, CU vector index: 2
      754: Name offset = 0x4f, CU vector offset = 0x24
        String name: int, CU vector index: 4
  
    Constant pool offset = 0x2060, has 6 CU vectors:
      0(0x0): 0x90000000
      1(0x8): 0x90000001
      2(0x10): 0x90000000 0x90000001
      3(0x1c): 0x30000000
      4(0x24): 0x90000000 0x90000001
      5(0x30): 0x30000001


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146852/new/

https://reviews.llvm.org/D146852



More information about the llvm-commits mailing list