Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implment "platform process list" for Windows.
This patch implements basic functionality of the "platform process list" command for Windows. Currently this has the following limitations. * Certain types of filtering are not enabled (e.g. filtering by architecture with -a), although most filters work. * The username of the process is not yet obtained. * Using -v to list verbose information generates an error. * The architecture column displays the entire triple, leading to misaligned formatting of the printed table. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D4413 llvm-svn: 212510
- Loading branch information
Zachary Turner
committed
Jul 8, 2014
1 parent
24f3dee
commit 310035a
Showing
3 changed files
with
165 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//===-- AutoHandle.h --------------------------------------------*- C++ -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLDB_lldb_Host_windows_AutoHandle_h_ | ||
#define LLDB_lldb_Host_windows_AutoHandle_h_ | ||
|
||
namespace lldb_private { | ||
|
||
class AutoHandle { | ||
public: | ||
AutoHandle(HANDLE handle, HANDLE invalid_value = INVALID_HANDLE_VALUE) | ||
: m_handle(handle) | ||
, m_invalid_value(invalid_value) | ||
{ | ||
} | ||
|
||
~AutoHandle() | ||
{ | ||
if (m_handle != m_invalid_value) | ||
::CloseHandle(m_handle); | ||
} | ||
|
||
bool IsValid() const { return m_handle != m_invalid_value; } | ||
|
||
HANDLE get() const { return m_handle; } | ||
private: | ||
HANDLE m_handle; | ||
HANDLE m_invalid_value; | ||
}; | ||
|
||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters