[Lldb-commits] [PATCH] D76406: [lldb/testsuite] Fix TestInlineStepping on arm64 with newer compilers
This revision was automatically updated to reflect the committed changes. Closed by commit rGecc6c426977f: [lldb/testsuite] Fix TestInlineStepping on arm64 with newer compilers (authored by friss). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76406/new/ https://reviews.llvm.org/D76406 Files: lldb/test/API/functionalities/inline-stepping/calling.cpp Index: lldb/test/API/functionalities/inline-stepping/calling.cpp === --- lldb/test/API/functionalities/inline-stepping/calling.cpp +++ lldb/test/API/functionalities/inline-stepping/calling.cpp @@ -75,7 +75,7 @@ void caller_trivial_2 () { -inline_trivial_1 (); // In caller_trivial_2. +asm volatile ("nop"); inline_trivial_1 (); // In caller_trivial_2. inline_value += 1; // At increment in caller_trivial_2. } @@ -88,7 +88,7 @@ void inline_trivial_1 () { -inline_trivial_2(); // In inline_trivial_1. +asm volatile ("nop"); inline_trivial_2(); // In inline_trivial_1. inline_value += 1; // At increment in inline_trivial_1. } Index: lldb/test/API/functionalities/inline-stepping/calling.cpp === --- lldb/test/API/functionalities/inline-stepping/calling.cpp +++ lldb/test/API/functionalities/inline-stepping/calling.cpp @@ -75,7 +75,7 @@ void caller_trivial_2 () { -inline_trivial_1 (); // In caller_trivial_2. +asm volatile ("nop"); inline_trivial_1 (); // In caller_trivial_2. inline_value += 1; // At increment in caller_trivial_2. } @@ -88,7 +88,7 @@ void inline_trivial_1 () { -inline_trivial_2(); // In inline_trivial_1. +asm volatile ("nop"); inline_trivial_2(); // In inline_trivial_1. inline_value += 1; // At increment in inline_trivial_1. } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D76406: [lldb/testsuite] Fix TestInlineStepping on arm64 with newer compilers
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. This doesn't sound too bad. I am not sure if "nop" is a valid opcode on all targets, but if it isn't we could try hiding it in a macro, or replace it with an increment of a volatile/atomic variable or a call to a noinline function (the latter would probably require changes in test expectations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76406/new/ https://reviews.llvm.org/D76406 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D76406: [lldb/testsuite] Fix TestInlineStepping on arm64 with newer compilers
friss created this revision. friss added reviewers: labath, jingham. Herald added subscribers: danielkiss, kristof.beyls. Herald added a project: LLDB. TestInlineStepping tests LLDB's ability to step in the presence of inline frames. The testcase source has a number of functions and some of them are marked `always_inline`. The test is built around the assumption that the inline function will be fully represented once inlined, but this is not true with the current arm64 code generation. For example: void caller() { always_inline_function(); // Step here } When stppeing into `caller()` above, you might immediatly end up in the inlines frame for `always_inline_function()`, because there might literally be no code associated with `caller()` itself. This patch hacks around the issue by adding an `asm volatile("nop")` on some lines with inlined calls where we expect to be able to step. Like so: void caller() { asm volatile("nop"); always_inline_function(); // Step here } This guarantees there is always going to be one instruction for this line in the caller. Any other (better) idea how to deal with this? Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76406 Files: lldb/test/API/functionalities/inline-stepping/calling.cpp Index: lldb/test/API/functionalities/inline-stepping/calling.cpp === --- lldb/test/API/functionalities/inline-stepping/calling.cpp +++ lldb/test/API/functionalities/inline-stepping/calling.cpp @@ -75,7 +75,7 @@ void caller_trivial_2 () { -inline_trivial_1 (); // In caller_trivial_2. +asm volatile ("nop"); inline_trivial_1 (); // In caller_trivial_2. inline_value += 1; // At increment in caller_trivial_2. } @@ -88,7 +88,7 @@ void inline_trivial_1 () { -inline_trivial_2(); // In inline_trivial_1. +asm volatile ("nop"); inline_trivial_2(); // In inline_trivial_1. inline_value += 1; // At increment in inline_trivial_1. } Index: lldb/test/API/functionalities/inline-stepping/calling.cpp === --- lldb/test/API/functionalities/inline-stepping/calling.cpp +++ lldb/test/API/functionalities/inline-stepping/calling.cpp @@ -75,7 +75,7 @@ void caller_trivial_2 () { -inline_trivial_1 (); // In caller_trivial_2. +asm volatile ("nop"); inline_trivial_1 (); // In caller_trivial_2. inline_value += 1; // At increment in caller_trivial_2. } @@ -88,7 +88,7 @@ void inline_trivial_1 () { -inline_trivial_2(); // In inline_trivial_1. +asm volatile ("nop"); inline_trivial_2(); // In inline_trivial_1. inline_value += 1; // At increment in inline_trivial_1. } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits