[Lldb-commits] [PATCH] Windows Build Fixes

Greg Clayton gclayton at apple.com
Mon Oct 21 11:03:32 PDT 2013


The change in source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp should return false to indicate the close didn't happen successfully.
source/DataFormatters/FormatManager.cpp changes should be reverted (whitespace only)

Other than that, looks good, commit when fixed.

On Oct 21, 2013, at 9:50 AM, Deepak Panickal <deepak2427 at gmail.com> wrote:

>  Removed the added ZuFix macro and updated to use PRIx64 instead
> 
> http://llvm-reviews.chandlerc.com/D1976
> 
> CHANGE SINCE LAST DIFF
>  http://llvm-reviews.chandlerc.com/D1976?vs=5030&id=5063#toc
> 
> Files:
>  source/DataFormatters/FormatManager.cpp
>  source/Host/common/SocketAddress.cpp
>  source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
>  source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
>  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
>  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
>  source/Target/Process.cpp
>  tools/driver/ELWrapper.cpp
>  tools/driver/Platform.h
> 
> Index: source/DataFormatters/FormatManager.cpp
> ===================================================================
> --- source/DataFormatters/FormatManager.cpp
> +++ source/DataFormatters/FormatManager.cpp
> @@ -839,11 +839,11 @@
>     sys_category_sp->GetSummaryNavigator()->Add(ConstString("char *"), string_format);
>     sys_category_sp->GetSummaryNavigator()->Add(ConstString("unsigned char *"), string_format);
>     sys_category_sp->GetRegexSummaryNavigator()->Add(any_size_char_arr, string_array_format);
> -    
> +
> #ifndef LLDB_DISABLE_PYTHON
>     AddCXXSynthetic(sys_category_sp, FooStructSynth, "Foo synth", ConstString("Foo"), ScriptedSyntheticChildren::Flags(), false);
> #endif
> -    
> +
>     lldb::TypeSummaryImplSP ostype_summary(new StringSummaryFormat(TypeSummaryImpl::Flags().SetCascades(false)
>                                                                    .SetSkipPointers(true)
>                                                                    .SetSkipReferences(true)
> Index: source/Host/common/SocketAddress.cpp
> ===================================================================
> --- source/Host/common/SocketAddress.cpp
> +++ 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>
> 
> Index: source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
> ===================================================================
> --- source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
> +++ 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 @@
> 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
> Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
> ===================================================================
> --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
> +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
> @@ -439,7 +439,7 @@
>         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 @@
>             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);
>         }
>     }
> 
> Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
> ===================================================================
> --- source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
> +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
> @@ -177,7 +177,7 @@
>     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 @@
>     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 @@
>             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 @@
>                 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);
> Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
> ===================================================================
> --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
> +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
> @@ -2596,7 +2596,7 @@
>     {
>         return ParseHostIOPacketResponse (response, -1, error) == 0;
>     }
> -    return UINT64_MAX;
> +    return true;
> }
> 
> // Extension of host I/O packets to get the file size.
> Index: source/Target/Process.cpp
> ===================================================================
> --- source/Target/Process.cpp
> +++ source/Target/Process.cpp
> @@ -2754,8 +2754,8 @@
>     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(),
> Index: tools/driver/ELWrapper.cpp
> ===================================================================
> --- tools/driver/ELWrapper.cpp
> +++ tools/driver/ELWrapper.cpp
> @@ -199,9 +199,9 @@
>     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' )
> Index: tools/driver/Platform.h
> ===================================================================
> --- tools/driver/Platform.h
> +++ 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"
> <D1976.3.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list