{"id":36,"date":"2006-07-28T11:52:00","date_gmt":"2006-07-28T16:52:00","guid":{"rendered":"http:\/\/www.nynaeve.net\/?p=36"},"modified":"2019-12-13T17:41:40","modified_gmt":"2019-12-13T22:41:40","slug":"activating-process-servers-and-connecting-to-them","status":"publish","type":"post","link":"http:\/\/www.nynaeve.net\/?p=36","title":{"rendered":"Activating process servers and connecting to them"},"content":{"rendered":"<p>The mechanisms used to activate a <a title=\"Remote debugging with process servers (dbgsrv)\" href=\"http:\/\/www.nynaeve.net\/?p=35\">process server<\/a>\u00c2\u00a0are fairly similar to those used to work with the\u00c2\u00a0<a title=\"Remote debugging with -server and -remote\" href=\"http:\/\/www.nynaeve.net\/?p=31\">-server and -remote<\/a>\u00c2\u00a0remoting mechanism.<\/p>\n<p>To start a process server, you must use a special utility called <em>dbgsrv.exe<\/em> that is distributed with DTW.\u00c2\u00a0 This program is the server end of debugger connection.<\/p>\n<p align=\"left\">Like -server and -remote, process server \/ smart client debugging uses connection strings for both the client and the server.\u00c2\u00a0 The syntax for client and server connection strings are for the most part compatible, so you should look back on my existing posts about <a title=\"Remote debugging with -server and -remote\" href=\"http:\/\/www.nynaeve.net\/?p=31\">basic remote connectivity<\/a>, <a title=\"Reverse debugging -server and -remote\" href=\"http:\/\/www.nynaeve.net\/?p=32\">reverse connections<\/a>, and <a title=\"Securing -server and -remote remote debugging sessions\" href=\"http:\/\/www.nynaeve.net\/?p=33\">securing debugger connections<\/a>.\u00c2\u00a0 For the most part, things work exactly the same as -server and -remote; all of the connectivity options supported by -server and -remote work for process servers and smart clients, and all of the features (such as reverse connections and secured connections) are available using the same mechanisms as well.<\/p>\n<p align=\"left\">The main differences are how you pass the connection string to dbgsrv.\u00c2\u00a0 Where you would previously use &#8220;-server <em>connection-string<\/em>&#8220;, you will use &#8220;-t <em>connection-string<\/em>&#8221; with dbgsrv.\u00c2\u00a0 For instance, an example command line would be:<\/p>\n<pre>dbgsrv.exe -t tcp:port=<em>port<\/em>,password=<em>password<\/em><\/pre>\n<p align=\"left\">To connect to this process server, you can use the &#8220;-premote&#8221; parameter with a debugger client (NTSD, CDB, and\u00c2\u00a0WinDbg).\u00c2\u00a0 This parameter functions in the same way as &#8220;-remote&#8221;, except that it is for connecting to process servers and not -server-style remote debugging servers.<\/p>\n<pre>debugger -premote tcp:port=<em>port<\/em>,server=<em>server<\/em>,password=<em>password<\/em><\/pre>\n<p align=\"left\">Note that if you are using NTSD or CDB, you will need to specify a pid to connect to (e.g. -p <em>pid<\/em>) on the command line as well.\u00c2\u00a0 This is because a process server is not just fixed on one target process, but allows you to debug any process it has permissions to debug on the remote system.\u00c2\u00a0 With WinDbg, you can just open the process list (e.g. F6) like you would with a local system, and you will be presented with a list of running process to debug on the remote system.<\/p>\n<p align=\"left\">After the connection is established, you can continue to debug as if you were running the debugger directly on the remote system.\u00c2\u00a0 Remember that with process servers, things like symbol access and extension dll calls are actually performed by the <em>client debugger<\/em> and not the remote system.\u00c2\u00a0 This means that if you set the symbol path, you are setting the symbol path <em>for your debugger<\/em> and not the process server (which has no concept of a symbol path).\u00c2\u00a0 As a result, your system will be the one to access symbol repositories and not the remote system.<\/p>\n<p align=\"left\">The important thing to remember about process servers is that unlike the other remote debugging mechanisms that\u00c2\u00a0I have discussed thus far, process servers provide you with an entire &#8220;view&#8221; of the remote system and not just a remote view of a single debugging session.\u00c2\u00a0 This is in effect widening the scope of the remote debugging session from just one target to any programs running on the target system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The mechanisms used to activate a process server\u00c2\u00a0are fairly similar to those used to work with the\u00c2\u00a0-server and -remote\u00c2\u00a0remoting mechanism. To start a process server, you must use a special utility called dbgsrv.exe that is distributed with DTW.\u00c2\u00a0 This program is the server end of debugger connection. Like -server and -remote, process server \/ smart [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/36"}],"collection":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36"}],"version-history":[{"count":1,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":664,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions\/664"}],"wp:attachment":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}