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

"process load" should probably be changed to have an options that allows us to 
specify where the shared library needs to be installed:

  (lldb) process load --install-path=/usr/lib ~/build/libfoo.so

Then we should add a new argument to LoadImage:

  uint32_t
  Platform::LoadImage(lldb_private::Process* process, const FileSpec& 
local_image_spec, const FileSpec& install_image_spec, Error& error)

This extra install_image_spec can be empty and if it is, we do what you did in 
the above patch, else we use the "install_image_spec" to copy the shared 
library to this location first, then load it from the install location.

This means we might want to change the Platform::LoadImage() to do more stuff 
up in Platform.cpp (like install the image using the virtual platform functions 
to install the shared library), and then change all current Platform subclasses 
that override LoadImage() over to DoLoadImage() and have the platform 
subclasses just do the actual "dlopen()" call on a specified file. Right now we 
are duplicating some code between LoadImage methods.


http://reviews.llvm.org/D15152



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

Reply via email to