Skip to content

Commit f0adb9e

Browse files
committed
fixup! turn test into API test; no need for dlopen/dlsym
1 parent 2079127 commit f0adb9e

File tree

9 files changed

+37
-39
lines changed

9 files changed

+37
-39
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CXX_SOURCES := main.cpp service.cpp
2+
3+
DYLIB_CXX_SOURCES := plugin.cpp
4+
DYLIB_NAME := plugin
5+
6+
include Makefile.rules
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import lldb
2+
from lldbsuite.test.decorators import *
3+
from lldbsuite.test.lldbtest import *
4+
from lldbsuite.test import lldbutil
5+
6+
7+
class OdrHandlingWithDylibTestCase(TestBase):
8+
def test(self):
9+
"""
10+
TODO
11+
"""
12+
self.build()
13+
14+
lldbutil.run_to_source_breakpoint(
15+
self, "plugin_entry", lldb.SBFileSpec("plugin.cpp")
16+
)
17+
18+
self.expect_expr("*gProxyThis")
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "plugin.h"
2+
3+
#define HIDE_FROM_PLUGIN 1
4+
#include "service.h"
5+
6+
int main() {
7+
exported();
8+
plugin_init();
9+
plugin_entry();
10+
return 0;
11+
}

lldb/test/Shell/Expr/Inputs/name-conflict-test/service.cpp renamed to lldb/test/API/lang/cpp/odr-handling-with-dylib/service.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#define HIDE_FROM_PLUGIN 1
12
#include "service.h"
23

34
struct ServiceAux {

lldb/test/Shell/Expr/Inputs/name-conflict-test/service.h renamed to lldb/test/API/lang/cpp/odr-handling-with-dylib/service.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct Service {
77
struct State;
88
bool start(State *) { return true; }
99

10-
#if HIDE_FROM_PLUGIN
10+
#ifdef HIDE_FROM_PLUGIN
1111
int __resv1;
1212
#endif // !HIDE_FROM_PLUGIN
1313

lldb/test/Shell/Expr/Inputs/name-conflict-test/main.cpp

Lines changed: 0 additions & 21 deletions
This file was deleted.

lldb/test/Shell/Expr/TestODRHandlingWithDylib.test

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)