[Lldb-commits] [lldb] r230531 - Revert "Fix warnings found with clang-cl."
Zachary Turner
zturner at google.com
Wed Feb 25 11:52:42 PST 2015
Author: zturner
Date: Wed Feb 25 13:52:41 2015
New Revision: 230531
URL: http://llvm.org/viewvc/llvm-project?rev=230531&view=rev
Log:
Revert "Fix warnings found with clang-cl."
SWIG doesn't like enum : unsigned. Revert this until I can
fix this in a way that swig likes.
Modified:
lldb/trunk/include/lldb/API/SBCommunication.h
lldb/trunk/include/lldb/API/SBValue.h
lldb/trunk/include/lldb/Core/Communication.h
lldb/trunk/include/lldb/Host/OptionParser.h
lldb/trunk/include/lldb/Host/Socket.h
lldb/trunk/include/lldb/Host/msvc/Config.h
lldb/trunk/include/lldb/Host/windows/getopt/GetOptInc.h
lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h
lldb/trunk/include/lldb/Symbol/Type.h
lldb/trunk/include/lldb/Target/SectionLoadHistory.h
lldb/trunk/include/lldb/lldb-enumerations.h
lldb/trunk/source/Host/common/OptionParser.cpp
lldb/trunk/source/Host/common/Socket.cpp
lldb/trunk/source/Host/common/Terminal.cpp
lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp
lldb/trunk/source/Host/windows/EditLineWin.cpp
lldb/trunk/source/Host/windows/HostProcessWindows.cpp
lldb/trunk/source/Host/windows/ThisThread.cpp
lldb/trunk/source/Host/windows/getopt/GetOptInc.cpp
lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
lldb/trunk/source/Plugins/Process/Windows/DebuggerThread.cpp
lldb/trunk/source/Plugins/Process/Windows/LocalDebugDelegate.h
lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp
lldb/trunk/source/Plugins/Process/Windows/TargetThreadWindows.cpp
lldb/trunk/source/Plugins/Process/Windows/x86/RegisterContextWindows_x86.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Utility/PseudoTerminal.cpp
Modified: lldb/trunk/include/lldb/API/SBCommunication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommunication.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommunication.h (original)
+++ lldb/trunk/include/lldb/API/SBCommunication.h Wed Feb 25 13:52:41 2015
@@ -18,7 +18,7 @@ namespace lldb {
class LLDB_API SBCommunication
{
public:
- enum : unsigned {
+ enum {
eBroadcastBitDisconnected = (1 << 0), ///< Sent when the communications connection is lost.
eBroadcastBitReadThreadGotBytes = (1 << 1), ///< Sent by the read thread when bytes become available.
eBroadcastBitReadThreadDidExit = (1 << 2), ///< Sent by the read thread when it exits to inform clients.
Modified: lldb/trunk/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValue.h (original)
+++ lldb/trunk/include/lldb/API/SBValue.h Wed Feb 25 13:52:41 2015
@@ -21,6 +21,7 @@ namespace lldb {
class LLDB_API SBValue
{
+friend class ValueLocker;
public:
SBValue ();
Modified: lldb/trunk/include/lldb/Core/Communication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Communication.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Communication.h (original)
+++ lldb/trunk/include/lldb/Core/Communication.h Wed Feb 25 13:52:41 2015
@@ -85,14 +85,14 @@ namespace lldb_private {
class Communication : public Broadcaster
{
public:
- enum : unsigned {
- eBroadcastBitDisconnected = (1u << 0), ///< Sent when the communications connection is lost.
- eBroadcastBitReadThreadGotBytes = (1u << 1), ///< Sent by the read thread when bytes become available.
- eBroadcastBitReadThreadDidExit = (1u << 2), ///< Sent by the read thread when it exits to inform clients.
- eBroadcastBitReadThreadShouldExit = (1u << 3), ///< Sent by clients that need to cancel the read thread.
- eBroadcastBitPacketAvailable = (1u << 4), ///< Sent when data received makes a complete packet.
- kLoUserBroadcastBit = (1u << 16),///< Subclasses can used bits 31:16 for any needed events.
- kHiUserBroadcastBit = (1u << 31),
+ enum {
+ eBroadcastBitDisconnected = (1 << 0), ///< Sent when the communications connection is lost.
+ eBroadcastBitReadThreadGotBytes = (1 << 1), ///< Sent by the read thread when bytes become available.
+ eBroadcastBitReadThreadDidExit = (1 << 2), ///< Sent by the read thread when it exits to inform clients.
+ eBroadcastBitReadThreadShouldExit = (1 << 3), ///< Sent by clients that need to cancel the read thread.
+ eBroadcastBitPacketAvailable = (1 << 4), ///< Sent when data received makes a complete packet.
+ kLoUserBroadcastBit = (1 << 16),///< Subclasses can used bits 31:16 for any needed events.
+ kHiUserBroadcastBit = (1 << 31),
eAllEventBits = 0xffffffff
};
Modified: lldb/trunk/include/lldb/Host/OptionParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/OptionParser.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/OptionParser.h (original)
+++ lldb/trunk/include/lldb/Host/OptionParser.h Wed Feb 25 13:52:41 2015
@@ -46,7 +46,7 @@ public:
const char *optstring,
const Option *longopts, int *longindex);
- static const char* GetOptionArgument();
+ static char* GetOptionArgument();
static int GetOptionIndex();
static int GetOptionErrorCause();
static std::string GetShortOptionString(struct option *long_options);
Modified: lldb/trunk/include/lldb/Host/Socket.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Socket.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Socket.h (original)
+++ lldb/trunk/include/lldb/Host/Socket.h Wed Feb 25 13:52:41 2015
@@ -34,10 +34,8 @@ namespace lldb_private {
#if defined(_MSC_VER)
typedef SOCKET NativeSocket;
- inline bool IS_VALID_SOCKET(NativeSocket socket) { return socket != INVALID_SOCKET; }
#else
typedef int NativeSocket;
- inline bool IS_VALID_SOCKET(NativeSocket socket) { return socket >= 0; }
#endif
class Socket : public IOObject
Modified: lldb/trunk/include/lldb/Host/msvc/Config.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/msvc/Config.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/msvc/Config.h (original)
+++ lldb/trunk/include/lldb/Host/msvc/Config.h Wed Feb 25 13:52:41 2015
@@ -29,7 +29,7 @@
#if _HAS_EXCEPTIONS == 0
// Exceptions are disabled so this isn't defined, but concrt assumes it is.
-inline void *__uncaught_exception() { return nullptr; }
+static void *__uncaught_exception() { return nullptr; }
#endif
#endif // #ifndef liblldb_Platform_Config_h_
Modified: lldb/trunk/include/lldb/Host/windows/getopt/GetOptInc.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/windows/getopt/GetOptInc.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/windows/getopt/GetOptInc.h (original)
+++ lldb/trunk/include/lldb/Host/windows/getopt/GetOptInc.h Wed Feb 25 13:52:41 2015
@@ -21,7 +21,7 @@ struct option
int getopt( int argc, char * const argv[], const char *optstring );
// from getopt.h
-extern const char * optarg;
+extern char * optarg;
extern int optind;
extern int opterr;
extern int optopt;
Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h (original)
+++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h Wed Feb 25 13:52:41 2015
@@ -34,6 +34,8 @@ class ScriptInterpreterPython :
{
public:
+ friend class IOHandlerPythonInterpreter;
+
ScriptInterpreterPython (CommandInterpreter &interpreter);
~ScriptInterpreterPython ();
Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Wed Feb 25 13:52:41 2015
@@ -71,7 +71,7 @@ public:
eEncodingIsSyntheticUID
} EncodingDataType;
- typedef enum ResolveStateTag : unsigned
+ typedef enum ResolveStateTag
{
eResolveStateUnresolved = 0,
eResolveStateForward = 1,
Modified: lldb/trunk/include/lldb/Target/SectionLoadHistory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/SectionLoadHistory.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/SectionLoadHistory.h (original)
+++ lldb/trunk/include/lldb/Target/SectionLoadHistory.h Wed Feb 25 13:52:41 2015
@@ -23,7 +23,7 @@ namespace lldb_private {
class SectionLoadHistory
{
public:
- enum : unsigned {
+ enum {
// Pass eStopIDNow to any function that takes a stop ID to get
// the current value.
eStopIDNow = UINT32_MAX
Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Wed Feb 25 13:52:41 2015
@@ -652,7 +652,7 @@ namespace lldb {
eBasicTypeOther
} BasicType;
- typedef enum TypeClass : unsigned
+ typedef enum TypeClass
{
eTypeClassInvalid = (0u),
eTypeClassArray = (1u << 0),
Modified: lldb/trunk/source/Host/common/OptionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/OptionParser.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/OptionParser.cpp (original)
+++ lldb/trunk/source/Host/common/OptionParser.cpp Wed Feb 25 13:52:41 2015
@@ -54,7 +54,7 @@ OptionParser::Parse (int argc,
return getopt_long_only(argc, argv, optstring, &opts[0], longindex);
}
-const char*
+char*
OptionParser::GetOptionArgument()
{
return optarg;
Modified: lldb/trunk/source/Host/common/Socket.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Socket.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Socket.cpp (original)
+++ lldb/trunk/source/Host/common/Socket.cpp Wed Feb 25 13:52:41 2015
@@ -699,7 +699,7 @@ int Socket::SetOption(int level, int opt
uint16_t Socket::GetLocalPortNumber(const NativeSocket& socket)
{
// We bound to port zero, so we need to figure out which port we actually bound to
- if (IS_VALID_SOCKET(socket))
+ if (socket >= 0)
{
SocketAddress sock_addr;
socklen_t sock_addr_len = sock_addr.GetMaxLength ();
@@ -730,7 +730,7 @@ std::string Socket::GetLocalIPAddress (
uint16_t Socket::GetRemotePortNumber () const
{
- if (IS_VALID_SOCKET(m_socket))
+ if (m_socket >= 0)
{
SocketAddress sock_addr;
socklen_t sock_addr_len = sock_addr.GetMaxLength ();
@@ -743,7 +743,7 @@ uint16_t Socket::GetRemotePortNumber ()
std::string Socket::GetRemoteIPAddress () const
{
// We bound to port zero, so we need to figure out which port we actually bound to
- if (IS_VALID_SOCKET(m_socket))
+ if (m_socket >= 0)
{
SocketAddress sock_addr;
socklen_t sock_addr_len = sock_addr.GetMaxLength ();
Modified: lldb/trunk/source/Host/common/Terminal.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Terminal.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Terminal.cpp (original)
+++ lldb/trunk/source/Host/common/Terminal.cpp Wed Feb 25 13:52:41 2015
@@ -180,18 +180,20 @@ TerminalState::Save (int fd, bool save_p
bool
TerminalState::Restore () const
{
-#ifndef LLDB_DISABLE_POSIX
if (IsValid())
{
const int fd = m_tty.GetFileDescriptor();
+#ifndef LLDB_DISABLE_POSIX
if (TFlagsIsValid())
fcntl (fd, F_SETFL, m_tflags);
+#endif
#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
if (TTYStateIsValid())
tcsetattr (fd, TCSANOW, m_termios_ap.get());
#endif // #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#ifndef LLDB_DISABLE_POSIX
if (ProcessGroupIsValid())
{
// Save the original signal handler.
@@ -202,9 +204,9 @@ TerminalState::Restore () const
// Restore the original signal handler.
signal (SIGTTOU, saved_sigttou_callback);
}
+#endif
return true;
}
-#endif
return false;
}
Modified: lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp Wed Feb 25 13:52:41 2015
@@ -208,9 +208,9 @@ ConnectionGenericFile::Read(void *dst, s
TimeValue time_value;
time_value.OffsetWithMicroSeconds(timeout_usec);
DWORD milliseconds = time_value.milliseconds();
- DWORD wait_result = ::WaitForMultipleObjects(llvm::array_lengthof(m_event_handles), m_event_handles, FALSE, milliseconds);
+ result = ::WaitForMultipleObjects(llvm::array_lengthof(m_event_handles), m_event_handles, FALSE, milliseconds);
// All of the events are manual reset events, so make sure we reset them to non-signalled.
- switch (wait_result)
+ switch (result)
{
case WAIT_OBJECT_0 + kBytesAvailableEvent:
break;
Modified: lldb/trunk/source/Host/windows/EditLineWin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/EditLineWin.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/EditLineWin.cpp (original)
+++ lldb/trunk/source/Host/windows/EditLineWin.cpp Wed Feb 25 13:52:41 2015
@@ -247,10 +247,10 @@ el_set (EditLine *el, int code, ...)
// get the function pointer from the arg list
void *func_vp = (void*)va_arg(vl, el_prompt_func);
- va_arg(vl, int);
+ char escape = (char)va_arg(vl, int);
// call to get the prompt as a string
el_prompt_func func_fp = (el_prompt_func)func_vp;
- func_fp(el);
+ const char *newPrompt = func_fp(el);
}
break;
Modified: lldb/trunk/source/Host/windows/HostProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/HostProcessWindows.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/HostProcessWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/HostProcessWindows.cpp Wed Feb 25 13:52:41 2015
@@ -120,7 +120,7 @@ HostProcessWindows::MonitorThread(void *
MonitorInfo *info = static_cast<MonitorInfo *>(thread_arg);
if (info)
{
- ::WaitForSingleObject(info->process_handle, INFINITE);
+ DWORD wait_result = ::WaitForSingleObject(info->process_handle, INFINITE);
::GetExitCodeProcess(info->process_handle, &exit_code);
info->callback(info->baton, ::GetProcessId(info->process_handle), true, 0, exit_code);
::CloseHandle(info->process_handle);
Modified: lldb/trunk/source/Host/windows/ThisThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/ThisThread.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/ThisThread.cpp (original)
+++ lldb/trunk/source/Host/windows/ThisThread.cpp Wed Feb 25 13:52:41 2015
@@ -20,6 +20,8 @@ using namespace lldb_private;
namespace
{
+static const DWORD MS_VC_EXCEPTION = 0x406D1388;
+
#pragma pack(push, 8)
struct THREADNAME_INFO
{
@@ -36,9 +38,7 @@ ThisThread::SetName(llvm::StringRef name
{
// Other compilers don't yet support SEH, so we can only set the thread if compiling with MSVC.
// TODO(zturner): Once clang-cl supports SEH, relax this conditional.
-#if defined(_MSC_VER) && !defined(__clang__) /* clang-cl doesn't support SEH */
- static const DWORD MS_VC_EXCEPTION = 0x406D1388;
-
+#if defined(_MSC_VER)
THREADNAME_INFO info;
info.dwType = 0x1000;
info.szName = name.data();
Modified: lldb/trunk/source/Host/windows/getopt/GetOptInc.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/getopt/GetOptInc.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/getopt/GetOptInc.cpp (original)
+++ lldb/trunk/source/Host/windows/getopt/GetOptInc.cpp Wed Feb 25 13:52:41 2015
@@ -9,7 +9,7 @@ int opterr = 1; /* if error message
int optind = 1; /* index into parent argv vector */
int optopt = '?'; /* character checked for validity */
int optreset; /* reset getopt */
-const char *optarg; /* argument associated with option */
+char *optarg; /* argument associated with option */
#define PRINT_ERROR ((opterr) && (*options != ':'))
@@ -31,12 +31,20 @@ static int parse_long_options(char * con
static int gcd(int, int);
static void permute_args(int, int, int, char * const *);
-static const char *place = EMSG; /* option letter processing */
+static char *place = EMSG; /* option letter processing */
/* XXX: set optreset to 1 rather than these two */
static int nonopt_start = -1; /* first non option argument (for permute) */
static int nonopt_end = -1; /* first option after non options (for permute) */
+/* Error messages */
+static const char recargchar[] = "option requires an argument -- %c";
+static const char recargstring[] = "option requires an argument -- %s";
+static const char ambig[] = "ambiguous option -- %.*s";
+static const char noarg[] = "option doesn't take an argument -- %.*s";
+static const char illoptchar[] = "unknown option -- %c";
+static const char illoptstring[] = "unknown option -- %s";
+
/*
* Compute the greatest common divisor of a and b.
*/
@@ -104,7 +112,7 @@ static int
parse_long_options(char * const *nargv, const char *options,
const struct option *long_options, int *idx, int short_too)
{
- const char *current_argv, *has_equal;
+ char *current_argv, *has_equal;
size_t current_argv_len;
int i, match;
Modified: lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp Wed Feb 25 13:52:41 2015
@@ -269,7 +269,7 @@ ABISysV_hexagon::PrepareTrivialCall ( Th
#if HEX_ABI_DEBUG
// print the original stack pointer
- printf( "sp : %04llx \n", sp );
+ printf( "sp : %04lx \n", sp );
#endif
// make sure number of parameters matches prototype
@@ -337,7 +337,7 @@ ABISysV_hexagon::PrepareTrivialCall ( Th
uint32_t data = 0;
lldb::addr_t addr = sp + i * 4;
proc->ReadMemory( addr, (void*)&data, sizeof( data ), error );
- printf( "\n0x%04llx 0x%08x ", addr, data );
+ printf( "\n0x%04lx 0x%08x ", addr, data );
if ( i == 0 ) printf( "<<-- sp" );
}
printf( "\n" );
Modified: lldb/trunk/source/Plugins/Process/Windows/DebuggerThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/DebuggerThread.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/DebuggerThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/DebuggerThread.cpp Wed Feb 25 13:52:41 2015
@@ -79,6 +79,7 @@ DebuggerThread::DebuggerThreadRoutine(co
// Grab a shared_ptr reference to this so that we know it won't get deleted until after the
// thread routine has exited.
std::shared_ptr<DebuggerThread> this_ref(shared_from_this());
+ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Error error;
ProcessLauncherWindows launcher;
Modified: lldb/trunk/source/Plugins/Process/Windows/LocalDebugDelegate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/LocalDebugDelegate.h?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/LocalDebugDelegate.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/LocalDebugDelegate.h Wed Feb 25 13:52:41 2015
@@ -40,7 +40,7 @@ namespace lldb_private
class LocalDebugDelegate : public IDebugDelegate
{
public:
- explicit LocalDebugDelegate(lldb::ProcessSP process);
+ explicit LocalDebugDelegate::LocalDebugDelegate(lldb::ProcessSP process);
virtual void OnExitProcess(uint32_t exit_code) override;
virtual void OnDebuggerConnected(lldb::addr_t image_base) override;
Modified: lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp Wed Feb 25 13:52:41 2015
@@ -55,8 +55,8 @@ class ProcessWindowsData
{
public:
ProcessWindowsData(const ProcessLaunchInfo &launch_info)
- : m_launch_info(launch_info)
- , m_initial_stop_event(nullptr)
+ : m_initial_stop_event(nullptr)
+ , m_launch_info(launch_info)
, m_initial_stop_received(false)
{
m_initial_stop_event = ::CreateEvent(nullptr, TRUE, FALSE, nullptr);
@@ -334,6 +334,7 @@ ProcessWindows::RefreshStateAfterStop()
BreakpointSiteSP site(GetBreakpointSiteList().FindByAddress(pc - 1));
if (site && site->ValidForThisThread(stop_thread.get()))
{
+ lldb::break_id_t break_id = LLDB_INVALID_BREAK_ID;
stop_info = StopInfo::CreateStopReasonWithBreakpointSiteID(*stop_thread, site->GetID());
register_context->SetPC(pc - 1);
}
@@ -392,6 +393,7 @@ void ProcessWindows::DidLaunch()
{
llvm::sys::ScopedLock lock(m_mutex);
+ StateType state = GetPrivateState();
// The initial stop won't broadcast the state change event, so account for that here.
if (m_session_data && GetPrivateState() == eStateStopped &&
m_session_data->m_launch_info.GetFlags().Test(eLaunchFlagStopAtEntry))
@@ -555,6 +557,7 @@ ProcessWindows::OnDebugException(bool fi
}
ExceptionResult result = ExceptionResult::SendToApplication;
+ lldb::StateType state = GetPrivateState();
switch (record.GetExceptionCode())
{
case EXCEPTION_BREAKPOINT:
Modified: lldb/trunk/source/Plugins/Process/Windows/TargetThreadWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/TargetThreadWindows.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/TargetThreadWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/TargetThreadWindows.cpp Wed Feb 25 13:52:41 2015
@@ -38,7 +38,7 @@ TargetThreadWindows::~TargetThreadWindow
void
TargetThreadWindows::RefreshStateAfterStop()
{
- ::SuspendThread(m_host_thread.GetNativeThread().GetSystemHandle());
+ DWORD old_suspend_count = ::SuspendThread(m_host_thread.GetNativeThread().GetSystemHandle());
GetRegisterContext()->InvalidateIfNeeded(false);
}
Modified: lldb/trunk/source/Plugins/Process/Windows/x86/RegisterContextWindows_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/x86/RegisterContextWindows_x86.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/x86/RegisterContextWindows_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/x86/RegisterContextWindows_x86.cpp Wed Feb 25 13:52:41 2015
@@ -93,8 +93,8 @@ RegisterSet g_register_sets[] = {
//------------------------------------------------------------------
RegisterContextWindows_x86::RegisterContextWindows_x86(Thread &thread, uint32_t concrete_frame_idx)
: RegisterContext(thread, concrete_frame_idx)
- , m_context()
, m_context_stale(true)
+ , m_context()
{
}
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Wed Feb 25 13:52:41 2015
@@ -5010,6 +5010,7 @@ public:
if (OpenPipes())
{
const int read_fd = m_read_file.GetDescriptor();
+ const int pipe_read_fd = m_pipe.GetReadFileDescriptor();
TerminalState terminal_state;
terminal_state.Save (read_fd, false);
Terminal terminal(read_fd);
@@ -5017,7 +5018,6 @@ public:
terminal.SetEcho(false);
// FD_ZERO, FD_SET are not supported on windows
#ifndef _WIN32
- const int pipe_read_fd = m_pipe.GetReadFileDescriptor();
while (!GetIsDone())
{
fd_set read_fdset;
Modified: lldb/trunk/source/Utility/PseudoTerminal.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/PseudoTerminal.cpp?rev=230531&r1=230530&r2=230531&view=diff
==============================================================================
--- lldb/trunk/source/Utility/PseudoTerminal.cpp (original)
+++ lldb/trunk/source/Utility/PseudoTerminal.cpp Wed Feb 25 13:52:41 2015
@@ -235,13 +235,14 @@ PseudoTerminal::GetSlaveName (char *erro
lldb::pid_t
PseudoTerminal::Fork (char *error_str, size_t error_len)
{
- pid_t pid = LLDB_INVALID_PROCESS_ID;
-#if !defined(_MSC_VER)
if (error_str)
error_str[0] = '\0';
+ pid_t pid = LLDB_INVALID_PROCESS_ID;
int flags = O_RDWR;
+#if !defined(_MSC_VER)
flags |= O_CLOEXEC;
+#endif
if (OpenFirstAvailableMaster (flags, error_str, error_len))
{
// Successfully opened our master pseudo terminal
@@ -299,7 +300,6 @@ PseudoTerminal::Fork (char *error_str, s
// Do nothing and let the pid get returned!
}
}
-#endif
return pid;
}
More information about the lldb-commits
mailing list