clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

We should add support to lldb::SBPlatform and lldb_private::Platform where we 
get the shared library extension from the platform and also fix the logic as 
noted in the inlined comments.


================
Comment at: test/functionalities/load_unload/TestLoadUnload.py:201-204
@@ -205,7 +200,6 @@
 
-        if lldb.remote_platform:
-            dylibName = os.path.join(shlib_dir, 'libloadunload_a.so')
-        elif self.platformIsDarwin():
+        if self.platformIsDarwin():
             dylibName = 'libloadunload_a.dylib'
         else:
             dylibName = 'libloadunload_a.so'
+        
----------------
It would be great to add something to lldb::SBPlatform and 
lldb_private::Platform that allows us to get the shared library extension from 
the platform:

```
class SBPlatform
{
    const char *
    GetSharedLibraryExtension();
};
```

Then this code can become:

```
dylibName = "libloadunload" + platform.GetSharedLibraryExtension()



================
Comment at: test/functionalities/load_unload/TestLoadUnload.py:206-209
@@ +205,6 @@
+        
+        if lldb.remote_platform:
+            dylibPath = os.path.join(shlib_dir, 'libloadunload_a.so')
+        else:
+            dylibPath = dylibName
+
----------------
This code should be:

```
        if lldb.remote_platform:
            dylibPath = os.path.join(shlib_dir, dylibName)
        else:
            dylibPath = dylibName
```


http://reviews.llvm.org/D11465




_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to