diff options
127 files changed, 1960 insertions, 845 deletions
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolver.h b/lldb/include/lldb/Breakpoint/BreakpointResolver.h index 75a10d82887..7a57250d632 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointResolver.h +++ b/lldb/include/lldb/Breakpoint/BreakpointResolver.h @@ -15,7 +15,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Breakpoint/Breakpoint.h" -#include "lldb/Breakpoint/BreakpointResolver.h" #include "lldb/Core/Address.h" #include "lldb/Core/SearchFilter.h" #include "lldb/Utility/ConstString.h" diff --git a/lldb/include/lldb/Core/Address.h b/lldb/include/lldb/Core/Address.h index 909a0605eae..a800570ec8b 100644 --- a/lldb/include/lldb/Core/Address.h +++ b/lldb/include/lldb/Core/Address.h @@ -10,13 +10,44 @@ #ifndef liblldb_Address_h_ #define liblldb_Address_h_ -// C Includes -// C++ Includes +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS +#include "lldb/lldb-enumerations.h" // for AddressClass::eAddressClassInvalid +#include "lldb/lldb-forward.h" // for SectionWP, SectionSP, ModuleSP +#include "lldb/lldb-types.h" // for addr_t -// Other libraries and framework includes -// Project includes -#include "lldb/Symbol/SymbolContextScope.h" -#include "lldb/lldb-private.h" +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, UINT32_MAX, int64_t + +namespace lldb_private { +class Block; +} +namespace lldb_private { +class CompileUnit; +} +namespace lldb_private { +class ExecutionContextScope; +} +namespace lldb_private { +class Function; +} +namespace lldb_private { +class SectionList; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class Symbol; +} +namespace lldb_private { +class SymbolContext; +} +namespace lldb_private { +class Target; +} +namespace lldb_private { +struct LineEntry; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/AddressRange.h b/lldb/include/lldb/Core/AddressRange.h index fa9fefbc0df..e787d1d5740 100644 --- a/lldb/include/lldb/Core/AddressRange.h +++ b/lldb/include/lldb/Core/AddressRange.h @@ -10,11 +10,21 @@ #ifndef liblldb_AddressRange_h_ #define liblldb_AddressRange_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/Address.h" +#include "lldb/lldb-forward.h" // for SectionSP +#include "lldb/lldb-types.h" // for addr_t + +#include <stddef.h> // for size_t + +namespace lldb_private { +class SectionList; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class Target; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/AddressResolver.h b/lldb/include/lldb/Core/AddressResolver.h index 4b0c8f3b0f2..432268e497b 100644 --- a/lldb/include/lldb/Core/AddressResolver.h +++ b/lldb/include/lldb/Core/AddressResolver.h @@ -10,20 +10,20 @@ #ifndef liblldb_AddressResolver_h_ #define liblldb_AddressResolver_h_ -#include <vector> - -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/Address.h" #include "lldb/Core/AddressRange.h" #include "lldb/Core/SearchFilter.h" -#include "lldb/Utility/ConstString.h" -#include "lldb/Utility/FileSpec.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN + +#include <stddef.h> // for size_t +#include <vector> namespace lldb_private { +class ModuleList; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { //---------------------------------------------------------------------- /// @class AddressResolver AddressResolver.h "lldb/Core/AddressResolver.h" diff --git a/lldb/include/lldb/Core/AddressResolverFileLine.h b/lldb/include/lldb/Core/AddressResolverFileLine.h index 950750e5bfa..ec15cc76d88 100644 --- a/lldb/include/lldb/Core/AddressResolverFileLine.h +++ b/lldb/include/lldb/Core/AddressResolverFileLine.h @@ -10,8 +10,22 @@ #ifndef liblldb_AddressResolverFileLine_h_ #define liblldb_AddressResolverFileLine_h_ -// Project includes #include "lldb/Core/AddressResolver.h" +#include "lldb/Core/SearchFilter.h" // for Searcher, Searcher::CallbackR... +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN + +#include <stdint.h> // for uint32_t + +namespace lldb_private { +class Address; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolContext; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/AddressResolverName.h b/lldb/include/lldb/Core/AddressResolverName.h index 90ac74a6970..aadc0549599 100644 --- a/lldb/include/lldb/Core/AddressResolverName.h +++ b/lldb/include/lldb/Core/AddressResolverName.h @@ -10,10 +10,21 @@ #ifndef liblldb_AddressResolverName_h_ #define liblldb_AddressResolverName_h_ -// Project includes - #include "lldb/Core/AddressResolver.h" +#include "lldb/Core/SearchFilter.h" // for Searcher, Searcher::Call... +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/RegularExpression.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN + +namespace lldb_private { +class Address; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolContext; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ArchSpec.h b/lldb/include/lldb/Core/ArchSpec.h index cdaee0e7a4e..648815c2137 100644 --- a/lldb/include/lldb/Core/ArchSpec.h +++ b/lldb/include/lldb/Core/ArchSpec.h @@ -14,13 +14,29 @@ #include "lldb/Utility/ConstString.h" #include "lldb/lldb-enumerations.h" -#include "lldb/lldb-forward.h" #include "lldb/lldb-private-enumerations.h" +#include "llvm/ADT/StringRef.h" // for StringRef #include "llvm/ADT/Triple.h" +#include <string> // for string + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t + +namespace lldb_private { +class Platform; +} namespace lldb_private { +class Stream; +} +namespace lldb_private { +class StringList; +} +namespace lldb_private { +class Thread; +} -struct CoreDefinition; +namespace lldb_private { //---------------------------------------------------------------------- /// @class ArchSpec ArchSpec.h "lldb/Core/ArchSpec.h" diff --git a/lldb/include/lldb/Core/Broadcaster.h b/lldb/include/lldb/Core/Broadcaster.h index 6941fda60ed..825287db598 100644 --- a/lldb/include/lldb/Core/Broadcaster.h +++ b/lldb/include/lldb/Core/Broadcaster.h @@ -10,21 +10,33 @@ #ifndef liblldb_Broadcaster_h_ #define liblldb_Broadcaster_h_ -// C Includes -// C++ Includes -#include <functional> -#include <list> +#include "lldb/Utility/ConstString.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-forward.h" // for ListenerSP, EventSP, Broadcast... + +#include "llvm/ADT/SmallVector.h" + +#include <cstdint> // for uint32_t, UINT32_MAX #include <map> +#include <memory> // for shared_ptr, operator==, enable... #include <mutex> +#include <set> // for set #include <string> +#include <utility> // for pair #include <vector> -// Other libraries and framework includes -// Project includes -#include "lldb/Utility/ConstString.h" -#include "lldb/lldb-private.h" - -#include "llvm/ADT/SmallVector.h" +namespace lldb_private { +class Broadcaster; +} +namespace lldb_private { +class EventData; +} +namespace lldb_private { +class Listener; +} +namespace lldb_private { +class Stream; +} namespace lldb_private { @@ -82,8 +94,8 @@ protected: public: // Listeners hold onto weak pointers to their broadcaster managers. So they - // must be - // made into shared pointers, which you do with MakeBroadcasterManager. + // must be made into shared pointers, which you do with + // MakeBroadcasterManager. static lldb::BroadcasterManagerSP MakeBroadcasterManager(); diff --git a/lldb/include/lldb/Core/Communication.h b/lldb/include/lldb/Core/Communication.h index ac68b0fe6db..9459573ca90 100644 --- a/lldb/include/lldb/Core/Communication.h +++ b/lldb/include/lldb/Core/Communication.h @@ -10,19 +10,31 @@ #ifndef liblldb_Communication_h_ #define liblldb_Communication_h_ -// C Includes -// C++ Includes +#include "lldb/Core/Broadcaster.h" +#include "lldb/Host/HostThread.h" +#include "lldb/Utility/Timeout.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ConnectionStatus, FLAGS_ANONYMOU... +#include "lldb/lldb-forward.h" // for ConnectionSP +#include "lldb/lldb-types.h" // for thread_arg_t, thread_result_t + #include <atomic> #include <mutex> +#include <ratio> // for micro #include <string> -// Other libraries and framework includes -// Project includes -#include "lldb/Core/Broadcaster.h" -#include "lldb/Host/HostThread.h" -#include "lldb/Utility/Error.h" -#include "lldb/Utility/Timeout.h" -#include "lldb/lldb-private.h" +#include <stddef.h> // for size_t +#include <stdint.h> // for uint8_t + +namespace lldb_private { +class Connection; +} +namespace lldb_private { +class ConstString; +} +namespace lldb_private { +class Error; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/Connection.h b/lldb/include/lldb/Core/Connection.h index 6ff7b001a70..8d84377e375 100644 --- a/lldb/include/lldb/Core/Connection.h +++ b/lldb/include/lldb/Core/Connection.h @@ -10,15 +10,24 @@ #ifndef liblldb_Connection_h_ #define liblldb_Connection_h_ -// Other libraries and framework includes -// Project includes -#include "lldb/Utility/Timeout.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ConnectionStatus +#include "lldb/lldb-forward.h" // for IOObjectSP -// C Includes -// C++ Includes +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <ratio> // for micro #include <string> +#include <stddef.h> // for size_t + +namespace lldb_private { +class Error; +} +namespace lldb_private { +template <typename Ratio> class Timeout; +} + namespace lldb_private { //---------------------------------------------------------------------- diff --git a/lldb/include/lldb/Core/Debugger.h b/lldb/include/lldb/Core/Debugger.h index 843742a87da..56201273fdd 100644 --- a/lldb/include/lldb/Core/Debugger.h +++ b/lldb/include/lldb/Core/Debugger.h @@ -14,9 +14,7 @@ #include <stdint.h> // C++ Includes -#include <map> #include <memory> -#include <mutex> #include <vector> // Other libraries and framework includes @@ -24,23 +22,55 @@ #include "lldb/Core/Broadcaster.h" #include "lldb/Core/FormatEntity.h" #include "lldb/Core/IOHandler.h" -#include "lldb/Core/Listener.h" #include "lldb/Core/SourceManager.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Host/HostThread.h" #include "lldb/Host/Terminal.h" +#include "lldb/Target/ExecutionContext.h" // for ExecutionContext #include "lldb/Target/Platform.h" #include "lldb/Target/TargetList.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/Error.h" // for Error +#include "lldb/Utility/FileSpec.h" // for FileSpec #include "lldb/Utility/UserID.h" -#include "lldb/lldb-public.h" - +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ScriptLanguage, Langua... +#include "lldb/lldb-forward.h" // for StreamFileSP, DebuggerSP +#include "lldb/lldb-private-enumerations.h" // for VarSetOperationType +#include "lldb/lldb-private-types.h" // for LoadPluginCallbackType +#include "lldb/lldb-types.h" // for LogOutputCallback, thr... + +#include "llvm/ADT/ArrayRef.h" // for ArrayRef +#include "llvm/ADT/StringMap.h" // for StringMap +#include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/Support/DynamicLibrary.h" // for DynamicLibrary #include "llvm/Support/Threading.h" +#include <assert.h> // for assert +#include <stddef.h> // for size_t +#include <stdio.h> + +namespace lldb_private { +class Address; +} +namespace lldb_private { +class CommandInterpreter; +} +namespace lldb_private { +class Process; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolContext; +} +namespace lldb_private { +class Target; +} namespace llvm { -namespace sys { -class DynamicLibrary; -} // namespace sys -} // namespace llvm +class raw_ostream; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/Disassembler.h b/lldb/include/lldb/Core/Disassembler.h index a5fcde718d1..929b668c092 100644 --- a/lldb/include/lldb/Core/Disassembler.h +++ b/lldb/include/lldb/Core/Disassembler.h @@ -10,24 +10,68 @@ #ifndef liblldb_Disassembler_h_ #define liblldb_Disassembler_h_ -// C Includes -// C++ Includes -#include <map> -#include <set> -#include <string> -#include <vector> - -// Other libraries and framework includes -// Project includes #include "lldb/Core/Address.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/EmulateInstruction.h" +#include "lldb/Core/FormatEntity.h" // for FormatEntity #include "lldb/Core/Opcode.h" #include "lldb/Core/PluginInterface.h" #include "lldb/Interpreter/OptionValue.h" #include "lldb/Symbol/LineEntry.h" +#include "lldb/Target/ExecutionContext.h" // for ExecutionContext +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/FileSpec.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for AddressClass, AddressClass... +#include "lldb/lldb-forward.h" // for InstructionSP, DisassemblerSP +#include "lldb/lldb-types.h" // for addr_t, offset_t + +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <functional> // for function +#include <map> +#include <memory> // for enable_shared_from_this +#include <set> +#include <string> +#include <vector> + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, int64_t +#include <stdio.h> // for FILE + +namespace lldb_private { +class AddressRange; +} +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Debugger; +} +namespace lldb_private { +class Disassembler; +} +namespace lldb_private { +class Module; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolContext; +} +namespace lldb_private { +class SymbolContextList; +} +namespace lldb_private { +class Target; +} +namespace lldb_private { +struct RegisterInfo; +} +namespace llvm { +template <typename T> class SmallVectorImpl; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/DumpDataExtractor.h b/lldb/include/lldb/Core/DumpDataExtractor.h index e3a2df38441..46e676c239d 100644 --- a/lldb/include/lldb/Core/DumpDataExtractor.h +++ b/lldb/include/lldb/Core/DumpDataExtractor.h @@ -10,8 +10,12 @@ #ifndef LLDB_CORE_DUMPDATAEXTRACTOR_H #define LLDB_CORE_DUMPDATAEXTRACTOR_H +#include "lldb/lldb-enumerations.h" // for Format #include "lldb/lldb-types.h" +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t + namespace lldb_private { class DataExtractor; class ExecutionContextScope; diff --git a/lldb/include/lldb/Core/EmulateInstruction.h b/lldb/include/lldb/Core/EmulateInstruction.h index 90e66d668ca..bfc9ef054d7 100644 --- a/lldb/include/lldb/Core/EmulateInstruction.h +++ b/lldb/include/lldb/Core/EmulateInstruction.h @@ -15,9 +15,34 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Opcode.h" #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/RegisterValue.h" -#include "lldb/lldb-private.h" -#include "lldb/lldb-public.h" + +#include "lldb/Core/Address.h" // for Address +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for RegisterKind, ByteOrder +#include "lldb/lldb-private-enumerations.h" // for InstructionType +#include "lldb/lldb-private-types.h" // for RegisterInfo +#include "lldb/lldb-types.h" // for addr_t + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t, int64_t +namespace lldb_private { +class OptionValueDictionary; +} +namespace lldb_private { +class RegisterContext; +} +namespace lldb_private { +class RegisterValue; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class Target; +} +namespace lldb_private { +class UnwindPlan; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/Event.h b/lldb/include/lldb/Core/Event.h index d895ee25b81..5d297a719e7 100644 --- a/lldb/include/lldb/Core/Event.h +++ b/lldb/include/lldb/Core/Event.h @@ -10,19 +10,28 @@ #ifndef liblldb_Event_h_ #define liblldb_Event_h_ -// C Includes -// C++ Includes -#include <chrono> -#include <memory> -#include <string> - -// Other libraries and framework includes -// Project includes #include "lldb/Core/Broadcaster.h" #include "lldb/Core/StructuredData.h" #include "lldb/Host/Predicate.h" #include "lldb/Utility/ConstString.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-forward.h" // for EventDataSP, ProcessSP, Struct... + +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <chrono> +#include <memory> +#include <string> + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t + +namespace lldb_private { +class Event; +} +namespace lldb_private { +class Stream; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/FileLineResolver.h b/lldb/include/lldb/Core/FileLineResolver.h index e9e20c59f93..54bce4fd2f4 100644 --- a/lldb/include/lldb/Core/FileLineResolver.h +++ b/lldb/include/lldb/Core/FileLineResolver.h @@ -10,9 +10,19 @@ #ifndef liblldb_FileLineResolver_h_ #define liblldb_FileLineResolver_h_ -// Project includes -#include "lldb/Core/AddressResolver.h" +#include "lldb/Core/SearchFilter.h" // for Searcher, Searcher::CallbackR... #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN + +#include <stdint.h> // for uint32_t, UINT32_MAX + +namespace lldb_private { +class Address; +} +namespace lldb_private { +class Stream; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/FileSpecList.h b/lldb/include/lldb/Core/FileSpecList.h index 2dd45747a17..3cbffca44f6 100644 --- a/lldb/include/lldb/Core/FileSpecList.h +++ b/lldb/include/lldb/Core/FileSpecList.h @@ -12,9 +12,15 @@ #if defined(__cplusplus) #include "lldb/Utility/FileSpec.h" -#include "lldb/lldb-private.h" + #include <vector> +#include <stddef.h> // for size_t + +namespace lldb_private { +class Stream; +} + namespace lldb_private { //---------------------------------------------------------------------- diff --git a/lldb/include/lldb/Core/FormatEntity.h b/lldb/include/lldb/Core/FormatEntity.h index e3e61aec88c..6705c155cef 100644 --- a/lldb/include/lldb/Core/FormatEntity.h +++ b/lldb/include/lldb/Core/FormatEntity.h @@ -10,19 +10,38 @@ #ifndef liblldb_FormatEntity_h_ #define liblldb_FormatEntity_h_ -// C Includes -// C++ Includes +#include "lldb/Utility/Error.h" +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/lldb-enumerations.h" // for Format::eFormatDefault, Format +#include "lldb/lldb-types.h" // for addr_t +#include <algorithm> // for min +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t + #include <string> #include <vector> -// Other libraries and framework includes -// Project includes -#include "lldb/Utility/Error.h" -#include "lldb/lldb-private.h" - +namespace lldb_private { +class Address; +} +namespace lldb_private { +class ExecutionContext; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class StringList; +} +namespace lldb_private { +class SymbolContext; +} +namespace lldb_private { +class ValueObject; +} namespace llvm { class StringRef; -} // namespace llvm +} namespace lldb_private { class FormatEntity { diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h index 2855c1bac93..ebf56d7908b 100644 --- a/lldb/include/lldb/Core/IOHandler.h +++ b/lldb/include/lldb/Core/IOHandler.h @@ -10,27 +10,27 @@ #ifndef liblldb_IOHandler_h_ #define liblldb_IOHandler_h_ -// C Includes -#include <string.h> +#include "lldb/Core/ValueObjectList.h" +#include "lldb/Host/Predicate.h" +#include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Flags.h" +#include "lldb/Utility/Stream.h" +#include "lldb/Utility/StringList.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-forward.h" // for IOHandlerSP, StreamFileSP +#include "llvm/ADT/StringRef.h" // for StringRef -// C++ Includes #include <memory> #include <mutex> #include <string> #include <vector> -// Other libraries and framework includes -// Project includes -#include "lldb/Utility/Flags.h" +#include <stdint.h> // for uint32_t +#include <stdio.h> // for FILE -#include "lldb/Core/ValueObjectList.h" -#include "lldb/Host/Predicate.h" -#include "lldb/Utility/ConstString.h" -#include "lldb/Utility/Error.h" -#include "lldb/Utility/Stream.h" -#include "lldb/Utility/StringList.h" -#include "lldb/lldb-enumerations.h" -#include "lldb/lldb-public.h" +namespace lldb_private { +class Debugger; +} namespace curses { class Application; diff --git a/lldb/include/lldb/Core/Listener.h b/lldb/include/lldb/Core/Listener.h index b82844eabbb..3d12f8fb339 100644 --- a/lldb/include/lldb/Core/Listener.h +++ b/lldb/include/lldb/Core/Listener.h @@ -10,20 +10,29 @@ #ifndef liblldb_Select_h_ #define liblldb_Select_h_ -// C Includes -// C++ Includes -#include <chrono> +#include "lldb/Core/Broadcaster.h" // for Broadcaster::BroadcasterImplWP +#include "lldb/Utility/Timeout.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-forward.h" // for BroadcasterManagerWP, EventSP + +#include <condition_variable> #include <list> #include <map> +#include <memory> // for owner_less, enable_shared_from_this #include <mutex> +#include <ratio> // for micro #include <string> #include <vector> -// Other libraries and framework includes -// Project includes -#include "lldb/Core/Event.h" -#include "lldb/Utility/Timeout.h" -#include "lldb/lldb-private.h" +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t + +namespace lldb_private { +class ConstString; +} +namespace lldb_private { +class Event; +} namespace lldb_private { @@ -39,8 +48,7 @@ public: //------------------------------------------------------------------ // // Listeners have to be constructed into shared pointers - at least if you - // want them to listen to - // Broadcasters, + // want them to listen to Broadcasters, protected: Listener(const char *name); diff --git a/lldb/include/lldb/Core/Mangled.h b/lldb/include/lldb/Core/Mangled.h index 4ed6057ecd5..22778fabe63 100644 --- a/lldb/include/lldb/Core/Mangled.h +++ b/lldb/include/lldb/Core/Mangled.h @@ -12,8 +12,17 @@ #if defined(__cplusplus) #include "lldb/Utility/ConstString.h" -#include "lldb/lldb-private.h" -#include <vector> +#include "lldb/lldb-enumerations.h" // for LanguageType +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <stddef.h> // for size_t + +namespace lldb_private { +class RegularExpression; +} +namespace lldb_private { +class Stream; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/Module.h b/lldb/include/lldb/Core/Module.h index fb335901801..ca47a38a2ef 100644 --- a/lldb/include/lldb/Core/Module.h +++ b/lldb/include/lldb/Core/Module.h @@ -10,29 +10,86 @@ #ifndef liblldb_Module_h_ #define liblldb_Module_h_ -#include "lldb/Symbol/SymbolContextScope.h" - -// Project includes +#include "lldb/Core/Address.h" // for Address #include "lldb/Core/ArchSpec.h" +#include "lldb/Core/ModuleSpec.h" // for ModuleSpec +#include "lldb/Symbol/SymbolContextScope.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Target/PathMappingList.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/Error.h" // for Error #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/UUID.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for LanguageType, SymbolType #include "lldb/lldb-forward.h" +#include "lldb/lldb-types.h" // for addr_t, offset_t -// Other libraries and framework includes #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Chrono.h" -// C Includes -// C++ Includes #include <atomic> +#include <memory> // for enable_shared_from_this #include <mutex> +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t #include <string> #include <vector> namespace lldb_private { +class CompilerDeclContext; +} +namespace lldb_private { +class Function; +} +namespace lldb_private { +class Log; +} +namespace lldb_private { +class ObjectFile; +} +namespace lldb_private { +class RegularExpression; +} +namespace lldb_private { +class SectionList; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class Symbol; +} +namespace lldb_private { +class SymbolContext; +} +namespace lldb_private { +class SymbolContextList; +} +namespace lldb_private { +class SymbolFile; +} +namespace lldb_private { +class SymbolVendor; +} +namespace lldb_private { +class Symtab; +} +namespace lldb_private { +class Target; +} +namespace lldb_private { +class TypeList; +} +namespace lldb_private { +class TypeMap; +} +namespace lldb_private { +class VariableList; +} + +namespace lldb_private { //---------------------------------------------------------------------- /// @class Module Module.h "lldb/Core/Module.h" diff --git a/lldb/include/lldb/Core/ModuleChild.h b/lldb/include/lldb/Core/ModuleChild.h index f47c5ca135e..8f2985c8185 100644 --- a/lldb/include/lldb/Core/ModuleChild.h +++ b/lldb/include/lldb/Core/ModuleChild.h @@ -10,7 +10,7 @@ #ifndef liblldb_ModuleChild_h_ #define liblldb_ModuleChild_h_ -#include "lldb/lldb-private.h" +#include "lldb/lldb-forward.h" namespace lldb_private { diff --git a/lldb/include/lldb/Core/ModuleList.h b/lldb/include/lldb/Core/ModuleList.h index 4aa16740bd7..d82d1c0d48d 100644 --- a/lldb/include/lldb/Core/ModuleList.h +++ b/lldb/include/lldb/Core/ModuleList.h @@ -10,18 +10,67 @@ #ifndef liblldb_ModuleList_h_ #define liblldb_ModuleList_h_ -// C Includes -// C++ Includes +#include "lldb/Core/Address.h" // for Address +#include "lldb/Core/ModuleSpec.h" // for ModuleSpec +#include "lldb/Utility/Error.h" // for Error +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/Utility/Iterable.h" +#include "lldb/lldb-enumerations.h" +#include "lldb/lldb-forward.h" +#include "lldb/lldb-types.h" + +#include "llvm/ADT/DenseSet.h" + #include <functional> #include <list> #include <mutex> #include <vector> -// Other libraries and framework includes -// Project includes -#include "lldb/Utility/Iterable.h" -#include "lldb/lldb-private.h" -#include "llvm/ADT/DenseSet.h" +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t + +namespace lldb_private { +class ConstString; +} +namespace lldb_private { +class FileSpecList; +} +namespace lldb_private { +class Function; +} +namespace lldb_private { +class Log; +} +namespace lldb_private { +class Module; +} +namespace lldb_private { +class RegularExpression; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolContext; +} +namespace lldb_private { +class SymbolContextList; +} +namespace lldb_private { +class SymbolFile; +} +namespace lldb_private { +class Target; +} +namespace lldb_private { +class TypeList; +} +namespace lldb_private { +class UUID; +} +namespace lldb_private { +class VariableList; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/Opcode.h b/lldb/include/lldb/Core/Opcode.h index 612e66faa97..33857457b2c 100644 --- a/lldb/include/lldb/Core/Opcode.h +++ b/lldb/include/lldb/Core/Opcode.h @@ -10,20 +10,25 @@ #ifndef lldb_Opcode_h #define lldb_Opcode_h -// C Includes -#include <string.h> +#include "lldb/Utility/Endian.h" +#include "lldb/lldb-enumerations.h" // for ByteOrder, ByteOrder::eByteOrde... -// C++ Includes -// Other libraries and framework includes #include "llvm/Support/MathExtras.h" -// Project includes -#include "lldb/Utility/Endian.h" -#include "lldb/lldb-public.h" +#include <assert.h> // for assert +#include <stdint.h> // for uint32_t, uint8_t, uint16_t +#include <string.h> + +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Stream; +} namespace lldb { class SBInstruction; -} // namespace lldb +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/PluginManager.h b/lldb/include/lldb/Core/PluginManager.h index 1f8d7d62239..645ab85eaa7 100644 --- a/lldb/include/lldb/Core/PluginManager.h +++ b/lldb/include/lldb/Core/PluginManager.h @@ -10,13 +10,28 @@ #ifndef liblldb_PluginManager_h_ #define liblldb_PluginManager_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes +#include "lldb/Utility/Error.h" // for Error #include "lldb/Utility/FileSpec.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-enumerations.h" // for ScriptLanguage +#include "lldb/lldb-forward.h" // for OptionValuePropertiesSP +#include "lldb/lldb-private-interfaces.h" // for DebuggerInitializeCallback +#include "llvm/ADT/StringRef.h" // for StringRef +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t + +namespace lldb_private { +class CommandInterpreter; +} +namespace lldb_private { +class ConstString; +} +namespace lldb_private { +class Debugger; +} +namespace lldb_private { +class StringList; +} namespace lldb_private { class PluginManager { diff --git a/lldb/include/lldb/Core/RegisterValue.h b/lldb/include/lldb/Core/RegisterValue.h index 197e56d700b..66c4689d702 100644 --- a/lldb/include/lldb/Core/RegisterValue.h +++ b/lldb/include/lldb/Core/RegisterValue.h @@ -10,20 +10,28 @@ #ifndef lldb_RegisterValue_h #define lldb_RegisterValue_h -// C Includes -#include <string.h> +#include "lldb/Core/Scalar.h" +#include "lldb/Utility/Endian.h" +#include "lldb/Utility/Error.h" // for Error +#include "lldb/lldb-enumerations.h" // for ByteOrder, Format +#include "lldb/lldb-types.h" // for offset_t -// C++ Includes -// Other libraries and framework includes #include "llvm/ADT/APInt.h" +#include "llvm/ADT/StringRef.h" // for StringRef -// Project includes -#include "lldb/Core/Scalar.h" -#include "lldb/Utility/Endian.h" -#include "lldb/lldb-private.h" -#include "lldb/lldb-public.h" +#include <stdint.h> // for uint32_t, uint8_t, uint64_t, uin... +#include <string.h> namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +struct RegisterInfo; +} +namespace lldb_private { class RegisterValue { public: diff --git a/lldb/include/lldb/Core/Scalar.h b/lldb/include/lldb/Core/Scalar.h index cee257711c5..c534044af75 100644 --- a/lldb/include/lldb/Core/Scalar.h +++ b/lldb/include/lldb/Core/Scalar.h @@ -10,10 +10,23 @@ #ifndef liblldb_Scalar_h_ #define liblldb_Scalar_h_ -#include "lldb/lldb-private.h" +#include "lldb/Utility/Error.h" // for Error +#include "lldb/lldb-enumerations.h" // for Encoding, ByteOrder +#include "lldb/lldb-private-types.h" // for type128 + #include "llvm/ADT/APFloat.h" #include "llvm/ADT/APInt.h" +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t, int64_t + +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Stream; +} + #define NUM_OF_WORDS_INT128 2 #define BITWIDTH_INT128 128 #define NUM_OF_WORDS_INT256 4 diff --git a/lldb/include/lldb/Core/SearchFilter.h b/lldb/include/lldb/Core/SearchFilter.h index 6b3a79e9952..829305ff5de 100644 --- a/lldb/include/lldb/Core/SearchFilter.h +++ b/lldb/include/lldb/Core/SearchFilter.h @@ -10,13 +10,44 @@ #ifndef liblldb_SearchFilter_h_ #define liblldb_SearchFilter_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/FileSpecList.h" #include "lldb/Core/StructuredData.h" -#include "lldb/lldb-private.h" + +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/lldb-forward.h" // for SearchFilterSP, TargetSP, Modu... + +#include <stdint.h> // for uint32_t + +namespace lldb_private { +class Address; +} +namespace lldb_private { +class Breakpoint; +} +namespace lldb_private { +class CompileUnit; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class Function; +} +namespace lldb_private { +class ModuleList; +} +namespace lldb_private { +class SearchFilter; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolContext; +} +namespace lldb_private { +class Target; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/Section.h b/lldb/include/lldb/Core/Section.h index b43a3c77d2f..a133298edaf 100644 --- a/lldb/include/lldb/Core/Section.h +++ b/lldb/include/lldb/Core/Section.h @@ -10,17 +10,39 @@ #ifndef liblldb_Section_h_ #define liblldb_Section_h_ -#include "lldb/Core/AddressRange.h" -#include "lldb/Utility/Flags.h" - #include "lldb/Core/ModuleChild.h" -#include "lldb/Core/RangeMap.h" -#include "lldb/Symbol/ObjectFile.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Flags.h" #include "lldb/Utility/UserID.h" -#include "lldb/Utility/VMRange.h" -#include "lldb/lldb-private.h" -#include <limits.h> +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for SectionType +#include "lldb/lldb-forward.h" // for SectionSP, ModuleSP, SectionWP +#include "lldb/lldb-types.h" // for addr_t, offset_t, user_id_t + +#include <memory> // for enable_shared_from_this +#include <vector> // for vector + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, UINT32_MAX + +namespace lldb_private { +class Address; +} +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class ObjectFile; +} +namespace lldb_private { +class Section; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class Target; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/SourceManager.h b/lldb/include/lldb/Core/SourceManager.h index d4d9c56af8c..053badf64dd 100644 --- a/lldb/include/lldb/Core/SourceManager.h +++ b/lldb/include/lldb/Core/SourceManager.h @@ -10,20 +10,33 @@ #ifndef liblldb_SourceManager_h_ #define liblldb_SourceManager_h_ -// Project includes #include "lldb/Utility/FileSpec.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-forward.h" // for DebuggerSP, DebuggerWP, DataBufferSP -// Other libraries and framework includes #include "llvm/Support/Chrono.h" -// C Includes -// C++ Includes +#include <cstdint> // for uint32_t, UINT32_MAX #include <map> #include <memory> +#include <stddef.h> // for size_t +#include <string> // for string #include <vector> namespace lldb_private { +class RegularExpression; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolContextList; +} +namespace lldb_private { +class Target; +} + +namespace lldb_private { class SourceManager { public: diff --git a/lldb/include/lldb/Core/State.h b/lldb/include/lldb/Core/State.h index e49e68f4597..68f0fee254b 100644 --- a/lldb/include/lldb/Core/State.h +++ b/lldb/include/lldb/Core/State.h @@ -10,9 +10,14 @@ #ifndef liblldb_State_h_ #define liblldb_State_h_ -#include "lldb/lldb-private.h" #include "llvm/Support/FormatProviders.h" +#include "lldb/lldb-enumerations.h" // for StateType +#include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/Support/raw_ostream.h" // for raw_ostream + +#include <stdint.h> // for uint32_t + namespace lldb_private { //------------------------------------------------------------------ diff --git a/lldb/include/lldb/Core/StreamAsynchronousIO.h b/lldb/include/lldb/Core/StreamAsynchronousIO.h index 4c0f19d1f68..29b109757da 100644 --- a/lldb/include/lldb/Core/StreamAsynchronousIO.h +++ b/lldb/include/lldb/Core/StreamAsynchronousIO.h @@ -1,5 +1,4 @@ -//===-- StreamAsynchronousIO.h -----------------------------------*- C++ -//-*-===// +//===-- StreamAsynchronousIO.h -----------------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -11,9 +10,15 @@ #ifndef liblldb_StreamAsynchronousIO_h_ #define liblldb_StreamAsynchronousIO_h_ +#include "lldb/Utility/Stream.h" + #include <string> -#include "lldb/Utility/Stream.h" +#include <stddef.h> // for size_t + +namespace lldb_private { +class Debugger; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/StreamFile.h b/lldb/include/lldb/Core/StreamFile.h index 23bf93d8740..a26ae84c7be 100644 --- a/lldb/include/lldb/Core/StreamFile.h +++ b/lldb/include/lldb/Core/StreamFile.h @@ -10,16 +10,13 @@ #ifndef liblldb_StreamFile_h_ #define liblldb_StreamFile_h_ -// C Includes -// C++ Includes - -#include <string> - -// Other libraries and framework includes -// Project includes - #include "lldb/Host/File.h" #include "lldb/Utility/Stream.h" +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for FilePermissions::eFilePermission... + +#include <stdint.h> // for uint32_t +#include <stdio.h> // for size_t, FILE namespace lldb_private { diff --git a/lldb/include/lldb/Core/StructuredData.h b/lldb/include/lldb/Core/StructuredData.h index 770f47de1c4..eecfd86f798 100644 --- a/lldb/include/lldb/Core/StructuredData.h +++ b/lldb/include/lldb/Core/StructuredData.h @@ -10,22 +10,29 @@ #ifndef liblldb_StructuredData_h_ #define liblldb_StructuredData_h_ -// C Includes -// C++ Includes +#include "llvm/ADT/StringRef.h" + +#include "lldb/Utility/ConstString.h" +#include "lldb/Utility/FileSpec.h" // for FileSpec + #include <functional> #include <map> #include <memory> #include <string> +#include <type_traits> // for move #include <utility> #include <vector> -// Other libraries and framework includes -#include "llvm/ADT/StringRef.h" +#include <assert.h> // for assert +#include <stddef.h> // for size_t +#include <stdint.h> // for uint64_t -// Project includes -#include "lldb/Utility/ConstString.h" -#include "lldb/Utility/Stream.h" -#include "lldb/lldb-defines.h" +namespace lldb_private { +class Error; +} +namespace lldb_private { +class Stream; +} namespace lldb_private { @@ -368,13 +375,12 @@ public: } ObjectSP GetKeys() const { - ObjectSP object_sp(new Array()); - Array *array = object_sp->GetAsArray(); + auto object_sp = std::make_shared<Array>(); collection::const_iterator iter; for (iter = m_dict.begin(); iter != m_dict.end(); ++iter) { - ObjectSP key_object_sp(new String()); - key_object_sp->GetAsString()->SetValue(iter->first.AsCString()); - array->Push(key_object_sp); + auto key_object_sp = std::make_shared<String>(); + key_object_sp->SetValue(iter->first.AsCString()); + object_sp->Push(key_object_sp); } return object_sp; } @@ -500,19 +506,19 @@ public: } void AddIntegerItem(llvm::StringRef key, uint64_t value) { - AddItem(key, ObjectSP(new Integer(value))); + AddItem(key, std::make_shared<Integer>(value)); } void AddFloatItem(llvm::StringRef key, double value) { - AddItem(key, ObjectSP(new Float(value))); + AddItem(key, std::make_shared<Float>(value)); } void AddStringItem(llvm::StringRef key, std::string value) { - AddItem(key, ObjectSP(new String(std::move(value)))); + AddItem(key, std::make_shared<String>(std::move(value))); } void AddBooleanItem(llvm::StringRef key, bool value) { - AddItem(key, ObjectSP(new Boolean(value))); + AddItem(key, std::make_shared<Boolean>(value)); } void Dump(Stream &s, bool pretty_print = true) const override; diff --git a/lldb/include/lldb/Core/Timer.h b/lldb/include/lldb/Core/Timer.h index 854d3c31f54..6da00b0e27a 100644 --- a/lldb/include/lldb/Core/Timer.h +++ b/lldb/include/lldb/Core/Timer.h @@ -10,18 +10,16 @@ #ifndef liblldb_Timer_h_ #define liblldb_Timer_h_ -// C Includes -#include <stdarg.h> -#include <stdio.h> +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "llvm/Support/Chrono.h" -// C++ Includes #include <atomic> -#include <mutex> -// Other libraries and framework includes -// Project includes -#include "lldb/lldb-private.h" -#include "llvm/Support/Chrono.h" +#include <stdint.h> // for uint32_t + +namespace lldb_private { +class Stream; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/UserSettingsController.h b/lldb/include/lldb/Core/UserSettingsController.h index 9e08ae858e4..0207187f071 100644 --- a/lldb/include/lldb/Core/UserSettingsController.h +++ b/lldb/include/lldb/Core/UserSettingsController.h @@ -10,21 +10,32 @@ #ifndef liblldb_UserSettingsController_h_ #define liblldb_UserSettingsController_h_ -// C Includes -// C++ Includes +#include "lldb/Utility/Error.h" // for Error +#include "lldb/lldb-forward.h" // for OptionValuePropertiesSP +#include "lldb/lldb-private-enumerations.h" // for VarSetOperationType + +#include "llvm/ADT/StringRef.h" // for StringRef -#include <string> #include <vector> -// Other libraries and framework includes -// Project includes +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t -#include "lldb/Interpreter/OptionValue.h" -#include "lldb/Utility/ConstString.h" -#include "lldb/Utility/Stream.h" -#include "lldb/Utility/StreamString.h" -#include "lldb/Utility/StringList.h" -#include "lldb/lldb-private.h" +namespace lldb_private { +class CommandInterpreter; +} +namespace lldb_private { +class ConstString; +} +namespace lldb_private { +class ExecutionContext; +} +namespace lldb_private { +class Property; +} +namespace lldb_private { +class Stream; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/Value.h b/lldb/include/lldb/Core/Value.h index 10b80137db4..9a667cf6575 100644 --- a/lldb/include/lldb/Core/Value.h +++ b/lldb/include/lldb/Core/Value.h @@ -10,17 +10,39 @@ #ifndef liblldb_Value_h_ #define liblldb_Value_h_ -// C Includes -// C++ Includes -#include <vector> - -// Other libraries and framework includes -// Project includes #include "lldb/Core/Scalar.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/Error.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-enumerations.h" // for ByteOrder, ByteOrder::eB... +#include "lldb/lldb-private-enumerations.h" // for AddressType +#include "lldb/lldb-private-types.h" // for type128, RegisterInfo + +#include "llvm/ADT/APInt.h" // for APInt + +#include <vector> + +#include <stdint.h> // for uint8_t, uint32_t, uint64_t +#include <string.h> // for size_t, memcpy + +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class ExecutionContext; +} +namespace lldb_private { +class Module; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class Type; +} +namespace lldb_private { +class Variable; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index 5016e49510c..1c923f317b7 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -10,33 +10,67 @@ #ifndef liblldb_ValueObject_h_ #define liblldb_ValueObject_h_ -// C Includes -// C++ Includes -#include <functional> -#include <initializer_list> -#include <map> -#include <vector> - -// Other libraries and framework includes -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/SmallVector.h" - -// Project includes -#include "lldb/Utility/DataExtractor.h" -#include "lldb/Utility/Flags.h" - #include "lldb/Core/Value.h" +#include "lldb/DataFormatters/DumpValueObjectOptions.h" // for DumpValueObj... #include "lldb/Symbol/CompilerType.h" +#include "lldb/Symbol/Type.h" // for TypeImpl #include "lldb/Target/ExecutionContext.h" -#include "lldb/Target/ExecutionContextScope.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackID.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/SharedCluster.h" #include "lldb/Utility/UserID.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-defines.h" // for LLDB_INVALID... +#include "lldb/lldb-enumerations.h" // for DynamicValue... +#include "lldb/lldb-forward.h" // for ValueObjectSP +#include "lldb/lldb-private-enumerations.h" // for AddressType +#include "lldb/lldb-types.h" // for addr_t, offs... +#include "llvm/ADT/Optional.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <functional> +#include <initializer_list> +#include <map> +#include <mutex> // for recursive_mutex +#include <string> // for string +#include <utility> // for pair +#include <vector> + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t +namespace lldb_private { +class Declaration; +} +namespace lldb_private { +class EvaluateExpressionOptions; +} +namespace lldb_private { +class ExecutionContextScope; +} +namespace lldb_private { +class Log; +} +namespace lldb_private { +class Scalar; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolContextScope; +} +namespace lldb_private { +class TypeFormatImpl; +} +namespace lldb_private { +class TypeSummaryImpl; +} +namespace lldb_private { +class TypeSummaryOptions; +} namespace lldb_private { /// ValueObject: diff --git a/lldb/include/lldb/Core/ValueObjectCast.h b/lldb/include/lldb/Core/ValueObjectCast.h index 50959b927e7..aaa1ecb67db 100644 --- a/lldb/include/lldb/Core/ValueObjectCast.h +++ b/lldb/include/lldb/Core/ValueObjectCast.h @@ -10,11 +10,18 @@ #ifndef liblldb_ValueObjectCast_h_ #define liblldb_ValueObjectCast_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/ValueObject.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ValueType +#include "lldb/lldb-forward.h" // for ValueObjectSP + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t + +namespace lldb_private { +class ConstString; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObjectChild.h b/lldb/include/lldb/Core/ValueObjectChild.h index b84cb3dfa21..ec8c9e805cd 100644 --- a/lldb/include/lldb/Core/ValueObjectChild.h +++ b/lldb/include/lldb/Core/ValueObjectChild.h @@ -10,14 +10,20 @@ #ifndef liblldb_ValueObjectChild_h_ #define liblldb_ValueObjectChild_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/ValueObject.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ValueType +#include "lldb/lldb-private-enumerations.h" // for LazyBool, AddressType +#include "lldb/lldb-types.h" // for offset_t + #include "llvm/ADT/Optional.h" +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t, int32_t + namespace lldb_private { //---------------------------------------------------------------------- diff --git a/lldb/include/lldb/Core/ValueObjectConstResult.h b/lldb/include/lldb/Core/ValueObjectConstResult.h index 994ac477bf2..403d19324c4 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResult.h +++ b/lldb/include/lldb/Core/ValueObjectConstResult.h @@ -10,15 +10,31 @@ #ifndef liblldb_ValueObjectConstResult_h_ #define liblldb_ValueObjectConstResult_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes +#include "lldb/Core/Value.h" // for Value #include "lldb/Core/ValueObject.h" - #include "lldb/Core/ValueObjectConstResultImpl.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/Error.h" // for Error +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS +#include "lldb/lldb-enumerations.h" // for ByteOrder, Dynamic... +#include "lldb/lldb-forward.h" // for ValueObjectSP, Dat... +#include "lldb/lldb-private-enumerations.h" // for AddressType, Addre... +#include "lldb/lldb-types.h" // for addr_t + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class ExecutionContextScope; +} +namespace lldb_private { +class Module; +} +namespace lldb_private { //---------------------------------------------------------------------- // A frozen ValueObject copied into host memory diff --git a/lldb/include/lldb/Core/ValueObjectConstResultCast.h b/lldb/include/lldb/Core/ValueObjectConstResultCast.h index 4b2a3e2fb9b..3443bfb4885 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResultCast.h +++ b/lldb/include/lldb/Core/ValueObjectConstResultCast.h @@ -10,12 +10,26 @@ #ifndef liblldb_ValueObjectConstResultCast_h_ #define liblldb_ValueObjectConstResultCast_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/ValueObjectCast.h" #include "lldb/Core/ValueObjectConstResultImpl.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_... +#include "lldb/lldb-forward.h" // for ValueObjectSP +#include "lldb/lldb-types.h" // for addr_t + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, int32_t + +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class ValueObject; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObjectConstResultChild.h b/lldb/include/lldb/Core/ValueObjectConstResultChild.h index 66127b94b42..3da59dc2eb5 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResultChild.h +++ b/lldb/include/lldb/Core/ValueObjectConstResultChild.h @@ -1,5 +1,4 @@ -//===-- ValueObjectConstResultChild.h -------------------------------*- C++ -//-*-===// +//===-- ValueObjectConstResultChild.h ----------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -11,12 +10,25 @@ #ifndef liblldb_ValueObjectConstResultChild_h_ #define liblldb_ValueObjectConstResultChild_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/ValueObjectChild.h" #include "lldb/Core/ValueObjectConstResultImpl.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_... +#include "lldb/lldb-forward.h" // for ValueObjectSP +#include "lldb/lldb-types.h" // for addr_t + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, int32_t +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class ValueObject; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObjectConstResultImpl.h b/lldb/include/lldb/Core/ValueObjectConstResultImpl.h index c26bf419b18..2586aab4c78 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResultImpl.h +++ b/lldb/include/lldb/Core/ValueObjectConstResultImpl.h @@ -10,11 +10,26 @@ #ifndef liblldb_ValueObjectConstResultImpl_h_ #define liblldb_ValueObjectConstResultImpl_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/ValueObject.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS +#include "lldb/lldb-forward.h" // for ValueObjectSP +#include "lldb/lldb-private-enumerations.h" // for AddressType, AddressType... +#include "lldb/lldb-types.h" // for addr_t + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, int32_t +namespace lldb_private { +class CompilerType; +} +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class ValueObject; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObjectDynamicValue.h b/lldb/include/lldb/Core/ValueObjectDynamicValue.h index e58e74f534a..99eb1ebcf97 100644 --- a/lldb/include/lldb/Core/ValueObjectDynamicValue.h +++ b/lldb/include/lldb/Core/ValueObjectDynamicValue.h @@ -10,13 +10,30 @@ #ifndef liblldb_ValueObjectDynamicValue_h_ #define liblldb_ValueObjectDynamicValue_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes +#include "lldb/Core/Address.h" // for Address #include "lldb/Core/ValueObject.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType #include "lldb/Symbol/Type.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/SharingPtr.h" // for operator== +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for DynamicValueType, Langua... +#include "lldb/lldb-forward.h" // for ValueObjectSP, VariableSP +#include "lldb/lldb-private-enumerations.h" // for LazyBool, LazyBool::eLaz... +#include <assert.h> // for assert +#include <stddef.h> // for size_t +#include <stdint.h> // for uint64_t, uint32_t + +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Declaration; +} +namespace lldb_private { +class Error; +} namespace lldb_private { //---------------------------------------------------------------------- diff --git a/lldb/include/lldb/Core/ValueObjectList.h b/lldb/include/lldb/Core/ValueObjectList.h index d05876a3a3c..a0d2e681ded 100644 --- a/lldb/include/lldb/Core/ValueObjectList.h +++ b/lldb/include/lldb/Core/ValueObjectList.h @@ -10,15 +10,16 @@ #ifndef liblldb_ValueObjectList_h_ #define liblldb_ValueObjectList_h_ -// C Includes -// C++ Includes +#include "lldb/lldb-forward.h" // for ValueObjectSP +#include "lldb/lldb-types.h" // for user_id_t + #include <vector> -// Other libraries and framework includes -// Project includes -#include "lldb/Target/ExecutionContextScope.h" -#include "lldb/Utility/UserID.h" -#include "lldb/lldb-private.h" +#include <stddef.h> // for size_t + +namespace lldb_private { +class ValueObject; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObjectMemory.h b/lldb/include/lldb/Core/ValueObjectMemory.h index f9891c41cec..8bb649cc3c5 100644 --- a/lldb/include/lldb/Core/ValueObjectMemory.h +++ b/lldb/include/lldb/Core/ValueObjectMemory.h @@ -10,12 +10,21 @@ #ifndef liblldb_ValueObjectMemory_h_ #define liblldb_ValueObjectMemory_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes +#include "lldb/Core/Address.h" // for Address #include "lldb/Core/ValueObject.h" #include "lldb/Symbol/CompilerType.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ValueType +#include "lldb/lldb-forward.h" // for TypeSP, ValueObjectSP, ModuleSP +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t + +namespace lldb_private { +class ExecutionContextScope; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObjectRegister.h b/lldb/include/lldb/Core/ValueObjectRegister.h index 11d205430af..50d0e12bb3f 100644 --- a/lldb/include/lldb/Core/ValueObjectRegister.h +++ b/lldb/include/lldb/Core/ValueObjectRegister.h @@ -10,13 +10,33 @@ #ifndef liblldb_ValueObjectRegister_h_ #define liblldb_ValueObjectRegister_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/RegisterValue.h" #include "lldb/Core/ValueObject.h" -#include "lldb/lldb-private.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ValueType, ValueType::eValueTy... +#include "lldb/lldb-forward.h" // for RegisterContextSP, ValueObjectSP +#include "lldb/lldb-private-types.h" // for RegisterInfo, RegisterSet (ptr... + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t, int32_t + +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class ExecutionContextScope; +} +namespace lldb_private { +class Scalar; +} +namespace lldb_private { +class Stream; +} namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h index 0a5a4d9f702..d83f038744e 100644 --- a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h +++ b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h @@ -10,17 +10,31 @@ #ifndef liblldb_ValueObjectSyntheticFilter_h_ #define liblldb_ValueObjectSyntheticFilter_h_ -// C Includes -// C++ Includes -#include <memory> - -// Other libraries and framework includes -// Project includes #include "lldb/Core/ThreadSafeSTLMap.h" #include "lldb/Core/ThreadSafeSTLVector.h" #include "lldb/Core/ValueObject.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-defines.h" // for ThreadSafeSTLMap::operator= +#include "lldb/lldb-enumerations.h" // for DynamicValueType, Langua... +#include "lldb/lldb-forward.h" // for ValueObjectSP, Synthetic... +#include "lldb/lldb-private-enumerations.h" // for LazyBool, LazyBool::eLaz... + +#include <cstdint> // for uint32_t, uint64_t +#include <memory> + +#include <stddef.h> // for size_t namespace lldb_private { +class Declaration; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class SyntheticChildrenFrontEnd; +} +namespace lldb_private { //---------------------------------------------------------------------- // A ValueObject that obtains its children from some source other than diff --git a/lldb/include/lldb/Core/ValueObjectVariable.h b/lldb/include/lldb/Core/ValueObjectVariable.h index b76c48a24cd..dbb7c2b9483 100644 --- a/lldb/include/lldb/Core/ValueObjectVariable.h +++ b/lldb/include/lldb/Core/ValueObjectVariable.h @@ -10,12 +10,34 @@ #ifndef liblldb_ValueObjectVariable_h_ #define liblldb_ValueObjectVariable_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/ValueObject.h" +#include "lldb/Core/Value.h" // for Value +#include "lldb/Symbol/CompilerType.h" // for CompilerType +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ValueType +#include "lldb/lldb-forward.h" // for VariableSP, ModuleSP, ValueObj... + +#include <stddef.h> // for size_t +#include <stdint.h> // for uint32_t, uint64_t + +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Declaration; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class ExecutionContextScope; +} +namespace lldb_private { +class SymbolContextScope; +} + namespace lldb_private { //---------------------------------------------------------------------- diff --git a/lldb/include/lldb/Host/File.h b/lldb/include/lldb/Host/File.h index 6fa4e568218..35317780f1c 100644 --- a/lldb/include/lldb/Host/File.h +++ b/lldb/include/lldb/Host/File.h @@ -10,18 +10,15 @@ #ifndef liblldb_File_h_ #define liblldb_File_h_ -// C Includes -// C++ Includes -#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> - -// Other libraries and framework includes -// Project includes #include "lldb/Host/IOObject.h" #include "lldb/Host/PosixApi.h" +#include "lldb/Utility/Error.h" #include "lldb/lldb-private.h" +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> + namespace lldb_private { //---------------------------------------------------------------------- diff --git a/lldb/include/lldb/Interpreter/OptionValue.h b/lldb/include/lldb/Interpreter/OptionValue.h index 7f9970843a6..648ad33e2fc 100644 --- a/lldb/include/lldb/Interpreter/OptionValue.h +++ b/lldb/include/lldb/Interpreter/OptionValue.h @@ -18,6 +18,8 @@ #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" #include "lldb/lldb-defines.h" +#include "lldb/lldb-private-enumerations.h" +#include "lldb/lldb-private-interfaces.h" namespace lldb_private { diff --git a/lldb/include/lldb/Interpreter/OptionValueEnumeration.h b/lldb/include/lldb/Interpreter/OptionValueEnumeration.h index a6ad271cc95..d47248b72c6 100644 --- a/lldb/include/lldb/Interpreter/OptionValueEnumeration.h +++ b/lldb/include/lldb/Interpreter/OptionValueEnumeration.h @@ -10,16 +10,13 @@ #ifndef liblldb_OptionValueEnumeration_h_ #define liblldb_OptionValueEnumeration_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/UniqueCStringMap.h" #include "lldb/Interpreter/OptionValue.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" +#include "lldb/lldb-private-types.h" namespace lldb_private { diff --git a/lldb/include/lldb/Interpreter/Property.h b/lldb/include/lldb/Interpreter/Property.h index 05674279841..9d0dc5fa0fd 100644 --- a/lldb/include/lldb/Interpreter/Property.h +++ b/lldb/include/lldb/Interpreter/Property.h @@ -10,17 +10,13 @@ #ifndef liblldb_Property_h_ #define liblldb_Property_h_ -// C Includes -// C++ Includes -#include <string> - -// Other libraries and framework includes -// Project includes -#include "lldb/Utility/Flags.h" - #include "lldb/Interpreter/OptionValue.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Flags.h" #include "lldb/lldb-defines.h" +#include "lldb/lldb-private-types.h" + +#include <string> namespace lldb_private { diff --git a/lldb/include/lldb/Symbol/Block.h b/lldb/include/lldb/Symbol/Block.h index 83ca6137e1a..a5387cca21c 100644 --- a/lldb/include/lldb/Symbol/Block.h +++ b/lldb/include/lldb/Symbol/Block.h @@ -21,6 +21,7 @@ #include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/LineEntry.h" #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Symbol/SymbolContextScope.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/UserID.h" #include "lldb/lldb-private.h" diff --git a/lldb/include/lldb/Target/DynamicLoader.h b/lldb/include/lldb/Target/DynamicLoader.h index 90899726f00..ced6ef44000 100644 --- a/lldb/include/lldb/Target/DynamicLoader.h +++ b/lldb/include/lldb/Target/DynamicLoader.h @@ -12,9 +12,37 @@ // Project includes #include "lldb/Core/PluginInterface.h" -#include "lldb/Utility/UUID.h" #include "lldb/Utility/Error.h" -#include "lldb/lldb-private.h" +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/Utility/UUID.h" +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS +#include "lldb/lldb-forward.h" // for ModuleSP, ThreadPlanSP +#include "lldb/lldb-private-enumerations.h" // for LazyBool, LazyBool::eLaz... +#include "lldb/lldb-types.h" // for addr_t + +#include <stddef.h> // for size_t +#include <stdint.h> // for int64_t +namespace lldb_private { +class ModuleList; +} +namespace lldb_private { +class Process; +} +namespace lldb_private { +class SectionList; +} +namespace lldb_private { +class Symbol; +} +namespace lldb_private { +class SymbolContext; +} +namespace lldb_private { +class SymbolContextList; +} +namespace lldb_private { +class Thread; +} namespace lldb_private { diff --git a/lldb/include/lldb/Utility/Endian.h b/lldb/include/lldb/Utility/Endian.h index 87d0a1ac399..2a102b63aa1 100644 --- a/lldb/include/lldb/Utility/Endian.h +++ b/lldb/include/lldb/Utility/Endian.h @@ -12,6 +12,8 @@ #include "lldb/lldb-enumerations.h" +#include <stdint.h> + namespace lldb_private { namespace endian { diff --git a/lldb/include/lldb/lldb-private-interfaces.h b/lldb/include/lldb/lldb-private-interfaces.h index 5315b235086..d3e80075625 100644 --- a/lldb/include/lldb/lldb-private-interfaces.h +++ b/lldb/include/lldb/lldb-private-interfaces.h @@ -16,6 +16,8 @@ #include "lldb/lldb-forward.h" #include "lldb/lldb-types.h" +#include "lldb/lldb-private-enumerations.h" + #include <set> namespace lldb_private { diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp index 14c736f3525..2b44691186c 100644 --- a/lldb/source/Breakpoint/Breakpoint.cpp +++ b/lldb/source/Breakpoint/Breakpoint.cpp @@ -25,6 +25,7 @@ #include "lldb/Core/Section.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" +#include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadSpec.h" diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp index 8488b460753..5f0d494443f 100644 --- a/lldb/source/Commands/CommandCompletions.cpp +++ b/lldb/source/Commands/CommandCompletions.cpp @@ -32,6 +32,7 @@ #include "lldb/Target/Target.h" #include "lldb/Utility/CleanUp.h" #include "lldb/Utility/FileSpec.h" +#include "lldb/Utility/StreamString.h" #include "lldb/Utility/TildeExpressionResolver.h" #include "llvm/ADT/SmallString.h" diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index 9e6bfd85b3a..91229a9b18e 100644 --- a/lldb/source/Core/Address.cpp +++ b/lldb/source/Core/Address.cpp @@ -9,24 +9,53 @@ #include "lldb/Core/Address.h" -// C Includes -// C++ Includes -#include "llvm/ADT/Triple.h" - -// Other libraries and framework includes -// Project includes +#include "lldb/Core/ArchSpec.h" // for ArchSpec #include "lldb/Core/DumpDataExtractor.h" #include "lldb/Core/Module.h" +#include "lldb/Core/ModuleList.h" // for ModuleList #include "lldb/Core/Section.h" #include "lldb/Symbol/Block.h" +#include "lldb/Symbol/Declaration.h" // for Declaration +#include "lldb/Symbol/LineEntry.h" // for LineEntry #include "lldb/Symbol/ObjectFile.h" +#include "lldb/Symbol/Symbol.h" // for Symbol +#include "lldb/Symbol/SymbolContext.h" // for SymbolContext #include "lldb/Symbol/SymbolVendor.h" +#include "lldb/Symbol/Symtab.h" // for Symtab +#include "lldb/Symbol/Type.h" // for Type #include "lldb/Symbol/Variable.h" #include "lldb/Symbol/VariableList.h" #include "lldb/Target/ExecutionContext.h" +#include "lldb/Target/ExecutionContextScope.h" // for ExecutionContextScope #include "lldb/Target/Process.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/DataExtractor.h" // for DataExtractor +#include "lldb/Utility/Endian.h" // for InlHostByteOrder +#include "lldb/Utility/Error.h" // for Error +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/Utility/Stream.h" // for Stream +#include "lldb/Utility/StreamString.h" // for StreamString + +#include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/ADT/Triple.h" +#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH + +#include <cstdint> // for uint8_t, uint32_t +#include <memory> // for shared_ptr, operator!= +#include <vector> // for vector + +#include <assert.h> // for assert +#include <inttypes.h> // for PRIu64, PRIx64 +#include <string.h> // for size_t, strlen + +namespace lldb_private { +class CompileUnit; +} +namespace lldb_private { +class Function; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/AddressRange.cpp b/lldb/source/Core/AddressRange.cpp index 01fedd7d095..c1507797b37 100644 --- a/lldb/source/Core/AddressRange.cpp +++ b/lldb/source/Core/AddressRange.cpp @@ -8,10 +8,23 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/AddressRange.h" +#include "lldb/Core/ArchSpec.h" // for ArchSpec #include "lldb/Core/Module.h" -#include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/FileSpec.h" // for FileSpec #include "lldb/Utility/Stream.h" +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS + +#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH + +#include <memory> // for shared_ptr + +#include <inttypes.h> // for PRIx64 + +namespace lldb_private { +class SectionList; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/AddressResolver.cpp b/lldb/source/Core/AddressResolver.cpp index 8033a117c0c..8d7cc9f6a42 100644 --- a/lldb/source/Core/AddressResolver.cpp +++ b/lldb/source/Core/AddressResolver.cpp @@ -9,16 +9,11 @@ #include "lldb/Core/AddressResolver.h" -// Project includes - -#include "lldb/Core/Address.h" -#include "lldb/Core/ModuleList.h" #include "lldb/Core/SearchFilter.h" -#include "lldb/Symbol/SymbolContext.h" -#include "lldb/Target/Target.h" -#include "lldb/Utility/Log.h" -#include "lldb/Utility/Stream.h" -#include "lldb/Utility/StreamString.h" + +namespace lldb_private { +class ModuleList; +} using namespace lldb_private; diff --git a/lldb/source/Core/AddressResolverFileLine.cpp b/lldb/source/Core/AddressResolverFileLine.cpp index b285e284a32..798a9b50079 100644 --- a/lldb/source/Core/AddressResolverFileLine.cpp +++ b/lldb/source/Core/AddressResolverFileLine.cpp @@ -9,11 +9,21 @@ #include "lldb/Core/AddressResolverFileLine.h" -// Project includes +#include "lldb/Core/Address.h" // for Address +#include "lldb/Core/AddressRange.h" // for AddressRange #include "lldb/Symbol/CompileUnit.h" +#include "lldb/Symbol/LineEntry.h" // for LineEntry #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAllCategoriesSet, LIB... +#include "lldb/Utility/Stream.h" // for Stream #include "lldb/Utility/StreamString.h" +#include "lldb/lldb-enumerations.h" // for SymbolContextItem::eSymbolCon... +#include "lldb/lldb-types.h" // for addr_t + +#include <inttypes.h> // for PRIx64 +#include <vector> // for vector using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/AddressResolverName.cpp b/lldb/source/Core/AddressResolverName.cpp index 14424205f42..9935362e0e9 100644 --- a/lldb/source/Core/AddressResolverName.cpp +++ b/lldb/source/Core/AddressResolverName.cpp @@ -9,16 +9,25 @@ #include "lldb/Core/AddressResolverName.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes +#include "lldb/Core/Address.h" // for Address, operator== +#include "lldb/Core/AddressRange.h" // for AddressRange #include "lldb/Core/Module.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Utility/Log.h" -#include "lldb/Utility/StreamString.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAllCategoriesSet, LIB... +#include "lldb/Utility/Stream.h" // for Stream +#include "lldb/lldb-enumerations.h" // for SymbolType::eSymbolTypeCode +#include "lldb/lldb-forward.h" // for ModuleSP +#include "lldb/lldb-types.h" // for addr_t +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <memory> // for shared_ptr +#include <string> // for string +#include <vector> // for vector + +#include <stdint.h> // for uint32_t using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp index e3d1b26d175..60ee237aa0f 100644 --- a/lldb/source/Core/ArchSpec.cpp +++ b/lldb/source/Core/ArchSpec.cpp @@ -9,31 +9,30 @@ #include "lldb/Core/ArchSpec.h" -// C Includes -// C++ Includes -#include <cerrno> -#include <cstdio> -#include <string> - -// Other libraries and framework includes -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/COFF.h" -#include "llvm/Support/ELF.h" -#include "llvm/Support/Host.h" - -// Project includes -#include "Plugins/Process/Utility/ARMDefines.h" -#include "Plugins/Process/Utility/InstructionUtils.h" #include "lldb/Host/HostInfo.h" #include "lldb/Target/Platform.h" -#include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Thread.h" -#include "lldb/Utility/Endian.h" #include "lldb/Utility/NameMatches.h" -#include "lldb/Utility/RegularExpression.h" -#include "lldb/Utility/SafeMachO.h" +#include "lldb/Utility/Stream.h" // for Stream #include "lldb/Utility/StringList.h" +#include "lldb/lldb-defines.h" // for LLDB_INVALID_C... +#include "lldb/lldb-forward.h" // for RegisterContextSP + +#include "Plugins/Process/Utility/ARMDefines.h" +#include "Plugins/Process/Utility/InstructionUtils.h" + +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/Twine.h" // for Twine +#include "llvm/Support/COFF.h" +#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH +#include "llvm/Support/ELF.h" +#include "llvm/Support/Host.h" +#include "llvm/Support/MachO.h" // for CPUType::CPU_T... + +#include <memory> // for shared_ptr +#include <string> +#include <tuple> // for tie, tuple using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Broadcaster.cpp b/lldb/source/Core/Broadcaster.cpp index e07d3f34e05..7a4932c4987 100644 --- a/lldb/source/Core/Broadcaster.cpp +++ b/lldb/source/Core/Broadcaster.cpp @@ -9,21 +9,26 @@ #include "lldb/Core/Broadcaster.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/Event.h" #include "lldb/Core/Listener.h" #include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAnyCategoriesSet, Get... +#include "lldb/Utility/Stream.h" // for Stream #include "lldb/Utility/StreamString.h" +#include <algorithm> // for find_if +#include <memory> // for make_shared +#include <type_traits> // for move + +#include <assert.h> // for assert +#include <stddef.h> // for size_t + using namespace lldb; using namespace lldb_private; Broadcaster::Broadcaster(BroadcasterManagerSP manager_sp, const char *name) - : m_broadcaster_sp(new BroadcasterImpl(*this)), m_manager_sp(manager_sp), - m_broadcaster_name(name) { + : m_broadcaster_sp(std::make_shared<BroadcasterImpl>(*this)), + m_manager_sp(manager_sp), m_broadcaster_name(name) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT)); if (log) log->Printf("%p Broadcaster::Broadcaster(\"%s\")", @@ -242,19 +247,19 @@ void Broadcaster::BroadcasterImpl::PrivateBroadcastEvent(EventSP &event_sp, void Broadcaster::BroadcasterImpl::BroadcastEvent(uint32_t event_type, EventData *event_data) { - EventSP event_sp(new Event(event_type, event_data)); + auto event_sp = std::make_shared<Event>(event_type, event_data); PrivateBroadcastEvent(event_sp, false); } void Broadcaster::BroadcasterImpl::BroadcastEvent( uint32_t event_type, const lldb::EventDataSP &event_data_sp) { - EventSP event_sp(new Event(event_type, event_data_sp)); + auto event_sp = std::make_shared<Event>(event_type, event_data_sp); PrivateBroadcastEvent(event_sp, false); } void Broadcaster::BroadcasterImpl::BroadcastEventIfUnique( uint32_t event_type, EventData *event_data) { - EventSP event_sp(new Event(event_type, event_data)); + auto event_sp = std::make_shared<Event>(event_type, event_data); PrivateBroadcastEvent(event_sp, true); } @@ -329,7 +334,7 @@ operator=(const BroadcastEventSpec &rhs) = default; BroadcasterManager::BroadcasterManager() : m_manager_mutex() {} lldb::BroadcasterManagerSP BroadcasterManager::MakeBroadcasterManager() { - return BroadcasterManagerSP(new BroadcasterManager()); + return lldb::BroadcasterManagerSP(new BroadcasterManager()); } uint32_t BroadcasterManager::RegisterListenerForEvents( diff --git a/lldb/source/Core/CMakeLists.txt b/lldb/source/Core/CMakeLists.txt index 3fade8557de..7dcec050d86 100644 --- a/lldb/source/Core/CMakeLists.txt +++ b/lldb/source/Core/CMakeLists.txt @@ -52,6 +52,7 @@ add_lldb_library(lldbCore ValueObjectVariable.cpp LINK_LIBS + clangAST lldbBreakpoint lldbDataFormatters lldbExpression @@ -64,7 +65,6 @@ add_lldb_library(lldbCore lldbPluginCPlusPlusLanguage lldbPluginObjCLanguage lldbPluginObjectFileJIT - lldbPluginExpressionParserClang LINK_COMPONENTS Support diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp index 5db62ba5157..a543858582e 100644 --- a/lldb/source/Core/Communication.cpp +++ b/lldb/source/Core/Communication.cpp @@ -7,21 +7,30 @@ // //===----------------------------------------------------------------------===// -// C Includes -// C++ Includes -#include <cstring> - -// Other libraries and framework includes -// Project includes #include "lldb/Core/Communication.h" + #include "lldb/Core/Connection.h" #include "lldb/Core/Event.h" #include "lldb/Core/Listener.h" -#include "lldb/Core/Timer.h" -#include "lldb/Host/Host.h" #include "lldb/Host/HostThread.h" #include "lldb/Host/ThreadLauncher.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/Error.h" // for Error #include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" // for LogIfAnyCategoriesSet, LIBLLDB... + +#include "llvm/ADT/None.h" // for None +#include "llvm/ADT/Optional.h" // for Optional +#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH + +#include <algorithm> // for min +#include <chrono> // for duration, seconds +#include <cstring> +#include <memory> // for shared_ptr + +#include <errno.h> // for EIO +#include <inttypes.h> // for PRIu64 +#include <stdio.h> // for snprintf using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Connection.cpp b/lldb/source/Core/Connection.cpp index 1ae046b8a01..60d1221c160 100644 --- a/lldb/source/Core/Connection.cpp +++ b/lldb/source/Core/Connection.cpp @@ -7,10 +7,6 @@ // //===----------------------------------------------------------------------===// -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/Connection.h" #if defined(_WIN32) @@ -19,6 +15,8 @@ #include "lldb/Host/ConnectionFileDescriptor.h" +#include <string.h> // for strstr + using namespace lldb_private; Connection::Connection() {} diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 9ac65a6d3d9..751ceed1314 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -9,59 +9,70 @@ #include "lldb/Core/Debugger.h" -// C Includes -// C++ Includes -#include <map> -#include <mutex> - -// Other libraries and framework includes -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/DynamicLibrary.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/Threading.h" - -// Project includes +#include "lldb/Breakpoint/Breakpoint.h" // for Breakpoint, Brea... +#include "lldb/Core/Event.h" // for Event, EventData... #include "lldb/Core/FormatEntity.h" -#include "lldb/Core/Module.h" -#include "lldb/Core/PluginInterface.h" +#include "lldb/Core/Listener.h" // for Listener +#include "lldb/Core/Mangled.h" // for Mangled #include "lldb/Core/PluginManager.h" -#include "lldb/Core/RegisterValue.h" #include "lldb/Core/State.h" #include "lldb/Core/StreamAsynchronousIO.h" #include "lldb/Core/StreamFile.h" -#include "lldb/Core/StructuredData.h" -#include "lldb/Core/Timer.h" -#include "lldb/Core/ValueObject.h" -#include "lldb/Core/ValueObjectVariable.h" #include "lldb/DataFormatters/DataVisualization.h" -#include "lldb/DataFormatters/FormatManager.h" -#include "lldb/DataFormatters/TypeSummary.h" #include "lldb/Expression/REPL.h" -#include "lldb/Host/ConnectionFileDescriptor.h" +#include "lldb/Host/File.h" // for File, File::kInv... #include "lldb/Host/HostInfo.h" #include "lldb/Host/Terminal.h" #include "lldb/Host/ThreadLauncher.h" #include "lldb/Interpreter/CommandInterpreter.h" +#include "lldb/Interpreter/OptionValue.h" // for OptionValue, Opt... #include "lldb/Interpreter/OptionValueProperties.h" #include "lldb/Interpreter/OptionValueSInt64.h" #include "lldb/Interpreter/OptionValueString.h" -#include "lldb/Symbol/CompileUnit.h" +#include "lldb/Interpreter/Property.h" // for PropertyDefinition +#include "lldb/Interpreter/ScriptInterpreter.h" // for ScriptInterpreter #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" -#include "lldb/Symbol/VariableList.h" +#include "lldb/Symbol/SymbolContext.h" // for SymbolContext #include "lldb/Target/Language.h" #include "lldb/Target/Process.h" -#include "lldb/Target/RegisterContext.h" -#include "lldb/Target/SectionLoadList.h" -#include "lldb/Target/StopInfo.h" #include "lldb/Target/StructuredDataPlugin.h" #include "lldb/Target/Target.h" #include "lldb/Target/TargetList.h" #include "lldb/Target/Thread.h" +#include "lldb/Target/ThreadList.h" // for ThreadList #include "lldb/Utility/AnsiTerminal.h" +#include "lldb/Utility/Log.h" // for LLDB_LOG_OPTION_... +#include "lldb/Utility/Stream.h" // for Stream #include "lldb/Utility/StreamCallback.h" #include "lldb/Utility/StreamString.h" -#include "lldb/lldb-private.h" + +#if defined(LLVM_ON_WIN32) +#include "lldb/Host/windows/PosixApi.h" // for PATH_MAX +#endif + +#include "llvm/ADT/None.h" // for None +#include "llvm/ADT/STLExtras.h" // for make_unique +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/iterator.h" // for iterator_facade_... +#include "llvm/Support/DynamicLibrary.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/Threading.h" +#include "llvm/Support/raw_ostream.h" // for raw_fd_ostream + +#include <list> // for list +#include <memory> // for make_shared +#include <mutex> +#include <set> // for set +#include <stdio.h> // for size_t, NULL +#include <stdlib.h> // for getenv +#include <string.h> // for strcmp +#include <string> // for string +#include <system_error> // for error_code + +namespace lldb_private { +class Address; +} using namespace lldb; using namespace lldb_private; @@ -298,9 +309,9 @@ Error Debugger::SetPropertyValue(const ExecutionContext *exe_ctx, if (str.length()) new_prompt = str; GetCommandInterpreter().UpdatePrompt(new_prompt); - EventSP prompt_change_event_sp( - new Event(CommandInterpreter::eBroadcastBitResetPrompt, - new EventDataBytes(new_prompt))); + auto bytes = llvm::make_unique<EventDataBytes>(new_prompt); + auto prompt_change_event_sp = std::make_shared<Event>( + CommandInterpreter::eBroadcastBitResetPrompt, bytes.release()); GetCommandInterpreter().BroadcastEvent(prompt_change_event_sp); } else if (property_path == g_properties[ePropertyUseColor].name) { // use-color changed. Ping the prompt so it can reset the ansi terminal @@ -699,16 +710,16 @@ TargetSP Debugger::FindTargetWithProcess(Process *process) { Debugger::Debugger(lldb::LogOutputCallback log_callback, void *baton) : UserID(g_unique_id++), - Properties(OptionValuePropertiesSP(new OptionValueProperties())), - m_input_file_sp(new StreamFile(stdin, false)), - m_output_file_sp(new StreamFile(stdout, false)), - m_error_file_sp(new StreamFile(stderr, false)), + Properties(std::make_shared<OptionValueProperties>()), + m_input_file_sp(std::make_shared<StreamFile>(stdin, false)), + m_output_file_sp(std::make_shared<StreamFile>(stdout, false)), + m_error_file_sp(std::make_shared<StreamFile>(stderr, false)), m_broadcaster_manager_sp(BroadcasterManager::MakeBroadcasterManager()), m_terminal_state(), m_target_list(*this), m_platform_list(), m_listener_sp(Listener::MakeListener("lldb.Debugger")), m_source_manager_ap(), m_source_file_cache(), - m_command_interpreter_ap( - new CommandInterpreter(*this, eScriptLanguageDefault, false)), + m_command_interpreter_ap(llvm::make_unique<CommandInterpreter>( + *this, eScriptLanguageDefault, false)), m_input_reader_stack(), m_instance_name(), m_loaded_plugins(), m_event_handler_thread(), m_io_handler_thread(), m_sync_broadcaster(nullptr, "lldb.debugger.sync"), @@ -717,7 +728,8 @@ Debugger::Debugger(lldb::LogOutputCallback log_callback, void *baton) snprintf(instance_cstr, sizeof(instance_cstr), "debugger_%d", (int)GetID()); m_instance_name.SetCString(instance_cstr); if (log_callback) - m_log_callback_stream_sp.reset(new StreamCallback(log_callback, baton)); + m_log_callback_stream_sp = + std::make_shared<StreamCallback>(log_callback, baton); m_command_interpreter_ap->Initialize(); // Always add our default platform to the platform list PlatformSP default_platform_sp(Platform::GetHostPlatform()); @@ -813,7 +825,7 @@ void Debugger::SetInputFileHandle(FILE *fh, bool tranfer_ownership) { if (m_input_file_sp) m_input_file_sp->GetFile().SetStream(fh, tranfer_ownership); else - m_input_file_sp.reset(new StreamFile(fh, tranfer_ownership)); + m_input_file_sp = std::make_shared<StreamFile>(fh, tranfer_ownership); File &in_file = m_input_file_sp->GetFile(); if (!in_file.IsValid()) @@ -828,7 +840,7 @@ void Debugger::SetOutputFileHandle(FILE *fh, bool tranfer_ownership) { if (m_output_file_sp) m_output_file_sp->GetFile().SetStream(fh, tranfer_ownership); else - m_output_file_sp.reset(new StreamFile(fh, tranfer_ownership)); + m_output_file_sp = std::make_shared<StreamFile>(fh, tranfer_ownership); File &out_file = m_output_file_sp->GetFile(); if (!out_file.IsValid()) @@ -847,7 +859,7 @@ void Debugger::SetErrorFileHandle(FILE *fh, bool tranfer_ownership) { if (m_error_file_sp) m_error_file_sp->GetFile().SetStream(fh, tranfer_ownership); else - m_error_file_sp.reset(new StreamFile(fh, tranfer_ownership)); + m_error_file_sp = std::make_shared<StreamFile>(fh, tranfer_ownership); File &err_file = m_error_file_sp->GetFile(); if (!err_file.IsValid()) @@ -998,7 +1010,7 @@ void Debugger::AdoptTopIOHandlerFilesIfInvalid(StreamFileSP &in, // If there is nothing, use stdin if (!in) - in = StreamFileSP(new StreamFile(stdin, false)); + in = std::make_shared<StreamFile>(stdin, false); } // If no STDOUT has been set, then set it appropriately if (!out) { @@ -1009,7 +1021,7 @@ void Debugger::AdoptTopIOHandlerFilesIfInvalid(StreamFileSP &in, // If there is nothing, use stdout if (!out) - out = StreamFileSP(new StreamFile(stdout, false)); + out = std::make_shared<StreamFile>(stdout, false); } // If no STDERR has been set, then set it appropriately if (!err) { @@ -1020,7 +1032,7 @@ void Debugger::AdoptTopIOHandlerFilesIfInvalid(StreamFileSP &in, // If there is nothing, use stderr if (!err) - err = StreamFileSP(new StreamFile(stdout, false)); + err = std::make_shared<StreamFile>(stdout, false); } } @@ -1077,11 +1089,11 @@ bool Debugger::PopIOHandler(const IOHandlerSP &pop_reader_sp) { } StreamSP Debugger::GetAsyncOutputStream() { - return StreamSP(new StreamAsynchronousIO(*this, true)); + return std::make_shared<StreamAsynchronousIO>(*this, true); } StreamSP Debugger::GetAsyncErrorStream() { - return StreamSP(new StreamAsynchronousIO(*this, false)); + return std::make_shared<StreamAsynchronousIO>(*this, false); } size_t Debugger::GetNumDebuggers() { @@ -1236,7 +1248,8 @@ void Debugger::SetLoggingCallback(lldb::LogOutputCallback log_callback, // For simplicity's sake, I am not going to deal with how to close down any // open logging streams, I just redirect everything from here on out to the // callback. - m_log_callback_stream_sp.reset(new StreamCallback(log_callback, baton)); + m_log_callback_stream_sp = + std::make_shared<StreamCallback>(log_callback, baton); } bool Debugger::EnableLog(llvm::StringRef channel, @@ -1269,8 +1282,8 @@ bool Debugger::EnableLog(llvm::StringRef channel, error_stream << "Unable to open log file: " << ec.message(); return false; } - log_stream_sp.reset( - new llvm::raw_fd_ostream(FD, should_close, unbuffered)); + log_stream_sp = + std::make_shared<llvm::raw_fd_ostream>(FD, should_close, unbuffered); m_log_streams[log_file] = log_stream_sp; } } @@ -1286,7 +1299,7 @@ bool Debugger::EnableLog(llvm::StringRef channel, SourceManager &Debugger::GetSourceManager() { if (!m_source_manager_ap) - m_source_manager_ap.reset(new SourceManager(shared_from_this())); + m_source_manager_ap = llvm::make_unique<SourceManager>(shared_from_this()); return *m_source_manager_ap; } diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index ca19e2883d0..3880bfd16ec 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -9,17 +9,14 @@ #include "lldb/Core/Disassembler.h" -// C Includes -// C++ Includes -#include <cstdio> -#include <cstring> - -// Other libraries and framework includes -// Project includes +#include "lldb/Core/AddressRange.h" // for AddressRange #include "lldb/Core/Debugger.h" #include "lldb/Core/EmulateInstruction.h" +#include "lldb/Core/Mangled.h" // for Mangled, Mangled... #include "lldb/Core/Module.h" +#include "lldb/Core/ModuleList.h" // for ModuleList #include "lldb/Core/PluginManager.h" +#include "lldb/Core/SourceManager.h" // for SourceManager #include "lldb/Core/Timer.h" #include "lldb/Host/FileSystem.h" #include "lldb/Interpreter/OptionValue.h" @@ -29,17 +26,30 @@ #include "lldb/Interpreter/OptionValueString.h" #include "lldb/Interpreter/OptionValueUInt64.h" #include "lldb/Symbol/Function.h" -#include "lldb/Symbol/ObjectFile.h" +#include "lldb/Symbol/Symbol.h" // for Symbol +#include "lldb/Symbol/SymbolContext.h" // for SymbolContext #include "lldb/Target/ExecutionContext.h" -#include "lldb/Target/Process.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" +#include "lldb/Target/Thread.h" // for Thread #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/RegularExpression.h" -#include "lldb/lldb-private.h" +#include "lldb/Utility/Stream.h" // for Stream +#include "lldb/Utility/StreamString.h" // for StreamString +#include "lldb/lldb-private-enumerations.h" // for InstructionType:... +#include "lldb/lldb-private-interfaces.h" // for DisassemblerCrea... +#include "lldb/lldb-private-types.h" // for RegisterInfo +#include "llvm/ADT/Triple.h" // for Triple, Triple::... +#include "llvm/Support/Compiler.h" // for LLVM_PRETTY_FUNC... + +#include <cstdint> // for uint32_t, UINT32... +#include <cstring> +#include <utility> // for pair + +#include <assert.h> // for assert #define DEFAULT_DISASM_BYTE_SIZE 32 @@ -759,7 +769,7 @@ OptionValueSP Instruction::ReadArray(FILE *in_file, Stream *out_stream, bool done = false; char buffer[1024]; - OptionValueSP option_value_sp(new OptionValueArray(1u << data_type)); + auto option_value_sp = std::make_shared<OptionValueArray>(1u << data_type); int idx = 0; while (!done) { @@ -797,12 +807,12 @@ OptionValueSP Instruction::ReadArray(FILE *in_file, Stream *out_stream, OptionValueSP data_value_sp; switch (data_type) { case OptionValue::eTypeUInt64: - data_value_sp.reset(new OptionValueUInt64(0, 0)); + data_value_sp = std::make_shared<OptionValueUInt64>(0, 0); data_value_sp->SetValueFromString(value); break; // Other types can be added later as needed. default: - data_value_sp.reset(new OptionValueString(value.c_str(), "")); + data_value_sp = std::make_shared<OptionValueString>(value.c_str(), ""); break; } @@ -818,7 +828,7 @@ OptionValueSP Instruction::ReadDictionary(FILE *in_file, Stream *out_stream) { bool done = false; char buffer[1024]; - OptionValueSP option_value_sp(new OptionValueDictionary()); + auto option_value_sp = std::make_shared<OptionValueDictionary>(); static ConstString encoding_key("data_encoding"); OptionValue::Type data_type = OptionValue::eTypeInvalid; @@ -891,13 +901,13 @@ OptionValueSP Instruction::ReadDictionary(FILE *in_file, Stream *out_stream) { // We've used the data_type to read an array; re-set the type to Invalid data_type = OptionValue::eTypeInvalid; } else if ((value[0] == '0') && (value[1] == 'x')) { - value_sp.reset(new OptionValueUInt64(0, 0)); + value_sp = std::make_shared<OptionValueUInt64>(0, 0); value_sp->SetValueFromString(value); } else { size_t len = value.size(); if ((value[0] == '"') && (value[len - 1] == '"')) value = value.substr(1, len - 2); - value_sp.reset(new OptionValueString(value.c_str(), "")); + value_sp = std::make_shared<OptionValueString>(value.c_str(), ""); } if (const_key == encoding_key) { @@ -1163,18 +1173,17 @@ size_t Disassembler::ParseInstructions(const ExecutionContext *exe_ctx, !range.GetBaseAddress().IsValid()) return 0; - DataBufferHeap *heap_buffer = new DataBufferHeap(byte_size, '\0'); - DataBufferSP data_sp(heap_buffer); + auto data_sp = std::make_shared<DataBufferHeap>(byte_size, '\0'); Error error; lldb::addr_t load_addr = LLDB_INVALID_ADDRESS; const size_t bytes_read = target->ReadMemory( - range.GetBaseAddress(), prefer_file_cache, heap_buffer->GetBytes(), - heap_buffer->GetByteSize(), error, &load_addr); + range.GetBaseAddress(), prefer_file_cache, data_sp->GetBytes(), + data_sp->GetByteSize(), error, &load_addr); if (bytes_read > 0) { - if (bytes_read != heap_buffer->GetByteSize()) - heap_buffer->SetByteSize(bytes_read); + if (bytes_read != data_sp->GetByteSize()) + data_sp->SetByteSize(bytes_read); DataExtractor data(data_sp, m_arch.GetByteOrder(), m_arch.GetAddressByteSize()); const bool data_from_file = load_addr == LLDB_INVALID_ADDRESS; diff --git a/lldb/source/Core/DumpDataExtractor.cpp b/lldb/source/Core/DumpDataExtractor.cpp index e2e0af9b07a..2b7abd60f8b 100644 --- a/lldb/source/Core/DumpDataExtractor.cpp +++ b/lldb/source/Core/DumpDataExtractor.cpp @@ -9,7 +9,12 @@ #include "lldb/Core/DumpDataExtractor.h" +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS +#include "lldb/lldb-forward.h" // for TargetSP, DisassemblerSP + +#include "lldb/Core/Address.h" // for Address #include "lldb/Core/Disassembler.h" +#include "lldb/Core/ModuleList.h" // for ModuleList #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/ExecutionContextScope.h" @@ -18,6 +23,23 @@ #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Stream.h" +#include "clang/AST/ASTContext.h" // for ASTContext +#include "clang/AST/CanonicalType.h" // for CanQualType + +#include "llvm/ADT/APFloat.h" // for APFloat, APFloatBase:... +#include "llvm/ADT/APInt.h" // for APInt +#include "llvm/ADT/ArrayRef.h" // for ArrayRef +#include "llvm/ADT/SmallVector.h" // for SmallVector + +#include <limits> // for numeric_limits, numer... +#include <memory> // for shared_ptr +#include <string> // for string, basic_string + +#include <assert.h> // for assert +#include <ctype.h> // for isprint +#include <inttypes.h> // for PRIu64, PRIx64, PRIX64 +#include <math.h> // for ldexpf + #include <bitset> #include <sstream> diff --git a/lldb/source/Core/DynamicLoader.cpp b/lldb/source/Core/DynamicLoader.cpp index 680de778a2e..03fad244acf 100644 --- a/lldb/source/Core/DynamicLoader.cpp +++ b/lldb/source/Core/DynamicLoader.cpp @@ -7,19 +7,25 @@ // //===----------------------------------------------------------------------===// -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Target/DynamicLoader.h" + #include "lldb/Core/Module.h" +#include "lldb/Core/ModuleList.h" // for ModuleList #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" +#include "lldb/Symbol/ObjectFile.h" // for ObjectFile #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" -#include "lldb/lldb-private.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/lldb-private-interfaces.h" // for DynamicLoaderCreateInstance + +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <memory> // for shared_ptr, unique_ptr + +#include <assert.h> // for assert using namespace lldb; using namespace lldb_private; @@ -78,7 +84,7 @@ ModuleSP DynamicLoader::GetTargetExecutable() { if (executable->GetFileSpec().Exists()) { ModuleSpec module_spec(executable->GetFileSpec(), executable->GetArchitecture()); - ModuleSP module_sp(new Module(module_spec)); + auto module_sp = std::make_shared<Module>(module_spec); // Check if the executable has changed and set it to the target executable // if they differ. diff --git a/lldb/source/Core/EmulateInstruction.cpp b/lldb/source/Core/EmulateInstruction.cpp index 8662fd6aa1b..f18a4af67ef 100644 --- a/lldb/source/Core/EmulateInstruction.cpp +++ b/lldb/source/Core/EmulateInstruction.cpp @@ -9,12 +9,6 @@ #include "lldb/Core/EmulateInstruction.h" -// C Includes -// C++ Includes -#include <cstring> - -// Other libraries and framework includes -// Project includes #include "lldb/Core/Address.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -22,12 +16,26 @@ #include "lldb/Symbol/UnwindPlan.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/Target.h" -#include "lldb/Target/Thread.h" +#include "lldb/Target/StackFrame.h" // for StackFrame +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/DataExtractor.h" -#include "lldb/Utility/Endian.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Stream.h" // for Stream, Stream::::eBinary #include "lldb/Utility/StreamString.h" +#include "lldb/lldb-forward.h" // for ProcessSP +#include "lldb/lldb-private-interfaces.h" // for EmulateInstructionCreateIn... + +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <cstring> +#include <memory> // for shared_ptr + +#include <inttypes.h> // for PRIx64, PRId64, PRIu64 +#include <stdio.h> // for stdout + +namespace lldb_private { +class Target; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Event.cpp b/lldb/source/Core/Event.cpp index e8b7c096452..8d351d8ba1a 100644 --- a/lldb/source/Core/Event.cpp +++ b/lldb/source/Core/Event.cpp @@ -7,21 +7,19 @@ // //===----------------------------------------------------------------------===// -// C Includes -// C++ Includes -#include <algorithm> +#include "lldb/Core/Event.h" -// Other libraries and framework includes -// Project includes #include "lldb/Core/Broadcaster.h" #include "lldb/Core/DumpDataExtractor.h" -#include "lldb/Core/Event.h" -#include "lldb/Core/State.h" -#include "lldb/Target/Process.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Endian.h" -#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" +#include "lldb/Utility/StreamString.h" // for StreamString +#include "lldb/lldb-enumerations.h" // for Format::eFormatBytes + +#include <algorithm> + +#include <ctype.h> // for isprint using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/FileLineResolver.cpp b/lldb/source/Core/FileLineResolver.cpp index 771bd41ad93..36f37f4a14d 100644 --- a/lldb/source/Core/FileLineResolver.cpp +++ b/lldb/source/Core/FileLineResolver.cpp @@ -10,10 +10,17 @@ #include "lldb/Core/FileLineResolver.h" // Project includes +#include "lldb/Core/FileSpecList.h" // for FileSpecList #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/LineTable.h" -#include "lldb/Utility/Log.h" -#include "lldb/Utility/StreamString.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/Stream.h" // for Stream + +#include <string> // for string + +namespace lldb_private { +class Address; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/FileSpecList.cpp b/lldb/source/Core/FileSpecList.cpp index 0f790279897..a69f490f9ae 100644 --- a/lldb/source/Core/FileSpecList.cpp +++ b/lldb/source/Core/FileSpecList.cpp @@ -9,14 +9,12 @@ #include "lldb/Core/FileSpecList.h" -// C Includes -// C++ Includes -#include <algorithm> - -// Other libraries and framework includes -// Project includes +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/Stream.h" -#include "llvm/Support/FileSystem.h" + +#include <utility> // for find + +#include <stdint.h> // for UINT32_MAX using namespace lldb_private; using namespace std; diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp index deaa21d3c64..835a1c54a0e 100644 --- a/lldb/source/Core/FormatEntity.cpp +++ b/lldb/source/Core/FormatEntity.cpp @@ -9,30 +9,31 @@ #include "lldb/Core/FormatEntity.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringRef.h" - -// Project includes #include "lldb/Core/Address.h" +#include "lldb/Core/AddressRange.h" // for AddressRange +#include "lldb/Core/ArchSpec.h" // for ArchSpec #include "lldb/Core/Debugger.h" #include "lldb/Core/Module.h" +#include "lldb/Core/RegisterValue.h" // for RegisterValue +#include "lldb/Core/StructuredData.h" // for StructuredData::O... #include "lldb/Core/ValueObject.h" #include "lldb/Core/ValueObjectVariable.h" #include "lldb/DataFormatters/DataVisualization.h" +#include "lldb/DataFormatters/FormatClasses.h" // for TypeNameSpecifier... #include "lldb/DataFormatters/FormatManager.h" -#include "lldb/DataFormatters/ValueObjectPrinter.h" +#include "lldb/DataFormatters/TypeSummary.h" // for TypeSummaryImpl::... #include "lldb/Expression/ExpressionVariable.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Symbol/Block.h" #include "lldb/Symbol/CompileUnit.h" +#include "lldb/Symbol/CompilerType.h" // for CompilerType #include "lldb/Symbol/Function.h" #include "lldb/Symbol/LineEntry.h" #include "lldb/Symbol/Symbol.h" +#include "lldb/Symbol/SymbolContext.h" // for SymbolContext #include "lldb/Symbol/VariableList.h" #include "lldb/Target/ExecutionContext.h" +#include "lldb/Target/ExecutionContextScope.h" // for ExecutionContextS... #include "lldb/Target/Language.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" @@ -42,9 +43,36 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/AnsiTerminal.h" +#include "lldb/Utility/ConstString.h" // for ConstString, oper... #include "lldb/Utility/FileSpec.h" +#include "lldb/Utility/Log.h" // for Log +#include "lldb/Utility/Logging.h" // for GetLogIfAllCatego... +#include "lldb/Utility/SharingPtr.h" // for SharingPtr #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" +#include "lldb/Utility/StringList.h" // for StringList +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS +#include "lldb/lldb-forward.h" // for ValueObjectSP +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/Triple.h" // for Triple, Triple::O... +#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH + +#include <ctype.h> // for isxdigit +#include <inttypes.h> // for PRIu64, PRIx64 +#include <memory> // for shared_ptr, opera... +#include <stdio.h> // for sprintf +#include <stdlib.h> // for strtoul +#include <string.h> // for size_t, strchr +#include <type_traits> // for move +#include <utility> // for pair + +namespace lldb_private { +class ScriptInterpreter; +} +namespace lldb_private { +struct RegisterInfo; +} using namespace lldb; using namespace lldb_private; @@ -822,8 +850,8 @@ static bool DumpValue(Stream &s, const SymbolContext *sc, StreamString bitfield_name; bitfield_name.Printf("%s:%d", target->GetTypeName().AsCString(), target->GetBitfieldBitSize()); - lldb::TypeNameSpecifierImplSP type_sp( - new TypeNameSpecifierImpl(bitfield_name.GetString(), false)); + auto type_sp = std::make_shared<TypeNameSpecifierImpl>( + bitfield_name.GetString(), false); if (val_obj_display == ValueObject::eValueObjectRepresentationStyleSummary && !DataVisualization::GetSummaryForType(type_sp)) diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp index 9c5e6ca80c2..b5dd0bd8a25 100644 --- a/lldb/source/Core/IOHandler.cpp +++ b/lldb/source/Core/IOHandler.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/Core/IOHandler.h" + // C Includes #ifndef LLDB_DISABLE_CURSES #include <curses.h> @@ -21,36 +23,55 @@ // Other libraries and framework includes // Project includes -#include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/IOHandler.h" -#include "lldb/Core/Module.h" -#include "lldb/Core/State.h" #include "lldb/Core/StreamFile.h" -#include "lldb/Core/ValueObjectRegister.h" +#include "lldb/Host/File.h" // for File +#include "lldb/Host/Predicate.h" // for Predicate, ::eBroad... +#include "lldb/Utility/Error.h" // for Error +#include "lldb/Utility/StreamString.h" // for StreamString +#include "lldb/Utility/StringList.h" // for StringList +#include "lldb/lldb-forward.h" // for StreamFileSP + #ifndef LLDB_DISABLE_LIBEDIT #include "lldb/Host/Editline.h" #endif #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Interpreter/CommandInterpreter.h" +#ifndef LLDB_DISABLE_CURSES +#include "lldb/Breakpoint/BreakpointLocation.h" +#include "lldb/Core/Module.h" +#include "lldb/Core/State.h" +#include "lldb/Core/ValueObject.h" +#include "lldb/Core/ValueObjectRegister.h" #include "lldb/Symbol/Block.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" -#include "lldb/Target/RegisterContext.h" -#include "lldb/Target/ThreadPlan.h" -#ifndef LLDB_DISABLE_CURSES -#include "lldb/Core/ValueObject.h" #include "lldb/Symbol/VariableList.h" #include "lldb/Target/Process.h" +#include "lldb/Target/RegisterContext.h" #include "lldb/Target/StackFrame.h" +#include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #endif +#include "llvm/ADT/StringRef.h" // for StringRef + #ifdef _MSC_VER -#include <Windows.h> +#include <windows.h> #endif +#include <memory> // for shared_ptr +#include <mutex> // for recursive_mutex + +#include <assert.h> // for assert +#include <ctype.h> // for isspace +#include <errno.h> // for EINTR, errno +#include <stdint.h> // for uint32_t, UINT32_MAX +#include <stdio.h> // for size_t, fprintf, feof +#include <string.h> // for strlen +#include <type_traits> // for move + using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Listener.cpp b/lldb/source/Core/Listener.cpp index 8de2fa8a576..1afa11649b5 100644 --- a/lldb/source/Core/Listener.cpp +++ b/lldb/source/Core/Listener.cpp @@ -9,16 +9,17 @@ #include "lldb/Core/Listener.h" -// C Includes -// C++ Includes -#include <algorithm> - -// Other libraries and framework includes -// Project includes #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Event.h" +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/Log.h" -#include "lldb/Utility/StreamString.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAllCategoriesSet, LIBL... + +#include "llvm/ADT/Optional.h" // for Optional + +#include <algorithm> +#include <memory> // for make_shared +#include <utility> // for pair, make_pair using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp index 7779db3cc16..0baf0622c77 100644 --- a/lldb/source/Core/Mangled.cpp +++ b/lldb/source/Core/Mangled.cpp @@ -7,10 +7,11 @@ // //===----------------------------------------------------------------------===// -// FreeBSD9-STABLE requires this to know about size_t in cxxabi.h -#include <cstddef> +#include "lldb/Core/Mangled.h" + #if defined(_WIN32) -#include "lldb/Host/windows/windows.h" +#include <windows.h> + #include <dbghelp.h> #pragma comment(lib, "dbghelp.lib") #endif @@ -21,24 +22,31 @@ #include "lldb/Utility/FastDemangle.h" #include "llvm/Demangle/Demangle.h" #else +// FreeBSD9-STABLE requires this to know about size_t in cxxabi. +#include <cstddef> #include <cxxabi.h> #endif -#include "llvm/ADT/DenseMap.h" - -#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" -#include "Plugins/Language/ObjC/ObjCLanguage.h" -#include "lldb/Core/Mangled.h" #include "lldb/Core/Timer.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Logging.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" -#include <ctype.h> +#include "lldb/lldb-enumerations.h" // for LanguageType + +#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" +#include "Plugins/Language/ObjC/ObjCLanguage.h" + +#include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/Support/Compiler.h" // for LLVM_PRETT... + +#include <mutex> // for mutex, loc... +#include <string> // for string +#include <utility> // for pair + #include <stdlib.h> #include <string.h> - using namespace lldb_private; #if defined(_MSC_VER) diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 2156cbe26be..ddc9fca8067 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -9,47 +9,73 @@ #include "lldb/Core/Module.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/Signals.h" -#include "llvm/Support/raw_os_ostream.h" - -// Project includes -#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" -#include "Plugins/Language/ObjC/ObjCLanguage.h" +#include "lldb/Core/AddressRange.h" // for AddressRange #include "lldb/Core/AddressResolverFileLine.h" -#include "lldb/Core/ModuleList.h" +#include "lldb/Core/Debugger.h" // for Debugger +#include "lldb/Core/FileSpecList.h" // for FileSpecList +#include "lldb/Core/Mangled.h" // for Mangled #include "lldb/Core/ModuleSpec.h" -#include "lldb/Core/PluginManager.h" +#include "lldb/Core/SearchFilter.h" // for SearchFilt... #include "lldb/Core/Section.h" #include "lldb/Core/Timer.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" -#include "lldb/Host/Symbols.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/ScriptInterpreter.h" #include "lldb/Symbol/CompileUnit.h" +#include "lldb/Symbol/Function.h" // for Function #include "lldb/Symbol/ObjectFile.h" +#include "lldb/Symbol/Symbol.h" // for Symbol #include "lldb/Symbol/SymbolContext.h" #include "lldb/Symbol/SymbolFile.h" #include "lldb/Symbol/SymbolVendor.h" +#include "lldb/Symbol/Symtab.h" // for Symtab +#include "lldb/Symbol/Type.h" // for Type +#include "lldb/Symbol/TypeList.h" // for TypeList #include "lldb/Symbol/TypeMap.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Target/Language.h" +#include "lldb/Target/Platform.h" // for Platform #include "lldb/Target/Process.h" -#include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" -#include "lldb/Utility/DataBuffer.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAn... #include "lldb/Utility/RegularExpression.h" +#include "lldb/Utility/Stream.h" // for Stream #include "lldb/Utility/StreamString.h" +#if defined(LLVM_ON_WIN32) +#include "lldb/Host/windows/PosixApi.h" // for PATH_MAX +#endif + +#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" +#include "Plugins/Language/ObjC/ObjCLanguage.h" #include "Plugins/ObjectFile/JIT/ObjectFileJIT.h" +#include "llvm/ADT/STLExtras.h" // for make_unique +#include "llvm/Support/Compiler.h" // for LLVM_PRETT... +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/Signals.h" +#include "llvm/Support/raw_ostream.h" // for raw_string... + +#include <assert.h> // for assert +#include <cstdint> // for uint32_t +#include <inttypes.h> // for PRIx64 +#include <map> // for map +#include <stdarg.h> // for va_end +#include <string.h> // for size_t +#include <type_traits> // for move +#include <utility> // for find, pair + +namespace lldb_private { +class CompilerDeclContext; +} +namespace lldb_private { +class VariableList; +} + using namespace lldb; using namespace lldb_private; @@ -304,8 +330,7 @@ ObjectFile *Module::GetMemoryObjectFile(const lldb::ProcessSP &process_sp, std::lock_guard<std::recursive_mutex> guard(m_mutex); if (process_sp) { m_did_load_objfile = true; - std::unique_ptr<DataBufferHeap> data_ap( - new DataBufferHeap(size_to_read, 0)); + auto data_ap = llvm::make_unique<DataBufferHeap>(size_to_read, 0); Error readmem_error; const size_t bytes_read = process_sp->ReadMemory(header_addr, data_ap->GetBytes(), @@ -1307,7 +1332,7 @@ void Module::SectionFileAddressesChanged() { SectionList *Module::GetUnifiedSectionList() { // Populate m_unified_sections_ap with sections from objfile. if (!m_sections_ap) - m_sections_ap.reset(new SectionList()); + m_sections_ap = llvm::make_unique<SectionList>(); return m_sections_ap.get(); } @@ -1654,7 +1679,8 @@ Module::CreateJITModule(const lldb::ObjectFileJITDelegateSP &delegate_sp) { // to the module, so we need to control the creation carefully in // this static function ModuleSP module_sp(new Module()); - module_sp->m_objfile_sp.reset(new ObjectFileJIT(module_sp, delegate_sp)); + module_sp->m_objfile_sp = + std::make_shared<ObjectFileJIT>(module_sp, delegate_sp); if (module_sp->m_objfile_sp) { // Once we get the object file, update our module with the object file's // architecture since it might differ in vendor/os if some parts were diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 0262185eed0..da23329cc3b 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -9,25 +9,54 @@ #include "lldb/Core/ModuleList.h" -// C Includes -// C++ Includes -#include <cstdint> -#include <mutex> - -// Other libraries and framework includes -// Project includes +#include "lldb/Core/ArchSpec.h" // for ArchSpec +#include "lldb/Core/FileSpecList.h" // for FileSpecList #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Host/FileSystem.h" -#include "lldb/Host/Host.h" #include "lldb/Host/Symbols.h" #include "lldb/Symbol/ObjectFile.h" -#include "lldb/Symbol/SymbolFile.h" +#include "lldb/Symbol/SymbolContext.h" // for SymbolContextList, SymbolCon... #include "lldb/Symbol/VariableList.h" +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAnyCategoriesSet +#include "lldb/Utility/UUID.h" // for UUID, operator!=, operator== +#include "lldb/lldb-defines.h" // for LLDB_INVALID_INDEX32 + +#if defined(LLVM_ON_WIN32) +#include "lldb/Host/windows/PosixApi.h" // for PATH_MAX +#endif +#include "llvm/ADT/StringRef.h" // for StringRef #include "llvm/Support/FileSystem.h" #include "llvm/Support/Threading.h" +#include "llvm/Support/raw_ostream.h" // for fs + +#include <chrono> // for operator!=, time_point +#include <memory> // for shared_ptr +#include <mutex> +#include <string> // for string +#include <utility> // for distance + +namespace lldb_private { +class Function; +} +namespace lldb_private { +class RegularExpression; +} +namespace lldb_private { +class Stream; +} +namespace lldb_private { +class SymbolFile; +} +namespace lldb_private { +class Target; +} +namespace lldb_private { +class TypeList; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Opcode.cpp b/lldb/source/Core/Opcode.cpp index a98d5e6a47e..b4e691c1ddc 100644 --- a/lldb/source/Core/Opcode.cpp +++ b/lldb/source/Core/Opcode.cpp @@ -9,17 +9,15 @@ #include "lldb/Core/Opcode.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -#include "llvm/ADT/Triple.h" - -// Project includes -#include "lldb/Core/ArchSpec.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/Stream.h" +#include "lldb/lldb-forward.h" // for DataBufferSP + +#include <memory> // for make_shared + +#include <inttypes.h> // for PRIx64 using namespace lldb; using namespace lldb_private; @@ -132,7 +130,7 @@ uint32_t Opcode::GetData(DataExtractor &data) const { if (buf != nullptr) { DataBufferSP buffer_sp; - buffer_sp.reset(new DataBufferHeap(buf, byte_size)); + buffer_sp = std::make_shared<DataBufferHeap>(buf, byte_size); data.SetByteOrder(GetDataByteOrder()); data.SetData(buffer_sp); return byte_size; diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp index 9131cac20ab..bd4ba599520 100644 --- a/lldb/source/Core/PluginManager.cpp +++ b/lldb/source/Core/PluginManager.cpp @@ -9,24 +9,35 @@ #include "lldb/Core/PluginManager.h" -// C Includes -// C++ Includes -#include <climits> -#include <mutex> -#include <string> -#include <vector> - -// Other libraries and framework includes -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/DynamicLibrary.h" - -// Project includes #include "lldb/Core/Debugger.h" -#include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Interpreter/OptionValueProperties.h" +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/Error.h" #include "lldb/Utility/FileSpec.h" +#include "lldb/Utility/StringList.h" // for StringList + +#if defined(LLVM_ON_WIN32) +#include "lldb/Host/windows/PosixApi.h" // for PATH_MAX +#endif + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/DynamicLibrary.h" +#include "llvm/Support/FileSystem.h" // for file_type, file_... +#include "llvm/Support/raw_ostream.h" // for fs + +#include <map> // for map<>::const_ite... +#include <memory> // for shared_ptr +#include <mutex> +#include <string> +#include <utility> // for pair +#include <vector> + +#include <assert.h> // for assert + +namespace lldb_private { +class CommandInterpreter; +} using namespace lldb; using namespace lldb_private; @@ -2315,7 +2326,8 @@ static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins( OptionValuePropertiesSP plugin_properties_sp = parent_properties_sp->GetSubProperty(nullptr, g_property_name); if (!plugin_properties_sp && can_create) { - plugin_properties_sp.reset(new OptionValueProperties(g_property_name)); + plugin_properties_sp = + std::make_shared<OptionValueProperties>(g_property_name); parent_properties_sp->AppendProperty( g_property_name, ConstString("Settings specify to plugins."), true, plugin_properties_sp); @@ -2325,8 +2337,8 @@ static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins( lldb::OptionValuePropertiesSP plugin_type_properties_sp = plugin_properties_sp->GetSubProperty(nullptr, plugin_type_name); if (!plugin_type_properties_sp && can_create) { - plugin_type_properties_sp.reset( - new OptionValueProperties(plugin_type_name)); + plugin_type_properties_sp = + std::make_shared<OptionValueProperties>(plugin_type_name); plugin_properties_sp->AppendProperty(plugin_type_name, plugin_type_desc, true, plugin_type_properties_sp); } @@ -2349,7 +2361,8 @@ static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle( OptionValuePropertiesSP plugin_properties_sp = parent_properties_sp->GetSubProperty(nullptr, plugin_type_name); if (!plugin_properties_sp && can_create) { - plugin_properties_sp.reset(new OptionValueProperties(plugin_type_name)); + plugin_properties_sp = + std::make_shared<OptionValueProperties>(plugin_type_name); parent_properties_sp->AppendProperty(plugin_type_name, plugin_type_desc, true, plugin_properties_sp); } @@ -2358,8 +2371,8 @@ static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle( lldb::OptionValuePropertiesSP plugin_type_properties_sp = plugin_properties_sp->GetSubProperty(nullptr, g_property_name); if (!plugin_type_properties_sp && can_create) { - plugin_type_properties_sp.reset( - new OptionValueProperties(g_property_name)); + plugin_type_properties_sp = + std::make_shared<OptionValueProperties>(g_property_name); plugin_properties_sp->AppendProperty( g_property_name, ConstString("Settings specific to plugins"), true, plugin_type_properties_sp); diff --git a/lldb/source/Core/RegisterValue.cpp b/lldb/source/Core/RegisterValue.cpp index a3c9fd92c41..26a7515febc 100644 --- a/lldb/source/Core/RegisterValue.cpp +++ b/lldb/source/Core/RegisterValue.cpp @@ -9,15 +9,6 @@ #include "lldb/Core/RegisterValue.h" -// C Includes -// C++ Includes -#include <vector> - -// Other libraries and framework includes -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" - -// Project includes #include "lldb/Core/DumpDataExtractor.h" #include "lldb/Core/Scalar.h" #include "lldb/Interpreter/Args.h" @@ -25,6 +16,20 @@ #include "lldb/Utility/Error.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS +#include "lldb/lldb-private-types.h" // for RegisterInfo, type128 + +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringRef.h" + +#include <cstdint> // for uint8_t, uint32_t, uint64_t +#include <string> // for string +#include <tuple> // for tie, tuple +#include <vector> + +#include <assert.h> // for assert +#include <inttypes.h> // for PRIx64 +#include <stdio.h> // for sscanf using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Scalar.cpp b/lldb/source/Core/Scalar.cpp index d1b8944cad5..88ad430ddba 100644 --- a/lldb/source/Core/Scalar.cpp +++ b/lldb/source/Core/Scalar.cpp @@ -9,22 +9,17 @@ #include "lldb/Core/Scalar.h" -// C Includes -// C++ Includes -#include <cinttypes> -#include <cmath> -#include <cstdio> - -// Other libraries and framework includes -#include "llvm/ADT/SmallString.h" - -// Project includes #include "lldb/Host/StringConvert.h" -#include "lldb/Interpreter/Args.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Stream.h" +#include "lldb/lldb-types.h" // for offset_t + +#include "llvm/ADT/SmallString.h" + +#include <cinttypes> +#include <cstdio> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/SearchFilter.cpp b/lldb/source/Core/SearchFilter.cpp index f8e42792b87..6d29e21c310 100644 --- a/lldb/source/Core/SearchFilter.cpp +++ b/lldb/source/Core/SearchFilter.cpp @@ -7,16 +7,35 @@ // //===----------------------------------------------------------------------===// -// C Includes -// C++ Includes - -// Other libraries and framework includes -// Project includes #include "lldb/Core/SearchFilter.h" + +#include "lldb/Breakpoint/Breakpoint.h" // for Breakpoint #include "lldb/Core/Module.h" +#include "lldb/Core/ModuleList.h" // for ModuleList #include "lldb/Symbol/CompileUnit.h" +#include "lldb/Symbol/SymbolContext.h" // for SymbolContext #include "lldb/Target/Target.h" -#include "lldb/lldb-private.h" +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/Error.h" // for Error +#include "lldb/Utility/Stream.h" // for Stream +#include "lldb/lldb-enumerations.h" // for SymbolContextItem::eSymbolCo... + +#include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/Support/ErrorHandling.h" // for llvm_unreachable + +#include <memory> // for shared_ptr +#include <mutex> // for recursive_mutex, lock_guard +#include <string> // for string + +#include <inttypes.h> // for PRIu64 +#include <string.h> // for size_t, strcmp + +namespace lldb_private { +class Address; +} +namespace lldb_private { +class Function; +} using namespace lldb; using namespace lldb_private; @@ -153,7 +172,7 @@ SearchFilter::WrapOptionsDict(StructuredData::DictionarySP options_dict_sp) { if (!options_dict_sp || !options_dict_sp->IsValid()) return StructuredData::DictionarySP(); - StructuredData::DictionarySP type_dict_sp(new StructuredData::Dictionary()); + auto type_dict_sp = std::make_shared<StructuredData::Dictionary>(); type_dict_sp->AddStringItem(GetSerializationSubclassKey(), GetFilterName()); type_dict_sp->AddItem(GetSerializationSubclassOptionsKey(), options_dict_sp); @@ -169,10 +188,10 @@ void SearchFilter::SerializeFileSpecList( if (num_modules == 0) return; - StructuredData::ArraySP module_array_sp(new StructuredData::Array()); + auto module_array_sp = std::make_shared<StructuredData::Array>(); for (size_t i = 0; i < num_modules; i++) { - module_array_sp->AddItem(StructuredData::StringSP( - new StructuredData::String(file_list.GetFileSpecAtIndex(i).GetPath()))); + module_array_sp->AddItem(std::make_shared<StructuredData::String>( + file_list.GetFileSpecAtIndex(i).GetPath())); } options_dict_sp->AddItem(GetKey(name), module_array_sp); } @@ -321,14 +340,14 @@ Searcher::CallbackReturn SearchFilter::DoFunctionIteration( SearchFilterSP SearchFilterForUnconstrainedSearches::CreateFromStructuredData( Target &target, const StructuredData::Dictionary &data_dict, Error &error) { // No options for an unconstrained search. - return SearchFilterSP( - new SearchFilterForUnconstrainedSearches(target.shared_from_this())); + return std::make_shared<SearchFilterForUnconstrainedSearches>( + target.shared_from_this()); } StructuredData::ObjectSP SearchFilterForUnconstrainedSearches::SerializeToStructuredData() { // The options dictionary is an empty dictionary: - StructuredData::DictionarySP result_sp(new StructuredData::Dictionary()); + auto result_sp = std::make_shared<StructuredData::Dictionary>(); return WrapOptionsDict(result_sp); } @@ -352,8 +371,7 @@ bool SearchFilterForUnconstrainedSearches::ModulePasses( lldb::SearchFilterSP SearchFilterForUnconstrainedSearches::DoCopyForBreakpoint( Breakpoint &breakpoint) { - SearchFilterSP ret_sp(new SearchFilterForUnconstrainedSearches(*this)); - return ret_sp; + return std::make_shared<SearchFilterForUnconstrainedSearches>(*this); } //---------------------------------------------------------------------- @@ -444,8 +462,7 @@ void SearchFilterByModule::Dump(Stream *s) const {} lldb::SearchFilterSP SearchFilterByModule::DoCopyForBreakpoint(Breakpoint &breakpoint) { - SearchFilterSP ret_sp(new SearchFilterByModule(*this)); - return ret_sp; + return std::make_shared<SearchFilterByModule>(*this); } SearchFilterSP SearchFilterByModule::CreateFromStructuredData( @@ -473,16 +490,15 @@ SearchFilterSP SearchFilterByModule::CreateFromStructuredData( } FileSpec module_spec(module, false); - return SearchFilterSP( - new SearchFilterByModule(target.shared_from_this(), module_spec)); + return std::make_shared<SearchFilterByModule>(target.shared_from_this(), + module_spec); } StructuredData::ObjectSP SearchFilterByModule::SerializeToStructuredData() { - StructuredData::DictionarySP options_dict_sp( - new StructuredData::Dictionary()); - StructuredData::ArraySP module_array_sp(new StructuredData::Array()); - module_array_sp->AddItem(StructuredData::StringSP( - new StructuredData::String(m_module_spec.GetPath()))); + auto options_dict_sp = std::make_shared<StructuredData::Dictionary>(); + auto module_array_sp = std::make_shared<StructuredData::Array>(); + module_array_sp->AddItem( + std::make_shared<StructuredData::String>(m_module_spec.GetPath())); options_dict_sp->AddItem(GetKey(OptionNames::ModList), module_array_sp); return WrapOptionsDict(options_dict_sp); } @@ -608,8 +624,7 @@ void SearchFilterByModuleList::Dump(Stream *s) const {} lldb::SearchFilterSP SearchFilterByModuleList::DoCopyForBreakpoint(Breakpoint &breakpoint) { - SearchFilterSP ret_sp(new SearchFilterByModuleList(*this)); - return ret_sp; + return std::make_shared<SearchFilterByModuleList>(*this); } SearchFilterSP SearchFilterByModuleList::CreateFromStructuredData( @@ -632,8 +647,8 @@ SearchFilterSP SearchFilterByModuleList::CreateFromStructuredData( } } - return SearchFilterSP( - new SearchFilterByModuleList(target.shared_from_this(), modules)); + return std::make_shared<SearchFilterByModuleList>(target.shared_from_this(), + modules); } void SearchFilterByModuleList::SerializeUnwrapped( @@ -643,8 +658,7 @@ void SearchFilterByModuleList::SerializeUnwrapped( } StructuredData::ObjectSP SearchFilterByModuleList::SerializeToStructuredData() { - StructuredData::DictionarySP options_dict_sp( - new StructuredData::Dictionary()); + auto options_dict_sp = std::make_shared<StructuredData::Dictionary>(); SerializeUnwrapped(options_dict_sp); return WrapOptionsDict(options_dict_sp); } @@ -718,14 +732,13 @@ lldb::SearchFilterSP SearchFilterByModuleListAndCU::CreateFromStructuredData( cus.Append(FileSpec(cu, false)); } - return SearchFilterSP(new SearchFilterByModuleListAndCU( - target.shared_from_this(), modules, cus)); + return std::make_shared<SearchFilterByModuleListAndCU>( + target.shared_from_this(), modules, cus); } StructuredData::ObjectSP SearchFilterByModuleListAndCU::SerializeToStructuredData() { - StructuredData::DictionarySP options_dict_sp( - new StructuredData::Dictionary()); + auto options_dict_sp = std::make_shared<StructuredData::Dictionary>(); SearchFilterByModuleList::SerializeUnwrapped(options_dict_sp); SerializeFileSpecList(options_dict_sp, OptionNames::CUList, m_cu_spec_list); return WrapOptionsDict(options_dict_sp); @@ -832,6 +845,5 @@ void SearchFilterByModuleListAndCU::Dump(Stream *s) const {} lldb::SearchFilterSP SearchFilterByModuleListAndCU::DoCopyForBreakpoint(Breakpoint &breakpoint) { - SearchFilterSP ret_sp(new SearchFilterByModuleListAndCU(*this)); - return ret_sp; + return std::make_shared<SearchFilterByModuleListAndCU>(*this); } diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp index 63add34ef2f..f6428ced016 100644 --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -8,11 +8,22 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/Section.h" +#include "lldb/Core/Address.h" // for Address #include "lldb/Core/Module.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/Utility/Stream.h" // for Stream +#include "lldb/Utility/VMRange.h" // for VMRange +#include <inttypes.h> // for PRIx64 +#include <limits> // for numeric_limits +#include <utility> // for distance + +namespace lldb_private { +class DataExtractor; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/SourceManager.cpp b/lldb/source/Core/SourceManager.cpp index 3a7e4e969ba..b284ff1dbaa 100644 --- a/lldb/source/Core/SourceManager.cpp +++ b/lldb/source/Core/SourceManager.cpp @@ -9,22 +9,40 @@ #include "lldb/Core/SourceManager.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes +#include "lldb/Core/Address.h" // for Address +#include "lldb/Core/AddressRange.h" // for AddressRange #include "lldb/Core/Debugger.h" +#include "lldb/Core/FormatEntity.h" // for FormatEntity #include "lldb/Core/Module.h" +#include "lldb/Core/ModuleList.h" // for ModuleList #include "lldb/Host/FileSystem.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" +#include "lldb/Symbol/LineEntry.h" // for LineEntry #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Target/PathMappingList.h" // for PathMappingList #include "lldb/Target/Target.h" -#include "lldb/Utility/AnsiTerminal.h" +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/DataBuffer.h" #include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" +#include "lldb/lldb-enumerations.h" // for StopShowColumn::eStopSho... + +#include "llvm/ADT/Twine.h" // for Twine + +#include <memory> +#include <utility> // for pair + +#include <assert.h> // for assert +#include <stdio.h> // for size_t, NULL, snprintf + +namespace lldb_private { +class ExecutionContext; +} +namespace lldb_private { +class ValueObject; +} using namespace lldb; using namespace lldb_private; @@ -75,9 +93,9 @@ SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) { // If file_sp is no good or it points to a non-existent file, reset it. if (!file_sp || !file_sp->GetFileSpec().Exists()) { if (target_sp) - file_sp.reset(new File(file_spec, target_sp.get())); + file_sp = std::make_shared<File>(file_spec, target_sp.get()); else - file_sp.reset(new File(file_spec, debugger_sp)); + file_sp = std::make_shared<File>(file_spec, debugger_sp); if (debugger_sp) debugger_sp->GetSourceFileCache().AddSourceFile(file_sp); diff --git a/lldb/source/Core/State.cpp b/lldb/source/Core/State.cpp index 6bc7ce6b448..4697ca4b5f1 100644 --- a/lldb/source/Core/State.cpp +++ b/lldb/source/Core/State.cpp @@ -12,7 +12,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/State.h" -#include <stdio.h> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/StreamAsynchronousIO.cpp b/lldb/source/Core/StreamAsynchronousIO.cpp index 1f7e634dfe3..aae8636bff0 100644 --- a/lldb/source/Core/StreamAsynchronousIO.cpp +++ b/lldb/source/Core/StreamAsynchronousIO.cpp @@ -10,7 +10,7 @@ #include "lldb/Core/StreamAsynchronousIO.h" #include "lldb/Core/Debugger.h" -#include "lldb/lldb-private.h" +#include "lldb/lldb-enumerations.h" // for ByteOrder::eByteOrderBig using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/StreamFile.cpp b/lldb/source/Core/StreamFile.cpp index 3d22fc13263..f5941548502 100644 --- a/lldb/source/Core/StreamFile.cpp +++ b/lldb/source/Core/StreamFile.cpp @@ -9,12 +9,7 @@ #include "lldb/Core/StreamFile.h" -// C Includes #include <stdio.h> -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Utility/Error.h" using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/StructuredData.cpp b/lldb/source/Core/StructuredData.cpp index eeee4d4d63b..649c4615ad4 100644 --- a/lldb/source/Core/StructuredData.cpp +++ b/lldb/source/Core/StructuredData.cpp @@ -9,17 +9,26 @@ #include "lldb/Core/StructuredData.h" -#include <errno.h> -#include <inttypes.h> -#include <stdlib.h> - #include "lldb/Host/File.h" #include "lldb/Host/StringConvert.h" #include "lldb/Utility/DataBuffer.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/JSON.h" +#include "lldb/Utility/Stream.h" // for Stream #include "lldb/Utility/StreamString.h" +#include "lldb/lldb-enumerations.h" // for FilePermissions::eFilePermiss... +#include "lldb/lldb-forward.h" // for DataBufferSP + +#include "llvm/ADT/STLExtras.h" // for make_unique + +#include <limits> // for numeric_limits + +#include <errno.h> +#include <inttypes.h> +#include <stdio.h> // for printf +#include <stdlib.h> +#include <sys/types.h> // for off_t using namespace lldb_private; @@ -70,10 +79,8 @@ StructuredData::ParseJSONFromFile(const FileSpec &input_spec, Error &error) { static StructuredData::ObjectSP ParseJSONObject(JSONParser &json_parser) { // The "JSONParser::Token::ObjectStart" token should have already been - // consumed - // by the time this function is called - std::unique_ptr<StructuredData::Dictionary> dict_up( - new StructuredData::Dictionary()); + // consumed by the time this function is called + auto dict_up = llvm::make_unique<StructuredData::Dictionary>(); std::string value; std::string key; @@ -105,7 +112,7 @@ static StructuredData::ObjectSP ParseJSONArray(JSONParser &json_parser) { // The "JSONParser::Token::ObjectStart" token should have already been // consumed // by the time this function is called - std::unique_ptr<StructuredData::Array> array_up(new StructuredData::Array()); + auto array_up = llvm::make_unique<StructuredData::Array>(); std::string value; std::string key; @@ -142,26 +149,26 @@ static StructuredData::ObjectSP ParseJSONValue(JSONParser &json_parser) { bool success = false; uint64_t uval = StringConvert::ToUInt64(value.c_str(), 0, 0, &success); if (success) - return StructuredData::ObjectSP(new StructuredData::Integer(uval)); + return std::make_shared<StructuredData::Integer>(uval); } break; case JSONParser::Token::Float: { bool success = false; double val = StringConvert::ToDouble(value.c_str(), 0.0, &success); if (success) - return StructuredData::ObjectSP(new StructuredData::Float(val)); + return std::make_shared<StructuredData::Float>(val); } break; case JSONParser::Token::String: - return StructuredData::ObjectSP(new StructuredData::String(value)); + return std::make_shared<StructuredData::String>(value); case JSONParser::Token::True: case JSONParser::Token::False: - return StructuredData::ObjectSP( - new StructuredData::Boolean(token == JSONParser::Token::True)); + return std::make_shared<StructuredData::Boolean>(token == + JSONParser::Token::True); case JSONParser::Token::Null: - return StructuredData::ObjectSP(new StructuredData::Null()); + return std::make_shared<StructuredData::Null>(); default: break; diff --git a/lldb/source/Core/Timer.cpp b/lldb/source/Core/Timer.cpp index e3d213bced5..60da39b7f19 100644 --- a/lldb/source/Core/Timer.cpp +++ b/lldb/source/Core/Timer.cpp @@ -10,14 +10,16 @@ #include "lldb/Host/Host.h" #include "lldb/Utility/Stream.h" - -#include "llvm/Support/ThreadLocal.h" +#include "lldb/lldb-types.h" // for thread_key_t #include <algorithm> #include <map> #include <mutex> +#include <utility> // for pair #include <vector> +#include <assert.h> // for assert +#include <stdarg.h> // for va_end, va_list, va_start #include <stdio.h> using namespace lldb_private; diff --git a/lldb/source/Core/UserSettingsController.cpp b/lldb/source/Core/UserSettingsController.cpp index edcc5b2a455..59a88ccdb93 100644 --- a/lldb/source/Core/UserSettingsController.cpp +++ b/lldb/source/Core/UserSettingsController.cpp @@ -1,5 +1,4 @@ -//====-- UserSettingsController.cpp ------------------------------*- C++ -//-*-===// +//====-- UserSettingsController.cpp ------------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -8,17 +7,26 @@ // //===----------------------------------------------------------------------===// -#include <algorithm> -#include <string.h> - #include "lldb/Core/UserSettingsController.h" -#include "lldb/Interpreter/CommandInterpreter.h" + #include "lldb/Interpreter/OptionValueProperties.h" -#include "lldb/Interpreter/OptionValueString.h" #include "lldb/Utility/Error.h" -#include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" -#include "lldb/Utility/StreamString.h" + +#include <memory> // for shared_ptr + +namespace lldb_private { +class CommandInterpreter; +} +namespace lldb_private { +class ConstString; +} +namespace lldb_private { +class ExecutionContext; +} +namespace lldb_private { +class Property; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp index 8874fc8fe0e..9aaddf77021 100644 --- a/lldb/source/Core/Value.cpp +++ b/lldb/source/Core/Value.cpp @@ -9,13 +9,10 @@ #include "lldb/Core/Value.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes +#include "lldb/Core/Address.h" // for Address +#include "lldb/Core/ArchSpec.h" // for ArchSpec #include "lldb/Core/Module.h" #include "lldb/Core/State.h" -#include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolContext.h" @@ -25,9 +22,20 @@ #include "lldb/Target/Process.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" +#include "lldb/Utility/Endian.h" // for InlHostByteOrder +#include "lldb/Utility/FileSpec.h" // for FileSpec #include "lldb/Utility/Stream.h" +#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS +#include "lldb/lldb-forward.h" // for DataBufferSP, ModuleSP +#include "lldb/lldb-types.h" // for addr_t + +#include <memory> // for make_shared +#include <string> // for string + +#include <inttypes.h> // for PRIx64 using namespace lldb; using namespace lldb_private; @@ -538,7 +546,8 @@ Error Value::GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data, // Make sure we have enough room within "data", and if we don't make // something large enough that does if (!data.ValidOffsetForDataOfSize(data_offset, byte_size)) { - DataBufferSP data_sp(new DataBufferHeap(data_offset + byte_size, '\0')); + auto data_sp = + std::make_shared<DataBufferHeap>(data_offset + byte_size, '\0'); data.SetData(data_sp); } diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 970a8dc884c..381763dab8e 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -9,52 +9,67 @@ #include "lldb/Core/ValueObject.h" -// C Includes -#include <stdlib.h> - -// C++ Includes -// Other libraries and framework includes -#include "llvm/Support/raw_ostream.h" - -// Project includes -#include "lldb/Core/Debugger.h" +#include "lldb/Core/Address.h" // for Address #include "lldb/Core/Module.h" +#include "lldb/Core/Scalar.h" // for Scalar #include "lldb/Core/ValueObjectCast.h" #include "lldb/Core/ValueObjectChild.h" #include "lldb/Core/ValueObjectConstResult.h" #include "lldb/Core/ValueObjectDynamicValue.h" -#include "lldb/Core/ValueObjectList.h" #include "lldb/Core/ValueObjectMemory.h" #include "lldb/Core/ValueObjectSyntheticFilter.h" -#include "lldb/Utility/DataBufferHeap.h" -#include "lldb/Utility/Log.h" -#include "lldb/Utility/StreamString.h" - #include "lldb/DataFormatters/DataVisualization.h" +#include "lldb/DataFormatters/FormatManager.h" // for FormatManager #include "lldb/DataFormatters/StringPrinter.h" +#include "lldb/DataFormatters/TypeFormat.h" // for TypeFormatImpl_F... +#include "lldb/DataFormatters/TypeSummary.h" // for TypeSummaryOptions +#include "lldb/DataFormatters/TypeValidator.h" // for TypeValidatorImp... #include "lldb/DataFormatters/ValueObjectPrinter.h" - -#include "Plugins/ExpressionParser/Clang/ClangExpressionVariable.h" -#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h" - -#include "lldb/Utility/Endian.h" - -#include "lldb/Interpreter/CommandInterpreter.h" - +#include "lldb/Expression/ExpressionVariable.h" // for ExpressionVariable #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/CompilerType.h" +#include "lldb/Symbol/Declaration.h" // for Declaration +#include "lldb/Symbol/SymbolContext.h" // for SymbolContext #include "lldb/Symbol/Type.h" - #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Language.h" #include "lldb/Target/LanguageRuntime.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" -#include "lldb/Target/RegisterContext.h" -#include "lldb/Target/SectionLoadList.h" +#include "lldb/Target/StackFrame.h" // for StackFrame #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Target/ThreadList.h" // for ThreadList +#include "lldb/Utility/DataBuffer.h" // for DataBuffer +#include "lldb/Utility/DataBufferHeap.h" +#include "lldb/Utility/Flags.h" // for Flags +#include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAllCateg... +#include "lldb/Utility/SharingPtr.h" // for SharingPtr +#include "lldb/Utility/Stream.h" // for Stream +#include "lldb/Utility/StreamString.h" +#include "lldb/lldb-private-types.h" // for RegisterInfo + +#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH + +#include <algorithm> // for min +#include <cstdint> // for uint32_t, uint64_t +#include <cstdlib> // for size_t, NULL +#include <memory> // for shared_ptr, oper... +#include <tuple> // for tie, tuple + +#include <assert.h> // for assert +#include <inttypes.h> // for PRIu64, PRIx64 +#include <stdio.h> // for snprintf +#include <string.h> // for memcpy, memcmp + +namespace lldb_private { +class ExecutionContextScope; +} +namespace lldb_private { +class SymbolContextScope; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectCast.cpp b/lldb/source/Core/ValueObjectCast.cpp index 9845b2fea1b..aa4cf60c1f9 100644 --- a/lldb/source/Core/ValueObjectCast.cpp +++ b/lldb/source/Core/ValueObjectCast.cpp @@ -9,27 +9,16 @@ #include "lldb/Core/ValueObjectCast.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/Module.h" +#include "lldb/Core/Scalar.h" // for operator!=, Scalar #include "lldb/Core/Value.h" #include "lldb/Core/ValueObject.h" -#include "lldb/Core/ValueObjectList.h" -#include "lldb/Utility/Log.h" - #include "lldb/Symbol/CompilerType.h" -#include "lldb/Symbol/ObjectFile.h" -#include "lldb/Symbol/SymbolContext.h" -#include "lldb/Symbol/Type.h" -#include "lldb/Symbol/Variable.h" - #include "lldb/Target/ExecutionContext.h" -#include "lldb/Target/Process.h" -#include "lldb/Target/RegisterContext.h" -#include "lldb/Target/Target.h" -#include "lldb/Target/Thread.h" +#include "lldb/Utility/Error.h" // for Error + +namespace lldb_private { +class ConstString; +} using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp index 9b2bdd1e468..eeb28c960a3 100644 --- a/lldb/source/Core/ValueObjectChild.cpp +++ b/lldb/source/Core/ValueObjectChild.cpp @@ -9,18 +9,21 @@ #include "lldb/Core/ValueObjectChild.h" -#include "lldb/Core/Module.h" -#include "lldb/Core/ValueObjectList.h" - +#include "lldb/Core/Scalar.h" // for Scalar +#include "lldb/Core/Value.h" // for Value, Value::ValueType::e... #include "lldb/Symbol/CompilerType.h" -#include "lldb/Symbol/ObjectFile.h" -#include "lldb/Symbol/SymbolContext.h" -#include "lldb/Symbol/Type.h" -#include "lldb/Symbol/Variable.h" - #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Process.h" -#include "lldb/Target/Target.h" +#include "lldb/Utility/Error.h" // for Error +#include "lldb/Utility/Flags.h" // for Flags +#include "lldb/lldb-forward.h" // for ProcessSP, ModuleSP + +#include <functional> // for _Func_impl<>::_Mybase +#include <memory> // for shared_ptr +#include <vector> // for vector + +#include <stdio.h> // for snprintf, size_t +#include <string.h> // for strlen using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp index cac7b2657b7..cf437ce6f7d 100644 --- a/lldb/source/Core/ValueObjectConstResult.cpp +++ b/lldb/source/Core/ValueObjectConstResult.cpp @@ -9,22 +9,19 @@ #include "lldb/Core/ValueObjectConstResult.h" -#include "lldb/Core/Module.h" -#include "lldb/Core/ValueObjectChild.h" -#include "lldb/Core/ValueObjectConstResultChild.h" +#include "lldb/Core/Scalar.h" // for Scalar #include "lldb/Core/ValueObjectDynamicValue.h" -#include "lldb/Core/ValueObjectList.h" -#include "lldb/Utility/DataExtractor.h" - #include "lldb/Symbol/CompilerType.h" -#include "lldb/Symbol/ObjectFile.h" -#include "lldb/Symbol/SymbolContext.h" -#include "lldb/Symbol/Type.h" -#include "lldb/Symbol/Variable.h" - #include "lldb/Target/ExecutionContext.h" +#include "lldb/Target/ExecutionContextScope.h" // for ExecutionContextScope #include "lldb/Target/Process.h" -#include "lldb/Target/Target.h" +#include "lldb/Utility/DataBuffer.h" // for DataBuffer +#include "lldb/Utility/DataBufferHeap.h" // for DataBufferHeap +#include "lldb/Utility/DataExtractor.h" + +namespace lldb_private { +class Module; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectConstResultCast.cpp b/lldb/source/Core/ValueObjectConstResultCast.cpp index 32451468c18..f575bebd711 100644 --- a/lldb/source/Core/ValueObjectConstResultCast.cpp +++ b/lldb/source/Core/ValueObjectConstResultCast.cpp @@ -9,10 +9,15 @@ #include "lldb/Core/ValueObjectConstResultCast.h" -#include "lldb/Core/ValueObjectConstResult.h" -#include "lldb/Core/ValueObjectList.h" - -#include "lldb/Symbol/ClangASTContext.h" +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class ValueObject; +} using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectConstResultChild.cpp b/lldb/source/Core/ValueObjectConstResultChild.cpp index c4c9c63c765..9c6ad8becf3 100644 --- a/lldb/source/Core/ValueObjectConstResultChild.cpp +++ b/lldb/source/Core/ValueObjectConstResultChild.cpp @@ -1,5 +1,4 @@ -//===-- ValueObjectConstResultChild.cpp ------------------------------*- C++ -//-*-===// +//===-- ValueObjectConstResultChild.cpp --------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -10,10 +9,16 @@ #include "lldb/Core/ValueObjectConstResultChild.h" -#include "lldb/Core/ValueObjectConstResult.h" -#include "lldb/Core/ValueObjectList.h" - -#include "lldb/Symbol/ClangASTContext.h" +#include "lldb/lldb-private-enumerations.h" // for AddressType::eAddressType +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Error; +} +namespace lldb_private { +class ValueObject; +} using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectConstResultImpl.cpp b/lldb/source/Core/ValueObjectConstResultImpl.cpp index 02f2e0975aa..ed25ea8071a 100644 --- a/lldb/source/Core/ValueObjectConstResultImpl.cpp +++ b/lldb/source/Core/ValueObjectConstResultImpl.cpp @@ -1,5 +1,4 @@ -//===-- ValueObjectConstResultImpl.cpp ---------------------------*- C++ -//-*-===// +//===-- ValueObjectConstResultImpl.cpp ---------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -10,24 +9,26 @@ #include "lldb/Core/ValueObjectConstResultImpl.h" -#include "lldb/Core/Module.h" -#include "lldb/Core/ValueObjectChild.h" +#include "lldb/Core/Scalar.h" // for Scalar +#include "lldb/Core/Value.h" // for Value, Value::Val... +#include "lldb/Core/ValueObject.h" // for ValueObject #include "lldb/Core/ValueObjectConstResult.h" #include "lldb/Core/ValueObjectConstResultCast.h" #include "lldb/Core/ValueObjectConstResultChild.h" -#include "lldb/Core/ValueObjectList.h" -#include "lldb/Core/ValueObjectMemory.h" -#include "lldb/Utility/DataExtractor.h" - #include "lldb/Symbol/CompilerType.h" -#include "lldb/Symbol/ObjectFile.h" -#include "lldb/Symbol/SymbolContext.h" -#include "lldb/Symbol/Type.h" -#include "lldb/Symbol/Variable.h" - #include "lldb/Target/ExecutionContext.h" -#include "lldb/Target/Process.h" -#include "lldb/Target/Target.h" +#include "lldb/Utility/DataBufferHeap.h" // for DataBufferHeap +#include "lldb/Utility/Endian.h" // for InlHostByteOrder +#include "lldb/Utility/SharingPtr.h" // for SharingPtr + +#include <string> // for string + +namespace lldb_private { +class DataExtractor; +} +namespace lldb_private { +class Error; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp index be282d7ccec..59bbc025f99 100644 --- a/lldb/source/Core/ValueObjectDynamicValue.cpp +++ b/lldb/source/Core/ValueObjectDynamicValue.cpp @@ -1,5 +1,4 @@ -//===-- ValueObjectDynamicValue.cpp ---------------------------------*- C++ -//-*-===// +//===-- ValueObjectDynamicValue.cpp ------------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -10,28 +9,26 @@ #include "lldb/Core/ValueObjectDynamicValue.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/Module.h" +#include "lldb/Core/ArchSpec.h" // for ArchSpec +#include "lldb/Core/Scalar.h" // for Scalar, operator!= #include "lldb/Core/Value.h" #include "lldb/Core/ValueObject.h" -#include "lldb/Core/ValueObjectList.h" -#include "lldb/Utility/Log.h" - #include "lldb/Symbol/CompilerType.h" -#include "lldb/Symbol/ObjectFile.h" -#include "lldb/Symbol/SymbolContext.h" #include "lldb/Symbol/Type.h" -#include "lldb/Symbol/Variable.h" - #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/LanguageRuntime.h" #include "lldb/Target/Process.h" -#include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" -#include "lldb/Target/Thread.h" +#include "lldb/Utility/DataExtractor.h" // for DataExtractor +#include "lldb/Utility/Error.h" // for Error +#include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAllCategoriesSet +#include "lldb/lldb-types.h" // for addr_t, offset_t + +#include <string.h> // for strcmp, size_t +namespace lldb_private { +class Declaration; +} using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectList.cpp b/lldb/source/Core/ValueObjectList.cpp index 7eae4974441..00aee798c0e 100644 --- a/lldb/source/Core/ValueObjectList.cpp +++ b/lldb/source/Core/ValueObjectList.cpp @@ -9,15 +9,11 @@ #include "lldb/Core/ValueObjectList.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/ValueObjectChild.h" -#include "lldb/Core/ValueObjectRegister.h" -#include "lldb/Core/ValueObjectVariable.h" -#include "lldb/Target/ExecutionContext.h" -#include "lldb/Target/Process.h" +#include "lldb/Core/ValueObject.h" // for ValueObject +#include "lldb/Utility/ConstString.h" // for ConstString +#include "lldb/Utility/SharingPtr.h" // for SharingPtr + +#include <utility> // for back_insert_iterator, back_ins... using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp index 18f3c94c522..0fb8f0d2de0 100644 --- a/lldb/source/Core/ValueObjectMemory.cpp +++ b/lldb/source/Core/ValueObjectMemory.cpp @@ -9,25 +9,24 @@ #include "lldb/Core/ValueObjectMemory.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/Module.h" +#include "lldb/Core/ArchSpec.h" // for ArchSpec +#include "lldb/Core/Scalar.h" // for Scalar, operator!= #include "lldb/Core/Value.h" #include "lldb/Core/ValueObject.h" -#include "lldb/Core/ValueObjectList.h" - -#include "lldb/Symbol/ObjectFile.h" -#include "lldb/Symbol/SymbolContext.h" #include "lldb/Symbol/Type.h" -#include "lldb/Symbol/Variable.h" - #include "lldb/Target/ExecutionContext.h" -#include "lldb/Target/Process.h" -#include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" -#include "lldb/Target/Thread.h" +#include "lldb/Utility/DataExtractor.h" // for DataExtractor +#include "lldb/Utility/Error.h" // for Error +#include "lldb/lldb-types.h" // for addr_t +#include "llvm/Support/ErrorHandling.h" // for llvm_unreachable + +#include <assert.h> // for assert +#include <memory> // for shared_ptr + +namespace lldb_private { +class ExecutionContextScope; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectRegister.cpp b/lldb/source/Core/ValueObjectRegister.cpp index 80e00e4007c..6469340201e 100644 --- a/lldb/source/Core/ValueObjectRegister.cpp +++ b/lldb/source/Core/ValueObjectRegister.cpp @@ -9,19 +9,28 @@ #include "lldb/Core/ValueObjectRegister.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/Module.h" -#include "lldb/Symbol/ClangASTContext.h" +#include "lldb/Core/Scalar.h" // for Scalar +#include "lldb/Core/Value.h" // for Value, Value::ContextType:... #include "lldb/Symbol/CompilerType.h" -#include "lldb/Symbol/TypeList.h" +#include "lldb/Symbol/TypeSystem.h" // for TypeSystem #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Target/StackFrame.h" // for StackFrame #include "lldb/Target/Target.h" -#include "lldb/Target/Thread.h" +#include "lldb/Utility/DataExtractor.h" // for DataExtractor +#include "lldb/Utility/Error.h" // for Error +#include "lldb/Utility/Stream.h" // for Stream + +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <assert.h> // for assert +#include <memory> // for shared_ptr + +namespace lldb_private { +class ExecutionContextScope; +} using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectSyntheticFilter.cpp b/lldb/source/Core/ValueObjectSyntheticFilter.cpp index b48be968420..f0fd76ed09f 100644 --- a/lldb/source/Core/ValueObjectSyntheticFilter.cpp +++ b/lldb/source/Core/ValueObjectSyntheticFilter.cpp @@ -7,15 +7,22 @@ // //===----------------------------------------------------------------------===// -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/ValueObjectSyntheticFilter.h" +#include "lldb/Core/Value.h" // for Value #include "lldb/Core/ValueObject.h" #include "lldb/DataFormatters/TypeSynthetic.h" +#include "lldb/Target/ExecutionContext.h" // for ExecutionContext +#include "lldb/Utility/Error.h" // for Error #include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" // for GetLogIfAllCategoriesSet +#include "lldb/Utility/SharingPtr.h" // for SharingPtr + +#include "llvm/ADT/STLExtras.h" + +namespace lldb_private { +class Declaration; +} using namespace lldb_private; @@ -124,7 +131,7 @@ lldb::ValueType ValueObjectSynthetic::GetValueType() const { void ValueObjectSynthetic::CreateSynthFilter() { m_synth_filter_ap = (m_synth_sp->GetFrontEnd(*m_parent)); if (!m_synth_filter_ap.get()) - m_synth_filter_ap.reset(new DummySyntheticFrontEnd(*m_parent)); + m_synth_filter_ap = llvm::make_unique<DummySyntheticFrontEnd>(*m_parent); } bool ValueObjectSynthetic::UpdateValue() { diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index f8eedc30e70..169f8f0f6c2 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -9,28 +9,44 @@ #include "lldb/Core/ValueObjectVariable.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes +#include "lldb/Core/Address.h" // for Address +#include "lldb/Core/AddressRange.h" // for AddressRange +#include "lldb/Core/ArchSpec.h" // for ArchSpec #include "lldb/Core/Module.h" #include "lldb/Core/RegisterValue.h" +#include "lldb/Core/Scalar.h" // for Scalar, operator!= #include "lldb/Core/Value.h" -#include "lldb/Core/ValueObjectList.h" - +#include "lldb/Expression/DWARFExpression.h" // for DWARFExpression +#include "lldb/Symbol/Declaration.h" // for Declaration #include "lldb/Symbol/Function.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Symbol/SymbolContextScope.h" #include "lldb/Symbol/Type.h" #include "lldb/Symbol/Variable.h" - #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" -#include "lldb/Target/Thread.h" +#include "lldb/Utility/DataExtractor.h" // for DataExtractor +#include "lldb/Utility/Error.h" // for Error +#include "lldb/lldb-private-enumerations.h" // for AddressType::eAddressTy... +#include "lldb/lldb-types.h" // for addr_t + +#include "llvm/ADT/StringRef.h" // for StringRef + +#include <assert.h> // for assert +#include <memory> // for shared_ptr +namespace lldb_private { +class ExecutionContextScope; +} +namespace lldb_private { +class StackFrame; +} +namespace lldb_private { +struct RegisterInfo; +} using namespace lldb_private; lldb::ValueObjectSP diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp index fd0454bb1fc..c81ed5feb5c 100644 --- a/lldb/source/Host/common/File.cpp +++ b/lldb/source/Host/common/File.cpp @@ -29,7 +29,6 @@ #include "lldb/Host/Config.h" #include "lldb/Utility/DataBufferHeap.h" -#include "lldb/Utility/Error.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Log.h" diff --git a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp index 953eb8cb014..8fc038f3f9b 100644 --- a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp +++ b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp @@ -10,6 +10,7 @@ #include "lldb/Host/windows/ConnectionGenericFileWindows.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Log.h" +#include "lldb/Utility/Timeout.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" diff --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp index 2ffd1e2691c..655fada3a4b 100644 --- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp +++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp @@ -14,6 +14,7 @@ #include "lldb/Core/Address.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/PluginManager.h" +#include "lldb/Core/RegisterValue.h" #include "lldb/Symbol/UnwindPlan.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Stream.h" diff --git a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp index 14644489320..aa7c6e5d1fe 100644 --- a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp +++ b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp @@ -1,5 +1,4 @@ -//===-- EmulateInstructionMIPS.cpp -------------------------------*- C++ -//-*-===// +//===-- EmulateInstructionMIPS.cpp -------------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -16,6 +15,7 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Opcode.h" #include "lldb/Core/PluginManager.h" +#include "lldb/Core/RegisterValue.h" #include "lldb/Symbol/UnwindPlan.h" #include "lldb/Target/Target.h" #include "lldb/Utility/ConstString.h" diff --git a/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp b/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp index 21c824a8413..4c90a1901da 100644 --- a/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp +++ b/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp @@ -1,5 +1,4 @@ -//===-- EmulateInstructionMIPS64.cpp -------------------------------*- C++ -//-*-===// +//===-- EmulateInstructionMIPS64.cpp -----------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -16,6 +15,7 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Opcode.h" #include "lldb/Core/PluginManager.h" +#include "lldb/Core/RegisterValue.h" #include "lldb/Host/PosixApi.h" #include "lldb/Symbol/UnwindPlan.h" #include "lldb/Utility/ConstString.h" diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp index 200d7d4538f..b97d67a0bb4 100644 --- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -17,6 +17,8 @@ #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" #include "lldb/Interpreter/OptionValueProperties.h" +#include "lldb/Symbol/ObjectFile.h" +#include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Symbol/SymbolVendor.h" #include "lldb/Target/Process.h" diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 38d27a8d4be..638112b9ebd 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -20,6 +20,7 @@ #include "lldb/Core/Debugger.h" #include "lldb/Core/DumpDataExtractor.h" #include "lldb/Core/PluginManager.h" +#include "lldb/Core/RegisterValue.h" #include "lldb/Core/ValueObjectVariable.h" #include "lldb/DataFormatters/DumpValueObjectOptions.h" #include "lldb/Expression/UserExpression.h" diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 1bcffaafa90..cff1a90eaf7 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -24,6 +24,7 @@ #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RangeMap.h" +#include "lldb/Core/RegisterValue.h" #include "lldb/Core/Section.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/Timer.h" diff --git a/lldb/source/Plugins/Platform/Android/AdbClient.cpp b/lldb/source/Plugins/Platform/Android/AdbClient.cpp index ee18aa09f87..2060bd1de73 100644 --- a/lldb/source/Plugins/Platform/Android/AdbClient.cpp +++ b/lldb/source/Plugins/Platform/Android/AdbClient.cpp @@ -24,6 +24,7 @@ #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/StreamString.h" +#include "lldb/Utility/Timeout.h" #include <limits.h> diff --git a/lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt b/lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt index 6cf124a5f99..009a289bae3 100644 --- a/lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt +++ b/lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt @@ -27,6 +27,7 @@ add_lldb_library(lldbPluginProcessWindowsCommon PLUGIN lldbCore lldbHost lldbInterpreter + lldbSymbol lldbTarget ws2_32 rpcrt4 diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp index 345b5730061..56a98a8eef6 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -23,6 +23,7 @@ #include "lldb/Host/HostProcess.h" #include "lldb/Host/windows/HostThreadWindows.h" #include "lldb/Host/windows/windows.h" +#include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/DynamicLoader.h" #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Target/StopInfo.h" diff --git a/lldb/source/Target/ProcessLaunchInfo.cpp b/lldb/source/Target/ProcessLaunchInfo.cpp index a34b59fe3db..7de55f2fdcf 100644 --- a/lldb/source/Target/ProcessLaunchInfo.cpp +++ b/lldb/source/Target/ProcessLaunchInfo.cpp @@ -21,6 +21,7 @@ #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Log.h" +#include "lldb/Utility/StreamString.h" #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/FileSystem.h" diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index 19b53028d89..03151fbfc17 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -17,6 +17,7 @@ #include "lldb/Core/FormatEntity.h" #include "lldb/Core/Mangled.h" #include "lldb/Core/Module.h" +#include "lldb/Core/RegisterValue.h" #include "lldb/Core/Value.h" #include "lldb/Core/ValueObjectConstResult.h" #include "lldb/Core/ValueObjectMemory.h" diff --git a/lldb/source/Target/ThreadPlanStepUntil.cpp b/lldb/source/Target/ThreadPlanStepUntil.cpp index 701ed06c8ad..01f5f948a28 100644 --- a/lldb/source/Target/ThreadPlanStepUntil.cpp +++ b/lldb/source/Target/ThreadPlanStepUntil.cpp @@ -12,7 +12,9 @@ // Other libraries and framework includes // Project includes #include "lldb/Target/ThreadPlanStepUntil.h" + #include "lldb/Breakpoint/Breakpoint.h" +#include "lldb/Symbol/SymbolContextScope.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" diff --git a/llvm/include/llvm/Support/Endian.h b/llvm/include/llvm/Support/Endian.h index 5619c75f09f..06e089ffa16 100644 --- a/llvm/include/llvm/Support/Endian.h +++ b/llvm/include/llvm/Support/Endian.h @@ -17,6 +17,8 @@ #include "llvm/Support/Host.h" #include "llvm/Support/SwapByteOrder.h" +#include <stdint.h> + namespace llvm { namespace support { enum endianness {big, little, native}; |