[PATCH] D34906: [llvm-pdbutil] Output the symbol offset when dumping symbols

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 14:31:07 PDT 2017


rnk added inline comments.


================
Comment at: lld/test/COFF/pdb-comdat.test:44
 CHECK-LABEL:   Mod 0000 | `{{.*}}pdb_comdat_main.obj`:
-CHECK:   - S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_main.obj`
-CHECK:   - S_COMPILE3 [size = 60]
-CHECK:       machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c
-CHECK:       frontend = 19.0.24215.1, backend = 19.0.24215.1
-CHECK:       flags = security checks | hot patchable
-CHECK:   - S_GPROC32_ID [size = 44] `main`
-    FIXME: We need to fill in "end".
-CHECK:       parent = 0, addr = 0002:0000, code size = 24, end = 0
-CHECK:       debug start = 4, debug end = 19, flags = none
-CHECK:   - S_FRAMEPROC [size = 32]
-CHECK:       size = 40, padding size = 0, offset to padding = 0
-CHECK:       bytes of callee saved registers = 0, exception handler addr = 0000:0000
-CHECK:       flags = has async eh | opt speed
-CHECK:   - S_END [size = 4]
-CHECK:   - S_GDATA32 [size = 24] `global`
-CHECK:       type = 0x0074 (int), addr = 0000:0000
-CHECK:   - S_BUILDINFO [size = 8] BuildId = `4106`
-CHECK:   - S_GPROC32_ID [size = 44] `foo`
-CHECK:       parent = 0, addr = 0002:0032, code size = 15, end = 0
-CHECK:       debug start = 0, debug end = 14, flags = none
-CHECK:   - S_FRAMEPROC [size = 32]
-CHECK:       size = 0, padding size = 0, offset to padding = 0
-CHECK:       bytes of callee saved registers = 0, exception handler addr = 0000:0000
-CHECK:       flags = marked inline | has async eh | opt speed
-CHECK:   - S_END [size = 4]
+CHECK:     4 | S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_main.obj`
+CHECK:    60 | S_COMPILE3 [size = 60]
----------------
zturner wrote:
> rnk wrote:
> > I'd prefer to see offsets in hex.
> I'm kind of of two minds here.  I wanted them to look visually distinct from type indices, and there's also the issue of the size fields.  Someone should be able to look at the size field (which is also printed) and easily compute the next offset.  It's harder to mentally do hex math than decimal math so but this way someone can easily see that Offset(N+1) = Offset(N) + Size(N)
Hard to do mental math in hex? Get gud.

I agree, though, size, offset, parent, and end should all be in the same base. It might as well be decimal for now.


https://reviews.llvm.org/D34906





More information about the llvm-commits mailing list