[Lldb-commits] [PATCH] D68861: [lldb] Add nodebug attribute to import-std-module/sysroot test

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 11 01:09:56 PDT 2019


teemperor created this revision.
teemperor added reviewers: friss, labath.
Herald added subscribers: lldb-commits, JDevlieghere.
Herald added a project: LLDB.

So far we rely on the default argument and the fact that we don't call this
inline function in our actual `main.cpp` to make sure that this function can only
be called if LLDB loads this header as a C++ module. This patch just adds
the nodebug attribute as yet another measure to make sure LLDB can't call this
function without the standard module loaded. Note that the test is already
requiring clang for the sysroot setup, so its fine that this is a Clang specific attribute.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68861

Files:
  lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm


Index: lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
+++ lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
@@ -4,6 +4,7 @@
   // Makes sure we get a support file for this header.
   struct vector { int i; };
 
+  __attribute__((__nodebug__))
   inline int myabs(int i = -123) {
     double nil;
     return i < 0 ? -i : i;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68861.224549.patch
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191011/ff059ae4/attachment.bin>


More information about the lldb-commits mailing list