This revision was automatically updated to reflect the committed changes. Closed by commit rGf07ddbc9c4b6: [LLDB] [COFF] Fix handling of symbols with more than one aux symbol (authored by mstorsjo).
Changed prior to commit: https://reviews.llvm.org/D84070?vs=278893&id=279406#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84070/new/ https://reviews.llvm.org/D84070 Files: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml Index: lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml =================================================================== --- lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml +++ lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml @@ -1,6 +1,9 @@ # RUN: yaml2obj %s > %t # RUN: lldb-test symbols %t | FileCheck %s +## The .file symbol isn't checked, but is included to test that the symbol +## table iteration handles cases with a symbol with more than one aux symbol. + # CHECK: Type File Address/Value {{.*}} Size Flags Name # CHECK: Code 0x0000000040001000 0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}} entry # CHECK: 0x0000000040002000 0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}} variable @@ -101,6 +104,13 @@ SimpleType: IMAGE_SYM_TYPE_NULL ComplexType: IMAGE_SYM_DTYPE_NULL StorageClass: IMAGE_SYM_CLASS_STATIC + - Name: .file + Value: 0 + SectionNumber: -2 + SimpleType: IMAGE_SYM_TYPE_NULL + ComplexType: IMAGE_SYM_DTYPE_NULL + StorageClass: IMAGE_SYM_CLASS_FILE + File: longfilenameusingtwoauxsymbols - Name: entry Value: 0 SectionNumber: 1 Index: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp =================================================================== --- lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -686,7 +686,7 @@ if (symbol.naux > 0) { i += symbol.naux; - offset += symbol_size; + offset += symbol.naux * symbol_size; } } }
Index: lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml =================================================================== --- lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml +++ lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml @@ -1,6 +1,9 @@ # RUN: yaml2obj %s > %t # RUN: lldb-test symbols %t | FileCheck %s +## The .file symbol isn't checked, but is included to test that the symbol +## table iteration handles cases with a symbol with more than one aux symbol. + # CHECK: Type File Address/Value {{.*}} Size Flags Name # CHECK: Code 0x0000000040001000 0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}} entry # CHECK: 0x0000000040002000 0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}} variable @@ -101,6 +104,13 @@ SimpleType: IMAGE_SYM_TYPE_NULL ComplexType: IMAGE_SYM_DTYPE_NULL StorageClass: IMAGE_SYM_CLASS_STATIC + - Name: .file + Value: 0 + SectionNumber: -2 + SimpleType: IMAGE_SYM_TYPE_NULL + ComplexType: IMAGE_SYM_DTYPE_NULL + StorageClass: IMAGE_SYM_CLASS_FILE + File: longfilenameusingtwoauxsymbols - Name: entry Value: 0 SectionNumber: 1 Index: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp =================================================================== --- lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -686,7 +686,7 @@ if (symbol.naux > 0) { i += symbol.naux; - offset += symbol_size; + offset += symbol.naux * symbol_size; } } }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits