[Lldb-commits] [PATCH] D77529: Prefer executable files from sysroot over files from local filesystem

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 6 03:45:37 PDT 2020


labath added a comment.

Thanks for doing this. There are so many levels at which the search for modules is retried and I am glad that we can solve this problem by getting rid of one of them. Unfortunately, all of that complexity also means it's hard to guarantee that this won't break anything, but this patch is so simple, I think it's worth giving it a shot...

I just have a question about the test case inline...



================
Comment at: lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py:221
+            core = f.read()
+        core = core.replace(b'/home/labath/test/a.out', b'/bin/sh\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0')
+        core = core.replace(b'a.out', b'sh\0\0\0')
----------------
Would it be possible to make this test not depend on the existence of `/bin/sh`? Maybe if you place the "wrong" file in `$BUILD/a.out`, and the "right" file at `$BUILD/sysroot/$BUILD/a.out` and then check that the "right" file was selected?

I guess that will require creating a new core file with a sufficiently long path so that it can be replaced by the right runtime value.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77529/new/

https://reviews.llvm.org/D77529





More information about the lldb-commits mailing list