labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

This seems fine with a (fairly big) caveat that this approach will not work 
transitively loaded modules (== if the "command script import"ed module imports 
another module on its own). Supporting this would be possible, but it would 
require hooking fairly deep into the module loading mechanism of respective 
language. In lua, I believe that could be achieved by overriding the builtin 
`loadfile` function (to save the file when recording, and substitute it during 
replay). In python, that might be achieved by overriding the `__import__` 
function to record the module file name and by adjusting the module import 
mechanism (perhaps via import hooks 
<https://www.python.org/dev/peps/pep-0302/>) on replay.

However, all of that is going to be fairly tricky code, so I don't think that's 
needed if you just want to make simple imports work.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D76626



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to