[Lldb-commits] [lldb] r241572 - Fix cmake build after recent JSON changes

Pavel Labath labath at google.com
Tue Jul 7 03:08:41 PDT 2015


Author: labath
Date: Tue Jul  7 05:08:41 2015
New Revision: 241572

URL: http://llvm.org/viewvc/llvm-project?rev=241572&view=rev
Log:
Fix cmake build after recent JSON changes

I have moved StringExtractor.h into the include/ folder so that it can be properly included by
everyone.

Added:
    lldb/trunk/include/lldb/Utility/StringExtractor.h
      - copied, changed from r241553, lldb/trunk/source/Utility/StringExtractor.h
Removed:
    lldb/trunk/source/Utility/StringExtractor.h
Modified:
    lldb/trunk/include/lldb/Utility/JSON.h
    lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    lldb/trunk/source/Utility/JSON.cpp
    lldb/trunk/source/Utility/StringExtractor.cpp
    lldb/trunk/source/Utility/StringExtractorGDBRemote.h

Modified: lldb/trunk/include/lldb/Utility/JSON.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/JSON.h?rev=241572&r1=241571&r2=241572&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/JSON.h (original)
+++ lldb/trunk/include/lldb/Utility/JSON.h Tue Jul  7 05:08:41 2015
@@ -11,7 +11,7 @@
 #define utility_JSON_h_
 
 #include "lldb/Core/Stream.h"
-#include "Utility/StringExtractor.h"
+#include "lldb/Utility/StringExtractor.h"
 
 #include <inttypes.h>
 #include <map>

