mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 18:16:42 +00:00
This reverts commit 348374028970c956f2e49ab7553b495d7408ccd9 because #128619 doesn't handle the case when we have an empty frame from `getInliningInfoForAddress` because line num is 0 which makes it non-differentiable from missing debug info. So, we end up using the base filename from symtab again. Reverting for now until that issus is solved.
This commit is contained in:
parent
f344838389
commit
78b21ddba7
@ -1870,7 +1870,7 @@ DWARFContext::getInliningInfoForAddress(object::SectionedAddress Address,
|
||||
LineTable->getFileLineInfoForAddress(
|
||||
{Address.Address, Address.SectionIndex}, Spec.ApproximateLine,
|
||||
CU->getCompilationDir(), Spec.FLIKind, Frame);
|
||||
} else if (CallLine != 0) {
|
||||
} else {
|
||||
// Otherwise, use call file, call line and call column from
|
||||
// previous DIE in inlined chain.
|
||||
if (LineTable)
|
||||
|
@ -1539,8 +1539,7 @@ bool DWARFDebugLine::LineTable::getFileLineInfoForAddress(
|
||||
return false;
|
||||
// Take file number and line/column from the row.
|
||||
const auto &Row = Rows[RowIndex];
|
||||
if (Row.Line == 0 ||
|
||||
!getFileNameByIndex(Row.File, CompDir, Kind, Result.FileName))
|
||||
if (!getFileNameByIndex(Row.File, CompDir, Kind, Result.FileName))
|
||||
return false;
|
||||
Result.Line = Row.Line;
|
||||
Result.Column = Row.Column;
|
||||
|
@ -20,13 +20,13 @@
|
||||
## Check that without '--skip-line-zero', line zero is displayed for a line-table entry which has no source correspondence.
|
||||
# RUN: llvm-symbolizer --obj=%t.o -f=none 0x16d4 | FileCheck --strict-whitespace --match-full-lines --check-prefix=DISABLE %s
|
||||
|
||||
# DISABLE:??:0:0
|
||||
# DISABLE:main.c:0:0
|
||||
|
||||
## Check that the '--skip-line-zero' does not cross sequence boundaries.
|
||||
## If it fails to find in the current sequence then line zero is returned for the queried address.
|
||||
# RUN: llvm-symbolizer --obj=%t.o -f=none --skip-line-zero 0x16c0 | FileCheck --strict-whitespace --match-full-lines --check-prefix=FAIL-ACROSS-SEQ %s
|
||||
|
||||
# FAIL-ACROSS-SEQ:??:0:0
|
||||
# FAIL-ACROSS-SEQ:main.c:0:0
|
||||
|
||||
## Check that with '--skip-line-zero', the last non-zero line in the current sequence is displayed.
|
||||
# RUN: llvm-symbolizer --obj=%t.o -f=none --skip-line-zero 0x1717 | FileCheck --strict-whitespace --match-full-lines --check-prefix=WITHIN-SEQ %s
|
||||
|
@ -50,12 +50,13 @@ CHECK-NEXT: Column: 0
|
||||
|
||||
CHECK: 0x4005ad
|
||||
CHECK-NEXT: foo
|
||||
CHECK-NEXT: Filename: ??
|
||||
CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
|
||||
CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
|
||||
CHECK-NEXT: Function start line: 4
|
||||
CHECK-NEXT: Function start address: 0x400590
|
||||
CHECK-NEXT: Line: 0
|
||||
CHECK-NEXT: Column: 0
|
||||
CHECK-NEXT: Column: 30
|
||||
CHECK-NEXT: Discriminator: 4
|
||||
CHECK-NEXT: main
|
||||
CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
|
||||
CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
|
||||
|
@ -37,36 +37,36 @@ int main(void) {
|
||||
// CHECK: Kernel 1: {{.*}} (__omp_offloading_{{.*}}_main_l22)
|
||||
// CHECK: launchKernel
|
||||
// NDEBG: main
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c:
|
||||
//
|
||||
// CHECK: Kernel 2: {{.*}} (__omp_offloading_{{.*}}_main_l22)
|
||||
// CHECK: launchKernel
|
||||
// NDEBG: main
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c:
|
||||
//
|
||||
// CHECK: Kernel 3: {{.*}} (__omp_offloading_{{.*}}_main_l22)
|
||||
// CHECK: launchKernel
|
||||
// NDEBG: main
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c:
|
||||
//
|
||||
// CHECK: Kernel 4: {{.*}} (__omp_offloading_{{.*}}_main_l22)
|
||||
// CHECK: launchKernel
|
||||
// NDEBG: main
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c:
|
||||
//
|
||||
// CHECK: Kernel 5: {{.*}} (__omp_offloading_{{.*}}_main_l22)
|
||||
// CHECK: launchKernel
|
||||
// NDEBG: main
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c:
|
||||
//
|
||||
// CHECK: Kernel 6: {{.*}} (__omp_offloading_{{.*}}_main_l22)
|
||||
// CHECK: launchKernel
|
||||
// NDEBG: main
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c:
|
||||
//
|
||||
// CHECK: Kernel 7: {{.*}} (__omp_offloading_{{.*}}_main_l22)
|
||||
// CHECK: launchKernel
|
||||
// NDEBG: main
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c
|
||||
// DEBUG: main {{.*}}kernel_crash_many.c:
|
||||
//
|
||||
// CHECK-NOT: Kernel {{[[0-9]]+}}:
|
||||
|
@ -39,4 +39,5 @@ int main(void) {
|
||||
// CHECK: OFFLOAD ERROR: Kernel 'omp target in main @ 30 (__omp_offloading_{{.*}}_main_l30)'
|
||||
// CHECK: OFFLOAD ERROR: execution interrupted by hardware trap instruction
|
||||
// TRACE: launchKernel
|
||||
// TRACE: main
|
||||
// clang-format on
|
||||
|
@ -47,6 +47,6 @@ int main(void) {
|
||||
// TRACE: launchKernel
|
||||
// NDEBG: cxx_function_name<S>(int, S*)
|
||||
// NDEBG: main
|
||||
// DEBUG: cxx_function_name<S>(int, S*) {{.*}}kernel_trap.cpp
|
||||
// DEBUG: main {{.*}}kernel_trap.cpp
|
||||
// DEBUG: cxx_function_name<S>(int, S*) {{.*}}kernel_trap.cpp:
|
||||
// DEBUG: main {{.*}}kernel_trap.cpp:
|
||||
// clang-format on
|
||||
|
@ -32,4 +32,4 @@ int main(void) {
|
||||
// TRACE: OFFLOAD ERROR: execution interrupted by hardware trap instruction
|
||||
// TRACE: launchKernel
|
||||
// NDEBG: main
|
||||
// DEBUG: main {{.*}}kernel_trap_many.c
|
||||
// DEBUG: main {{.*}}kernel_trap_many.c:
|
||||
|
Loading…
x
Reference in New Issue
Block a user