ShowThreadNames tool to get thread ID/name pairs in a Chrome process

This tool is designed to test the usage of the SetThreadDescription
WinAPI in Chrome. In Chrome, the SetThreadDescription API has been
enabled to set thread names. However, since there is no tool support to
retrieve thread names set by GetThreadDescription, we will still rely on
SetNameInternal function in platform_thread_win.cc to set thread names.
Despite this, we need a tool to demo the SetThreadDescription API works,
even without the debugger to be present.

This tool incorporates the GetThreadDescription API trying to get names
of all threads in a process specified by its ID. If the thread names
have been set by SetThreadDescription API call like in Chrome, all
thread ID/name pairs are returned.

BUG=684203

Review-Url: https://codereview.chromium.org/2713773002
Cr-Original-Commit-Position: refs/heads/master@{#452617}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b97c0922116dbeb62d81790daf475495a399d264
5 files changed