Copied: lldb/trunk/include/lldb/Utility/StringExtractor.h (from r241553, lldb/trunk/source/Utility/StringExtractor.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?p2=lldb/trunk/include/lldb/Utility/StringExtractor.h&p1=lldb/trunk/source/Utility/StringExtractor.h&r1=241553&r2=241572&rev=241572&view=diff
==============================================================================
    (empty)

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=241572&r1=241571&r2=241572&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Tue Jul  7 05:08:41 2015
@@ -40,10 +40,10 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/PseudoTerminal.h"
+#include "lldb/Utility/StringExtractor.h"
 
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
 #include "Plugins/Process/Utility/LinuxSignals.h"
-#include "Utility/StringExtractor.h"
 #include "NativeThreadLinux.h"
 #include "ProcFileReader.h"
 #include "Procfs.h"

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h?rev=241572&r1=241571&r2=241572&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h Tue Jul  7 05:08:41 2015
@@ -27,11 +27,11 @@
 #include "lldb/Core/ThreadSafeValue.h"
 #include "lldb/Host/HostThread.h"
 #include "lldb/lldb-private-forward.h"
+#include "lldb/Utility/StringExtractor.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
 
 #include "GDBRemoteCommunicationClient.h"
-#include "Utility/StringExtractor.h"
 #include "GDBRemoteRegisterContext.h"
 
 namespace lldb_private {

Modified: lldb/trunk/source/Utility/JSON.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/JSON.cpp?rev=241572&r1=241571&r2=241572&view=diff
==============================================================================
--- lldb/trunk/source/Utility/JSON.cpp (original)
+++ lldb/trunk/source/Utility/JSON.cpp Tue Jul  7 05:08:41 2015
@@ -8,6 +8,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Utility/JSON.h"
+
+#include <limits.h>
 #include "lldb/Core/StreamString.h"
 #include "lldb/Host/StringConvert.h"
 

Modified: lldb/trunk/source/Utility/StringExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractor.cpp?rev=241572&r1=241571&r2=241572&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringExtractor.cpp (original)
+++ lldb/trunk/source/Utility/StringExtractor.cpp Tue Jul  7 05:08:41 2015
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Utility/StringExtractor.h"
+#include "lldb/Utility/StringExtractor.h"
 
 // C Includes
 #include <stdlib.h>

Removed: lldb/trunk/source/Utility/StringExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractor.h?rev=241571&view=auto
==============================================================================
--- lldb/trunk/source/Utility/StringExtractor.h (original)
+++ lldb/trunk/source/Utility/StringExtractor.h (removed)
@@ -1,176 +0,0 @@
-//===-- StringExtractor.h ---------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef utility_StringExtractor_h_
-#define utility_StringExtractor_h_
-
-// C Includes
-// C++ Includes
-#include <string>
-#include <stdint.h>
-
-// Other libraries and framework includes
-// Project includes
-
-class StringExtractor
-{
-public:
-
-    enum {
-        BigEndian = 0,
-        LittleEndian = 1
-    };
-    //------------------------------------------------------------------
-    // Constructors and Destructors
-    //------------------------------------------------------------------
-    StringExtractor();
-    StringExtractor(const char *packet_cstr);
-    StringExtractor(const StringExtractor& rhs);
-    virtual ~StringExtractor();
-
-    //------------------------------------------------------------------
-    // Operators
-    //------------------------------------------------------------------
-    const StringExtractor&
-    operator=(const StringExtractor& rhs);
-
-    // Returns true if the file position is still valid for the data
-    // contained in this string extractor object.
-    bool
-    IsGood() const
-    {
-        return m_index != UINT64_MAX;
-    }
-
-    uint64_t
-    GetFilePos () const
-    {
-        return m_index;
-    }
-
-    void
-    SetFilePos (uint32_t idx)
-    {
-        m_index = idx;
-    }
-
-    void
-    Clear ()
-    {
-        m_packet.clear();
-        m_index = 0;
-    }
-
-    void
-    SkipSpaces ();
-
-    std::string &
-    GetStringRef ()
-    {
-        return m_packet;
-    }
-
-    const std::string &
-    GetStringRef () const
-    {
-        return m_packet;
-    }
-
-    bool
-    Empty()
-    {
-        return m_packet.empty();
-    }
-
-    size_t
-    GetBytesLeft ()
-    {
-        if (m_index < m_packet.size())
-            return m_packet.size() - m_index;
-        return 0;
-    }
-
-    char
-    GetChar (char fail_value = '\0');
-
-    char
-    PeekChar (char fail_value = '\0')
-    {
-        const char *cstr = Peek();
-        if (cstr)
-            return cstr[0];
-        return fail_value;
-    }
-
-    int
-    DecodeHexU8();
-
-    uint8_t
-    GetHexU8 (uint8_t fail_value = 0, bool set_eof_on_fail = true);
-
-    bool
-    GetNameColonValue (std::string &name, std::string &value);
-
-    int32_t
-    GetS32 (int32_t fail_value, int base = 0);
-
-    uint32_t
-    GetU32 (uint32_t fail_value, int base = 0);
-
-    int64_t
-    GetS64 (int64_t fail_value, int base = 0);
-    
-    uint64_t
-    GetU64 (uint64_t fail_value, int base = 0);
-
-    uint32_t
-    GetHexMaxU32 (bool little_endian, uint32_t fail_value);
-
-    uint64_t
-    GetHexMaxU64 (bool little_endian, uint64_t fail_value);
-
-    size_t
-    GetHexBytes (void *dst, size_t dst_len, uint8_t fail_fill_value);
-
-    size_t
-    GetHexBytesAvail (void *dst, size_t dst_len);
-
-    uint64_t
-    GetHexWithFixedSize (uint32_t byte_size, bool little_endian, uint64_t fail_value);
-
-    size_t
-    GetHexByteString (std::string &str);
-
-    size_t
-    GetHexByteStringFixedLength (std::string &str, uint32_t nibble_length);
-
-    size_t
-    GetHexByteStringTerminatedBy (std::string &str,
-                                  char terminator);
-    
-    const char *
-    Peek ()
-    {
-        if (m_index < m_packet.size())
-            return m_packet.c_str() + m_index;
-        return nullptr;
-    }
-
-protected:
-    //------------------------------------------------------------------
-    // For StringExtractor only
-    //------------------------------------------------------------------
-    std::string m_packet;   // The string in which to extract data.
-    uint64_t m_index;       // When extracting data from a packet, this index
-                            // will march along as things get extracted. If set
-                            // to UINT64_MAX the end of the packet data was
-                            // reached when decoding information
-};
-
-#endif  // utility_StringExtractor_h_

Modified: lldb/trunk/source/Utility/StringExtractorGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractorGDBRemote.h?rev=241572&r1=241571&r2=241572&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringExtractorGDBRemote.h (original)
+++ lldb/trunk/source/Utility/StringExtractorGDBRemote.h Tue Jul  7 05:08:41 2015
@@ -15,7 +15,7 @@
 #include <string>
 // Other libraries and framework includes
 // Project includes
-#include "Utility/StringExtractor.h"
+#include "lldb/Utility/StringExtractor.h"
 
 class StringExtractorGDBRemote : public StringExtractor
 {





More information about the lldb-commits mailing list