<div dir="ltr">We'll probably end up needing to support something like this:<div><a href="https://en.wikipedia.org/wiki/Security_Identifier">https://en.wikipedia.org/wiki/Security_Identifier</a><br></div><div><br></div>
<div>Most of the access control on Windows ends up revolving around those.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 2, 2014 at 3:37 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
> On Jul 2, 2014, at 2:52 PM, Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br>
><br>
</div><div><div class="h5">> I've started experimenting with adding support to LLDB for debugging native Windows executables on Windows.  So windows host, windows target.  I've done a few little cleanup tasks here and there and fixed some low-hanging fruit, and I'd like to move onto something more meaty.<br>

><br>
> I took a look at what it would take to get "platform process list" to work.  The first thing I notice is that all of the Process info objects contain the notion of a UID and GID, a concept which doesn't really exist on Windows.  An analagous concept exists, but it's represented completely differently.<br>

><br>
> My question is: How best to abstract out this functionality?  I'm still not totally clear on where I'm allowed to use platform specific types / APIs and where it needs to be platform agnostic.  My first thought is to remove UID and GID from the ProcessInfo class, and replace them with a instance a "ProcessUserId" class, then provide a PosixProcessUserId and a WindowsProcessUserId, which abstracts away the differences.<br>

><br>
> Assuming this approach is logical, where is the best place for this code to go?  Host or Target?<br>
><br>
> Anything else I should be aware of?<br>
<br>
</div></div>Can we just make a UserID class and GroupID class which contains both an integer and a string (and anything else that is required) and use that? What does windows have as far as UID and GID goes? Will strings suffice? Does it need more? As you can tell we are very unix centric right now, but we do want to abstract. So I would go the route of making a UserID and a GroupID class, everyone uses these classes and these classes need to be able to store everything that all of our classes require. My simple guess would be:<br>

<br>
class UserID {<br>
   std::string m_name;<br>
   lldb::user_id_t m_identifier;<br>
};<br>
<br>
Same for kind of thing for GroupID.<br>
<span class="HOEnZb"><font color="#888888"><br>
Greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>