<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font face="Helvetica">I was evaluating whether to provide one in
        a target setting, and I de<font face="Helvetica">cided<font
            face="Helvetica"> not to.</font></font></font></p>
    <p><font face="Helvetica"><font face="Helvetica"><font
            face="Helvetica"><font face="Helvetica">Then <font
                face="Helvetica">I wa<font face="Helvetica">s looking to
                  see why anyo<font face="Helvetica">ne wouild, and I <font
                      face="Helvetica">could<font face="Helvetica">n<font
                          face="Helvetica">'t find anyone actual<font
                            face="Helvetica">ly us<font face="Helvetica">ing
                              it.</font></font></font></font></font></font></font></font></font></font></font></font></p>
    <p><font face="Helvetica"><font face="Helvetica"><font
            face="Helvetica"><font face="Helvetica"><font
                face="Helvetica"><font face="Helvetica"><font
                    face="Helvetica"><font face="Helvetica"><font
                        face="Helvetica"><font face="Helvetica"><font
                            face="Helvetica"><font face="Helvetica"><font
                                face="Helvetica">It's a little painful <font
                                  face="Helvetica">to see it</font> <font
                                  face="Helvetica">passed around
                                  everywhere <font face="Helvetica">ra<font
                                      face="Helvetica">ther than<font
                                        face="Helvetica"> stored by
                                        Process or Target<font
                                          face="Helvetica">, the <font
                                            face="Helvetica">t<font
                                              face="Helvetica">wo <font
                                                face="Helvetica">things<font
                                                  face="Helvetica"> that
                                                  care<font
                                                    face="Helvetica">.<font
                                                      face="Helvetica">.<font
                                                        face="Helvetica">.<font
face="Helvetica"> but it<font face="Helvetica">'s not getting <font
                                                          face="Helvetica">in
                                                          the <font
                                                          face="Helvetica">way
                                                          of my work<font
face="Helvetica">.</font></font></font></font><br>
                                                        </font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></p>
    <p><font face="Helvetica"><font face="Helvetica"><font
            face="Helvetica"><font face="Helvetica"><font
                face="Helvetica"><font face="Helvetica"><font
                    face="Helvetica"><font face="Helvetica"><font
                        face="Helvetica"><font face="Helvetica"><font
                            face="Helvetica"><font face="Helvetica"><font
                                face="Helvetica"><font face="Helvetica"><font
                                    face="Helvetica"><font
                                      face="Helvetica"><font
                                        face="Helvetica"><font
                                          face="Helvetica"><font
                                            face="Helvetica"><font
                                              face="Helvetica"><font
                                                face="Helvetica"><font
                                                  face="Helvetica"><font
                                                    face="Helvetica"><font
                                                      face="Helvetica">Sean</font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font><br>
    </p>
    <div class="moz-cite-prefix">On 7/21/17 4:51 PM, Jim Ingham wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:EEB23F4E-4DD6-4BF5-A18C-4C1E39AAE770@apple.com">
      <pre wrap="">Was this just curiosity, or was this getting in your way somehow?

Jim

</pre>
      <blockquote type="cite">
        <pre wrap="">On Jul 21, 2017, at 4:50 PM, Jim Ingham via lldb-dev <a class="moz-txt-link-rfc2396E" href="mailto:lldb-dev@lists.llvm.org"><lldb-dev@lists.llvm.org></a> wrote:


</pre>
        <blockquote type="cite">
          <pre wrap="">On Jul 21, 2017, at 4:41 PM, Sean Callanan via lldb-dev <a class="moz-txt-link-rfc2396E" href="mailto:lldb-dev@lists.llvm.org"><lldb-dev@lists.llvm.org></a> wrote:

There's a function in OptionValueProperties (<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueProperties.cpp?view=markup">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueProperties.cpp?view=markup</a> line 234):

const Property *OptionValueProperties::GetPropertyAtIndex(
   const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const {
 return ProtectedGetPropertyAtIndex(idx);
}

Its callers  go to some trouble to collect and pass around the ExecutionContext (e.g., GetSubValue passes it around everywhere, GetPropertyAtrIndexAs* has to keep it everywhere, the Dump mechanism passes around ExecutionContexts, etc.)

Aside from calling this function with completely ignores the ExecutionContext, I don't see the execution contexts getting used anywhere.  Is this a remnant from old code?
</pre>
        </blockquote>
        <pre wrap="">
For instance (from Process.cpp):

class ProcessOptionValueProperties : public OptionValueProperties {
public:
 ProcessOptionValueProperties(const ConstString &name)
     : OptionValueProperties(name) {}

 // This constructor is used when creating ProcessOptionValueProperties when it
 // is part of a new lldb_private::Process instance. It will copy all current
 // global property values as needed
 ProcessOptionValueProperties(ProcessProperties *global_properties)
     : OptionValueProperties(*global_properties->GetValueProperties()) {}

 const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
                                    bool will_modify,
                                    uint32_t idx) const override {
   // When getting the value for a key from the process options, we will always
   // try and grab the setting from the current process if there is one. Else
   // we just
   // use the one from this instance.
   if (exe_ctx) {
     Process *process = exe_ctx->GetProcessPtr();
     if (process) {
       ProcessOptionValueProperties *instance_properties =
           static_cast<ProcessOptionValueProperties *>(
               process->GetValueProperties().get());
       if (this != instance_properties)
         return instance_properties->ProtectedGetPropertyAtIndex(idx);
     }
   }
   return ProtectedGetPropertyAtIndex(idx);
 }
};

That's what tells you whether to use the global process property, or this process specific one.  Ditto for Thread properties.

Jim


</pre>
        <blockquote type="cite">
          <pre wrap="">
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">Sean
_______________________________________________
lldb-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a>
</pre>
        </blockquote>
        <pre wrap="">
_______________________________________________
lldb-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a>
</pre>
      </blockquote>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
  </body>
</html>