[Lldb-commits] [lldb] r193159 - Fixes to get LLDB building on Windows again.
Deepak Panickal
deepak at codeplay.com
Tue Oct 22 05:27:43 PDT 2013
Author: panickal
Date: Tue Oct 22 07:27:43 2013
New Revision: 193159
URL: http://llvm.org/viewvc/llvm-project?rev=193159&view=rev
Log:
Fixes to get LLDB building on Windows again.
Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
lldb/trunk/source/Host/common/SocketAddress.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/tools/driver/ELWrapper.cpp
lldb/trunk/tools/driver/Platform.h
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Tue Oct 22 07:27:43 2013
@@ -596,7 +596,7 @@ ClangExpressionDeclMap::GetSymbolAddress
Process *process,
const ConstString &name,
lldb::SymbolType symbol_type,
- Module *module)
+ lldb_private::Module *module)
{
SymbolContextList sc_list;
@@ -711,7 +711,7 @@ ClangExpressionDeclMap::GetSymbolAddress
const Symbol *
ClangExpressionDeclMap::FindGlobalDataSymbol (Target &target,
const ConstString &name,
- Module *module)
+ lldb_private::Module *module)
{
SymbolContextList sc_list;
Modified: lldb/trunk/source/Host/common/SocketAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/SocketAddress.cpp?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/SocketAddress.cpp (original)
+++ lldb/trunk/source/Host/common/SocketAddress.cpp Tue Oct 22 07:27:43 2013
@@ -11,7 +11,9 @@
#include <stddef.h>
// C Includes
+#if !defined(_MSC_VER)
#include <arpa/inet.h>
+#endif
#include <assert.h>
#include <string.h>
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp Tue Oct 22 07:27:43 2013
@@ -19,7 +19,7 @@
#include "lldb/Core/Log.h"
#include "lldb/Target/Process.h"
-#if defined(__linux__) or defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__)
#include "Plugins/Process/elf-core/ProcessElfCore.h"
#endif
@@ -57,7 +57,7 @@ ParseAuxvEntry(DataExtractor &data,
DataBufferSP
AuxVector::GetAuxvData()
{
-#if defined(__linux__) or defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__)
if (m_process->GetPluginName() == ProcessElfCore::GetPluginNameStatic())
return static_cast<ProcessElfCore *>(m_process)->GetAuxvData();
#endif
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Tue Oct 22 07:27:43 2013
@@ -439,7 +439,7 @@ DynamicLoaderPOSIXDYLD::LoadAllCurrentMo
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
if (log)
log->Printf("DynamicLoaderPOSIXDYLD::%s unable to resolve POSIX DYLD rendezvous address",
- __func__);
+ __FUNCTION__);
return;
}
@@ -463,7 +463,7 @@ DynamicLoaderPOSIXDYLD::LoadAllCurrentMo
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
if (log)
log->Printf("DynamicLoaderPOSIXDYLD::%s failed loading module %s at 0x%" PRIx64,
- __func__, module_path, I->base_addr);
+ __FUNCTION__, module_path, I->base_addr);
}
}
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Tue Oct 22 07:27:43 2013
@@ -177,7 +177,7 @@ GDBRemoteCommunication::SendAck ()
char ch = '+';
const size_t bytes_written = Write (&ch, 1, status, NULL);
if (log)
- log->Printf ("<%4zu> send packet: %c", bytes_written, ch);
+ log->Printf ("<" PRIx64 "> send packet: %c", (uint64_t)bytes_written, ch);
m_history.AddPacket (ch, History::ePacketTypeSend, bytes_written);
return bytes_written;
}
@@ -190,7 +190,7 @@ GDBRemoteCommunication::SendNack ()
char ch = '-';
const size_t bytes_written = Write (&ch, 1, status, NULL);
if (log)
- log->Printf ("<%4zu> send packet: %c", bytes_written, ch);
+ log->Printf("<" PRIx64 "> send packet: %c", (uint64_t)bytes_written, ch);
m_history.AddPacket (ch, History::ePacketTypeSend, bytes_written);
return bytes_written;
}
@@ -226,7 +226,7 @@ GDBRemoteCommunication::SendPacketNoLock
if (!m_history.DidDumpToLog ())
m_history.Dump (log);
- log->Printf ("<%4zu> send packet: %.*s", bytes_written, (int)packet.GetSize(), packet.GetData());
+ log->Printf("<" PRIx64 "> send packet: %.*s", (uint64_t)bytes_written, (int)packet.GetSize(), packet.GetData());
}
m_history.AddPacket (packet.GetString(), packet.GetSize(), History::ePacketTypeSend, bytes_written);
@@ -460,7 +460,7 @@ GDBRemoteCommunication::CheckForPacket (
if (!m_history.DidDumpToLog ())
m_history.Dump (log);
- log->Printf ("<%4zu> read packet: %.*s", total_length, (int)(total_length), m_bytes.c_str());
+ log->Printf("<" PRIx64 "> read packet: %.*s", (uint64_t)total_length, (int)(total_length), m_bytes.c_str());
}
m_history.AddPacket (m_bytes.c_str(), total_length, History::ePacketTypeRecv, total_length);
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Tue Oct 22 07:27:43 2013
@@ -2596,7 +2596,7 @@ GDBRemoteCommunicationClient::CloseFile
{
return ParseHostIOPacketResponse (response, -1, error) == 0;
}
- return UINT64_MAX;
+ return false;
}
// Extension of host I/O packets to get the file size.
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Oct 22 07:27:43 2013
@@ -2754,8 +2754,8 @@ Process::AllocateMemory(size_t size, uin
addr_t allocated_addr = DoAllocateMemory (size, permissions, error);
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf("Process::AllocateMemory(size=%4zu, permissions=%s) => 0x%16.16" PRIx64 " (m_stop_id = %u m_memory_id = %u)",
- size,
+ log->Printf("Process::AllocateMemory(size=%" PRIx64 ", permissions=%s) => 0x%16.16" PRIx64 " (m_stop_id = %u m_memory_id = %u)",
+ (uint64_t)size,
GetPermissionsAsCString (permissions),
(uint64_t)allocated_addr,
m_mod_id.GetStopID(),
Modified: lldb/trunk/tools/driver/ELWrapper.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/ELWrapper.cpp?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/tools/driver/ELWrapper.cpp (original)
+++ lldb/trunk/tools/driver/ELWrapper.cpp Tue Oct 22 07:27:43 2013
@@ -199,9 +199,9 @@ el_gets (EditLine *el, int *length)
if ( _prompt != NULL )
printf( _prompt );
// create a buffer for the user input
- char *buffer = new char[ 64 ];
+ char *buffer = new char[ MAX_PATH ];
// try to get user input string
- if ( el_get_s( buffer, 64 ) )
+ if ( el_get_s( buffer, MAX_PATH ) )
{
// get the string length in 'length'
while ( buffer[ *length ] != '\0' )
Modified: lldb/trunk/tools/driver/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Platform.h?rev=193159&r1=193158&r2=193159&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Platform.h (original)
+++ lldb/trunk/tools/driver/Platform.h Tue Oct 22 07:27:43 2013
@@ -12,19 +12,12 @@
#if defined( _MSC_VER )
- #define PRIu32 "u"
- #define PRId64 "I64d"
- #define PRIi64 "I64i"
- #define PRIo64 "I64o"
- #define PRIu64 "I64u"
- #define PRIx64 "I64x"
- #define PRIX64 "I64X"
-
// this will stop signal.h being included
#define _INC_SIGNAL
#include <io.h>
#include <eh.h>
+ #include <inttypes.h>
#include "ELWrapper.h"
#include "lldb/Host/windows/Windows.h"
#include "GetOptWrapper.h"
More information about the lldb-commits
mailing list