summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Expression/ClangExpressionDeclMap.cpp4
-rw-r--r--lldb/source/Host/common/SocketAddress.cpp2
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp4
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp4
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp8
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp2
-rw-r--r--lldb/source/Target/Process.cpp4
-rw-r--r--lldb/tools/driver/ELWrapper.cpp4
-rw-r--r--lldb/tools/driver/Platform.h9
9 files changed, 18 insertions, 23 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp
index 5a0b646e004..1944495591e 100644
--- a/lldb/source/Expression/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp
@@ -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;
diff --git a/lldb/source/Host/common/SocketAddress.cpp b/lldb/source/Host/common/SocketAddress.cpp
index 286414f93cc..1fa7531af9d 100644
--- a/lldb/source/Host/common/SocketAddress.cpp
+++ b/lldb/source/Host/common/SocketAddress.cpp
@@ -11,7 +11,9 @@
#include <stddef.h>
// C Includes
+#if !defined(_MSC_VER)
#include <arpa/inet.h>
+#endif
#include <assert.h>
#include <string.h>
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
index 2604ae67016..c079d0fc381 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
@@ -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
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
index daccd091fa0..8e8314feb7d 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -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);
}
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 5e0a2fff16c..f742bfce34b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -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);
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 7761b166d1c..dc4fa10f8c2 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -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.
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 45d177642d0..e8ec869e88c 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -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(),
diff --git a/lldb/tools/driver/ELWrapper.cpp b/lldb/tools/driver/ELWrapper.cpp
index d576613abe7..258f47e5169 100644
--- a/lldb/tools/driver/ELWrapper.cpp
+++ b/lldb/tools/driver/ELWrapper.cpp
@@ -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' )
diff --git a/lldb/tools/driver/Platform.h b/lldb/tools/driver/Platform.h
index 6a3e8421cda..f1fe1e4aac1 100644
--- a/lldb/tools/driver/Platform.h
+++ b/lldb/tools/driver/Platform.h
@@ -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"
OpenPOWER on IntegriCloud