Fixes to get LLDB building on Windows again.

llvm-svn: 193159
This commit is contained in:
Deepak Panickal
2013-10-22 12:27:43 +00:00
parent 0229c09d43
commit d66b50c96c
9 changed files with 18 additions and 23 deletions

View File

@@ -596,7 +596,7 @@ ClangExpressionDeclMap::GetSymbolAddress (Target &target,
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 ConstString &name, lldb::SymbolT
const Symbol *
ClangExpressionDeclMap::FindGlobalDataSymbol (Target &target,
const ConstString &name,
Module *module)
lldb_private::Module *module)
{
SymbolContextList sc_list;

View File

@@ -11,7 +11,9 @@
#include <stddef.h>
// C Includes
#if !defined(_MSC_VER)
#include <arpa/inet.h>
#endif
#include <assert.h>
#include <string.h>

View File

@@ -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

View File

@@ -439,7 +439,7 @@ DynamicLoaderPOSIXDYLD::LoadAllCurrentModules()
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::LoadAllCurrentModules()
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);
}
}

View File

@@ -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 (const char *payload, size_t payload_le
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 (const uint8_t *src, size_t src_len, Stri
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);

View File

@@ -2596,7 +2596,7 @@ GDBRemoteCommunicationClient::CloseFile (lldb::user_id_t fd,
{
return ParseHostIOPacketResponse (response, -1, error) == 0;
}
return UINT64_MAX;
return false;
}
// Extension of host I/O packets to get the file size.

View File

@@ -2754,8 +2754,8 @@ Process::AllocateMemory(size_t size, uint32_t permissions, Error &error)
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(),

View File

@@ -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' )

View File

@@ -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"