clayborg added a comment.

Anything that takes a process shared pointer should be per process. A long time 
ago these plug-ins didn't take process, and as time went on they did take a 
process:

  306633   jmolenda   ABI(lldb::ProcessSP process_sp) {
  306633   jmolenda     if (process_sp.get())
  306633   jmolenda         m_process_wp = process_sp;
  306633   jmolenda   }
  245277     labath 
  306633   jmolenda   lldb::ProcessWP m_process_wp;
  306633   jmolenda 

The ABI plug-in started off just figuring out where return values were and and 
where argument values went.. If there was no process, then each ABI plug-in 
really is per architecture and they could be shared. Not sure if there is 
anything cached in any ABI plug-ins that is process specific. The change log 
says:

  Change the ABI class to have a weak pointer to its Process;
  some methods in the ABI need a Process to do their work.
  Instead of passing it in as a one-off argument to those
  methods, this patch puts it in the base class and the methods
  can retrieve if it needed.
  
  Note that ABI's are sometimes built without a Process 
  (e.g. SBTarget::GetStackRedZoneSize) so it's entirely
  possible that the process weak pointer will not be
  able to reconsistitue into a strong pointer.
  
  <rdar://problem/32526754> 

So to avoid having to pass the process to ABI functions that require it, it 
sounds like Jason just put it into the class. We can either take the process 
out of the base class and pass it in where it is needed to each method and keep 
one copy, or we can make new ones for each process. They aren't huge.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D54460



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

Reply via email to