Index: include/lldb/API/SBCommandInterpreter.h =================================================================== --- include/lldb/API/SBCommandInterpreter.h +++ include/lldb/API/SBCommandInterpreter.h @@ -120,7 +120,7 @@ lldb::CommandOverrideCallback callback, void *baton); - SBCommandInterpreter (lldb_private::CommandInterpreter *interpreter_ptr = NULL); // Access using SBDebugger::GetCommandInterpreter(); + SBCommandInterpreter (lldb_private::CommandInterpreter *interpreter_ptr = nullptr); // Access using SBDebugger::GetCommandInterpreter(); //---------------------------------------------------------------------- /// Return true if the command interpreter is the active IO handler. @@ -203,10 +203,10 @@ GetHelp (); lldb::SBCommand - AddMultiwordCommand (const char* name, const char* help = NULL); + AddMultiwordCommand (const char* name, const char* help = nullptr); lldb::SBCommand - AddCommand (const char* name, lldb::SBCommandPluginInterface* impl, const char* help = NULL); + AddCommand (const char* name, lldb::SBCommandPluginInterface* impl, const char* help = nullptr); private: Index: include/lldb/API/SBCommandReturnObject.h =================================================================== --- include/lldb/API/SBCommandReturnObject.h +++ include/lldb/API/SBCommandReturnObject.h @@ -100,7 +100,7 @@ void SetError (lldb::SBError &error, - const char *fallback_error_cstr = NULL); + const char *fallback_error_cstr = nullptr); void SetError (const char* error_cstr); Index: include/lldb/API/SBTarget.h =================================================================== --- include/lldb/API/SBTarget.h +++ include/lldb/API/SBTarget.h @@ -704,7 +704,7 @@ BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line); lldb::SBBreakpoint - BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL); + BreakpointCreateByName (const char *symbol_name, const char *module_name = nullptr); // This version uses name_type_mask = eFunctionNameTypeAuto lldb::SBBreakpoint @@ -726,7 +726,7 @@ const SBFileSpecList &comp_unit_list); lldb::SBBreakpoint - BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL); + BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = nullptr); lldb::SBBreakpoint BreakpointCreateByRegex (const char *symbol_name_regex, @@ -736,7 +736,7 @@ lldb::SBBreakpoint BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpec &source_file, - const char *module_name = NULL); + const char *module_name = nullptr); lldb::SBBreakpoint BreakpointCreateBySourceRegex (const char *source_regex, Index: include/lldb/Breakpoint/Breakpoint.h =================================================================== --- include/lldb/Breakpoint/Breakpoint.h +++ include/lldb/Breakpoint/Breakpoint.h @@ -260,7 +260,7 @@ //------------------------------------------------------------------ lldb::BreakpointLocationSP AddLocation (const Address &addr, - bool *new_location = NULL); + bool *new_location = nullptr); //------------------------------------------------------------------ /// Find a breakpoint location by Address. Index: include/lldb/Breakpoint/BreakpointLocation.h =================================================================== --- include/lldb/Breakpoint/BreakpointLocation.h +++ include/lldb/Breakpoint/BreakpointLocation.h @@ -177,7 +177,7 @@ // condition has been set. //------------------------------------------------------------------ const char * - GetConditionText (size_t *hash = NULL) const; + GetConditionText (size_t *hash = nullptr) const; bool ConditionSaysStop (ExecutionContext &exe_ctx, Error &error); Index: include/lldb/Breakpoint/BreakpointLocationList.h =================================================================== --- include/lldb/Breakpoint/BreakpointLocationList.h +++ include/lldb/Breakpoint/BreakpointLocationList.h @@ -247,7 +247,7 @@ lldb::BreakpointLocationSP AddLocation (const Address &addr, bool resolve_indirect_symbols, - bool *new_location = NULL); + bool *new_location = nullptr); bool RemoveLocation (const lldb::BreakpointLocationSP &bp_loc_sp); Index: include/lldb/Breakpoint/BreakpointOptions.h =================================================================== --- include/lldb/Breakpoint/BreakpointOptions.h +++ include/lldb/Breakpoint/BreakpointOptions.h @@ -184,7 +184,7 @@ /// A pointer to the condition expression text, or NULL if no // condition has been set. //------------------------------------------------------------------ - const char *GetConditionText (size_t *hash = NULL) const; + const char *GetConditionText (size_t *hash = nullptr) const; //------------------------------------------------------------------ // Enabled/Ignore Count @@ -326,7 +326,7 @@ ~CommandBaton () { delete ((CommandData *)m_data); - m_data = NULL; + m_data = nullptr; } virtual void Index: include/lldb/Breakpoint/Watchpoint.h =================================================================== --- include/lldb/Breakpoint/Watchpoint.h +++ include/lldb/Breakpoint/Watchpoint.h @@ -110,7 +110,7 @@ void GetDescription (Stream *s, lldb::DescriptionLevel level); void Dump (Stream *s) const; - void DumpSnapshots (Stream *s, const char * prefix = NULL) const; + void DumpSnapshots (Stream *s, const char * prefix = nullptr) const; void DumpWithLevel (Stream *s, lldb::DescriptionLevel description_level) const; Target &GetTarget() { return m_target; } const Error &GetError() { return m_error; } Index: include/lldb/Breakpoint/WatchpointOptions.h =================================================================== --- include/lldb/Breakpoint/WatchpointOptions.h +++ include/lldb/Breakpoint/WatchpointOptions.h @@ -227,7 +227,7 @@ ~CommandBaton () { delete ((CommandData *)m_data); - m_data = NULL; + m_data = nullptr; } virtual void Index: include/lldb/Core/Address.h =================================================================== --- include/lldb/Core/Address.h +++ include/lldb/Core/Address.h @@ -351,7 +351,7 @@ bool IsSectionOffset() const { - return IsValid() && (GetSection().get() != NULL); + return IsValid() && (GetSection().get() != nullptr); } //------------------------------------------------------------------ Index: include/lldb/Core/AddressRange.h =================================================================== --- include/lldb/Core/AddressRange.h +++ include/lldb/Core/AddressRange.h @@ -62,7 +62,7 @@ /// @param[in] section_list /// A list of sections, one of which may contain the \a vaddr. //------------------------------------------------------------------ - AddressRange (lldb::addr_t file_addr, lldb::addr_t byte_size, const SectionList *section_list = NULL); + AddressRange (lldb::addr_t file_addr, lldb::addr_t byte_size, const SectionList *section_list = nullptr); //------------------------------------------------------------------ /// Construct with a Address object address and byte size. Index: include/lldb/Core/Broadcaster.h =================================================================== --- include/lldb/Core/Broadcaster.h +++ include/lldb/Core/Broadcaster.h @@ -286,10 +286,10 @@ BroadcastEventIfUnique (lldb::EventSP &event_sp); void - BroadcastEvent (uint32_t event_type, EventData *event_data = NULL); + BroadcastEvent (uint32_t event_type, EventData *event_data = nullptr); void - BroadcastEventIfUnique (uint32_t event_type, EventData *event_data = NULL); + BroadcastEventIfUnique (uint32_t event_type, EventData *event_data = nullptr); void Clear(); @@ -367,7 +367,7 @@ event_names_map::const_iterator pos = m_event_names.find (event_mask); if (pos != m_event_names.end()) return pos->second.c_str(); - return NULL; + return nullptr; } bool Index: include/lldb/Core/Communication.h =================================================================== --- include/lldb/Core/Communication.h +++ include/lldb/Core/Communication.h @@ -153,7 +153,7 @@ /// @see bool Connection::Disconnect (); //------------------------------------------------------------------ lldb::ConnectionStatus - Disconnect (Error *error_ptr = NULL); + Disconnect (Error *error_ptr = nullptr); //------------------------------------------------------------------ /// Check if the connection is valid. @@ -274,7 +274,7 @@ /// @see void Communication::AppendBytesToCache (const uint8_t * bytes, size_t len, bool broadcast); //------------------------------------------------------------------ virtual bool - StartReadThread (Error *error_ptr = NULL); + StartReadThread (Error *error_ptr = nullptr); //------------------------------------------------------------------ /// Stops the read thread by cancelling it. @@ -284,10 +284,10 @@ /// false otherwise. //------------------------------------------------------------------ virtual bool - StopReadThread (Error *error_ptr = NULL); + StopReadThread (Error *error_ptr = nullptr); virtual bool - JoinReadThread (Error *error_ptr = NULL); + JoinReadThread (Error *error_ptr = nullptr); //------------------------------------------------------------------ /// Checks if there is a currently running read thread. /// Index: include/lldb/Core/ConstString.h =================================================================== --- include/lldb/Core/ConstString.h +++ include/lldb/Core/ConstString.h @@ -42,7 +42,7 @@ /// Initializes the string to an empty string. //------------------------------------------------------------------ ConstString (): - m_string (NULL) + m_string (nullptr) { } @@ -231,9 +231,9 @@ /// the C string value contained in this object. //------------------------------------------------------------------ const char * - AsCString(const char *value_if_empty = NULL) const + AsCString(const char *value_if_empty = nullptr) const { - if (m_string == NULL) + if (m_string == nullptr) return value_if_empty; return m_string; } @@ -293,7 +293,7 @@ void Clear () { - m_string = NULL; + m_string = nullptr; } //------------------------------------------------------------------ @@ -337,7 +337,7 @@ /// will be output to the stream. //------------------------------------------------------------------ void - Dump (Stream *s, const char *value_if_empty = NULL) const; + Dump (Stream *s, const char *value_if_empty = nullptr) const; //------------------------------------------------------------------ /// Dump the object debug description to a stream. @@ -358,7 +358,7 @@ bool IsEmpty () const { - return m_string == NULL || m_string[0] == '\0'; + return m_string == nullptr || m_string[0] == '\0'; } //------------------------------------------------------------------ Index: include/lldb/Core/DataExtractor.h =================================================================== --- include/lldb/Core/DataExtractor.h +++ include/lldb/Core/DataExtractor.h @@ -211,7 +211,7 @@ uint64_t base_addr, uint32_t num_per_line, Type type, - const char *type_format = NULL) const; + const char *type_format = nullptr) const; //------------------------------------------------------------------ /// Dumps \a item_count objects into the stream \a s. @@ -283,7 +283,7 @@ uint64_t base_addr, uint32_t item_bit_size, uint32_t item_bit_offset, - ExecutionContextScope *exe_scope = NULL) const; + ExecutionContextScope *exe_scope = nullptr) const; //------------------------------------------------------------------ /// Dump a UUID value at \a offset. @@ -1122,7 +1122,7 @@ { if (length > 0 && ValidOffsetForDataOfSize(offset, length)) return m_start + offset; - return NULL; + return nullptr; } //------------------------------------------------------------------ Index: include/lldb/Core/Debugger.h =================================================================== --- include/lldb/Core/Debugger.h +++ include/lldb/Core/Debugger.h @@ -56,7 +56,7 @@ Error& error); static lldb::DebuggerSP - CreateInstance (lldb::LogOutputCallback log_callback = NULL, void *baton = NULL); + CreateInstance (lldb::LogOutputCallback log_callback = nullptr, void *baton = nullptr); static lldb::TargetSP FindTargetWithProcessID (lldb::pid_t pid); @@ -239,7 +239,7 @@ const ExecutionContext *exe_ctx, const Address *addr, Stream &s, - ValueObject* valobj = NULL); + ValueObject* valobj = nullptr); void Index: include/lldb/Core/Event.h =================================================================== --- include/lldb/Core/Event.h +++ include/lldb/Core/Event.h @@ -127,9 +127,9 @@ public: - Event (Broadcaster *broadcaster, uint32_t event_type, EventData *data = NULL); + Event (Broadcaster *broadcaster, uint32_t event_type, EventData *data = nullptr); - Event (uint32_t event_type, EventData *data = NULL); + Event (uint32_t event_type, EventData *data = nullptr); ~Event (); Index: include/lldb/Core/IOHandler.h =================================================================== --- include/lldb/Core/IOHandler.h +++ include/lldb/Core/IOHandler.h @@ -113,7 +113,7 @@ GetPrompt () { // Prompt support isn't mandatory - return NULL; + return nullptr; } virtual bool @@ -573,7 +573,7 @@ IOHandlerStack () : m_stack(), m_mutex(Mutex::eMutexTypeRecursive), - m_top (NULL) + m_top (nullptr) { } @@ -627,7 +627,7 @@ m_stack.pop(); // Set m_top the non-locking IsTop() call if (m_stack.empty()) - m_top = NULL; + m_top = nullptr; else m_top = m_stack.top().get(); } Index: include/lldb/Core/Listener.h =================================================================== --- include/lldb/Core/Listener.h +++ include/lldb/Core/Listener.h @@ -124,7 +124,7 @@ //------------------------------------------------------------------ struct BroadcasterInfo { - BroadcasterInfo(uint32_t mask, HandleBroadcastCallback cb = NULL, void *ud = NULL) : + BroadcasterInfo(uint32_t mask, HandleBroadcastCallback cb = nullptr, void *ud = nullptr) : event_mask (mask), callback (cb), callback_user_data (ud) Index: include/lldb/Core/MappedHash.h =================================================================== --- include/lldb/Core/MappedHash.h +++ include/lldb/Core/MappedHash.h @@ -375,9 +375,9 @@ MemoryTable (lldb_private::DataExtractor &data) : m_header (), - m_hash_indexes (NULL), - m_hash_values (NULL), - m_hash_offsets (NULL) + m_hash_indexes (nullptr), + m_hash_values (nullptr), + m_hash_offsets (nullptr) { lldb::offset_t offset = m_header.Read (data, 0); if (offset != LLDB_INVALID_OFFSET && IsValid ()) Index: include/lldb/Core/Module.h =================================================================== --- include/lldb/Core/Module.h +++ include/lldb/Core/Module.h @@ -87,9 +87,9 @@ //------------------------------------------------------------------ Module (const FileSpec& file_spec, const ArchSpec& arch, - const ConstString *object_name = NULL, + const ConstString *object_name = nullptr, off_t object_offset = 0, - const TimeValue *object_mod_time_ptr = NULL); + const TimeValue *object_mod_time_ptr = nullptr); Module (const ModuleSpec &module_spec); @@ -648,7 +648,7 @@ bool LoadScriptingResourceInTarget (Target *target, Error& error, - Stream* feedback_stream = NULL); + Stream* feedback_stream = nullptr); //------------------------------------------------------------------ /// Get the number of compile units for this module. @@ -742,7 +742,7 @@ //------------------------------------------------------------------ virtual SymbolVendor* GetSymbolVendor(bool can_create = true, - lldb_private::Stream *feedback_strm = NULL); + lldb_private::Stream *feedback_strm = nullptr); //------------------------------------------------------------------ /// Get accessor the type list for this module. Index: include/lldb/Core/ModuleList.h =================================================================== --- include/lldb/Core/ModuleList.h +++ include/lldb/Core/ModuleList.h @@ -525,7 +525,7 @@ bool LoadScriptingResourcesInTarget (Target *target, std::list& errors, - Stream* feedback_stream = NULL, + Stream* feedback_stream = nullptr, bool continue_on_error = true); static bool Index: include/lldb/Core/ModuleSpec.h =================================================================== --- include/lldb/Core/ModuleSpec.h +++ include/lldb/Core/ModuleSpec.h @@ -96,7 +96,7 @@ { if (m_file) return &m_file; - return NULL; + return nullptr; } const FileSpec * @@ -104,7 +104,7 @@ { if (m_file) return &m_file; - return NULL; + return nullptr; } FileSpec & @@ -123,7 +123,7 @@ { if (m_platform_file) return &m_platform_file; - return NULL; + return nullptr; } const FileSpec * @@ -131,7 +131,7 @@ { if (m_platform_file) return &m_platform_file; - return NULL; + return nullptr; } FileSpec & @@ -151,7 +151,7 @@ { if (m_symbol_file) return &m_symbol_file; - return NULL; + return nullptr; } const FileSpec * @@ -159,7 +159,7 @@ { if (m_symbol_file) return &m_symbol_file; - return NULL; + return nullptr; } FileSpec & @@ -180,7 +180,7 @@ { if (m_arch.IsValid()) return &m_arch; - return NULL; + return nullptr; } const ArchSpec * @@ -188,7 +188,7 @@ { if (m_arch.IsValid()) return &m_arch; - return NULL; + return nullptr; } ArchSpec & @@ -208,7 +208,7 @@ { if (m_uuid.IsValid()) return &m_uuid; - return NULL; + return nullptr; } const UUID * @@ -216,7 +216,7 @@ { if (m_uuid.IsValid()) return &m_uuid; - return NULL; + return nullptr; } UUID & Index: include/lldb/Core/Opcode.h =================================================================== --- include/lldb/Core/Opcode.h +++ include/lldb/Core/Opcode.h @@ -212,7 +212,7 @@ { if (m_type == Opcode::eTypeBytes) return m_data.inst.bytes; - return NULL; + return nullptr; } uint32_t @@ -252,7 +252,7 @@ case Opcode::eType64: return &m_data.inst64; case Opcode::eTypeBytes: return m_data.inst.bytes; } - return NULL; + return nullptr; } lldb::ByteOrder Index: include/lldb/Core/PluginManager.h =================================================================== --- include/lldb/Core/PluginManager.h +++ include/lldb/Core/PluginManager.h @@ -68,7 +68,7 @@ RegisterPlugin (const ConstString &name, const char *description, DynamicLoaderCreateInstance create_callback, - DebuggerInitializeCallback debugger_init_callback = NULL); + DebuggerInitializeCallback debugger_init_callback = nullptr); static bool UnregisterPlugin (DynamicLoaderCreateInstance create_callback); @@ -86,7 +86,7 @@ RegisterPlugin (const ConstString &name, const char *description, JITLoaderCreateInstance create_callback, - DebuggerInitializeCallback debugger_init_callback = NULL); + DebuggerInitializeCallback debugger_init_callback = nullptr); static bool UnregisterPlugin (JITLoaderCreateInstance create_callback); @@ -244,7 +244,7 @@ RegisterPlugin (const ConstString &name, const char *description, PlatformCreateInstance create_callback, - DebuggerInitializeCallback debugger_init_callback = NULL); + DebuggerInitializeCallback debugger_init_callback = nullptr); static bool UnregisterPlugin (PlatformCreateInstance create_callback); @@ -271,7 +271,7 @@ RegisterPlugin (const ConstString &name, const char *description, ProcessCreateInstance create_callback, - DebuggerInitializeCallback debugger_init_callback = NULL); + DebuggerInitializeCallback debugger_init_callback = nullptr); static bool UnregisterPlugin (ProcessCreateInstance create_callback); Index: include/lldb/Core/RangeMap.h =================================================================== --- include/lldb/Core/RangeMap.h +++ include/lldb/Core/RangeMap.h @@ -326,7 +326,7 @@ { if (iContains(addr)) return &(*pos); } - return NULL; + return nullptr; } const Entry * FindEntryThatContains (B addr) const @@ -1282,7 +1282,7 @@ if (pos != end && pos->Contains(addr)) return &(*pos); } - return NULL; + return nullptr; } const Entry * Index: include/lldb/Core/RegisterValue.h =================================================================== --- include/lldb/Core/RegisterValue.h +++ include/lldb/Core/RegisterValue.h @@ -161,7 +161,7 @@ GetScalarValue (Scalar &scalar) const; uint8_t - GetAsUInt8 (uint8_t fail_value = UINT8_MAX, bool *success_ptr = NULL) const + GetAsUInt8 (uint8_t fail_value = UINT8_MAX, bool *success_ptr = nullptr) const { if (m_type == eTypeUInt8) { @@ -175,13 +175,13 @@ } uint16_t - GetAsUInt16 (uint16_t fail_value = UINT16_MAX, bool *success_ptr = NULL) const; + GetAsUInt16 (uint16_t fail_value = UINT16_MAX, bool *success_ptr = nullptr) const; uint32_t - GetAsUInt32 (uint32_t fail_value = UINT32_MAX, bool *success_ptr = NULL) const; + GetAsUInt32 (uint32_t fail_value = UINT32_MAX, bool *success_ptr = nullptr) const; uint64_t - GetAsUInt64 (uint64_t fail_value = UINT64_MAX, bool *success_ptr = NULL) const; + GetAsUInt64 (uint64_t fail_value = UINT64_MAX, bool *success_ptr = nullptr) const; #if defined (ENABLE_128_BIT_SUPPORT) __uint128_t @@ -189,13 +189,13 @@ #endif float - GetAsFloat (float fail_value = 0.0f, bool *success_ptr = NULL) const; + GetAsFloat (float fail_value = 0.0f, bool *success_ptr = nullptr) const; double - GetAsDouble (double fail_value = 0.0, bool *success_ptr = NULL) const; + GetAsDouble (double fail_value = 0.0, bool *success_ptr = nullptr) const; long double - GetAsLongDouble (long double fail_value = 0.0, bool *success_ptr = NULL) const; + GetAsLongDouble (long double fail_value = 0.0, bool *success_ptr = nullptr) const; void SetValueToInvalid () Index: include/lldb/Core/RegularExpression.h =================================================================== --- include/lldb/Core/RegularExpression.h +++ include/lldb/Core/RegularExpression.h @@ -93,7 +93,7 @@ GetData () { if (m_matches.empty()) - return NULL; + return nullptr; return m_matches.data(); } @@ -203,7 +203,7 @@ /// expression, \b false otherwise. //------------------------------------------------------------------ bool - Execute (const char* string, Match *match = NULL, int execute_flags = 0) const; + Execute (const char* string, Match *match = nullptr, int execute_flags = 0) const; size_t GetErrorAsCString (char *err_str, size_t err_str_max_len) const; Index: include/lldb/Core/STLUtils.h =================================================================== --- include/lldb/Core/STLUtils.h +++ include/lldb/Core/STLUtils.h @@ -62,7 +62,7 @@ }; template -inline void PrintAllCollectionElements (std::ostream &s, const T& coll, const char* header_cstr=NULL, const char* separator_cstr=" ") +inline void PrintAllCollectionElements (std::ostream &s, const T& coll, const char* header_cstr=nullptr, const char* separator_cstr=" ") { typename T::const_iterator pos; Index: include/lldb/Core/SourceManager.h =================================================================== --- include/lldb/Core/SourceManager.h +++ include/lldb/Core/SourceManager.h @@ -141,7 +141,7 @@ uint32_t context_after, const char* current_line_cstr, Stream *s, - const SymbolContextList *bp_locs = NULL); + const SymbolContextList *bp_locs = nullptr); // This variant uses the last file we visited. size_t @@ -150,13 +150,13 @@ uint32_t curr_line, const char* current_line_cstr, Stream *s, - const SymbolContextList *bp_locs = NULL); + const SymbolContextList *bp_locs = nullptr); size_t DisplayMoreWithLineNumbers (Stream *s, uint32_t count, bool reverse, - const SymbolContextList *bp_locs = NULL); + const SymbolContextList *bp_locs = nullptr); bool SetDefaultFileAndLine (const FileSpec &file_spec, uint32_t line); @@ -167,7 +167,7 @@ bool DefaultFileAndLineSet () { - return (m_last_file_sp.get() != NULL); + return (m_last_file_sp.get() != nullptr); } void Index: include/lldb/Core/Stream.h =================================================================== --- include/lldb/Core/Stream.h +++ include/lldb/Core/Stream.h @@ -359,7 +359,7 @@ /// A suffix C string. If NULL, no suffix will be output. //------------------------------------------------------------------ void - Address (uint64_t addr, uint32_t addr_size, const char *prefix = NULL, const char *suffix = NULL); + Address (uint64_t addr, uint32_t addr_size, const char *prefix = nullptr, const char *suffix = nullptr); //------------------------------------------------------------------ /// Output an address range to this stream. @@ -383,7 +383,7 @@ /// A suffix C string. If NULL, no suffix will be output. //------------------------------------------------------------------ void - AddressRange(uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size, const char *prefix = NULL, const char *suffix = NULL); + AddressRange(uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size, const char *prefix = nullptr, const char *suffix = nullptr); //------------------------------------------------------------------ /// Output a C string to the stream. @@ -479,7 +479,7 @@ /// output the indentation characters. //------------------------------------------------------------------ size_t - Indent(const char *s = NULL); + Indent(const char *s = nullptr); //------------------------------------------------------------------ /// Decrement the current indentation level. Index: include/lldb/Core/StringList.h =================================================================== --- include/lldb/Core/StringList.h +++ include/lldb/Core/StringList.h @@ -116,7 +116,7 @@ SplitIntoLines (const char *lines, size_t len); std::string - CopyList(const char* item_preamble = NULL, + CopyList(const char* item_preamble = nullptr, const char* items_sep = "\n") const; StringList& Index: include/lldb/Core/Timer.h =================================================================== --- include/lldb/Core/Timer.h +++ include/lldb/Core/Timer.h @@ -121,7 +121,7 @@ { TimeValue now (TimeValue::Now()); const uint64_t elapsed_nsec = now - m_start; - const char *unit = NULL; + const char *unit = nullptr; float elapsed_value; if (elapsed_nsec < 1000) { Index: include/lldb/Core/UUID.h =================================================================== --- include/lldb/Core/UUID.h +++ include/lldb/Core/UUID.h @@ -58,7 +58,7 @@ SetBytes (const void *uuid_bytes, uint32_t num_uuid_bytes = 16); std::string - GetAsString (const char *separator = NULL) const; + GetAsString (const char *separator = nullptr) const; size_t SetFromCString (const char *c_str, uint32_t num_uuid_bytes = 16); Index: include/lldb/Core/UniqueCStringMap.h =================================================================== --- include/lldb/Core/UniqueCStringMap.h +++ include/lldb/Core/UniqueCStringMap.h @@ -37,7 +37,7 @@ struct Entry { Entry () : - cstring(NULL), + cstring(nullptr), value() { } @@ -148,7 +148,7 @@ { if (idx < m_map.size()) return m_map[idx].cstring; - return NULL; + return nullptr; } //------------------------------------------------------------------ @@ -191,7 +191,7 @@ if (pos_cstr == unique_cstr) return &(*pos); } - return NULL; + return nullptr; } //------------------------------------------------------------------ @@ -216,7 +216,7 @@ return next_entry; } } - return NULL; + return nullptr; } size_t Index: include/lldb/Core/Value.h =================================================================== --- include/lldb/Core/Value.h +++ include/lldb/Core/Value.h @@ -157,7 +157,7 @@ void ClearContext () { - m_context = NULL; + m_context = nullptr; m_context_type = eContextTypeInvalid; } Index: include/lldb/Core/ValueObject.h =================================================================== --- include/lldb/Core/ValueObject.h +++ include/lldb/Core/ValueObject.h @@ -401,7 +401,7 @@ GetObjectRuntimeLanguage(); virtual uint32_t - GetTypeInfo (ClangASTType *pointee_or_element_clang_type = NULL); + GetTypeInfo (ClangASTType *pointee_or_element_clang_type = nullptr); virtual bool IsPointerType (); @@ -444,20 +444,20 @@ lldb::ValueObjectSP GetValueForExpressionPath(const char* expression, - const char** first_unparsed = NULL, - ExpressionPathScanEndReason* reason_to_stop = NULL, - ExpressionPathEndResultType* final_value_type = NULL, + const char** first_unparsed = nullptr, + ExpressionPathScanEndReason* reason_to_stop = nullptr, + ExpressionPathEndResultType* final_value_type = nullptr, const GetValueForExpressionPathOptions& options = GetValueForExpressionPathOptions::DefaultOptions(), - ExpressionPathAftermath* final_task_on_target = NULL); + ExpressionPathAftermath* final_task_on_target = nullptr); int GetValuesForExpressionPath(const char* expression, lldb::ValueObjectListSP& list, - const char** first_unparsed = NULL, - ExpressionPathScanEndReason* reason_to_stop = NULL, - ExpressionPathEndResultType* final_value_type = NULL, + const char** first_unparsed = nullptr, + ExpressionPathScanEndReason* reason_to_stop = nullptr, + ExpressionPathEndResultType* final_value_type = nullptr, const GetValueForExpressionPathOptions& options = GetValueForExpressionPathOptions::DefaultOptions(), - ExpressionPathAftermath* final_task_on_target = NULL); + ExpressionPathAftermath* final_task_on_target = nullptr); virtual bool IsInScope () @@ -507,10 +507,10 @@ std::string& destination); virtual uint64_t - GetValueAsUnsigned (uint64_t fail_value, bool *success = NULL); + GetValueAsUnsigned (uint64_t fail_value, bool *success = nullptr); virtual int64_t - GetValueAsSigned (int64_t fail_value, bool *success = NULL); + GetValueAsSigned (int64_t fail_value, bool *success = nullptr); virtual bool SetValueFromCString (const char *value_str, Error& error); @@ -542,36 +542,36 @@ // this will always create the children if necessary lldb::ValueObjectSP GetChildAtIndexPath (const std::initializer_list &idxs, - size_t* index_of_error = NULL); + size_t* index_of_error = nullptr); lldb::ValueObjectSP GetChildAtIndexPath (const std::vector &idxs, - size_t* index_of_error = NULL); + size_t* index_of_error = nullptr); lldb::ValueObjectSP GetChildAtIndexPath (const std::initializer_list< std::pair > &idxs, - size_t* index_of_error = NULL); + size_t* index_of_error = nullptr); lldb::ValueObjectSP GetChildAtIndexPath (const std::vector< std::pair > &idxs, - size_t* index_of_error = NULL); + size_t* index_of_error = nullptr); // this will always create the children if necessary lldb::ValueObjectSP GetChildAtNamePath (const std::initializer_list &names, - ConstString* name_of_error = NULL); + ConstString* name_of_error = nullptr); lldb::ValueObjectSP GetChildAtNamePath (const std::vector &names, - ConstString* name_of_error = NULL); + ConstString* name_of_error = nullptr); lldb::ValueObjectSP GetChildAtNamePath (const std::initializer_list< std::pair > &names, - ConstString* name_of_error = NULL); + ConstString* name_of_error = nullptr); lldb::ValueObjectSP GetChildAtNamePath (const std::vector< std::pair > &names, - ConstString* name_of_error = NULL); + ConstString* name_of_error = nullptr); virtual lldb::ValueObjectSP GetChildMemberWithName (const ConstString &name, bool can_create); @@ -644,10 +644,10 @@ virtual lldb::addr_t GetAddressOf (bool scalar_is_load_address = true, - AddressType *address_type = NULL); + AddressType *address_type = nullptr); lldb::addr_t - GetPointerValue (AddressType *address_type = NULL); + GetPointerValue (AddressType *address_type = nullptr); lldb::ValueObjectSP GetSyntheticChild (const ConstString &key) const; @@ -945,7 +945,7 @@ ChildrenIterator iter = m_children.find(idx); ChildrenIterator end = m_children.end(); if (iter == end) - return NULL; + return nullptr; else return iter->second; } Index: include/lldb/Core/ValueObjectCast.h =================================================================== --- include/lldb/Core/ValueObjectCast.h +++ include/lldb/Core/ValueObjectCast.h @@ -50,7 +50,7 @@ if (m_parent) return m_parent->GetParent(); else - return NULL; + return nullptr; } virtual const ValueObject * @@ -59,7 +59,7 @@ if (m_parent) return m_parent->GetParent(); else - return NULL; + return nullptr; } protected: Index: include/lldb/Core/ValueObjectConstResult.h =================================================================== --- include/lldb/Core/ValueObjectConstResult.h +++ include/lldb/Core/ValueObjectConstResult.h @@ -100,7 +100,7 @@ virtual lldb::addr_t GetAddressOf (bool scalar_is_load_address = true, - AddressType *address_type = NULL); + AddressType *address_type = nullptr); virtual size_t GetPointeeData (DataExtractor& data, Index: include/lldb/Core/ValueObjectConstResultImpl.h =================================================================== --- include/lldb/Core/ValueObjectConstResultImpl.h +++ include/lldb/Core/ValueObjectConstResultImpl.h @@ -73,7 +73,7 @@ virtual lldb::addr_t GetAddressOf (bool scalar_is_load_address = true, - AddressType *address_type = NULL); + AddressType *address_type = nullptr); virtual size_t GetPointeeData (DataExtractor& data, Index: include/lldb/Core/ValueObjectDynamicValue.h =================================================================== --- include/lldb/Core/ValueObjectDynamicValue.h +++ include/lldb/Core/ValueObjectDynamicValue.h @@ -59,7 +59,7 @@ if (m_parent) return m_parent->GetParent(); else - return NULL; + return nullptr; } virtual const ValueObject * @@ -68,7 +68,7 @@ if (m_parent) return m_parent->GetParent(); else - return NULL; + return nullptr; } virtual lldb::ValueObjectSP @@ -83,7 +83,7 @@ if (m_owning_valobj_sp == owning_sp) return; - assert (m_owning_valobj_sp.get() == NULL); + assert (m_owning_valobj_sp.get() == nullptr); m_owning_valobj_sp = owning_sp; } Index: include/lldb/Core/ValueObjectSyntheticFilter.h =================================================================== --- include/lldb/Core/ValueObjectSyntheticFilter.h +++ include/lldb/Core/ValueObjectSyntheticFilter.h @@ -113,7 +113,7 @@ if (m_parent) return m_parent->GetParent(); else - return NULL; + return nullptr; } virtual const ValueObject * @@ -122,7 +122,7 @@ if (m_parent) return m_parent->GetParent(); else - return NULL; + return nullptr; } virtual lldb::ValueObjectSP Index: include/lldb/DataFormatters/DataVisualization.h =================================================================== --- include/lldb/DataFormatters/DataVisualization.h +++ include/lldb/DataFormatters/DataVisualization.h @@ -76,8 +76,8 @@ AnyMatches(ConstString type_name, TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES, bool only_enabled = true, - const char** matching_category = NULL, - TypeCategoryImpl::FormatCategoryItems* matching_type = NULL); + const char** matching_category = nullptr, + TypeCategoryImpl::FormatCategoryItems* matching_type = nullptr); class NamedSummaryFormats { Index: include/lldb/DataFormatters/FormatClasses.h =================================================================== --- include/lldb/DataFormatters/FormatClasses.h +++ include/lldb/DataFormatters/FormatClasses.h @@ -146,7 +146,7 @@ { if (m_type.m_type_name.size()) return m_type.m_type_name.c_str(); - return NULL; + return nullptr; } lldb::TypeSP Index: include/lldb/DataFormatters/FormatManager.h =================================================================== --- include/lldb/DataFormatters/FormatManager.h +++ include/lldb/DataFormatters/FormatManager.h @@ -108,7 +108,7 @@ } lldb::TypeCategoryImplSP - GetCategory (const char* category_name = NULL, + GetCategory (const char* category_name = nullptr, bool can_create = true) { if (!category_name) @@ -157,8 +157,8 @@ AnyMatches (ConstString type_name, TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES, bool only_enabled = true, - const char** matching_category = NULL, - TypeCategoryImpl::FormatCategoryItems* matching_type = NULL) + const char** matching_category = nullptr, + TypeCategoryImpl::FormatCategoryItems* matching_type = nullptr) { return m_categories_map.AnyMatches(type_name, items, Index: include/lldb/DataFormatters/FormattersContainer.h =================================================================== --- include/lldb/DataFormatters/FormattersContainer.h +++ include/lldb/DataFormatters/FormattersContainer.h @@ -275,20 +275,20 @@ void Add (const MapKeyType &type, const MapValueType& entry) { - Add_Impl(type, entry, (KeyType*)NULL); + Add_Impl(type, entry, (KeyType*)nullptr); } bool Delete (ConstString type) { - return Delete_Impl(type, (KeyType*)NULL); + return Delete_Impl(type, (KeyType*)nullptr); } bool Get(ValueObject& valobj, MapValueType& entry, lldb::DynamicValueType use_dynamic, - uint32_t* why = NULL) + uint32_t* why = nullptr) { uint32_t value = lldb_private::eFormatterChoiceCriterionDirectChoice; ClangASTType ast_type(valobj.GetClangType()); @@ -305,13 +305,13 @@ bool Get (ConstString type, MapValueType& entry) { - return Get_Impl(type, entry, (KeyType*)NULL); + return Get_Impl(type, entry, (KeyType*)nullptr); } bool GetExact (ConstString type, MapValueType& entry) { - return GetExact_Impl(type, entry, (KeyType*)NULL); + return GetExact_Impl(type, entry, (KeyType*)nullptr); } MapValueType @@ -323,7 +323,7 @@ lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierAtIndex (size_t index) { - return GetTypeNameSpecifierAtIndex_Impl(index, (KeyType*)NULL); + return GetTypeNameSpecifierAtIndex_Impl(index, (KeyType*)nullptr); } void @@ -400,7 +400,7 @@ bool GetExact_Impl (ConstString type, MapValueType& entry, ConstString *dummy) { - return Get_Impl(type,entry, (KeyType*)0); + return Get_Impl(type,entry, (KeyType*)nullptr); } lldb::TypeNameSpecifierImplSP @@ -418,7 +418,7 @@ GetTypeNameSpecifierAtIndex_Impl (size_t index, lldb::RegularExpressionSP *dummy) { lldb::RegularExpressionSP regex = m_format_map.GetKeyAtIndex(index); - if (regex.get() == NULL) + if (regex.get() == nullptr) return lldb::TypeNameSpecifierImplSP(); return lldb::TypeNameSpecifierImplSP(new TypeNameSpecifierImpl(regex->GetText(), true)); Index: include/lldb/DataFormatters/TypeCategory.h =================================================================== --- include/lldb/DataFormatters/TypeCategory.h +++ include/lldb/DataFormatters/TypeCategory.h @@ -205,19 +205,19 @@ Get (ValueObject& valobj, const FormattersMatchVector& candidates, lldb::TypeFormatImplSP& entry, - uint32_t* reason = NULL); + uint32_t* reason = nullptr); bool Get (ValueObject& valobj, const FormattersMatchVector& candidates, lldb::TypeSummaryImplSP& entry, - uint32_t* reason = NULL); + uint32_t* reason = nullptr); bool Get (ValueObject& valobj, const FormattersMatchVector& candidates, lldb::SyntheticChildrenSP& entry, - uint32_t* reason = NULL); + uint32_t* reason = nullptr); void Clear (FormatCategoryItems items = ALL_ITEM_TYPES); @@ -239,8 +239,8 @@ AnyMatches (ConstString type_name, FormatCategoryItems items = ALL_ITEM_TYPES, bool only_enabled = true, - const char** matching_category = NULL, - FormatCategoryItems* matching_type = NULL); + const char** matching_category = nullptr, + FormatCategoryItems* matching_type = nullptr); typedef std::shared_ptr SharedPointer; Index: include/lldb/DataFormatters/TypeCategoryMap.h =================================================================== --- include/lldb/DataFormatters/TypeCategoryMap.h +++ include/lldb/DataFormatters/TypeCategoryMap.h @@ -85,8 +85,8 @@ AnyMatches (ConstString type_name, TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES, bool only_enabled = true, - const char** matching_category = NULL, - TypeCategoryImpl::FormatCategoryItems* matching_type = NULL); + const char** matching_category = nullptr, + TypeCategoryImpl::FormatCategoryItems* matching_type = nullptr); uint32_t GetCount () Index: include/lldb/DataFormatters/TypeSummary.h =================================================================== --- include/lldb/DataFormatters/TypeSummary.h +++ include/lldb/DataFormatters/TypeSummary.h @@ -477,7 +477,7 @@ ScriptSummaryFormat(const TypeSummaryImpl::Flags& flags, const char *function_name, - const char* python_script = NULL); + const char* python_script = nullptr); const char* GetFunctionName () const Index: include/lldb/DataFormatters/TypeSynthetic.h =================================================================== --- include/lldb/DataFormatters/TypeSynthetic.h +++ include/lldb/DataFormatters/TypeSynthetic.h @@ -491,7 +491,7 @@ ScriptedSyntheticChildren (const SyntheticChildren::Flags& flags, const char* pclass, - const char* pcode = NULL) : + const char* pcode = nullptr) : SyntheticChildren(flags), m_python_class(), m_python_code() @@ -559,7 +559,7 @@ virtual size_t CalculateNumChildren () { - if (!m_wrapper_sp || m_interpreter == NULL) + if (!m_wrapper_sp || m_interpreter == nullptr) return 0; return m_interpreter->CalculateNumChildren(m_wrapper_sp); } @@ -570,7 +570,7 @@ virtual bool Update () { - if (!m_wrapper_sp || m_interpreter == NULL) + if (!m_wrapper_sp || m_interpreter == nullptr) return false; return m_interpreter->UpdateSynthProviderInstance(m_wrapper_sp); @@ -579,7 +579,7 @@ virtual bool MightHaveChildren () { - if (!m_wrapper_sp || m_interpreter == NULL) + if (!m_wrapper_sp || m_interpreter == nullptr) return false; return m_interpreter->MightHaveChildrenSynthProviderInstance(m_wrapper_sp); @@ -588,7 +588,7 @@ virtual size_t GetIndexOfChildWithName (const ConstString &name) { - if (!m_wrapper_sp || m_interpreter == NULL) + if (!m_wrapper_sp || m_interpreter == nullptr) return UINT32_MAX; return m_interpreter->GetIndexOfChildWithName(m_wrapper_sp, name.GetCString()); } @@ -605,7 +605,7 @@ auto synth_ptr = SyntheticChildrenFrontEnd::AutoPointer(new FrontEnd(m_python_class, backend)); if (synth_ptr && ((FrontEnd*)synth_ptr.get())->IsValid()) return synth_ptr; - return NULL; + return nullptr; } private: Index: include/lldb/DataFormatters/ValueObjectPrinter.h =================================================================== --- include/lldb/DataFormatters/ValueObjectPrinter.h +++ include/lldb/DataFormatters/ValueObjectPrinter.h @@ -221,7 +221,7 @@ } DumpValueObjectOptions& - SetRootValueObjectName (const char* name = NULL) + SetRootValueObjectName (const char* name = nullptr) { if (name) m_root_valobj_name.assign(name); Index: include/lldb/Expression/ClangASTSource.h =================================================================== --- include/lldb/Expression/ClangASTSource.h +++ include/lldb/Expression/ClangASTSource.h @@ -49,7 +49,7 @@ m_import_in_progress (false), m_lookups_enabled (false), m_target (target), - m_ast_context (NULL), + m_ast_context (nullptr), m_active_lookups () { m_ast_importer = m_target->GetClangASTImporter(); @@ -63,12 +63,12 @@ //------------------------------------------------------------------ /// Interface stubs. //------------------------------------------------------------------ - clang::Decl *GetExternalDecl (uint32_t) { return NULL; } - clang::Stmt *GetExternalDeclStmt (uint64_t) { return NULL; } + clang::Decl *GetExternalDecl (uint32_t) { return nullptr; } + clang::Stmt *GetExternalDeclStmt (uint64_t) { return nullptr; } clang::Selector GetExternalSelector (uint32_t) { return clang::Selector(); } uint32_t GetNumExternalSelectors () { return 0; } clang::CXXBaseSpecifier *GetExternalCXXBaseSpecifiers (uint64_t Offset) - { return NULL; } + { return nullptr; } void MaterializeVisibleDecls (const clang::DeclContext *DC) { return; } Index: include/lldb/Expression/ClangExpressionDeclMap.h =================================================================== --- include/lldb/Expression/ClangExpressionDeclMap.h +++ include/lldb/Expression/ClangExpressionDeclMap.h @@ -302,7 +302,7 @@ Process *process, const ConstString &name, lldb::SymbolType symbol_type, - Module *module = NULL); + Module *module = nullptr); lldb::addr_t GetSymbolAddress (const ConstString &name, @@ -398,9 +398,9 @@ ParserVars(ClangExpressionDeclMap &decl_map) : m_exe_ctx(), m_sym_ctx(), - m_persistent_vars(NULL), + m_persistent_vars(nullptr), m_enable_lookups(false), - m_materializer(NULL), + m_materializer(nullptr), m_decl_map(decl_map) { } @@ -412,7 +412,7 @@ return m_exe_ctx.GetTargetPtr(); else if (m_sym_ctx.target_sp) m_sym_ctx.target_sp.get(); - return NULL; + return nullptr; } ExecutionContext m_exe_ctx; ///< The execution context to use when parsing. @@ -457,7 +457,7 @@ m_struct_size(0), m_struct_laid_out(false), m_result_name(), - m_object_pointer_type(NULL, NULL) + m_object_pointer_type(nullptr, nullptr) { } @@ -517,7 +517,7 @@ const Symbol * FindGlobalDataSymbol (Target &target, const ConstString &name, - Module *module = NULL); + Module *module = nullptr); //------------------------------------------------------------------ /// Given a target, find a variable that matches the given name and @@ -548,7 +548,7 @@ lldb::ModuleSP &module, const ConstString &name, ClangNamespaceDecl *namespace_decl, - TypeFromUser *type = NULL); + TypeFromUser *type = nullptr); //------------------------------------------------------------------ /// Get the value of a variable in a given execution context and return @@ -579,8 +579,8 @@ bool GetVariableValue (lldb::VariableSP &var, lldb_private::Value &var_location, - TypeFromUser *found_type = NULL, - TypeFromParser *parser_type = NULL); + TypeFromUser *found_type = nullptr, + TypeFromParser *parser_type = nullptr); //------------------------------------------------------------------ /// Use the NameSearchContext to generate a Decl for the given LLDB Index: include/lldb/Expression/ClangExpressionVariable.h =================================================================== --- include/lldb/Expression/ClangExpressionVariable.h +++ include/lldb/Expression/ClangExpressionVariable.h @@ -97,11 +97,11 @@ ParserVars() : m_parser_type(), - m_named_decl (NULL), - m_llvm_value (NULL), + m_named_decl (nullptr), + m_llvm_value (nullptr), m_lldb_value (), m_lldb_var (), - m_lldb_sym (NULL) + m_lldb_sym (nullptr) { } @@ -146,7 +146,7 @@ ParserVarMap::iterator i = m_parser_vars.find(parser_id); if (i == m_parser_vars.end()) - return NULL; + return nullptr; else return &i->second; } @@ -196,7 +196,7 @@ JITVarMap::iterator i = m_jit_vars.find(parser_id); if (i == m_jit_vars.end()) - return NULL; + return nullptr; else return &i->second; } Index: include/lldb/Expression/ClangFunction.h =================================================================== --- include/lldb/Expression/ClangFunction.h +++ include/lldb/Expression/ClangFunction.h @@ -357,7 +357,7 @@ ClangExpressionDeclMap * DeclMap () { - return NULL; + return nullptr; } //------------------------------------------------------------------ @@ -367,7 +367,7 @@ ClangExpressionVariableList * LocalVariables () { - return NULL; + return nullptr; } //------------------------------------------------------------------ Index: include/lldb/Expression/ClangUtilityFunction.h =================================================================== --- include/lldb/Expression/ClangUtilityFunction.h +++ include/lldb/Expression/ClangUtilityFunction.h @@ -129,7 +129,7 @@ ClangExpressionVariableList * LocalVariables () { - return NULL; + return nullptr; } //------------------------------------------------------------------ @@ -143,7 +143,7 @@ clang::ASTConsumer * ASTTransformer (clang::ASTConsumer *passthrough) { - return NULL; + return nullptr; } //------------------------------------------------------------------ Index: include/lldb/Expression/IRExecutionUnit.h =================================================================== --- include/lldb/Expression/IRExecutionUnit.h +++ include/lldb/Expression/IRExecutionUnit.h @@ -93,7 +93,7 @@ if (m_module) return m_module->getFunction (m_name.AsCString()); else - return NULL; + return nullptr; } void Index: include/lldb/Expression/Materializer.h =================================================================== --- include/lldb/Expression/Materializer.h +++ include/lldb/Expression/Materializer.h @@ -32,8 +32,8 @@ { public: Dematerializer () : - m_materializer(NULL), - m_map(NULL), + m_materializer(nullptr), + m_map(nullptr), m_process_address(LLDB_INVALID_ADDRESS) { } Index: include/lldb/Host/Condition.h =================================================================== --- include/lldb/Host/Condition.h +++ include/lldb/Host/Condition.h @@ -99,7 +99,7 @@ /// @see Condition::Signal() //------------------------------------------------------------------ int - Wait (Mutex &mutex, const TimeValue *abstime = NULL, bool *timed_out = NULL); + Wait (Mutex &mutex, const TimeValue *abstime = nullptr, bool *timed_out = nullptr); protected: //------------------------------------------------------------------ Index: include/lldb/Host/DynamicLibrary.h =================================================================== --- include/lldb/Host/DynamicLibrary.h +++ include/lldb/Host/DynamicLibrary.h @@ -29,10 +29,10 @@ { Error err; if (!m_handle) - return static_cast(NULL); + return static_cast(nullptr); void* symbol = Host::DynamicLibraryGetSymbol (m_handle, name, err); if (!symbol) - return static_cast(NULL); + return static_cast(nullptr); return *reinterpret_cast(&symbol); } Index: include/lldb/Host/File.h =================================================================== --- include/lldb/Host/File.h +++ include/lldb/Host/File.h @@ -295,7 +295,7 @@ /// The resulting seek offset, or -1 on error. //------------------------------------------------------------------ off_t - SeekFromStart (off_t offset, Error *error_ptr = NULL); + SeekFromStart (off_t offset, Error *error_ptr = nullptr); //------------------------------------------------------------------ /// Seek to an offset relative to the current file position. @@ -318,7 +318,7 @@ /// The resulting seek offset, or -1 on error. //------------------------------------------------------------------ off_t - SeekFromCurrent (off_t offset, Error *error_ptr = NULL); + SeekFromCurrent (off_t offset, Error *error_ptr = nullptr); //------------------------------------------------------------------ /// Seek to an offset relative to the end of the file. @@ -342,7 +342,7 @@ /// The resulting seek offset, or -1 on error. //------------------------------------------------------------------ off_t - SeekFromEnd (off_t offset, Error *error_ptr = NULL); + SeekFromEnd (off_t offset, Error *error_ptr = nullptr); //------------------------------------------------------------------ /// Read bytes from a file from the specified file offset. Index: include/lldb/Host/FileSpec.h =================================================================== --- include/lldb/Host/FileSpec.h +++ include/lldb/Host/FileSpec.h @@ -539,7 +539,7 @@ /// pointer must be checked prior to using it. //------------------------------------------------------------------ lldb::DataBufferSP - ReadFileContents (off_t offset = 0, size_t length = SIZE_MAX, Error *error_ptr = NULL) const; + ReadFileContents (off_t offset = 0, size_t length = SIZE_MAX, Error *error_ptr = nullptr) const; size_t ReadFileContents (off_t file_offset, void *dst, size_t dst_len, Error *error_ptr) const; @@ -558,7 +558,7 @@ /// must be checked prior to using it. //------------------------------------------------------------------ lldb::DataBufferSP - ReadFileContentsAsCString(Error *error_ptr = NULL); + ReadFileContentsAsCString(Error *error_ptr = nullptr); //------------------------------------------------------------------ /// Change the file specificed with a new path. /// Index: include/lldb/Host/Mutex.h =================================================================== --- include/lldb/Host/Mutex.h +++ include/lldb/Host/Mutex.h @@ -125,10 +125,10 @@ /// returns \b false otherwise. //-------------------------------------------------------------- bool - TryLock (Mutex &mutex, const char *failure_message = NULL); + TryLock (Mutex &mutex, const char *failure_message = nullptr); bool - TryLock (Mutex *mutex, const char *failure_message = NULL) + TryLock (Mutex *mutex, const char *failure_message = nullptr) { if (mutex) return TryLock(*mutex, failure_message); @@ -213,7 +213,7 @@ virtual #endif int - TryLock(const char *failure_message = NULL); + TryLock(const char *failure_message = nullptr); //------------------------------------------------------------------ /// Unlock the mutex. Index: include/lldb/Host/Predicate.h =================================================================== --- include/lldb/Host/Predicate.h +++ include/lldb/Host/Predicate.h @@ -213,7 +213,7 @@ /// occurred. //------------------------------------------------------------------ T - WaitForSetValueBits (T bits, const TimeValue *abstime = NULL) + WaitForSetValueBits (T bits, const TimeValue *abstime = nullptr) { int err = 0; // pthread_cond_timedwait() or pthread_cond_wait() will atomically @@ -262,7 +262,7 @@ /// unrecoverable error occurs. //------------------------------------------------------------------ T - WaitForResetValueBits (T bits, const TimeValue *abstime = NULL) + WaitForResetValueBits (T bits, const TimeValue *abstime = nullptr) { int err = 0; @@ -317,7 +317,7 @@ /// @li \b false otherwise //------------------------------------------------------------------ bool - WaitForValueEqualTo (T value, const TimeValue *abstime = NULL, bool *timed_out = NULL) + WaitForValueEqualTo (T value, const TimeValue *abstime = nullptr, bool *timed_out = nullptr) { int err = 0; // pthread_cond_timedwait() or pthread_cond_wait() will atomically @@ -377,7 +377,7 @@ /// @li \b false otherwise //------------------------------------------------------------------ bool - WaitForValueEqualToAndSetValueTo (T wait_value, T new_value, const TimeValue *abstime = NULL, bool *timed_out = NULL) + WaitForValueEqualToAndSetValueTo (T wait_value, T new_value, const TimeValue *abstime = nullptr, bool *timed_out = nullptr) { int err = 0; // pthread_cond_timedwait() or pthread_cond_wait() will atomically @@ -437,7 +437,7 @@ /// @li \b false otherwise //------------------------------------------------------------------ bool - WaitForValueNotEqualTo (T value, T &new_value, const TimeValue *abstime = NULL) + WaitForValueNotEqualTo (T value, T &new_value, const TimeValue *abstime = nullptr) { int err = 0; // pthread_cond_timedwait() or pthread_cond_wait() will atomically Index: include/lldb/Host/ProcessRunLock.h =================================================================== --- include/lldb/Host/ProcessRunLock.h +++ include/lldb/Host/ProcessRunLock.h @@ -44,7 +44,7 @@ { public: ProcessRunLocker () : - m_lock (NULL) + m_lock (nullptr) { } @@ -82,7 +82,7 @@ if (m_lock) { m_lock->ReadUnlock(); - m_lock = NULL; + m_lock = nullptr; } } Index: include/lldb/Interpreter/Args.h =================================================================== --- include/lldb/Interpreter/Args.h +++ include/lldb/Interpreter/Args.h @@ -77,7 +77,7 @@ /// /// @see Args::SetCommandString(const char *) //------------------------------------------------------------------ - Args (const char *command = NULL); + Args (const char *command = nullptr); Args (const char *command, size_t len); @@ -348,16 +348,16 @@ bool return_null_if_empty = true); static int32_t - StringToSInt32 (const char *s, int32_t fail_value = 0, int base = 0, bool *success_ptr = NULL); + StringToSInt32 (const char *s, int32_t fail_value = 0, int base = 0, bool *success_ptr = nullptr); static uint32_t - StringToUInt32 (const char *s, uint32_t fail_value = 0, int base = 0, bool *success_ptr = NULL); + StringToUInt32 (const char *s, uint32_t fail_value = 0, int base = 0, bool *success_ptr = nullptr); static int64_t - StringToSInt64 (const char *s, int64_t fail_value = 0, int base = 0, bool *success_ptr = NULL); + StringToSInt64 (const char *s, int64_t fail_value = 0, int base = 0, bool *success_ptr = nullptr); static uint64_t - StringToUInt64 (const char *s, uint64_t fail_value = 0, int base = 0, bool *success_ptr = NULL); + StringToUInt64 (const char *s, uint64_t fail_value = 0, int base = 0, bool *success_ptr = nullptr); static bool UInt64ValueIsValidForByteSize (uint64_t uval64, size_t total_byte_size) Index: include/lldb/Interpreter/CommandInterpreter.h =================================================================== --- include/lldb/Interpreter/CommandInterpreter.h +++ include/lldb/Interpreter/CommandInterpreter.h @@ -100,7 +100,7 @@ CommandObject * GetCommandObject (const char *cmd, - StringList *matches = NULL); + StringList *matches = nullptr); bool CommandExists (const char *cmd); @@ -156,7 +156,7 @@ HandleCommand (const char *command_line, LazyBool add_to_history, CommandReturnObject &result, - ExecutionContext *override_context = NULL, + ExecutionContext *override_context = nullptr, bool repeat_on_empty_command = true, bool no_context_switching = false); @@ -493,7 +493,7 @@ SetSynchronous (bool value); lldb::CommandObjectSP - GetCommandSP (const char *cmd, bool include_aliases = true, bool exact = true, StringList *matches = NULL); + GetCommandSP (const char *cmd, bool include_aliases = true, bool exact = true, StringList *matches = nullptr); private: Index: include/lldb/Interpreter/CommandObject.h =================================================================== --- include/lldb/Interpreter/CommandObject.h +++ include/lldb/Interpreter/CommandObject.h @@ -44,7 +44,7 @@ explicit operator bool() const { - return (help_callback != NULL); + return (help_callback != nullptr); } }; @@ -78,8 +78,8 @@ CommandObject (CommandInterpreter &interpreter, const char *name, - const char *help = NULL, - const char *syntax = NULL, + const char *help = nullptr, + const char *syntax = nullptr, uint32_t flags = 0); virtual @@ -138,15 +138,15 @@ IsMultiwordObject () { return false; } virtual lldb::CommandObjectSP - GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL) + GetSubcommandSP (const char *sub_cmd, StringList *matches = nullptr) { return lldb::CommandObjectSP(); } virtual CommandObject * - GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL) + GetSubcommandObject (const char *sub_cmd, StringList *matches = nullptr) { - return NULL; + return nullptr; } virtual void @@ -457,7 +457,7 @@ //------------------------------------------------------------------ virtual const char *GetRepeatCommand (Args ¤t_command_args, uint32_t index) { - return NULL; + return nullptr; } CommandOverrideCallback @@ -556,8 +556,8 @@ CommandObjectParsed (CommandInterpreter &interpreter, const char *name, - const char *help = NULL, - const char *syntax = NULL, + const char *help = nullptr, + const char *syntax = nullptr, uint32_t flags = 0) : CommandObject (interpreter, name, help, syntax, flags) {} @@ -582,8 +582,8 @@ CommandObjectRaw (CommandInterpreter &interpreter, const char *name, - const char *help = NULL, - const char *syntax = NULL, + const char *help = nullptr, + const char *syntax = nullptr, uint32_t flags = 0) : CommandObject (interpreter, name, help, syntax, flags) {} Index: include/lldb/Interpreter/CommandObjectMultiword.h =================================================================== --- include/lldb/Interpreter/CommandObjectMultiword.h +++ include/lldb/Interpreter/CommandObjectMultiword.h @@ -32,8 +32,8 @@ public: CommandObjectMultiword (CommandInterpreter &interpreter, const char *name, - const char *help = NULL, - const char *syntax = NULL, + const char *help = nullptr, + const char *syntax = nullptr, uint32_t flags = 0); virtual @@ -50,10 +50,10 @@ GenerateHelpText (Stream &output_stream); virtual lldb::CommandObjectSP - GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL); + GetSubcommandSP (const char *sub_cmd, StringList *matches = nullptr); virtual CommandObject * - GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL); + GetSubcommandObject (const char *sub_cmd, StringList *matches = nullptr); virtual void AproposAllSubCommands (const char *prefix, @@ -100,8 +100,8 @@ public: CommandObjectProxy (CommandInterpreter &interpreter, const char *name, - const char *help = NULL, - const char *syntax = NULL, + const char *help = nullptr, + const char *syntax = nullptr, uint32_t flags = 0); virtual @@ -122,10 +122,10 @@ IsMultiwordObject (); virtual lldb::CommandObjectSP - GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL); + GetSubcommandSP (const char *sub_cmd, StringList *matches = nullptr); virtual CommandObject * - GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL); + GetSubcommandObject (const char *sub_cmd, StringList *matches = nullptr); virtual void AproposAllSubCommands (const char *prefix, Index: include/lldb/Interpreter/CommandReturnObject.h =================================================================== --- include/lldb/Interpreter/CommandReturnObject.h +++ include/lldb/Interpreter/CommandReturnObject.h @@ -143,7 +143,7 @@ void SetError (const Error &error, - const char *fallback_error_cstr = NULL); + const char *fallback_error_cstr = nullptr); void SetError (const char *error_cstr); Index: include/lldb/Interpreter/OptionGroupArchitecture.h =================================================================== --- include/lldb/Interpreter/OptionGroupArchitecture.h +++ include/lldb/Interpreter/OptionGroupArchitecture.h @@ -59,7 +59,7 @@ GetArchitectureName () { if (m_arch_str.empty()) - return NULL; + return nullptr; return m_arch_str.c_str(); } Index: include/lldb/Interpreter/OptionValue.h =================================================================== --- include/lldb/Interpreter/OptionValue.h +++ include/lldb/Interpreter/OptionValue.h @@ -334,7 +334,7 @@ SetSInt64Value (int64_t new_value); const char * - GetStringValue (const char *fail_value = NULL) const; + GetStringValue (const char *fail_value = nullptr) const; bool SetStringValue (const char *new_value); Index: include/lldb/Interpreter/OptionValueProperties.h =================================================================== --- include/lldb/Interpreter/OptionValueProperties.h +++ include/lldb/Interpreter/OptionValueProperties.h @@ -250,7 +250,7 @@ { if (idx < m_properties.size()) return &m_properties[idx]; - return NULL; + return nullptr; } typedef UniqueCStringMap NameToIndex; Index: include/lldb/Interpreter/OptionValueRegex.h =================================================================== --- include/lldb/Interpreter/OptionValueRegex.h +++ include/lldb/Interpreter/OptionValueRegex.h @@ -24,7 +24,7 @@ class OptionValueRegex : public OptionValue { public: - OptionValueRegex (const char *value = NULL, uint32_t regex_flags = 0) : + OptionValueRegex (const char *value = nullptr, uint32_t regex_flags = 0) : OptionValue(), m_regex (value, regex_flags) { @@ -71,7 +71,7 @@ { if (m_regex.IsValid()) return &m_regex; - return NULL; + return nullptr; } void Index: include/lldb/Interpreter/OptionValueString.h =================================================================== --- include/lldb/Interpreter/OptionValueString.h +++ include/lldb/Interpreter/OptionValueString.h @@ -44,7 +44,7 @@ } OptionValueString (ValidatorCallback validator, - void* baton = NULL) : + void* baton = nullptr) : OptionValue(), m_current_value (), m_default_value (), @@ -86,7 +86,7 @@ OptionValueString (const char *value, ValidatorCallback validator, - void* baton = NULL) : + void* baton = nullptr) : OptionValue(), m_current_value (), m_default_value (), @@ -104,7 +104,7 @@ OptionValueString (const char *current_value, const char *default_value, ValidatorCallback validator, - void* baton = NULL) : + void* baton = nullptr) : OptionValue(), m_current_value (), m_default_value (), Index: include/lldb/Interpreter/Options.h =================================================================== --- include/lldb/Interpreter/Options.h +++ include/lldb/Interpreter/Options.h @@ -173,7 +173,7 @@ // class that inherits from this class. virtual const OptionDefinition* - GetDefinitions () { return NULL; } + GetDefinitions () { return nullptr; } // Call this prior to parsing any options. This call will call the // subclass OptionParsingStarting() and will avoid the need for all Index: include/lldb/Interpreter/PythonDataObjects.h =================================================================== --- include/lldb/Interpreter/PythonDataObjects.h +++ include/lldb/Interpreter/PythonDataObjects.h @@ -27,18 +27,18 @@ { public: PythonObject () : - m_py_obj(NULL) + m_py_obj(nullptr) { } explicit PythonObject (PyObject* py_obj) : - m_py_obj(NULL) + m_py_obj(nullptr) { Reset (py_obj); } PythonObject (const PythonObject &rhs) : - m_py_obj(NULL) + m_py_obj(nullptr) { Reset (rhs.m_py_obj); } @@ -48,7 +48,7 @@ virtual ~PythonObject () { - Reset (NULL); + Reset (nullptr); } bool @@ -58,7 +58,7 @@ } virtual bool - Reset (PyObject* py_obj = NULL) + Reset (PyObject* py_obj = nullptr) { if (py_obj != m_py_obj) { @@ -95,7 +95,7 @@ explicit operator bool () const { - return m_py_obj != NULL; + return m_py_obj != nullptr; } bool @@ -117,7 +117,7 @@ virtual ~PythonString (); virtual bool - Reset (PyObject* py_obj = NULL); + Reset (PyObject* py_obj = nullptr); const char* GetString() const; @@ -141,7 +141,7 @@ virtual ~PythonInteger (); virtual bool - Reset (PyObject* py_obj = NULL); + Reset (PyObject* py_obj = nullptr); int64_t GetInteger(); @@ -162,7 +162,7 @@ virtual ~PythonList (); virtual bool - Reset (PyObject* py_obj = NULL); + Reset (PyObject* py_obj = nullptr); uint32_t GetSize(); @@ -188,7 +188,7 @@ virtual ~PythonDictionary (); virtual bool - Reset (PyObject* object = NULL); + Reset (PyObject* object = nullptr); uint32_t GetSize(); @@ -196,7 +196,7 @@ GetItemForKey (const PythonString &key) const; const char * - GetItemForKeyAsString (const PythonString &key, const char *fail_value = NULL) const; + GetItemForKeyAsString (const PythonString &key, const char *fail_value = nullptr) const; int64_t GetItemForKeyAsInteger (const PythonString &key, int64_t fail_value = 0) const; Index: include/lldb/Interpreter/ScriptInterpreter.h =================================================================== --- include/lldb/Interpreter/ScriptInterpreter.h +++ include/lldb/Interpreter/ScriptInterpreter.h @@ -24,7 +24,7 @@ { public: ScriptInterpreterObject() : - m_object(NULL) + m_object(nullptr) {} ScriptInterpreterObject(void* obj) : @@ -43,7 +43,7 @@ explicit operator bool () { - return m_object != NULL; + return m_object != nullptr; } ScriptInterpreterObject& @@ -277,13 +277,13 @@ } virtual bool - GenerateTypeScriptFunction (const char* oneliner, std::string& output, void* name_token = NULL) + GenerateTypeScriptFunction (const char* oneliner, std::string& output, void* name_token = nullptr) { return false; } virtual bool - GenerateTypeScriptFunction (StringList &input, std::string& output, void* name_token = NULL) + GenerateTypeScriptFunction (StringList &input, std::string& output, void* name_token = nullptr) { return false; } @@ -295,13 +295,13 @@ } virtual bool - GenerateTypeSynthClass (StringList &input, std::string& output, void* name_token = NULL) + GenerateTypeSynthClass (StringList &input, std::string& output, void* name_token = nullptr) { return false; } virtual bool - GenerateTypeSynthClass (const char* oneliner, std::string& output, void* name_token = NULL) + GenerateTypeSynthClass (const char* oneliner, std::string& output, void* name_token = nullptr) { return false; } Index: include/lldb/Interpreter/ScriptInterpreterPython.h =================================================================== --- include/lldb/Interpreter/ScriptInterpreterPython.h +++ include/lldb/Interpreter/ScriptInterpreterPython.h @@ -60,17 +60,17 @@ ExportFunctionDefinitionToInterpreter (StringList &function_def); bool - GenerateTypeScriptFunction (StringList &input, std::string& output, void* name_token = NULL); + GenerateTypeScriptFunction (StringList &input, std::string& output, void* name_token = nullptr); bool - GenerateTypeSynthClass (StringList &input, std::string& output, void* name_token = NULL); + GenerateTypeSynthClass (StringList &input, std::string& output, void* name_token = nullptr); bool - GenerateTypeSynthClass (const char* oneliner, std::string& output, void* name_token = NULL); + GenerateTypeSynthClass (const char* oneliner, std::string& output, void* name_token = nullptr); // use this if the function code is just a one-liner script bool - GenerateTypeScriptFunction (const char* oneliner, std::string& output, void* name_token = NULL); + GenerateTypeScriptFunction (const char* oneliner, std::string& output, void* name_token = nullptr); virtual bool GenerateScriptAliasFunction (StringList &input, std::string& output); @@ -343,7 +343,7 @@ ~ScriptInterpreterPythonObject() { Py_XDECREF(m_object); - m_object = NULL; + m_object = nullptr; } private: DISALLOW_COPY_AND_ASSIGN (ScriptInterpreterPythonObject); @@ -368,12 +368,12 @@ TearDownSession = 0x0004 }; - Locker (ScriptInterpreterPython *py_interpreter = NULL, + Locker (ScriptInterpreterPython *py_interpreter = nullptr, uint16_t on_entry = AcquireLock | InitSession, uint16_t on_leave = FreeLock | TearDownSession, - FILE *in = NULL, - FILE *out = NULL, - FILE *err = NULL); + FILE *in = nullptr, + FILE *out = nullptr, + FILE *err = nullptr); ~Locker (); Index: include/lldb/Symbol/Block.h =================================================================== --- include/lldb/Symbol/Block.h +++ include/lldb/Symbol/Block.h @@ -259,7 +259,7 @@ GetFirstChild () const { if (m_children.empty()) - return NULL; + return nullptr; return m_children.front().get(); } Index: include/lldb/Symbol/ClangASTContext.h =================================================================== --- include/lldb/Symbol/ClangASTContext.h +++ include/lldb/Symbol/ClangASTContext.h @@ -40,7 +40,7 @@ //------------------------------------------------------------------ // Constructors and Destructors //------------------------------------------------------------------ - ClangASTContext (const char *triple = NULL); + ClangASTContext (const char *triple = nullptr); ~ClangASTContext(); @@ -237,7 +237,7 @@ const char *name, int kind, lldb::LanguageType language, - ClangASTMetadata *metadata = NULL); + ClangASTMetadata *metadata = nullptr); class TemplateParameterInfos { @@ -318,7 +318,7 @@ clang::DeclContext *decl_ctx, bool isForwardDecl, bool isInternal, - ClangASTMetadata *metadata = NULL); + ClangASTMetadata *metadata = nullptr); // Returns a mask containing bits from the ClangASTContext::eTypeXXX enumerations Index: include/lldb/Symbol/ClangASTImporter.h =================================================================== --- include/lldb/Symbol/ClangASTImporter.h +++ include/lldb/Symbol/ClangASTImporter.h @@ -203,8 +203,8 @@ struct DeclOrigin { DeclOrigin () : - ctx(NULL), - decl(NULL) + ctx(nullptr), + decl(nullptr) { } @@ -230,7 +230,7 @@ bool Valid () { - return (ctx != NULL || decl != NULL); + return (ctx != nullptr || decl != nullptr); } clang::ASTContext *ctx; @@ -250,8 +250,8 @@ *source_ctx, master.m_file_manager, true /*minimal*/), - m_decls_to_deport(NULL), - m_decls_already_deported(NULL), + m_decls_to_deport(nullptr), + m_decls_already_deported(nullptr), m_master(master), m_source_ctx(source_ctx) { @@ -297,7 +297,7 @@ m_minions (), m_origins (), m_namespace_maps (), - m_map_completer (NULL) + m_map_completer (nullptr) { } Index: include/lldb/Symbol/ClangASTType.h =================================================================== --- include/lldb/Symbol/ClangASTType.h +++ include/lldb/Symbol/ClangASTType.h @@ -74,8 +74,8 @@ } ClangASTType () : - m_type (0), - m_ast (0) + m_type (nullptr), + m_ast (nullptr) { } @@ -100,7 +100,7 @@ explicit operator bool () const { - return m_type != NULL && m_ast != NULL; + return m_type != nullptr && m_ast != nullptr; } bool @@ -114,7 +114,7 @@ bool IsValid () const { - return m_type != NULL && m_ast != NULL; + return m_type != nullptr && m_ast != nullptr; } bool @@ -153,7 +153,7 @@ IsFloatingPointType (uint32_t &count, bool &is_complex) const; bool - IsFunctionType (bool *is_variadic_ptr = NULL) const; + IsFunctionType (bool *is_variadic_ptr = nullptr) const; uint32_t IsHomogeneousAggregate (ClangASTType* base_type_ptr) const; @@ -183,13 +183,13 @@ IsObjCObjectOrInterfaceType () const; bool - IsObjCObjectPointerType (ClangASTType *target_type = NULL); + IsObjCObjectPointerType (ClangASTType *target_type = nullptr); bool IsPolymorphicClass () const; bool - IsPossibleCPlusPlusDynamicType (ClangASTType *target_type = NULL) const + IsPossibleCPlusPlusDynamicType (ClangASTType *target_type = nullptr) const { return IsPossibleDynamicType (target_type, true, false); } @@ -207,10 +207,10 @@ IsRuntimeGeneratedType () const; bool - IsPointerType (ClangASTType *pointee_type = NULL) const; + IsPointerType (ClangASTType *pointee_type = nullptr) const; bool - IsPointerOrReferenceType (ClangASTType *pointee_type = NULL) const; + IsPointerOrReferenceType (ClangASTType *pointee_type = nullptr) const; bool IsReferenceType (ClangASTType *pointee_type = nullptr, bool* is_rvalue = nullptr) const; @@ -265,7 +265,7 @@ GetTypeName () const; uint32_t - GetTypeInfo (ClangASTType *pointee_or_element_clang_type = NULL) const; + GetTypeInfo (ClangASTType *pointee_or_element_clang_type = nullptr) const; lldb::LanguageType GetMinimumLanguage (); @@ -413,10 +413,10 @@ uint32_t GetIndexOfFieldWithName (const char* name, - ClangASTType* field_clang_type = NULL, - uint64_t *bit_offset_ptr = NULL, - uint32_t *bitfield_bit_size_ptr = NULL, - bool *is_bitfield_ptr = NULL) const; + ClangASTType* field_clang_type = nullptr, + uint64_t *bit_offset_ptr = nullptr, + uint32_t *bitfield_bit_size_ptr = nullptr, + bool *is_bitfield_ptr = nullptr) const; uint32_t GetNumPointeeChildren () const; @@ -657,8 +657,8 @@ void Clear() { - m_type = NULL; - m_ast = NULL; + m_type = nullptr; + m_ast = nullptr; } clang::QualType Index: include/lldb/Symbol/ClangExternalASTSourceCallbacks.h =================================================================== --- include/lldb/Symbol/ClangExternalASTSourceCallbacks.h +++ include/lldb/Symbol/ClangExternalASTSourceCallbacks.h @@ -64,7 +64,7 @@ { // This method only needs to be implemented if the AST source ever // passes back decl sets as VisibleDeclaration objects. - return 0; + return nullptr; } virtual clang::Stmt * @@ -73,7 +73,7 @@ // This operation is meant to be used via a LazyOffsetPtr. It only // needs to be implemented if the AST source uses methods like // FunctionDecl::setLazyBody when building decls. - return 0; + return nullptr; } virtual clang::Selector @@ -93,7 +93,7 @@ virtual clang::CXXBaseSpecifier * GetExternalCXXBaseSpecifiers(uint64_t Offset) { - return NULL; + return nullptr; } virtual void @@ -148,10 +148,10 @@ { if (callback_baton == m_callback_baton) { - m_callback_tag_decl = NULL; - m_callback_objc_decl = NULL; - m_callback_find_by_name = NULL; - m_callback_layout_record_type = NULL; + m_callback_tag_decl = nullptr; + m_callback_objc_decl = nullptr; + m_callback_find_by_name = nullptr; + m_callback_layout_record_type = nullptr; } } Index: include/lldb/Symbol/ClangExternalASTSourceCommon.h =================================================================== --- include/lldb/Symbol/ClangExternalASTSourceCommon.h +++ include/lldb/Symbol/ClangExternalASTSourceCommon.h @@ -137,7 +137,7 @@ return "this"; } else - return NULL; + return nullptr; } bool Index: include/lldb/Symbol/ClangNamespaceDecl.h =================================================================== --- include/lldb/Symbol/ClangNamespaceDecl.h +++ include/lldb/Symbol/ClangNamespaceDecl.h @@ -21,8 +21,8 @@ { public: ClangNamespaceDecl () : - m_ast (NULL), - m_namespace_decl (NULL) + m_ast (nullptr), + m_namespace_decl (nullptr) { } @@ -64,7 +64,7 @@ //------------------------------------------------------------------ explicit operator bool() const { - return m_ast != NULL && m_namespace_decl != NULL; + return m_ast != nullptr && m_namespace_decl != nullptr; } clang::ASTContext * Index: include/lldb/Symbol/LineTable.h =================================================================== --- include/lldb/Symbol/LineTable.h +++ include/lldb/Symbol/LineTable.h @@ -150,7 +150,7 @@ /// in this line table, \b false otherwise. //------------------------------------------------------------------ bool - FindLineEntryByAddress (const Address &so_addr, LineEntry& line_entry, uint32_t *index_ptr = NULL); + FindLineEntryByAddress (const Address &so_addr, LineEntry& line_entry, uint32_t *index_ptr = nullptr); //------------------------------------------------------------------ /// Find a line entry index that has a matching file index and Index: include/lldb/Symbol/ObjectContainer.h =================================================================== --- include/lldb/Symbol/ObjectContainer.h +++ include/lldb/Symbol/ObjectContainer.h @@ -203,19 +203,19 @@ virtual ObjectFile * GetObjectFileAtIndex (uint32_t object_idx) { - return NULL; + return nullptr; } virtual ObjectContainer * GetObjectContainerAtIndex (uint32_t object_idx) { - return NULL; + return nullptr; } virtual const char * GetObjectNameAtIndex (uint32_t object_idx) const { - return NULL; + return nullptr; } protected: Index: include/lldb/Symbol/SymbolContext.h =================================================================== --- include/lldb/Symbol/SymbolContext.h +++ include/lldb/Symbol/SymbolContext.h @@ -83,20 +83,20 @@ explicit SymbolContext (const lldb::TargetSP &target_sp, const lldb::ModuleSP &module_sp, - CompileUnit *comp_unit = NULL, - Function *function = NULL, - Block *block = NULL, - LineEntry *line_entry = NULL, - Symbol *symbol = NULL); + CompileUnit *comp_unit = nullptr, + Function *function = nullptr, + Block *block = nullptr, + LineEntry *line_entry = nullptr, + Symbol *symbol = nullptr); // This version sets the target to a NULL TargetSP if you don't know it. explicit SymbolContext (const lldb::ModuleSP &module_sp, - CompileUnit *comp_unit = NULL, - Function *function = NULL, - Block *block = NULL, - LineEntry *line_entry = NULL, - Symbol *symbol = NULL); + CompileUnit *comp_unit = nullptr, + Function *function = nullptr, + Block *block = nullptr, + LineEntry *line_entry = nullptr, + Symbol *symbol = nullptr); ~SymbolContext (); //------------------------------------------------------------------ Index: include/lldb/Symbol/SymbolContextScope.h =================================================================== --- include/lldb/Symbol/SymbolContextScope.h +++ include/lldb/Symbol/SymbolContextScope.h @@ -97,25 +97,25 @@ virtual CompileUnit * CalculateSymbolContextCompileUnit () { - return NULL; + return nullptr; } virtual Function * CalculateSymbolContextFunction () { - return NULL; + return nullptr; } virtual Block * CalculateSymbolContextBlock () { - return NULL; + return nullptr; } virtual Symbol * CalculateSymbolContextSymbol () { - return NULL; + return nullptr; } //------------------------------------------------------------------ Index: include/lldb/Symbol/SymbolFile.h =================================================================== --- include/lldb/Symbol/SymbolFile.h +++ include/lldb/Symbol/SymbolFile.h @@ -129,8 +129,8 @@ virtual size_t ParseVariablesForContext (const SymbolContext& sc) = 0; virtual Type* ResolveTypeUID (lldb::user_id_t type_uid) = 0; virtual bool ResolveClangOpaqueTypeDefinition (ClangASTType &clang_type) = 0; - virtual clang::DeclContext* GetClangDeclContextForTypeUID (const lldb_private::SymbolContext &sc, lldb::user_id_t type_uid) { return NULL; } - virtual clang::DeclContext* GetClangDeclContextContainingTypeUID (lldb::user_id_t type_uid) { return NULL; } + virtual clang::DeclContext* GetClangDeclContextForTypeUID (const lldb_private::SymbolContext &sc, lldb::user_id_t type_uid) { return nullptr; } + virtual clang::DeclContext* GetClangDeclContextContainingTypeUID (lldb::user_id_t type_uid) { return nullptr; } virtual uint32_t ResolveSymbolContext (const Address& so_addr, uint32_t resolve_scope, SymbolContext& sc) = 0; virtual uint32_t ResolveSymbolContext (const FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list) = 0; virtual uint32_t FindGlobalVariables (const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, VariableList& variables) = 0; Index: include/lldb/Symbol/UnwindPlan.h =================================================================== --- include/lldb/Symbol/UnwindPlan.h +++ include/lldb/Symbol/UnwindPlan.h @@ -187,7 +187,7 @@ } else { - *opcodes = NULL; + *opcodes = nullptr; len = 0; } } @@ -203,7 +203,7 @@ { if (m_type == atDWARFExpression || m_type == isDWARFExpression) return m_location.expr.opcodes; - return NULL; + return nullptr; } int Index: include/lldb/Target/ExecutionContext.h =================================================================== --- include/lldb/Target/ExecutionContext.h +++ include/lldb/Target/ExecutionContext.h @@ -439,8 +439,8 @@ /// The frame index for this execution context. //------------------------------------------------------------------ ExecutionContext (Process* process, - Thread *thread = NULL, - StackFrame * frame = NULL); + Thread *thread = nullptr, + StackFrame * frame = nullptr); ~ExecutionContext(); Index: include/lldb/Target/ObjCLanguageRuntime.h =================================================================== --- include/lldb/Target/ObjCLanguageRuntime.h +++ include/lldb/Target/ObjCLanguageRuntime.h @@ -198,9 +198,9 @@ IsValid () = 0; virtual bool - GetTaggedPointerInfo (uint64_t* info_bits = NULL, - uint64_t* value_bits = NULL, - uint64_t* payload = NULL) = 0; + GetTaggedPointerInfo (uint64_t* info_bits = nullptr, + uint64_t* value_bits = nullptr, + uint64_t* payload = nullptr) = 0; virtual uint64_t GetInstanceSize () = 0; @@ -346,7 +346,7 @@ virtual TypeVendor * GetTypeVendor() { - return NULL; + return nullptr; } // Finds the byte offset of the child_type ivar in parent_type. If it can't find the @@ -444,7 +444,7 @@ if (!name) return false; - if (strchr(name, ':') == NULL) + if (strchr(name, ':') == nullptr) return true; else if (name[strlen(name) - 1] == ':') return true; Index: include/lldb/Target/Platform.h =================================================================== --- include/lldb/Target/Platform.h +++ include/lldb/Target/Platform.h @@ -748,7 +748,7 @@ virtual lldb_private::OptionGroupOptions * GetConnectionOptions (CommandInterpreter& interpreter) { - return NULL; + return nullptr; } virtual lldb_private::Error @@ -922,7 +922,7 @@ // trying) return pos->second.AsCString(""); } - return NULL; + return nullptr; } const char * @@ -965,7 +965,7 @@ // trying) return pos->second.AsCString(""); } - return NULL; + return nullptr; } const char * Index: include/lldb/Target/Process.h =================================================================== --- include/lldb/Target/Process.h +++ include/lldb/Target/Process.h @@ -285,7 +285,7 @@ GetArg0 () const { if (m_arg0.empty()) - return NULL; + return nullptr; return m_arg0.c_str(); } @@ -514,7 +514,7 @@ GetPath () const { if (m_path.empty()) - return NULL; + return nullptr; return m_path.c_str(); } @@ -534,8 +534,8 @@ m_file_actions (), m_pty (), m_resume_count (0), - m_monitor_callback (NULL), - m_monitor_callback_baton (NULL), + m_monitor_callback (nullptr), + m_monitor_callback_baton (nullptr), m_monitor_signals (false), m_hijack_listener_sp () { @@ -554,8 +554,8 @@ m_file_actions (), m_pty (), m_resume_count (0), - m_monitor_callback (NULL), - m_monitor_callback_baton (NULL), + m_monitor_callback (nullptr), + m_monitor_callback_baton (nullptr), m_monitor_signals (false), m_hijack_listener_sp () { @@ -656,7 +656,7 @@ { if (idx < m_file_actions.size()) return &m_file_actions[idx]; - return NULL; + return nullptr; } const FileAction * @@ -667,7 +667,7 @@ if (m_file_actions[idx].GetFD () == fd) return &m_file_actions[idx]; } - return NULL; + return nullptr; } Flags & @@ -686,7 +686,7 @@ GetWorkingDirectory () const { if (m_working_dir.empty()) - return NULL; + return nullptr; return m_working_dir.c_str(); } @@ -710,7 +710,7 @@ GetProcessPluginName () const { if (m_plugin_name.empty()) - return NULL; + return nullptr; return m_plugin_name.c_str(); } @@ -727,7 +727,7 @@ GetShell () const { if (m_shell.empty()) - return NULL; + return nullptr; return m_shell.c_str(); } @@ -968,7 +968,7 @@ GetProcessPluginName () const { if (m_plugin_name.empty()) - return NULL; + return nullptr; return m_plugin_name.c_str(); } @@ -1174,7 +1174,7 @@ { if (idx < m_infos.size()) return m_infos[idx].GetName(); - return NULL; + return nullptr; } size_t @@ -1538,7 +1538,7 @@ GetRestartedReasonAtIndex(size_t idx) { if (idx > m_restarted_reasons.size()) - return NULL; + return nullptr; else return m_restarted_reasons[idx].c_str(); } @@ -1760,7 +1760,7 @@ virtual CommandObject * GetPluginCommandObject() { - return NULL; + return nullptr; } //------------------------------------------------------------------ @@ -3432,9 +3432,9 @@ // and the process is already stopped, this function returns immediately. lldb::StateType WaitForProcessToStop (const TimeValue *timeout, - lldb::EventSP *event_sp_ptr = NULL, + lldb::EventSP *event_sp_ptr = nullptr, bool wait_always = true, - Listener *hijack_listener = NULL); + Listener *hijack_listener = nullptr); lldb::StateType WaitForStateChangedEvents (const TimeValue *timeout, Index: include/lldb/Target/QueueItem.h =================================================================== --- include/lldb/Target/QueueItem.h +++ include/lldb/Target/QueueItem.h @@ -98,7 +98,7 @@ bool IsValid () { - return m_queue_wp.lock() != NULL; + return m_queue_wp.lock() != nullptr; } //------------------------------------------------------------------ Index: include/lldb/Target/StackFrame.h =================================================================== --- include/lldb/Target/StackFrame.h +++ include/lldb/Target/StackFrame.h @@ -351,7 +351,7 @@ /// Optional string that will be prepended to the frame output description. //------------------------------------------------------------------ void - DumpUsingSettingsFormat (Stream *strm, const char *frame_marker = NULL); + DumpUsingSettingsFormat (Stream *strm, const char *frame_marker = nullptr); //------------------------------------------------------------------ /// Print a description for this frame using a default format. @@ -391,7 +391,7 @@ GetStatus (Stream &strm, bool show_frame_info, bool show_source, - const char *frame_marker = NULL); + const char *frame_marker = nullptr); //------------------------------------------------------------------ /// Query whether this frame is a concrete frame on the call stack, Index: include/lldb/Target/StackFrameList.h =================================================================== --- include/lldb/Target/StackFrameList.h +++ include/lldb/Target/StackFrameList.h @@ -89,7 +89,7 @@ uint32_t num_frames, bool show_frame_info, uint32_t num_frames_with_source, - const char *frame_marker = NULL); + const char *frame_marker = nullptr); protected: Index: include/lldb/Target/StackID.h =================================================================== --- include/lldb/Target/StackID.h +++ include/lldb/Target/StackID.h @@ -28,7 +28,7 @@ StackID () : m_pc (LLDB_INVALID_ADDRESS), m_cfa (LLDB_INVALID_ADDRESS), - m_symbol_scope (NULL) + m_symbol_scope (nullptr) { } @@ -80,7 +80,7 @@ { m_pc = LLDB_INVALID_ADDRESS; m_cfa = LLDB_INVALID_ADDRESS; - m_symbol_scope = NULL; + m_symbol_scope = nullptr; } bool Index: include/lldb/Target/Target.h =================================================================== --- include/lldb/Target/Target.h +++ include/lldb/Target/Target.h @@ -492,7 +492,7 @@ lldb::ModuleSP GetSharedModule (const ModuleSpec &module_spec, - Error *error_ptr = NULL); + Error *error_ptr = nullptr); //---------------------------------------------------------------------- // Settings accessors @@ -874,7 +874,7 @@ bool LoadScriptingResources (std::list& errors, - Stream* feedback_stream = NULL, + Stream* feedback_stream = nullptr, bool continue_on_error = true) { return m_images.LoadScriptingResourcesInTarget(this,errors,feedback_stream,continue_on_error); @@ -1013,7 +1013,7 @@ void *dst, size_t dst_len, Error &error, - lldb::addr_t *load_addr_ptr = NULL); + lldb::addr_t *load_addr_ptr = nullptr); size_t ReadCStringFromMemory (const Address& addr, std::string &out_str, Error &error); Index: include/lldb/Target/TargetList.h =================================================================== --- include/lldb/Target/TargetList.h +++ include/lldb/Target/TargetList.h @@ -171,7 +171,7 @@ //------------------------------------------------------------------ lldb::TargetSP FindTargetWithExecutableAndArchitecture (const FileSpec &exe_file_spec, - const ArchSpec *exe_arch_ptr = NULL) const; + const ArchSpec *exe_arch_ptr = nullptr) const; //------------------------------------------------------------------ /// Find the target that contains a process with process ID \a Index: include/lldb/Target/Thread.h =================================================================== --- include/lldb/Target/Thread.h +++ include/lldb/Target/Thread.h @@ -303,13 +303,13 @@ virtual const char * GetInfo () { - return NULL; + return nullptr; } virtual const char * GetName () { - return NULL; + return nullptr; } virtual void @@ -356,7 +356,7 @@ virtual const char * GetQueueName () { - return NULL; + return nullptr; } virtual void @@ -436,7 +436,7 @@ ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast = false); Error - JumpToLine (const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings = NULL); + JumpToLine (const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings = nullptr); virtual lldb::StackFrameSP GetFrameWithStackID (const StackID &stack_id) Index: include/lldb/Target/ThreadPlanShouldStopHere.h =================================================================== --- include/lldb/Target/ThreadPlanShouldStopHere.h +++ include/lldb/Target/ThreadPlanShouldStopHere.h @@ -76,7 +76,7 @@ ThreadPlanShouldStopHere (ThreadPlan *owner, const ThreadPlanShouldStopHereCallbacks *callbacks, - void *baton = NULL); + void *baton = nullptr); virtual ~ThreadPlanShouldStopHere(); Index: include/lldb/Target/ThreadSpec.h =================================================================== --- include/lldb/Target/ThreadSpec.h +++ include/lldb/Target/ThreadSpec.h @@ -110,7 +110,7 @@ { if (m_name.empty()) return true; - else if (name == NULL) + else if (name == nullptr) return false; else return m_name == name; @@ -124,7 +124,7 @@ { if (m_queue_name.empty()) return true; - else if (queue_name == NULL) + else if (queue_name == nullptr) return false; else return m_queue_name == queue_name; Index: include/lldb/Utility/Iterable.h =================================================================== --- include/lldb/Utility/Iterable.h +++ include/lldb/Utility/Iterable.h @@ -212,7 +212,7 @@ AdaptedIterable(rhs), m_mutex(rhs.m_mutex) { - rhs.m_mutex = NULL; + rhs.m_mutex = nullptr; } ~LockingAdaptedIterable () Index: include/lldb/Utility/SharingPtr.h =================================================================== --- include/lldb/Utility/SharingPtr.h +++ include/lldb/Utility/SharingPtr.h @@ -188,8 +188,8 @@ template inline SharingPtr::SharingPtr() - : ptr_(0), - cntrl_(0) + : ptr_(nullptr), + cntrl_(nullptr) { } @@ -197,14 +197,14 @@ inline SharingPtr::SharingPtr(std::nullptr_t) : ptr_(0), -cntrl_(0) +cntrl_(nullptr) { } template template SharingPtr::SharingPtr(Y* p) - : ptr_(p), cntrl_(0) + : ptr_(p), cntrl_(nullptr) { std::unique_ptr hold(p); typedef imp::shared_ptr_pointer _CntrlBlk; @@ -486,7 +486,7 @@ void* baton_; public: - LoggingSharingPtr() : cb_(0), baton_(0) {} + LoggingSharingPtr() : cb_(0), baton_(nullptr) {} LoggingSharingPtr(Callback cb, void* baton) : cb_(cb), baton_(baton) { @@ -496,7 +496,7 @@ template LoggingSharingPtr(Y* p) - : base(p), cb_(0), baton_(0) {} + : base(p), cb_(0), baton_(nullptr) {} template LoggingSharingPtr(Y* p, Callback cb, void* baton) Index: source/API/SBAddress.cpp =================================================================== --- source/API/SBAddress.cpp +++ source/API/SBAddress.cpp @@ -76,7 +76,7 @@ bool SBAddress::IsValid () const { - return m_opaque_ap.get() != NULL && m_opaque_ap->IsValid(); + return m_opaque_ap.get() != nullptr && m_opaque_ap->IsValid(); } void @@ -206,7 +206,7 @@ Address & SBAddress::ref () { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset (new Address()); return *m_opaque_ap; } @@ -236,7 +236,7 @@ if (m_opaque_ap.get()) { m_opaque_ap->Dump (&strm, - NULL, + nullptr, Address::DumpStyleResolvedDescription, Address::DumpStyleModuleWithFileAddress, 4); Index: source/API/SBBlock.cpp =================================================================== --- source/API/SBBlock.cpp +++ source/API/SBBlock.cpp @@ -28,7 +28,7 @@ SBBlock::SBBlock () : - m_opaque_ptr (NULL) + m_opaque_ptr (nullptr) { } @@ -51,20 +51,20 @@ SBBlock::~SBBlock () { - m_opaque_ptr = NULL; + m_opaque_ptr = nullptr; } bool SBBlock::IsValid () const { - return m_opaque_ptr != NULL; + return m_opaque_ptr != nullptr; } bool SBBlock::IsInlined () const { if (m_opaque_ptr) - return m_opaque_ptr->GetInlinedFunctionInfo () != NULL; + return m_opaque_ptr->GetInlinedFunctionInfo () != nullptr; return false; } @@ -75,9 +75,9 @@ { const InlineFunctionInfo* inlined_info = m_opaque_ptr->GetInlinedFunctionInfo (); if (inlined_info) - return inlined_info->GetName().AsCString (NULL); + return inlined_info->GetName().AsCString (nullptr); } - return NULL; + return nullptr; } SBFileSpec Index: source/API/SBBreakpoint.cpp =================================================================== --- source/API/SBBreakpoint.cpp +++ source/API/SBBreakpoint.cpp @@ -62,7 +62,7 @@ if (data) { delete data; - m_data = NULL; + m_data = nullptr; } } }; @@ -323,7 +323,7 @@ Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex()); return m_opaque_sp->GetConditionText (); } - return NULL; + return nullptr; } uint32_t @@ -416,7 +416,7 @@ { Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex()); const ThreadSpec *thread_spec = m_opaque_sp->GetOptions()->GetThreadSpecNoCreate(); - if (thread_spec != NULL) + if (thread_spec != nullptr) thread_idx = thread_spec->GetIndex(); } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -445,12 +445,12 @@ const char * SBBreakpoint::GetThreadName () const { - const char *name = NULL; + const char *name = nullptr; if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex()); const ThreadSpec *thread_spec = m_opaque_sp->GetOptions()->GetThreadSpecNoCreate(); - if (thread_spec != NULL) + if (thread_spec != nullptr) name = thread_spec->GetName(); } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -478,7 +478,7 @@ const char * SBBreakpoint::GetQueueName () const { - const char *name = NULL; + const char *name = nullptr; if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex()); @@ -675,7 +675,7 @@ bool SBBreakpoint::EventIsBreakpointEvent (const lldb::SBEvent &event) { - return Breakpoint::BreakpointEventData::GetEventDataFromEvent(event.get()) != NULL; + return Breakpoint::BreakpointEventData::GetEventDataFromEvent(event.get()) != nullptr; } Index: source/API/SBBreakpointLocation.cpp =================================================================== --- source/API/SBBreakpointLocation.cpp +++ source/API/SBBreakpointLocation.cpp @@ -73,7 +73,7 @@ bool SBBreakpointLocation::IsValid() const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } SBAddress @@ -161,7 +161,7 @@ Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); return m_opaque_sp->GetConditionText (); } - return NULL; + return nullptr; } void @@ -270,7 +270,7 @@ Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); return m_opaque_sp->GetThreadName(); } - return NULL; + return nullptr; } void @@ -291,7 +291,7 @@ Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); m_opaque_sp->GetQueueName (); } - return NULL; + return nullptr; } bool Index: source/API/SBBroadcaster.cpp =================================================================== --- source/API/SBBroadcaster.cpp +++ source/API/SBBroadcaster.cpp @@ -20,13 +20,13 @@ SBBroadcaster::SBBroadcaster () : m_opaque_sp (), - m_opaque_ptr (NULL) + m_opaque_ptr (nullptr) { } SBBroadcaster::SBBroadcaster (const char *name) : - m_opaque_sp (new Broadcaster (NULL, name)), - m_opaque_ptr (NULL) + m_opaque_sp (new Broadcaster (nullptr, name)), + m_opaque_ptr (nullptr) { m_opaque_ptr = m_opaque_sp.get(); Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE)); @@ -37,7 +37,7 @@ } SBBroadcaster::SBBroadcaster (lldb_private::Broadcaster *broadcaster, bool owns) : - m_opaque_sp (owns ? broadcaster : NULL), + m_opaque_sp (owns ? broadcaster : nullptr), m_opaque_ptr (broadcaster) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE)); @@ -67,7 +67,7 @@ SBBroadcaster::~SBBroadcaster() { - reset (NULL, false); + reset (nullptr, false); } void @@ -79,7 +79,7 @@ log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (event_type=0x%8.8x, unique=%i)", static_cast(m_opaque_ptr), event_type, unique); - if (m_opaque_ptr == NULL) + if (m_opaque_ptr == nullptr) return; if (unique) @@ -98,7 +98,7 @@ static_cast(m_opaque_ptr), static_cast(event.get()), unique); - if (m_opaque_ptr == NULL) + if (m_opaque_ptr == nullptr) return; EventSP event_sp = event.GetSP (); @@ -133,7 +133,7 @@ { if (m_opaque_ptr) return m_opaque_ptr->GetBroadcasterName().GetCString(); - return NULL; + return nullptr; } bool @@ -172,14 +172,14 @@ bool SBBroadcaster::IsValid () const { - return m_opaque_ptr != NULL; + return m_opaque_ptr != nullptr; } void SBBroadcaster::Clear () { m_opaque_sp.reset(); - m_opaque_ptr = NULL; + m_opaque_ptr = nullptr; } bool Index: source/API/SBCommandInterpreter.cpp =================================================================== --- source/API/SBCommandInterpreter.cpp +++ source/API/SBCommandInterpreter.cpp @@ -35,8 +35,8 @@ CommandPluginInterfaceImplementation (CommandInterpreter &interpreter, const char *name, lldb::SBCommandPluginInterface* backend, - const char *help = NULL, - const char *syntax = NULL, + const char *help = nullptr, + const char *syntax = nullptr, uint32_t flags = 0) : CommandObjectParsed (interpreter, name, help, syntax, flags), m_backend(backend) {} @@ -89,7 +89,7 @@ bool SBCommandInterpreter::IsValid() const { - return m_opaque_ptr != NULL; + return m_opaque_ptr != nullptr; } @@ -122,7 +122,7 @@ { if (m_opaque_ptr) return m_opaque_ptr->GetDebugger().GetTopIOHandlerControlSequence (ch).GetCString(); - return NULL; + return nullptr; } lldb::ReturnStatus @@ -174,7 +174,7 @@ // Sanity check the arguments that are passed in: // cursor & last_char have to be within the current_line. - if (current_line == NULL || cursor == NULL || last_char == NULL) + if (current_line == nullptr || cursor == nullptr || last_char == nullptr) return 0; if (cursor < current_line || last_char < current_line) @@ -582,7 +582,7 @@ { if (IsValid ()) return m_opaque_sp->GetCommandName (); - return NULL; + return nullptr; } const char* @@ -590,7 +590,7 @@ { if (IsValid ()) return m_opaque_sp->GetHelp (); - return NULL; + return nullptr; } lldb::SBCommand Index: source/API/SBCommandReturnObject.cpp =================================================================== --- source/API/SBCommandReturnObject.cpp +++ source/API/SBCommandReturnObject.cpp @@ -63,7 +63,7 @@ bool SBCommandReturnObject::IsValid() const { - return m_opaque_ap.get() != NULL; + return m_opaque_ap.get() != nullptr; } @@ -86,7 +86,7 @@ log->Printf ("SBCommandReturnObject(%p)::GetOutput () => NULL", static_cast(m_opaque_ap.get())); - return NULL; + return nullptr; } const char * @@ -108,7 +108,7 @@ log->Printf ("SBCommandReturnObject(%p)::GetError () => NULL", static_cast(m_opaque_ap.get())); - return NULL; + return nullptr; } size_t @@ -287,7 +287,7 @@ { if (m_opaque_ap.get()) { - if (len == 0 || string == NULL || *string == 0) + if (len == 0 || string == nullptr || *string == 0) { return; } @@ -305,20 +305,20 @@ SBCommandReturnObject::GetOutput (bool only_if_no_immediate) { if (!m_opaque_ap.get()) - return NULL; - if (only_if_no_immediate == false || m_opaque_ap->GetImmediateOutputStream().get() == NULL) + return nullptr; + if (only_if_no_immediate == false || m_opaque_ap->GetImmediateOutputStream().get() == nullptr) return GetOutput(); - return NULL; + return nullptr; } const char * SBCommandReturnObject::GetError (bool only_if_no_immediate) { if (!m_opaque_ap.get()) - return NULL; - if (only_if_no_immediate == false || m_opaque_ap->GetImmediateErrorStream().get() == NULL) + return nullptr; + if (only_if_no_immediate == false || m_opaque_ap->GetImmediateErrorStream().get() == nullptr) return GetError(); - return NULL; + return nullptr; } size_t Index: source/API/SBCommunication.cpp =================================================================== --- source/API/SBCommunication.cpp +++ source/API/SBCommunication.cpp @@ -19,7 +19,7 @@ SBCommunication::SBCommunication() : - m_opaque (NULL), + m_opaque (nullptr), m_opaque_owned (false) { } @@ -40,14 +40,14 @@ { if (m_opaque && m_opaque_owned) delete m_opaque; - m_opaque = NULL; + m_opaque = nullptr; m_opaque_owned = false; } bool SBCommunication::IsValid () const { - return m_opaque != NULL; + return m_opaque != nullptr; } bool @@ -72,7 +72,7 @@ { if (!m_opaque->HasConnection ()) m_opaque->SetConnection (new ConnectionFileDescriptor()); - return m_opaque->Connect (url, NULL); + return m_opaque->Connect (url, nullptr); } return eConnectionStatusNoConnection; } @@ -148,7 +148,7 @@ static_cast(dst_len), timeout_usec); size_t bytes_read = 0; if (m_opaque) - bytes_read = m_opaque->Read (dst, dst_len, timeout_usec, status, NULL); + bytes_read = m_opaque->Read (dst, dst_len, timeout_usec, status, nullptr); else status = eConnectionStatusNoConnection; @@ -167,7 +167,7 @@ { size_t bytes_written = 0; if (m_opaque) - bytes_written = m_opaque->Write (src, src_len, status, NULL); + bytes_written = m_opaque->Write (src, src_len, status, nullptr); else status = eConnectionStatusNoConnection; Index: source/API/SBCompileUnit.cpp =================================================================== --- source/API/SBCompileUnit.cpp +++ source/API/SBCompileUnit.cpp @@ -23,7 +23,7 @@ SBCompileUnit::SBCompileUnit () : - m_opaque_ptr (NULL) + m_opaque_ptr (nullptr) { } @@ -47,7 +47,7 @@ SBCompileUnit::~SBCompileUnit () { - m_opaque_ptr = NULL; + m_opaque_ptr = nullptr; } SBFileSpec @@ -123,9 +123,9 @@ index = m_opaque_ptr->FindLineEntry (start_idx, line, - inline_file_spec ? inline_file_spec->get() : NULL, + inline_file_spec ? inline_file_spec->get() : nullptr, exact, - NULL); + nullptr); } if (log) @@ -137,7 +137,7 @@ static_cast(m_opaque_ptr), start_idx, line, inline_file_spec ? static_cast(inline_file_spec->get()) - : NULL); + : nullptr); } else { @@ -145,7 +145,7 @@ static_cast(m_opaque_ptr), start_idx, line, inline_file_spec ? static_cast(inline_file_spec->get()) - : NULL, + : nullptr, index); } } @@ -231,7 +231,7 @@ bool SBCompileUnit::IsValid () const { - return m_opaque_ptr != NULL; + return m_opaque_ptr != nullptr; } bool Index: source/API/SBData.cpp =================================================================== --- source/API/SBData.cpp +++ source/API/SBData.cpp @@ -82,7 +82,7 @@ bool SBData::IsValid() { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } uint8_t @@ -423,7 +423,7 @@ SBData::GetString (lldb::SBError& error, lldb::offset_t offset) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char* value = 0; + const char* value = nullptr; if (!m_opaque_sp.get()) { error.SetErrorString("no value to read from"); @@ -432,7 +432,7 @@ { uint32_t old_offset = offset; value = m_opaque_sp->GetCStr(&offset); - if (offset == old_offset || (value == NULL)) + if (offset == old_offset || (value == nullptr)) error.SetErrorString("unable to read data"); } if (log) @@ -472,7 +472,7 @@ size_t size) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - void* ok = NULL; + void* ok = nullptr; if (!m_opaque_sp.get()) { error.SetErrorString("no value to read from"); @@ -481,7 +481,7 @@ { uint32_t old_offset = offset; ok = m_opaque_sp->GetU8(&offset, buf, size); - if ((offset == old_offset) || (ok == NULL)) + if ((offset == old_offset) || (ok == nullptr)) error.SetErrorString("unable to read data"); } if (log) Index: source/API/SBDebugger.cpp =================================================================== --- source/API/SBDebugger.cpp +++ source/API/SBDebugger.cpp @@ -143,13 +143,13 @@ SBDebugger SBDebugger::Create() { - return SBDebugger::Create(false, NULL, NULL); + return SBDebugger::Create(false, nullptr, nullptr); } SBDebugger SBDebugger::Create(bool source_init_files) { - return SBDebugger::Create (source_init_files, NULL, NULL); + return SBDebugger::Create (source_init_files, nullptr, nullptr); } SBDebugger @@ -202,7 +202,7 @@ Debugger::Destroy (debugger.m_opaque_sp); - if (debugger.m_opaque_sp.get() != NULL) + if (debugger.m_opaque_sp.get() != nullptr) debugger.m_opaque_sp.reset(); } @@ -256,7 +256,7 @@ bool SBDebugger::IsValid() const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } @@ -345,7 +345,7 @@ if (stream_file_sp) return stream_file_sp->GetFile().GetStream(); } - return NULL; + return nullptr; } FILE * @@ -357,7 +357,7 @@ if (stream_file_sp) return stream_file_sp->GetFile().GetStream(); } - return NULL; + return nullptr; } FILE * @@ -370,7 +370,7 @@ if (stream_file_sp) return stream_file_sp->GetFile().GetStream(); } - return NULL; + return nullptr; } void @@ -419,9 +419,9 @@ sb_interpreter.HandleCommand (command, result, false); - if (GetErrorFileHandle() != NULL) + if (GetErrorFileHandle() != nullptr) result.PutError (GetErrorFileHandle()); - if (GetOutputFileHandle() != NULL) + if (GetOutputFileHandle() != nullptr) result.PutOutput (GetOutputFileHandle()); if (m_opaque_sp->GetAsyncExecution() == false) @@ -479,7 +479,7 @@ { // Drain stdout when we stop just in case we have any bytes while ((len = process.GetSTDOUT (stdio_buffer, sizeof (stdio_buffer))) > 0) - if (out != NULL) + if (out != nullptr) ::fwrite (stdio_buffer, 1, len, out); } @@ -487,7 +487,7 @@ { // Drain stderr when we stop just in case we have any bytes while ((len = process.GetSTDERR (stdio_buffer, sizeof (stdio_buffer))) > 0) - if (err != NULL) + if (err != nullptr) ::fwrite (stdio_buffer, 1, len, err); } @@ -556,7 +556,7 @@ return Args::StringToScriptLanguage (script_language_name, eScriptLanguageDefault, - NULL); + nullptr); } const char * @@ -650,7 +650,7 @@ filename, target_triple, add_dependent_modules, - NULL, + nullptr, target_sp)); sb_target.SetSP (target_sp); } @@ -680,7 +680,7 @@ filename, arch_cstr, add_dependent_modules, - NULL, + nullptr, target_sp); if (error.Success()) @@ -803,7 +803,7 @@ { // No need to lock, the target list is thread safe ArchSpec arch (arch_name, m_opaque_sp->GetPlatformList().GetSelectedPlatform().get()); - TargetSP target_sp (m_opaque_sp->GetTargetList().FindTargetWithExecutableAndArchitecture (FileSpec(filename, false), arch_name ? &arch : NULL)); + TargetSP target_sp (m_opaque_sp->GetTargetList().FindTargetWithExecutableAndArchitecture (FileSpec(filename, false), arch_name ? &arch : nullptr)); sb_target.SetSP (target_sp); } return sb_target; @@ -1007,7 +1007,7 @@ if (m_opaque_sp) return m_opaque_sp->GetInstanceName().AsCString(); else - return NULL; + return nullptr; } SBError @@ -1089,7 +1089,7 @@ if (m_opaque_sp) return m_opaque_sp->GetPrompt (); - return 0; + return nullptr; } void @@ -1322,7 +1322,7 @@ { uint32_t log_options = LLDB_LOG_OPTION_PREPEND_TIMESTAMP | LLDB_LOG_OPTION_PREPEND_THREAD_NAME; StreamString errors; - return m_opaque_sp->EnableLog (channel, categories, NULL, log_options, errors); + return m_opaque_sp->EnableLog (channel, categories, nullptr, log_options, errors); } else Index: source/API/SBDeclaration.cpp =================================================================== --- source/API/SBDeclaration.cpp +++ source/API/SBDeclaration.cpp @@ -172,7 +172,7 @@ lldb_private::Declaration & SBDeclaration::ref() { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset (new lldb_private::Declaration ()); return *m_opaque_ap; } Index: source/API/SBError.cpp =================================================================== --- source/API/SBError.cpp +++ source/API/SBError.cpp @@ -57,7 +57,7 @@ { if (m_opaque_ap.get()) return m_opaque_ap->AsCString(); - return NULL; + return nullptr; } void @@ -180,13 +180,13 @@ bool SBError::IsValid () const { - return m_opaque_ap.get() != NULL; + return m_opaque_ap.get() != nullptr; } void SBError::CreateIfNeeded () { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset(new Error ()); } @@ -227,7 +227,7 @@ else { const char * err_string = GetCString(); - description.Printf ("error: %s", (err_string != NULL ? err_string : "")); + description.Printf ("error: %s", (err_string != nullptr ? err_string : "")); } } else Index: source/API/SBEvent.cpp =================================================================== --- source/API/SBEvent.cpp +++ source/API/SBEvent.cpp @@ -27,7 +27,7 @@ SBEvent::SBEvent () : m_event_sp (), - m_opaque_ptr (NULL) + m_opaque_ptr (nullptr) { } @@ -75,7 +75,7 @@ if (event_data) return lldb_event->GetData()->GetFlavor().AsCString(); } - return NULL; + return nullptr; } uint32_t @@ -197,7 +197,7 @@ { // Do NOT use m_opaque_ptr directly!!! Must use the SBEvent::get() // accessor. See comments in SBEvent::get().... - return SBEvent::get() != NULL; + return SBEvent::get() != nullptr; } Index: source/API/SBFrame.cpp =================================================================== --- source/API/SBFrame.cpp +++ source/API/SBFrame.cpp @@ -103,7 +103,7 @@ bool SBFrame::IsValid() const { - return GetFrameSP().get() != NULL; + return GetFrameSP().get() != nullptr; } SBSymbolContext @@ -114,7 +114,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -157,7 +157,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -200,7 +200,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -241,7 +241,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -282,7 +282,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -322,7 +322,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -362,7 +362,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); Process *process = exe_ctx.GetProcessPtr(); @@ -403,7 +403,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -460,7 +460,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -501,7 +501,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -542,7 +542,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -583,7 +583,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -683,7 +683,7 @@ SBValue sb_value; Mutex::Locker api_locker; Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - if (var_path == NULL || var_path[0] == '\0') + if (var_path == nullptr || var_path[0] == '\0') { if (log) log->Printf ("SBFrame::GetValueForVariablePath called with empty variable path."); @@ -692,7 +692,7 @@ ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -749,7 +749,7 @@ VariableSP var_sp; SBValue sb_value; - if (name == NULL || name[0] == '\0') + if (name == nullptr || name[0] == '\0') { if (log) log->Printf ("SBFrame::FindVariable called with empty name"); @@ -760,7 +760,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -837,7 +837,7 @@ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); SBValue sb_value; - if (name == NULL || name[0] == '\0') + if (name == nullptr || name[0] == '\0') { if (log) log->Printf ("SBFrame::FindValue called with empty name."); @@ -848,7 +848,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1024,11 +1024,11 @@ SBFrame::Disassemble () const { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char *disassembly = NULL; + const char *disassembly = nullptr; Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1093,7 +1093,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); if (log) @@ -1110,7 +1110,7 @@ if (frame) { size_t i; - VariableList *variable_list = NULL; + VariableList *variable_list = nullptr; variable_list = frame->GetVariableList(true); if (variable_list) { @@ -1186,7 +1186,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1238,7 +1238,7 @@ Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1375,7 +1375,7 @@ ExecutionResults exe_results = eExecutionSetupError; SBValue expr_result; - if (expr == NULL || expr[0] == '\0') + if (expr == nullptr || expr[0] == '\0') { if (log) log->Printf ("SBFrame::EvaluateExpression called with an empty expression"); @@ -1390,7 +1390,7 @@ if (log) log->Printf ("SBFrame()::EvaluateExpression (expr=\"%s\")...", expr); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); @@ -1417,7 +1417,7 @@ expr_result.SetSP(expr_value_sp, options.GetFetchDynamicValue()); if (target->GetDisplayExpressionsInCrashlogs()) - Host::SetCrashDescription (NULL); + Host::SetCrashDescription (nullptr); } else { @@ -1451,7 +1451,7 @@ { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1465,7 +1465,7 @@ Block *block = frame->GetSymbolContext(eSymbolContextBlock).block; if (block) - return block->GetContainingInlinedBlock () != NULL; + return block->GetContainingInlinedBlock () != nullptr; } else { @@ -1487,9 +1487,9 @@ SBFrame::GetFunctionName() { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char *name = NULL; + const char *name = nullptr; ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1511,13 +1511,13 @@ } } - if (name == NULL) + if (name == nullptr) { if (sc.function) name = sc.function->GetName().GetCString(); } - if (name == NULL) + if (name == nullptr) { if (sc.symbol) name = sc.symbol->GetName().GetCString(); Index: source/API/SBFunction.cpp =================================================================== --- source/API/SBFunction.cpp +++ source/API/SBFunction.cpp @@ -23,7 +23,7 @@ using namespace lldb_private; SBFunction::SBFunction () : - m_opaque_ptr (NULL) + m_opaque_ptr (nullptr) { } @@ -46,19 +46,19 @@ SBFunction::~SBFunction () { - m_opaque_ptr = NULL; + m_opaque_ptr = nullptr; } bool SBFunction::IsValid () const { - return m_opaque_ptr != NULL; + return m_opaque_ptr != nullptr; } const char * SBFunction::GetName() const { - const char *cstr = NULL; + const char *cstr = nullptr; if (m_opaque_ptr) cstr = m_opaque_ptr->GetMangled().GetName().AsCString(); @@ -78,7 +78,7 @@ const char * SBFunction::GetMangledName () const { - const char *cstr = NULL; + const char *cstr = nullptr; if (m_opaque_ptr) cstr = m_opaque_ptr->GetMangled().GetMangledName().AsCString(); Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -126,7 +126,7 @@ SBInstructionList SBFunction::GetInstructions (SBTarget target) { - return GetInstructions (target, NULL); + return GetInstructions (target, nullptr); } SBInstructionList @@ -149,7 +149,7 @@ { const bool prefer_file_cache = false; sb_instructions.SetDisassembler (Disassembler::DisassembleRange (module_sp->GetArchitecture(), - NULL, + nullptr, flavor, exe_ctx, m_opaque_ptr->GetAddressRange(), Index: source/API/SBHostOS.cpp =================================================================== --- source/API/SBHostOS.cpp +++ source/API/SBHostOS.cpp @@ -57,7 +57,7 @@ // FIXME: You should log the return value? - return Host::ThreadCreate (name, thread_function, thread_arg, error_ptr ? error_ptr->get() : NULL); + return Host::ThreadCreate (name, thread_function, thread_arg, error_ptr ? error_ptr->get() : nullptr); } void @@ -69,19 +69,19 @@ bool SBHostOS::ThreadCancel (lldb::thread_t thread, SBError *error_ptr) { - return Host::ThreadCancel (thread, error_ptr ? error_ptr->get() : NULL); + return Host::ThreadCancel (thread, error_ptr ? error_ptr->get() : nullptr); } bool SBHostOS::ThreadDetach (lldb::thread_t thread, SBError *error_ptr) { - return Host::ThreadDetach (thread, error_ptr ? error_ptr->get() : NULL); + return Host::ThreadDetach (thread, error_ptr ? error_ptr->get() : nullptr); } bool SBHostOS::ThreadJoin (lldb::thread_t thread, lldb::thread_result_t *result, SBError *error_ptr) { - return Host::ThreadJoin (thread, result, error_ptr ? error_ptr->get() : NULL); + return Host::ThreadJoin (thread, result, error_ptr ? error_ptr->get() : nullptr); } Index: source/API/SBInstruction.cpp =================================================================== --- source/API/SBInstruction.cpp +++ source/API/SBInstruction.cpp @@ -57,7 +57,7 @@ bool SBInstruction::IsValid() { - return (m_opaque_sp.get() != NULL); + return (m_opaque_sp.get() != nullptr); } SBAddress @@ -85,7 +85,7 @@ } return m_opaque_sp->GetMnemonic(&exe_ctx); } - return NULL; + return nullptr; } const char * @@ -104,7 +104,7 @@ } return m_opaque_sp->GetOperands(&exe_ctx); } - return NULL; + return nullptr; } const char * @@ -123,7 +123,7 @@ } return m_opaque_sp->GetComment(&exe_ctx); } - return NULL; + return nullptr; } size_t @@ -172,7 +172,7 @@ { // Use the "ref()" instead of the "get()" accessor in case the SBStream // didn't have a stream already created, one will get created... - m_opaque_sp->Dump (&s.ref(), 0, true, false, NULL); + m_opaque_sp->Dump (&s.ref(), 0, true, false, nullptr); return true; } return false; @@ -181,13 +181,13 @@ void SBInstruction::Print (FILE *out) { - if (out == NULL) + if (out == nullptr) return; if (m_opaque_sp) { StreamFile out_stream (out, false); - m_opaque_sp->Dump (&out_stream, 0, true, false, NULL); + m_opaque_sp->Dump (&out_stream, 0, true, false, nullptr); } } @@ -222,7 +222,7 @@ { if (m_opaque_sp && triple) { - lldb_private::ArchSpec arch (triple, NULL); + lldb_private::ArchSpec arch (triple, nullptr); return m_opaque_sp->DumpEmulation (arch); Index: source/API/SBInstructionList.cpp =================================================================== --- source/API/SBInstructionList.cpp +++ source/API/SBInstructionList.cpp @@ -43,7 +43,7 @@ bool SBInstructionList::IsValid () const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } size_t @@ -83,7 +83,7 @@ void SBInstructionList::Print (FILE *out) { - if (out == NULL) + if (out == nullptr) return; } @@ -103,9 +103,9 @@ for (size_t i=0; iGetInstructionList().GetInstructionAtIndex (i).get(); - if (inst == NULL) + if (inst == nullptr) break; - inst->Dump (&sref, max_opcode_byte_size, true, false, NULL); + inst->Dump (&sref, max_opcode_byte_size, true, false, nullptr); sref.EOL(); } return true; Index: source/API/SBLineEntry.cpp =================================================================== --- source/API/SBLineEntry.cpp +++ source/API/SBLineEntry.cpp @@ -76,7 +76,7 @@ StreamString sstr; const Address *addr = sb_address.get(); if (addr) - addr->Dump (&sstr, NULL, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4); + addr->Dump (&sstr, nullptr, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4); log->Printf ("SBLineEntry(%p)::GetStartAddress () => SBAddress (%p): %s", static_cast(m_opaque_ap.get()), static_cast(sb_address.get()), sstr.GetData()); @@ -100,7 +100,7 @@ StreamString sstr; const Address *addr = sb_address.get(); if (addr) - addr->Dump (&sstr, NULL, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4); + addr->Dump (&sstr, nullptr, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4); log->Printf ("SBLineEntry(%p)::GetEndAddress () => SBAddress (%p): %s", static_cast(m_opaque_ap.get()), static_cast(sb_address.get()), sstr.GetData()); @@ -217,7 +217,7 @@ lldb_private::LineEntry & SBLineEntry::ref() { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset (new lldb_private::LineEntry ()); return *m_opaque_ap; } Index: source/API/SBListener.cpp =================================================================== --- source/API/SBListener.cpp +++ source/API/SBListener.cpp @@ -28,13 +28,13 @@ SBListener::SBListener () : m_opaque_sp (), - m_opaque_ptr (NULL) + m_opaque_ptr (nullptr) { } SBListener::SBListener (const char *name) : m_opaque_sp (new Listener (name)), - m_opaque_ptr (NULL) + m_opaque_ptr (nullptr) { m_opaque_ptr = m_opaque_sp.get(); @@ -76,7 +76,7 @@ bool SBListener::IsValid() const { - return m_opaque_ptr != NULL; + return m_opaque_ptr != nullptr; } void @@ -214,7 +214,7 @@ time_value.OffsetWithSeconds (timeout_secs); } EventSP event_sp; - if (m_opaque_ptr->WaitForEvent (time_value.IsValid() ? &time_value : NULL, event_sp)) + if (m_opaque_ptr->WaitForEvent (time_value.IsValid() ? &time_value : nullptr, event_sp)) { event.reset (event_sp); success = true; @@ -237,7 +237,7 @@ } } if (!success) - event.reset (NULL); + event.reset (nullptr); return success; } @@ -258,7 +258,7 @@ time_value.OffsetWithSeconds (num_seconds); } EventSP event_sp; - if (m_opaque_ptr->WaitForEventForBroadcaster (time_value.IsValid() ? &time_value : NULL, + if (m_opaque_ptr->WaitForEventForBroadcaster (time_value.IsValid() ? &time_value : nullptr, broadcaster.get(), event_sp)) { @@ -267,7 +267,7 @@ } } - event.reset (NULL); + event.reset (nullptr); return false; } @@ -289,7 +289,7 @@ time_value.OffsetWithSeconds (num_seconds); } EventSP event_sp; - if (m_opaque_ptr->WaitForEventForBroadcasterWithType (time_value.IsValid() ? &time_value : NULL, + if (m_opaque_ptr->WaitForEventForBroadcasterWithType (time_value.IsValid() ? &time_value : nullptr, broadcaster.get(), event_type_mask, event_sp)) @@ -298,7 +298,7 @@ return true; } } - event.reset (NULL); + event.reset (nullptr); return false; } @@ -310,7 +310,7 @@ event.reset (m_opaque_ptr->PeekAtNextEvent ()); return event.IsValid(); } - event.reset (NULL); + event.reset (nullptr); return false; } @@ -322,7 +322,7 @@ event.reset (m_opaque_ptr->PeekAtNextEventForBroadcaster (broadcaster.get())); return event.IsValid(); } - event.reset (NULL); + event.reset (nullptr); return false; } @@ -335,7 +335,7 @@ event.reset(m_opaque_ptr->PeekAtNextEventForBroadcasterWithType (broadcaster.get(), event_type_mask)); return event.IsValid(); } - event.reset (NULL); + event.reset (nullptr); return false; } @@ -351,7 +351,7 @@ return true; } } - event.reset (NULL); + event.reset (nullptr); return false; } @@ -367,7 +367,7 @@ return true; } } - event.reset (NULL); + event.reset (nullptr); return false; } @@ -390,7 +390,7 @@ return true; } } - event.reset (NULL); + event.reset (nullptr); return false; } Index: source/API/SBModule.cpp =================================================================== --- source/API/SBModule.cpp +++ source/API/SBModule.cpp @@ -46,9 +46,9 @@ ModuleSP module_sp; Error error = ModuleList::GetSharedModule (*module_spec.m_opaque_ap, module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); if (module_sp) SetSP(module_sp); } @@ -90,7 +90,7 @@ bool SBModule::IsValid () const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } void @@ -184,7 +184,7 @@ { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const uint8_t *uuid_bytes = NULL; + const uint8_t *uuid_bytes = nullptr; ModuleSP module_sp (GetSP ()); if (module_sp) uuid_bytes = (const uint8_t *)module_sp->GetUUID().GetBytes(); @@ -212,7 +212,7 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); static char uuid_string_buffer[80]; - const char *uuid_c_string = NULL; + const char *uuid_c_string = nullptr; std::string uuid_string; ModuleSP module_sp (GetSP ()); if (module_sp) @@ -342,7 +342,7 @@ if (symbols) return symbols->GetSymtab(); } - return NULL; + return nullptr; } size_t @@ -461,7 +461,7 @@ const bool symbols_ok = true; const bool inlines_ok = true; module_sp->FindFunctions (ConstString(name), - NULL, + nullptr, name_type_mask, symbols_ok, inlines_ok, @@ -481,7 +481,7 @@ { VariableList variable_list; const uint32_t match_count = module_sp->FindGlobalVariables (ConstString (name), - NULL, + nullptr, false, max_matches, variable_list); @@ -606,7 +606,7 @@ if (vendor) { TypeList type_list; - vendor->GetTypes (NULL, type_mask, type_list); + vendor->GetTypes (nullptr, type_mask, type_list); sb_type_list.m_opaque_ap->Append(type_list); } } @@ -659,7 +659,7 @@ ConstString const_triple (triple.c_str()); return const_triple.GetCString(); } - return NULL; + return nullptr; } uint32_t Index: source/API/SBPlatform.cpp =================================================================== --- source/API/SBPlatform.cpp +++ source/API/SBPlatform.cpp @@ -24,7 +24,7 @@ // PlatformConnectOptions //---------------------------------------------------------------------- struct PlatformConnectOptions { - PlatformConnectOptions(const char *url = NULL) : + PlatformConnectOptions(const char *url = nullptr) : m_url(), m_rsync_options(), m_rsync_remote_path_prefix(), @@ -52,7 +52,7 @@ // PlatformShellCommand //---------------------------------------------------------------------- struct PlatformShellCommand { - PlatformShellCommand(const char *shell_command = NULL) : + PlatformShellCommand(const char *shell_command = nullptr) : m_command(), m_working_dir(), m_status(0), @@ -104,7 +104,7 @@ SBPlatformConnectOptions::GetURL() { if (m_opaque_ptr->m_url.empty()) - return NULL; + return nullptr; return m_opaque_ptr->m_url.c_str(); } @@ -194,7 +194,7 @@ SBPlatformShellCommand::GetCommand() { if (m_opaque_ptr->m_command.empty()) - return NULL; + return nullptr; return m_opaque_ptr->m_command.c_str(); } @@ -211,7 +211,7 @@ SBPlatformShellCommand::GetWorkingDirectory () { if (m_opaque_ptr->m_working_dir.empty()) - return NULL; + return nullptr; return m_opaque_ptr->m_working_dir.c_str(); } @@ -252,7 +252,7 @@ SBPlatformShellCommand::GetOutput () { if (m_opaque_ptr->m_output.empty()) - return NULL; + return nullptr; return m_opaque_ptr->m_output.c_str(); } @@ -279,7 +279,7 @@ bool SBPlatform::IsValid () const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } void @@ -294,7 +294,7 @@ PlatformSP platform_sp(GetSP()); if (platform_sp) return platform_sp->GetName().GetCString(); - return NULL; + return nullptr; } lldb::PlatformSP @@ -315,7 +315,7 @@ PlatformSP platform_sp(GetSP()); if (platform_sp) return platform_sp->GetWorkingDirectory().GetCString(); - return NULL; + return nullptr; } bool @@ -381,7 +381,7 @@ return ConstString(arch.GetTriple().getTriple().c_str()).GetCString(); } } - return NULL; + return nullptr; } const char * @@ -400,7 +400,7 @@ } } } - return NULL; + return nullptr; } const char * @@ -419,7 +419,7 @@ } } } - return NULL; + return nullptr; } const char * @@ -428,7 +428,7 @@ PlatformSP platform_sp(GetSP()); if (platform_sp) return platform_sp->GetHostname(); - return NULL; + return nullptr; } uint32_t @@ -553,7 +553,7 @@ if (command) { const char *working_dir = shell_command.GetWorkingDirectory(); - if (working_dir == NULL) + if (working_dir == nullptr) { working_dir = platform_sp->GetWorkingDirectory().GetCString(); if (working_dir) Index: source/API/SBProcess.cpp =================================================================== --- source/API/SBProcess.cpp +++ source/API/SBProcess.cpp @@ -421,7 +421,7 @@ void SBProcess::ReportEventState (const SBEvent &event, FILE *out) const { - if (out == NULL) + if (out == nullptr) return; ProcessSP process_sp(GetSP()); @@ -645,7 +645,7 @@ const char * SBProcess::GetExitDescription () { - const char *exit_desc = NULL; + const char *exit_desc = nullptr; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -745,7 +745,7 @@ if (log) log->Printf ("SBProcess(%p)::Continue () waiting for process to stop...", static_cast(process_sp.get())); - process_sp->WaitForProcessToStop (NULL); + process_sp->WaitForProcessToStop (nullptr); } } sb_error.SetError(error); @@ -1216,7 +1216,7 @@ char path[PATH_MAX]; GetTarget().GetExecutable().GetPath (path, sizeof(path)); Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer(); - const char *exe_name = NULL; + const char *exe_name = nullptr; if (exe_module) exe_name = exe_module->GetFileSpec().GetFilename().AsCString(); @@ -1365,5 +1365,5 @@ static_cast(process_sp.get())); } } - return NULL; + return nullptr; } Index: source/API/SBQueue.cpp =================================================================== --- source/API/SBQueue.cpp +++ source/API/SBQueue.cpp @@ -69,7 +69,7 @@ bool IsValid () { - return m_queue_wp.lock() != NULL; + return m_queue_wp.lock() != nullptr; } void @@ -124,7 +124,7 @@ const char * GetName () const { - const char *name = NULL; + const char *name = nullptr; lldb::QueueSP queue_sp = m_queue_wp.lock (); if (queue_sp.get()) { Index: source/API/SBQueueItem.cpp =================================================================== --- source/API/SBQueueItem.cpp +++ source/API/SBQueueItem.cpp @@ -46,7 +46,7 @@ bool SBQueueItem::IsValid() const { - bool is_valid = m_queue_item_sp.get() != NULL; + bool is_valid = m_queue_item_sp.get() != nullptr; Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) log->Printf("SBQueueItem(%p)::IsValid() == %s", @@ -113,7 +113,7 @@ StreamString sstr; const Address *addr = result.get(); if (addr) - addr->Dump (&sstr, NULL, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4); + addr->Dump (&sstr, nullptr, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4); log->Printf ("SBQueueItem(%p)::GetAddress() == SBAddress(%p): %s", static_cast(m_queue_item_sp.get()), static_cast(result.get()), sstr.GetData()); @@ -153,7 +153,7 @@ if (log) { const char *queue_name = thread_sp->GetQueueName(); - if (queue_name == NULL) + if (queue_name == nullptr) queue_name = ""; log->Printf ("SBQueueItem(%p)::GetExtendedBacktraceThread() = new extended Thread created (%p) with queue_id 0x%" PRIx64 " queue name '%s'", static_cast(m_queue_item_sp.get()), Index: source/API/SBSection.cpp =================================================================== --- source/API/SBSection.cpp +++ source/API/SBSection.cpp @@ -57,7 +57,7 @@ SBSection::IsValid () const { SectionSP section_sp (GetSP()); - return section_sp && section_sp->GetModule().get() != NULL; + return section_sp && section_sp->GetModule().get() != nullptr; } const char * @@ -66,7 +66,7 @@ SectionSP section_sp (GetSP()); if (section_sp) return section_sp->GetName().GetCString(); - return NULL; + return nullptr; } lldb::SBSection Index: source/API/SBSourceManager.cpp =================================================================== --- source/API/SBSourceManager.cpp +++ source/API/SBSourceManager.cpp @@ -134,7 +134,7 @@ SBStream &s ) { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) return 0; return m_opaque_ap->DisplaySourceLinesWithLineNumbers (file.ref(), Index: source/API/SBStream.cpp =================================================================== --- source/API/SBStream.cpp +++ source/API/SBStream.cpp @@ -30,7 +30,7 @@ bool SBStream::IsValid() const { - return (m_opaque_ap.get() != NULL); + return (m_opaque_ap.get() != nullptr); } // If this stream is not redirected to a file, it will maintain a local @@ -38,8 +38,8 @@ const char * SBStream::GetData () { - if (m_is_file || m_opaque_ap.get() == NULL) - return NULL; + if (m_is_file || m_opaque_ap.get() == nullptr) + return nullptr; return static_cast(m_opaque_ap.get())->GetData(); } @@ -50,7 +50,7 @@ size_t SBStream::GetSize() { - if (m_is_file || m_opaque_ap.get() == NULL) + if (m_is_file || m_opaque_ap.get() == nullptr) return 0; return static_cast(m_opaque_ap.get())->GetSize(); @@ -167,7 +167,7 @@ lldb_private::Stream & SBStream::ref() { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset (new StreamString()); return *m_opaque_ap.get(); } Index: source/API/SBStringList.cpp =================================================================== --- source/API/SBStringList.cpp +++ source/API/SBStringList.cpp @@ -66,13 +66,13 @@ bool SBStringList::IsValid() const { - return (m_opaque_ap.get() != NULL); + return (m_opaque_ap.get() != nullptr); } void SBStringList::AppendString (const char *str) { - if (str != NULL) + if (str != nullptr) { if (IsValid()) m_opaque_ap->AppendString (str); @@ -85,7 +85,7 @@ void SBStringList::AppendList (const char **strv, int strc) { - if ((strv != NULL) + if ((strv != nullptr) && (strc > 0)) { if (IsValid()) @@ -123,7 +123,7 @@ { return m_opaque_ap->GetStringAtIndex (idx); } - return NULL; + return nullptr; } void Index: source/API/SBSymbol.cpp =================================================================== --- source/API/SBSymbol.cpp +++ source/API/SBSymbol.cpp @@ -20,7 +20,7 @@ using namespace lldb_private; SBSymbol::SBSymbol () : - m_opaque_ptr (NULL) + m_opaque_ptr (nullptr) { } @@ -43,7 +43,7 @@ SBSymbol::~SBSymbol () { - m_opaque_ptr = NULL; + m_opaque_ptr = nullptr; } void @@ -55,13 +55,13 @@ bool SBSymbol::IsValid () const { - return m_opaque_ptr != NULL; + return m_opaque_ptr != nullptr; } const char * SBSymbol::GetName() const { - const char *name = NULL; + const char *name = nullptr; if (m_opaque_ptr) name = m_opaque_ptr->GetMangled().GetName().AsCString(); @@ -75,7 +75,7 @@ const char * SBSymbol::GetMangledName () const { - const char *name = NULL; + const char *name = nullptr; if (m_opaque_ptr) name = m_opaque_ptr->GetMangled().GetMangledName().AsCString(); Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -107,7 +107,7 @@ if (m_opaque_ptr) { m_opaque_ptr->GetDescription (&strm, - lldb::eDescriptionLevelFull, NULL); + lldb::eDescriptionLevelFull, nullptr); } else strm.PutCString ("No value"); @@ -118,7 +118,7 @@ SBInstructionList SBSymbol::GetInstructions (SBTarget target) { - return GetInstructions (target, NULL); + return GetInstructions (target, nullptr); } SBInstructionList @@ -143,7 +143,7 @@ AddressRange symbol_range (m_opaque_ptr->GetAddress(), m_opaque_ptr->GetByteSize()); const bool prefer_file_cache = false; sb_instructions.SetDisassembler (Disassembler::DisassembleRange (module_sp->GetArchitecture (), - NULL, + nullptr, flavor_string, exe_ctx, symbol_range, Index: source/API/SBSymbolContext.cpp =================================================================== --- source/API/SBSymbolContext.cpp +++ source/API/SBSymbolContext.cpp @@ -79,7 +79,7 @@ bool SBSymbolContext::IsValid () const { - return m_opaque_ap.get() != NULL; + return m_opaque_ap.get() != nullptr; } @@ -112,7 +112,7 @@ SBCompileUnit SBSymbolContext::GetCompileUnit () { - return SBCompileUnit (m_opaque_ap.get() ? m_opaque_ap->comp_unit : NULL); + return SBCompileUnit (m_opaque_ap.get() ? m_opaque_ap->comp_unit : nullptr); } SBFunction @@ -120,7 +120,7 @@ { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - Function *function = NULL; + Function *function = nullptr; if (m_opaque_ap.get()) function = m_opaque_ap->function; @@ -138,7 +138,7 @@ SBBlock SBSymbolContext::GetBlock () { - return SBBlock (m_opaque_ap.get() ? m_opaque_ap->block : NULL); + return SBBlock (m_opaque_ap.get() ? m_opaque_ap->block : nullptr); } SBLineEntry @@ -165,7 +165,7 @@ { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - Symbol *symbol = NULL; + Symbol *symbol = nullptr; if (m_opaque_ap.get()) symbol = m_opaque_ap->symbol; @@ -238,7 +238,7 @@ lldb_private::SymbolContext& SBSymbolContext::operator*() { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset (new SymbolContext); return *m_opaque_ap.get(); } @@ -246,7 +246,7 @@ lldb_private::SymbolContext& SBSymbolContext::ref() { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset (new SymbolContext); return *m_opaque_ap.get(); } @@ -264,7 +264,7 @@ if (m_opaque_ap.get()) { - m_opaque_ap->GetDescription (&strm, lldb::eDescriptionLevelFull, NULL); + m_opaque_ap->GetDescription (&strm, lldb::eDescriptionLevelFull, nullptr); } else strm.PutCString ("No value"); Index: source/API/SBSymbolContextList.cpp =================================================================== --- source/API/SBSymbolContextList.cpp +++ source/API/SBSymbolContextList.cpp @@ -86,7 +86,7 @@ bool SBSymbolContextList::IsValid () const { - return m_opaque_ap.get() != NULL; + return m_opaque_ap.get() != nullptr; } @@ -110,7 +110,7 @@ { Stream &strm = description.ref(); if (m_opaque_ap.get()) - m_opaque_ap->GetDescription (&strm, lldb::eDescriptionLevelFull, NULL); + m_opaque_ap->GetDescription (&strm, lldb::eDescriptionLevelFull, nullptr); return true; } Index: source/API/SBTarget.cpp =================================================================== --- source/API/SBTarget.cpp +++ source/API/SBTarget.cpp @@ -535,7 +535,7 @@ bool SBTarget::IsValid () const { - return m_opaque_sp.get() != NULL && m_opaque_sp->IsValid(); + return m_opaque_sp.get() != nullptr && m_opaque_sp->IsValid(); } SBProcess @@ -578,7 +578,7 @@ { FileSpec filespec(core_file, true); ProcessSP process_sp (target_sp->CreateProcess(target_sp->GetDebugger().GetListener(), - NULL, + nullptr, &filespec)); if (process_sp) { @@ -597,9 +597,9 @@ const char *working_directory ) { - char *stdin_path = NULL; - char *stdout_path = NULL; - char *stderr_path = NULL; + char *stdin_path = nullptr; + char *stdout_path = nullptr; + char *stderr_path = nullptr; uint32_t launch_flags = 0; bool stop_at_entry = false; SBError error; @@ -624,7 +624,7 @@ if (target_sp) { Mutex::Locker api_locker (target_sp->GetAPIMutex()); - sb_error.ref() = target_sp->Install(NULL); + sb_error.ref() = target_sp->Install(nullptr); } return sb_error; } @@ -828,7 +828,7 @@ } if (state != eStateConnected) - process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), NULL, NULL); + process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), nullptr, nullptr); if (process_sp) { @@ -864,7 +864,7 @@ // If we are doing synchronous mode, then wait for the // process to stop! if (target_sp->GetDebugger().GetAsyncExecution () == false) - process_sp->WaitForProcessToStop (NULL); + process_sp->WaitForProcessToStop (nullptr); } } else @@ -950,9 +950,9 @@ else { if (listener.IsValid()) - process_sp = target_sp->CreateProcess (listener.ref(), NULL, NULL); + process_sp = target_sp->CreateProcess (listener.ref(), nullptr, nullptr); else - process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), NULL, NULL); + process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), nullptr, nullptr); } if (process_sp) { @@ -973,7 +973,7 @@ // If we are doing synchronous mode, then wait for the // process to stop! if (target_sp->GetDebugger().GetAsyncExecution () == false) - process_sp->WaitForProcessToStop (NULL); + process_sp->WaitForProcessToStop (nullptr); } } else @@ -1047,9 +1047,9 @@ else { if (listener.IsValid()) - process_sp = target_sp->CreateProcess (listener.ref(), NULL, NULL); + process_sp = target_sp->CreateProcess (listener.ref(), nullptr, nullptr); else - process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), NULL, NULL); + process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), nullptr, nullptr); } if (process_sp) @@ -1064,7 +1064,7 @@ // If we are doing synchronous mode, then wait for the // process to stop! if (target_sp->GetDebugger().GetAsyncExecution () == false) - process_sp->WaitForProcessToStop (NULL); + process_sp->WaitForProcessToStop (nullptr); } } else @@ -1107,14 +1107,14 @@ { Mutex::Locker api_locker (target_sp->GetAPIMutex()); if (listener.IsValid()) - process_sp = target_sp->CreateProcess (listener.ref(), plugin_name, NULL); + process_sp = target_sp->CreateProcess (listener.ref(), plugin_name, nullptr); else - process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), plugin_name, NULL); + process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), plugin_name, nullptr); if (process_sp) { sb_process.SetSP (process_sp); - error.SetError (process_sp->ConnectRemote (NULL, url)); + error.SetError (process_sp->ConnectRemote (nullptr, url)); } else { @@ -1258,7 +1258,7 @@ const LazyBool skip_prologue = eLazyBoolCalculate; const bool internal = false; const bool hardware = false; - *sb_bp = target_sp->CreateBreakpoint (NULL, *sb_file_spec, line, check_inlines, skip_prologue, internal, hardware); + *sb_bp = target_sp->CreateBreakpoint (nullptr, *sb_file_spec, line, check_inlines, skip_prologue, internal, hardware); } if (log) @@ -1294,11 +1294,11 @@ { FileSpecList module_spec_list; module_spec_list.Append (FileSpec (module_name, false)); - *sb_bp = target_sp->CreateBreakpoint (&module_spec_list, NULL, symbol_name, eFunctionNameTypeAuto, skip_prologue, internal, hardware); + *sb_bp = target_sp->CreateBreakpoint (&module_spec_list, nullptr, symbol_name, eFunctionNameTypeAuto, skip_prologue, internal, hardware); } else { - *sb_bp = target_sp->CreateBreakpoint (NULL, NULL, symbol_name, eFunctionNameTypeAuto, skip_prologue, internal, hardware); + *sb_bp = target_sp->CreateBreakpoint (nullptr, nullptr, symbol_name, eFunctionNameTypeAuto, skip_prologue, internal, hardware); } } @@ -1390,7 +1390,7 @@ sep = ','; else sep = '}'; - if (symbol_names[i] != NULL) + if (symbol_names[i] != nullptr) log->Printf ("\"%s\"%c ", symbol_names[i], sep); else log->Printf ("\"\"%c ", sep); @@ -1423,11 +1423,11 @@ FileSpecList module_spec_list; module_spec_list.Append (FileSpec (module_name, false)); - *sb_bp = target_sp->CreateFuncRegexBreakpoint (&module_spec_list, NULL, regexp, skip_prologue, internal, hardware); + *sb_bp = target_sp->CreateFuncRegexBreakpoint (&module_spec_list, nullptr, regexp, skip_prologue, internal, hardware); } else { - *sb_bp = target_sp->CreateFuncRegexBreakpoint (NULL, NULL, regexp, skip_prologue, internal, hardware); + *sb_bp = target_sp->CreateFuncRegexBreakpoint (nullptr, nullptr, regexp, skip_prologue, internal, hardware); } } @@ -1516,7 +1516,7 @@ } else { - *sb_bp = target_sp->CreateSourceRegexBreakpoint (NULL, &source_file_spec_list, regexp, false, hardware); + *sb_bp = target_sp->CreateSourceRegexBreakpoint (nullptr, &source_file_spec_list, regexp, false, hardware); } } @@ -1789,7 +1789,7 @@ // Target::CreateWatchpoint() is thread safe. Error cw_error; // This API doesn't take in a type, so we can't figure out what it is. - ClangASTType *type = NULL; + ClangASTType *type = nullptr; watchpoint_sp = target_sp->CreateWatchpoint(addr, size, type, watch_type, cw_error); error.SetError(cw_error); sb_watchpoint.SetSP (watchpoint_sp); @@ -1902,7 +1902,7 @@ const char *triple, const char *uuid_cstr) { - return AddModule (path, triple, uuid_cstr, NULL); + return AddModule (path, triple, uuid_cstr, nullptr); } lldb::SBModule @@ -2026,7 +2026,7 @@ ConstString const_triple (triple.c_str()); return const_triple.GetCString(); } - return NULL; + return nullptr; } uint32_t @@ -2280,7 +2280,7 @@ if (match_count > 0) { ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get(); - if (exe_scope == NULL) + if (exe_scope == nullptr) exe_scope = target_sp.get(); for (uint32_t i=0; iGetArchitecture(), - NULL, + nullptr, flavor_string, *addr_ptr, data.GetBytes(), @@ -2357,7 +2357,7 @@ lldb::SBInstructionList SBTarget::GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size) { - return GetInstructionsWithFlavor (base_addr, NULL, buf, size); + return GetInstructionsWithFlavor (base_addr, nullptr, buf, size); } lldb::SBInstructionList @@ -2376,7 +2376,7 @@ const bool data_from_file = true; sb_instructions.SetDisassembler (Disassembler::DisassembleBytes (target_sp->GetArchitecture(), - NULL, + nullptr, flavor_string, addr, buf, @@ -2391,7 +2391,7 @@ lldb::SBInstructionList SBTarget::GetInstructions (lldb::addr_t base_addr, const void *buf, size_t size) { - return GetInstructionsWithFlavor (ResolveLoadAddress(base_addr), NULL, buf, size); + return GetInstructionsWithFlavor (ResolveLoadAddress(base_addr), nullptr, buf, size); } lldb::SBInstructionList @@ -2614,10 +2614,10 @@ ExecutionResults exe_results = eExecutionSetupError; ValueObjectSP expr_value_sp; TargetSP target_sp(GetSP()); - StackFrame *frame = NULL; + StackFrame *frame = nullptr; if (target_sp) { - if (expr == NULL || expr[0] == '\0') + if (expr == nullptr || expr[0] == '\0') { if (log) log->Printf ("SBTarget::EvaluateExpression called with an empty expression"); Index: source/API/SBThread.cpp =================================================================== --- source/API/SBThread.cpp +++ source/API/SBThread.cpp @@ -128,7 +128,7 @@ bool SBThread::IsValid() const { - return m_opaque_sp->GetThreadSP().get() != NULL; + return m_opaque_sp->GetThreadSP().get() != nullptr; } void @@ -369,7 +369,7 @@ case eStopReasonSignal: { stop_desc = exe_ctx.GetProcessPtr()->GetUnixSignals ().GetSignalAsCString (stop_info_sp->GetValue()); - if (stop_desc == NULL || stop_desc[0] == '\0') + if (stop_desc == nullptr || stop_desc[0] == '\0') { static char signal_desc[] = "signal"; stop_desc = signal_desc; @@ -501,7 +501,7 @@ SBThread::GetName () const { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char *name = NULL; + const char *name = nullptr; Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); @@ -531,7 +531,7 @@ const char * SBThread::GetQueueName () const { - const char *name = NULL; + const char *name = nullptr; Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); @@ -610,7 +610,7 @@ // User level plans should be Master Plans so they can be interrupted, other plans executed, and // then a "continue" will resume the plan. - if (new_plan != NULL) + if (new_plan != nullptr) { new_plan->SetIsMasterPlan(true); new_plan->SetOkayToDiscard(false); @@ -625,7 +625,7 @@ // If we are doing synchronous mode, then wait for the // process to stop yet again! if (process->GetTarget().GetDebugger().GetAsyncExecution () == false) - process->WaitForProcessToStop (NULL); + process->WaitForProcessToStop (nullptr); } return sb_error; @@ -680,7 +680,7 @@ void SBThread::StepInto (lldb::RunMode stop_other_threads) { - StepInto (NULL, stop_other_threads); + StepInto (nullptr, stop_other_threads); } void @@ -752,7 +752,7 @@ const LazyBool avoid_no_debug = eLazyBoolCalculate; ThreadPlanSP new_plan_sp(thread->QueueThreadPlanForStepOut (abort_other_plans, - NULL, + nullptr, false, stop_other_threads, eVoteYes, @@ -791,7 +791,7 @@ Thread *thread = exe_ctx.GetThreadPtr(); ThreadPlanSP new_plan_sp(thread->QueueThreadPlanForStepOut (abort_other_plans, - NULL, + nullptr, false, stop_other_threads, eVoteYes, @@ -912,7 +912,7 @@ eSymbolContextLineEntry | eSymbolContextSymbol ); - if (frame_sc.comp_unit == NULL) + if (frame_sc.comp_unit == nullptr) { sb_error.SetErrorStringWithFormat("frame %u doesn't have debug information", frame_sp->GetFrameIndex()); return sb_error; @@ -1309,7 +1309,7 @@ bool SBThread::EventIsThreadEvent (const SBEvent &event) { - return Thread::ThreadEventData::GetEventDataFromEvent(event.get()) != NULL; + return Thread::ThreadEventData::GetEventDataFromEvent(event.get()) != nullptr; } SBFrame @@ -1402,7 +1402,7 @@ if (log) { const char *queue_name = new_thread_sp->GetQueueName(); - if (queue_name == NULL) + if (queue_name == nullptr) queue_name = ""; log->Printf ("SBThread(%p)::GetExtendedBacktraceThread() => new extended Thread created (%p) with queue_id 0x%" PRIx64 " queue name '%s'", static_cast(exe_ctx.GetThreadPtr()), Index: source/API/SBType.cpp =================================================================== --- source/API/SBType.cpp +++ source/API/SBType.cpp @@ -110,7 +110,7 @@ TypeImpl & SBType::ref () { - if (m_opaque_sp.get() == NULL) + if (m_opaque_sp.get() == nullptr) m_opaque_sp.reset (new TypeImpl()); return *m_opaque_sp; } @@ -128,7 +128,7 @@ bool SBType::IsValid() const { - if (m_opaque_sp.get() == NULL) + if (m_opaque_sp.get() == nullptr) return false; return m_opaque_sp->IsValid(); @@ -469,7 +469,7 @@ bool SBTypeList::IsValid () { - return (m_opaque_ap.get() != NULL); + return (m_opaque_ap.get() != nullptr); } SBTypeList& @@ -550,7 +550,7 @@ { if (m_opaque_ap.get()) return m_opaque_ap->GetName().GetCString(); - return NULL; + return nullptr; } SBType @@ -642,7 +642,7 @@ TypeMemberImpl & SBTypeMember::ref () { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset (new TypeMemberImpl()); return *m_opaque_ap.get(); } Index: source/API/SBTypeCategory.cpp =================================================================== --- source/API/SBTypeCategory.cpp +++ source/API/SBTypeCategory.cpp @@ -51,7 +51,7 @@ bool SBTypeCategory::IsValid() const { - return (m_opaque_sp.get() != NULL); + return (m_opaque_sp.get() != nullptr); } bool @@ -77,7 +77,7 @@ SBTypeCategory::GetName() { if (!IsValid()) - return NULL; + return nullptr; return m_opaque_sp->GetName(); } Index: source/API/SBTypeFilter.cpp =================================================================== --- source/API/SBTypeFilter.cpp +++ source/API/SBTypeFilter.cpp @@ -40,7 +40,7 @@ bool SBTypeFilter::IsValid() const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } uint32_t @@ -96,7 +96,7 @@ item++; return item; } - return NULL; + return nullptr; } bool Index: source/API/SBTypeFormat.cpp =================================================================== --- source/API/SBTypeFormat.cpp +++ source/API/SBTypeFormat.cpp @@ -47,7 +47,7 @@ bool SBTypeFormat::IsValid() const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } lldb::Format Index: source/API/SBTypeNameSpecifier.cpp =================================================================== --- source/API/SBTypeNameSpecifier.cpp +++ source/API/SBTypeNameSpecifier.cpp @@ -28,7 +28,7 @@ bool is_regex) : m_opaque_sp(new TypeNameSpecifierImpl(name, is_regex)) { - if (name == NULL || (*name) == 0) + if (name == nullptr || (*name) == 0) m_opaque_sp.reset(); } @@ -50,14 +50,14 @@ bool SBTypeNameSpecifier::IsValid() const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } const char* SBTypeNameSpecifier::GetName () { if (!IsValid()) - return NULL; + return nullptr; return m_opaque_sp->GetName(); } @@ -118,7 +118,7 @@ if (IsRegex() != rhs.IsRegex()) return false; - if (GetName() == NULL || rhs.GetName() == NULL) + if (GetName() == nullptr || rhs.GetName() == nullptr) return false; return (strcmp(GetName(), rhs.GetName()) == 0); Index: source/API/SBTypeSummary.cpp =================================================================== --- source/API/SBTypeSummary.cpp +++ source/API/SBTypeSummary.cpp @@ -64,7 +64,7 @@ bool SBTypeSummary::IsValid() const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } bool @@ -111,9 +111,9 @@ SBTypeSummary::GetData () { if (!IsValid()) - return NULL; + return nullptr; if (m_opaque_sp->GetType() == lldb_private::TypeSummaryImpl::eTypeCallback) - return NULL; + return nullptr; if (m_opaque_sp->IsScripted()) { ScriptSummaryFormat* script_summary_ptr = (ScriptSummaryFormat*)m_opaque_sp.get(); @@ -235,7 +235,7 @@ if (IsFunctionName() != rhs.IsFunctionName()) return false; - if ( GetData() == NULL || rhs.GetData() == NULL || strcmp(GetData(), rhs.GetData()) ) + if ( GetData() == nullptr || rhs.GetData() == nullptr || strcmp(GetData(), rhs.GetData()) ) return false; return GetOptions() == rhs.GetOptions(); Index: source/API/SBTypeSynthetic.cpp =================================================================== --- source/API/SBTypeSynthetic.cpp +++ source/API/SBTypeSynthetic.cpp @@ -53,7 +53,7 @@ bool SBTypeSynthetic::IsValid() const { - return m_opaque_sp.get() != NULL; + return m_opaque_sp.get() != nullptr; } bool @@ -77,7 +77,7 @@ SBTypeSynthetic::GetData () { if (!IsValid()) - return NULL; + return nullptr; if (IsClassCode()) return m_opaque_sp->GetPythonCode(); else Index: source/API/SBValue.cpp =================================================================== --- source/API/SBValue.cpp +++ source/API/SBValue.cpp @@ -62,7 +62,7 @@ ValueImpl (lldb::ValueObjectSP in_valobj_sp, lldb::DynamicValueType use_dynamic, bool use_synthetic, - const char *name = NULL) : + const char *name = nullptr) : m_valobj_sp(in_valobj_sp), m_use_dynamic(use_dynamic), m_use_synthetic(use_synthetic), @@ -96,7 +96,7 @@ bool IsValid () { - if (m_valobj_sp.get() == NULL) + if (m_valobj_sp.get() == nullptr) return false; else { @@ -296,7 +296,7 @@ // If this function ever changes to anything that does more than just // check if the opaque shared pointer is non NULL, then we need to update // all "if (m_opaque_sp)" code in this file. - return m_opaque_sp.get() != NULL && m_opaque_sp->IsValid() && m_opaque_sp->GetRootSP().get() != NULL; + return m_opaque_sp.get() != nullptr && m_opaque_sp->IsValid() && m_opaque_sp->GetRootSP().get() != nullptr; } void @@ -333,7 +333,7 @@ const char * SBValue::GetName() { - const char *name = NULL; + const char *name = nullptr; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -357,7 +357,7 @@ SBValue::GetTypeName () { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char *name = NULL; + const char *name = nullptr; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -424,7 +424,7 @@ { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char *cstr = NULL; + const char *cstr = nullptr; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -499,7 +499,7 @@ SBValue::GetObjectDescription () { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char *cstr = NULL; + const char *cstr = nullptr; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -567,7 +567,7 @@ SBValue::GetSummary () { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char *cstr = NULL; + const char *cstr = nullptr; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -591,7 +591,7 @@ SBValue::GetLocation () { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - const char *cstr = NULL; + const char *cstr = nullptr; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -1260,7 +1260,7 @@ lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) return value_sp->GetClangType().GetOpaqueQualType(); - return NULL; + return nullptr; } lldb::SBTarget @@ -1276,7 +1276,7 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) { - if (target_sp.get() == NULL) + if (target_sp.get() == nullptr) log->Printf ("SBValue(%p)::GetTarget () => NULL", static_cast(m_opaque_sp.get())); else @@ -1300,7 +1300,7 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) { - if (process_sp.get() == NULL) + if (process_sp.get() == nullptr) log->Printf ("SBValue(%p)::GetProcess () => NULL", static_cast(m_opaque_sp.get())); else @@ -1324,7 +1324,7 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) { - if (thread_sp.get() == NULL) + if (thread_sp.get() == nullptr) log->Printf ("SBValue(%p)::GetThread () => NULL", static_cast(m_opaque_sp.get())); else @@ -1348,7 +1348,7 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) { - if (frame_sp.get() == NULL) + if (frame_sp.get() == nullptr) log->Printf ("SBValue(%p)::GetFrame () => NULL", static_cast(m_opaque_sp.get())); else Index: source/API/SBValueList.cpp =================================================================== --- source/API/SBValueList.cpp +++ source/API/SBValueList.cpp @@ -99,7 +99,7 @@ if (log) { log->Printf ("SBValueList::SBValueList (rhs.ap=%p) => this.ap = %p", - static_cast(rhs.IsValid() ? rhs.m_opaque_ap.get() : NULL), + static_cast(rhs.IsValid() ? rhs.m_opaque_ap.get() : nullptr), static_cast(m_opaque_ap.get())); } } @@ -127,7 +127,7 @@ bool SBValueList::IsValid () const { - return (m_opaque_ap.get() != NULL); + return (m_opaque_ap.get() != nullptr); } void @@ -247,7 +247,7 @@ void SBValueList::CreateIfNeeded () { - if (m_opaque_ap.get() == NULL) + if (m_opaque_ap.get() == nullptr) m_opaque_ap.reset (new ValueListImpl()); } Index: source/API/SBWatchpoint.cpp =================================================================== --- source/API/SBWatchpoint.cpp +++ source/API/SBWatchpoint.cpp @@ -228,7 +228,7 @@ Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); return watchpoint_sp->GetConditionText (); } - return NULL; + return nullptr; } void @@ -281,7 +281,7 @@ bool SBWatchpoint::EventIsWatchpointEvent (const lldb::SBEvent &event) { - return Watchpoint::WatchpointEventData::GetEventDataFromEvent(event.get()) != NULL; + return Watchpoint::WatchpointEventData::GetEventDataFromEvent(event.get()) != nullptr; } Index: source/Breakpoint/Breakpoint.cpp =================================================================== --- source/Breakpoint/Breakpoint.cpp +++ source/Breakpoint/Breakpoint.cpp @@ -226,7 +226,7 @@ lldb::tid_t Breakpoint::GetThreadID () const { - if (m_options.GetThreadSpecNoCreate() == NULL) + if (m_options.GetThreadSpecNoCreate() == nullptr) return LLDB_INVALID_THREAD_ID; else return m_options.GetThreadSpecNoCreate()->GetTID(); @@ -245,7 +245,7 @@ uint32_t Breakpoint::GetThreadIndex() const { - if (m_options.GetThreadSpecNoCreate() == NULL) + if (m_options.GetThreadSpecNoCreate() == nullptr) return 0; else return m_options.GetThreadSpecNoCreate()->GetIndex(); @@ -254,7 +254,7 @@ void Breakpoint::SetThreadName (const char *thread_name) { - if (m_options.GetThreadSpec()->GetName() != NULL + if (m_options.GetThreadSpec()->GetName() != nullptr && ::strcmp (m_options.GetThreadSpec()->GetName(), thread_name) == 0) return; @@ -265,8 +265,8 @@ const char * Breakpoint::GetThreadName () const { - if (m_options.GetThreadSpecNoCreate() == NULL) - return NULL; + if (m_options.GetThreadSpecNoCreate() == nullptr) + return nullptr; else return m_options.GetThreadSpecNoCreate()->GetName(); } @@ -274,7 +274,7 @@ void Breakpoint::SetQueueName (const char *queue_name) { - if (m_options.GetThreadSpec()->GetQueueName() != NULL + if (m_options.GetThreadSpec()->GetQueueName() != nullptr && ::strcmp (m_options.GetThreadSpec()->GetQueueName(), queue_name) == 0) return; @@ -285,8 +285,8 @@ const char * Breakpoint::GetQueueName () const { - if (m_options.GetThreadSpecNoCreate() == NULL) - return NULL; + if (m_options.GetThreadSpecNoCreate() == nullptr) + return nullptr; else return m_options.GetThreadSpecNoCreate()->GetQueueName(); } @@ -454,7 +454,7 @@ removed_locations_event = new BreakpointEventData (eBreakpointEventTypeLocationsRemoved, shared_from_this()); else - removed_locations_event = NULL; + removed_locations_event = nullptr; size_t num_modules = module_list.GetSize(); for (size_t i = 0; i < num_modules; i++) @@ -537,7 +537,7 @@ void Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_locations) { - assert (s != NULL); + assert (s != nullptr); if (!m_kind_description.empty()) { @@ -692,7 +692,7 @@ Breakpoint::SendBreakpointChangedEvent (BreakpointEventData *data) { - if (data == NULL) + if (data == nullptr) return; if (!m_being_created @@ -755,7 +755,7 @@ if (event_data && event_data->GetFlavor() == BreakpointEventData::GetFlavorString()) return static_cast (event->GetData()); } - return NULL; + return nullptr; } BreakpointEventType @@ -763,7 +763,7 @@ { const BreakpointEventData *data = GetEventDataFromEvent (event_sp.get()); - if (data == NULL) + if (data == nullptr) return eBreakpointEventTypeInvalidType; else return data->GetBreakpointEventType(); Index: source/Breakpoint/BreakpointID.cpp =================================================================== --- source/Breakpoint/BreakpointID.cpp +++ source/Breakpoint/BreakpointID.cpp @@ -32,7 +32,7 @@ { } -const char *BreakpointID::g_range_specifiers[] = { "-", "to", "To", "TO", NULL }; +const char *BreakpointID::g_range_specifiers[] = { "-", "to", "To", "TO", nullptr }; // Tells whether or not STR is valid to use between two strings representing breakpoint IDs, to // indicate a range of breakpoint IDs. This is broken out into a separate function so that we can @@ -42,7 +42,7 @@ BreakpointID::IsRangeIdentifier (const char *str) { int specifier_count = 0; - for (int i = 0; g_range_specifiers[i] != NULL; ++i) + for (int i = 0; g_range_specifiers[i] != nullptr; ++i) ++specifier_count; for (int i = 0; i < specifier_count; ++i) @@ -98,7 +98,7 @@ *break_id_ptr = LLDB_INVALID_BREAK_ID; *break_loc_id_ptr = LLDB_INVALID_BREAK_ID; - if (input == NULL || *input == '\0') + if (input == nullptr || *input == '\0') return false; const char *format = "%i%n.%i%n"; Index: source/Breakpoint/BreakpointIDList.cpp =================================================================== --- source/Breakpoint/BreakpointIDList.cpp +++ source/Breakpoint/BreakpointIDList.cpp @@ -124,7 +124,7 @@ void BreakpointIDList::InsertStringArray (const char **string_array, size_t array_size, CommandReturnObject &result) { - if (string_array == NULL) + if (string_array == nullptr) return; for (uint32_t i = 0; i < array_size; ++i) @@ -360,7 +360,7 @@ *range_end_pos = 0; int specifiers_size = 0; - for (int i = 0; BreakpointID::g_range_specifiers[i] != NULL; ++i) + for (int i = 0; BreakpointID::g_range_specifiers[i] != nullptr; ++i) ++specifiers_size; for (int i = 0; i < specifiers_size && !is_range_expression; ++i) Index: source/Breakpoint/BreakpointLocation.cpp =================================================================== --- source/Breakpoint/BreakpointLocation.cpp +++ source/Breakpoint/BreakpointLocation.cpp @@ -94,7 +94,7 @@ { if (!m_owner.IsEnabled()) return false; - else if (m_options_ap.get() != NULL) + else if (m_options_ap.get() != nullptr) return m_options_ap->IsEnabled(); else return true; @@ -124,7 +124,7 @@ { // If we're resetting this to an invalid thread id, then // don't make an options pointer just to do that. - if (m_options_ap.get() != NULL) + if (m_options_ap.get() != nullptr) m_options_ap->SetThreadID (thread_id); } SendBreakpointLocationChangedEvent (eBreakpointEventTypeThreadChanged); @@ -148,7 +148,7 @@ { // If we're resetting this to an invalid thread id, then // don't make an options pointer just to do that. - if (m_options_ap.get() != NULL) + if (m_options_ap.get() != nullptr) m_options_ap->GetThreadSpec()->SetIndex(index); } SendBreakpointLocationChangedEvent (eBreakpointEventTypeThreadChanged); @@ -167,13 +167,13 @@ void BreakpointLocation::SetThreadName (const char *thread_name) { - if (thread_name != NULL) + if (thread_name != nullptr) GetLocationOptions()->GetThreadSpec()->SetName(thread_name); else { // If we're resetting this to an invalid thread id, then // don't make an options pointer just to do that. - if (m_options_ap.get() != NULL) + if (m_options_ap.get() != nullptr) m_options_ap->GetThreadSpec()->SetName(thread_name); } SendBreakpointLocationChangedEvent (eBreakpointEventTypeThreadChanged); @@ -185,19 +185,19 @@ if (GetOptionsNoCreate()->GetThreadSpecNoCreate()) return GetOptionsNoCreate()->GetThreadSpecNoCreate()->GetName(); else - return NULL; + return nullptr; } void BreakpointLocation::SetQueueName (const char *queue_name) { - if (queue_name != NULL) + if (queue_name != nullptr) GetLocationOptions()->GetThreadSpec()->SetQueueName(queue_name); else { // If we're resetting this to an invalid thread id, then // don't make an options pointer just to do that. - if (m_options_ap.get() != NULL) + if (m_options_ap.get() != nullptr) m_options_ap->GetThreadSpec()->SetQueueName(queue_name); } SendBreakpointLocationChangedEvent (eBreakpointEventTypeThreadChanged); @@ -209,13 +209,13 @@ if (GetOptionsNoCreate()->GetThreadSpecNoCreate()) return GetOptionsNoCreate()->GetThreadSpecNoCreate()->GetQueueName(); else - return NULL; + return nullptr; } bool BreakpointLocation::InvokeCallback (StoppointCallbackContext *context) { - if (m_options_ap.get() != NULL && m_options_ap->HasCallback()) + if (m_options_ap.get() != nullptr && m_options_ap->HasCallback()) return m_options_ap->InvokeCallback (context, m_owner.GetID(), GetID()); else return m_owner.InvokeCallback (context, GetID()); @@ -280,7 +280,7 @@ !m_user_expression_sp->MatchesContext(exe_ctx)) { m_user_expression_sp.reset(new ClangUserExpression(condition_text, - NULL, + nullptr, lldb::eLanguageTypeUnknown, ClangUserExpression::eResultTypeAny)); @@ -386,7 +386,7 @@ void BreakpointLocation::DecrementIgnoreCount() { - if (m_options_ap.get() != NULL) + if (m_options_ap.get() != nullptr) { uint32_t loc_ignore = m_options_ap->GetIgnoreCount(); if (loc_ignore != 0) @@ -397,7 +397,7 @@ bool BreakpointLocation::IgnoreCountShouldStop() { - if (m_options_ap.get() != NULL) + if (m_options_ap.get() != nullptr) { uint32_t loc_ignore = m_options_ap->GetIgnoreCount(); if (loc_ignore != 0) @@ -414,7 +414,7 @@ const BreakpointOptions * BreakpointLocation::GetOptionsNoCreate () const { - if (m_options_ap.get() != NULL) + if (m_options_ap.get() != nullptr) return m_options_ap.get(); else return m_owner.GetOptions (); @@ -426,7 +426,7 @@ // If we make the copy we don't copy the callbacks because that is potentially // expensive and we don't want to do that for the simple case where someone is // just disabling the location. - if (m_options_ap.get() == NULL) + if (m_options_ap.get() == nullptr) m_options_ap.reset(BreakpointOptions::CopyOptionsNoCallback(*m_owner.GetOptions ())); return m_options_ap.get(); @@ -477,7 +477,7 @@ bool BreakpointLocation::IsResolved () const { - return m_bp_site_sp.get() != NULL; + return m_bp_site_sp.get() != nullptr; } lldb::BreakpointSiteSP @@ -493,7 +493,7 @@ return true; Process *process = m_owner.GetTarget().GetProcessSP().get(); - if (process == NULL) + if (process == nullptr) return false; lldb::break_id_t new_id = process->CreateBreakpointSite (shared_from_this(), m_owner.IsHardware()); @@ -580,13 +580,13 @@ sc.module_sp->GetFileSpec().Dump (s); } - if (sc.comp_unit != NULL) + if (sc.comp_unit != nullptr) { s->EOL(); s->Indent("compile unit = "); static_cast(sc.comp_unit)->GetFilename().Dump (s); - if (sc.function != NULL) + if (sc.function != nullptr) { s->EOL(); s->Indent("function = "); @@ -627,11 +627,11 @@ s->Printf (", "); s->Printf ("address = "); - ExecutionContextScope *exe_scope = NULL; + ExecutionContextScope *exe_scope = nullptr; Target *target = &m_owner.GetTarget(); if (target) exe_scope = target->GetProcessSP().get(); - if (exe_scope == NULL) + if (exe_scope == nullptr) exe_scope = target; if (level == eDescriptionLevelInitial) @@ -689,7 +689,7 @@ void BreakpointLocation::Dump(Stream *s) const { - if (s == NULL) + if (s == nullptr) return; s->Printf("BreakpointLocation %u: tid = %4.4" PRIx64 " load addr = 0x%8.8" PRIx64 " state = %s type = %s breakpoint " Index: source/Breakpoint/BreakpointLocationList.cpp =================================================================== --- source/Breakpoint/BreakpointLocationList.cpp +++ source/Breakpoint/BreakpointLocationList.cpp @@ -32,7 +32,7 @@ m_address_to_location (), m_mutex (Mutex::eMutexTypeRecursive), m_next_id (0), - m_new_location_recorder (NULL) + m_new_location_recorder (nullptr) { } @@ -334,7 +334,7 @@ BreakpointLocationList::StartRecordingNewLocations (BreakpointLocationCollection &new_locations) { Mutex::Locker locker (m_mutex); - assert (m_new_location_recorder == NULL); + assert (m_new_location_recorder == nullptr); m_new_location_recorder = &new_locations; } @@ -342,6 +342,6 @@ BreakpointLocationList::StopRecordingNewLocations () { Mutex::Locker locker (m_mutex); - m_new_location_recorder = NULL; + m_new_location_recorder = nullptr; } Index: source/Breakpoint/BreakpointOptions.cpp =================================================================== --- source/Breakpoint/BreakpointOptions.cpp +++ source/Breakpoint/BreakpointOptions.cpp @@ -59,7 +59,7 @@ m_ignore_count (rhs.m_ignore_count), m_thread_spec_ap () { - if (rhs.m_thread_spec_ap.get() != NULL) + if (rhs.m_thread_spec_ap.get() != nullptr) m_thread_spec_ap.reset (new ThreadSpec(*rhs.m_thread_spec_ap.get())); m_condition_text = rhs.m_condition_text; m_condition_text_hash = rhs.m_condition_text_hash; @@ -77,7 +77,7 @@ m_enabled = rhs.m_enabled; m_one_shot = rhs.m_one_shot; m_ignore_count = rhs.m_ignore_count; - if (rhs.m_thread_spec_ap.get() != NULL) + if (rhs.m_thread_spec_ap.get() != nullptr) m_thread_spec_ap.reset(new ThreadSpec(*rhs.m_thread_spec_ap.get())); m_condition_text = rhs.m_condition_text; m_condition_text_hash = rhs.m_condition_text_hash; @@ -144,7 +144,7 @@ { if (m_callback && context->is_synchronous == IsCallbackSynchronous()) { - return m_callback (m_callback_baton_sp ? m_callback_baton_sp->m_data : NULL, + return m_callback (m_callback_baton_sp ? m_callback_baton_sp->m_data : nullptr, context, break_id, break_loc_id); @@ -182,7 +182,7 @@ } else { - return NULL; + return nullptr; } } @@ -195,7 +195,7 @@ ThreadSpec * BreakpointOptions::GetThreadSpec () { - if (m_thread_spec_ap.get() == NULL) + if (m_thread_spec_ap.get() == nullptr) m_thread_spec_ap.reset (new ThreadSpec()); return m_thread_spec_ap.get(); @@ -214,7 +214,7 @@ // Figure out if there are any options not at their default value, and only print // anything if there are: - if (m_ignore_count != 0 || !m_enabled || m_one_shot || (GetThreadSpecNoCreate() != NULL && GetThreadSpecNoCreate()->HasSpecification ())) + if (m_ignore_count != 0 || !m_enabled || m_one_shot || (GetThreadSpecNoCreate() != nullptr && GetThreadSpecNoCreate()->HasSpecification ())) { if (level == lldb::eDescriptionLevelVerbose) { Index: source/Breakpoint/BreakpointResolverAddress.cpp =================================================================== --- source/Breakpoint/BreakpointResolverAddress.cpp +++ source/Breakpoint/BreakpointResolverAddress.cpp @@ -74,7 +74,7 @@ bool containing ) { - assert (m_breakpoint != NULL); + assert (m_breakpoint != nullptr); if (filter.AddressPasses (m_addr)) { Index: source/Breakpoint/BreakpointResolverFileLine.cpp =================================================================== --- source/Breakpoint/BreakpointResolverFileLine.cpp +++ source/Breakpoint/BreakpointResolverFileLine.cpp @@ -58,7 +58,7 @@ { SymbolContextList sc_list; - assert (m_breakpoint != NULL); + assert (m_breakpoint != nullptr); // There is a tricky bit here. You can have two compilation units that #include the same file, and // in one of them the function at m_line_number is used (and so code and a line entry for it is generated) but in the Index: source/Breakpoint/BreakpointResolverFileRegex.cpp =================================================================== --- source/Breakpoint/BreakpointResolverFileRegex.cpp +++ source/Breakpoint/BreakpointResolverFileRegex.cpp @@ -51,7 +51,7 @@ ) { - assert (m_breakpoint != NULL); + assert (m_breakpoint != nullptr); if (!context.target_sp) return eCallbackReturnContinue; @@ -72,7 +72,7 @@ BreakpointResolver::SetSCMatchesByLine (filter, sc_list, skip_prologue, m_regex.GetText()); } - assert (m_breakpoint != NULL); + assert (m_breakpoint != nullptr); return Searcher::eCallbackReturnContinue; } Index: source/Breakpoint/BreakpointResolverName.cpp =================================================================== --- source/Breakpoint/BreakpointResolverName.cpp +++ source/Breakpoint/BreakpointResolverName.cpp @@ -88,7 +88,7 @@ RegularExpression &func_regex, bool skip_prologue) : BreakpointResolver (bkpt, BreakpointResolver::NameResolver), - m_class_name (NULL), + m_class_name (nullptr), m_regex (func_regex), m_match_type (Breakpoint::Regexp), m_skip_prologue (skip_prologue) @@ -161,7 +161,7 @@ if (!sc_list.GetContextAtIndex(i, sc)) break; ConstString full_name (sc.GetFunctionName()); - if (full_name && ::strstr(full_name.GetCString(), name.GetCString()) == NULL) + if (full_name && ::strstr(full_name.GetCString(), name.GetCString()) == nullptr) { sc_list.RemoveContextAtIndex(i); } @@ -193,7 +193,7 @@ uint32_t i; bool new_location; Address break_addr; - assert (m_breakpoint != NULL); + assert (m_breakpoint != nullptr); Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); @@ -217,7 +217,7 @@ { const size_t start_func_idx = func_list.GetSize(); context.module_sp->FindFunctions (lookup.lookup_name, - NULL, + nullptr, lookup.name_type_mask, include_symbols, include_inlines, Index: source/Breakpoint/BreakpointSite.cpp =================================================================== --- source/Breakpoint/BreakpointSite.cpp +++ source/Breakpoint/BreakpointSite.cpp @@ -79,7 +79,7 @@ void BreakpointSite::Dump(Stream *s) const { - if (s == NULL) + if (s == nullptr) return; s->Printf("BreakpointSite %u: addr = 0x%8.8" PRIx64 " type = %s breakpoint hw_index = %i hit_count = %-4u", Index: source/Breakpoint/StoppointCallbackContext.cpp =================================================================== --- source/Breakpoint/StoppointCallbackContext.cpp +++ source/Breakpoint/StoppointCallbackContext.cpp @@ -17,7 +17,7 @@ using namespace lldb_private; StoppointCallbackContext::StoppointCallbackContext() : - event (NULL), + event (nullptr), exe_ctx_ref (), is_synchronous (false) { @@ -33,7 +33,7 @@ void StoppointCallbackContext::Clear() { - event = NULL; + event = nullptr; exe_ctx_ref.Clear(); is_synchronous = false; } Index: source/Breakpoint/Watchpoint.cpp =================================================================== --- source/Breakpoint/Watchpoint.cpp +++ source/Breakpoint/Watchpoint.cpp @@ -232,7 +232,7 @@ void Watchpoint::DumpWithLevel(Stream *s, lldb::DescriptionLevel description_level) const { - if (s == NULL) + if (s == nullptr) return; assert(description_level >= lldb::eDescriptionLevelBrief && @@ -363,7 +363,7 @@ void Watchpoint::SetCondition (const char *condition) { - if (condition == NULL || condition[0] == '\0') + if (condition == nullptr || condition[0] == '\0') { if (m_condition_ap.get()) m_condition_ap.reset(); @@ -371,7 +371,7 @@ else { // Pass NULL for expr_prefix (no translation-unit level definitions). - m_condition_ap.reset(new ClangUserExpression (condition, NULL, lldb::eLanguageTypeUnknown, ClangUserExpression::eResultTypeAny)); + m_condition_ap.reset(new ClangUserExpression (condition, nullptr, lldb::eLanguageTypeUnknown, ClangUserExpression::eResultTypeAny)); } SendWatchpointChangedEvent (eWatchpointEventTypeConditionChanged); } @@ -382,7 +382,7 @@ if (m_condition_ap.get()) return m_condition_ap->GetUserText(); else - return NULL; + return nullptr; } void @@ -400,7 +400,7 @@ Watchpoint::SendWatchpointChangedEvent (WatchpointEventData *data) { - if (data == NULL) + if (data == nullptr) return; if (!m_being_created @@ -462,7 +462,7 @@ if (event_data && event_data->GetFlavor() == WatchpointEventData::GetFlavorString()) return static_cast (event->GetData()); } - return NULL; + return nullptr; } WatchpointEventType @@ -470,7 +470,7 @@ { const WatchpointEventData *data = GetEventDataFromEvent (event_sp.get()); - if (data == NULL) + if (data == nullptr) return eWatchpointEventTypeInvalidType; else return data->GetWatchpointEventType(); Index: source/Breakpoint/WatchpointOptions.cpp =================================================================== --- source/Breakpoint/WatchpointOptions.cpp +++ source/Breakpoint/WatchpointOptions.cpp @@ -51,7 +51,7 @@ m_callback_is_synchronous (rhs.m_callback_is_synchronous), m_thread_spec_ap () { - if (rhs.m_thread_spec_ap.get() != NULL) + if (rhs.m_thread_spec_ap.get() != nullptr) m_thread_spec_ap.reset (new ThreadSpec(*rhs.m_thread_spec_ap.get())); } @@ -64,7 +64,7 @@ m_callback = rhs.m_callback; m_callback_baton_sp = rhs.m_callback_baton_sp; m_callback_is_synchronous = rhs.m_callback_is_synchronous; - if (rhs.m_thread_spec_ap.get() != NULL) + if (rhs.m_thread_spec_ap.get() != nullptr) m_thread_spec_ap.reset(new ThreadSpec(*rhs.m_thread_spec_ap.get())); return *this; } @@ -128,7 +128,7 @@ { if (m_callback && context->is_synchronous == IsCallbackSynchronous()) { - return m_callback (m_callback_baton_sp ? m_callback_baton_sp->m_data : NULL, + return m_callback (m_callback_baton_sp ? m_callback_baton_sp->m_data : nullptr, context, watch_id); } @@ -151,7 +151,7 @@ ThreadSpec * WatchpointOptions::GetThreadSpec () { - if (m_thread_spec_ap.get() == NULL) + if (m_thread_spec_ap.get() == nullptr) m_thread_spec_ap.reset (new ThreadSpec()); return m_thread_spec_ap.get(); @@ -179,7 +179,7 @@ // Figure out if there are any options not at their default value, and only print // anything if there are: - if ((GetThreadSpecNoCreate() != NULL && GetThreadSpecNoCreate()->HasSpecification ())) + if ((GetThreadSpecNoCreate() != nullptr && GetThreadSpecNoCreate()->HasSpecification ())) { if (level == lldb::eDescriptionLevelVerbose) { Index: source/Commands/CommandCompletions.cpp =================================================================== --- source/Commands/CommandCompletions.cpp +++ source/Commands/CommandCompletions.cpp @@ -35,7 +35,7 @@ CommandCompletions::CommonCompletionElement CommandCompletions::g_common_completions[] = { - {eCustomCompletion, NULL}, + {eCustomCompletion, nullptr}, {eSourceFileCompletion, CommandCompletions::SourceFiles}, {eDiskFileCompletion, CommandCompletions::DiskFiles}, {eDiskDirectoryCompletion, CommandCompletions::DiskDirectories}, @@ -45,7 +45,7 @@ {ePlatformPluginCompletion, CommandCompletions::PlatformPluginNames}, {eArchitectureCompletion, CommandCompletions::ArchitectureNames}, {eVariablePathCompletion, CommandCompletions::VariablePath}, - {eNoCompletion, NULL} // This one has to be last in the list. + {eNoCompletion, nullptr} // This one has to be last in the list. }; bool @@ -71,7 +71,7 @@ if (g_common_completions[i].type == eNoCompletion) break; else if ((g_common_completions[i].type & completion_mask) == g_common_completions[i].type - && g_common_completions[i].callback != NULL) + && g_common_completions[i].callback != nullptr) { handled = true; g_common_completions[i].callback (interpreter, @@ -107,7 +107,7 @@ max_return_elements, matches); - if (searcher == NULL) + if (searcher == nullptr) { lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget(); SearchFilter null_searcher (target_sp); @@ -223,7 +223,7 @@ // This will store the resolved form of the containing directory char containing_part[PATH_MAX]; - if (end_ptr == NULL) + if (end_ptr == nullptr) { // There's no directory. If the thing begins with a "~" then this is a bare // user name. @@ -379,7 +379,7 @@ max_return_elements, matches); - if (searcher == NULL) + if (searcher == nullptr) { lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget(); SearchFilter null_searcher (target_sp); @@ -410,7 +410,7 @@ max_return_elements, matches); - if (searcher == NULL) + if (searcher == nullptr) { lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget(); SearchFilter null_searcher (target_sp); @@ -441,7 +441,7 @@ if (properties_sp) { StreamString strm; - properties_sp->DumpValue(NULL, strm, OptionValue::eDumpOptionName); + properties_sp->DumpValue(nullptr, strm, OptionValue::eDumpOptionName); const std::string &str = strm.GetString(); g_property_names.SplitIntoLines(str.c_str(), str.size()); } @@ -553,7 +553,7 @@ bool complete ) { - if (context.comp_unit != NULL) + if (context.comp_unit != nullptr) { if (m_include_support_files) { Index: source/Commands/CommandObjectApropos.cpp =================================================================== --- source/Commands/CommandObjectApropos.cpp +++ source/Commands/CommandObjectApropos.cpp @@ -32,7 +32,7 @@ CommandObjectParsed (interpreter, "apropos", "Find a list of debugger commands related to a particular word/subject.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData search_word_arg; @@ -61,7 +61,7 @@ if (argc == 1) { const char *search_word = args.GetArgumentAtIndex(0); - if ((search_word != NULL) + if ((search_word != nullptr) && (strlen (search_word) > 0)) { // The bulk of the work must be done inside the Command Interpreter, since the command dictionary Index: source/Commands/CommandObjectArgs.cpp =================================================================== --- source/Commands/CommandObjectArgs.cpp +++ source/Commands/CommandObjectArgs.cpp @@ -266,7 +266,7 @@ OptionDefinition CommandObjectArgs::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "debug", 'g', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Enable verbose debug logging of the expression parsing and evaluation."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_1, false, "debug", 'g', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Enable verbose debug logging of the expression parsing and evaluation."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; Index: source/Commands/CommandObjectBreakpoint.cpp =================================================================== --- source/Commands/CommandObjectBreakpoint.cpp +++ source/Commands/CommandObjectBreakpoint.cpp @@ -365,7 +365,7 @@ CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. Must set target before setting breakpoints (see 'target create' command)."); result.SetStatus (eReturnStatusFailed); @@ -395,7 +395,7 @@ else if (m_options.m_language != eLanguageTypeUnknown) break_type = eSetTypeException; - Breakpoint *bp = NULL; + Breakpoint *bp = nullptr; FileSpec module_spec; const bool internal = false; @@ -582,7 +582,7 @@ if (!target->GetSourceManager().GetDefaultFileAndLine(file, default_line)) { StackFrame *cur_frame = m_exe_ctx.GetFramePtr(); - if (cur_frame == NULL) + if (cur_frame == nullptr) { result.AppendError ("No selected frame to use to find the default file."); result.SetStatus (eReturnStatusFailed); @@ -623,41 +623,41 @@ OptionDefinition CommandObjectBreakpointSet::CommandOptions::g_option_table[] = { - { LLDB_OPT_NOT_10, false, "shlib", 's', OptionParser::eRequiredArgument, NULL, CommandCompletions::eModuleCompletion, eArgTypeShlibName, + { LLDB_OPT_NOT_10, false, "shlib", 's', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eModuleCompletion, eArgTypeShlibName, "Set the breakpoint only in this shared library. " "Can repeat this option multiple times to specify multiple shared libraries."}, - { LLDB_OPT_SET_ALL, false, "ignore-count", 'i', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCount, + { LLDB_OPT_SET_ALL, false, "ignore-count", 'i', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCount, "Set the number of times this breakpoint is skipped before stopping." }, - { LLDB_OPT_SET_ALL, false, "one-shot", 'o', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_ALL, false, "one-shot", 'o', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "The breakpoint is deleted the first time it causes a stop." }, - { LLDB_OPT_SET_ALL, false, "condition", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeExpression, + { LLDB_OPT_SET_ALL, false, "condition", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeExpression, "The breakpoint stops only if this condition expression evaluates to true."}, - { LLDB_OPT_SET_ALL, false, "thread-index", 'x', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadIndex, + { LLDB_OPT_SET_ALL, false, "thread-index", 'x', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadIndex, "The breakpoint stops only for the thread whose indeX matches this argument."}, - { LLDB_OPT_SET_ALL, false, "thread-id", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadID, + { LLDB_OPT_SET_ALL, false, "thread-id", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadID, "The breakpoint stops only for the thread whose TID matches this argument."}, - { LLDB_OPT_SET_ALL, false, "thread-name", 'T', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadName, + { LLDB_OPT_SET_ALL, false, "thread-name", 'T', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadName, "The breakpoint stops only for the thread whose thread name matches this argument."}, - { LLDB_OPT_SET_ALL, false, "hardware", 'H', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_ALL, false, "hardware", 'H', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Require the breakpoint to use hardware breakpoints."}, - { LLDB_OPT_SET_ALL, false, "queue-name", 'q', OptionParser::eRequiredArgument, NULL, 0, eArgTypeQueueName, + { LLDB_OPT_SET_ALL, false, "queue-name", 'q', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeQueueName, "The breakpoint stops only for threads in the queue whose name is given by this argument."}, - { LLDB_OPT_FILE, false, "file", 'f', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, + { LLDB_OPT_FILE, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "Specifies the source file in which to set this breakpoint. " "Note, by default lldb only looks for files that are #included if they use the standard include file extensions. " "To set breakpoints on .c/.cpp/.m/.mm files that are #included, set target.inline-breakpoint-strategy" " to \"always\"."}, - { LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLineNum, + { LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLineNum, "Specifies the line number on which to set this breakpoint."}, // Comment out this option for the moment, as we don't actually use it, but will in the future. @@ -665,48 +665,48 @@ // { 0, false, "column", 'C', OptionParser::eRequiredArgument, NULL, "", // "Set the breakpoint by source location at this particular column."}, - { LLDB_OPT_SET_2, true, "address", 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeAddressOrExpression, + { LLDB_OPT_SET_2, true, "address", 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeAddressOrExpression, "Set the breakpoint by address, at the specified address."}, - { LLDB_OPT_SET_3, true, "name", 'n', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, + { LLDB_OPT_SET_3, true, "name", 'n', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, "Set the breakpoint by function name. Can be repeated multiple times to make one breakpoint for multiple names" }, - { LLDB_OPT_SET_4, true, "fullname", 'F', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSymbolCompletion, eArgTypeFullName, + { LLDB_OPT_SET_4, true, "fullname", 'F', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSymbolCompletion, eArgTypeFullName, "Set the breakpoint by fully qualified function names. For C++ this means namespaces and all arguments, and " "for Objective C this means a full function prototype with class and selector. " "Can be repeated multiple times to make one breakpoint for multiple names." }, - { LLDB_OPT_SET_5, true, "selector", 'S', OptionParser::eRequiredArgument, NULL, 0, eArgTypeSelector, + { LLDB_OPT_SET_5, true, "selector", 'S', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeSelector, "Set the breakpoint by ObjC selector name. Can be repeated multiple times to make one breakpoint for multiple Selectors." }, - { LLDB_OPT_SET_6, true, "method", 'M', OptionParser::eRequiredArgument, NULL, 0, eArgTypeMethod, + { LLDB_OPT_SET_6, true, "method", 'M', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeMethod, "Set the breakpoint by C++ method names. Can be repeated multiple times to make one breakpoint for multiple methods." }, - { LLDB_OPT_SET_7, true, "func-regex", 'r', OptionParser::eRequiredArgument, NULL, 0, eArgTypeRegularExpression, + { LLDB_OPT_SET_7, true, "func-regex", 'r', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeRegularExpression, "Set the breakpoint by function name, evaluating a regular-expression to find the function name(s)." }, - { LLDB_OPT_SET_8, true, "basename", 'b', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, + { LLDB_OPT_SET_8, true, "basename", 'b', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, "Set the breakpoint by function basename (C++ namespaces and arguments will be ignored). " "Can be repeated multiple times to make one breakpoint for multiple symbols." }, - { LLDB_OPT_SET_9, true, "source-pattern-regexp", 'p', OptionParser::eRequiredArgument, NULL, 0, eArgTypeRegularExpression, + { LLDB_OPT_SET_9, true, "source-pattern-regexp", 'p', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeRegularExpression, "Set the breakpoint by specifying a regular expression which is matched against the source text in a source file or files " "specified with the -f option. The -f option can be specified more than once. " "If no source files are specified, uses the current \"default source file\"" }, - { LLDB_OPT_SET_10, true, "language-exception", 'E', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLanguage, + { LLDB_OPT_SET_10, true, "language-exception", 'E', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLanguage, "Set the breakpoint on exceptions thrown by the specified language (without options, on throw but not catch.)" }, - { LLDB_OPT_SET_10, false, "on-throw", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, + { LLDB_OPT_SET_10, false, "on-throw", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Set the breakpoint on exception throW." }, - { LLDB_OPT_SET_10, false, "on-catch", 'h', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, + { LLDB_OPT_SET_10, false, "on-catch", 'h', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Set the breakpoint on exception catcH." }, - { LLDB_OPT_SKIP_PROLOGUE, false, "skip-prologue", 'K', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, + { LLDB_OPT_SKIP_PROLOGUE, false, "skip-prologue", 'K', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "sKip the prologue if the breakpoint is at the beginning of a function. If not set the target.skip-prologue setting is used." }, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -724,7 +724,7 @@ "Modify the options on a breakpoint or set of breakpoints in the executable. " "If no breakpoint is specified, acts on the last created breakpoint. " "With the exception of -e, -d and -i, passing an empty argument clears the modification.", - NULL), + nullptr), m_options (interpreter) { CommandArgumentEntry arg; @@ -779,7 +779,7 @@ switch (short_option) { case 'c': - if (option_arg != NULL) + if (option_arg != nullptr) m_condition.assign (option_arg); else m_condition.clear(); @@ -831,14 +831,14 @@ } break; case 'T': - if (option_arg != NULL) + if (option_arg != nullptr) m_thread_name.assign (option_arg); else m_thread_name.clear(); m_name_passed = true; break; case 'q': - if (option_arg != NULL) + if (option_arg != nullptr) m_queue_name.assign (option_arg); else m_queue_name.clear(); @@ -923,7 +923,7 @@ DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. No existing target or breakpoints."); result.SetStatus (eReturnStatusFailed); @@ -1012,16 +1012,16 @@ OptionDefinition CommandObjectBreakpointModify::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "ignore-count", 'i', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCount, "Set the number of times this breakpoint is skipped before stopping." }, -{ LLDB_OPT_SET_ALL, false, "one-shot", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "The breakpoint is deleted the first time it stop causes a stop." }, -{ LLDB_OPT_SET_ALL, false, "thread-index", 'x', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadIndex, "The breakpoint stops only for the thread whose index matches this argument."}, -{ LLDB_OPT_SET_ALL, false, "thread-id", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadID, "The breakpoint stops only for the thread whose TID matches this argument."}, -{ LLDB_OPT_SET_ALL, false, "thread-name", 'T', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadName, "The breakpoint stops only for the thread whose thread name matches this argument."}, -{ LLDB_OPT_SET_ALL, false, "queue-name", 'q', OptionParser::eRequiredArgument, NULL, 0, eArgTypeQueueName, "The breakpoint stops only for threads in the queue whose name is given by this argument."}, -{ LLDB_OPT_SET_ALL, false, "condition", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeExpression, "The breakpoint stops only if this condition expression evaluates to true."}, -{ LLDB_OPT_SET_1, false, "enable", 'e', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Enable the breakpoint."}, -{ LLDB_OPT_SET_2, false, "disable", 'd', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Disable the breakpoint."}, -{ 0, false, NULL, 0 , 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_ALL, false, "ignore-count", 'i', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCount, "Set the number of times this breakpoint is skipped before stopping." }, +{ LLDB_OPT_SET_ALL, false, "one-shot", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "The breakpoint is deleted the first time it stop causes a stop." }, +{ LLDB_OPT_SET_ALL, false, "thread-index", 'x', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadIndex, "The breakpoint stops only for the thread whose index matches this argument."}, +{ LLDB_OPT_SET_ALL, false, "thread-id", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadID, "The breakpoint stops only for the thread whose TID matches this argument."}, +{ LLDB_OPT_SET_ALL, false, "thread-name", 'T', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadName, "The breakpoint stops only for the thread whose thread name matches this argument."}, +{ LLDB_OPT_SET_ALL, false, "queue-name", 'q', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeQueueName, "The breakpoint stops only for threads in the queue whose name is given by this argument."}, +{ LLDB_OPT_SET_ALL, false, "condition", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeExpression, "The breakpoint stops only if this condition expression evaluates to true."}, +{ LLDB_OPT_SET_1, false, "enable", 'e', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Enable the breakpoint."}, +{ LLDB_OPT_SET_2, false, "disable", 'd', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Disable the breakpoint."}, +{ 0, false, nullptr, 0 , 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1036,7 +1036,7 @@ CommandObjectParsed (interpreter, "enable", "Enable the specified disabled breakpoint(s). If no breakpoints are specified, enable all of them.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID, eArgTypeBreakpointIDRange); @@ -1053,7 +1053,7 @@ DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. No existing target or breakpoints."); result.SetStatus (eReturnStatusFailed); @@ -1136,7 +1136,7 @@ CommandObjectParsed (interpreter, "breakpoint disable", "Disable the specified breakpoint(s) without removing it/them. If no breakpoints are specified, disable them all.", - NULL) + nullptr) { SetHelpLong( "Disable the specified breakpoint(s) without removing it/them. \n\ @@ -1173,7 +1173,7 @@ DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. No existing target or breakpoints."); result.SetStatus (eReturnStatusFailed); @@ -1257,7 +1257,7 @@ CommandObjectParsed (interpreter, "breakpoint list", "List some or all breakpoints at configurable levels of detail.", - NULL), + nullptr), m_options (interpreter) { CommandArgumentEntry arg; @@ -1354,7 +1354,7 @@ DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. No current target or breakpoints."); result.SetStatus (eReturnStatusSuccessFinishNoResult); @@ -1421,21 +1421,21 @@ OptionDefinition CommandObjectBreakpointList::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "internal", 'i', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_ALL, false, "internal", 'i', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Show debugger internal breakpoints" }, - { LLDB_OPT_SET_1, false, "brief", 'b', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_1, false, "brief", 'b', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Give a brief description of the breakpoint (no location info)."}, // FIXME: We need to add an "internal" command, and then add this sort of thing to it. // But I need to see it for now, and don't want to wait. - { LLDB_OPT_SET_2, false, "full", 'f', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_2, false, "full", 'f', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Give a full description of the breakpoint and its locations."}, - { LLDB_OPT_SET_3, false, "verbose", 'v', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_3, false, "verbose", 'v', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Explain everything we know about the breakpoint (for debugging debugger bugs)." }, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1538,7 +1538,7 @@ DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. No existing target or breakpoints."); result.SetStatus (eReturnStatusFailed); @@ -1632,13 +1632,13 @@ OptionDefinition CommandObjectBreakpointClear::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, + { LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "Specify the breakpoint by source location in this particular file."}, - { LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLineNum, + { LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLineNum, "Specify the breakpoint by source location at this particular line."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1653,7 +1653,7 @@ CommandObjectParsed (interpreter, "breakpoint delete", "Delete the specified breakpoint(s). If no breakpoints are specified, delete them all.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID, eArgTypeBreakpointIDRange); @@ -1669,7 +1669,7 @@ DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. No existing target or breakpoints."); result.SetStatus (eReturnStatusFailed); @@ -1840,7 +1840,7 @@ { BreakpointID cur_bp_id = valid_ids->GetBreakpointIDAtIndex (i); Breakpoint *breakpoint = target->GetBreakpointByID (cur_bp_id.GetBreakpointID()).get(); - if (breakpoint != NULL) + if (breakpoint != nullptr) { const size_t num_locations = breakpoint->GetNumLocations(); if (static_cast(cur_bp_id.GetLocationID()) > num_locations) Index: source/Commands/CommandObjectBreakpointCommand.cpp =================================================================== --- source/Commands/CommandObjectBreakpointCommand.cpp +++ source/Commands/CommandObjectBreakpointCommand.cpp @@ -45,7 +45,7 @@ CommandObjectParsed (interpreter, "add", "Add a set of commands to a breakpoint, to be executed whenever the breakpoint is hit.", - NULL), + nullptr), IOHandlerDelegateMultiline ("DONE", IOHandlerDelegate::Completion::LLDBCommand), m_options (interpreter) { @@ -279,7 +279,7 @@ lldb::user_id_t break_loc_id) { bool ret_value = true; - if (baton == NULL) + if (baton == nullptr) return true; @@ -432,7 +432,7 @@ { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("There is not a current executable; there are no breakpoints to which to add commands"); result.SetStatus (eReturnStatusFailed); @@ -475,7 +475,7 @@ if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) { Breakpoint *bp = target->GetBreakpointByID (cur_bp_id.GetBreakpointID()).get(); - BreakpointOptions *bp_options = NULL; + BreakpointOptions *bp_options = nullptr; if (cur_bp_id.GetLocationID() == LLDB_INVALID_BREAK_ID) { // This breakpoint does not have an associated location. @@ -491,7 +491,7 @@ } // Skip this breakpoint if bp_options is not good. - if (bp_options == NULL) continue; + if (bp_options == nullptr) continue; // If we are using script language, get the script interpreter // in order to set or collect command callback. Otherwise, call @@ -550,25 +550,25 @@ { eScriptLanguageNone, "command", "Commands are in the lldb command interpreter language"}, { eScriptLanguagePython, "python", "Commands are in the Python language."}, { eSortOrderByName, "default-script", "Commands are in the default scripting language."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; OptionDefinition CommandObjectBreakpointCommandAdd::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "one-liner", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOneLiner, + { LLDB_OPT_SET_1, false, "one-liner", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeOneLiner, "Specify a one-line breakpoint command inline. Be sure to surround it with quotes." }, - { LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, + { LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Specify whether breakpoint command execution should terminate on error." }, { LLDB_OPT_SET_ALL, false, "script-type", 's', OptionParser::eRequiredArgument, g_script_option_enumeration, 0, eArgTypeNone, "Specify the language for the commands - if none is specified, the lldb command interpreter will be used."}, - { LLDB_OPT_SET_2, false, "python-function", 'F', OptionParser::eRequiredArgument, NULL, 0, eArgTypePythonFunction, + { LLDB_OPT_SET_2, false, "python-function", 'F', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePythonFunction, "Give the name of a Python function to run as command for this breakpoint. Be sure to give a module name if appropriate."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -582,7 +582,7 @@ CommandObjectParsed (interpreter, "delete", "Delete the set of commands from a breakpoint.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData bp_id_arg; @@ -608,7 +608,7 @@ { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("There is not a current executable; there are no breakpoints from which to delete commands"); result.SetStatus (eReturnStatusFailed); @@ -680,7 +680,7 @@ CommandObjectParsed (interpreter, "list", "List the script or set of commands to be executed when the breakpoint is hit.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData bp_id_arg; @@ -706,7 +706,7 @@ { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("There is not a current executable; there are no breakpoints for which to list commands"); result.SetStatus (eReturnStatusFailed); @@ -745,7 +745,7 @@ if (bp) { - const BreakpointOptions *bp_options = NULL; + const BreakpointOptions *bp_options = nullptr; if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) { BreakpointLocationSP bp_loc_sp(bp->FindLocationByID (cur_bp_id.GetLocationID())); Index: source/Commands/CommandObjectCommands.cpp =================================================================== --- source/Commands/CommandObjectCommands.cpp +++ source/Commands/CommandObjectCommands.cpp @@ -45,7 +45,7 @@ CommandObjectParsed (interpreter, "command history", "Dump the history of commands in this session.", - NULL), + nullptr), m_options (interpreter) { } @@ -226,11 +226,11 @@ OptionDefinition CommandObjectCommandsHistory::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger, "How many history commands to print."}, -{ LLDB_OPT_SET_1, false, "start-index", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger, "Index at which to start printing history commands (or end to mean tail mode)."}, -{ LLDB_OPT_SET_1, false, "end-index", 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger, "Index at which to stop printing history commands."}, -{ LLDB_OPT_SET_2, false, "clear", 'C', OptionParser::eNoArgument, NULL, 0, eArgTypeBoolean, "Clears the current command history."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger, "How many history commands to print."}, +{ LLDB_OPT_SET_1, false, "start-index", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger, "Index at which to start printing history commands (or end to mean tail mode)."}, +{ LLDB_OPT_SET_1, false, "end-index", 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger, "Index at which to stop printing history commands."}, +{ LLDB_OPT_SET_2, false, "clear", 'C', OptionParser::eNoArgument, nullptr, 0, eArgTypeBoolean, "Clears the current command history."}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -245,7 +245,7 @@ CommandObjectParsed (interpreter, "command source", "Read in debugger commands from the file and execute them.", - NULL), + nullptr), m_options (interpreter) { CommandArgumentEntry arg; @@ -288,7 +288,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -379,7 +379,7 @@ const char *filename = command.GetArgumentAtIndex(0); FileSpec cmd_file (filename, true); - ExecutionContext *exe_ctx = NULL; // Just use the default context. + ExecutionContext *exe_ctx = nullptr; // Just use the default context. // If any options were set, then use them if (m_options.m_stop_on_error.OptionWasSet() || @@ -427,10 +427,10 @@ OptionDefinition CommandObjectCommandsSource::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "If true, stop executing commands on error."}, -{ LLDB_OPT_SET_ALL, false, "stop-on-continue", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "If true, stop executing commands on continue."}, -{ LLDB_OPT_SET_ALL, false, "silent-run", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "If true don't echo commands while executing."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "If true, stop executing commands on error."}, +{ LLDB_OPT_SET_ALL, false, "stop-on-continue", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "If true, stop executing commands on continue."}, +{ LLDB_OPT_SET_ALL, false, "silent-run", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "If true don't echo commands while executing."}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #pragma mark CommandObjectCommandsAlias @@ -452,7 +452,7 @@ CommandObjectRaw (interpreter, "command alias", "Allow users to define their own debugger command abbreviations.", - NULL) + nullptr) { SetHelpLong( "'alias' allows the user to create a short-cut or abbreviation for long \n\ @@ -699,7 +699,7 @@ if (command_obj_sp.get()) { CommandObject *cmd_obj = command_obj_sp.get(); - CommandObject *sub_cmd_obj = NULL; + CommandObject *sub_cmd_obj = nullptr; OptionArgVectorSP option_arg_vector_sp = OptionArgVectorSP (new OptionArgVector); OptionArgVector *option_arg_vector = option_arg_vector_sp.get(); @@ -795,7 +795,7 @@ CommandObjectParsed (interpreter, "command unalias", "Allow the user to remove/delete a user-defined command abbreviation.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData alias_arg; @@ -1077,7 +1077,7 @@ { Error error; - if (m_regex_cmd_ap.get() == NULL) + if (m_regex_cmd_ap.get() == nullptr) { error.SetErrorStringWithFormat("invalid regular expression command object for: '%.*s'", (int)regex_sed.size(), @@ -1246,14 +1246,14 @@ GetHelp () { if (m_help.empty()) - return NULL; + return nullptr; return m_help.c_str(); } const char * GetSyntax () { if (m_syntax.empty()) - return NULL; + return nullptr; return m_syntax.c_str(); } // Instance variables to hold the values for command options. @@ -1274,9 +1274,9 @@ OptionDefinition CommandObjectCommandsAddRegex::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "help" , 'h', OptionParser::eRequiredArgument, NULL, 0, eArgTypeNone, "The help text to display for this command."}, -{ LLDB_OPT_SET_1, false, "syntax", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeNone, "A syntax string showing the typical usage syntax."}, -{ 0 , false, NULL , 0 , 0 , NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "help" , 'h', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeNone, "The help text to display for this command."}, +{ LLDB_OPT_SET_1, false, "syntax", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeNone, "A syntax string showing the typical usage syntax."}, +{ 0 , false, nullptr , 0 , 0 , nullptr, 0, eArgTypeNone, nullptr } }; @@ -1296,7 +1296,7 @@ CommandObjectRaw (interpreter, name.c_str(), (std::string("Run Python function ") + funct).c_str(), - NULL), + nullptr), m_function_name(funct), m_synchro(synch), m_fetched_help_long(false) @@ -1367,7 +1367,7 @@ // Don't change the status if the command already set it... if (result.GetStatus() == eReturnStatusInvalid) { - if (result.GetOutputData() == NULL || result.GetOutputData()[0] == '\0') + if (result.GetOutputData() == nullptr || result.GetOutputData()[0] == '\0') result.SetStatus(eReturnStatusSuccessFinishNoResult); else result.SetStatus(eReturnStatusSuccessFinishResult); @@ -1390,7 +1390,7 @@ CommandObjectParsed (interpreter, "command script import", "Import a scripting module in LLDB.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry arg1; @@ -1429,7 +1429,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -1548,8 +1548,8 @@ OptionDefinition CommandObjectCommandsScriptImport::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "allow-reload", 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Allow the script to be loaded even if it was already loaded before. This argument exists for backwards compatibility, but reloading is always allowed, whether you specify it or not."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_1, false, "allow-reload", 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Allow the script to be loaded even if it was already loaded before. This argument exists for backwards compatibility, but reloading is always allowed, whether you specify it or not."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -1566,7 +1566,7 @@ CommandObjectParsed (interpreter, "command script add", "Add a scripted function as an LLDB command.", - NULL), + nullptr), IOHandlerDelegateMultiline ("DONE"), m_options (interpreter) { @@ -1757,7 +1757,7 @@ m_interpreter.GetPythonCommandsFromIOHandler (" ", // Prompt *this, // IOHandlerDelegate true, // Run IOHandler in async mode - NULL); // Baton for the "io_handler" that will be passed back into our IOHandlerDelegate functions + nullptr); // Baton for the "io_handler" that will be passed back into our IOHandlerDelegate functions } else { @@ -1790,15 +1790,15 @@ { eScriptedCommandSynchronicitySynchronous, "synchronous", "Run synchronous"}, { eScriptedCommandSynchronicityAsynchronous, "asynchronous", "Run asynchronous"}, { eScriptedCommandSynchronicityCurrentValue, "current", "Do not alter current setting"}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; OptionDefinition CommandObjectCommandsScriptAdd::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "function", 'f', OptionParser::eRequiredArgument, NULL, 0, eArgTypePythonFunction, "Name of the Python function to bind to this command name."}, + { LLDB_OPT_SET_1, false, "function", 'f', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePythonFunction, "Name of the Python function to bind to this command name."}, { LLDB_OPT_SET_1, false, "synchronicity", 's', OptionParser::eRequiredArgument, g_script_synchro_type, 0, eArgTypeScriptedCommandSynchronicity, "Set the synchronicity of this command's executions with regard to LLDB event system."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1814,7 +1814,7 @@ CommandObjectParsed (interpreter, "command script list", "List defined scripted commands.", - NULL) + nullptr) { } @@ -1850,7 +1850,7 @@ CommandObjectParsed (interpreter, "command script clear", "Delete all scripted commands.", - NULL) + nullptr) { } @@ -1882,7 +1882,7 @@ CommandObjectParsed (interpreter, "command script delete", "Delete a scripted command.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentData cmd_arg; Index: source/Commands/CommandObjectDisassemble.h =================================================================== --- source/Commands/CommandObjectDisassemble.h +++ source/Commands/CommandObjectDisassemble.h @@ -49,7 +49,7 @@ GetPluginName () { if (plugin_name.empty()) - return NULL; + return nullptr; return plugin_name.c_str(); } @@ -57,7 +57,7 @@ GetFlavorString () { if (flavor_string.empty() || flavor_string == "default") - return NULL; + return nullptr; return flavor_string.c_str(); } Index: source/Commands/CommandObjectDisassemble.cpp =================================================================== --- source/Commands/CommandObjectDisassemble.cpp +++ source/Commands/CommandObjectDisassemble.cpp @@ -232,29 +232,29 @@ OptionDefinition CommandObjectDisassemble::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "bytes" , 'b', OptionParser::eNoArgument , NULL, 0, eArgTypeNone, "Show opcode bytes when disassembling."}, -{ LLDB_OPT_SET_ALL, false, "context" , 'C', OptionParser::eRequiredArgument , NULL, 0, eArgTypeNumLines, "Number of context lines of source to show."}, -{ LLDB_OPT_SET_ALL, false, "mixed" , 'm', OptionParser::eNoArgument , NULL, 0, eArgTypeNone, "Enable mixed source and assembly display."}, -{ LLDB_OPT_SET_ALL, false, "raw" , 'r', OptionParser::eNoArgument , NULL, 0, eArgTypeNone, "Print raw disassembly with no symbol information."}, -{ LLDB_OPT_SET_ALL, false, "plugin" , 'P', OptionParser::eRequiredArgument , NULL, 0, eArgTypePlugin, "Name of the disassembler plugin you want to use."}, -{ LLDB_OPT_SET_ALL, false, "flavor" , 'F', OptionParser::eRequiredArgument , NULL, 0, eArgTypeDisassemblyFlavor, "Name of the disassembly flavor you want to use. " +{ LLDB_OPT_SET_ALL, false, "bytes" , 'b', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone, "Show opcode bytes when disassembling."}, +{ LLDB_OPT_SET_ALL, false, "context" , 'C', OptionParser::eRequiredArgument , nullptr, 0, eArgTypeNumLines, "Number of context lines of source to show."}, +{ LLDB_OPT_SET_ALL, false, "mixed" , 'm', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone, "Enable mixed source and assembly display."}, +{ LLDB_OPT_SET_ALL, false, "raw" , 'r', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone, "Print raw disassembly with no symbol information."}, +{ LLDB_OPT_SET_ALL, false, "plugin" , 'P', OptionParser::eRequiredArgument , nullptr, 0, eArgTypePlugin, "Name of the disassembler plugin you want to use."}, +{ LLDB_OPT_SET_ALL, false, "flavor" , 'F', OptionParser::eRequiredArgument , nullptr, 0, eArgTypeDisassemblyFlavor, "Name of the disassembly flavor you want to use. " "Currently the only valid options are default, and for Intel" " architectures, att and intel."}, -{ LLDB_OPT_SET_ALL, false, "arch" , 'A', OptionParser::eRequiredArgument , NULL, 0, eArgTypeArchitecture,"Specify the architecture to use from cross disassembly."}, +{ LLDB_OPT_SET_ALL, false, "arch" , 'A', OptionParser::eRequiredArgument , nullptr, 0, eArgTypeArchitecture,"Specify the architecture to use from cross disassembly."}, { LLDB_OPT_SET_1 | - LLDB_OPT_SET_2 , true , "start-address", 's', OptionParser::eRequiredArgument , NULL, 0, eArgTypeAddressOrExpression,"Address at which to start disassembling."}, -{ LLDB_OPT_SET_1 , false, "end-address" , 'e', OptionParser::eRequiredArgument , NULL, 0, eArgTypeAddressOrExpression, "Address at which to end disassembling."}, + LLDB_OPT_SET_2 , true , "start-address", 's', OptionParser::eRequiredArgument , nullptr, 0, eArgTypeAddressOrExpression,"Address at which to start disassembling."}, +{ LLDB_OPT_SET_1 , false, "end-address" , 'e', OptionParser::eRequiredArgument , nullptr, 0, eArgTypeAddressOrExpression, "Address at which to end disassembling."}, { LLDB_OPT_SET_2 | LLDB_OPT_SET_3 | LLDB_OPT_SET_4 | - LLDB_OPT_SET_5 , false, "count" , 'c', OptionParser::eRequiredArgument , NULL, 0, eArgTypeNumLines, "Number of instructions to display."}, -{ LLDB_OPT_SET_3 , false, "name" , 'n', OptionParser::eRequiredArgument , NULL, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, + LLDB_OPT_SET_5 , false, "count" , 'c', OptionParser::eRequiredArgument , nullptr, 0, eArgTypeNumLines, "Number of instructions to display."}, +{ LLDB_OPT_SET_3 , false, "name" , 'n', OptionParser::eRequiredArgument , nullptr, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, "Disassemble entire contents of the given function name."}, -{ LLDB_OPT_SET_4 , false, "frame" , 'f', OptionParser::eNoArgument , NULL, 0, eArgTypeNone, "Disassemble from the start of the current frame's function."}, -{ LLDB_OPT_SET_5 , false, "pc" , 'p', OptionParser::eNoArgument , NULL, 0, eArgTypeNone, "Disassemble around the current pc."}, -{ LLDB_OPT_SET_6 , false, "line" , 'l', OptionParser::eNoArgument , NULL, 0, eArgTypeNone, "Disassemble the current frame's current source line instructions if there is debug line table information, else disassemble around the pc."}, -{ LLDB_OPT_SET_7 , false, "address" , 'a', OptionParser::eRequiredArgument , NULL, 0, eArgTypeAddressOrExpression, "Disassemble function containing this address."}, -{ 0 , false, NULL , 0, 0 , NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_4 , false, "frame" , 'f', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone, "Disassemble from the start of the current frame's function."}, +{ LLDB_OPT_SET_5 , false, "pc" , 'p', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone, "Disassemble around the current pc."}, +{ LLDB_OPT_SET_6 , false, "line" , 'l', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone, "Disassemble the current frame's current source line instructions if there is debug line table information, else disassemble around the pc."}, +{ LLDB_OPT_SET_7 , false, "address" , 'a', OptionParser::eRequiredArgument , nullptr, 0, eArgTypeAddressOrExpression, "Disassemble function containing this address."}, +{ 0 , false, nullptr , 0, 0 , nullptr, 0, eArgTypeNone, nullptr } }; @@ -280,7 +280,7 @@ CommandObjectDisassemble::DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -315,7 +315,7 @@ result.SetStatus (eReturnStatusFailed); return false; } - else if (flavor_string != NULL && !disassembler->FlavorValidForArchSpec(m_options.arch, flavor_string)) + else if (flavor_string != nullptr && !disassembler->FlavorValidForArchSpec(m_options.arch, flavor_string)) result.AppendWarningWithFormat("invalid disassembler flavor \"%s\", using default.\n", flavor_string); result.SetStatus (eReturnStatusSuccessFinishResult); @@ -354,7 +354,7 @@ flavor_string, m_exe_ctx, name, - NULL, // Module * + nullptr, // Module * m_options.num_instructions, m_options.show_mixed ? m_options.num_lines_context : 0, options, @@ -375,7 +375,7 @@ StackFrame *frame = m_exe_ctx.GetFramePtr(); if (m_options.frame_line) { - if (frame == NULL) + if (frame == nullptr) { result.AppendError ("Cannot disassemble around the current line without a selected frame.\n"); result.SetStatus (eReturnStatusFailed); @@ -394,7 +394,7 @@ } else if (m_options.current_function) { - if (frame == NULL) + if (frame == nullptr) { result.AppendError ("Cannot disassemble around the current function without a selected frame.\n"); result.SetStatus (eReturnStatusFailed); @@ -414,7 +414,7 @@ { if (m_options.at_pc) { - if (frame == NULL) + if (frame == nullptr) { result.AppendError ("Cannot disassemble around the current PC without a selected frame.\n"); result.SetStatus (eReturnStatusFailed); Index: source/Commands/CommandObjectExpression.h =================================================================== --- source/Commands/CommandObjectExpression.h +++ source/Commands/CommandObjectExpression.h @@ -95,7 +95,7 @@ EvaluateExpression (const char *expr, Stream *output_stream, Stream *error_stream, - CommandReturnObject *result = NULL); + CommandReturnObject *result = nullptr); void GetMultilineExpression (); Index: source/Commands/CommandObjectExpression.cpp =================================================================== --- source/Commands/CommandObjectExpression.cpp +++ source/Commands/CommandObjectExpression.cpp @@ -53,17 +53,17 @@ { { eLanguageRuntimeDescriptionDisplayVerbosityCompact, "compact", "Only show the description string"}, { eLanguageRuntimeDescriptionDisplayVerbosityFull, "full", "Show the full output, including persistent variable's name and type"}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; OptionDefinition CommandObjectExpression::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "all-threads", 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "Should we run all threads if the execution doesn't complete on one thread."}, - { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "ignore-breakpoints", 'i', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "Ignore breakpoint hits while running expressions"}, - { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "timeout", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger, "Timeout value (in microseconds) for running the expression."}, - { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "unwind-on-error", 'u', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "Clean up program state if the expression causes a crash, or raises a signal. Note, unlike gdb hitting a breakpoint is controlled by another option (-i)."}, - { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "debug", 'g', OptionParser::eNoArgument , NULL, 0, eArgTypeNone, "When specified, debug the JIT code by setting a breakpoint on the first instruction and forcing breakpoints to not be ignored (-i0) and no unwinding to happen on error (-u0)."}, + { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "all-threads", 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Should we run all threads if the execution doesn't complete on one thread."}, + { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "ignore-breakpoints", 'i', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Ignore breakpoint hits while running expressions"}, + { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "timeout", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger, "Timeout value (in microseconds) for running the expression."}, + { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "unwind-on-error", 'u', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Clean up program state if the expression causes a crash, or raises a signal. Note, unlike gdb hitting a breakpoint is controlled by another option (-i)."}, + { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "debug", 'g', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone, "When specified, debug the JIT code by setting a breakpoint on the first instruction and forcing breakpoints to not be ignored (-i0) and no unwinding to happen on error (-u0)."}, { LLDB_OPT_SET_1, false, "description-verbosity", 'v', OptionParser::eOptionalArgument, g_description_verbosity_type, 0, eArgTypeDescriptionVerbosity, "How verbose should the output of this expression be, if the object description is asked for."}, }; @@ -166,7 +166,7 @@ CommandObjectExpression::CommandOptions::OptionParsingStarting (CommandInterpreter &interpreter) { Process *process = interpreter.GetExecutionContext().GetProcessPtr(); - if (process != NULL) + if (process != nullptr) { ignore_breakpoints = process->GetIgnoreBreakpointsInExpressions(); unwind_on_error = process->GetUnwindOnErrorInExpressions(); @@ -194,7 +194,7 @@ CommandObjectRaw (interpreter, "expression", "Evaluate a C/ObjC/C++ expression in the current program context, using user defined variables and variables currently in scope.", - NULL, + nullptr, eFlagProcessMustBePaused | eFlagTryTargetAPILock), IOHandlerDelegate (IOHandlerDelegate::Completion::Expression), m_option_group (interpreter), @@ -418,7 +418,7 @@ const bool multiple_lines = true; // Get multiple lines IOHandlerSP io_handler_sp (new IOHandlerEditline (debugger, "lldb-expr", // Name of input reader for history - NULL, // No prompt + nullptr, // No prompt multiple_lines, 1, // Show line numbers starting at 1 *this)); @@ -441,7 +441,7 @@ { m_option_group.NotifyOptionParsingStarting(); - const char * expr = NULL; + const char * expr = nullptr; if (command[0] == '\0') { @@ -452,7 +452,7 @@ if (command[0] == '-') { // We have some options and these options MUST end with --. - const char *end_options = NULL; + const char *end_options = nullptr; const char *s = command; while (s && s[0]) { @@ -486,7 +486,7 @@ } // No expression following options - if (expr == NULL || expr[0] == '\0') + if (expr == nullptr || expr[0] == '\0') { GetMultilineExpression (); return result.Succeeded(); @@ -494,7 +494,7 @@ } } - if (expr == NULL) + if (expr == nullptr) expr = command; if (EvaluateExpression (expr, &(result.GetOutputStream()), &(result.GetErrorStream()), &result)) Index: source/Commands/CommandObjectFrame.cpp =================================================================== --- source/Commands/CommandObjectFrame.cpp +++ source/Commands/CommandObjectFrame.cpp @@ -154,7 +154,7 @@ CommandObjectParsed (interpreter, "frame select", "Select a frame by index from within the current thread and make it the current frame.", - NULL, + nullptr, eFlagRequiresThread | eFlagTryTargetAPILock | eFlagProcessMustBeLaunched | @@ -291,8 +291,8 @@ OptionDefinition CommandObjectFrameSelect::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "relative", 'r', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOffset, "A relative frame index offset from the current frame index."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "relative", 'r', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeOffset, "A relative frame index offset from the current frame index."}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #pragma mark CommandObjectFrameVariable @@ -312,7 +312,7 @@ "argument, local, file static and file global variables. " "Children of aggregate variables can be specified such as " "'var->child.x'.", - NULL, + nullptr, eFlagRequiresFrame | eFlagTryTargetAPILock | eFlagProcessMustBeLaunched | @@ -374,7 +374,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -399,7 +399,7 @@ VariableSP var_sp; ValueObjectSP valobj_sp; - const char *name_cstr = NULL; + const char *name_cstr = nullptr; size_t idx; TypeSummaryImplSP summary_format_sp; @@ -421,7 +421,7 @@ // If we have any args to the variable command, we will make // variable objects from them... - for (idx = 0; (name_cstr = command.GetArgumentAtIndex(idx)) != NULL; ++idx) + for (idx = 0; (name_cstr = command.GetArgumentAtIndex(idx)) != nullptr; ++idx) { if (m_option_variable.use_regex) { @@ -498,12 +498,12 @@ options.SetFormat(format); Stream &output_stream = result.GetOutputStream(); - options.SetRootValueObjectName(valobj_sp->GetParent() ? name_cstr : NULL); + options.SetRootValueObjectName(valobj_sp->GetParent() ? name_cstr : nullptr); valobj_sp->Dump(output_stream,options); } else { - const char *error_cstr = error.AsCString(NULL); + const char *error_cstr = error.AsCString(nullptr); if (error_cstr) result.GetErrorStream().Printf("error: %s\n", error_cstr); else Index: source/Commands/CommandObjectHelp.cpp =================================================================== --- source/Commands/CommandObjectHelp.cpp +++ source/Commands/CommandObjectHelp.cpp @@ -54,9 +54,9 @@ OptionDefinition CommandObjectHelp::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "show-aliases", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Show aliases in the command list."}, - { LLDB_OPT_SET_ALL, false, "hide-user-commands", 'u', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Hide user-defined commands from the list."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "show-aliases", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Show aliases in the command list."}, + { LLDB_OPT_SET_ALL, false, "hide-user-commands", 'u', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Hide user-defined commands from the list."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; bool @@ -87,7 +87,7 @@ bool is_alias_command = m_interpreter.AliasExists (command.GetArgumentAtIndex (0)); std::string alias_name = command.GetArgumentAtIndex(0); - if (cmd_obj != NULL) + if (cmd_obj != nullptr) { StringList matches; bool all_okay = true; @@ -106,7 +106,7 @@ { CommandObject *found_cmd; found_cmd = sub_cmd_obj->GetSubcommandObject(sub_command.c_str(), &matches); - if (found_cmd == NULL) + if (found_cmd == nullptr) all_okay = false; else if (matches.GetSize() > 1) all_okay = false; @@ -115,7 +115,7 @@ } } - if (!all_okay || (sub_cmd_obj == NULL)) + if (!all_okay || (sub_cmd_obj == nullptr)) { std::string cmd_string; command.GetCommandString (cmd_string); Index: source/Commands/CommandObjectLog.cpp =================================================================== --- source/Commands/CommandObjectLog.cpp +++ source/Commands/CommandObjectLog.cpp @@ -54,7 +54,7 @@ CommandObjectParsed (interpreter, "log enable", "Enable logging for a single log channel.", - NULL), + nullptr), m_options (interpreter) { @@ -215,16 +215,16 @@ OptionDefinition CommandObjectLogEnable::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFilename, "Set the destination file to log to."}, -{ LLDB_OPT_SET_1, false, "threadsafe", 't', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Enable thread safe logging to avoid interweaved log lines." }, -{ LLDB_OPT_SET_1, false, "verbose", 'v', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Enable verbose logging." }, -{ LLDB_OPT_SET_1, false, "debug", 'g', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Enable debug logging." }, -{ LLDB_OPT_SET_1, false, "sequence", 's', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Prepend all log lines with an increasing integer sequence id." }, -{ LLDB_OPT_SET_1, false, "timestamp", 'T', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Prepend all log lines with a timestamp." }, -{ LLDB_OPT_SET_1, false, "pid-tid", 'p', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Prepend all log lines with the process and thread ID that generates the log line." }, -{ LLDB_OPT_SET_1, false, "thread-name",'n', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Prepend all log lines with the thread name for the thread that generates the log line." }, -{ LLDB_OPT_SET_1, false, "stack", 'S', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Append a stack backtrace to each log line." }, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFilename, "Set the destination file to log to."}, +{ LLDB_OPT_SET_1, false, "threadsafe", 't', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Enable thread safe logging to avoid interweaved log lines." }, +{ LLDB_OPT_SET_1, false, "verbose", 'v', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Enable verbose logging." }, +{ LLDB_OPT_SET_1, false, "debug", 'g', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Enable debug logging." }, +{ LLDB_OPT_SET_1, false, "sequence", 's', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Prepend all log lines with an increasing integer sequence id." }, +{ LLDB_OPT_SET_1, false, "timestamp", 'T', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Prepend all log lines with a timestamp." }, +{ LLDB_OPT_SET_1, false, "pid-tid", 'p', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Prepend all log lines with the process and thread ID that generates the log line." }, +{ LLDB_OPT_SET_1, false, "thread-name",'n', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Prepend all log lines with the thread name for the thread that generates the log line." }, +{ LLDB_OPT_SET_1, false, "stack", 'S', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Append a stack backtrace to each log line." }, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; class CommandObjectLogDisable : public CommandObjectParsed @@ -237,7 +237,7 @@ CommandObjectParsed (interpreter, "log disable", "Disable one or more log channel categories.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentEntry arg2; @@ -317,7 +317,7 @@ CommandObjectParsed (interpreter, "log list", "List the log categories for one or more log channels. If none specified, lists them all.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData channel_arg; Index: source/Commands/CommandObjectMemory.cpp =================================================================== --- source/Commands/CommandObjectMemory.cpp +++ source/Commands/CommandObjectMemory.cpp @@ -42,12 +42,12 @@ static OptionDefinition g_option_table[] = { - { LLDB_OPT_SET_1, false, "num-per-line" ,'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypeNumberPerLine ,"The number of items per line to display."}, - { LLDB_OPT_SET_2, false, "binary" ,'b', OptionParser::eNoArgument , NULL, 0, eArgTypeNone ,"If true, memory will be saved as binary. If false, the memory is saved save as an ASCII dump that uses the format, size, count and number per line settings."}, - { LLDB_OPT_SET_3, true , "type" ,'t', OptionParser::eRequiredArgument, NULL, 0, eArgTypeNone ,"The name of a type to view memory as."}, + { LLDB_OPT_SET_1, false, "num-per-line" ,'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeNumberPerLine ,"The number of items per line to display."}, + { LLDB_OPT_SET_2, false, "binary" ,'b', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone ,"If true, memory will be saved as binary. If false, the memory is saved save as an ASCII dump that uses the format, size, count and number per line settings."}, + { LLDB_OPT_SET_3, true , "type" ,'t', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeNone ,"The name of a type to view memory as."}, { LLDB_OPT_SET_1| LLDB_OPT_SET_2| - LLDB_OPT_SET_3, false, "force" ,'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone ,"Necessary if reading over target.max-memory-read-size bytes."}, + LLDB_OPT_SET_3, false, "force" ,'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone ,"Necessary if reading over target.max-memory-read-size bytes."}, }; @@ -309,7 +309,7 @@ CommandObjectParsed (interpreter, "memory read", "Read from the memory of the process being debugged.", - NULL, + nullptr, eFlagRequiresTarget | eFlagProcessMustBePaused), m_option_group (interpreter), m_format_options (eFormatBytesWithASCII, 1, 8), @@ -635,7 +635,7 @@ if (argc == 2) { - lldb::addr_t end_addr = Args::StringToAddress(&m_exe_ctx, command.GetArgumentAtIndex(1), LLDB_INVALID_ADDRESS, 0); + lldb::addr_t end_addr = Args::StringToAddress(&m_exe_ctx, command.GetArgumentAtIndex(1), LLDB_INVALID_ADDRESS, nullptr); if (end_addr == LLDB_INVALID_ADDRESS) { result.AppendError("invalid end address expression."); @@ -683,14 +683,14 @@ else if (m_format_options.GetFormatValue().GetCurrentValue() != eFormatCString) { data_sp.reset (new DataBufferHeap (total_byte_size, '\0')); - if (data_sp->GetBytes() == NULL) + if (data_sp->GetBytes() == nullptr) { result.AppendErrorWithFormat ("can't allocate 0x%" PRIx32 " bytes for the memory read buffer, specify a smaller size to read", (uint32_t)total_byte_size); result.SetStatus(eReturnStatusFailed); return false; } - Address address(addr, NULL); + Address address(addr, nullptr); bytes_read = target->ReadMemory(address, false, data_sp->GetBytes (), data_sp->GetByteSize(), error); if (bytes_read == 0) { @@ -720,7 +720,7 @@ if (!m_format_options.GetCountValue().OptionWasSet()) item_count = 1; data_sp.reset (new DataBufferHeap ((item_byte_size+1) * item_count, '\0')); // account for NULLs as necessary - if (data_sp->GetBytes() == NULL) + if (data_sp->GetBytes() == nullptr) { result.AppendErrorWithFormat ("can't allocate 0x%" PRIx64 " bytes for the memory read buffer, specify a smaller size to read", (uint64_t)((item_byte_size+1) * item_count)); result.SetStatus(eReturnStatusFailed); @@ -766,7 +766,7 @@ m_prev_clang_ast_type = clang_ast_type; StreamFile outfile_stream; - Stream *output_stream = NULL; + Stream *output_stream = nullptr; const FileSpec &outfile_spec = m_outfile_options.GetFile().GetCurrentValue(); if (outfile_spec) { @@ -917,10 +917,10 @@ OptionDefinition g_memory_find_option_table[] = { - { LLDB_OPT_SET_1, false, "expression", 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeExpression, "Evaluate an expression to obtain a byte pattern."}, - { LLDB_OPT_SET_2, false, "string", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Use text to find a byte pattern."}, - { LLDB_OPT_SET_1|LLDB_OPT_SET_2, false, "count", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCount, "How many times to perform the search."}, - { LLDB_OPT_SET_1|LLDB_OPT_SET_2, false, "dump-offset", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOffset, "When dumping memory for a match, an offset from the match location to start dumping from."}, + { LLDB_OPT_SET_1, false, "expression", 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeExpression, "Evaluate an expression to obtain a byte pattern."}, + { LLDB_OPT_SET_2, false, "string", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Use text to find a byte pattern."}, + { LLDB_OPT_SET_1|LLDB_OPT_SET_2, false, "count", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCount, "How many times to perform the search."}, + { LLDB_OPT_SET_1|LLDB_OPT_SET_2, false, "dump-offset", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeOffset, "When dumping memory for a match, an offset from the match location to start dumping from."}, }; //---------------------------------------------------------------------- @@ -1010,7 +1010,7 @@ CommandObjectParsed (interpreter, "memory find", "Find a value in the memory of the process being debugged.", - NULL, + nullptr, eFlagRequiresProcess | eFlagProcessMustBeLaunched), m_option_group (interpreter), m_memory_options () @@ -1223,8 +1223,8 @@ OptionDefinition g_memory_write_option_table[] = { -{ LLDB_OPT_SET_1, true, "infile", 'i', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFilename, "Write memory using the contents of a file."}, -{ LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOffset, "Start writng bytes from an offset within the input file."}, +{ LLDB_OPT_SET_1, true, "infile", 'i', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFilename, "Write memory using the contents of a file."}, +{ LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeOffset, "Start writng bytes from an offset within the input file."}, }; //---------------------------------------------------------------------- @@ -1311,7 +1311,7 @@ CommandObjectParsed (interpreter, "memory write", "Write to the memory of the process being debugged.", - NULL, + nullptr, eFlagRequiresProcess | eFlagProcessMustBeLaunched), m_option_group (interpreter), m_format_options (eFormatBytes, 1, UINT64_MAX), Index: source/Commands/CommandObjectMultiword.cpp =================================================================== --- source/Commands/CommandObjectMultiword.cpp +++ source/Commands/CommandObjectMultiword.cpp @@ -62,7 +62,7 @@ { StringList local_matches; - if (matches == NULL) + if (matches == nullptr) matches = &local_matches; int num_matches = CommandObject::AddNamesMatchingPartialString (m_subcommand_dict, sub_cmd, *matches); @@ -131,7 +131,7 @@ { StringList matches; CommandObject *sub_cmd_obj = GetSubcommandObject(sub_command, &matches); - if (sub_cmd_obj != NULL) + if (sub_cmd_obj != nullptr) { // Now call CommandObject::Execute to process and options in 'rest_of_line'. From there // the command-specific version of Execute will be called, with the processed arguments. @@ -243,13 +243,13 @@ matches); if (matches.GetSize() == 1 - && matches.GetStringAtIndex(0) != NULL + && matches.GetStringAtIndex(0) != nullptr && strcmp (arg0, matches.GetStringAtIndex(0)) == 0) { StringList temp_matches; CommandObject *cmd_obj = GetSubcommandObject (arg0, &temp_matches); - if (cmd_obj != NULL) + if (cmd_obj != nullptr) { matches.DeleteStringAtIndex (0); input.Shift(); @@ -273,7 +273,7 @@ { CommandObject *sub_command_object = GetSubcommandObject (arg0, &matches); - if (sub_command_object == NULL) + if (sub_command_object == nullptr) { return matches.GetSize(); } @@ -300,10 +300,10 @@ { index++; if (current_command_args.GetArgumentCount() <= index) - return NULL; + return nullptr; CommandObject *sub_command_object = GetSubcommandObject (current_command_args.GetArgumentAtIndex(index)); - if (sub_command_object == NULL) - return NULL; + if (sub_command_object == nullptr) + return nullptr; return sub_command_object->GetRepeatCommand(current_command_args, index); } @@ -359,7 +359,7 @@ CommandObject *proxy_command = GetProxyCommandObject(); if (proxy_command) return proxy_command->GetHelpLong(); - return NULL; + return nullptr; } bool @@ -395,7 +395,7 @@ CommandObject *proxy_command = GetProxyCommandObject(); if (proxy_command) return proxy_command->GetSubcommandObject(sub_cmd, matches); - return NULL; + return nullptr; } void @@ -447,7 +447,7 @@ CommandObject *proxy_command = GetProxyCommandObject(); if (proxy_command) return proxy_command->GetOptions (); - return NULL; + return nullptr; } @@ -503,7 +503,7 @@ CommandObject *proxy_command = GetProxyCommandObject(); if (proxy_command) return proxy_command->GetRepeatCommand (current_command_args, index); - return NULL; + return nullptr; } bool Index: source/Commands/CommandObjectPlatform.cpp =================================================================== --- source/Commands/CommandObjectPlatform.cpp +++ source/Commands/CommandObjectPlatform.cpp @@ -64,19 +64,19 @@ static OptionDefinition g_permissions_options[] = { - { LLDB_OPT_SET_ALL, false, "permissions-value", 'v', OptionParser::eRequiredArgument, NULL, 0, eArgTypePermissionsNumber , "Give out the numeric value for permissions (e.g. 757)" }, - { LLDB_OPT_SET_ALL, false, "permissions-string",'s', OptionParser::eRequiredArgument, NULL, 0, eArgTypePermissionsString , "Give out the string value for permissions (e.g. rwxr-xr--)." }, - { LLDB_OPT_SET_ALL, false, "user-read", 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow user to read." }, - { LLDB_OPT_SET_ALL, false, "user-write", 'w', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow user to write." }, - { LLDB_OPT_SET_ALL, false, "user-exec", 'x', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow user to execute." }, + { LLDB_OPT_SET_ALL, false, "permissions-value", 'v', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePermissionsNumber , "Give out the numeric value for permissions (e.g. 757)" }, + { LLDB_OPT_SET_ALL, false, "permissions-string",'s', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePermissionsString , "Give out the string value for permissions (e.g. rwxr-xr--)." }, + { LLDB_OPT_SET_ALL, false, "user-read", 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow user to read." }, + { LLDB_OPT_SET_ALL, false, "user-write", 'w', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow user to write." }, + { LLDB_OPT_SET_ALL, false, "user-exec", 'x', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow user to execute." }, - { LLDB_OPT_SET_ALL, false, "group-read", 'R', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow group to read." }, - { LLDB_OPT_SET_ALL, false, "group-write", 'W', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow group to write." }, - { LLDB_OPT_SET_ALL, false, "group-exec", 'X', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow group to execute." }, + { LLDB_OPT_SET_ALL, false, "group-read", 'R', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow group to read." }, + { LLDB_OPT_SET_ALL, false, "group-write", 'W', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow group to write." }, + { LLDB_OPT_SET_ALL, false, "group-exec", 'X', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow group to execute." }, - { LLDB_OPT_SET_ALL, false, "world-read", 'd', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow world to read." }, - { LLDB_OPT_SET_ALL, false, "world-write", 't', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow world to write." }, - { LLDB_OPT_SET_ALL, false, "world-exec", 'e', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Allow world to execute." }, + { LLDB_OPT_SET_ALL, false, "world-read", 'd', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow world to read." }, + { LLDB_OPT_SET_ALL, false, "world-write", 't', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow world to write." }, + { LLDB_OPT_SET_ALL, false, "world-exec", 'e', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Allow world to execute." }, }; @@ -220,7 +220,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -285,7 +285,7 @@ CommandObjectParsed (interpreter, "platform list", "List all platforms that are available.", - NULL, + nullptr, 0) { } @@ -311,10 +311,10 @@ for (idx = 0; 1; ++idx) { const char *plugin_name = PluginManager::GetPlatformPluginNameAtIndex (idx); - if (plugin_name == NULL) + if (plugin_name == nullptr) break; const char *plugin_desc = PluginManager::GetPlatformPluginDescriptionAtIndex (idx); - if (plugin_desc == NULL) + if (plugin_desc == nullptr) break; ostrm.Printf("%s: %s\n", plugin_name, plugin_desc); } @@ -340,7 +340,7 @@ CommandObjectParsed (interpreter, "platform status", "Display status for the currently selected platform.", - NULL, + nullptr, 0) { } @@ -433,11 +433,11 @@ GetOptions () { PlatformSP platform_sp (m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform()); - OptionGroupOptions* m_platform_options = NULL; + OptionGroupOptions* m_platform_options = nullptr; if (platform_sp) { m_platform_options = platform_sp->GetConnectionOptions(m_interpreter); - if (m_platform_options != NULL && !m_platform_options->m_did_finalize) + if (m_platform_options != nullptr && !m_platform_options->m_did_finalize) m_platform_options->Finalize(); } return m_platform_options; @@ -593,7 +593,7 @@ CommandObjectParsed (interpreter, "platform mkdir", "Make a new directory on the remote end.", - NULL, + nullptr, 0), m_options(interpreter) { @@ -661,7 +661,7 @@ CommandObjectParsed (interpreter, "platform file open", "Open a file on the remote end.", - NULL, + nullptr, 0), m_options(interpreter) { @@ -733,7 +733,7 @@ CommandObjectParsed (interpreter, "platform file close", "Close a file on the remote end.", - NULL, + nullptr, 0) { } @@ -784,7 +784,7 @@ CommandObjectParsed (interpreter, "platform file read", "Read data from a file on the remote end.", - NULL, + nullptr, 0), m_options (interpreter) { @@ -894,9 +894,9 @@ OptionDefinition CommandObjectPlatformFRead::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "offset" , 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeIndex , "Offset into the file at which to start reading." }, - { LLDB_OPT_SET_1, false, "count" , 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCount , "Number of bytes to read from the file." }, - { 0 , false, NULL , 0 , 0 , NULL, 0, eArgTypeNone , NULL } + { LLDB_OPT_SET_1, false, "offset" , 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeIndex , "Offset into the file at which to start reading." }, + { LLDB_OPT_SET_1, false, "count" , 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCount , "Number of bytes to read from the file." }, + { 0 , false, nullptr , 0 , 0 , nullptr, 0, eArgTypeNone , nullptr } }; @@ -910,7 +910,7 @@ CommandObjectParsed (interpreter, "platform file write", "Write data to a file on the remote end.", - NULL, + nullptr, 0), m_options (interpreter) { @@ -1020,9 +1020,9 @@ OptionDefinition CommandObjectPlatformFWrite::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "offset" , 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeIndex , "Offset into the file at which to start reading." }, - { LLDB_OPT_SET_1, false, "data" , 'd', OptionParser::eRequiredArgument, NULL, 0, eArgTypeValue , "Text to write to the file." }, - { 0 , false, NULL , 0 , 0 , NULL, 0, eArgTypeNone , NULL } + { LLDB_OPT_SET_1, false, "offset" , 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeIndex , "Offset into the file at which to start reading." }, + { LLDB_OPT_SET_1, false, "data" , 'd', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeValue , "Text to write to the file." }, + { 0 , false, nullptr , 0 , 0 , nullptr, 0, eArgTypeNone , nullptr } }; class CommandObjectPlatformFile : public CommandObjectMultiword @@ -1221,7 +1221,7 @@ CommandObjectParsed (interpreter, "platform put-file", "Transfer a file from this system to the remote end.", - NULL, + nullptr, 0) { } @@ -1453,7 +1453,7 @@ { ProcessInstanceInfoList proc_infos; const uint32_t matches = platform_sp->FindProcesses (m_options.match_info, proc_infos); - const char *match_desc = NULL; + const char *match_desc = nullptr; const char *match_name = m_options.match_info.GetProcessInfo().GetName(); if (match_name && match_name[0]) { @@ -1648,21 +1648,21 @@ OptionDefinition CommandObjectPlatformProcessList::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1 , false, "pid" , 'p', OptionParser::eRequiredArgument, NULL, 0, eArgTypePid , "List the process info for a specific process ID." }, -{ LLDB_OPT_SET_2 , true , "name" , 'n', OptionParser::eRequiredArgument, NULL, 0, eArgTypeProcessName , "Find processes with executable basenames that match a string." }, -{ LLDB_OPT_SET_3 , true , "ends-with" , 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeProcessName , "Find processes with executable basenames that end with a string." }, -{ LLDB_OPT_SET_4 , true , "starts-with", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeProcessName , "Find processes with executable basenames that start with a string." }, -{ LLDB_OPT_SET_5 , true , "contains" , 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeProcessName , "Find processes with executable basenames that contain a string." }, -{ LLDB_OPT_SET_6 , true , "regex" , 'r', OptionParser::eRequiredArgument, NULL, 0, eArgTypeRegularExpression, "Find processes with executable basenames that match a regular expression." }, -{ LLDB_OPT_SET_FROM_TO(2, 6), false, "parent" , 'P', OptionParser::eRequiredArgument, NULL, 0, eArgTypePid , "Find processes that have a matching parent process ID." }, -{ LLDB_OPT_SET_FROM_TO(2, 6), false, "uid" , 'u', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger , "Find processes that have a matching user ID." }, -{ LLDB_OPT_SET_FROM_TO(2, 6), false, "euid" , 'U', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger , "Find processes that have a matching effective user ID." }, -{ LLDB_OPT_SET_FROM_TO(2, 6), false, "gid" , 'g', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger , "Find processes that have a matching group ID." }, -{ LLDB_OPT_SET_FROM_TO(2, 6), false, "egid" , 'G', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger , "Find processes that have a matching effective group ID." }, -{ LLDB_OPT_SET_FROM_TO(2, 6), false, "arch" , 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeArchitecture , "Find processes that have a matching architecture." }, -{ LLDB_OPT_SET_FROM_TO(1, 6), false, "show-args" , 'A', OptionParser::eNoArgument , NULL, 0, eArgTypeNone , "Show process arguments instead of the process executable basename." }, -{ LLDB_OPT_SET_FROM_TO(1, 6), false, "verbose" , 'v', OptionParser::eNoArgument , NULL, 0, eArgTypeNone , "Enable verbose output." }, -{ 0 , false, NULL , 0 , 0 , NULL, 0, eArgTypeNone , NULL } +{ LLDB_OPT_SET_1 , false, "pid" , 'p', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePid , "List the process info for a specific process ID." }, +{ LLDB_OPT_SET_2 , true , "name" , 'n', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeProcessName , "Find processes with executable basenames that match a string." }, +{ LLDB_OPT_SET_3 , true , "ends-with" , 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeProcessName , "Find processes with executable basenames that end with a string." }, +{ LLDB_OPT_SET_4 , true , "starts-with", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeProcessName , "Find processes with executable basenames that start with a string." }, +{ LLDB_OPT_SET_5 , true , "contains" , 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeProcessName , "Find processes with executable basenames that contain a string." }, +{ LLDB_OPT_SET_6 , true , "regex" , 'r', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeRegularExpression, "Find processes with executable basenames that match a regular expression." }, +{ LLDB_OPT_SET_FROM_TO(2, 6), false, "parent" , 'P', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePid , "Find processes that have a matching parent process ID." }, +{ LLDB_OPT_SET_FROM_TO(2, 6), false, "uid" , 'u', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger , "Find processes that have a matching user ID." }, +{ LLDB_OPT_SET_FROM_TO(2, 6), false, "euid" , 'U', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger , "Find processes that have a matching effective user ID." }, +{ LLDB_OPT_SET_FROM_TO(2, 6), false, "gid" , 'g', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger , "Find processes that have a matching group ID." }, +{ LLDB_OPT_SET_FROM_TO(2, 6), false, "egid" , 'G', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger , "Find processes that have a matching effective group ID." }, +{ LLDB_OPT_SET_FROM_TO(2, 6), false, "arch" , 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeArchitecture , "Find processes that have a matching architecture." }, +{ LLDB_OPT_SET_FROM_TO(1, 6), false, "show-args" , 'A', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone , "Show process arguments instead of the process executable basename." }, +{ LLDB_OPT_SET_FROM_TO(1, 6), false, "verbose" , 'v', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone , "Enable verbose output." }, +{ 0 , false, nullptr , 0 , 0 , nullptr, 0, eArgTypeNone , nullptr } }; //---------------------------------------------------------------------- @@ -1868,7 +1868,7 @@ // Look to see if there is a -P argument provided, and if so use that plugin, otherwise // use the default plugin. - const char *partial_name = NULL; + const char *partial_name = nullptr; partial_name = input.GetArgumentAtIndex(opt_arg_pos); PlatformSP platform_sp (m_interpreter.GetPlatform (true)); @@ -1928,13 +1928,13 @@ { Error err; ProcessSP remote_process_sp = - platform_sp->Attach(m_options.attach_info, m_interpreter.GetDebugger(), NULL, m_interpreter.GetDebugger().GetListener(), err); + platform_sp->Attach(m_options.attach_info, m_interpreter.GetDebugger(), nullptr, m_interpreter.GetDebugger().GetListener(), err); if (err.Fail()) { result.AppendError(err.AsCString()); result.SetStatus (eReturnStatusFailed); } - else if (remote_process_sp.get() == NULL) + else if (remote_process_sp.get() == nullptr) { result.AppendError("could not attach: unknown reason"); result.SetStatus (eReturnStatusFailed); @@ -1965,11 +1965,11 @@ OptionDefinition CommandObjectPlatformProcessAttach::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "plugin", 'P', OptionParser::eRequiredArgument, NULL, 0, eArgTypePlugin, "Name of the process plugin you want to use."}, - { LLDB_OPT_SET_1, false, "pid", 'p', OptionParser::eRequiredArgument, NULL, 0, eArgTypePid, "The process ID of an existing process to attach to."}, - { LLDB_OPT_SET_2, false, "name", 'n', OptionParser::eRequiredArgument, NULL, 0, eArgTypeProcessName, "The name of the process to attach to."}, - { LLDB_OPT_SET_2, false, "waitfor",'w', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Wait for the the process with to launch."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "plugin", 'P', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePlugin, "Name of the process plugin you want to use."}, + { LLDB_OPT_SET_1, false, "pid", 'p', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePid, "The process ID of an existing process to attach to."}, + { LLDB_OPT_SET_2, false, "name", 'n', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeProcessName, "The name of the process to attach to."}, + { LLDB_OPT_SET_2, false, "waitfor",'w', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Wait for the the process with to launch."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -2102,7 +2102,7 @@ { m_options.NotifyOptionParsingStarting(); - const char* expr = NULL; + const char* expr = nullptr; // Print out an usage syntax on an empty command line. if (raw_command_line[0] == '\0') @@ -2114,7 +2114,7 @@ if (raw_command_line[0] == '-') { // We have some options and these options MUST end with --. - const char *end_options = NULL; + const char *end_options = nullptr; const char *s = raw_command_line; while (s && s[0]) { @@ -2141,14 +2141,14 @@ } } - if (expr == NULL) + if (expr == nullptr) expr = raw_command_line; PlatformSP platform_sp (m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform()); Error error; if (platform_sp) { - const char *working_dir = NULL; + const char *working_dir = nullptr; std::string output; int status = -1; int signo = -1; @@ -2192,8 +2192,8 @@ OptionDefinition CommandObjectPlatformShell::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "timeout", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeValue, "Seconds to wait for the remote host to finish running the command."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "timeout", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeValue, "Seconds to wait for the remote host to finish running the command."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; Index: source/Commands/CommandObjectPlugin.cpp =================================================================== --- source/Commands/CommandObjectPlugin.cpp +++ source/Commands/CommandObjectPlugin.cpp @@ -27,7 +27,7 @@ CommandObjectParsed (interpreter, "plugin load", "Import a dylib that implements an LLDB plugin.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentData cmd_arg; @@ -65,7 +65,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); Index: source/Commands/CommandObjectProcess.cpp =================================================================== --- source/Commands/CommandObjectProcess.cpp +++ source/Commands/CommandObjectProcess.cpp @@ -80,7 +80,7 @@ if (detach_error.Success()) { result.SetStatus (eReturnStatusSuccessFinishResult); - process = NULL; + process = nullptr; } else { @@ -94,7 +94,7 @@ if (destroy_error.Success()) { result.SetStatus (eReturnStatusSuccessFinishResult); - process = NULL; + process = nullptr; } else { @@ -121,7 +121,7 @@ CommandObjectProcessLaunchOrAttach (interpreter, "process launch", "Launch the executable in the debugger.", - NULL, + nullptr, eFlagRequiresTarget, "restart"), m_options (interpreter) @@ -163,7 +163,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -190,7 +190,7 @@ // If our listener is NULL, users aren't allows to launch ModuleSP exe_module_sp = target->GetExecutableModule(); - if (exe_module_sp == NULL) + if (exe_module_sp == nullptr) { result.AppendError ("no file in target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -399,7 +399,7 @@ // Look to see if there is a -P argument provided, and if so use that plugin, otherwise // use the default plugin. - const char *partial_name = NULL; + const char *partial_name = nullptr; partial_name = input.GetArgumentAtIndex(opt_arg_pos); PlatformSP platform_sp (m_interpreter.GetPlatform (true)); @@ -474,20 +474,20 @@ if (!StopProcessIfNecessary (process, state, result)) return false; - if (target == NULL) + if (target == nullptr) { // If there isn't a current target create one. TargetSP new_target_sp; Error error; error = m_interpreter.GetDebugger().GetTargetList().CreateTarget (m_interpreter.GetDebugger(), - NULL, - NULL, + nullptr, + nullptr, false, - NULL, // No platform options + nullptr, // No platform options new_target_sp); target = new_target_sp.get(); - if (target == NULL || error.Fail()) + if (target == nullptr || error.Fail()) { result.AppendError(error.AsCString("Error creating target")); return false; @@ -511,7 +511,7 @@ if (state != eStateConnected) { const char *plugin_name = m_options.attach_info.GetProcessPluginName(); - process = target->CreateProcess (m_interpreter.GetDebugger().GetListener(), plugin_name, NULL).get(); + process = target->CreateProcess (m_interpreter.GetDebugger().GetListener(), plugin_name, nullptr).get(); } if (process) @@ -540,7 +540,7 @@ if (error.Success()) { result.SetStatus (eReturnStatusSuccessContinuingNoResult); - StateType state = process->WaitForProcessToStop (NULL, NULL, false, listener_sp.get()); + StateType state = process->WaitForProcessToStop (nullptr, nullptr, false, listener_sp.get()); process->RestoreProcessEvents(); @@ -617,13 +617,13 @@ OptionDefinition CommandObjectProcessAttach::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "continue",'c', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Immediately continue the process once attached."}, -{ LLDB_OPT_SET_ALL, false, "plugin", 'P', OptionParser::eRequiredArgument, NULL, 0, eArgTypePlugin, "Name of the process plugin you want to use."}, -{ LLDB_OPT_SET_1, false, "pid", 'p', OptionParser::eRequiredArgument, NULL, 0, eArgTypePid, "The process ID of an existing process to attach to."}, -{ LLDB_OPT_SET_2, false, "name", 'n', OptionParser::eRequiredArgument, NULL, 0, eArgTypeProcessName, "The name of the process to attach to."}, -{ LLDB_OPT_SET_2, false, "include-existing", 'i', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Include existing processes when doing attach -w."}, -{ LLDB_OPT_SET_2, false, "waitfor", 'w', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Wait for the process with to launch."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_ALL, false, "continue",'c', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Immediately continue the process once attached."}, +{ LLDB_OPT_SET_ALL, false, "plugin", 'P', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePlugin, "Name of the process plugin you want to use."}, +{ LLDB_OPT_SET_1, false, "pid", 'p', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePid, "The process ID of an existing process to attach to."}, +{ LLDB_OPT_SET_2, false, "name", 'n', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeProcessName, "The name of the process to attach to."}, +{ LLDB_OPT_SET_2, false, "include-existing", 'i', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Include existing processes when doing attach -w."}, +{ LLDB_OPT_SET_2, false, "waitfor", 'w', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Wait for the process with to launch."}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -769,7 +769,7 @@ result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID()); if (synchronous_execution) { - state = process->WaitForProcessToStop (NULL); + state = process->WaitForProcessToStop (nullptr); result.SetDidChangeProcessState (true); result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state)); @@ -808,9 +808,9 @@ OptionDefinition CommandObjectProcessContinue::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "ignore-count",'i', OptionParser::eRequiredArgument, NULL, 0, eArgTypeUnsignedInteger, +{ LLDB_OPT_SET_ALL, false, "ignore-count",'i', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeUnsignedInteger, "Ignore crossings of the breakpoint (if it exists) for the currently selected thread."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -947,8 +947,8 @@ OptionDefinition CommandObjectProcessDetach::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "keep-stopped", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "Whether or not the process should be kept stopped on detach (if possible)." }, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "keep-stopped", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Whether or not the process should be kept stopped on detach (if possible)." }, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1061,10 +1061,10 @@ // If there isn't a current target create one. error = m_interpreter.GetDebugger().GetTargetList().CreateTarget (m_interpreter.GetDebugger(), - NULL, - NULL, + nullptr, + nullptr, false, - NULL, // No platform options + nullptr, // No platform options target_sp); if (!target_sp || error.Fail()) { @@ -1077,12 +1077,12 @@ if (command.GetArgumentCount() == 1) { - const char *plugin_name = NULL; + const char *plugin_name = nullptr; if (!m_options.plugin_name.empty()) plugin_name = m_options.plugin_name.c_str(); const char *remote_url = command.GetArgumentAtIndex(0); - process = target_sp->CreateProcess (m_interpreter.GetDebugger().GetListener(), plugin_name, NULL).get(); + process = target_sp->CreateProcess (m_interpreter.GetDebugger().GetListener(), plugin_name, nullptr).get(); if (process) { @@ -1119,8 +1119,8 @@ OptionDefinition CommandObjectProcessConnect::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "plugin", 'p', OptionParser::eRequiredArgument, NULL, 0, eArgTypePlugin, "Name of the process plugin you want to use."}, - { 0, false, NULL, 0 , 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "plugin", 'p', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePlugin, "Name of the process plugin you want to use."}, + { 0, false, nullptr, 0 , 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1151,7 +1151,7 @@ Process *process = m_interpreter.GetExecutionContext().GetProcessPtr(); if (process) return process->GetPluginCommandObject(); - return NULL; + return nullptr; } }; @@ -1290,7 +1290,7 @@ CommandObjectParsed (interpreter, "process signal", "Send a UNIX signal to the current process being debugged.", - NULL, + nullptr, eFlagRequiresProcess | eFlagTryTargetAPILock) { CommandArgumentEntry arg; @@ -1389,7 +1389,7 @@ CommandReturnObject &result) { Process *process = m_exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) { result.AppendError ("no process to halt"); result.SetStatus (eReturnStatusFailed); @@ -1451,7 +1451,7 @@ CommandReturnObject &result) { Process *process = m_exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) { result.AppendError ("no process to kill"); result.SetStatus (eReturnStatusFailed); @@ -1602,7 +1602,7 @@ CommandObjectParsed (interpreter, "process handle", "Show or update what the process and debugger should do with various signals received from the OS.", - NULL), + nullptr), m_options (interpreter) { SetHelpLong ("If no signals are specified, update them all. If no update option is specified, list the current values.\n"); @@ -1824,10 +1824,10 @@ OptionDefinition CommandObjectProcessHandle::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "stop", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "Whether or not the process should be stopped if the signal is received." }, -{ LLDB_OPT_SET_1, false, "notify", 'n', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "Whether or not the debugger should notify the user if the signal is received." }, -{ LLDB_OPT_SET_1, false, "pass", 'p', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "Whether or not the signal should be passed to the process." }, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "stop", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Whether or not the process should be stopped if the signal is received." }, +{ LLDB_OPT_SET_1, false, "notify", 'n', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Whether or not the debugger should notify the user if the signal is received." }, +{ LLDB_OPT_SET_1, false, "pass", 'p', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Whether or not the signal should be passed to the process." }, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- Index: source/Commands/CommandObjectRegister.cpp =================================================================== --- source/Commands/CommandObjectRegister.cpp +++ source/Commands/CommandObjectRegister.cpp @@ -45,7 +45,7 @@ CommandObjectParsed (interpreter, "register read", "Dump the contents of one or more register values from the current frame. If no register is specified, dumps them all.", - NULL, + nullptr, eFlagRequiresFrame | eFlagRequiresRegContext | eFlagProcessMustBeLaunched | @@ -176,7 +176,7 @@ Stream &strm = result.GetOutputStream(); RegisterContext *reg_ctx = m_exe_ctx.GetRegisterContext (); - const RegisterInfo *reg_info = NULL; + const RegisterInfo *reg_info = nullptr; if (command.GetArgumentCount() == 0) { size_t set_idx; @@ -187,7 +187,7 @@ { for (size_t i=0; iGetUInt64Value (UINT32_MAX, NULL); + set_idx = m_command_options.set_indexes[i]->GetUInt64Value (UINT32_MAX, nullptr); if (set_idx < reg_ctx->GetRegisterSetCount()) { if (!DumpRegisterSet (m_exe_ctx, strm, reg_ctx, set_idx)) @@ -235,7 +235,7 @@ else { const char *arg_cstr; - for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx) + for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr; ++arg_idx) { // in most LLDB commands we accept $rbx as the name for register RBX - and here we would // reject it and non-existant. we should be more consistent towards the user and allow them @@ -352,9 +352,9 @@ const OptionDefinition CommandObjectRegisterRead::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "alternate", 'A', OptionParser::eNoArgument , NULL, 0, eArgTypeNone , "Display register names using the alternate register name if there is one."}, - { LLDB_OPT_SET_1 , false, "set" , 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeIndex , "Specify which register sets to dump by index."}, - { LLDB_OPT_SET_2 , false, "all" , 'a', OptionParser::eNoArgument , NULL, 0, eArgTypeNone , "Show all register sets."}, + { LLDB_OPT_SET_ALL, false, "alternate", 'A', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone , "Display register names using the alternate register name if there is one."}, + { LLDB_OPT_SET_1 , false, "set" , 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeIndex , "Specify which register sets to dump by index."}, + { LLDB_OPT_SET_2 , false, "all" , 'a', OptionParser::eNoArgument , nullptr, 0, eArgTypeNone , "Show all register sets."}, }; uint32_t @@ -374,7 +374,7 @@ CommandObjectParsed (interpreter, "register write", "Modify a single register value.", - NULL, + nullptr, eFlagRequiresFrame | eFlagRequiresRegContext | eFlagProcessMustBeLaunched | Index: source/Commands/CommandObjectSettings.cpp =================================================================== --- source/Commands/CommandObjectSettings.cpp +++ source/Commands/CommandObjectSettings.cpp @@ -34,7 +34,7 @@ CommandObjectRaw (interpreter, "settings set", "Set or change the value of a single debugger setting variable.", - NULL), + nullptr), m_options (interpreter) { CommandArgumentEntry arg1; @@ -162,7 +162,7 @@ std::string completion_str (input.GetArgumentAtIndex (cursor_index), cursor_char_position); const size_t argc = input.GetArgumentCount(); - const char *arg = NULL; + const char *arg = nullptr; int setting_var_idx; for (setting_var_idx = 1; setting_var_idx < static_cast(argc); ++setting_var_idx) @@ -179,7 +179,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); } @@ -233,7 +233,7 @@ } const char *var_name = cmd_args.GetArgumentAtIndex (0); - if ((var_name == NULL) || (var_name[0] == '\0')) + if ((var_name == nullptr) || (var_name[0] == '\0')) { result.AppendError ("'settings set' command requires a valid variable name"); result.SetStatus (eReturnStatusFailed); @@ -248,7 +248,7 @@ Error error; if (m_options.m_global) { - error = m_interpreter.GetDebugger().SetPropertyValue (NULL, + error = m_interpreter.GetDebugger().SetPropertyValue (nullptr, eVarSetOperationAssign, var_name, var_value_cstr); @@ -289,8 +289,8 @@ OptionDefinition CommandObjectSettingsSet::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_2, false, "global", 'g', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Apply the new value to the global default value." }, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_2, false, "global", 'g', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Apply the new value to the global default value." }, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -305,7 +305,7 @@ CommandObjectParsed (interpreter, "settings show", "Show the specified internal debugger setting variable and its value, or show all the currently set variables and their values, if nothing is specified.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentData var_name_arg; @@ -342,7 +342,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -393,7 +393,7 @@ CommandObjectParsed (interpreter, "settings list", "List and describe all the internal debugger settings variables that are available to the user to 'set' or 'show', or describe a particular variable or set of variables (by specifying the variable name or a common prefix).", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData var_name_arg; @@ -434,7 +434,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -489,7 +489,7 @@ CommandObjectRaw (interpreter, "settings remove", "Remove the specified element from an array or dictionary settings variable.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentEntry arg2; @@ -543,7 +543,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); @@ -571,7 +571,7 @@ } const char *var_name = cmd_args.GetArgumentAtIndex (0); - if ((var_name == NULL) || (var_name[0] == '\0')) + if ((var_name == nullptr) || (var_name[0] == '\0')) { result.AppendError ("'settings set' command requires a valid variable name"); result.SetStatus (eReturnStatusFailed); @@ -609,7 +609,7 @@ CommandObjectRaw (interpreter, "settings replace", "Replace the specified element from an internal debugger settings array or dictionary variable with the specified new value.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentEntry arg2; @@ -678,7 +678,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); @@ -693,7 +693,7 @@ Args cmd_args(command); const char *var_name = cmd_args.GetArgumentAtIndex (0); - if ((var_name == NULL) || (var_name[0] == '\0')) + if ((var_name == nullptr) || (var_name[0] == '\0')) { result.AppendError ("'settings replace' command requires a valid variable name; No value supplied"); result.SetStatus (eReturnStatusFailed); @@ -737,7 +737,7 @@ CommandObjectRaw (interpreter, "settings insert-before", "Insert value(s) into an internal debugger settings array variable, immediately before the specified element.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentEntry arg2; @@ -799,7 +799,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); @@ -823,7 +823,7 @@ } const char *var_name = cmd_args.GetArgumentAtIndex (0); - if ((var_name == NULL) || (var_name[0] == '\0')) + if ((var_name == nullptr) || (var_name[0] == '\0')) { result.AppendError ("'settings insert-before' command requires a valid variable name; No value supplied"); result.SetStatus (eReturnStatusFailed); @@ -861,7 +861,7 @@ CommandObjectRaw (interpreter, "settings insert-after", "Insert value(s) into an internal debugger settings array variable, immediately after the specified element.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentEntry arg2; @@ -923,7 +923,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); @@ -947,7 +947,7 @@ } const char *var_name = cmd_args.GetArgumentAtIndex (0); - if ((var_name == NULL) || (var_name[0] == '\0')) + if ((var_name == nullptr) || (var_name[0] == '\0')) { result.AppendError ("'settings insert-after' command requires a valid variable name; No value supplied"); result.SetStatus (eReturnStatusFailed); @@ -985,7 +985,7 @@ CommandObjectRaw (interpreter, "settings append", "Append a new value to the end of an internal debugger settings array, dictionary or string variable.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentEntry arg2; @@ -1037,7 +1037,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); @@ -1060,7 +1060,7 @@ } const char *var_name = cmd_args.GetArgumentAtIndex (0); - if ((var_name == NULL) || (var_name[0] == '\0')) + if ((var_name == nullptr) || (var_name[0] == '\0')) { result.AppendError ("'settings append' command requires a valid variable name; No value supplied"); result.SetStatus (eReturnStatusFailed); @@ -1101,7 +1101,7 @@ CommandObjectParsed (interpreter, "settings clear", "Erase all the contents of an internal debugger settings variables; this is only valid for variables with clearable types, i.e. strings, arrays or dictionaries.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData var_name_arg; @@ -1139,7 +1139,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); @@ -1161,7 +1161,7 @@ } const char *var_name = command.GetArgumentAtIndex (0); - if ((var_name == NULL) || (var_name[0] == '\0')) + if ((var_name == nullptr) || (var_name[0] == '\0')) { result.AppendError ("'settings clear' command requires a valid variable name; No value supplied"); result.SetStatus (eReturnStatusFailed); @@ -1171,7 +1171,7 @@ Error error (m_interpreter.GetDebugger().SetPropertyValue (&m_exe_ctx, eVarSetOperationClear, var_name, - NULL)); + nullptr)); if (error.Fail()) { result.AppendError (error.AsCString()); Index: source/Commands/CommandObjectSource.cpp =================================================================== --- source/Commands/CommandObjectSource.cpp +++ source/Commands/CommandObjectSource.cpp @@ -138,9 +138,9 @@ OptionDefinition CommandObjectSourceInfo::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "line", 'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLineNum, "The line number at which to start the display source."}, -{ LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "The file from which to display source."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "line", 'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLineNum, "The line number at which to start the display source."}, +{ LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "The file from which to display source."}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #pragma mark CommandObjectSourceList @@ -252,7 +252,7 @@ CommandObjectParsed (interpreter, "source list", "Display source code (as specified) based on the current executable's debug info.", - NULL, + nullptr, eFlagRequiresTarget), m_options (interpreter) { @@ -373,7 +373,7 @@ uint32_t end_line; FileSpec end_file; - if (sc.block == NULL) + if (sc.block == nullptr) { // Not an inlined function sc.function->GetStartLineSourceInfo (start_file, start_line); @@ -654,7 +654,7 @@ } else { - so_addr.Dump(&error_strm, NULL, Address::DumpStyleModuleWithFileAddress); + so_addr.Dump(&error_strm, nullptr, Address::DumpStyleModuleWithFileAddress); result.AppendErrorWithFormat("address resolves to %s, but there is no line table information available for this address.\n", error_strm.GetData()); result.SetStatus (eReturnStatusFailed); @@ -808,7 +808,7 @@ if (num_matches > 1) { bool got_multiple = false; - FileSpec *test_cu_spec = NULL; + FileSpec *test_cu_spec = nullptr; for (unsigned i = 0; i < num_matches; i++) { @@ -880,7 +880,7 @@ { if (m_breakpoint_locations.GetFileLineMatches().GetSize() > 0) return &m_breakpoint_locations.GetFileLineMatches(); - return NULL; + return nullptr; } CommandOptions m_options; FileLineResolver m_breakpoint_locations; @@ -891,16 +891,16 @@ OptionDefinition CommandObjectSourceList::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "count", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCount, "The number of source lines to display."}, +{ LLDB_OPT_SET_ALL, false, "count", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCount, "The number of source lines to display."}, { LLDB_OPT_SET_1 | - LLDB_OPT_SET_2 , false, "shlib", 's', OptionParser::eRequiredArgument, NULL, CommandCompletions::eModuleCompletion, eArgTypeShlibName, "Look up the source file in the given shared library."}, -{ LLDB_OPT_SET_ALL, false, "show-breakpoints", 'b', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Show the line table locations from the debug information that indicate valid places to set source level breakpoints."}, -{ LLDB_OPT_SET_1 , false, "file", 'f', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "The file from which to display source."}, -{ LLDB_OPT_SET_1 , false, "line", 'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLineNum, "The line number at which to start the display source."}, -{ LLDB_OPT_SET_2 , false, "name", 'n', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSymbolCompletion, eArgTypeSymbol, "The name of a function whose source to display."}, -{ LLDB_OPT_SET_3 , false, "address",'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeAddressOrExpression, "Lookup the address and display the source information for the corresponding file and line."}, -{ LLDB_OPT_SET_4, false, "reverse", 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Reverse the listing to look backwards from the last displayed block of source."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + LLDB_OPT_SET_2 , false, "shlib", 's', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eModuleCompletion, eArgTypeShlibName, "Look up the source file in the given shared library."}, +{ LLDB_OPT_SET_ALL, false, "show-breakpoints", 'b', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Show the line table locations from the debug information that indicate valid places to set source level breakpoints."}, +{ LLDB_OPT_SET_1 , false, "file", 'f', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "The file from which to display source."}, +{ LLDB_OPT_SET_1 , false, "line", 'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLineNum, "The line number at which to start the display source."}, +{ LLDB_OPT_SET_2 , false, "name", 'n', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSymbolCompletion, eArgTypeSymbol, "The name of a function whose source to display."}, +{ LLDB_OPT_SET_3 , false, "address",'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeAddressOrExpression, "Lookup the address and display the source information for the corresponding file and line."}, +{ LLDB_OPT_SET_4, false, "reverse", 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Reverse the listing to look backwards from the last displayed block of source."}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #pragma mark CommandObjectMultiwordSource Index: source/Commands/CommandObjectSyntax.cpp =================================================================== --- source/Commands/CommandObjectSyntax.cpp +++ source/Commands/CommandObjectSyntax.cpp @@ -78,10 +78,10 @@ } } - if (all_okay && (cmd_obj != NULL)) + if (all_okay && (cmd_obj != nullptr)) { Stream &output_strm = result.GetOutputStream(); - if (cmd_obj->GetOptions() != NULL) + if (cmd_obj->GetOptions() != nullptr) { output_strm.Printf ("\nSyntax: %s\n", cmd_obj->GetSyntax()); output_strm.Printf ("(Try 'help %s' for more information on command options syntax.)\n", Index: source/Commands/CommandObjectTarget.cpp =================================================================== --- source/Commands/CommandObjectTarget.cpp +++ source/Commands/CommandObjectTarget.cpp @@ -155,7 +155,7 @@ CommandObjectParsed (interpreter, "target create", "Create a target using the argument as the main executable.", - NULL), + nullptr), m_option_group (interpreter), m_arch_option (), m_platform_options(true), // Do include the "--platform" option in the platform settings by passing true @@ -216,7 +216,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -353,7 +353,7 @@ core_file_dir.GetDirectory() = core_file.GetDirectory(); target_sp->GetExecutableSearchPaths ().Append (core_file_dir); - ProcessSP process_sp (target_sp->CreateProcess (m_interpreter.GetDebugger().GetListener(), NULL, &core_file)); + ProcessSP process_sp (target_sp->CreateProcess (m_interpreter.GetDebugger().GetListener(), nullptr, &core_file)); if (process_sp) { @@ -429,7 +429,7 @@ CommandObjectParsed (interpreter, "target list", "List all current targets in the current debug session.", - NULL, + nullptr, 0) { } @@ -477,7 +477,7 @@ CommandObjectParsed (interpreter, "target select", "Select a target as the current target by target index.", - NULL, + nullptr, 0) { } @@ -553,7 +553,7 @@ CommandObjectParsed (interpreter, "target delete", "Delete one or more targets by target index.", - NULL, + nullptr, 0), m_option_group (interpreter), m_cleanup_option (LLDB_OPT_SET_1, false, "clean", 'c', "Perform extra cleanup to minimize memory consumption after deleting the target.", false, false) @@ -684,7 +684,7 @@ CommandObjectParsed (interpreter, "target variable", "Read global variable(s) prior to, or while running your binary.", - NULL, + nullptr, eFlagRequiresTarget), m_option_group (interpreter), m_option_variable (false), // Don't include frame options @@ -912,7 +912,7 @@ { bool success = false; StackFrame *frame = m_exe_ctx.GetFramePtr(); - CompileUnit *comp_unit = NULL; + CompileUnit *comp_unit = nullptr; if (frame) { SymbolContext sc = frame->GetSymbolContext (eSymbolContextCompUnit); @@ -1047,7 +1047,7 @@ CommandObjectParsed (interpreter, "target modules search-paths add", "Add new image search paths substitution pairs to the current target.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData old_prefix_arg; @@ -1173,7 +1173,7 @@ CommandObjectParsed (interpreter, "target modules search-paths insert", "Insert a new image search path substitution pair into the current target at the specified index.", - NULL) + nullptr) { CommandArgumentEntry arg1; CommandArgumentEntry arg2; @@ -1338,7 +1338,7 @@ CommandObjectParsed (interpreter, "target modules search-paths query", "Transform a path using the first applicable image search path.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData path_arg; @@ -1752,7 +1752,7 @@ { ConstString function_name (name); num_matches = module->FindFunctions (function_name, - NULL, + nullptr, eFunctionNameTypeAuto, include_symbols, include_inlines, @@ -2018,7 +2018,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -2080,7 +2080,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -2098,7 +2098,7 @@ CommandObjectTargetModulesModuleAutoComplete (interpreter, "target modules dump symtab", "Dump the symbol table from one or more target modules.", - NULL), + nullptr), m_options (interpreter) { } @@ -2175,7 +2175,7 @@ CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -2222,7 +2222,7 @@ { // Dump specified images (by basename or fullpath) const char *arg_cstr; - for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx) + for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr; ++arg_idx) { ModuleList module_list; const size_t num_matches = FindModulesByName (target, arg_cstr, module_list, true); @@ -2268,7 +2268,7 @@ { eSortOrderNone, "none", "No sorting, use the original symbol table order."}, { eSortOrderByAddress, "address", "Sort output by symbol address."}, { eSortOrderByName, "name", "Sort output by symbol name."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; @@ -2276,7 +2276,7 @@ CommandObjectTargetModulesDumpSymtab::CommandOptions::g_option_table[] = { { LLDB_OPT_SET_1, false, "sort", 's', OptionParser::eRequiredArgument, g_sort_option_enumeration, 0, eArgTypeSortOrder, "Supply a sort order when dumping the symbol table."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #pragma mark CommandObjectTargetModulesDumpSections @@ -2293,7 +2293,7 @@ "target modules dump sections", "Dump the sections from one or more target modules.", //"target modules dump sections [ ...]") - NULL) + nullptr) { } @@ -2308,7 +2308,7 @@ CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -2346,7 +2346,7 @@ { // Dump specified images (by basename or fullpath) const char *arg_cstr; - for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx) + for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr; ++arg_idx) { ModuleList module_list; const size_t num_matches = FindModulesByName (target, arg_cstr, module_list, true); @@ -2399,7 +2399,7 @@ "target modules dump symfile", "Dump the debug symbol file for one or more target modules.", //"target modules dump symfile [ ...]") - NULL) + nullptr) { } @@ -2414,7 +2414,7 @@ CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -2454,7 +2454,7 @@ { // Dump specified images (by basename or fullpath) const char *arg_cstr; - for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx) + for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr; ++arg_idx) { ModuleList module_list; const size_t num_matches = FindModulesByName (target, arg_cstr, module_list, true); @@ -2501,7 +2501,7 @@ CommandObjectTargetModulesSourceFileAutoComplete (interpreter, "target modules dump line-table", "Dump the line table for one or more compilation units.", - NULL, + nullptr, eFlagRequiresTarget) { } @@ -2532,7 +2532,7 @@ { // Dump specified images (by basename or fullpath) const char *arg_cstr; - for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx) + for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr; ++arg_idx) { FileSpec file_spec(arg_cstr, false); @@ -2646,7 +2646,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -2662,7 +2662,7 @@ CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -2837,7 +2837,7 @@ CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -3082,7 +3082,7 @@ { unsigned long width = 0; if (option_arg) - width = strtoul (option_arg, NULL, 0); + width = strtoul (option_arg, nullptr, 0); m_format_array.push_back(std::make_pair(short_option, width)); } return error; @@ -3145,7 +3145,7 @@ // object which might lock its contents below (through the "module_list_ptr" // variable). ModuleList module_list; - if (target == NULL && use_global_module_list == false) + if (target == nullptr && use_global_module_list == false) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -3199,7 +3199,7 @@ Mutex::Locker locker; // This locker will be locked on the mutex in module_list_ptr if it is non-NULL. // Otherwise it will lock the AllocationModuleCollectionMutex when accessing // the global module list directly. - const ModuleList *module_list_ptr = NULL; + const ModuleList *module_list_ptr = nullptr; const size_t argc = command.GetArgumentCount(); if (argc == 0) { @@ -3234,7 +3234,7 @@ module_list_ptr = &module_list; } - if (module_list_ptr != NULL) + if (module_list_ptr != nullptr) { locker.Lock(module_list_ptr->GetMutex()); num_modules = module_list_ptr->GetSize(); @@ -3290,7 +3290,7 @@ PrintModule (Target *target, Module *module, int indent, Stream &strm) { - if (module == NULL) + if (module == nullptr) { strm.PutCString("Null module"); return; @@ -3457,22 +3457,22 @@ OptionDefinition CommandObjectTargetModulesList::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "address", 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeAddressOrExpression, "Display the image at this address."}, - { LLDB_OPT_SET_1, false, "arch", 'A', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the architecture when listing images."}, - { LLDB_OPT_SET_1, false, "triple", 't', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the triple when listing images."}, - { LLDB_OPT_SET_1, false, "header", 'h', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Display the image header address as a load address if debugging, a file address otherwise."}, - { LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Display the image header address offset from the header file address (the slide amount)."}, - { LLDB_OPT_SET_1, false, "uuid", 'u', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Display the UUID when listing images."}, - { LLDB_OPT_SET_1, false, "fullpath", 'f', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the fullpath to the image object file."}, - { LLDB_OPT_SET_1, false, "directory", 'd', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the directory with optional width for the image object file."}, - { LLDB_OPT_SET_1, false, "basename", 'b', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the basename with optional width for the image object file."}, - { LLDB_OPT_SET_1, false, "symfile", 's', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the fullpath to the image symbol file with optional width."}, - { LLDB_OPT_SET_1, false, "symfile-unique", 'S', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the symbol file with optional width only if it is different from the executable object file."}, - { LLDB_OPT_SET_1, false, "mod-time", 'm', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the modification time with optional width of the module."}, - { LLDB_OPT_SET_1, false, "ref-count", 'r', OptionParser::eOptionalArgument, NULL, 0, eArgTypeWidth, "Display the reference count if the module is still in the shared module cache."}, - { LLDB_OPT_SET_1, false, "pointer", 'p', OptionParser::eOptionalArgument, NULL, 0, eArgTypeNone, "Display the module pointer."}, - { LLDB_OPT_SET_1, false, "global", 'g', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Display the modules from the global module list, not just the current target."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_1, false, "address", 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeAddressOrExpression, "Display the image at this address."}, + { LLDB_OPT_SET_1, false, "arch", 'A', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the architecture when listing images."}, + { LLDB_OPT_SET_1, false, "triple", 't', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the triple when listing images."}, + { LLDB_OPT_SET_1, false, "header", 'h', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Display the image header address as a load address if debugging, a file address otherwise."}, + { LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Display the image header address offset from the header file address (the slide amount)."}, + { LLDB_OPT_SET_1, false, "uuid", 'u', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Display the UUID when listing images."}, + { LLDB_OPT_SET_1, false, "fullpath", 'f', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the fullpath to the image object file."}, + { LLDB_OPT_SET_1, false, "directory", 'd', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the directory with optional width for the image object file."}, + { LLDB_OPT_SET_1, false, "basename", 'b', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the basename with optional width for the image object file."}, + { LLDB_OPT_SET_1, false, "symfile", 's', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the fullpath to the image symbol file with optional width."}, + { LLDB_OPT_SET_1, false, "symfile-unique", 'S', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the symbol file with optional width only if it is different from the executable object file."}, + { LLDB_OPT_SET_1, false, "mod-time", 'm', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the modification time with optional width of the module."}, + { LLDB_OPT_SET_1, false, "ref-count", 'r', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeWidth, "Display the reference count if the module is still in the shared module cache."}, + { LLDB_OPT_SET_1, false, "pointer", 'p', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeNone, "Display the module pointer."}, + { LLDB_OPT_SET_1, false, "global", 'g', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Display the modules from the global module list, not just the current target."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #pragma mark CommandObjectTargetModulesShowUnwind @@ -3576,7 +3576,7 @@ CommandObjectParsed (interpreter, "target modules show-unwind", "Show synthesized unwind instructions for a function.", - NULL, + nullptr, eFlagRequiresTarget | eFlagRequiresProcess | eFlagProcessMustBeLaunched | @@ -3604,11 +3604,11 @@ { Target *target = m_exe_ctx.GetTargetPtr(); Process *process = m_exe_ctx.GetProcessPtr(); - ABI *abi = NULL; + ABI *abi = nullptr; if (process) abi = process->GetABI().get(); - if (process == NULL) + if (process == nullptr) { result.AppendError ("You must have a process running to use this command."); result.SetStatus (eReturnStatusFailed); @@ -3624,7 +3624,7 @@ } ThreadSP thread(threads.GetThreadAtIndex(0)); - if (thread.get() == NULL) + if (thread.get() == nullptr) { result.AppendError ("The process must be paused to use this command."); result.SetStatus (eReturnStatusFailed); @@ -3671,9 +3671,9 @@ { SymbolContext sc; sc_list.GetContextAtIndex(idx, sc); - if (sc.symbol == NULL && sc.function == NULL) + if (sc.symbol == nullptr && sc.function == nullptr) continue; - if (sc.module_sp.get() == NULL || sc.module_sp->GetObjectFile() == NULL) + if (sc.module_sp.get() == nullptr || sc.module_sp->GetObjectFile() == nullptr) continue; AddressRange range; if (!sc.GetAddressRange (eSymbolContextFunction | eSymbolContextSymbol, 0, false, range)) @@ -3688,7 +3688,7 @@ start_addr = abi->FixCodeAddress(start_addr); FuncUnwindersSP func_unwinders_sp (sc.module_sp->GetObjectFile()->GetUnwindTable().GetUncachedFuncUnwindersContainingAddress(start_addr, sc)); - if (func_unwinders_sp.get() == NULL) + if (func_unwinders_sp.get() == nullptr) continue; Address first_non_prologue_insn (func_unwinders_sp->GetFirstNonPrologueInsn(*target)); @@ -3742,9 +3742,9 @@ OptionDefinition CommandObjectTargetModulesShowUnwind::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "name", 'n', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFunctionName, "Show unwind instructions for a function or symbol name."}, - { LLDB_OPT_SET_2, false, "address", 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeAddressOrExpression, "Show unwind instructions for a function or symbol containing an address"}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_1, false, "name", 'n', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFunctionName, "Show unwind instructions for a function or symbol name."}, + { LLDB_OPT_SET_2, false, "address", 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeAddressOrExpression, "Show unwind instructions for a function or symbol containing an address"}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //---------------------------------------------------------------------- @@ -3896,7 +3896,7 @@ CommandObjectParsed (interpreter, "target modules lookup", "Look up information within executable and dependent shared library images.", - NULL, + nullptr, eFlagRequiresTarget), m_options (interpreter) { @@ -4079,7 +4079,7 @@ CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -4143,7 +4143,7 @@ { // Dump specified images (by basename or fullpath) const char *arg_cstr; - for (i = 0; (arg_cstr = command.GetArgumentAtIndex(i)) != NULL && syntax_error == false; ++i) + for (i = 0; (arg_cstr = command.GetArgumentAtIndex(i)) != nullptr && syntax_error == false; ++i) { ModuleList module_list; const size_t num_matches = FindModulesByName (target, arg_cstr, module_list, false); @@ -4181,22 +4181,22 @@ OptionDefinition CommandObjectTargetModulesLookup::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, true, "address", 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeAddressOrExpression, "Lookup an address in one or more target modules."}, - { LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOffset, "When looking up an address subtract from any addresses before doing the lookup."}, + { LLDB_OPT_SET_1, true, "address", 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeAddressOrExpression, "Lookup an address in one or more target modules."}, + { LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeOffset, "When looking up an address subtract from any addresses before doing the lookup."}, { LLDB_OPT_SET_2| LLDB_OPT_SET_4 | LLDB_OPT_SET_5 /* FIXME: re-enable this for types when the LookupTypeInModule actually uses the regex option: | LLDB_OPT_SET_6 */ , - false, "regex", 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "The argument for name lookups are regular expressions."}, - { LLDB_OPT_SET_2, true, "symbol", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeSymbol, "Lookup a symbol by name in the symbol tables in one or more target modules."}, - { LLDB_OPT_SET_3, true, "file", 'f', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFilename, "Lookup a file by fullpath or basename in one or more target modules."}, - { LLDB_OPT_SET_3, false, "line", 'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLineNum, "Lookup a line number in a file (must be used in conjunction with --file)."}, + false, "regex", 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "The argument for name lookups are regular expressions."}, + { LLDB_OPT_SET_2, true, "symbol", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeSymbol, "Lookup a symbol by name in the symbol tables in one or more target modules."}, + { LLDB_OPT_SET_3, true, "file", 'f', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFilename, "Lookup a file by fullpath or basename in one or more target modules."}, + { LLDB_OPT_SET_3, false, "line", 'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLineNum, "Lookup a line number in a file (must be used in conjunction with --file)."}, { LLDB_OPT_SET_FROM_TO(3,5), - false, "no-inlines", 'i', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Ignore inline entries (must be used in conjunction with --file or --function)."}, - { LLDB_OPT_SET_4, true, "function", 'F', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFunctionName, "Lookup a function by name in the debug symbols in one or more target modules."}, - { LLDB_OPT_SET_5, true, "name", 'n', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFunctionOrSymbol, "Lookup a function or symbol by name in one or more target modules."}, - { LLDB_OPT_SET_6, true, "type", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Lookup a type by name in the debug symbols in one or more target modules."}, - { LLDB_OPT_SET_ALL, false, "verbose", 'v', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Enable verbose lookup information."}, - { LLDB_OPT_SET_ALL, false, "all", 'A', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Print all matches, not just the best match, if a best match is available."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + false, "no-inlines", 'i', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Ignore inline entries (must be used in conjunction with --file or --function)."}, + { LLDB_OPT_SET_4, true, "function", 'F', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFunctionName, "Lookup a function by name in the debug symbols in one or more target modules."}, + { LLDB_OPT_SET_5, true, "name", 'n', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFunctionOrSymbol, "Lookup a function or symbol by name in one or more target modules."}, + { LLDB_OPT_SET_6, true, "type", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Lookup a type by name in the debug symbols in one or more target modules."}, + { LLDB_OPT_SET_ALL, false, "verbose", 'v', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Enable verbose lookup information."}, + { LLDB_OPT_SET_ALL, false, "all", 'A', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Print all matches, not just the best match, if a best match is available."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -4312,7 +4312,7 @@ completion_str.c_str(), match_start_point, max_return_elements, - NULL, + nullptr, word_complete, matches); return matches.GetSize(); @@ -5046,7 +5046,7 @@ m_interpreter.GetLLDBCommandsFromIOHandler ("> ", // Prompt *this, // IOHandlerDelegate true, // Run IOHandler in async mode - NULL); // Baton for the "io_handler" that will be passed back into our IOHandlerDelegate functions + nullptr); // Baton for the "io_handler" that will be passed back into our IOHandlerDelegate functions } result.SetStatus (eReturnStatusSuccessFinishNoResult); @@ -5067,29 +5067,29 @@ OptionDefinition CommandObjectTargetStopHookAdd::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "one-liner", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOneLiner, + { LLDB_OPT_SET_ALL, false, "one-liner", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeOneLiner, "Specify a one-line breakpoint command inline. Be sure to surround it with quotes." }, - { LLDB_OPT_SET_ALL, false, "shlib", 's', OptionParser::eRequiredArgument, NULL, CommandCompletions::eModuleCompletion, eArgTypeShlibName, + { LLDB_OPT_SET_ALL, false, "shlib", 's', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eModuleCompletion, eArgTypeShlibName, "Set the module within which the stop-hook is to be run."}, - { LLDB_OPT_SET_ALL, false, "thread-index", 'x', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadIndex, + { LLDB_OPT_SET_ALL, false, "thread-index", 'x', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadIndex, "The stop hook is run only for the thread whose index matches this argument."}, - { LLDB_OPT_SET_ALL, false, "thread-id", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadID, + { LLDB_OPT_SET_ALL, false, "thread-id", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadID, "The stop hook is run only for the thread whose TID matches this argument."}, - { LLDB_OPT_SET_ALL, false, "thread-name", 'T', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadName, + { LLDB_OPT_SET_ALL, false, "thread-name", 'T', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadName, "The stop hook is run only for the thread whose thread name matches this argument."}, - { LLDB_OPT_SET_ALL, false, "queue-name", 'q', OptionParser::eRequiredArgument, NULL, 0, eArgTypeQueueName, + { LLDB_OPT_SET_ALL, false, "queue-name", 'q', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeQueueName, "The stop hook is run only for threads in the queue whose name is given by this argument."}, - { LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, + { LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "Specify the source file within which the stop-hook is to be run." }, - { LLDB_OPT_SET_1, false, "start-line", 'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLineNum, + { LLDB_OPT_SET_1, false, "start-line", 'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLineNum, "Set the start of the line range for which the stop-hook is to be run."}, - { LLDB_OPT_SET_1, false, "end-line", 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLineNum, + { LLDB_OPT_SET_1, false, "end-line", 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLineNum, "Set the end of the line range for which the stop-hook is to be run."}, - { LLDB_OPT_SET_2, false, "classname", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeClassName, + { LLDB_OPT_SET_2, false, "classname", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeClassName, "Specify the class within which the stop-hook is to be run." }, - { LLDB_OPT_SET_3, false, "name", 'n', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, + { LLDB_OPT_SET_3, false, "name", 'n', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, "Set the function name within which the stop hook will be run." }, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #pragma mark CommandObjectTargetStopHookDelete Index: source/Commands/CommandObjectThread.cpp =================================================================== --- source/Commands/CommandObjectThread.cpp +++ source/Commands/CommandObjectThread.cpp @@ -137,7 +137,7 @@ CommandObjectParsed (interpreter, "thread backtrace", "Show the stack for one or more threads. If no threads are specified, show the currently selected thread. Use the thread-index \"all\" to see all threads.", - NULL, + nullptr, eFlagRequiresProcess | eFlagRequiresThread | eFlagTryTargetAPILock | @@ -305,10 +305,10 @@ OptionDefinition CommandObjectThreadBacktrace::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCount, "How many frames to display (-1 for all)"}, -{ LLDB_OPT_SET_1, false, "start", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFrameIndex, "Frame in which to start the backtrace"}, -{ LLDB_OPT_SET_1, false, "extended", 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "Show the extended backtrace, if available"}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCount, "How many frames to display (-1 for all)"}, +{ LLDB_OPT_SET_1, false, "start", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFrameIndex, "Frame in which to start the backtrace"}, +{ LLDB_OPT_SET_1, false, "extended", 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Show the extended backtrace, if available"}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; enum StepScope @@ -478,12 +478,12 @@ bool synchronous_execution = m_interpreter.GetSynchronous(); const uint32_t num_threads = process->GetThreadList().GetSize(); - Thread *thread = NULL; + Thread *thread = nullptr; if (command.GetArgumentCount() == 0) { thread = process->GetThreadList().GetSelectedThread().get(); - if (thread == NULL) + if (thread == nullptr) { result.AppendError ("no selected thread in process"); result.SetStatus (eReturnStatusFailed); @@ -501,7 +501,7 @@ return false; } thread = process->GetThreadList().FindThreadByIndexID(step_thread_idx).get(); - if (thread == NULL) + if (thread == nullptr) { result.AppendErrorWithFormat ("Thread index %u is out of range (valid values are 0 - %u).\n", step_thread_idx, num_threads); @@ -581,7 +581,7 @@ else if (m_step_type == eStepTypeOut) { new_plan_sp = thread->QueueThreadPlanForStepOut (abort_other_plans, - NULL, + nullptr, false, bool_stop_other_threads, eVoteYes, @@ -610,7 +610,7 @@ if (synchronous_execution) { - StateType state = process->WaitForProcessToStop (NULL); + StateType state = process->WaitForProcessToStop (nullptr); //EventSP event_sp; //StateType state = process->WaitForStateChangedEvents (NULL, event_sp); @@ -648,7 +648,7 @@ { eOnlyThisThread, "this-thread", "Run only this thread"}, { eAllThreads, "all-threads", "Run all threads"}, { eOnlyDuringStepping, "while-stepping", "Run only this thread while stepping"}, -{ 0, NULL, NULL } +{ 0, nullptr, nullptr } }; static OptionEnumValueElement @@ -656,18 +656,18 @@ { { eOnlyThisThread, "this-thread", "Run only this thread"}, { eAllThreads, "all-threads", "Run all threads"}, -{ 0, NULL, NULL } +{ 0, nullptr, nullptr } }; OptionDefinition CommandObjectThreadStepWithTypeAndScope::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "step-in-avoids-no-debug", 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "A boolean value that sets whether stepping into functions will step over functions with no debug information."}, -{ LLDB_OPT_SET_1, false, "step-out-avoids-no-debug", 'A', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "A boolean value, if true stepping out of functions will continue to step out till it hits a function with debug information."}, +{ LLDB_OPT_SET_1, false, "step-in-avoids-no-debug", 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "A boolean value that sets whether stepping into functions will step over functions with no debug information."}, +{ LLDB_OPT_SET_1, false, "step-out-avoids-no-debug", 'A', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "A boolean value, if true stepping out of functions will continue to step out till it hits a function with debug information."}, { LLDB_OPT_SET_1, false, "run-mode", 'm', OptionParser::eRequiredArgument, g_tri_running_mode, 0, eArgTypeRunMode, "Determine how to run other threads while stepping the current thread."}, -{ LLDB_OPT_SET_1, false, "step-over-regexp",'r', OptionParser::eRequiredArgument, NULL, 0, eArgTypeRegularExpression, "A regular expression that defines function names to not to stop at when stepping in."}, -{ LLDB_OPT_SET_1, false, "step-in-target", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFunctionName, "The name of the directly called function step in should stop at when stepping into."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_1, false, "step-over-regexp",'r', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeRegularExpression, "A regular expression that defines function names to not to stop at when stepping in."}, +{ LLDB_OPT_SET_1, false, "step-in-target", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFunctionName, "The name of the directly called function step in should stop at when stepping into."}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -683,7 +683,7 @@ CommandObjectParsed (interpreter, "thread continue", "Continue execution of one or more threads in an active process.", - NULL, + nullptr, eFlagRequiresThread | eFlagTryTargetAPILock | eFlagProcessMustBeLaunched | @@ -722,7 +722,7 @@ } Process *process = m_exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) { result.AppendError ("no process exists. Cannot continue"); result.SetStatus (eReturnStatusFailed); @@ -814,7 +814,7 @@ Mutex::Locker locker (process->GetThreadList().GetMutex()); const uint32_t num_threads = process->GetThreadList().GetSize(); Thread *current_thread = process->GetThreadList().GetSelectedThread().get(); - if (current_thread == NULL) + if (current_thread == nullptr) { result.AppendError ("the process doesn't have a current thread"); result.SetStatus (eReturnStatusFailed); @@ -844,7 +844,7 @@ result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID()); if (synchronous_execution) { - state = process->WaitForProcessToStop (NULL); + state = process->WaitForProcessToStop (nullptr); result.SetDidChangeProcessState (true); result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state)); @@ -977,7 +977,7 @@ CommandObjectParsed (interpreter, "thread until", "Run the current or specified thread until it reaches a given line number or leaves the current function.", - NULL, + nullptr, eFlagRequiresThread | eFlagTryTargetAPILock | eFlagProcessMustBeLaunched | @@ -1018,7 +1018,7 @@ bool synchronous_execution = m_interpreter.GetSynchronous (); Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("invalid target, create a debug target using the 'target create' command"); result.SetStatus (eReturnStatusFailed); @@ -1026,7 +1026,7 @@ } Process *process = m_exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) { result.AppendError ("need a valid process to step"); result.SetStatus (eReturnStatusFailed); @@ -1034,7 +1034,7 @@ } else { - Thread *thread = NULL; + Thread *thread = nullptr; uint32_t line_number; if (command.GetArgumentCount() != 1) @@ -1061,7 +1061,7 @@ thread = process->GetThreadList().FindThreadByIndexID(m_options.m_thread_idx).get(); } - if (thread == NULL) + if (thread == nullptr) { const uint32_t num_threads = process->GetThreadList().GetSize(); result.AppendErrorWithFormat ("Thread index %u is out of range (valid values are 0 - %u).\n", @@ -1074,7 +1074,7 @@ const bool abort_other_plans = false; StackFrame *frame = thread->GetStackFrameAtIndex(m_options.m_frame_idx).get(); - if (frame == NULL) + if (frame == nullptr) { result.AppendErrorWithFormat ("Frame index %u is out of range for thread %u.\n", @@ -1090,11 +1090,11 @@ { // Finally we got here... Translate the given line number to a bunch of addresses: SymbolContext sc(frame->GetSymbolContext (eSymbolContextCompUnit)); - LineTable *line_table = NULL; + LineTable *line_table = nullptr; if (sc.comp_unit) line_table = sc.comp_unit->GetLineTable(); - if (line_table == NULL) + if (line_table == nullptr) { result.AppendErrorWithFormat ("Failed to resolve the line table for frame %u of thread index %u.\n", m_options.m_frame_idx, m_options.m_thread_idx); @@ -1175,7 +1175,7 @@ result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID()); if (synchronous_execution) { - StateType state = process->WaitForProcessToStop (NULL); + StateType state = process->WaitForProcessToStop (nullptr); result.SetDidChangeProcessState (true); result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state)); @@ -1203,10 +1203,10 @@ OptionDefinition CommandObjectThreadUntil::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "frame", 'f', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFrameIndex, "Frame index for until operation - defaults to 0"}, -{ LLDB_OPT_SET_1, false, "thread", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeThreadIndex, "Thread index for the thread for until operation"}, +{ LLDB_OPT_SET_1, false, "frame", 'f', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFrameIndex, "Frame index for until operation - defaults to 0"}, +{ LLDB_OPT_SET_1, false, "thread", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeThreadIndex, "Thread index for the thread for until operation"}, { LLDB_OPT_SET_1, false, "run-mode",'m', OptionParser::eRequiredArgument, g_duo_running_mode, 0, eArgTypeRunMode,"Determine how to run other threads while stepping this one"}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -1222,7 +1222,7 @@ CommandObjectParsed (interpreter, "thread select", "Select a thread as the currently active thread.", - NULL, + nullptr, eFlagRequiresProcess | eFlagTryTargetAPILock | eFlagProcessMustBeLaunched | @@ -1253,7 +1253,7 @@ DoExecute (Args& command, CommandReturnObject &result) { Process *process = m_exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) { result.AppendError ("no process"); result.SetStatus (eReturnStatusFailed); @@ -1269,7 +1269,7 @@ uint32_t index_id = Args::StringToUInt32(command.GetArgumentAtIndex(0), 0, 0); Thread *new_thread = process->GetThreadList().FindThreadByIndexID(index_id).get(); - if (new_thread == NULL) + if (new_thread == nullptr) { result.AppendErrorWithFormat ("invalid thread #%s.\n", command.GetArgumentAtIndex(0)); result.SetStatus (eReturnStatusFailed); @@ -1541,8 +1541,8 @@ OptionDefinition CommandObjectThreadReturn::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "from-expression", 'x', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Return from the innermost expression evaluation."}, -{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_ALL, false, "from-expression", 'x', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Return from the innermost expression evaluation."}, +{ 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1728,23 +1728,23 @@ OptionDefinition CommandObjectThreadJump::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, NULL, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, + { LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "Specifies the source file to jump to."}, - { LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypeLineNum, + { LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeLineNum, "Specifies the line number to jump to."}, - { LLDB_OPT_SET_2, true, "by", 'b', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOffset, + { LLDB_OPT_SET_2, true, "by", 'b', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeOffset, "Jumps by a relative line offset from the current line."}, - { LLDB_OPT_SET_3, true, "address", 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeAddressOrExpression, + { LLDB_OPT_SET_3, true, "address", 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeAddressOrExpression, "Jumps to a specific address."}, { LLDB_OPT_SET_1| LLDB_OPT_SET_2| - LLDB_OPT_SET_3, false, "force",'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone,"Allows the PC to leave the current function."}, + LLDB_OPT_SET_3, false, "force",'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone,"Allows the PC to leave the current function."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1768,7 +1768,7 @@ interpreter, "thread step-in", "Source level single step in specified thread (current thread, if none specified).", - NULL, + nullptr, eStepTypeInto, eStepScopeSource))); @@ -1776,7 +1776,7 @@ interpreter, "thread step-out", "Finish executing the function of the currently selected frame and return to its call site in specified thread (current thread, if none specified).", - NULL, + nullptr, eStepTypeOut, eStepScopeSource))); @@ -1784,7 +1784,7 @@ interpreter, "thread step-over", "Source level single step in specified thread (current thread, if none specified), stepping over calls.", - NULL, + nullptr, eStepTypeOver, eStepScopeSource))); @@ -1792,7 +1792,7 @@ interpreter, "thread step-inst", "Single step one instruction in specified thread (current thread, if none specified).", - NULL, + nullptr, eStepTypeTrace, eStepScopeInstruction))); @@ -1800,7 +1800,7 @@ interpreter, "thread step-inst-over", "Single step one instruction in specified thread (current thread, if none specified), stepping over calls.", - NULL, + nullptr, eStepTypeTraceOver, eStepScopeInstruction))); } Index: source/Commands/CommandObjectType.cpp =================================================================== --- source/Commands/CommandObjectType.cpp +++ source/Commands/CommandObjectType.cpp @@ -346,7 +346,7 @@ lldb::TypeSummaryImplSP entry, SummaryFormatType type, std::string category, - Error* error = NULL); + Error* error = nullptr); protected: bool DoExecute (Args& command, CommandReturnObject &result); @@ -744,7 +744,7 @@ CommandObjectParsed (interpreter, "type format add", "Add a new formatting style for a type.", - NULL), + nullptr), m_option_group (interpreter), m_format_options (eFormatInvalid), m_command_options () @@ -878,13 +878,13 @@ OptionDefinition CommandObjectTypeFormatAdd::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "category", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Add this to the given category instead of the default one."}, - { LLDB_OPT_SET_ALL, false, "cascade", 'C', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "If true, cascade through typedef chains."}, - { LLDB_OPT_SET_ALL, false, "skip-pointers", 'p', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't use this format for pointers-to-type objects."}, - { LLDB_OPT_SET_ALL, false, "skip-references", 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't use this format for references-to-type objects."}, - { LLDB_OPT_SET_ALL, false, "regex", 'x', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Type names are actually regular expressions."}, - { LLDB_OPT_SET_2, false, "type", 't', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Format variables as if they were of this type."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "category", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Add this to the given category instead of the default one."}, + { LLDB_OPT_SET_ALL, false, "cascade", 'C', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "If true, cascade through typedef chains."}, + { LLDB_OPT_SET_ALL, false, "skip-pointers", 'p', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't use this format for pointers-to-type objects."}, + { LLDB_OPT_SET_ALL, false, "skip-references", 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't use this format for references-to-type objects."}, + { LLDB_OPT_SET_ALL, false, "regex", 'x', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Type names are actually regular expressions."}, + { LLDB_OPT_SET_2, false, "type", 't', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Format variables as if they were of this type."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -982,7 +982,7 @@ CommandObjectParsed (interpreter, "type format delete", "Delete an existing formatting style for a type.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry type_arg; @@ -1056,9 +1056,9 @@ OptionDefinition CommandObjectTypeFormatDelete::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Delete from every category."}, - { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Delete from given category."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Delete from every category."}, + { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Delete from given category."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1145,7 +1145,7 @@ CommandObjectParsed (interpreter, "type format clear", "Delete all existing format styles.", - NULL), + nullptr), m_options(interpreter) { } @@ -1159,7 +1159,7 @@ DoExecute (Args& command, CommandReturnObject &result) { if (m_options.m_delete_all) - DataVisualization::Categories::LoopThrough(PerCategoryCallback, NULL); + DataVisualization::Categories::LoopThrough(PerCategoryCallback, nullptr); else { @@ -1171,7 +1171,7 @@ DataVisualization::Categories::GetCategory(cat_nameCS, category); } else - DataVisualization::Categories::GetCategory(ConstString(NULL), category); + DataVisualization::Categories::GetCategory(ConstString(nullptr), category); category->Clear(eFormatCategoryItemValue | eFormatCategoryItemRegexValue); } @@ -1184,8 +1184,8 @@ OptionDefinition CommandObjectTypeFormatClear::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Clear every category."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Clear every category."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -1203,7 +1203,7 @@ RegularExpression* regex; RegularExpression* cate_regex; CommandObjectTypeFormatList_LoopCallbackParam(CommandObjectTypeFormatList* S, CommandReturnObject* R, - RegularExpression* X = NULL, RegularExpression* CX = NULL) : self(S), result(R), regex(X), cate_regex(CX) {} + RegularExpression* X = nullptr, RegularExpression* CX = nullptr) : self(S), result(R), regex(X), cate_regex(CX) {} }; class CommandObjectTypeFormatList : public CommandObjectParsed @@ -1274,7 +1274,7 @@ CommandObjectParsed (interpreter, "type format list", "Show a list of current formatting styles.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry type_arg; @@ -1300,7 +1300,7 @@ CommandObjectTypeFormatList_LoopCallbackParam *param; RegularExpression* cate_regex = - m_options.m_category_regex.empty() ? NULL : + m_options.m_category_regex.empty() ? nullptr : new RegularExpression(m_options.m_category_regex.c_str()); if (argc == 1) @@ -1310,7 +1310,7 @@ param = new CommandObjectTypeFormatList_LoopCallbackParam(this,&result,regex,cate_regex); } else - param = new CommandObjectTypeFormatList_LoopCallbackParam(this,&result,NULL,cate_regex); + param = new CommandObjectTypeFormatList_LoopCallbackParam(this,&result,nullptr,cate_regex); DataVisualization::Categories::LoopThrough(PerCategoryCallback,param); delete param; @@ -1336,11 +1336,11 @@ const char* cate_name = cate->GetName(); // if the category is disabled or empty and there is no regex, just skip it - if ((cate->IsEnabled() == false || cate->GetCount(eFormatCategoryItemValue | eFormatCategoryItemRegexValue) == 0) && param->cate_regex == NULL) + if ((cate->IsEnabled() == false || cate->GetCount(eFormatCategoryItemValue | eFormatCategoryItemRegexValue) == 0) && param->cate_regex == nullptr) return true; // if we have a regex and this category does not match it, just skip it - if(param->cate_regex != NULL && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false) + if(param->cate_regex != nullptr && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false) return true; result->GetOutputStream().Printf("-----------------------\nCategory: %s (%s)\n-----------------------\n", @@ -1364,7 +1364,7 @@ RegularExpression* regex, CommandReturnObject *result) { - if (regex == NULL || strcmp(type,regex->GetText()) == 0 || regex->Execute(type)) + if (regex == nullptr || strcmp(type,regex->GetText()) == 0 || regex->Execute(type)) result->GetOutputStream().Printf ("%s: %s\n", type, entry->GetDescription().c_str()); return true; } @@ -1397,8 +1397,8 @@ OptionDefinition CommandObjectTypeFormatList::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "category-regex", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Only show categories matching this filter."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "category-regex", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Only show categories matching this filter."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #ifndef LLDB_DISABLE_PYTHON @@ -1717,7 +1717,7 @@ CommandObjectParsed (interpreter, "type summary add", "Add a new summary style for a type.", - NULL), + nullptr), IOHandlerDelegateMultiline ("DONE"), m_options (interpreter) { @@ -1882,21 +1882,21 @@ OptionDefinition CommandObjectTypeSummaryAdd::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "category", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Add this to the given category instead of the default one."}, - { LLDB_OPT_SET_ALL, false, "cascade", 'C', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "If true, cascade through typedef chains."}, - { LLDB_OPT_SET_ALL, false, "no-value", 'v', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't show the value, just show the summary, for this type."}, - { LLDB_OPT_SET_ALL, false, "skip-pointers", 'p', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't use this format for pointers-to-type objects."}, - { LLDB_OPT_SET_ALL, false, "skip-references", 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't use this format for references-to-type objects."}, - { LLDB_OPT_SET_ALL, false, "regex", 'x', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Type names are actually regular expressions."}, - { LLDB_OPT_SET_1 , true, "inline-children", 'c', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "If true, inline all child values into summary string."}, - { LLDB_OPT_SET_1 , false, "omit-names", 'O', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "If true, omit value names in the summary display."}, - { LLDB_OPT_SET_2 , true, "summary-string", 's', OptionParser::eRequiredArgument, NULL, 0, eArgTypeSummaryString, "Summary string used to display text and object contents."}, - { LLDB_OPT_SET_3, false, "python-script", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypePythonScript, "Give a one-liner Python script as part of the command."}, - { LLDB_OPT_SET_3, false, "python-function", 'F', OptionParser::eRequiredArgument, NULL, 0, eArgTypePythonFunction, "Give the name of a Python function to use for this type."}, - { LLDB_OPT_SET_3, false, "input-python", 'P', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Input Python code to use for this type manually."}, - { LLDB_OPT_SET_2 | LLDB_OPT_SET_3, false, "expand", 'e', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Expand aggregate data types to show children on separate lines."}, - { LLDB_OPT_SET_2 | LLDB_OPT_SET_3, false, "name", 'n', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "A name for this summary string."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "category", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Add this to the given category instead of the default one."}, + { LLDB_OPT_SET_ALL, false, "cascade", 'C', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "If true, cascade through typedef chains."}, + { LLDB_OPT_SET_ALL, false, "no-value", 'v', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't show the value, just show the summary, for this type."}, + { LLDB_OPT_SET_ALL, false, "skip-pointers", 'p', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't use this format for pointers-to-type objects."}, + { LLDB_OPT_SET_ALL, false, "skip-references", 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't use this format for references-to-type objects."}, + { LLDB_OPT_SET_ALL, false, "regex", 'x', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Type names are actually regular expressions."}, + { LLDB_OPT_SET_1 , true, "inline-children", 'c', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "If true, inline all child values into summary string."}, + { LLDB_OPT_SET_1 , false, "omit-names", 'O', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "If true, omit value names in the summary display."}, + { LLDB_OPT_SET_2 , true, "summary-string", 's', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeSummaryString, "Summary string used to display text and object contents."}, + { LLDB_OPT_SET_3, false, "python-script", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePythonScript, "Give a one-liner Python script as part of the command."}, + { LLDB_OPT_SET_3, false, "python-function", 'F', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePythonFunction, "Give the name of a Python function to use for this type."}, + { LLDB_OPT_SET_3, false, "input-python", 'P', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Input Python code to use for this type manually."}, + { LLDB_OPT_SET_2 | LLDB_OPT_SET_3, false, "expand", 'e', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Expand aggregate data types to show children on separate lines."}, + { LLDB_OPT_SET_2 | LLDB_OPT_SET_3, false, "name", 'n', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "A name for this summary string."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -1987,7 +1987,7 @@ CommandObjectParsed (interpreter, "type summary delete", "Delete an existing summary style for a type.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry type_arg; @@ -2061,9 +2061,9 @@ OptionDefinition CommandObjectTypeSummaryDelete::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Delete from every category."}, - { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Delete from given category."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Delete from every category."}, + { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Delete from given category."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; class CommandObjectTypeSummaryClear : public CommandObjectParsed @@ -2146,7 +2146,7 @@ CommandObjectParsed (interpreter, "type summary clear", "Delete all existing summary styles.", - NULL), + nullptr), m_options(interpreter) { } @@ -2161,7 +2161,7 @@ { if (m_options.m_delete_all) - DataVisualization::Categories::LoopThrough(PerCategoryCallback, NULL); + DataVisualization::Categories::LoopThrough(PerCategoryCallback, nullptr); else { @@ -2173,7 +2173,7 @@ DataVisualization::Categories::GetCategory(cat_nameCS, category); } else - DataVisualization::Categories::GetCategory(ConstString(NULL), category); + DataVisualization::Categories::GetCategory(ConstString(nullptr), category); category->Clear(eFormatCategoryItemSummary | eFormatCategoryItemRegexSummary); } @@ -2188,8 +2188,8 @@ OptionDefinition CommandObjectTypeSummaryClear::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Clear every category."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Clear every category."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -2207,8 +2207,8 @@ RegularExpression* regex; RegularExpression* cate_regex; CommandObjectTypeSummaryList_LoopCallbackParam(CommandObjectTypeSummaryList* S, CommandReturnObject* R, - RegularExpression* X = NULL, - RegularExpression* CX = NULL) : self(S), result(R), regex(X), cate_regex(CX) {} + RegularExpression* X = nullptr, + RegularExpression* CX = nullptr) : self(S), result(R), regex(X), cate_regex(CX) {} }; class CommandObjectTypeSummaryList : public CommandObjectParsed @@ -2280,7 +2280,7 @@ CommandObjectParsed (interpreter, "type summary list", "Show a list of current summary styles.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry type_arg; @@ -2306,7 +2306,7 @@ CommandObjectTypeSummaryList_LoopCallbackParam *param; RegularExpression* cate_regex = - m_options.m_category_regex.empty() ? NULL : + m_options.m_category_regex.empty() ? nullptr : new RegularExpression(m_options.m_category_regex.c_str()); if (argc == 1) @@ -2316,7 +2316,7 @@ param = new CommandObjectTypeSummaryList_LoopCallbackParam(this,&result,regex,cate_regex); } else - param = new CommandObjectTypeSummaryList_LoopCallbackParam(this,&result,NULL,cate_regex); + param = new CommandObjectTypeSummaryList_LoopCallbackParam(this,&result,nullptr,cate_regex); DataVisualization::Categories::LoopThrough(PerCategoryCallback,param); delete param; @@ -2357,11 +2357,11 @@ const char* cate_name = cate->GetName(); // if the category is disabled or empty and there is no regex, just skip it - if ((cate->IsEnabled() == false || cate->GetCount(eFormatCategoryItemSummary | eFormatCategoryItemRegexSummary) == 0) && param->cate_regex == NULL) + if ((cate->IsEnabled() == false || cate->GetCount(eFormatCategoryItemSummary | eFormatCategoryItemRegexSummary) == 0) && param->cate_regex == nullptr) return true; // if we have a regex and this category does not match it, just skip it - if(param->cate_regex != NULL && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false) + if(param->cate_regex != nullptr && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false) return true; result->GetOutputStream().Printf("-----------------------\nCategory: %s (%s)\n-----------------------\n", @@ -2385,7 +2385,7 @@ RegularExpression* regex, CommandReturnObject *result) { - if (regex == NULL || strcmp(type,regex->GetText()) == 0 || regex->Execute(type)) + if (regex == nullptr || strcmp(type,regex->GetText()) == 0 || regex->Execute(type)) result->GetOutputStream().Printf ("%s: %s\n", type, entry->GetDescription().c_str()); return true; } @@ -2417,8 +2417,8 @@ OptionDefinition CommandObjectTypeSummaryList::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "category-regex", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Only show categories matching this filter."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "category-regex", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Only show categories matching this filter."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -2432,7 +2432,7 @@ CommandObjectParsed (interpreter, "type category enable", "Enable a category as a source of formatters.", - NULL) + nullptr) { CommandArgumentEntry type_arg; CommandArgumentData type_style_arg; @@ -2524,7 +2524,7 @@ CommandObjectParsed (interpreter, "type category delete", "Delete a category and all associated formatters.", - NULL) + nullptr) { CommandArgumentEntry type_arg; CommandArgumentData type_style_arg; @@ -2597,7 +2597,7 @@ CommandObjectParsed (interpreter, "type category disable", "Disable a category as a source of formatters.", - NULL) + nullptr) { CommandArgumentEntry type_arg; CommandArgumentData type_style_arg; @@ -2677,7 +2677,7 @@ RegularExpression* regex; CommandObjectTypeCategoryList_CallbackParam(CommandReturnObject* res, - RegularExpression* rex = NULL) : + RegularExpression* rex = nullptr) : result(res), regex(rex) { @@ -2696,7 +2696,7 @@ const char* cate_name = cate->GetName(); - if (regex == NULL || strcmp(cate_name, regex->GetText()) == 0 || regex->Execute(cate_name)) + if (regex == nullptr || strcmp(cate_name, regex->GetText()) == 0 || regex->Execute(cate_name)) result->GetOutputStream().Printf("Category %s is%s enabled\n", cate_name, (cate->IsEnabled() ? "" : " not")); @@ -2707,7 +2707,7 @@ CommandObjectParsed (interpreter, "type category list", "Provide a list of all existing categories.", - NULL) + nullptr) { CommandArgumentEntry type_arg; CommandArgumentData type_style_arg; @@ -2729,7 +2729,7 @@ DoExecute (Args& command, CommandReturnObject &result) { const size_t argc = command.GetArgumentCount(); - RegularExpression* regex = NULL; + RegularExpression* regex = nullptr; if (argc == 0) ; @@ -2771,8 +2771,8 @@ RegularExpression* regex; RegularExpression* cate_regex; CommandObjectTypeFilterList_LoopCallbackParam(CommandObjectTypeFilterList* S, CommandReturnObject* R, - RegularExpression* X = NULL, - RegularExpression* CX = NULL) : self(S), result(R), regex(X), cate_regex(CX) {} + RegularExpression* X = nullptr, + RegularExpression* CX = nullptr) : self(S), result(R), regex(X), cate_regex(CX) {} }; class CommandObjectTypeFilterList : public CommandObjectParsed @@ -2844,7 +2844,7 @@ CommandObjectParsed (interpreter, "type filter list", "Show a list of current filters.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry type_arg; @@ -2870,7 +2870,7 @@ CommandObjectTypeFilterList_LoopCallbackParam *param; RegularExpression* cate_regex = - m_options.m_category_regex.empty() ? NULL : + m_options.m_category_regex.empty() ? nullptr : new RegularExpression(m_options.m_category_regex.c_str()); if (argc == 1) @@ -2880,7 +2880,7 @@ param = new CommandObjectTypeFilterList_LoopCallbackParam(this,&result,regex,cate_regex); } else - param = new CommandObjectTypeFilterList_LoopCallbackParam(this,&result,NULL,cate_regex); + param = new CommandObjectTypeFilterList_LoopCallbackParam(this,&result,nullptr,cate_regex); DataVisualization::Categories::LoopThrough(PerCategoryCallback,param); delete param; @@ -2906,11 +2906,11 @@ CommandReturnObject* result = param->result; // if the category is disabled or empty and there is no regex, just skip it - if ((cate->IsEnabled() == false || cate->GetCount(eFormatCategoryItemFilter | eFormatCategoryItemRegexFilter) == 0) && param->cate_regex == NULL) + if ((cate->IsEnabled() == false || cate->GetCount(eFormatCategoryItemFilter | eFormatCategoryItemRegexFilter) == 0) && param->cate_regex == nullptr) return true; // if we have a regex and this category does not match it, just skip it - if(param->cate_regex != NULL && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false) + if(param->cate_regex != nullptr && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false) return true; result->GetOutputStream().Printf("-----------------------\nCategory: %s (%s)\n-----------------------\n", @@ -2934,7 +2934,7 @@ RegularExpression* regex, CommandReturnObject *result) { - if (regex == NULL || regex->Execute(type)) + if (regex == nullptr || regex->Execute(type)) result->GetOutputStream().Printf ("%s: %s\n", type, entry->GetDescription().c_str()); return true; } @@ -2965,8 +2965,8 @@ OptionDefinition CommandObjectTypeFilterList::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "category-regex", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Only show categories matching this filter."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "category-regex", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Only show categories matching this filter."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #ifndef LLDB_DISABLE_PYTHON @@ -2986,8 +2986,8 @@ RegularExpression* regex; RegularExpression* cate_regex; CommandObjectTypeSynthList_LoopCallbackParam(CommandObjectTypeSynthList* S, CommandReturnObject* R, - RegularExpression* X = NULL, - RegularExpression* CX = NULL) : self(S), result(R), regex(X), cate_regex(CX) {} + RegularExpression* X = nullptr, + RegularExpression* CX = nullptr) : self(S), result(R), regex(X), cate_regex(CX) {} }; class CommandObjectTypeSynthList : public CommandObjectParsed @@ -3059,7 +3059,7 @@ CommandObjectParsed (interpreter, "type synthetic list", "Show a list of current synthetic providers.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry type_arg; @@ -3085,7 +3085,7 @@ CommandObjectTypeSynthList_LoopCallbackParam *param; RegularExpression* cate_regex = - m_options.m_category_regex.empty() ? NULL : + m_options.m_category_regex.empty() ? nullptr : new RegularExpression(m_options.m_category_regex.c_str()); if (argc == 1) @@ -3095,7 +3095,7 @@ param = new CommandObjectTypeSynthList_LoopCallbackParam(this,&result,regex,cate_regex); } else - param = new CommandObjectTypeSynthList_LoopCallbackParam(this,&result,NULL,cate_regex); + param = new CommandObjectTypeSynthList_LoopCallbackParam(this,&result,nullptr,cate_regex); DataVisualization::Categories::LoopThrough(PerCategoryCallback,param); delete param; @@ -3121,11 +3121,11 @@ const char* cate_name = cate->GetName(); // if the category is disabled or empty and there is no regex, just skip it - if ((cate->IsEnabled() == false || cate->GetCount(eFormatCategoryItemSynth | eFormatCategoryItemRegexSynth) == 0) && param->cate_regex == NULL) + if ((cate->IsEnabled() == false || cate->GetCount(eFormatCategoryItemSynth | eFormatCategoryItemRegexSynth) == 0) && param->cate_regex == nullptr) return true; // if we have a regex and this category does not match it, just skip it - if(param->cate_regex != NULL && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false) + if(param->cate_regex != nullptr && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false) return true; result->GetOutputStream().Printf("-----------------------\nCategory: %s (%s)\n-----------------------\n", @@ -3149,7 +3149,7 @@ RegularExpression* regex, CommandReturnObject *result) { - if (regex == NULL || regex->Execute(type)) + if (regex == nullptr || regex->Execute(type)) result->GetOutputStream().Printf ("%s: %s\n", type, entry->GetDescription().c_str()); return true; } @@ -3180,8 +3180,8 @@ OptionDefinition CommandObjectTypeSynthList::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "category-regex", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Only show categories matching this filter."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "category-regex", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Only show categories matching this filter."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #endif // #ifndef LLDB_DISABLE_PYTHON @@ -3271,7 +3271,7 @@ CommandObjectParsed (interpreter, "type filter delete", "Delete an existing filter for a type.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry type_arg; @@ -3344,9 +3344,9 @@ OptionDefinition CommandObjectTypeFilterDelete::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Delete from every category."}, - { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Delete from given category."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Delete from every category."}, + { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Delete from given category."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #ifndef LLDB_DISABLE_PYTHON @@ -3437,7 +3437,7 @@ CommandObjectParsed (interpreter, "type synthetic delete", "Delete an existing synthetic provider for a type.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry type_arg; @@ -3510,9 +3510,9 @@ OptionDefinition CommandObjectTypeSynthDelete::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Delete from every category."}, - { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Delete from given category."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Delete from every category."}, + { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Delete from given category."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #endif // #ifndef LLDB_DISABLE_PYTHON @@ -3600,7 +3600,7 @@ CommandObjectParsed (interpreter, "type filter clear", "Delete all existing filters.", - NULL), + nullptr), m_options(interpreter) { } @@ -3615,7 +3615,7 @@ { if (m_options.m_delete_all) - DataVisualization::Categories::LoopThrough(PerCategoryCallback, NULL); + DataVisualization::Categories::LoopThrough(PerCategoryCallback, nullptr); else { @@ -3627,7 +3627,7 @@ DataVisualization::Categories::GetCategory(cat_nameCS, category); } else - DataVisualization::Categories::GetCategory(ConstString(NULL), category); + DataVisualization::Categories::GetCategory(ConstString(nullptr), category); category->GetTypeFiltersContainer()->Clear(); category->GetRegexTypeFiltersContainer()->Clear(); } @@ -3641,8 +3641,8 @@ OptionDefinition CommandObjectTypeFilterClear::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Clear every category."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Clear every category."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #ifndef LLDB_DISABLE_PYTHON @@ -3729,7 +3729,7 @@ CommandObjectParsed (interpreter, "type synthetic clear", "Delete all existing synthetic providers.", - NULL), + nullptr), m_options(interpreter) { } @@ -3744,7 +3744,7 @@ { if (m_options.m_delete_all) - DataVisualization::Categories::LoopThrough(PerCategoryCallback, NULL); + DataVisualization::Categories::LoopThrough(PerCategoryCallback, nullptr); else { @@ -3756,7 +3756,7 @@ DataVisualization::Categories::GetCategory(cat_nameCS, category); } else - DataVisualization::Categories::GetCategory(ConstString(NULL), category); + DataVisualization::Categories::GetCategory(ConstString(nullptr), category); category->GetTypeSyntheticsContainer()->Clear(); category->GetRegexTypeSyntheticsContainer()->Clear(); } @@ -3770,8 +3770,8 @@ OptionDefinition CommandObjectTypeSynthClear::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Clear every category."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Clear every category."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -3881,7 +3881,7 @@ CommandObjectParsed (interpreter, "type synthetic add", "Add a new synthetic provider for a type.", - NULL), + nullptr), IOHandlerDelegateMultiline ("DONE"), m_options (interpreter) { @@ -3947,14 +3947,14 @@ OptionDefinition CommandObjectTypeSynthAdd::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "cascade", 'C', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "If true, cascade through typedef chains."}, - { LLDB_OPT_SET_ALL, false, "skip-pointers", 'p', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't use this format for pointers-to-type objects."}, - { LLDB_OPT_SET_ALL, false, "skip-references", 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't use this format for references-to-type objects."}, - { LLDB_OPT_SET_ALL, false, "category", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Add this to the given category instead of the default one."}, - { LLDB_OPT_SET_2, false, "python-class", 'l', OptionParser::eRequiredArgument, NULL, 0, eArgTypePythonClass, "Use this Python class to produce synthetic children."}, - { LLDB_OPT_SET_3, false, "input-python", 'P', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Type Python code to generate a class that provides synthetic children."}, - { LLDB_OPT_SET_ALL, false, "regex", 'x', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Type names are actually regular expressions."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "cascade", 'C', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "If true, cascade through typedef chains."}, + { LLDB_OPT_SET_ALL, false, "skip-pointers", 'p', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't use this format for pointers-to-type objects."}, + { LLDB_OPT_SET_ALL, false, "skip-references", 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't use this format for references-to-type objects."}, + { LLDB_OPT_SET_ALL, false, "category", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Add this to the given category instead of the default one."}, + { LLDB_OPT_SET_2, false, "python-class", 'l', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePythonClass, "Use this Python class to produce synthetic children."}, + { LLDB_OPT_SET_3, false, "input-python", 'P', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Type Python code to generate a class that provides synthetic children."}, + { LLDB_OPT_SET_ALL, false, "regex", 'x', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Type names are actually regular expressions."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; #endif // #ifndef LLDB_DISABLE_PYTHON @@ -4121,7 +4121,7 @@ CommandObjectParsed (interpreter, "type filter add", "Add a new filter for a type.", - NULL), + nullptr), m_options (interpreter) { CommandArgumentEntry type_arg; @@ -4244,13 +4244,13 @@ OptionDefinition CommandObjectTypeFilterAdd::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "cascade", 'C', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, "If true, cascade through typedef chains."}, - { LLDB_OPT_SET_ALL, false, "skip-pointers", 'p', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't use this format for pointers-to-type objects."}, - { LLDB_OPT_SET_ALL, false, "skip-references", 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Don't use this format for references-to-type objects."}, - { LLDB_OPT_SET_ALL, false, "category", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeName, "Add this to the given category instead of the default one."}, - { LLDB_OPT_SET_ALL, false, "child", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeExpressionPath, "Include this expression path in the synthetic view."}, - { LLDB_OPT_SET_ALL, false, "regex", 'x', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Type names are actually regular expressions."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "cascade", 'C', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "If true, cascade through typedef chains."}, + { LLDB_OPT_SET_ALL, false, "skip-pointers", 'p', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't use this format for pointers-to-type objects."}, + { LLDB_OPT_SET_ALL, false, "skip-references", 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Don't use this format for references-to-type objects."}, + { LLDB_OPT_SET_ALL, false, "category", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeName, "Add this to the given category instead of the default one."}, + { LLDB_OPT_SET_ALL, false, "child", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeExpressionPath, "Include this expression path in the synthetic view."}, + { LLDB_OPT_SET_ALL, false, "regex", 'x', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Type names are actually regular expressions."}, + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; class CommandObjectTypeFormat : public CommandObjectMultiword Index: source/Commands/CommandObjectWatchpoint.cpp =================================================================== --- source/Commands/CommandObjectWatchpoint.cpp +++ source/Commands/CommandObjectWatchpoint.cpp @@ -47,7 +47,7 @@ static bool CheckTargetForWatchpointOperations(Target *target, CommandReturnObject &result) { - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. No existing target or watchpoints."); result.SetStatus (eReturnStatusFailed); @@ -87,7 +87,7 @@ // Pre-condition: args.GetArgumentCount() > 0. if (args.GetArgumentCount() == 0) { - if (target == NULL) + if (target == nullptr) return false; WatchpointSP watch_sp = target->GetLastCreatedWatchpoint(); if (watch_sp) @@ -169,7 +169,7 @@ CommandObjectParsed (interpreter, "watchpoint list", "List all watchpoints at configurable levels of detail.", - NULL), + nullptr), m_options(interpreter) { CommandArgumentEntry arg; @@ -252,7 +252,7 @@ DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("Invalid target. No current target or watchpoints."); result.SetStatus (eReturnStatusSuccessFinishNoResult); @@ -329,16 +329,16 @@ OptionDefinition CommandObjectWatchpointList::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "brief", 'b', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_1, false, "brief", 'b', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Give a brief description of the watchpoint (no location info)."}, - { LLDB_OPT_SET_2, false, "full", 'f', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_2, false, "full", 'f', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Give a full description of the watchpoint and its locations."}, - { LLDB_OPT_SET_3, false, "verbose", 'v', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, + { LLDB_OPT_SET_3, false, "verbose", 'v', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Explain everything we know about the watchpoint (for debugging debugger bugs)." }, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -353,7 +353,7 @@ CommandObjectParsed (interpreter, "enable", "Enable the specified disabled watchpoint(s). If no watchpoints are specified, enable all of them.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID, eArgTypeWatchpointIDRange); @@ -432,7 +432,7 @@ CommandObjectParsed (interpreter, "watchpoint disable", "Disable the specified watchpoint(s) without removing it/them. If no watchpoints are specified, disable them all.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID, eArgTypeWatchpointIDRange); @@ -516,7 +516,7 @@ CommandObjectParsed(interpreter, "watchpoint delete", "Delete the specified watchpoint(s). If no watchpoints are specified, delete them all.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID, eArgTypeWatchpointIDRange); @@ -598,7 +598,7 @@ CommandObjectParsed (interpreter, "watchpoint ignore", "Set ignore count on the specified watchpoint(s). If no watchpoints are specified, set them all.", - NULL), + nullptr), m_options (interpreter) { CommandArgumentEntry arg; @@ -734,8 +734,8 @@ OptionDefinition CommandObjectWatchpointIgnore::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, true, "ignore-count", 'i', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCount, "Set the number of times this watchpoint is skipped before stopping." }, - { 0, false, NULL, 0 , 0, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, true, "ignore-count", 'i', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCount, "Set the number of times this watchpoint is skipped before stopping." }, + { 0, false, nullptr, 0 , 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -754,7 +754,7 @@ "Modify the options on a watchpoint or set of watchpoints in the executable. " "If no watchpoint is specified, act on the last created watchpoint. " "Passing an empty argument clears the modification.", - NULL), + nullptr), m_options (interpreter) { CommandArgumentEntry arg; @@ -795,7 +795,7 @@ switch (short_option) { case 'c': - if (option_arg != NULL) + if (option_arg != nullptr) m_condition.assign (option_arg); else m_condition.clear(); @@ -897,8 +897,8 @@ OptionDefinition CommandObjectWatchpointModify::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "condition", 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypeExpression, "The watchpoint stops only if this condition expression evaluates to true."}, -{ 0, false, NULL, 0 , 0, NULL, 0, eArgTypeNone, NULL } +{ LLDB_OPT_SET_ALL, false, "condition", 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeExpression, "The watchpoint stops only if this condition expression evaluates to true."}, +{ 0, false, nullptr, 0 , 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -922,7 +922,7 @@ "Note that there are limited hardware resources for watchpoints. " "If watchpoint setting fails, consider disable/delete existing ones " "to free up resources.", - NULL, + nullptr, eFlagRequiresFrame | eFlagTryTargetAPILock | eFlagProcessMustBeLaunched | @@ -1061,7 +1061,7 @@ } else { - const char *error_cstr = error.AsCString(NULL); + const char *error_cstr = error.AsCString(nullptr); if (error_cstr) result.GetErrorStream().Printf("error: %s\n", error_cstr); else @@ -1095,7 +1095,7 @@ { result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%" PRIu64 ", variable expression='%s').\n", addr, (uint64_t)size, command.GetArgumentAtIndex(0)); - if (error.AsCString(NULL)) + if (error.AsCString(nullptr)) result.AppendError(error.AsCString()); result.SetStatus(eReturnStatusFailed); } @@ -1129,7 +1129,7 @@ "Note that there are limited hardware resources for watchpoints. " "If watchpoint setting fails, consider disable/delete existing ones " "to free up resources.", - NULL, + nullptr, eFlagRequiresFrame | eFlagTryTargetAPILock | eFlagProcessMustBeLaunched | @@ -1185,11 +1185,11 @@ StackFrame *frame = m_exe_ctx.GetFramePtr(); Args command(raw_command); - const char *expr = NULL; + const char *expr = nullptr; if (raw_command[0] == '-') { // We have some options and these options MUST end with --. - const char *end_options = NULL; + const char *end_options = nullptr; const char *s = raw_command; while (s && s[0]) { @@ -1224,7 +1224,7 @@ } } - if (expr == NULL) + if (expr == nullptr) expr = raw_command; // If no argument is present, issue an error message. There's no way to set a watchpoint. @@ -1304,7 +1304,7 @@ { result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%" PRIu64 ").\n", addr, (uint64_t)size); - if (error.AsCString(NULL)) + if (error.AsCString(nullptr)) result.AppendError(error.AsCString()); result.SetStatus(eReturnStatusFailed); } Index: source/Commands/CommandObjectWatchpointCommand.cpp =================================================================== --- source/Commands/CommandObjectWatchpointCommand.cpp +++ source/Commands/CommandObjectWatchpointCommand.cpp @@ -45,7 +45,7 @@ CommandObjectParsed (interpreter, "add", "Add a set of commands to a watchpoint, to be executed whenever the watchpoint is hit.", - NULL), + nullptr), IOHandlerDelegateMultiline("DONE", IOHandlerDelegate::Completion::LLDBCommand), m_options (interpreter) { @@ -256,7 +256,7 @@ lldb::user_id_t watch_id) { bool ret_value = true; - if (baton == NULL) + if (baton == nullptr) return true; @@ -409,7 +409,7 @@ { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("There is not a current executable; there are no watchpoints to which to add commands"); result.SetStatus (eReturnStatusFailed); @@ -450,11 +450,11 @@ { Watchpoint *wp = target->GetWatchpointList().FindByID (cur_wp_id).get(); // Sanity check wp first. - if (wp == NULL) continue; + if (wp == nullptr) continue; WatchpointOptions *wp_options = wp->GetOptions(); // Skip this watchpoint if wp_options is not good. - if (wp_options == NULL) continue; + if (wp_options == nullptr) continue; // If we are using script language, get the script interpreter // in order to set or collect command callback. Otherwise, call @@ -513,25 +513,25 @@ { eScriptLanguageNone, "command", "Commands are in the lldb command interpreter language"}, { eScriptLanguagePython, "python", "Commands are in the Python language."}, { eSortOrderByName, "default-script", "Commands are in the default scripting language."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; OptionDefinition CommandObjectWatchpointCommandAdd::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, false, "one-liner", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOneLiner, + { LLDB_OPT_SET_1, false, "one-liner", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeOneLiner, "Specify a one-line watchpoint command inline. Be sure to surround it with quotes." }, - { LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeBoolean, + { LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeBoolean, "Specify whether watchpoint command execution should terminate on error." }, { LLDB_OPT_SET_ALL, false, "script-type", 's', OptionParser::eRequiredArgument, g_script_option_enumeration, 0, eArgTypeNone, "Specify the language for the commands - if none is specified, the lldb command interpreter will be used."}, - { LLDB_OPT_SET_2, false, "python-function", 'F', OptionParser::eRequiredArgument, NULL, 0, eArgTypePythonFunction, + { LLDB_OPT_SET_2, false, "python-function", 'F', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePythonFunction, "Give the name of a Python function to run as command for this watchpoint. Be sure to give a module name if appropriate."}, - { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } + { 0, false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; //------------------------------------------------------------------------- @@ -545,7 +545,7 @@ CommandObjectParsed (interpreter, "delete", "Delete the set of commands from a watchpoint.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData wp_id_arg; @@ -571,7 +571,7 @@ { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("There is not a current executable; there are no watchpoints from which to delete commands"); result.SetStatus (eReturnStatusFailed); @@ -637,7 +637,7 @@ CommandObjectParsed (interpreter, "list", "List the script or set of commands to be executed when the watchpoint is hit.", - NULL) + nullptr) { CommandArgumentEntry arg; CommandArgumentData wp_id_arg; @@ -663,7 +663,7 @@ { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + if (target == nullptr) { result.AppendError ("There is not a current executable; there are no watchpoints for which to list commands"); result.SetStatus (eReturnStatusFailed); Index: source/Core/Address.cpp =================================================================== --- source/Core/Address.cpp +++ source/Core/Address.cpp @@ -28,7 +28,7 @@ static size_t ReadBytes (ExecutionContextScope *exe_scope, const Address &address, void *dst, size_t dst_len) { - if (exe_scope == NULL) + if (exe_scope == nullptr) return 0; TargetSP target_sp (exe_scope->CalculateTarget()); @@ -46,7 +46,7 @@ { byte_order = eByteOrderInvalid; addr_size = 0; - if (exe_scope == NULL) + if (exe_scope == nullptr) return false; TargetSP target_sp (exe_scope->CalculateTarget()); @@ -72,7 +72,7 @@ ReadUIntMax64 (ExecutionContextScope *exe_scope, const Address &address, uint32_t byte_size, bool &success) { uint64_t uval64 = 0; - if (exe_scope == NULL || byte_size > sizeof(uint64_t)) + if (exe_scope == nullptr || byte_size > sizeof(uint64_t)) { success = false; return 0; @@ -99,7 +99,7 @@ static bool ReadAddress (ExecutionContextScope *exe_scope, const Address &address, uint32_t pointer_size, Address &deref_so_addr) { - if (exe_scope == NULL) + if (exe_scope == nullptr) return false; @@ -140,7 +140,7 @@ static bool DumpUInt (ExecutionContextScope *exe_scope, const Address &address, uint32_t byte_size, Stream* strm) { - if (exe_scope == NULL || byte_size == 0) + if (exe_scope == nullptr || byte_size == 0) return 0; std::vector buf(byte_size, 0); @@ -172,7 +172,7 @@ static size_t ReadCStringFromMemory (ExecutionContextScope *exe_scope, const Address &address, Stream *strm) { - if (exe_scope == NULL) + if (exe_scope == nullptr) return 0; const size_t k_buf_len = 256; char buf[k_buf_len+1]; @@ -658,7 +658,7 @@ const bool show_module = (style == DumpStyleResolvedDescription); const bool show_fullpaths = false; const bool show_inlined_frames = true; - if (sc.function == NULL && sc.symbol != NULL) + if (sc.function == nullptr && sc.symbol != nullptr) { // If we have just a symbol make sure it is in the right section if (sc.symbol->ValueIsAddress()) @@ -715,7 +715,7 @@ // the last symbol that came before the address that we are // looking up that has nothing to do with our address lookup. if (sc.symbol->ValueIsAddress() && sc.symbol->GetAddress().GetSection() != GetSection()) - sc.symbol = NULL; + sc.symbol = nullptr; } sc.GetDescription(s, eDescriptionLevelBrief, target); @@ -857,7 +857,7 @@ return sc.comp_unit; } } - return NULL; + return nullptr; } Function * @@ -874,7 +874,7 @@ return sc.function; } } - return NULL; + return nullptr; } Block * @@ -891,7 +891,7 @@ return sc.block; } } - return NULL; + return nullptr; } Symbol * @@ -908,7 +908,7 @@ return sc.symbol; } } - return NULL; + return nullptr; } bool @@ -949,7 +949,7 @@ int Address::CompareLoadAddress (const Address& a, const Address& b, Target *target) { - assert (target != NULL); + assert (target != nullptr); addr_t a_load_addr = a.GetLoadAddress (target); addr_t b_load_addr = b.GetLoadAddress (target); if (a_load_addr < b_load_addr) Index: source/Core/AddressResolverName.cpp =================================================================== --- source/Core/AddressResolverName.cpp +++ source/Core/AddressResolverName.cpp @@ -29,7 +29,7 @@ ) : AddressResolver (), m_func_name (func_name), - m_class_name (NULL), + m_class_name (nullptr), m_regex (), m_match_type (type) { @@ -50,8 +50,8 @@ RegularExpression &func_regex ) : AddressResolver (), - m_func_name (NULL), - m_class_name (NULL), + m_func_name (nullptr), + m_class_name (nullptr), m_regex (func_regex), m_match_type (AddressResolver::Regexp) { @@ -119,7 +119,7 @@ eSymbolTypeCode, sym_list); context.module_sp->FindFunctions (m_func_name, - NULL, + nullptr, eFunctionNameTypeAuto, include_symbols, include_inlines, @@ -156,7 +156,7 @@ if (func_list.GetContextAtIndex(i, sc) == false) continue; - if (sc.function == NULL) + if (sc.function == nullptr) continue; uint32_t j = 0; while (j < sym_list.GetSize()) Index: source/Core/ArchSpec.cpp =================================================================== --- source/Core/ArchSpec.cpp +++ source/Core/ArchSpec.cpp @@ -301,7 +301,7 @@ if (def->type == arch_type) return def; } - return NULL; + return nullptr; } // Get an architecture definition by name. @@ -313,7 +313,7 @@ if (name.equals_lower(g_core_definitions[i].name)) return &g_core_definitions[i]; } - return NULL; + return nullptr; } static inline const CoreDefinition * @@ -321,15 +321,15 @@ { if (core >= 0 && core < ArchSpec::kNumCores) return &g_core_definitions[core]; - return NULL; + return nullptr; } // Get a definition entry by cpu type and subtype. static const ArchDefinitionEntry * FindArchDefinitionEntry (const ArchDefinition *def, uint32_t cpu, uint32_t sub) { - if (def == NULL) - return NULL; + if (def == nullptr) + return nullptr; const ArchDefinitionEntry *entries = def->entries; for (size_t i = 0; i < def->num_entries; ++i) @@ -338,14 +338,14 @@ if (entries[i].sub == (sub & entries[i].sub_mask)) return &entries[i]; } - return NULL; + return nullptr; } static const ArchDefinitionEntry * FindArchDefinitionEntry (const ArchDefinition *def, ArchSpec::Core core) { - if (def == NULL) - return NULL; + if (def == nullptr) + return nullptr; const ArchDefinitionEntry *entries = def->entries; for (size_t i = 0; i < def->num_entries; ++i) @@ -353,7 +353,7 @@ if (entries[i].core == core) return &entries[i]; } - return NULL; + return nullptr; } //===----------------------------------------------------------------------===// @@ -559,7 +559,7 @@ // Accept "12-10" or "12.10" as cpu type/subtype if (isdigit(triple_cstr[0])) { - char *end = NULL; + char *end = nullptr; errno = 0; uint32_t cpu = (uint32_t)::strtoul (triple_cstr, &end, 0); if (errno == 0 && cpu != 0 && end && ((*end == '-') || (*end == '.'))) Index: source/Core/Broadcaster.cpp =================================================================== --- source/Core/Broadcaster.cpp +++ source/Core/Broadcaster.cpp @@ -48,7 +48,7 @@ void Broadcaster::CheckInWithManager () { - if (m_manager != NULL) + if (m_manager != nullptr) { m_manager->SignUpListenersForBroadcaster(*this); } @@ -115,7 +115,7 @@ uint32_t Broadcaster::AddListener (Listener* listener, uint32_t event_mask) { - if (listener == NULL) + if (listener == nullptr) return 0; Mutex::Locker locker(m_listeners_mutex); @@ -218,7 +218,7 @@ Broadcaster::PrivateBroadcastEvent (EventSP &event_sp, bool unique) { // Can't add a NULL event... - if (event_sp.get() == NULL) + if (event_sp.get() == nullptr) return; // Update the broadcaster on this event @@ -228,13 +228,13 @@ Mutex::Locker event_types_locker(m_listeners_mutex); - Listener *hijacking_listener = NULL; + Listener *hijacking_listener = nullptr; if (!m_hijacking_listeners.empty()) { assert (!m_hijacking_masks.empty()); hijacking_listener = m_hijacking_listeners.back(); if ((event_type & m_hijacking_masks.back()) == 0) - hijacking_listener = NULL; + hijacking_listener = nullptr; } Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS)); @@ -444,7 +444,7 @@ if (iter != end_iter) return (*iter).second; else - return NULL; + return nullptr; } void Index: source/Core/Communication.cpp =================================================================== --- source/Core/Communication.cpp +++ source/Core/Communication.cpp @@ -34,15 +34,15 @@ // Constructor //---------------------------------------------------------------------- Communication::Communication(const char *name) : - Broadcaster (NULL, name), + Broadcaster (nullptr, name), m_connection_sp (), m_read_thread (LLDB_INVALID_HOST_THREAD), m_read_thread_enabled (false), m_bytes(), m_bytes_mutex (Mutex::eMutexTypeRecursive), m_write_mutex (Mutex::eMutexTypeNormal), - m_callback (NULL), - m_callback_baton (NULL), + m_callback (nullptr), + m_callback_baton (nullptr), m_close_on_eof (true) { @@ -73,9 +73,9 @@ void Communication::Clear() { - SetReadThreadBytesReceivedCallback (NULL, NULL); - Disconnect (NULL); - StopReadThread (NULL); + SetReadThreadBytesReceivedCallback (nullptr, nullptr); + Disconnect (nullptr); + StopReadThread (nullptr); } ConnectionStatus @@ -129,7 +129,7 @@ bool Communication::HasConnection () const { - return m_connection_sp.get() != NULL; + return m_connection_sp.get() != nullptr; } size_t @@ -153,7 +153,7 @@ return cached_bytes; } - if (m_connection_sp.get() == NULL) + if (m_connection_sp.get() == nullptr) { if (error_ptr) error_ptr->SetErrorString("Invalid connection."); @@ -171,7 +171,7 @@ Listener listener ("Communication::Read"); listener.StartListeningForEvents (this, eBroadcastBitReadThreadGotBytes | eBroadcastBitReadThreadDidExit); EventSP event_sp; - while (listener.WaitForEvent (timeout_time.IsValid() ? &timeout_time : NULL, event_sp)) + while (listener.WaitForEvent (timeout_time.IsValid() ? &timeout_time : nullptr, event_sp)) { const uint32_t event_type = event_sp->GetType(); if (event_type & eBroadcastBitReadThreadGotBytes) @@ -181,7 +181,7 @@ if (event_type & eBroadcastBitReadThreadDidExit) { - Disconnect (NULL); + Disconnect (nullptr); break; } } @@ -260,11 +260,11 @@ m_read_thread_enabled = false; - BroadcastEvent (eBroadcastBitReadThreadShouldExit, NULL); + BroadcastEvent (eBroadcastBitReadThreadShouldExit, nullptr); //Host::ThreadCancel (m_read_thread, error_ptr); - bool status = Host::ThreadJoin (m_read_thread, NULL, error_ptr); + bool status = Host::ThreadJoin (m_read_thread, nullptr, error_ptr); m_read_thread = LLDB_INVALID_HOST_THREAD; return status; } @@ -275,7 +275,7 @@ if (!IS_VALID_LLDB_HOST_THREAD(m_read_thread)) return true; - bool success = Host::ThreadJoin (m_read_thread, NULL, error_ptr); + bool success = Host::ThreadJoin (m_read_thread, nullptr, error_ptr); m_read_thread = LLDB_INVALID_HOST_THREAD; return success; } @@ -288,7 +288,7 @@ { // If DST is NULL and we have a thread, then return the number // of bytes that are available so the caller can call again - if (dst == NULL) + if (dst == nullptr) return m_bytes.size(); const size_t len = std::min(dst_len, m_bytes.size()); @@ -307,7 +307,7 @@ lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION, "%p Communication::AppendBytesToCache (src = %p, src_len = %" PRIu64 ", broadcast = %i)", this, bytes, (uint64_t)len, broadcast); - if ((bytes == NULL || len == 0) + if ((bytes == nullptr || len == 0) && (status != lldb::eConnectionStatusEndOfFile)) return; if (m_callback) @@ -315,7 +315,7 @@ // If the user registered a callback, then call it and do not broadcast m_callback (m_callback_baton, bytes, len); } - else if (bytes != NULL && len > 0) + else if (bytes != nullptr && len > 0) { Mutex::Locker locker(m_bytes_mutex); m_bytes.append ((const char *)bytes, len); @@ -400,7 +400,7 @@ // Let clients know that this thread is exiting comm->BroadcastEvent (eBroadcastBitReadThreadDidExit); - return NULL; + return nullptr; } void @@ -417,8 +417,8 @@ void Communication::SetConnection (Connection *connection) { - Disconnect (NULL); - StopReadThread(NULL); + Disconnect (nullptr); + StopReadThread(nullptr); m_connection_sp.reset(connection); } Index: source/Core/ConnectionFileDescriptor.cpp =================================================================== --- source/Core/ConnectionFileDescriptor.cpp +++ source/Core/ConnectionFileDescriptor.cpp @@ -138,7 +138,7 @@ if (log) log->Printf ("%p ConnectionFileDescriptor::~ConnectionFileDescriptor ()", static_cast(this)); - Disconnect (NULL); + Disconnect (nullptr); CloseCommandPipe (); } @@ -886,7 +886,7 @@ if (timeout_usec == UINT32_MAX) { // Infinite wait... - tv_ptr = NULL; + tv_ptr = nullptr; } else { @@ -943,7 +943,7 @@ static_cast(tv_ptr)); } - const int num_set_fds = ::select (nfds, &read_fds, NULL, NULL, tv_ptr); + const int num_set_fds = ::select (nfds, &read_fds, nullptr, nullptr, tv_ptr); if (num_set_fds < 0) error.SetErrorToErrno(); else @@ -1243,7 +1243,7 @@ { if (::listen (listen_socket, 5) == 0) { - m_fd_send = m_fd_recv = ::accept (listen_socket, NULL, 0); + m_fd_send = m_fd_recv = ::accept (listen_socket, nullptr, nullptr); if (m_fd_send > 0) { m_should_close_fd = true; @@ -1261,7 +1261,7 @@ error_ptr->SetErrorToErrno(); } // We are done with the listen port - Close (listen_socket, eFDTypeSocket, NULL); + Close (listen_socket, eFDTypeSocket, nullptr); return result; #else return eConnectionStatusError; @@ -1272,7 +1272,7 @@ ConnectionFileDescriptor::NamedSocketConnect (const char *socket_name, Error *error_ptr) { #ifndef LLDB_DISABLE_POSIX - Disconnect (NULL); + Disconnect (nullptr); m_fd_send_type = m_fd_recv_type = eFDTypeSocket; // Open the socket that was passed in as an option @@ -1296,7 +1296,7 @@ { if (error_ptr) error_ptr->SetErrorToErrno(); - Disconnect (NULL); + Disconnect (nullptr); return eConnectionStatusError; } if (error_ptr) @@ -1315,7 +1315,7 @@ log->Printf ("%p ConnectionFileDescriptor::SocketListen (%s)", static_cast(this), host_and_port); - Disconnect (NULL); + Disconnect (nullptr); m_fd_send_type = m_fd_recv_type = eFDTypeSocket; std::string host_str; std::string port_str; @@ -1354,7 +1354,7 @@ { if (error_ptr) error_ptr->SetErrorStringWithFormat("unable to resolve hostname '%s'", host_str.c_str()); - Close (listen_fd, eFDTypeSocket, NULL); + Close (listen_fd, eFDTypeSocket, nullptr); return eConnectionStatusError; } } @@ -1367,7 +1367,7 @@ { if (error_ptr) error_ptr->SetErrorToErrno(); - Close (listen_fd, eFDTypeSocket, NULL); + Close (listen_fd, eFDTypeSocket, nullptr); return eConnectionStatusError; } @@ -1376,7 +1376,7 @@ { if (error_ptr) error_ptr->SetErrorToErrno(); - Close (listen_fd, eFDTypeSocket, NULL); + Close (listen_fd, eFDTypeSocket, nullptr); return eConnectionStatusError; } @@ -1447,13 +1447,13 @@ if (m_fd_send == -1) { - Close (listen_fd, eFDTypeSocket, NULL); + Close (listen_fd, eFDTypeSocket, nullptr); return eConnectionStatusError; } } // We are done with the listen port - Close (listen_fd, eFDTypeSocket, NULL); + Close (listen_fd, eFDTypeSocket, nullptr); m_should_close_fd = true; @@ -1471,7 +1471,7 @@ if (log) log->Printf ("%p ConnectionFileDescriptor::ConnectTCP (host/port = %s)", static_cast(this), host_and_port); - Disconnect (NULL); + Disconnect (nullptr); m_fd_send_type = m_fd_recv_type = eFDTypeSocket; std::string host_str; @@ -1517,7 +1517,7 @@ else error_ptr->SetErrorStringWithFormat("invalid host string: '%s'", host_str.c_str()); } - Disconnect (NULL); + Disconnect (nullptr); return eConnectionStatusError; } @@ -1527,7 +1527,7 @@ { if (error_ptr) error_ptr->SetErrorToErrno(); - Disconnect (NULL); + Disconnect (nullptr); return eConnectionStatusError; } @@ -1546,7 +1546,7 @@ if (log) log->Printf ("%p ConnectionFileDescriptor::ConnectUDP (host/port = %s)", static_cast(this), host_and_port); - Disconnect (NULL); + Disconnect (nullptr); m_fd_send_type = m_fd_recv_type = eFDTypeSocketUDP; @@ -1576,7 +1576,7 @@ // Bind failed... if (error_ptr) error_ptr->SetErrorToErrno(); - Disconnect (NULL); + Disconnect (nullptr); } } @@ -1587,7 +1587,7 @@ // setup the UDP send socket struct addrinfo hints; - struct addrinfo *service_info_list = NULL; + struct addrinfo *service_info_list = nullptr; ::memset (&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; @@ -1601,12 +1601,12 @@ port_str.c_str(), err, gai_strerror(err)); - Disconnect (NULL); + Disconnect (nullptr); return eConnectionStatusError; } for (struct addrinfo *service_info_ptr = service_info_list; - service_info_ptr != NULL; + service_info_ptr != nullptr; service_info_ptr = service_info_ptr->ai_next) { m_fd_send = ::socket (service_info_ptr->ai_family, @@ -1626,7 +1626,7 @@ if (m_fd_send == -1) { - Disconnect (NULL); + Disconnect (nullptr); return eConnectionStatusError; } Index: source/Core/ConnectionSharedMemory.cpp =================================================================== --- source/Core/ConnectionSharedMemory.cpp +++ source/Core/ConnectionSharedMemory.cpp @@ -41,7 +41,7 @@ ConnectionSharedMemory::~ConnectionSharedMemory () { - Disconnect (NULL); + Disconnect (nullptr); } bool @@ -144,7 +144,7 @@ if (m_mmap.MemoryMapFromFileDescriptor(m_fd, 0, size, true, false) == size) return eConnectionStatusSuccess; - Disconnect(NULL); + Disconnect(nullptr); return eConnectionStatusError; } Index: source/Core/ConstString.cpp =================================================================== --- source/Core/ConstString.cpp +++ source/Core/ConstString.cpp @@ -63,7 +63,7 @@ { if (ccstr) return GetStringMapEntryFromKeyData (ccstr).getValue(); - return 0; + return nullptr; } bool @@ -83,7 +83,7 @@ { if (cstr) return GetConstCStringWithLength (cstr, strlen (cstr)); - return NULL; + return nullptr; } const char * @@ -93,10 +93,10 @@ { Mutex::Locker locker (m_mutex); llvm::StringRef string_ref (cstr, cstr_len); - StringPoolEntryType& entry = m_string_map.GetOrCreateValue (string_ref, (StringPoolValueType)NULL); + StringPoolEntryType& entry = m_string_map.GetOrCreateValue (string_ref, (StringPoolValueType)nullptr); return entry.getKeyData(); } - return NULL; + return nullptr; } const char * @@ -105,10 +105,10 @@ if (string_ref.data()) { Mutex::Locker locker (m_mutex); - StringPoolEntryType& entry = m_string_map.GetOrCreateValue (string_ref, (StringPoolValueType)NULL); + StringPoolEntryType& entry = m_string_map.GetOrCreateValue (string_ref, (StringPoolValueType)nullptr); return entry.getKeyData(); } - return NULL; + return nullptr; } const char * @@ -128,7 +128,7 @@ // Return the constant demangled C string return demangled_ccstr; } - return NULL; + return nullptr; } const char * @@ -139,7 +139,7 @@ const size_t trimmed_len = std::min (strlen (cstr), cstr_len); return GetConstCStringWithLength (cstr, trimmed_len); } - return NULL; + return nullptr; } //------------------------------------------------------------------ @@ -193,12 +193,12 @@ StringPool() { static Mutex g_pool_initialization_mutex; - static Pool *g_string_pool = NULL; + static Pool *g_string_pool = nullptr; - if (g_string_pool == NULL) + if (g_string_pool == nullptr) { Mutex::Locker initialization_locker(g_pool_initialization_mutex); - if (g_string_pool == NULL) + if (g_string_pool == nullptr) { g_string_pool = new Pool(); } @@ -236,7 +236,7 @@ return lhs_string_ref < rhs_string_ref; // Else one of them was NULL, so if LHS is NULL then it is less than - return lhs_string_ref.data() == NULL; + return lhs_string_ref.data() == nullptr; } Stream& Index: source/Core/DataBufferHeap.cpp =================================================================== --- source/Core/DataBufferHeap.cpp +++ source/Core/DataBufferHeap.cpp @@ -56,7 +56,7 @@ DataBufferHeap::GetBytes () { if (m_data.empty()) - return NULL; + return nullptr; return &m_data[0]; } @@ -68,7 +68,7 @@ DataBufferHeap::GetBytes () const { if (m_data.empty()) - return NULL; + return nullptr; return &m_data[0]; } Index: source/Core/DataBufferMemoryMap.cpp =================================================================== --- source/Core/DataBufferMemoryMap.cpp +++ source/Core/DataBufferMemoryMap.cpp @@ -33,9 +33,9 @@ // Default Constructor //---------------------------------------------------------------------- DataBufferMemoryMap::DataBufferMemoryMap() : - m_mmap_addr(NULL), + m_mmap_addr(nullptr), m_mmap_size(0), - m_data(NULL), + m_data(nullptr), m_size(0) { } @@ -85,7 +85,7 @@ void DataBufferMemoryMap::Clear() { - if (m_mmap_addr != NULL) + if (m_mmap_addr != nullptr) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP)); if (log) @@ -95,9 +95,9 @@ #else ::munmap((void *)m_mmap_addr, m_mmap_size); #endif - m_mmap_addr = NULL; + m_mmap_addr = nullptr; m_mmap_size = 0; - m_data = NULL; + m_data = nullptr; m_size = 0; } } @@ -116,7 +116,7 @@ lldb::offset_t length, bool writeable) { - if (filespec != NULL) + if (filespec != nullptr) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP)); if (log) @@ -264,7 +264,7 @@ if (fd_is_file) flags |= MAP_FILE; - m_mmap_addr = (uint8_t *)::mmap(NULL, length, prot, flags, fd, offset); + m_mmap_addr = (uint8_t *)::mmap(nullptr, length, prot, flags, fd, offset); Error error; if (m_mmap_addr == (void*)-1) @@ -276,13 +276,13 @@ size_t page_offset = offset % Host::GetPageSize(); if (page_offset != 0) { - m_mmap_addr = (uint8_t *)::mmap(NULL, length + page_offset, prot, flags, fd, offset - page_offset); + m_mmap_addr = (uint8_t *)::mmap(nullptr, length + page_offset, prot, flags, fd, offset - page_offset); if (m_mmap_addr == (void*)-1) { // Failed to map file - m_mmap_addr = NULL; + m_mmap_addr = nullptr; } - else if (m_mmap_addr != NULL) + else if (m_mmap_addr != nullptr) { // We recovered and were able to memory map // after we aligned things to page boundaries Index: source/Core/DataEncoder.cpp =================================================================== --- source/Core/DataEncoder.cpp +++ source/Core/DataEncoder.cpp @@ -59,8 +59,8 @@ // Default constructor. //---------------------------------------------------------------------- DataEncoder::DataEncoder () : - m_start (NULL), - m_end (NULL), + m_start (nullptr), + m_end (nullptr), m_byte_order(lldb::endian::InlHostByteOrder()), m_addr_size (sizeof(void*)), m_data_sp () @@ -88,8 +88,8 @@ // this data. //---------------------------------------------------------------------- DataEncoder::DataEncoder (const DataBufferSP& data_sp, ByteOrder endian, uint8_t addr_size) : - m_start (NULL), - m_end (NULL), + m_start (nullptr), + m_end (nullptr), m_byte_order(endian), m_addr_size (addr_size), m_data_sp () @@ -112,8 +112,8 @@ void DataEncoder::Clear () { - m_start = NULL; - m_end = NULL; + m_start = nullptr; + m_end = nullptr; m_byte_order = lldb::endian::InlHostByteOrder(); m_addr_size = sizeof(void*); m_data_sp.reset(); @@ -126,13 +126,13 @@ size_t DataEncoder::GetSharedDataOffset () const { - if (m_start != NULL) + if (m_start != nullptr) { const DataBuffer * data = m_data_sp.get(); - if (data != NULL) + if (data != nullptr) { const uint8_t * data_bytes = data->GetBytes(); - if (data_bytes != NULL) + if (data_bytes != nullptr) { assert(m_start >= data_bytes); return m_start - data_bytes; @@ -157,10 +157,10 @@ { m_byte_order = endian; m_data_sp.reset(); - if (bytes == NULL || length == 0) + if (bytes == nullptr || length == 0) { - m_start = NULL; - m_end = NULL; + m_start = nullptr; + m_end = nullptr; } else { @@ -187,7 +187,7 @@ uint32_t DataEncoder::SetData (const DataBufferSP& data_sp, uint32_t data_offset, uint32_t data_length) { - m_start = m_end = NULL; + m_start = m_end = nullptr; if (data_length > 0) { @@ -309,7 +309,7 @@ uint32_t DataEncoder::PutData (uint32_t offset, const void *src, uint32_t src_len) { - if (src == NULL || src_len == 0) + if (src == nullptr || src_len == 0) return offset; if (ValidOffsetForDataOfSize(offset, src_len)) Index: source/Core/DataExtractor.cpp =================================================================== --- source/Core/DataExtractor.cpp +++ source/Core/DataExtractor.cpp @@ -128,8 +128,8 @@ // Default constructor. //---------------------------------------------------------------------- DataExtractor::DataExtractor () : - m_start (NULL), - m_end (NULL), + m_start (nullptr), + m_end (nullptr), m_byte_order(lldb::endian::InlHostByteOrder()), m_addr_size (4), m_data_sp () @@ -157,8 +157,8 @@ // this data. //---------------------------------------------------------------------- DataExtractor::DataExtractor (const DataBufferSP& data_sp, ByteOrder endian, uint32_t addr_size) : - m_start (NULL), - m_end (NULL), + m_start (nullptr), + m_end (nullptr), m_byte_order(endian), m_addr_size (addr_size), m_data_sp () @@ -174,8 +174,8 @@ // swap and address size settings are copied from "data". //---------------------------------------------------------------------- DataExtractor::DataExtractor (const DataExtractor& data, offset_t offset, offset_t length) : - m_start(NULL), - m_end(NULL), + m_start(nullptr), + m_end(nullptr), m_byte_order(data.m_byte_order), m_addr_size(data.m_addr_size), m_data_sp() @@ -230,8 +230,8 @@ void DataExtractor::Clear () { - m_start = NULL; - m_end = NULL; + m_start = nullptr; + m_end = nullptr; m_byte_order = lldb::endian::InlHostByteOrder(); m_addr_size = 4; m_data_sp.reset(); @@ -244,13 +244,13 @@ size_t DataExtractor::GetSharedDataOffset () const { - if (m_start != NULL) + if (m_start != nullptr) { const DataBuffer * data = m_data_sp.get(); - if (data != NULL) + if (data != nullptr) { const uint8_t * data_bytes = data->GetBytes(); - if (data_bytes != NULL) + if (data_bytes != nullptr) { assert(m_start >= data_bytes); return m_start - data_bytes; @@ -275,10 +275,10 @@ { m_byte_order = endian; m_data_sp.reset(); - if (bytes == NULL || length == 0) + if (bytes == nullptr || length == 0) { - m_start = NULL; - m_end = NULL; + m_start = nullptr; + m_end = nullptr; } else { @@ -340,7 +340,7 @@ lldb::offset_t DataExtractor::SetData (const DataBufferSP& data_sp, offset_t data_offset, offset_t data_length) { - m_start = m_end = NULL; + m_start = m_end = nullptr; if (data_length > 0) { @@ -406,7 +406,7 @@ // Return a non-NULL pointer to the converted data as an indicator of success return dst; } - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -502,7 +502,7 @@ // Return a non-NULL pointer to the converted data as an indicator of success return void_dst; } - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -565,7 +565,7 @@ // Return a non-NULL pointer to the converted data as an indicator of success return void_dst; } - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -626,7 +626,7 @@ // Return a non-NULL pointer to the converted data as an indicator of success return void_dst; } - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -648,7 +648,7 @@ case 2: return GetU16(offset_ptr); break; case 4: return GetU32(offset_ptr); break; default: - assert("GetMaxU32 unhandled case!" == NULL); + assert("GetMaxU32 unhandled case!" == nullptr); break; } return 0; @@ -674,7 +674,7 @@ case 4: return GetU32(offset_ptr); break; case 8: return GetU64(offset_ptr); break; default: - assert("GetMax64 unhandled case!" == NULL); + assert("GetMax64 unhandled case!" == nullptr); break; } return 0; @@ -690,7 +690,7 @@ case 4: return GetU32_unchecked (offset_ptr); break; case 8: return GetU64_unchecked (offset_ptr); break; default: - assert("GetMax64 unhandled case!" == NULL); + assert("GetMax64 unhandled case!" == nullptr); break; } return 0; @@ -706,7 +706,7 @@ case 4: return (int32_t)GetU32(offset_ptr); break; case 8: return (int64_t)GetU64(offset_ptr); break; default: - assert("GetMax64 unhandled case!" == NULL); + assert("GetMax64 unhandled case!" == nullptr); break; } return 0; @@ -1000,7 +1000,7 @@ assert (m_byte_order == eByteOrderBig || m_byte_order == eByteOrderLittle); // Validate the destination info - assert (dst_void_ptr != NULL); + assert (dst_void_ptr != nullptr); assert (dst_len > 0); assert (dst_byte_order == eByteOrderBig || dst_byte_order == eByteOrderLittle); @@ -1137,7 +1137,7 @@ // would have used the result as a C string can wonder into // unknown memory... } - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -1157,14 +1157,14 @@ const char *cstr = (const char *)PeekData (*offset_ptr, len); if (cstr) { - if (memchr (cstr, '\0', len) == NULL) + if (memchr (cstr, '\0', len) == nullptr) { - return NULL; + return nullptr; } *offset_ptr += len; return cstr; } - return NULL; + return nullptr; } //------------------------------------------------------------------ @@ -1193,7 +1193,7 @@ DataExtractor::GetULEB128 (offset_t *offset_ptr) const { const uint8_t *src = (const uint8_t *)PeekData (*offset_ptr, 1); - if (src == NULL) + if (src == nullptr) return 0; const uint8_t *end = m_end; @@ -1233,7 +1233,7 @@ DataExtractor::GetSLEB128 (offset_t *offset_ptr) const { const uint8_t *src = (const uint8_t *)PeekData (*offset_ptr, 1); - if (src == NULL) + if (src == nullptr) return 0; const uint8_t *end = m_end; @@ -1280,7 +1280,7 @@ { uint32_t bytes_consumed = 0; const uint8_t *src = (const uint8_t *)PeekData (*offset_ptr, 1); - if (src == NULL) + if (src == nullptr) return 0; const uint8_t *end = m_end; @@ -1405,7 +1405,7 @@ uint32_t item_bit_offset, // If "item_bit_size" is non-zero, this is the shift amount to apply to a bitfield ExecutionContextScope *exe_scope) const { - if (s == NULL) + if (s == nullptr) return start_offset; if (item_format == eFormatPointer) @@ -1423,7 +1423,7 @@ target_sp = exe_scope->CalculateTarget(); if (target_sp) { - DisassemblerSP disassembler_sp (Disassembler::FindPlugin(target_sp->GetArchitecture(), NULL, NULL)); + DisassemblerSP disassembler_sp (Disassembler::FindPlugin(target_sp->GetArchitecture(), nullptr, nullptr)); if (disassembler_sp) { lldb::addr_t addr = base_addr + start_offset; @@ -2068,7 +2068,7 @@ const char *format ) const { - if (log == NULL) + if (log == nullptr) return start_offset; offset_t offset; @@ -2186,10 +2186,10 @@ size_t bytes = GetByteSize() + rhs.GetByteSize(); - DataBufferHeap *buffer_heap_ptr = NULL; + DataBufferHeap *buffer_heap_ptr = nullptr; DataBufferSP buffer_sp(buffer_heap_ptr = new DataBufferHeap(bytes, 0)); - if (buffer_sp.get() == NULL || buffer_heap_ptr == NULL) + if (buffer_sp.get() == nullptr || buffer_heap_ptr == nullptr) return false; uint8_t* bytes_ptr = buffer_heap_ptr->GetBytes(); @@ -2205,7 +2205,7 @@ bool DataExtractor::Append(void* buf, offset_t length) { - if (buf == NULL) + if (buf == nullptr) return false; if (length == 0) @@ -2213,10 +2213,10 @@ size_t bytes = GetByteSize() + length; - DataBufferHeap *buffer_heap_ptr = NULL; + DataBufferHeap *buffer_heap_ptr = nullptr; DataBufferSP buffer_sp(buffer_heap_ptr = new DataBufferHeap(bytes, 0)); - if (buffer_sp.get() == NULL || buffer_heap_ptr == NULL) + if (buffer_sp.get() == nullptr || buffer_heap_ptr == nullptr) return false; uint8_t* bytes_ptr = buffer_heap_ptr->GetBytes(); Index: source/Core/Debugger.cpp =================================================================== --- source/Core/Debugger.cpp +++ source/Core/Debugger.cpp @@ -84,7 +84,7 @@ { Debugger::eStopDisassemblyTypeNever, "never", "Never show disassembly when displaying a stop context."}, { Debugger::eStopDisassemblyTypeNoSource, "no-source", "Show disassembly when there is no source information, or the source file is missing when displaying a stop context."}, { Debugger::eStopDisassemblyTypeAlways, "always", "Always show disassembly when displaying a stop context."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; OptionEnumValueElement @@ -93,7 +93,7 @@ { eScriptLanguageNone, "none", "Disable scripting languages."}, { eScriptLanguagePython, "python", "Select python as the default scripting language."}, { eScriptLanguageDefault, "default", "Select the lldb default as the default scripting language."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; #define MODULE_WITH_FUNC "{ ${module.file.basename}{`${function.name-with-args}${function.pc-offset}}}" @@ -119,22 +119,22 @@ static PropertyDefinition g_properties[] = { -{ "auto-confirm", OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true all confirmation prompts will receive their default reply." }, -{ "frame-format", OptionValue::eTypeString , true, 0 , DEFAULT_FRAME_FORMAT, NULL, "The default frame format string to use when displaying stack frame information for threads." }, -{ "notify-void", OptionValue::eTypeBoolean, true, false, NULL, NULL, "Notify the user explicitly if an expression returns void (default: false)." }, -{ "prompt", OptionValue::eTypeString , true, OptionValueString::eOptionEncodeCharacterEscapeSequences, "(lldb) ", NULL, "The debugger command line prompt displayed for the user." }, -{ "script-lang", OptionValue::eTypeEnum , true, eScriptLanguagePython, NULL, g_language_enumerators, "The script language to be used for evaluating user-written scripts." }, -{ "stop-disassembly-count", OptionValue::eTypeSInt64 , true, 4 , NULL, NULL, "The number of disassembly lines to show when displaying a stopped context." }, -{ "stop-disassembly-display", OptionValue::eTypeEnum , true, Debugger::eStopDisassemblyTypeNoSource, NULL, g_show_disassembly_enum_values, "Control when to display disassembly when displaying a stopped context." }, -{ "stop-line-count-after", OptionValue::eTypeSInt64 , true, 3 , NULL, NULL, "The number of sources lines to display that come after the current source line when displaying a stopped context." }, -{ "stop-line-count-before", OptionValue::eTypeSInt64 , true, 3 , NULL, NULL, "The number of sources lines to display that come before the current source line when displaying a stopped context." }, -{ "term-width", OptionValue::eTypeSInt64 , true, 80 , NULL, NULL, "The maximum number of columns to use for displaying text." }, -{ "thread-format", OptionValue::eTypeString , true, 0 , DEFAULT_THREAD_FORMAT, NULL, "The default thread format string to use when displaying thread information." }, -{ "use-external-editor", OptionValue::eTypeBoolean, true, false, NULL, NULL, "Whether to use an external editor or not." }, -{ "use-color", OptionValue::eTypeBoolean, true, true , NULL, NULL, "Whether to use Ansi color codes or not." }, -{ "auto-one-line-summaries", OptionValue::eTypeBoolean, true, true, NULL, NULL, "If true, LLDB will automatically display small structs in one-liner format (default: true)." }, +{ "auto-confirm", OptionValue::eTypeBoolean, true, false, nullptr, nullptr, "If true all confirmation prompts will receive their default reply." }, +{ "frame-format", OptionValue::eTypeString , true, 0 , DEFAULT_FRAME_FORMAT, nullptr, "The default frame format string to use when displaying stack frame information for threads." }, +{ "notify-void", OptionValue::eTypeBoolean, true, false, nullptr, nullptr, "Notify the user explicitly if an expression returns void (default: false)." }, +{ "prompt", OptionValue::eTypeString , true, OptionValueString::eOptionEncodeCharacterEscapeSequences, "(lldb) ", nullptr, "The debugger command line prompt displayed for the user." }, +{ "script-lang", OptionValue::eTypeEnum , true, eScriptLanguagePython, nullptr, g_language_enumerators, "The script language to be used for evaluating user-written scripts." }, +{ "stop-disassembly-count", OptionValue::eTypeSInt64 , true, 4 , nullptr, nullptr, "The number of disassembly lines to show when displaying a stopped context." }, +{ "stop-disassembly-display", OptionValue::eTypeEnum , true, Debugger::eStopDisassemblyTypeNoSource, nullptr, g_show_disassembly_enum_values, "Control when to display disassembly when displaying a stopped context." }, +{ "stop-line-count-after", OptionValue::eTypeSInt64 , true, 3 , nullptr, nullptr, "The number of sources lines to display that come after the current source line when displaying a stopped context." }, +{ "stop-line-count-before", OptionValue::eTypeSInt64 , true, 3 , nullptr, nullptr, "The number of sources lines to display that come before the current source line when displaying a stopped context." }, +{ "term-width", OptionValue::eTypeSInt64 , true, 80 , nullptr, nullptr, "The maximum number of columns to use for displaying text." }, +{ "thread-format", OptionValue::eTypeString , true, 0 , DEFAULT_THREAD_FORMAT, nullptr, "The default thread format string to use when displaying thread information." }, +{ "use-external-editor", OptionValue::eTypeBoolean, true, false, nullptr, nullptr, "Whether to use an external editor or not." }, +{ "use-color", OptionValue::eTypeBoolean, true, true , nullptr, nullptr, "Whether to use Ansi color codes or not." }, +{ "auto-one-line-summaries", OptionValue::eTypeBoolean, true, true, nullptr, nullptr, "If true, LLDB will automatically display small structs in one-liner format (default: true)." }, - { NULL, OptionValue::eTypeInvalid, true, 0 , NULL, NULL, NULL } + { nullptr, OptionValue::eTypeInvalid, true, 0 , nullptr, nullptr, nullptr } }; enum @@ -155,7 +155,7 @@ ePropertyAutoOneLineSummaries }; -Debugger::LoadPluginCallbackType Debugger::g_load_plugin_callback = NULL; +Debugger::LoadPluginCallbackType Debugger::g_load_plugin_callback = nullptr; Error Debugger::SetPropertyValue (const ExecutionContext *exe_ctx, @@ -219,35 +219,35 @@ Debugger::GetAutoConfirm () const { const uint32_t idx = ePropertyAutoConfirm; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } const char * Debugger::GetFrameFormat() const { const uint32_t idx = ePropertyFrameFormat; - return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_properties[idx].default_cstr_value); + return m_collection_sp->GetPropertyAtIndexAsString (nullptr, idx, g_properties[idx].default_cstr_value); } bool Debugger::GetNotifyVoid () const { const uint32_t idx = ePropertyNotiftVoid; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } const char * Debugger::GetPrompt() const { const uint32_t idx = ePropertyPrompt; - return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_properties[idx].default_cstr_value); + return m_collection_sp->GetPropertyAtIndexAsString (nullptr, idx, g_properties[idx].default_cstr_value); } void Debugger::SetPrompt(const char *p) { const uint32_t idx = ePropertyPrompt; - m_collection_sp->SetPropertyAtIndexAsString (NULL, idx, p); + m_collection_sp->SetPropertyAtIndexAsString (nullptr, idx, p); const char *new_prompt = GetPrompt(); std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes (new_prompt, GetUseColor()); if (str.length()) @@ -259,63 +259,63 @@ Debugger::GetThreadFormat() const { const uint32_t idx = ePropertyThreadFormat; - return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_properties[idx].default_cstr_value); + return m_collection_sp->GetPropertyAtIndexAsString (nullptr, idx, g_properties[idx].default_cstr_value); } lldb::ScriptLanguage Debugger::GetScriptLanguage() const { const uint32_t idx = ePropertyScriptLanguage; - return (lldb::ScriptLanguage)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_properties[idx].default_uint_value); + return (lldb::ScriptLanguage)m_collection_sp->GetPropertyAtIndexAsEnumeration (nullptr, idx, g_properties[idx].default_uint_value); } bool Debugger::SetScriptLanguage (lldb::ScriptLanguage script_lang) { const uint32_t idx = ePropertyScriptLanguage; - return m_collection_sp->SetPropertyAtIndexAsEnumeration (NULL, idx, script_lang); + return m_collection_sp->SetPropertyAtIndexAsEnumeration (nullptr, idx, script_lang); } uint32_t Debugger::GetTerminalWidth () const { const uint32_t idx = ePropertyTerminalWidth; - return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value); + return m_collection_sp->GetPropertyAtIndexAsSInt64 (nullptr, idx, g_properties[idx].default_uint_value); } bool Debugger::SetTerminalWidth (uint32_t term_width) { const uint32_t idx = ePropertyTerminalWidth; - return m_collection_sp->SetPropertyAtIndexAsSInt64 (NULL, idx, term_width); + return m_collection_sp->SetPropertyAtIndexAsSInt64 (nullptr, idx, term_width); } bool Debugger::GetUseExternalEditor () const { const uint32_t idx = ePropertyUseExternalEditor; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } bool Debugger::SetUseExternalEditor (bool b) { const uint32_t idx = ePropertyUseExternalEditor; - return m_collection_sp->SetPropertyAtIndexAsBoolean (NULL, idx, b); + return m_collection_sp->SetPropertyAtIndexAsBoolean (nullptr, idx, b); } bool Debugger::GetUseColor () const { const uint32_t idx = ePropertyUseColor; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } bool Debugger::SetUseColor (bool b) { const uint32_t idx = ePropertyUseColor; - bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean (NULL, idx, b); + bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean (nullptr, idx, b); SetPrompt (GetPrompt()); return ret; } @@ -324,28 +324,28 @@ Debugger::GetStopSourceLineCount (bool before) const { const uint32_t idx = before ? ePropertyStopLineCountBefore : ePropertyStopLineCountAfter; - return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value); + return m_collection_sp->GetPropertyAtIndexAsSInt64 (nullptr, idx, g_properties[idx].default_uint_value); } Debugger::StopDisassemblyType Debugger::GetStopDisassemblyDisplay () const { const uint32_t idx = ePropertyStopDisassemblyDisplay; - return (Debugger::StopDisassemblyType)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_properties[idx].default_uint_value); + return (Debugger::StopDisassemblyType)m_collection_sp->GetPropertyAtIndexAsEnumeration (nullptr, idx, g_properties[idx].default_uint_value); } uint32_t Debugger::GetDisassemblyLineCount () const { const uint32_t idx = ePropertyStopDisassemblyCount; - return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value); + return m_collection_sp->GetPropertyAtIndexAsSInt64 (nullptr, idx, g_properties[idx].default_uint_value); } bool Debugger::GetAutoOneLineSummaries () const { const uint32_t idx = ePropertyAutoOneLineSummaries; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, true); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, true); } @@ -532,7 +532,7 @@ void Debugger::Destroy (DebuggerSP &debugger_sp) { - if (debugger_sp.get() == NULL) + if (debugger_sp.get() == nullptr) return; debugger_sp->Clear(); @@ -655,7 +655,7 @@ true, m_command_interpreter_ap->GetValueProperties()); } - OptionValueSInt64 *term_width = m_collection_sp->GetPropertyAtIndexAsOptionValueSInt64 (NULL, ePropertyTerminalWidth); + OptionValueSInt64 *term_width = m_collection_sp->GetPropertyAtIndexAsOptionValueSInt64 (nullptr, ePropertyTerminalWidth); term_width->SetMinimumValue(10); term_width->SetMaximumValue(1024); @@ -810,7 +810,7 @@ { exe_ctx.SetThreadSP (thread_sp); exe_ctx.SetFrameSP (thread_sp->GetSelectedFrame()); - if (exe_ctx.GetFramePtr() == NULL) + if (exe_ctx.GetFramePtr() == nullptr) exe_ctx.SetFrameSP (thread_sp->GetStackFrameAtIndex (0)); } } @@ -1257,9 +1257,9 @@ log->Printf("[ScanBracketedRange] '[]' detected.. going from 0 to end of data"); *index_lower = 0; } - else if (*separator_position == NULL || *separator_position > var_name_end) + else if (*separator_position == nullptr || *separator_position > var_name_end) { - char *end = NULL; + char *end = nullptr; *index_lower = ::strtoul (*open_bracket_position+1, &end, 0); *index_higher = *index_lower; if (log) @@ -1267,7 +1267,7 @@ } else if (*close_bracket_position && *close_bracket_position < var_name_end) { - char *end = NULL; + char *end = nullptr; *index_lower = ::strtoul (*open_bracket_position+1, &end, 0); *index_higher = ::strtoul (*separator_position+1, &end, 0); if (log) @@ -1382,7 +1382,7 @@ // ${thread.id%8.8X} ; width.precision + specifier // ${thread.id%tid} ; unsigned on FreeBSD/Linux, otherwise default_format (0x%4.4x for thread.id) int dot_count = 0; - const char *specifier = NULL; + const char *specifier = nullptr; int width_precision_length = 0; const char *width_precision = ++var_name_begin; while (isdigit(*var_name_begin) || *var_name_begin == '.') @@ -1442,7 +1442,7 @@ ValueObject* valobj ) { - ValueObject* realvalobj = NULL; // makes it super-easy to parse pointers + ValueObject* realvalobj = nullptr; // makes it super-easy to parse pointers bool success = true; const char *p; Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); @@ -1452,7 +1452,7 @@ if (realvalobj) { valobj = realvalobj; - realvalobj = NULL; + realvalobj = nullptr; } size_t non_special_chars = ::strcspn (p, "${}\\"); if (non_special_chars > 0) @@ -1512,7 +1512,7 @@ // if we have already failed to parse, skip this variable if (success) { - const char *cstr = NULL; + const char *cstr = nullptr; std::string token_format; Address format_addr; bool calculate_format_addr_function_offset = false; @@ -1520,8 +1520,8 @@ RegisterKind reg_kind = kNumRegisterKinds; uint32_t reg_num = LLDB_INVALID_REGNUM; FileSpec format_file_spec; - const RegisterInfo *reg_info = NULL; - RegisterContext *reg_ctx = NULL; + const RegisterInfo *reg_info = nullptr; + RegisterContext *reg_ctx = nullptr; bool do_deref_pointer = false; ValueObject::ExpressionPathScanEndReason reason_to_stop = ValueObject::eExpressionPathScanEndReasonEndOfString; ValueObject::ExpressionPathEndResultType final_value_type = ValueObject::eExpressionPathEndResultTypePlain; @@ -1572,11 +1572,11 @@ ValueObject::GetValueForExpressionPathOptions options; options.DontCheckDotVsArrowSyntax().DoAllowBitfieldSyntax().DoAllowFragileIVar().DoAllowSyntheticChildren(); ValueObject::ValueObjectRepresentationStyle val_obj_display = ValueObject::eValueObjectRepresentationStyleSummary; - ValueObject* target = NULL; + ValueObject* target = nullptr; Format custom_format = eFormatInvalid; - const char* var_name_final = NULL; - const char* var_name_final_if_array_range = NULL; - const char* close_bracket_position = NULL; + const char* var_name_final = nullptr; + const char* var_name_final_if_array_range = nullptr; + const char* close_bracket_position = nullptr; int64_t index_lower = -1; int64_t index_higher = -1; bool is_array_range = false; @@ -1708,7 +1708,7 @@ } // TODO use flags for these - const uint32_t type_info_flags = target->GetClangType().GetTypeInfo(NULL); + const uint32_t type_info_flags = target->GetClangType().GetTypeInfo(nullptr); bool is_array = (type_info_flags & ClangASTType::eTypeIsArray) != 0; bool is_pointer = (type_info_flags & ClangASTType::eTypeIsPointer) != 0; bool is_aggregate = target->GetClangType().IsAggregateType(); @@ -1783,7 +1783,7 @@ break; if (log) log->Printf("[Debugger::FormatPrompt] handle as array"); - const char* special_directions = NULL; + const char* special_directions = nullptr; StreamString special_directions_writer; if (close_bracket_position && (var_name_end-close_bracket_position > 1)) { @@ -1825,7 +1825,7 @@ if (!special_directions) var_success &= item->DumpPrintableRepresentation(s,val_obj_display, custom_format); else - var_success &= FormatPromptRecurse(special_directions, sc, exe_ctx, addr, s, NULL, item); + var_success &= FormatPromptRecurse(special_directions, sc, exe_ctx, addr, s, nullptr, item); if (--max_num_children == 0) { @@ -2057,7 +2057,7 @@ case 'f': if (IsToken (var_name_begin, "file.")) { - if (sc && sc->comp_unit != NULL) + if (sc && sc->comp_unit != nullptr) { var_name_begin += ::strlen ("file."); @@ -2138,7 +2138,7 @@ } else if (IsToken (var_name_begin, "function.")) { - if (sc && (sc->function != NULL || sc->symbol != NULL)) + if (sc && (sc->function != nullptr || sc->symbol != nullptr)) { var_name_begin += ::strlen ("function."); if (IsToken (var_name_begin, "id}")) @@ -2153,9 +2153,9 @@ else if (IsToken (var_name_begin, "name}")) { if (sc->function) - cstr = sc->function->GetName().AsCString (NULL); + cstr = sc->function->GetName().AsCString (nullptr); else if (sc->symbol) - cstr = sc->symbol->GetName().AsCString (NULL); + cstr = sc->symbol->GetName().AsCString (nullptr); if (cstr) { s.PutCString(cstr); @@ -2183,11 +2183,11 @@ if (sc->function) { var_success = true; - ExecutionContextScope *exe_scope = exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL; - cstr = sc->function->GetName().AsCString (NULL); + ExecutionContextScope *exe_scope = exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr; + cstr = sc->function->GetName().AsCString (nullptr); if (cstr) { - const InlineFunctionInfo *inline_info = NULL; + const InlineFunctionInfo *inline_info = nullptr; VariableListSP variable_list_sp; bool get_function_vars = true; if (sc->block) @@ -2221,7 +2221,7 @@ if (args.GetSize() > 0) { const char *open_paren = strchr (cstr, '('); - const char *close_paren = NULL; + const char *close_paren = nullptr; if (open_paren) { if (IsToken (open_paren, "(anonymous namespace)")) @@ -2289,7 +2289,7 @@ } else if (sc->symbol) { - cstr = sc->symbol->GetName().AsCString (NULL); + cstr = sc->symbol->GetName().AsCString (nullptr); if (cstr) { s.PutCString(cstr); @@ -2299,7 +2299,7 @@ } else if (IsToken (var_name_begin, "addr-offset}")) { - var_success = addr != NULL; + var_success = addr != nullptr; if (var_success) { format_addr = *addr; @@ -2318,7 +2318,7 @@ else if (IsToken (var_name_begin, "pc-offset}")) { StackFrame *frame = exe_ctx->GetFramePtr(); - var_success = frame != NULL; + var_success = frame != nullptr; if (var_success) { format_addr = frame->GetFrameCodeAddress(); @@ -2384,7 +2384,7 @@ } else { - if (reg_ctx == NULL) + if (reg_ctx == nullptr) reg_ctx = frame->GetRegisterContext().get(); if (reg_ctx) @@ -2392,12 +2392,12 @@ if (reg_kind != kNumRegisterKinds) reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(reg_kind, reg_num); reg_info = reg_ctx->GetRegisterInfoAtIndex (reg_num); - var_success = reg_info != NULL; + var_success = reg_info != nullptr; } } } - if (reg_info != NULL) + if (reg_info != nullptr) { RegisterValue reg_value; var_success = reg_ctx->ReadRegister (reg_info, reg_value); @@ -2534,7 +2534,7 @@ // the main for loop will do this for us, so we advance p by // one less than i (even if i is zero) p += i - 1; - unsigned long octal_value = ::strtoul (oct_str, NULL, 8); + unsigned long octal_value = ::strtoul (oct_str, nullptr, 8); if (octal_value <= UINT8_MAX) { s.PutChar((char)octal_value); @@ -2558,7 +2558,7 @@ hex_str[1] = *p; } - unsigned long hex_value = strtoul (hex_str, NULL, 16); + unsigned long hex_value = strtoul (hex_str, nullptr, 16); if (hex_value <= UINT8_MAX) s.PutChar ((char)hex_value); } @@ -2598,7 +2598,7 @@ std::string format_str = lldb_utility::ansi::FormatAnsiTerminalCodes (format, use_color); if (format_str.length()) format = format_str.c_str(); - return FormatPromptRecurse (format, sc, exe_ctx, addr, s, NULL, valobj); + return FormatPromptRecurse (format, sc, exe_ctx, addr, s, nullptr, valobj); } void @@ -2622,7 +2622,7 @@ // For now when using the callback mode you always get thread & timestamp. log_options |= LLDB_LOG_OPTION_PREPEND_TIMESTAMP | LLDB_LOG_OPTION_PREPEND_THREAD_NAME; } - else if (log_file == NULL || *log_file == '\0') + else if (log_file == nullptr || *log_file == '\0') { log_stream_sp = GetOutputFile(); } @@ -2674,7 +2674,7 @@ SourceManager & Debugger::GetSourceManager () { - if (m_source_manager_ap.get() == NULL) + if (m_source_manager_ap.get() == nullptr) m_source_manager_ap.reset (new SourceManager (shared_from_this())); return *m_source_manager_ap; } @@ -2731,13 +2731,13 @@ Debugger::GetProcessSTDOUT (Process *process, Stream *stream) { size_t total_bytes = 0; - if (stream == NULL) + if (stream == nullptr) stream = GetOutputFile().get(); if (stream) { // The process has stuff waiting for stdout; get it and write it out to the appropriate place. - if (process == NULL) + if (process == nullptr) { TargetSP target_sp = GetTargetList().GetSelectedTarget(); if (target_sp) @@ -2763,13 +2763,13 @@ Debugger::GetProcessSTDERR (Process *process, Stream *stream) { size_t total_bytes = 0; - if (stream == NULL) + if (stream == nullptr) stream = GetOutputFile().get(); if (stream) { // The process has stuff waiting for stderr; get it and write it out to the appropriate place. - if (process == NULL) + if (process == nullptr) { TargetSP target_sp = GetTargetList().GetSelectedTarget(); if (target_sp) @@ -3096,7 +3096,7 @@ // } // EventSP event_sp; - if (listener.WaitForEvent(NULL, event_sp)) + if (listener.WaitForEvent(nullptr, event_sp)) { if (event_sp) { @@ -3170,14 +3170,14 @@ Debugger::EventHandlerThread (lldb::thread_arg_t arg) { ((Debugger *)arg)->DefaultEventHandler(); - return NULL; + return nullptr; } bool Debugger::StartEventHandlerThread() { if (!IS_VALID_LLDB_HOST_THREAD(m_event_handler_thread)) - m_event_handler_thread = Host::ThreadCreate("lldb.debugger.event-handler", EventHandlerThread, this, NULL); + m_event_handler_thread = Host::ThreadCreate("lldb.debugger.event-handler", EventHandlerThread, this, nullptr); return IS_VALID_LLDB_HOST_THREAD(m_event_handler_thread); } @@ -3187,7 +3187,7 @@ if (IS_VALID_LLDB_HOST_THREAD(m_event_handler_thread)) { GetCommandInterpreter().BroadcastEvent(CommandInterpreter::eBroadcastBitQuitCommandReceived); - Host::ThreadJoin(m_event_handler_thread, NULL, NULL); + Host::ThreadJoin(m_event_handler_thread, nullptr, nullptr); m_event_handler_thread = LLDB_INVALID_HOST_THREAD; } } @@ -3199,14 +3199,14 @@ Debugger *debugger = (Debugger *)arg; debugger->ExecuteIOHanders(); debugger->StopEventHandlerThread(); - return NULL; + return nullptr; } bool Debugger::StartIOHandlerThread() { if (!IS_VALID_LLDB_HOST_THREAD(m_io_handler_thread)) - m_io_handler_thread = Host::ThreadCreate("lldb.debugger.io-handler", IOHandlerThread, this, NULL); + m_io_handler_thread = Host::ThreadCreate("lldb.debugger.io-handler", IOHandlerThread, this, nullptr); return IS_VALID_LLDB_HOST_THREAD(m_io_handler_thread); } @@ -3217,7 +3217,7 @@ { if (m_input_file_sp) m_input_file_sp->GetFile().Close(); - Host::ThreadJoin(m_io_handler_thread, NULL, NULL); + Host::ThreadJoin(m_io_handler_thread, nullptr, nullptr); m_io_handler_thread = LLDB_INVALID_HOST_THREAD; } } Index: source/Core/Disassembler.cpp =================================================================== --- source/Core/Disassembler.cpp +++ source/Core/Disassembler.cpp @@ -53,7 +53,7 @@ arch.GetArchitectureName(), plugin_name); - DisassemblerCreateInstance create_callback = NULL; + DisassemblerCreateInstance create_callback = nullptr; if (plugin_name) { @@ -69,7 +69,7 @@ } else { - for (uint32_t idx = 0; (create_callback = PluginManager::GetDisassemblerCreateCallbackAtIndex(idx)) != NULL; ++idx) + for (uint32_t idx = 0; (create_callback = PluginManager::GetDisassemblerCreateCallbackAtIndex(idx)) != nullptr; ++idx) { DisassemblerSP disassembler_sp(create_callback(arch, flavor)); @@ -83,7 +83,7 @@ DisassemblerSP Disassembler::FindPluginForTarget(const TargetSP target_sp, const ArchSpec &arch, const char *flavor, const char *plugin_name) { - if (target_sp && flavor == NULL) + if (target_sp && flavor == nullptr) { // FIXME - we don't have the mechanism in place to do per-architecture settings. But since we know that for now // we only support flavors on x86 & x86_64, @@ -194,7 +194,7 @@ if (module) { module->FindFunctions (name, - NULL, + nullptr, eFunctionNameTypeAuto, include_symbols, include_inlines, @@ -247,7 +247,7 @@ if (disasm_sp) { - size_t bytes_disassembled = disasm_sp->ParseInstructions (&exe_ctx, range, NULL, prefer_file_cache); + size_t bytes_disassembled = disasm_sp->ParseInstructions (&exe_ctx, range, nullptr, prefer_file_cache); if (bytes_disassembled == 0) disasm_sp.reset(); } @@ -409,7 +409,7 @@ SymbolContext sc; SymbolContext prev_sc; AddressRange sc_range; - const Address *pc_addr_ptr = NULL; + const Address *pc_addr_ptr = nullptr; ExecutionContextScope *exe_scope = exe_ctx.GetBestExecutionContextScope(); StackFrame *frame = exe_ctx.GetFramePtr(); @@ -590,7 +590,7 @@ if (show_address) { m_address.Dump(&ss, - exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL, + exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress, 0); @@ -647,10 +647,10 @@ bool Instruction::DumpEmulation (const ArchSpec &arch) { - std::unique_ptr insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL)); + std::unique_ptr insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, nullptr)); if (insn_emulator_ap.get()) { - insn_emulator_ap->SetInstruction (GetOpcode(), GetAddress(), NULL); + insn_emulator_ap->SetInstruction (GetOpcode(), GetAddress(), nullptr); return insn_emulator_ap->EvaluateInstruction (0); } @@ -792,7 +792,7 @@ assert (value.size() == 1); // value is a dictionary value_sp = ReadDictionary (in_file, out_stream); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) { option_value_sp.reset (); return option_value_sp; @@ -803,7 +803,7 @@ assert (value.size() == 1); // value is an array value_sp = ReadArray (in_file, out_stream, data_type); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) { option_value_sp.reset (); return option_value_sp; @@ -878,7 +878,7 @@ // Read all the test information from the test file into an OptionValueDictionary. OptionValueSP data_dictionary_sp (ReadDictionary (test_file, out_stream)); - if (data_dictionary_sp.get() == NULL) + if (data_dictionary_sp.get() == nullptr) { out_stream->Printf ("Instruction::TestEmulation: Error reading Dictionary Object.\n"); fclose (test_file); @@ -893,7 +893,7 @@ OptionValueSP value_sp = data_dictionary->GetValueForKey (description_key); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) { out_stream->Printf ("Instruction::TestEmulation: Test file does not contain description string.\n"); return false; @@ -903,7 +903,7 @@ value_sp = data_dictionary->GetValueForKey (triple_key); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) { out_stream->Printf ("Instruction::TestEmulation: Test file does not contain triple.\n"); return false; @@ -913,7 +913,7 @@ arch.SetTriple (llvm::Triple (value_sp->GetStringValue())); bool success = false; - std::unique_ptr insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL)); + std::unique_ptr insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, nullptr)); if (insn_emulator_ap.get()) success = insn_emulator_ap->TestEmulation (out_stream, arch, data_dictionary); @@ -934,12 +934,12 @@ EmulateInstruction::ReadRegisterCallback read_reg_callback, EmulateInstruction::WriteRegisterCallback write_reg_callback) { - std::unique_ptr insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL)); + std::unique_ptr insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, nullptr)); if (insn_emulator_ap.get()) { insn_emulator_ap->SetBaton (baton); insn_emulator_ap->SetCallbacks (read_mem_callback, write_mem_callback, read_reg_callback, write_reg_callback); - insn_emulator_ap->SetInstruction (GetOpcode(), GetAddress(), NULL); + insn_emulator_ap->SetInstruction (GetOpcode(), GetAddress(), nullptr); return insn_emulator_ap->EvaluateInstruction (evaluate_options); } @@ -1079,7 +1079,7 @@ { Target *target = exe_ctx->GetTargetPtr(); const addr_t byte_size = range.GetByteSize(); - if (target == NULL || byte_size == 0 || !range.GetBaseAddress().IsValid()) + if (target == nullptr || byte_size == 0 || !range.GetBaseAddress().IsValid()) return 0; DataBufferHeap *heap_buffer = new DataBufferHeap (byte_size, '\0'); @@ -1128,14 +1128,14 @@ { m_instruction_list.Clear(); - if (exe_ctx == NULL || num_instructions == 0 || !start.IsValid()) + if (exe_ctx == nullptr || num_instructions == 0 || !start.IsValid()) return 0; Target *target = exe_ctx->GetTargetPtr(); // Calculate the max buffer size we will need in order to disassemble const addr_t byte_size = num_instructions * m_arch.GetMaximumOpcodeByteSize(); - if (target == NULL || byte_size == 0) + if (target == nullptr || byte_size == 0) return 0; DataBufferHeap *heap_buffer = new DataBufferHeap (byte_size, '\0'); @@ -1178,7 +1178,7 @@ m_base_addr(LLDB_INVALID_ADDRESS), m_flavor () { - if (flavor == NULL) + if (flavor == nullptr) m_flavor.assign("default"); else m_flavor.assign(flavor); Index: source/Core/DynamicLoader.cpp =================================================================== --- source/Core/DynamicLoader.cpp +++ source/Core/DynamicLoader.cpp @@ -22,7 +22,7 @@ DynamicLoader* DynamicLoader::FindPlugin (Process *process, const char *plugin_name) { - DynamicLoaderCreateInstance create_callback = NULL; + DynamicLoaderCreateInstance create_callback = nullptr; if (plugin_name) { ConstString const_plugin_name(plugin_name); @@ -36,14 +36,14 @@ } else { - for (uint32_t idx = 0; (create_callback = PluginManager::GetDynamicLoaderCreateCallbackAtIndex(idx)) != NULL; ++idx) + for (uint32_t idx = 0; (create_callback = PluginManager::GetDynamicLoaderCreateCallbackAtIndex(idx)) != nullptr; ++idx) { std::unique_ptr instance_ap(create_callback(process, false)); if (instance_ap.get()) return instance_ap.release(); } } - return NULL; + return nullptr; } Index: source/Core/EmulateInstruction.cpp =================================================================== --- source/Core/EmulateInstruction.cpp +++ source/Core/EmulateInstruction.cpp @@ -29,7 +29,7 @@ EmulateInstruction* EmulateInstruction::FindPlugin (const ArchSpec &arch, InstructionType supported_inst_type, const char *plugin_name) { - EmulateInstructionCreateInstance create_callback = NULL; + EmulateInstructionCreateInstance create_callback = nullptr; if (plugin_name) { ConstString const_plugin_name (plugin_name); @@ -43,19 +43,19 @@ } else { - for (uint32_t idx = 0; (create_callback = PluginManager::GetEmulateInstructionCreateCallbackAtIndex(idx)) != NULL; ++idx) + for (uint32_t idx = 0; (create_callback = PluginManager::GetEmulateInstructionCreateCallbackAtIndex(idx)) != nullptr; ++idx) { EmulateInstruction *emulate_insn_ptr = create_callback(arch, supported_inst_type); if (emulate_insn_ptr) return emulate_insn_ptr; } } - return NULL; + return nullptr; } EmulateInstruction::EmulateInstruction (const ArchSpec &arch) : m_arch (arch), - m_baton (NULL), + m_baton (nullptr), m_read_mem_callback (&ReadMemoryDefault), m_write_mem_callback (&WriteMemoryDefault), m_read_reg_callback (&ReadRegisterDefault), @@ -289,7 +289,7 @@ void *dst, size_t dst_len) { - if (!baton || dst == NULL || dst_len == 0) + if (!baton || dst == nullptr || dst_len == 0) return 0; StackFrame *frame = (StackFrame *) baton; @@ -311,7 +311,7 @@ const void *src, size_t src_len) { - if (!baton || src == NULL || src_len == 0) + if (!baton || src == nullptr || src_len == 0) return 0; StackFrame *frame = (StackFrame *) baton; Index: source/Core/Error.cpp =================================================================== --- source/Core/Error.cpp +++ source/Core/Error.cpp @@ -105,11 +105,11 @@ Error::AsCString(const char *default_error_str) const { if (Success()) - return NULL; + return nullptr; if (m_string.empty()) { - const char *s = NULL; + const char *s = nullptr; switch (m_type) { case eErrorTypeMachKernel: @@ -133,7 +133,7 @@ if (default_error_str) m_string.assign(default_error_str); else - return NULL; // User wanted a NULL string back... + return nullptr; // User wanted a NULL string back... } return m_string.c_str(); } @@ -190,18 +190,18 @@ void Error::PutToLog (Log *log, const char *format, ...) { - char *arg_msg = NULL; + char *arg_msg = nullptr; va_list args; va_start (args, format); ::vasprintf (&arg_msg, format, args); va_end (args); - if (arg_msg != NULL) + if (arg_msg != nullptr) { if (Fail()) { const char *err_str = AsCString(); - if (err_str == NULL) + if (err_str == nullptr) err_str = "???"; SetErrorStringWithFormat("error: %s err = %s (0x%8.8x)", arg_msg, err_str, m_code); @@ -231,16 +231,16 @@ { if (Fail()) { - char *arg_msg = NULL; + char *arg_msg = nullptr; va_list args; va_start (args, format); ::vasprintf (&arg_msg, format, args); va_end (args); - if (arg_msg != NULL) + if (arg_msg != nullptr) { const char *err_str = AsCString(); - if (err_str == NULL) + if (err_str == nullptr) err_str = "???"; SetErrorStringWithFormat("%s err = %s (0x%8.8x)", arg_msg, err_str, m_code); Index: source/Core/Event.cpp =================================================================== --- source/Core/Event.cpp +++ source/Core/Event.cpp @@ -35,7 +35,7 @@ } Event::Event(uint32_t event_type, EventData *data) : - m_broadcaster (NULL), // Set by the broadcaster when this event gets broadcast + m_broadcaster (nullptr), // Set by the broadcaster when this event gets broadcast m_type (event_type), m_data_ap (data) { @@ -71,7 +71,7 @@ s->Printf("%p Event: broadcaster = NULL, type = 0x%8.8x, data = ", static_cast(this), m_type); - if (m_data_ap.get() == NULL) + if (m_data_ap.get() == nullptr) s->Printf (""); else { @@ -156,7 +156,7 @@ EventDataBytes::GetBytes() const { if (m_bytes.empty()) - return NULL; + return nullptr; return &m_bytes[0]; } @@ -191,7 +191,7 @@ const EventDataBytes *e = GetEventDataFromEvent (event_ptr); if (e) return e->GetBytes(); - return NULL; + return nullptr; } size_t @@ -212,7 +212,7 @@ if (event_data && event_data->GetFlavor() == EventDataBytes::GetFlavorString()) return static_cast (event_data); } - return NULL; + return nullptr; } void Index: source/Core/FileSpecList.cpp =================================================================== --- source/Core/FileSpecList.cpp +++ source/Core/FileSpecList.cpp @@ -152,7 +152,7 @@ { if (idx < m_files.size()) return &m_files[idx]; - return NULL; + return nullptr; } //------------------------------------------------------------------ Index: source/Core/IOHandler.cpp =================================================================== --- source/Core/IOHandler.cpp +++ source/Core/IOHandler.cpp @@ -56,7 +56,7 @@ m_output_sp (output_sp), m_error_sp (error_sp), m_flags (flags), - m_user_data (NULL), + m_user_data (nullptr), m_done (false), m_active (false) { @@ -101,7 +101,7 @@ { if (m_input_sp) return m_input_sp->GetFile().GetStream(); - return NULL; + return nullptr; } FILE * @@ -109,7 +109,7 @@ { if (m_output_sp) return m_output_sp->GetFile().GetStream(); - return NULL; + return nullptr; } FILE * @@ -117,7 +117,7 @@ { if (m_error_sp) return m_error_sp->GetFile().GetStream(); - return NULL; + return nullptr; } StreamFileSP & @@ -155,8 +155,8 @@ const char *prompt, bool default_response) : IOHandlerEditline(debugger, - NULL, // NULL editline_name means no history loaded/saved - NULL, + nullptr, // NULL editline_name means no history loaded/saved + nullptr, false, // Multi-line 0, *this), @@ -279,7 +279,7 @@ word_start, skip_first_n_matches, max_matches, - NULL, + nullptr, word_complete, matches); @@ -409,7 +409,7 @@ bool got_line = false; while (!done) { - if (fgets(buffer, sizeof(buffer), in) == NULL) + if (fgets(buffer, sizeof(buffer), in) == nullptr) { const int saved_errno = errno; if (feof(in)) @@ -493,7 +493,7 @@ if (m_editline_ap) return m_editline_ap->GetPrompt (); else if (m_prompt.empty()) - return NULL; + return nullptr; return m_prompt.c_str(); } @@ -505,7 +505,7 @@ else m_prompt.clear(); if (m_editline_ap) - m_editline_ap->SetPrompt (m_prompt.empty() ? NULL : m_prompt.c_str()); + m_editline_ap->SetPrompt (m_prompt.empty() ? nullptr : m_prompt.c_str()); return true; } @@ -934,13 +934,13 @@ virtual const char * WindowDelegateGetHelpText () { - return NULL; + return nullptr; } virtual KeyHelp * WindowDelegateGetKeyHelp () { - return NULL; + return nullptr; } }; @@ -983,9 +983,9 @@ Window (const char *name) : m_name (name), - m_window (NULL), - m_panel (NULL), - m_parent (NULL), + m_window (nullptr), + m_panel (nullptr), + m_parent (nullptr), m_subwindows (), m_delegate_sp (), m_curr_active_window_idx (UINT32_MAX), @@ -999,9 +999,9 @@ Window (const char *name, WINDOW *w, bool del = true) : m_name (name), - m_window (NULL), - m_panel (NULL), - m_parent (NULL), + m_window (nullptr), + m_panel (nullptr), + m_parent (nullptr), m_subwindows (), m_delegate_sp (), m_curr_active_window_idx (UINT32_MAX), @@ -1017,8 +1017,8 @@ Window (const char *name, const Rect &bounds) : m_name (name), - m_window (NULL), - m_parent (NULL), + m_window (nullptr), + m_parent (nullptr), m_subwindows (), m_delegate_sp (), m_curr_active_window_idx (UINT32_MAX), @@ -1039,7 +1039,7 @@ } void - Reset (WINDOW *w = NULL, bool del = true) + Reset (WINDOW *w = nullptr, bool del = true) { if (m_window == w) return; @@ -1047,12 +1047,12 @@ if (m_panel) { ::del_panel (m_panel); - m_panel = NULL; + m_panel = nullptr; } if (m_window && m_delete) { ::delwin (m_window); - m_window = NULL; + m_window = nullptr; m_delete = false; } if (w) @@ -1274,7 +1274,7 @@ // Window drawing utilities //---------------------------------------------------------------------- void - DrawTitleBox (const char *title, const char *bottom_message = NULL) + DrawTitleBox (const char *title, const char *bottom_message = nullptr) { attr_t attr = 0; if (IsActive()) @@ -1806,7 +1806,7 @@ m_max_submenu_name_length (0), m_max_submenu_key_name_length (0), m_selected (0), - m_parent (NULL), + m_parent (nullptr), m_submenus (), m_canned_result (MenuActionResult::NotHandled), m_delegate_sp() @@ -1827,7 +1827,7 @@ m_max_submenu_name_length (0), m_max_submenu_key_name_length (0), m_selected (0), - m_parent (NULL), + m_parent (nullptr), m_submenus (), m_canned_result (MenuActionResult::NotHandled), m_delegate_sp() @@ -2178,7 +2178,7 @@ public: Application (FILE *in, FILE *out) : m_window_sp(), - m_screen (NULL), + m_screen (nullptr), m_in (in), m_out (out) { @@ -2192,7 +2192,7 @@ if (m_screen) { ::delscreen(m_screen); - m_screen = NULL; + m_screen = nullptr; } } @@ -2204,7 +2204,7 @@ #if 0 ::initscr(); #else - m_screen = ::newterm(NULL, m_out, m_in); + m_screen = ::newterm(nullptr, m_out, m_in); #endif ::start_color(); ::curs_set(0); @@ -2321,7 +2321,7 @@ ConstString broadcaster_class (broadcaster->GetBroadcasterClass()); if (broadcaster_class == broadcaster_class_process) { - debugger.GetCommandInterpreter().UpdateExecutionContext(NULL); + debugger.GetCommandInterpreter().UpdateExecutionContext(nullptr); update = true; continue; // Don't get any key, just update our view } @@ -2336,7 +2336,7 @@ switch (key_result) { case eKeyHandled: - debugger.GetCommandInterpreter().UpdateExecutionContext(NULL); + debugger.GetCommandInterpreter().UpdateExecutionContext(nullptr); update = true; break; case eKeyNotHandled: @@ -2528,7 +2528,7 @@ TreeItem (TreeItem *parent, TreeDelegate &delegate, bool might_have_children) : m_parent (parent), m_delegate (delegate), - m_user_data (NULL), + m_user_data (nullptr), m_identifier (0), m_row_idx (-1), m_children (), @@ -2615,7 +2615,7 @@ // The root item must calculate its children, // or we must calculate the number of children // if the item is expanded - if (m_parent == NULL || expanded) + if (m_parent == nullptr || expanded) GetNumChildren(); for (auto &item : m_children) @@ -2761,9 +2761,9 @@ if (static_cast(m_row_idx) == row_idx) return this; if (m_children.empty()) - return NULL; + return nullptr; if (static_cast(m_children.back().m_row_idx) < row_idx) - return NULL; + return nullptr; if (IsExpanded()) { for (auto &item : m_children) @@ -2773,7 +2773,7 @@ return selected_item_ptr; } } - return NULL; + return nullptr; } void * @@ -2825,8 +2825,8 @@ TreeWindowDelegate (Debugger &debugger, const TreeDelegateSP &delegate_sp) : m_debugger (debugger), m_delegate_sp (delegate_sp), - m_root (NULL, *delegate_sp, true), - m_selected_item (NULL), + m_root (nullptr, *delegate_sp, true), + m_selected_item (nullptr), m_num_rows (0), m_selected_row_idx (0), m_first_visible_row (0), @@ -2899,7 +2899,7 @@ } else { - m_selected_item = NULL; + m_selected_item = nullptr; } window.DeferredRefresh(); @@ -2929,7 +2929,7 @@ { ' ', "Toggle item expansion" }, { ',', "Page up" }, { '.', "Page down" }, - { '\0', NULL } + { '\0', nullptr } }; return g_source_view_key_help; } @@ -3076,7 +3076,7 @@ ExecutionContext exe_ctx (frame_sp); //const char *frame_format = "frame #${frame.index}: ${module.file.basename}{`${function.name}${function.pc-offset}}}"; const char *frame_format = "frame #${frame.index}: {${function.name}${function.pc-offset}}}"; - if (Debugger::FormatPrompt (frame_format, &sc, &exe_ctx, NULL, strm)) + if (Debugger::FormatPrompt (frame_format, &sc, &exe_ctx, nullptr, strm)) { int right_pad = 1; window.PutCStringTruncated(strm.GetString().c_str(), right_pad); @@ -3145,7 +3145,7 @@ StreamString strm; ExecutionContext exe_ctx (thread_sp); const char *format = "thread #${thread.index}: tid = ${thread.id}{, stop reason = ${thread.stop-reason}}"; - if (Debugger::FormatPrompt (format, NULL, &exe_ctx, NULL, strm)) + if (Debugger::FormatPrompt (format, nullptr, &exe_ctx, nullptr, strm)) { int right_pad = 1; window.PutCStringTruncated(strm.GetString().c_str(), right_pad); @@ -3254,7 +3254,7 @@ StreamString strm; ExecutionContext exe_ctx (process_sp); const char *format = "process ${process.id}{, name = ${process.name}}"; - if (Debugger::FormatPrompt (format, NULL, &exe_ctx, NULL, strm)) + if (Debugger::FormatPrompt (format, nullptr, &exe_ctx, nullptr, strm)) { int right_pad = 1; window.PutCStringTruncated(strm.GetString().c_str(), right_pad); @@ -3318,7 +3318,7 @@ ValueObjectListDelegate () : m_valobj_list (), m_rows (), - m_selected_row (NULL), + m_selected_row (nullptr), m_selected_row_idx (0), m_first_visible_row (0), m_num_rows (0), @@ -3330,7 +3330,7 @@ ValueObjectListDelegate (ValueObjectList &valobj_list) : m_valobj_list (valobj_list), m_rows (), - m_selected_row (NULL), + m_selected_row (nullptr), m_selected_row_idx (0), m_first_visible_row (0), m_num_rows (0), @@ -3348,7 +3348,7 @@ void SetValues (ValueObjectList &valobj_list) { - m_selected_row = NULL; + m_selected_row = nullptr; m_selected_row_idx = 0; m_first_visible_row = 0; m_num_rows = 0; @@ -3356,7 +3356,7 @@ m_valobj_list = valobj_list; const size_t num_values = m_valobj_list.GetSize(); for (size_t i=0; iGetTypeName().GetCString() : NULL; + const char *type_name = options.show_types ? valobj->GetTypeName().GetCString() : nullptr; const char *name = valobj->GetName().GetCString(); const char *value = valobj->GetValueAsCString (); const char *summary = valobj->GetSummaryAsCString (); @@ -3713,7 +3713,7 @@ } } } - return NULL; + return nullptr; } Row * @@ -3737,7 +3737,7 @@ FrameVariablesWindowDelegate (Debugger &debugger) : ValueObjectListDelegate (), m_debugger (debugger), - m_frame_block (NULL) + m_frame_block (nullptr) { } @@ -3757,8 +3757,8 @@ { ExecutionContext exe_ctx (m_debugger.GetCommandInterpreter().GetExecutionContext()); Process *process = exe_ctx.GetProcessPtr(); - Block *frame_block = NULL; - StackFrame *frame = NULL; + Block *frame_block = nullptr; + StackFrame *frame = nullptr; if (process) { @@ -3797,7 +3797,7 @@ } else { - m_frame_block = NULL; + m_frame_block = nullptr; // Update the values with an empty list if there is no frame SetValues(local_values); } @@ -3985,7 +3985,7 @@ snprintf(g_desc, sizeof(g_desc), "\\x%2.2x", ch); return g_desc; } - return NULL; + return nullptr; } HelpDialogDelegate::HelpDialogDelegate (const char *text, KeyHelp *key_help_array) : @@ -4195,7 +4195,7 @@ { KEY_RIGHT, "Expand" }, { KEY_PPAGE, "Page up" }, { KEY_NPAGE, "Page down" }, - { '\0', NULL } + { '\0', nullptr } }; return g_source_view_key_help; } @@ -4323,7 +4323,7 @@ if (queue_name && queue_name[0]) thread_menu_title.Printf (" %s", queue_name); } - menu.AddSubmenu (MenuSP (new Menu(thread_menu_title.GetString().c_str(), NULL, menu_char, thread_sp->GetID()))); + menu.AddSubmenu (MenuSP (new Menu(thread_menu_title.GetString().c_str(), nullptr, menu_char, thread_sp->GetID()))); } } else if (submenus.size() > 7) @@ -4498,7 +4498,7 @@ { StreamString strm; const char *format = "Thread: ${thread.id%tid}"; - if (thread && Debugger::FormatPrompt (format, NULL, &exe_ctx, NULL, strm)) + if (thread && Debugger::FormatPrompt (format, nullptr, &exe_ctx, nullptr, strm)) { window.MoveCursor (40, 0); window.PutCStringTruncated(strm.GetString().c_str(), 1); @@ -4534,7 +4534,7 @@ m_debugger (debugger), m_sc (), m_file_sp (), - m_disassembly_scope (NULL), + m_disassembly_scope (nullptr), m_disassembly_sp (), m_disassembly_range (), m_title (), @@ -4596,7 +4596,7 @@ { 'S', "Step in (single instruction)" }, { ',', "Page up" }, { '.', "Page down" }, - { '\0', NULL } + { '\0', nullptr } }; return g_source_view_key_help; } @@ -4606,7 +4606,7 @@ { ExecutionContext exe_ctx = m_debugger.GetCommandInterpreter().GetExecutionContext(); Process *process = exe_ctx.GetProcessPtr(); - Thread *thread = NULL; + Thread *thread = nullptr; bool update_location = false; if (process) @@ -4741,7 +4741,7 @@ if (m_disassembly_scope != m_sc.function) { m_disassembly_scope = m_sc.function; - m_disassembly_sp = m_sc.function->GetInstructions (exe_ctx, NULL, prefer_file_cache); + m_disassembly_sp = m_sc.function->GetInstructions (exe_ctx, nullptr, prefer_file_cache); if (m_disassembly_sp) { set_selected_line_to_pc = true; @@ -4762,7 +4762,7 @@ if (m_disassembly_scope != m_sc.symbol) { m_disassembly_scope = m_sc.symbol; - m_disassembly_sp = m_sc.symbol->GetInstructions (exe_ctx, NULL, prefer_file_cache); + m_disassembly_sp = m_sc.symbol->GetInstructions (exe_ctx, nullptr, prefer_file_cache); if (m_disassembly_sp) { set_selected_line_to_pc = true; @@ -5014,11 +5014,11 @@ const char *comment = inst->GetComment(&exe_ctx); if (mnemonic && mnemonic[0] == '\0') - mnemonic = NULL; + mnemonic = nullptr; if (operands && operands[0] == '\0') - operands = NULL; + operands = nullptr; if (comment && comment[0] == '\0') - comment = NULL; + comment = nullptr; strm.Clear(); @@ -5146,7 +5146,7 @@ ExecutionContext exe_ctx = m_debugger.GetCommandInterpreter().GetExecutionContext(); if (exe_ctx.HasProcessScope() && exe_ctx.GetProcessRef().IsAlive()) { - BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint (NULL, // Don't limit the breakpoint to certain modules + BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint (nullptr, // Don't limit the breakpoint to certain modules m_file_sp->GetFileSpec(), // Source file m_selected_line + 1, // Source line number (m_selected_line is zero based) eLazyBoolCalculate, // Check inlines using global setting @@ -5181,7 +5181,7 @@ ExecutionContext exe_ctx = m_debugger.GetCommandInterpreter().GetExecutionContext(); if (exe_ctx.HasTargetScope()) { - BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint (NULL, // Don't limit the breakpoint to certain modules + BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint (nullptr, // Don't limit the breakpoint to certain modules m_file_sp->GetFileSpec(), // Source file m_selected_line + 1, // Source line number (m_selected_line is zero based) eLazyBoolCalculate, // Check inlines using global setting @@ -5321,38 +5321,38 @@ MenuDelegateSP app_menu_delegate_sp = std::static_pointer_cast(app_delegate_sp); MenuSP lldb_menu_sp(new Menu("LLDB" , "F1", KEY_F(1), ApplicationDelegate::eMenuID_LLDB)); - MenuSP exit_menuitem_sp(new Menu("Exit", NULL, 'x', ApplicationDelegate::eMenuID_LLDBExit)); + MenuSP exit_menuitem_sp(new Menu("Exit", nullptr, 'x', ApplicationDelegate::eMenuID_LLDBExit)); exit_menuitem_sp->SetCannedResult(MenuActionResult::Quit); - lldb_menu_sp->AddSubmenu (MenuSP (new Menu("About LLDB", NULL, 'a', ApplicationDelegate::eMenuID_LLDBAbout))); + lldb_menu_sp->AddSubmenu (MenuSP (new Menu("About LLDB", nullptr, 'a', ApplicationDelegate::eMenuID_LLDBAbout))); lldb_menu_sp->AddSubmenu (MenuSP (new Menu(Menu::Type::Separator))); lldb_menu_sp->AddSubmenu (exit_menuitem_sp); MenuSP target_menu_sp(new Menu("Target" ,"F2", KEY_F(2), ApplicationDelegate::eMenuID_Target)); - target_menu_sp->AddSubmenu (MenuSP (new Menu("Create", NULL, 'c', ApplicationDelegate::eMenuID_TargetCreate))); - target_menu_sp->AddSubmenu (MenuSP (new Menu("Delete", NULL, 'd', ApplicationDelegate::eMenuID_TargetDelete))); + target_menu_sp->AddSubmenu (MenuSP (new Menu("Create", nullptr, 'c', ApplicationDelegate::eMenuID_TargetCreate))); + target_menu_sp->AddSubmenu (MenuSP (new Menu("Delete", nullptr, 'd', ApplicationDelegate::eMenuID_TargetDelete))); MenuSP process_menu_sp(new Menu("Process", "F3", KEY_F(3), ApplicationDelegate::eMenuID_Process)); - process_menu_sp->AddSubmenu (MenuSP (new Menu("Attach" , NULL, 'a', ApplicationDelegate::eMenuID_ProcessAttach))); - process_menu_sp->AddSubmenu (MenuSP (new Menu("Detach" , NULL, 'd', ApplicationDelegate::eMenuID_ProcessDetach))); - process_menu_sp->AddSubmenu (MenuSP (new Menu("Launch" , NULL, 'l', ApplicationDelegate::eMenuID_ProcessLaunch))); + process_menu_sp->AddSubmenu (MenuSP (new Menu("Attach" , nullptr, 'a', ApplicationDelegate::eMenuID_ProcessAttach))); + process_menu_sp->AddSubmenu (MenuSP (new Menu("Detach" , nullptr, 'd', ApplicationDelegate::eMenuID_ProcessDetach))); + process_menu_sp->AddSubmenu (MenuSP (new Menu("Launch" , nullptr, 'l', ApplicationDelegate::eMenuID_ProcessLaunch))); process_menu_sp->AddSubmenu (MenuSP (new Menu(Menu::Type::Separator))); - process_menu_sp->AddSubmenu (MenuSP (new Menu("Continue", NULL, 'c', ApplicationDelegate::eMenuID_ProcessContinue))); - process_menu_sp->AddSubmenu (MenuSP (new Menu("Halt" , NULL, 'h', ApplicationDelegate::eMenuID_ProcessHalt))); - process_menu_sp->AddSubmenu (MenuSP (new Menu("Kill" , NULL, 'k', ApplicationDelegate::eMenuID_ProcessKill))); + process_menu_sp->AddSubmenu (MenuSP (new Menu("Continue", nullptr, 'c', ApplicationDelegate::eMenuID_ProcessContinue))); + process_menu_sp->AddSubmenu (MenuSP (new Menu("Halt" , nullptr, 'h', ApplicationDelegate::eMenuID_ProcessHalt))); + process_menu_sp->AddSubmenu (MenuSP (new Menu("Kill" , nullptr, 'k', ApplicationDelegate::eMenuID_ProcessKill))); MenuSP thread_menu_sp(new Menu("Thread", "F4", KEY_F(4), ApplicationDelegate::eMenuID_Thread)); - thread_menu_sp->AddSubmenu (MenuSP (new Menu("Step In" , NULL, 'i', ApplicationDelegate::eMenuID_ThreadStepIn))); - thread_menu_sp->AddSubmenu (MenuSP (new Menu("Step Over", NULL, 'v', ApplicationDelegate::eMenuID_ThreadStepOver))); - thread_menu_sp->AddSubmenu (MenuSP (new Menu("Step Out" , NULL, 'o', ApplicationDelegate::eMenuID_ThreadStepOut))); + thread_menu_sp->AddSubmenu (MenuSP (new Menu("Step In" , nullptr, 'i', ApplicationDelegate::eMenuID_ThreadStepIn))); + thread_menu_sp->AddSubmenu (MenuSP (new Menu("Step Over", nullptr, 'v', ApplicationDelegate::eMenuID_ThreadStepOver))); + thread_menu_sp->AddSubmenu (MenuSP (new Menu("Step Out" , nullptr, 'o', ApplicationDelegate::eMenuID_ThreadStepOut))); MenuSP view_menu_sp(new Menu("View", "F5", KEY_F(5), ApplicationDelegate::eMenuID_View)); - view_menu_sp->AddSubmenu (MenuSP (new Menu("Backtrace", NULL, 'b', ApplicationDelegate::eMenuID_ViewBacktrace))); - view_menu_sp->AddSubmenu (MenuSP (new Menu("Registers", NULL, 'r', ApplicationDelegate::eMenuID_ViewRegisters))); - view_menu_sp->AddSubmenu (MenuSP (new Menu("Source" , NULL, 's', ApplicationDelegate::eMenuID_ViewSource))); - view_menu_sp->AddSubmenu (MenuSP (new Menu("Variables", NULL, 'v', ApplicationDelegate::eMenuID_ViewVariables))); + view_menu_sp->AddSubmenu (MenuSP (new Menu("Backtrace", nullptr, 'b', ApplicationDelegate::eMenuID_ViewBacktrace))); + view_menu_sp->AddSubmenu (MenuSP (new Menu("Registers", nullptr, 'r', ApplicationDelegate::eMenuID_ViewRegisters))); + view_menu_sp->AddSubmenu (MenuSP (new Menu("Source" , nullptr, 's', ApplicationDelegate::eMenuID_ViewSource))); + view_menu_sp->AddSubmenu (MenuSP (new Menu("Variables", nullptr, 'v', ApplicationDelegate::eMenuID_ViewVariables))); MenuSP help_menu_sp(new Menu("Help", "F6", KEY_F(6), ApplicationDelegate::eMenuID_Help)); - help_menu_sp->AddSubmenu (MenuSP (new Menu("GUI Help", NULL, 'g', ApplicationDelegate::eMenuID_HelpGUIHelp))); + help_menu_sp->AddSubmenu (MenuSP (new Menu("GUI Help", nullptr, 'g', ApplicationDelegate::eMenuID_HelpGUIHelp))); m_app_ap->Initialize(); WindowSP &main_window_sp = m_app_ap->GetMainWindow(); Index: source/Core/Language.cpp =================================================================== --- source/Core/Language.cpp +++ source/Core/Language.cpp @@ -25,9 +25,9 @@ static LanguageStrings g_languages[] = { - { { "unknown" , NULL , NULL } }, - { { "c89" , NULL , "ISO C:1989" } }, - { { NULL , NULL , "K&R C" } }, + { { "unknown" , nullptr , nullptr } }, + { { "c89" , nullptr , "ISO C:1989" } }, + { { nullptr , nullptr , "K&R C" } }, { { "ada83" , "Ada83" , "ISO Ada:1983" } }, { { "c++" , "cxx" , "ISO C++:1998" } }, { { "cobol74" , "Cobol74" , "ISO Cobol:1974" } }, @@ -36,16 +36,16 @@ { { "f90" , "Fortran90" , "ISO Fortran 90" } }, { { "pascal" , "Pascal83" , "ISO Pascal:1983" } }, { { "modula2" , "Modula2" , "ISO Modula-2:1996" } }, - { { "java" , NULL , "Java" } }, + { { "java" , nullptr , "Java" } }, { { "c" , "C99" , "ISO C:1999" } }, { { "ada" , "Ada95" , "ISO Ada:1995" } }, { { "f95" , "Fortran95" , "ISO Fortran 95" } }, - { { "PLI" , NULL , "ANSI PL/I:1976" } }, - { { "objc" , NULL , "Objective-C" } }, - { { "objc++" , NULL , "Objective-C++" } }, - { { "upc" , NULL , "Unified Parallel C" } }, - { { "d" , NULL , "D" } }, - { { "python" , NULL , "Python" } } + { { "PLI" , nullptr , "ANSI PL/I:1976" } }, + { { "objc" , nullptr , "Objective-C" } }, + { { "objc++" , nullptr , "Objective-C++" } }, + { { "upc" , nullptr , "Unified Parallel C" } }, + { { "d" , nullptr , "D" } }, + { { "python" , nullptr , "Python" } } }; static const size_t @@ -90,7 +90,7 @@ for (i=0; isecond; if (event_sp->GetType () & info.event_mask) { - if (info.callback != NULL) + if (info.callback != nullptr) { info.callback (event_sp, info.callback_user_data); ++num_handled; Index: source/Core/Log.cpp =================================================================== --- source/Core/Log.cpp +++ source/Core/Log.cpp @@ -222,13 +222,13 @@ void Log::Error (const char *format, ...) { - char *arg_msg = NULL; + char *arg_msg = nullptr; va_list args; va_start (args, format); ::vasprintf (&arg_msg, format, args); va_end (args); - if (arg_msg != NULL) + if (arg_msg != nullptr) { PrintfWithFlags (LLDB_LOG_FLAG_ERROR, "error: %s", arg_msg); free (arg_msg); @@ -242,13 +242,13 @@ void Log::FatalError (int err, const char *format, ...) { - char *arg_msg = NULL; + char *arg_msg = nullptr; va_list args; va_start (args, format); ::vasprintf (&arg_msg, format, args); va_end (args); - if (arg_msg != NULL) + if (arg_msg != nullptr) { PrintfWithFlags (LLDB_LOG_FLAG_ERROR | LLDB_LOG_FLAG_FATAL, "error: %s", arg_msg); ::free (arg_msg); @@ -282,13 +282,13 @@ { if (m_options.Test(LLDB_LOG_OPTION_VERBOSE)) { - char *arg_msg = NULL; + char *arg_msg = nullptr; va_list args; va_start (args, format); ::vasprintf (&arg_msg, format, args); va_end (args); - if (arg_msg != NULL) + if (arg_msg != nullptr) { PrintfWithFlags (LLDB_LOG_FLAG_WARNING | LLDB_LOG_FLAG_VERBOSE, "warning: %s", arg_msg); free (arg_msg); @@ -301,13 +301,13 @@ void Log::Warning (const char *format, ...) { - char *arg_msg = NULL; + char *arg_msg = nullptr; va_list args; va_start (args, format); ::vasprintf (&arg_msg, format, args); va_end (args); - if (arg_msg != NULL) + if (arg_msg != nullptr) { PrintfWithFlags (LLDB_LOG_FLAG_WARNING, "warning: %s", arg_msg); free (arg_msg); @@ -413,7 +413,7 @@ { CallbackMap &callback_map = GetCallbackMap (); CallbackMapIter pos, end = callback_map.end(); - const char *categories[1] = {NULL}; + const char *categories[1] = {nullptr}; for (pos = callback_map.begin(); pos != end; ++pos) pos->second.disable (categories, feedback_strm); @@ -434,7 +434,7 @@ void Log::Terminate () { - DisableAllLogChannels (NULL); + DisableAllLogChannels (nullptr); } void @@ -455,7 +455,7 @@ uint32_t idx = 0; const char *name; - for (idx = 0; (name = PluginManager::GetLogChannelCreateNameAtIndex (idx)) != NULL; ++idx) + for (idx = 0; (name = PluginManager::GetLogChannelCreateNameAtIndex (idx)) != nullptr; ++idx) { LogChannelSP log_channel_sp(LogChannel::FindPlugin (name)); if (log_channel_sp) Index: source/Core/Mangled.cpp =================================================================== --- source/Core/Mangled.cpp +++ source/Core/Mangled.cpp @@ -5038,7 +5038,7 @@ //---------------------------------------------------------------------- Mangled::operator void* () const { - return (m_mangled) ? const_cast(this) : NULL; + return (m_mangled) ? const_cast(this) : nullptr; } //---------------------------------------------------------------------- @@ -5162,7 +5162,7 @@ // Cannot demangle on msvc. char *demangled_name = nullptr; #else - char *demangled_name = abi::__cxa_demangle (mangled_cstr, NULL, NULL, NULL); + char *demangled_name = abi::__cxa_demangle (mangled_cstr, nullptr, nullptr, nullptr); #endif if (demangled_name) Index: source/Core/Module.cpp =================================================================== --- source/Core/Module.cpp +++ source/Core/Module.cpp @@ -56,8 +56,8 @@ // is a big problem we can introduce a Finalize method that will tear everything down in // a predictable order. - static ModuleCollection *g_module_collection = NULL; - if (g_module_collection == NULL) + static ModuleCollection *g_module_collection = nullptr; + if (g_module_collection == nullptr) g_module_collection = new ModuleCollection(); return *g_module_collection; @@ -71,8 +71,8 @@ // if it will tear itself down before the "g_module_collection_mutex" below // will. So we leak a Mutex object below to safeguard against that - static Mutex *g_module_collection_mutex = NULL; - if (g_module_collection_mutex == NULL) + static Mutex *g_module_collection_mutex = nullptr; + if (g_module_collection_mutex == nullptr) g_module_collection_mutex = new Mutex (Mutex::eMutexTypeRecursive); // NOTE: known leak return g_module_collection_mutex; } @@ -91,7 +91,7 @@ ModuleCollection &modules = GetModuleCollection(); if (idx < modules.size()) return modules[idx]; - return NULL; + return nullptr; } #if 0 @@ -376,7 +376,7 @@ { ObjectFile * obj_file = GetObjectFile (); - if (obj_file != NULL) + if (obj_file != nullptr) { obj_file->GetUUID(&m_uuid); m_did_parse_uuid = true; @@ -436,12 +436,12 @@ sc.comp_unit = symbols->GetCompileUnitAtIndex(cu_idx).get(); if (sc.comp_unit) { - sc.function = NULL; + sc.function = nullptr; symbols->ParseVariablesForContext(sc); symbols->ParseCompileUnitFunctions(sc); - for (size_t func_idx = 0; (sc.function = sc.comp_unit->GetFunctionAtIndex(func_idx).get()) != NULL; ++func_idx) + for (size_t func_idx = 0; (sc.function = sc.comp_unit->GetFunctionAtIndex(func_idx).get()) != nullptr; ++func_idx) { symbols->ParseFunctionBlocks(sc); @@ -451,7 +451,7 @@ // Parse all types for this compile unit - sc.function = NULL; + sc.function = nullptr; symbols->ParseTypes(sc); } } @@ -781,7 +781,7 @@ if (sc_list.GetContextAtIndex(i, sc)) { const char *func_name = sc.GetFunctionName().GetCString(); - if (func_name && strstr (func_name, name.GetCString()) == NULL) + if (func_name && strstr (func_name, name.GetCString()) == nullptr) { // Remove the current context sc_list.RemoveContextAtIndex(i); @@ -922,7 +922,7 @@ TypeList& types) { Timer scoped_timer(__PRETTY_FUNCTION__, __PRETTY_FUNCTION__); - if (sc.module_sp.get() == NULL || sc.module_sp.get() == this) + if (sc.module_sp.get() == nullptr || sc.module_sp.get() == this) { SymbolVendor *symbols = GetSymbolVendor (); if (symbols) @@ -981,7 +981,7 @@ exact_match = true; } ConstString type_basename_const_str (type_basename.c_str()); - if (FindTypes_Impl(sc, type_basename_const_str, NULL, append, max_matches, types)) + if (FindTypes_Impl(sc, type_basename_const_str, nullptr, append, max_matches, types)) { types.RemoveMismatchedTypes (type_scope, type_basename, type_class, exact_match); num_matches = types.GetSize(); @@ -994,13 +994,13 @@ { // The "type_name_cstr" will have been modified if we have a valid type class // prefix (like "struct", "class", "union", "typedef" etc). - FindTypes_Impl(sc, ConstString(type_name_cstr), NULL, append, max_matches, types); + FindTypes_Impl(sc, ConstString(type_name_cstr), nullptr, append, max_matches, types); types.RemoveMismatchedTypes (type_class); num_matches = types.GetSize(); } else { - num_matches = FindTypes_Impl(sc, name, NULL, append, max_matches, types); + num_matches = FindTypes_Impl(sc, name, nullptr, append, max_matches, types); } } @@ -1015,7 +1015,7 @@ if (m_did_load_symbol_vendor == false && can_create) { ObjectFile *obj_file = GetObjectFile (); - if (obj_file != NULL) + if (obj_file != nullptr) { Timer scoped_timer(__PRETTY_FUNCTION__, __PRETTY_FUNCTION__); m_symfile_ap.reset(SymbolVendor::FindPlugin(shared_from_this(), feedback_strm)); @@ -1243,7 +1243,7 @@ SymbolVendor *symbols = GetSymbolVendor (); if (symbols) return &symbols->GetTypeList(); - return NULL; + return nullptr; } const ConstString & @@ -1288,7 +1288,7 @@ Module::GetSectionList() { // Populate m_unified_sections_ap with sections from objfile. - if (m_sections_ap.get() == NULL) + if (m_sections_ap.get() == nullptr) { ObjectFile *obj_file = GetObjectFile(); if (obj_file) @@ -1301,7 +1301,7 @@ Module::GetUnifiedSectionList() { // Populate m_unified_sections_ap with sections from objfile. - if (m_sections_ap.get() == NULL) + if (m_sections_ap.get() == nullptr) m_sections_ap.reset(new SectionList()); return m_sections_ap.get(); } @@ -1320,7 +1320,7 @@ if (symtab) return symtab->FindFirstSymbolWithNameAndType (name, symbol_type, Symtab::eDebugAny, Symtab::eVisibilityAny); } - return NULL; + return nullptr; } void Module::SymbolIndicesToSymbolContextList (Symtab *symtab, std::vector &symbol_indexes, SymbolContextList &sc_list) @@ -1448,7 +1448,7 @@ bool Module::IsExecutable () { - if (GetObjectFile() == NULL) + if (GetObjectFile() == nullptr) return false; else return GetObjectFile()->IsExecutable(); @@ -1461,7 +1461,7 @@ if (obj_file) { SectionList *sections = GetSectionList(); - if (sections != NULL) + if (sections != nullptr) { size_t num_sections = sections->GetSize(); for (size_t sect_idx = 0; sect_idx < num_sections; sect_idx++) @@ -1663,8 +1663,8 @@ const char *name_cstr = name.GetCString(); lookup_name_type_mask = eFunctionNameTypeNone; match_name_after_lookup = false; - const char *base_name_start = NULL; - const char *base_name_end = NULL; + const char *base_name_start = nullptr; + const char *base_name_end = nullptr; if (name_type_mask & eFunctionNameTypeAuto) { Index: source/Core/ModuleList.cpp =================================================================== --- source/Core/ModuleList.cpp +++ source/Core/ModuleList.cpp @@ -35,7 +35,7 @@ ModuleList::ModuleList() : m_modules(), m_modules_mutex (Mutex::eMutexTypeRecursive), - m_notifier(NULL) + m_notifier(nullptr) { } @@ -45,7 +45,7 @@ ModuleList::ModuleList(const ModuleList& rhs) : m_modules(), m_modules_mutex (Mutex::eMutexTypeRecursive), - m_notifier(NULL) + m_notifier(nullptr) { Mutex::Locker lhs_locker(m_modules_mutex); Mutex::Locker rhs_locker(rhs.m_modules_mutex); @@ -334,7 +334,7 @@ { if (idx < m_modules.size()) return m_modules[idx].get(); - return NULL; + return nullptr; } ModuleSP @@ -381,7 +381,7 @@ for (pos = m_modules.begin(); pos != end; ++pos) { (*pos)->FindFunctions (lookup_name, - NULL, + nullptr, lookup_name_type_mask, include_symbols, include_inlines, @@ -398,7 +398,7 @@ if (sc_list.GetContextAtIndex(i, sc)) { const char *func_name = sc.GetFunctionName().GetCString(); - if (func_name && strstr (func_name, name.GetCString()) == NULL) + if (func_name && strstr (func_name, name.GetCString()) == nullptr) { // Remove the current context sc_list.RemoveContextAtIndex(i); @@ -417,7 +417,7 @@ collection::const_iterator pos, end = m_modules.end(); for (pos = m_modules.begin(); pos != end; ++pos) { - (*pos)->FindFunctions (name, NULL, name_type_mask, include_symbols, include_inlines, true, sc_list); + (*pos)->FindFunctions (name, nullptr, name_type_mask, include_symbols, include_inlines, true, sc_list); } } return sc_list.GetSize() - old_size; @@ -458,7 +458,7 @@ if (sc_list.GetContextAtIndex(i, sc)) { const char *func_name = sc.GetFunctionName().GetCString(); - if (func_name && strstr (func_name, name.GetCString()) == NULL) + if (func_name && strstr (func_name, name.GetCString()) == nullptr) { // Remove the current context sc_list.RemoveContextAtIndex(i); @@ -513,7 +513,7 @@ collection::const_iterator pos, end = m_modules.end(); for (pos = m_modules.begin(); pos != end; ++pos) { - (*pos)->FindGlobalVariables (name, NULL, append, max_matches, variable_list); + (*pos)->FindGlobalVariables (name, nullptr, append, max_matches, variable_list); } return variable_list.GetSize() - initial_size; } @@ -856,13 +856,13 @@ static ModuleList & GetSharedModuleList () { - static ModuleList *g_shared_module_list = NULL; + static ModuleList *g_shared_module_list = nullptr; static std::once_flag g_once_flag; std::call_once(g_once_flag, [](){ // NOTE: Intentionally leak the module list so a program doesn't have to // cleanup all modules and object files as it exits. This just wastes time // doing a bunch of cleanup that isn't required. - if (g_shared_module_list == NULL) + if (g_shared_module_list == nullptr) g_shared_module_list = new ModuleList(); // <--- Intentional leak!!! }); return *g_shared_module_list; @@ -874,7 +874,7 @@ if (module_ptr) { ModuleList &shared_module_list = GetSharedModuleList (); - return shared_module_list.FindModule (module_ptr).get() != NULL; + return shared_module_list.FindModule (module_ptr).get() != nullptr; } return false; } @@ -1040,7 +1040,7 @@ // If we didn't have a UUID in mind when looking for the object file, // then we should make sure the modification time hasn't changed! - if (platform_module_spec.GetUUIDPtr() == NULL) + if (platform_module_spec.GetUUIDPtr() == nullptr) { TimeValue file_spec_mod_time(file_spec.GetModificationTime()); if (file_spec_mod_time.IsValid()) @@ -1056,7 +1056,7 @@ } } - if (module_sp.get() == NULL) + if (module_sp.get() == nullptr) { module_sp.reset (new Module (platform_module_spec)); // Make sure there are a module and an object file since we can specify Index: source/Core/Opcode.cpp =================================================================== --- source/Core/Opcode.cpp +++ source/Core/Opcode.cpp @@ -94,7 +94,7 @@ { uint32_t byte_size = GetByteSize (); uint8_t swap_buf[8]; - const void *buf = NULL; + const void *buf = nullptr; if (byte_size > 0) { Index: source/Core/PluginManager.cpp =================================================================== --- source/Core/PluginManager.cpp +++ source/Core/PluginManager.cpp @@ -106,7 +106,7 @@ return FileSpec::eEnumerateDirectoryResultNext; else { - PluginInfo plugin_info = { NULL, NULL, NULL }; + PluginInfo plugin_info = { nullptr, nullptr, nullptr }; uint32_t flags = Host::eDynamicLibraryOpenOptionLazy | Host::eDynamicLibraryOpenOptionLocal | Host::eDynamicLibraryOpenOptionLimitGetSymbol; @@ -133,8 +133,8 @@ // plug-in might not be compatible, or might be too new or // too old, or might not want to run on this machine. Host::DynamicLibraryClose (plugin_info.plugin_handle); - plugin_info.plugin_handle = NULL; - plugin_info.plugin_init_callback = NULL; + plugin_info.plugin_handle = nullptr; + plugin_info.plugin_init_callback = nullptr; } // Regardless of success or failure, cache the plug-in load @@ -180,7 +180,7 @@ find_files, find_other, LoadPluginCallback, - NULL); + nullptr); } } @@ -193,7 +193,7 @@ find_files, find_other, LoadPluginCallback, - NULL); + nullptr); } } #endif @@ -229,7 +229,7 @@ ABIInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -305,7 +305,7 @@ ABIInstances &instances = GetABIInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } ABICreateInstance @@ -323,7 +323,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } @@ -335,7 +335,7 @@ DisassemblerInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -411,7 +411,7 @@ DisassemblerInstances &instances = GetDisassemblerInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } DisassemblerCreateInstance @@ -429,7 +429,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } @@ -442,8 +442,8 @@ DynamicLoaderInstance() : name(), description(), - create_callback(NULL), - debugger_init_callback (NULL) + create_callback(nullptr), + debugger_init_callback (nullptr) { } @@ -523,7 +523,7 @@ DynamicLoaderInstances &instances = GetDynamicLoaderInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } DynamicLoaderCreateInstance @@ -541,7 +541,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } #pragma mark JITLoader @@ -552,8 +552,8 @@ JITLoaderInstance() : name(), description(), - create_callback(NULL), - debugger_init_callback (NULL) + create_callback(nullptr), + debugger_init_callback (nullptr) { } @@ -633,7 +633,7 @@ JITLoaderInstances &instances = GetJITLoaderInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } JITLoaderCreateInstance @@ -651,7 +651,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } #pragma mark EmulateInstruction @@ -662,7 +662,7 @@ EmulateInstructionInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -738,7 +738,7 @@ EmulateInstructionInstances &instances = GetEmulateInstructionInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } EmulateInstructionCreateInstance @@ -756,7 +756,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } #pragma mark OperatingSystem @@ -766,7 +766,7 @@ OperatingSystemInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -838,7 +838,7 @@ OperatingSystemInstances &instances = GetOperatingSystemInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } OperatingSystemCreateInstance @@ -856,7 +856,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } @@ -868,7 +868,7 @@ LanguageRuntimeInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -943,7 +943,7 @@ LanguageRuntimeInstances &instances = GetLanguageRuntimeInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } LanguageRuntimeCreateInstance @@ -961,7 +961,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } #pragma mark SystemRuntime @@ -972,7 +972,7 @@ SystemRuntimeInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -1047,7 +1047,7 @@ SystemRuntimeInstances &instances = GetSystemRuntimeInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } SystemRuntimeCreateInstance @@ -1065,7 +1065,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } @@ -1076,9 +1076,9 @@ ObjectFileInstance() : name(), description(), - create_callback(NULL), - create_memory_callback (NULL), - get_module_specifications (NULL) + create_callback(nullptr), + create_memory_callback (nullptr), + get_module_specifications (nullptr) { } @@ -1157,7 +1157,7 @@ ObjectFileInstances &instances = GetObjectFileInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } @@ -1168,7 +1168,7 @@ ObjectFileInstances &instances = GetObjectFileInstances (); if (idx < instances.size()) return instances[idx].create_memory_callback; - return NULL; + return nullptr; } ObjectFileGetModuleSpecifications @@ -1178,7 +1178,7 @@ ObjectFileInstances &instances = GetObjectFileInstances (); if (idx < instances.size()) return instances[idx].get_module_specifications; - return NULL; + return nullptr; } ObjectFileCreateInstance @@ -1196,7 +1196,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } @@ -1215,7 +1215,7 @@ return pos->create_memory_callback; } } - return NULL; + return nullptr; } @@ -1227,8 +1227,8 @@ ObjectContainerInstance() : name(), description(), - create_callback (NULL), - get_module_specifications (NULL) + create_callback (nullptr), + get_module_specifications (nullptr) { } @@ -1304,7 +1304,7 @@ ObjectContainerInstances &instances = GetObjectContainerInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } ObjectContainerCreateInstance @@ -1322,7 +1322,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } ObjectFileGetModuleSpecifications @@ -1332,7 +1332,7 @@ ObjectContainerInstances &instances = GetObjectContainerInstances (); if (idx < instances.size()) return instances[idx].get_module_specifications; - return NULL; + return nullptr; } #pragma mark LogChannel @@ -1342,7 +1342,7 @@ LogInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -1419,7 +1419,7 @@ LogInstances &instances = GetLogInstances (); if (idx < instances.size()) return instances[idx].name.GetCString(); - return NULL; + return nullptr; } @@ -1430,7 +1430,7 @@ LogInstances &instances = GetLogInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } LogChannelCreateInstance @@ -1448,7 +1448,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } #pragma mark Platform @@ -1458,8 +1458,8 @@ PlatformInstance() : name(), description(), - create_callback(NULL), - debugger_init_callback (NULL) + create_callback(nullptr), + debugger_init_callback (nullptr) { } @@ -1517,7 +1517,7 @@ PlatformInstances &instances = GetPlatformInstances (); if (idx < instances.size()) return instances[idx].name.GetCString(); - return NULL; + return nullptr; } const char * @@ -1527,7 +1527,7 @@ PlatformInstances &instances = GetPlatformInstances (); if (idx < instances.size()) return instances[idx].description.c_str(); - return NULL; + return nullptr; } bool @@ -1558,7 +1558,7 @@ PlatformInstances &instances = GetPlatformInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } PlatformCreateInstance @@ -1576,7 +1576,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } size_t @@ -1605,8 +1605,8 @@ ProcessInstance() : name(), description(), - create_callback(NULL), - debugger_init_callback(NULL) + create_callback(nullptr), + debugger_init_callback(nullptr) { } @@ -1661,7 +1661,7 @@ ProcessInstances &instances = GetProcessInstances (); if (idx < instances.size()) return instances[idx].name.GetCString(); - return NULL; + return nullptr; } const char * @@ -1671,7 +1671,7 @@ ProcessInstances &instances = GetProcessInstances (); if (idx < instances.size()) return instances[idx].description.c_str(); - return NULL; + return nullptr; } bool @@ -1702,7 +1702,7 @@ ProcessInstances &instances = GetProcessInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } @@ -1721,7 +1721,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } #pragma mark SymbolFile @@ -1731,7 +1731,7 @@ SymbolFileInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -1807,7 +1807,7 @@ SymbolFileInstances &instances = GetSymbolFileInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } SymbolFileCreateInstance @@ -1825,7 +1825,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } @@ -1837,7 +1837,7 @@ SymbolVendorInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -1912,7 +1912,7 @@ SymbolVendorInstances &instances = GetSymbolVendorInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } @@ -1931,7 +1931,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } @@ -1942,7 +1942,7 @@ UnwindAssemblyInstance() : name(), description(), - create_callback(NULL) + create_callback(nullptr) { } @@ -2017,7 +2017,7 @@ UnwindAssemblyInstances &instances = GetUnwindAssemblyInstances (); if (idx < instances.size()) return instances[idx].create_callback; - return NULL; + return nullptr; } @@ -2036,7 +2036,7 @@ return pos->create_callback; } } - return NULL; + return nullptr; } void @@ -2109,7 +2109,7 @@ { static ConstString g_property_name("plugin"); - OptionValuePropertiesSP plugin_properties_sp = parent_properties_sp->GetSubProperty (NULL, g_property_name); + 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)); @@ -2121,7 +2121,7 @@ if (plugin_properties_sp) { - lldb::OptionValuePropertiesSP plugin_type_properties_sp = plugin_properties_sp->GetSubProperty (NULL, plugin_type_name); + 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)); @@ -2149,7 +2149,7 @@ lldb::OptionValuePropertiesSP parent_properties_sp (debugger.GetValueProperties()); if (parent_properties_sp) { - OptionValuePropertiesSP plugin_properties_sp = parent_properties_sp->GetSubProperty (NULL, plugin_type_name); + 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)); @@ -2161,7 +2161,7 @@ if (plugin_properties_sp) { - lldb::OptionValuePropertiesSP plugin_type_properties_sp = plugin_properties_sp->GetSubProperty (NULL, g_property_name); + 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)); @@ -2186,7 +2186,7 @@ ConstString(), // not creating to so we don't need the description false)); if (plugin_type_properties_sp) - properties_sp = plugin_type_properties_sp->GetSubProperty (NULL, setting_name); + properties_sp = plugin_type_properties_sp->GetSubProperty (nullptr, setting_name); return properties_sp; } @@ -2224,7 +2224,7 @@ ConstString(), // not creating to so we don't need the description false)); if (plugin_type_properties_sp) - properties_sp = plugin_type_properties_sp->GetSubProperty (NULL, setting_name); + properties_sp = plugin_type_properties_sp->GetSubProperty (nullptr, setting_name); return properties_sp; } @@ -2262,7 +2262,7 @@ ConstString(), // not creating to so we don't need the description false)); if (plugin_type_properties_sp) - properties_sp = plugin_type_properties_sp->GetSubProperty (NULL, setting_name); + properties_sp = plugin_type_properties_sp->GetSubProperty (nullptr, setting_name); return properties_sp; } Index: source/Core/RegisterValue.cpp =================================================================== --- source/Core/RegisterValue.cpp +++ source/Core/RegisterValue.cpp @@ -112,7 +112,7 @@ lldb::ByteOrder dst_byte_order, Error &error) const { - if (reg_info == NULL) + if (reg_info == nullptr) { error.SetErrorString ("invalid register info argument."); return 0; @@ -162,7 +162,7 @@ lldb::ByteOrder src_byte_order, Error &error) { - if (reg_info == NULL) + if (reg_info == nullptr) { error.SetErrorString ("invalid register info argument."); return 0; @@ -445,13 +445,13 @@ RegisterValue::SetValueFromCString (const RegisterInfo *reg_info, const char *value_str) { Error error; - if (reg_info == NULL) + if (reg_info == nullptr) { error.SetErrorString ("Invalid register info argument."); return error; } - if (value_str == NULL || value_str[0] == '\0') + if (value_str == nullptr || value_str[0] == '\0') { error.SetErrorString ("Invalid c-string value string."); return error; @@ -951,7 +951,7 @@ case eTypeLongDouble: return &m_data.ieee_long_double; case eTypeBytes: return m_data.buffer.bytes; } - return NULL; + return nullptr; } void * @@ -972,7 +972,7 @@ case eTypeLongDouble: return &m_data.ieee_long_double; case eTypeBytes: return m_data.buffer.bytes; } - return NULL; + return nullptr; } uint32_t Index: source/Core/RegularExpression.cpp =================================================================== --- source/Core/RegularExpression.cpp +++ source/Core/RegularExpression.cpp @@ -129,7 +129,7 @@ RegularExpression::Execute(const char* s, Match *match, int execute_flags) const { int err = 1; - if (s != NULL && m_comp_err == 0) + if (s != nullptr && m_comp_err == 0) { if (match) { @@ -144,7 +144,7 @@ err = ::regexec (&m_preg, s, 0, - NULL, + nullptr, execute_flags); } } @@ -239,7 +239,7 @@ RegularExpression::GetText () const { if (m_re.empty()) - return NULL; + return nullptr; return m_re.c_str(); } Index: source/Core/Scalar.cpp =================================================================== --- source/Core/Scalar.cpp +++ source/Core/Scalar.cpp @@ -1775,7 +1775,7 @@ Scalar::SetValueFromCString (const char *value_str, Encoding encoding, size_t byte_size) { Error error; - if (value_str == NULL || value_str[0] == '\0') + if (value_str == nullptr || value_str[0] == '\0') { error.SetErrorString ("Invalid c-string value string."); return error; Index: source/Core/SearchFilter.cpp =================================================================== --- source/Core/SearchFilter.cpp +++ source/Core/SearchFilter.cpp @@ -134,7 +134,7 @@ empty_sc.target_sp = m_target_sp; if (searcher.GetDepth() == Searcher::eDepthTarget) - searcher.SearchCallback (*this, empty_sc, NULL, false); + searcher.SearchCallback (*this, empty_sc, nullptr, false); else DoModuleIteration(empty_sc, searcher); } @@ -149,7 +149,7 @@ empty_sc.target_sp = m_target_sp; if (searcher.GetDepth() == Searcher::eDepthTarget) - searcher.SearchCallback (*this, empty_sc, NULL, false); + searcher.SearchCallback (*this, empty_sc, nullptr, false); else { Mutex::Locker modules_locker(modules.GetMutex()); @@ -185,7 +185,7 @@ if (searcher.GetDepth () == Searcher::eDepthModule) { SymbolContext matchingContext(context.module_sp.get()); - searcher.SearchCallback (*this, matchingContext, NULL, false); + searcher.SearchCallback (*this, matchingContext, nullptr, false); } else { @@ -210,7 +210,7 @@ { SymbolContext matchingContext(m_target_sp, module_sp); - Searcher::CallbackReturn shouldContinue = searcher.SearchCallback (*this, matchingContext, NULL, false); + Searcher::CallbackReturn shouldContinue = searcher.SearchCallback (*this, matchingContext, nullptr, false); if (shouldContinue == Searcher::eCallbackReturnStop || shouldContinue == Searcher::eCallbackReturnPop) return shouldContinue; @@ -233,7 +233,7 @@ SearchFilter::DoCUIteration (const ModuleSP &module_sp, const SymbolContext &context, Searcher &searcher) { Searcher::CallbackReturn shouldContinue; - if (context.comp_unit == NULL) + if (context.comp_unit == nullptr) { const size_t num_comp_units = module_sp->GetNumCompileUnits(); for (size_t i = 0; i < num_comp_units; i++) @@ -248,7 +248,7 @@ { SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get()); - shouldContinue = searcher.SearchCallback (*this, matchingContext, NULL, false); + shouldContinue = searcher.SearchCallback (*this, matchingContext, nullptr, false); if (shouldContinue == Searcher::eCallbackReturnPop) return Searcher::eCallbackReturnContinue; @@ -267,7 +267,7 @@ if (CompUnitPasses(*context.comp_unit)) { SymbolContext matchingContext (m_target_sp, module_sp, context.comp_unit); - return searcher.SearchCallback (*this, matchingContext, NULL, false); + return searcher.SearchCallback (*this, matchingContext, nullptr, false); } } return Searcher::eCallbackReturnContinue; @@ -395,7 +395,7 @@ { SymbolContext empty_sc; empty_sc.target_sp = m_target_sp; - searcher.SearchCallback (*this, empty_sc, NULL, false); + searcher.SearchCallback (*this, empty_sc, nullptr, false); } // If the module file spec is a full path, then we can just find the one @@ -546,7 +546,7 @@ { SymbolContext empty_sc; empty_sc.target_sp = m_target_sp; - searcher.SearchCallback (*this, empty_sc, NULL, false); + searcher.SearchCallback (*this, empty_sc, nullptr, false); } // If the module file spec is a full path, then we can just find the one @@ -714,7 +714,7 @@ { SymbolContext empty_sc; empty_sc.target_sp = m_target_sp; - searcher.SearchCallback (*this, empty_sc, NULL, false); + searcher.SearchCallback (*this, empty_sc, nullptr, false); } // If the module file spec is a full path, then we can just find the one Index: source/Core/Section.cpp =================================================================== --- source/Core/Section.cpp +++ source/Core/Section.cpp @@ -265,7 +265,7 @@ else { // The top most section prints the module basename - const char * name = NULL; + const char * name = nullptr; ModuleSP module_sp (GetModule()); const FileSpec &file_spec = m_obj_file->GetFileSpec(); @@ -430,7 +430,7 @@ { const_iterator sect_iter; const_iterator end = m_sections.end(); - for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == NULL; ++sect_iter) + for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == nullptr; ++sect_iter) { Section *child_section = sect_iter->get(); assert (child_section); @@ -455,7 +455,7 @@ { const_iterator sect_iter; const_iterator end = m_sections.end(); - for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == NULL; ++sect_iter) + for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == nullptr; ++sect_iter) { if ((*sect_iter)->GetID() == sect_id) { @@ -500,7 +500,7 @@ SectionSP sect_sp; const_iterator sect_iter; const_iterator end = m_sections.end(); - for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == NULL; ++sect_iter) + for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == nullptr; ++sect_iter) { Section *sect = sect_iter->get(); if (sect->ContainsFileAddress (vm_addr)) @@ -511,7 +511,7 @@ if (depth > 0) sect_sp = sect->GetChildren().FindSectionContainingFileAddress(vm_addr, depth - 1); - if (sect_sp.get() == NULL && !sect->IsFake()) + if (sect_sp.get() == nullptr && !sect->IsFake()) sect_sp = *sect_iter; } } @@ -521,7 +521,7 @@ bool SectionList::ContainsSection(user_id_t sect_id) const { - return FindSectionByID (sect_id).get() != NULL; + return FindSectionByID (sect_id).get() != nullptr; } void @@ -541,7 +541,7 @@ const_iterator end = m_sections.end(); for (sect_iter = m_sections.begin(); sect_iter != end; ++sect_iter) { - (*sect_iter)->Dump(s, target_has_loaded_sections ? target : NULL, depth); + (*sect_iter)->Dump(s, target_has_loaded_sections ? target : nullptr, depth); } if (show_header && !m_sections.empty()) Index: source/Core/SourceManager.cpp =================================================================== --- source/Core/SourceManager.cpp +++ source/Core/SourceManager.cpp @@ -289,7 +289,7 @@ bool inlines_okay = true; bool append = false; size_t num_matches = executable_ptr->FindFunctions (main_name, - NULL, + nullptr, lldb::eFunctionNameTypeBase, inlines_okay, symbols_okay, @@ -362,7 +362,7 @@ if (num_matches > 1) { SymbolContext sc; - FileSpec *test_cu_spec = NULL; + FileSpec *test_cu_spec = nullptr; for (unsigned i = 0; i < num_matches; i++) { @@ -443,12 +443,12 @@ SourceManager::File::PeekLineData (uint32_t line) { if (!LineIsValid(line)) - return NULL; + return nullptr; size_t line_offset = GetLineOffset (line); if (line_offset < m_data_sp->GetByteSize()) return (const char *)m_data_sp->GetBytes() + line_offset; - return NULL; + return nullptr; } uint32_t @@ -605,7 +605,7 @@ if (m_offsets.empty()) { - if (m_data_sp.get() == NULL) + if (m_data_sp.get() == nullptr) return false; const char *start = (char *)m_data_sp->GetBytes(); @@ -646,14 +646,14 @@ else { // Some lines have been populated, start where we last left off - assert("Not implemented yet" == NULL); + assert("Not implemented yet" == nullptr); } } else { // Calculate all line offsets up to "line" - assert("Not implemented yet" == NULL); + assert("Not implemented yet" == nullptr); } return false; } Index: source/Core/Stream.cpp =================================================================== --- source/Core/Stream.cpp +++ source/Core/Stream.cpp @@ -154,9 +154,9 @@ void Stream::Address (uint64_t addr, uint32_t addr_size, const char *prefix, const char *suffix) { - if (prefix == NULL) + if (prefix == nullptr) prefix = ""; - if (suffix == NULL) + if (suffix == nullptr) suffix = ""; // int addr_width = m_addr_size << 1; // Printf ("%s0x%0*" PRIx64 "%s", prefix, addr_width, addr, suffix); @@ -226,7 +226,7 @@ { // Our stack buffer wasn't big enough to contain the entire formatted // string, so lets let vasprintf create the string for us! - char *str_ptr = NULL; + char *str_ptr = nullptr; length = ::vasprintf (&str_ptr, format, args_copy); if (str_ptr) { @@ -496,7 +496,7 @@ { // Our stack buffer wasn't big enough to contain the entire formatted // string, so lets let vasprintf create the string for us! - char *str_ptr = NULL; + char *str_ptr = nullptr; length = ::vasprintf (&str_ptr, format, args_copy); if (str_ptr) { Index: source/Core/StringList.cpp =================================================================== --- source/Core/StringList.cpp +++ source/Core/StringList.cpp @@ -118,7 +118,7 @@ { if (idx < m_strings.size()) return m_strings[idx].c_str(); - return NULL; + return nullptr; } void Index: source/Core/Timer.cpp =================================================================== --- source/Core/Timer.cpp +++ source/Core/Timer.cpp @@ -24,7 +24,7 @@ static bool g_quiet = true; uint32_t Timer::g_depth = 0; uint32_t Timer::g_display_depth = 0; -FILE * Timer::g_file = NULL; +FILE * Timer::g_file = nullptr; typedef std::vector TimerStack; typedef std::map TimerCategoryMap; static lldb::thread_key_t g_key; @@ -48,7 +48,7 @@ GetTimerStackForCurrentThread () { void *timer_stack = Host::ThreadLocalStorageGet(g_key); - if (timer_stack == NULL) + if (timer_stack == nullptr) { Host::ThreadLocalStorageSet(g_key, new TimerStack); timer_stack = Host::ThreadLocalStorageGet(g_key); Index: source/Core/UUID.cpp =================================================================== --- source/Core/UUID.cpp +++ source/Core/UUID.cpp @@ -220,7 +220,7 @@ size_t UUID::SetFromCString (const char *cstr, uint32_t num_uuid_bytes) { - if (cstr == NULL) + if (cstr == nullptr) return 0; const char *p = cstr; Index: source/Core/Value.cpp =================================================================== --- source/Core/Value.cpp +++ source/Core/Value.cpp @@ -36,7 +36,7 @@ m_value (), m_vector (), m_clang_type (), - m_context (NULL), + m_context (nullptr), m_value_type (eValueTypeScalar), m_context_type (eContextTypeInvalid), m_data_buffer () @@ -47,7 +47,7 @@ m_value (scalar), m_vector (), m_clang_type (), - m_context (NULL), + m_context (nullptr), m_value_type (eValueTypeScalar), m_context_type (eContextTypeInvalid), m_data_buffer () @@ -59,7 +59,7 @@ m_value (), m_vector (), m_clang_type (), - m_context (NULL), + m_context (nullptr), m_value_type (eValueTypeHostAddress), m_context_type (eContextTypeInvalid), m_data_buffer () @@ -144,7 +144,7 @@ { if (m_context_type == eContextTypeRegisterInfo) return static_cast (m_context); - return NULL; + return nullptr; } Type * @@ -152,7 +152,7 @@ { if (m_context_type == eContextTypeLLDBType) return static_cast (m_context); - return NULL; + return nullptr; } void @@ -365,14 +365,14 @@ break; } case eValueTypeLoadAddress: - if (exe_ctx == NULL) + if (exe_ctx == nullptr) { error.SetErrorString ("can't read load address (no execution context)"); } else { Process *process = exe_ctx->GetProcessPtr(); - if (process == NULL || !process->IsAlive()) + if (process == nullptr || !process->IsAlive()) { Target *target = exe_ctx->GetTargetPtr(); if (target) @@ -432,11 +432,11 @@ break; case eValueTypeFileAddress: - if (exe_ctx == NULL) + if (exe_ctx == nullptr) { error.SetErrorString ("can't read file address (no execution context)"); } - else if (exe_ctx->GetTargetPtr() == NULL) + else if (exe_ctx->GetTargetPtr() == nullptr) { error.SetErrorString ("can't read file address (invalid target)"); } @@ -449,7 +449,7 @@ } else { - if (module == NULL) + if (module == nullptr) { // The only thing we can currently lock down to a module so that // we can resolve a file address, is a variable. @@ -575,7 +575,7 @@ } uint8_t* dst = const_cast(data.PeekData (data_offset, byte_size)); - if (dst != NULL) + if (dst != nullptr) { if (address_type == eAddressTypeHost) { @@ -585,7 +585,7 @@ error.SetErrorStringWithFormat("trying to read from host address of 0."); return error; } - memcpy (dst, (uint8_t*)NULL + address, byte_size); + memcpy (dst, (uint8_t*)nullptr + address, byte_size); } else if ((address_type == eAddressTypeLoad) || (address_type == eAddressTypeFile)) { @@ -657,7 +657,7 @@ { DataExtractor data; lldb::addr_t addr = m_value.ULongLong(LLDB_INVALID_ADDRESS); - Error error (GetValueAsData (exe_ctx, data, 0, NULL)); + Error error (GetValueAsData (exe_ctx, data, 0, nullptr)); if (error.Success()) { Scalar scalar; @@ -695,7 +695,7 @@ { if (m_context_type == eContextTypeVariable) return static_cast (m_context); - return NULL; + return nullptr; } void @@ -705,7 +705,7 @@ m_vector.Clear(); m_clang_type.Clear(); m_value_type = eValueTypeScalar; - m_context = NULL; + m_context = nullptr; m_context_type = eContextTypeInvalid; m_data_buffer.Clear(); } @@ -770,7 +770,7 @@ return &(m_values[idx]); } else - return NULL; + return nullptr; } void Index: source/Core/ValueObject.cpp =================================================================== --- source/Core/ValueObject.cpp +++ source/Core/ValueObject.cpp @@ -66,7 +66,7 @@ ValueObject::ValueObject (ValueObject &parent) : UserID (++g_value_obj_uid), // Unique identifier for every value object m_parent (&parent), - m_root (NULL), + m_root (nullptr), m_update_point (parent.GetUpdatePoint ()), m_name (), m_data (), @@ -80,9 +80,9 @@ m_manager(parent.GetManager()), m_children (), m_synthetic_children (), - m_dynamic_value (NULL), - m_synthetic_value(NULL), - m_deref_valobj(NULL), + m_dynamic_value (nullptr), + m_synthetic_value(nullptr), + m_deref_valobj(nullptr), m_format (eFormatDefault), m_last_format (eFormatDefault), m_last_format_mgr_revision(0), @@ -111,8 +111,8 @@ ValueObject::ValueObject (ExecutionContextScope *exe_scope, AddressType child_ptr_or_ref_addr_type) : UserID (++g_value_obj_uid), // Unique identifier for every value object - m_parent (NULL), - m_root (NULL), + m_parent (nullptr), + m_root (nullptr), m_update_point (exe_scope), m_name (), m_data (), @@ -126,9 +126,9 @@ m_manager(), m_children (), m_synthetic_children (), - m_dynamic_value (NULL), - m_synthetic_value(NULL), - m_deref_valobj(NULL), + m_dynamic_value (nullptr), + m_synthetic_value(nullptr), + m_deref_valobj(nullptr), m_format (eFormatDefault), m_last_format (eFormatDefault), m_last_format_mgr_revision(0), @@ -514,7 +514,7 @@ } ValueObject* child = m_children.GetChildAtIndex(idx); - if (child != NULL) + if (child != nullptr) return child->GetSP(); } return child_sp; @@ -775,7 +775,7 @@ ValueObject * ValueObject::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index) { - ValueObject *valobj = NULL; + ValueObject *valobj = nullptr; bool omit_empty_base_classes = true; bool ignore_array_bounds = synthetic_array_member; @@ -925,7 +925,7 @@ m_summary_str); } if (m_summary_str.empty()) - return NULL; + return nullptr; return m_summary_str.c_str(); } @@ -973,14 +973,14 @@ { Error error; ValueObjectSP pointee_sp = Dereference(error); - if (error.Fail() || pointee_sp.get() == NULL) + if (error.Fail() || pointee_sp.get() == nullptr) return 0; return pointee_sp->GetData(data, error); } else { ValueObjectSP child_sp = GetChildAtIndex(0, true); - if (child_sp.get() == NULL) + if (child_sp.get() == nullptr) return 0; Error error; return child_sp->GetData(data, error); @@ -990,7 +990,7 @@ else /* (items > 1) */ { Error error; - lldb_private::DataBufferHeap* heap_buf_ptr = NULL; + lldb_private::DataBufferHeap* heap_buf_ptr = nullptr; lldb::DataBufferSP data_sp(heap_buf_ptr = new lldb_private::DataBufferHeap()); AddressType addr_type; @@ -1220,7 +1220,7 @@ { // We have an array uint64_t array_size = 0; - if (clang_type.IsArrayType(NULL, &array_size, NULL)) + if (clang_type.IsArrayType(nullptr, &array_size, nullptr)) { cstr_len = array_size; if (cstr_len > max_length) @@ -1346,22 +1346,22 @@ { if (!UpdateValueIfNeeded (true)) - return NULL; + return nullptr; if (!m_object_desc_str.empty()) return m_object_desc_str.c_str(); ExecutionContext exe_ctx (GetExecutionContextRef()); Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL) - return NULL; + if (process == nullptr) + return nullptr; StreamString s; LanguageType language = GetObjectRuntimeLanguage(); LanguageRuntime *runtime = process->GetLanguageRuntime(language); - if (runtime == NULL) + if (runtime == nullptr) { // Aw, hell, if the things a pointer, or even just an integer, let's try ObjC anyway... ClangASTType clang_type = GetClangType(); @@ -1381,7 +1381,7 @@ } if (m_object_desc_str.empty()) - return NULL; + return nullptr; else return m_object_desc_str.c_str(); } @@ -1450,7 +1450,7 @@ } } if (m_value_str.empty()) - return NULL; + return nullptr; return m_value_str.c_str(); } @@ -1676,7 +1676,7 @@ bool var_success = false; { - const char *cstr = NULL; + const char *cstr = nullptr; // this is a local stream that we are using to ensure that the data pointed to by cstr survives // long enough for us to copy it to its destination - it is necessary to have this temporary storage @@ -1996,7 +1996,7 @@ bool ValueObject::IsArrayType () { - return GetClangType().IsArrayType (NULL, NULL, NULL); + return GetClangType().IsArrayType (nullptr, nullptr, nullptr); } bool @@ -2025,14 +2025,14 @@ if (process) return process->IsPossibleDynamicValue(*this); else - return GetClangType().IsPossibleDynamicType (NULL, true, true); + return GetClangType().IsPossibleDynamicType (nullptr, true, true); } bool ValueObject::IsObjCNil () { const uint32_t mask = ClangASTType::eTypeIsObjC | ClangASTType::eTypeIsPointer; - bool isObjCpointer = (((GetClangType().GetTypeInfo(NULL)) & mask) == mask); + bool isObjCpointer = (((GetClangType().GetTypeInfo(nullptr)) & mask) == mask); if (!isObjCpointer) return false; bool canReadValue = true; @@ -2239,7 +2239,7 @@ // We haven't made a synthetic array member for expression yet, so // lets make one and cache it for any future reference. synthetic_child_sp = GetValueForExpressionPath(expression, - NULL, NULL, NULL, + nullptr, nullptr, nullptr, GetValueForExpressionPathOptions().DontAllowSyntheticChildren()); // Cache the value if we got one back... @@ -2262,7 +2262,7 @@ TargetSP target_sp(GetTargetSP()); if (target_sp && target_sp->GetEnableSyntheticValue() == false) { - m_synthetic_value = NULL; + m_synthetic_value = nullptr; return; } @@ -2271,7 +2271,7 @@ if (!UpdateFormatsIfNeeded() && m_synthetic_value) return; - if (m_synthetic_children_sp.get() == NULL) + if (m_synthetic_children_sp.get() == nullptr) return; if (current_synth_sp == m_synthetic_children_sp && m_synthetic_value) @@ -2304,7 +2304,7 @@ if (use_dynamic == eNoDynamicValues) return ValueObjectSP(); - if (!IsDynamic() && m_dynamic_value == NULL) + if (!IsDynamic() && m_dynamic_value == nullptr) { CalculateDynamicValue(use_dynamic); } @@ -2345,7 +2345,7 @@ { UpdateFormatsIfNeeded(); - if (m_synthetic_children_sp.get() == NULL) + if (m_synthetic_children_sp.get() == nullptr) return false; CalculateSyntheticValue(true); @@ -2387,7 +2387,7 @@ else return GetParent(); } - return NULL; + return nullptr; } void @@ -2838,7 +2838,7 @@ } if (!separator_position || separator_position > close_bracket_position) // if no separator, this is either [] or [N] { - char *end = NULL; + char *end = nullptr; unsigned long index = ::strtoul (expression_cstr+1, &end, 0); if (!end || end != close_bracket_position) // if something weird is in our way return an error { @@ -3014,7 +3014,7 @@ } else // we have a low and a high index { - char *end = NULL; + char *end = nullptr; unsigned long index_lower = ::strtoul (expression_cstr+1, &end, 0); if (!end || end != separator_position) // if something weird is in our way return an error { @@ -3186,7 +3186,7 @@ } if (!separator_position || separator_position > close_bracket_position) // if no separator, this is either [] or [N] { - char *end = NULL; + char *end = nullptr; unsigned long index = ::strtoul (expression_cstr+1, &end, 0); if (!end || end != close_bracket_position) // if something weird is in our way return an error { @@ -3301,7 +3301,7 @@ } else // we have a low and a high index { - char *end = NULL; + char *end = nullptr; unsigned long index_lower = ::strtoul (expression_cstr+1, &end, 0); if (!end || end != separator_position) // if something weird is in our way return an error { @@ -3714,12 +3714,12 @@ const bool thread_and_frame_only_if_stopped = true; ExecutionContext exe_ctx(m_exe_ctx_ref.Lock(thread_and_frame_only_if_stopped)); - if (exe_ctx.GetTargetPtr() == NULL) + if (exe_ctx.GetTargetPtr() == nullptr) return false; // If we don't have a process nothing can change. Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) return false; // If our stop id is the current stop ID, nothing has changed: @@ -3811,7 +3811,7 @@ if ((clear_mask & eClearUserVisibleDataItemsSyntheticChildren) == eClearUserVisibleDataItemsSyntheticChildren) { if (m_synthetic_value) - m_synthetic_value = NULL; + m_synthetic_value = nullptr; } } @@ -3823,7 +3823,7 @@ if (!m_parent->IsPointerOrReferenceType()) return m_parent->GetSymbolContextScope(); } - return NULL; + return nullptr; } lldb::ValueObjectSP Index: source/Core/ValueObjectCast.cpp =================================================================== --- source/Core/ValueObjectCast.cpp +++ source/Core/ValueObjectCast.cpp @@ -77,7 +77,7 @@ uint64_t ValueObjectCast::GetByteSize() { - return m_value.GetValueByteSize(NULL); + return m_value.GetValueByteSize(nullptr); } lldb::ValueType Index: source/Core/ValueObjectConstResultImpl.cpp =================================================================== --- source/Core/ValueObjectConstResultImpl.cpp +++ source/Core/ValueObjectConstResultImpl.cpp @@ -50,7 +50,7 @@ lldb::ValueObjectSP ValueObjectConstResultImpl::DerefOnTarget() { - if (m_load_addr_backend.get() == NULL) + if (m_load_addr_backend.get() == nullptr) { lldb::addr_t tgt_address = m_impl_backend->GetPointerValue(); ExecutionContext exe_ctx (m_impl_backend->GetExecutionContextRef()); @@ -67,7 +67,7 @@ lldb::ValueObjectSP ValueObjectConstResultImpl::Dereference (Error &error) { - if (m_impl_backend == NULL) + if (m_impl_backend == nullptr) return lldb::ValueObjectSP(); #if defined (TRIVIAL_IMPL) && TRIVIAL_IMPL == 1 @@ -85,12 +85,12 @@ ValueObject * ValueObjectConstResultImpl::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index) { - if (m_impl_backend == NULL) - return NULL; + if (m_impl_backend == nullptr) + return nullptr; m_impl_backend->UpdateValueIfNeeded(false); - ValueObjectConstResultChild *valobj = NULL; + ValueObjectConstResultChild *valobj = nullptr; bool omit_empty_base_classes = true; bool ignore_array_bounds = synthetic_array_member; @@ -148,7 +148,7 @@ lldb::ValueObjectSP ValueObjectConstResultImpl::GetSyntheticChildAtOffset (uint32_t offset, const ClangASTType& type, bool can_create) { - if (m_impl_backend == NULL) + if (m_impl_backend == nullptr) return lldb::ValueObjectSP(); #if defined (TRIVIAL_IMPL) && TRIVIAL_IMPL == 1 @@ -166,10 +166,10 @@ lldb::ValueObjectSP ValueObjectConstResultImpl::AddressOf (Error &error) { - if (m_address_of_backend.get() != NULL) + if (m_address_of_backend.get() != nullptr) return m_address_of_backend; - if (m_impl_backend == NULL) + if (m_impl_backend == nullptr) return lldb::ValueObjectSP(); if (m_live_address != LLDB_INVALID_ADDRESS) { @@ -201,7 +201,7 @@ AddressType *address_type) { - if (m_impl_backend == NULL) + if (m_impl_backend == nullptr) return 0; if (m_live_address == LLDB_INVALID_ADDRESS) @@ -221,7 +221,7 @@ uint32_t item_idx, uint32_t item_count) { - if (m_impl_backend == NULL) + if (m_impl_backend == nullptr) return 0; #if defined (TRIVIAL_IMPL) && TRIVIAL_IMPL == 1 return m_impl_backend->ValueObject::GetPointeeData(data, item_idx, item_count); Index: source/Core/ValueObjectDynamicValue.cpp =================================================================== --- source/Core/ValueObjectDynamicValue.cpp +++ source/Core/ValueObjectDynamicValue.cpp @@ -117,7 +117,7 @@ { const bool success = UpdateValueIfNeeded(false); if (success && m_dynamic_type_info.HasType()) - return m_value.GetValueByteSize(NULL); + return m_value.GetValueByteSize(nullptr); else return m_parent->GetByteSize(); } Index: source/Core/ValueObjectMemory.cpp =================================================================== --- source/Core/ValueObjectMemory.cpp +++ source/Core/ValueObjectMemory.cpp @@ -61,7 +61,7 @@ m_clang_type() { // Do not attempt to construct one of these objects with no variable! - assert (m_type_sp.get() != NULL); + assert (m_type_sp.get() != nullptr); SetName (ConstString(name)); m_value.SetContext(Value::eContextTypeLLDBType, m_type_sp.get()); TargetSP target_sp (GetTargetSP()); Index: source/Core/ValueObjectRegister.cpp =================================================================== --- source/Core/ValueObjectRegister.cpp +++ source/Core/ValueObjectRegister.cpp @@ -83,7 +83,7 @@ else m_reg_ctx_sp.reset(); - if (m_reg_ctx_sp.get() == NULL) + if (m_reg_ctx_sp.get() == nullptr) { SetValueIsValid (false); m_error.SetErrorToGenericError(); @@ -97,7 +97,7 @@ ValueObject * ValueObjectRegisterContext::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index) { - ValueObject *new_valobj = NULL; + ValueObject *new_valobj = nullptr; const size_t num_children = GetNumChildren(); if (idx < num_children) @@ -123,7 +123,7 @@ ValueObjectRegisterSet::ValueObjectRegisterSet (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx, uint32_t reg_set_idx) : ValueObject (exe_scope), m_reg_ctx_sp (reg_ctx), - m_reg_set (NULL), + m_reg_set (nullptr), m_reg_set_idx (reg_set_idx) { assert (reg_ctx); @@ -178,7 +178,7 @@ SetValueDidChange (false); ExecutionContext exe_ctx(GetExecutionContextRef()); StackFrame *frame = exe_ctx.GetFramePtr(); - if (frame == NULL) + if (frame == nullptr) m_reg_ctx_sp.reset(); else { @@ -186,7 +186,7 @@ if (m_reg_ctx_sp) { const RegisterSet *reg_set = m_reg_ctx_sp->GetRegisterSet (m_reg_set_idx); - if (reg_set == NULL) + if (reg_set == nullptr) m_reg_ctx_sp.reset(); else if (m_reg_set != reg_set) { @@ -212,7 +212,7 @@ ValueObject * ValueObjectRegisterSet::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index) { - ValueObject *valobj = NULL; + ValueObject *valobj = nullptr; if (m_reg_ctx_sp && m_reg_set) { const size_t num_children = GetNumChildren(); @@ -225,11 +225,11 @@ lldb::ValueObjectSP ValueObjectRegisterSet::GetChildMemberWithName (const ConstString &name, bool can_create) { - ValueObject *valobj = NULL; + ValueObject *valobj = nullptr; if (m_reg_ctx_sp && m_reg_set) { const RegisterInfo *reg_info = m_reg_ctx_sp->GetRegisterInfoByName (name.AsCString()); - if (reg_info != NULL) + if (reg_info != nullptr) valobj = new ValueObjectRegister(*this, m_reg_ctx_sp, reg_info->kinds[eRegisterKindLLDB]); } if (valobj) @@ -244,7 +244,7 @@ if (m_reg_ctx_sp && m_reg_set) { const RegisterInfo *reg_info = m_reg_ctx_sp->GetRegisterInfoByName (name.AsCString()); - if (reg_info != NULL) + if (reg_info != nullptr) return reg_info->kinds[eRegisterKindLLDB]; } return UINT32_MAX; @@ -347,7 +347,7 @@ m_error.Clear(); ExecutionContext exe_ctx(GetExecutionContextRef()); StackFrame *frame = exe_ctx.GetFramePtr(); - if (frame == NULL) + if (frame == nullptr) { m_reg_ctx_sp.reset(); m_reg_value.Clear(); Index: source/Core/ValueObjectSyntheticFilter.cpp =================================================================== --- source/Core/ValueObjectSyntheticFilter.cpp +++ source/Core/ValueObjectSyntheticFilter.cpp @@ -200,7 +200,7 @@ if (iter == m_children_byindex.end()) { - if (can_create && m_synth_filter_ap.get() != NULL) + if (can_create && m_synth_filter_ap.get() != nullptr) { lldb::ValueObjectSP synth_guy = m_synth_filter_ap->GetChildAtIndex (idx); if (!synth_guy) @@ -235,7 +235,7 @@ NameToIndexIterator iter = m_name_toindex.find(name.GetCString()); - if (iter == m_name_toindex.end() && m_synth_filter_ap.get() != NULL) + if (iter == m_name_toindex.end() && m_synth_filter_ap.get() != nullptr) { uint32_t index = m_synth_filter_ap->GetIndexOfChildWithName (name); if (index == UINT32_MAX) @@ -243,7 +243,7 @@ m_name_toindex[name.GetCString()] = index; return index; } - else if (iter == m_name_toindex.end() && m_synth_filter_ap.get() == NULL) + else if (iter == m_name_toindex.end() && m_synth_filter_ap.get() == nullptr) return UINT32_MAX; else /*if (iter != m_name_toindex.end())*/ return iter->second; Index: source/Core/ValueObjectVariable.cpp =================================================================== --- source/Core/ValueObjectVariable.cpp +++ source/Core/ValueObjectVariable.cpp @@ -46,7 +46,7 @@ m_variable_sp(var_sp) { // Do not attempt to construct one of these objects with no variable! - assert (m_variable_sp.get() != NULL); + assert (m_variable_sp.get() != nullptr); m_name = var_sp->GetName(); } @@ -130,7 +130,7 @@ else m_error.SetErrorString ("empty constant data"); // constant bytes can't be edited - sorry - m_resolved_value.SetContext(Value::eContextTypeInvalid, NULL); + m_resolved_value.SetContext(Value::eContextTypeInvalid, nullptr); } else { @@ -152,7 +152,7 @@ loclist_base_load_addr = sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (target); } Value old_value(m_value); - if (expr.Evaluate (&exe_ctx, NULL, NULL, NULL, loclist_base_load_addr, NULL, m_value, &m_error)) + if (expr.Evaluate (&exe_ctx, nullptr, nullptr, nullptr, loclist_base_load_addr, nullptr, m_value, &m_error)) { m_resolved_value = m_value; m_value.SetContext(Value::eContextTypeVariable, variable); @@ -248,7 +248,7 @@ else { // could not find location, won't allow editing - m_resolved_value.SetContext(Value::eContextTypeInvalid, NULL); + m_resolved_value.SetContext(Value::eContextTypeInvalid, nullptr); } } return m_error.Success(); @@ -301,7 +301,7 @@ { if (m_variable_sp) return m_variable_sp->GetSymbolContextScope(); - return NULL; + return nullptr; } bool Index: source/DataFormatters/CXXFormatterFunctions.cpp =================================================================== --- source/DataFormatters/CXXFormatterFunctions.cpp +++ source/DataFormatters/CXXFormatterFunctions.cpp @@ -258,10 +258,10 @@ ConversionFlags); ReadUTFBufferAndDumpToStreamOptions () : - m_conversion_function(NULL), + m_conversion_function(nullptr), m_location(0), m_process_sp(), - m_stream(NULL), + m_stream(nullptr), m_prefix_token('@'), m_quote('"'), m_source_size(0), @@ -928,8 +928,8 @@ lldb::ProcessSP& process_sp, Stream& dest, uint32_t size = 0, - Error* error = NULL, - size_t *data_read = NULL, + Error* error = nullptr, + size_t *data_read = nullptr, char prefix_token = '@', char quote = '"') { @@ -1266,7 +1266,7 @@ tm_epoch.tm_year = 2001-1900; // for some reason, we need to subtract 1900 from this field. not sure why. tm_epoch.tm_isdst = -1; tm_epoch.tm_gmtoff = 0; - tm_epoch.tm_zone = NULL; + tm_epoch.tm_zone = nullptr; epoch = timegm(&tm_epoch); #endif } @@ -1281,7 +1281,7 @@ if (*item_name != '[') return UINT32_MAX; item_name++; - char* endptr = NULL; + char* endptr = nullptr; unsigned long int idx = ::strtoul(item_name, &endptr, 0); if (idx == 0 && endptr == item_name) return UINT32_MAX; Index: source/DataFormatters/DataVisualization.cpp =================================================================== --- source/DataFormatters/DataVisualization.cpp +++ source/DataFormatters/DataVisualization.cpp @@ -120,7 +120,7 @@ bool allow_create) { entry = GetFormatManager().GetCategory(category, allow_create); - return (entry.get() != NULL); + return (entry.get() != nullptr); } void Index: source/DataFormatters/FormatManager.cpp =================================================================== --- source/DataFormatters/FormatManager.cpp +++ source/DataFormatters/FormatManager.cpp @@ -160,7 +160,7 @@ { if (format >= eFormatDefault && format < kNumFormats) return g_format_infos[format].format_name; - return NULL; + return nullptr; } void @@ -236,7 +236,7 @@ true); // this is not exactly the usual meaning of stripping typedefs } } - bool canBeObjCDynamic = clang_type.IsPossibleDynamicType (NULL, + bool canBeObjCDynamic = clang_type.IsPossibleDynamicType (nullptr, false, // no C true); // yes ObjC @@ -339,7 +339,7 @@ if (category_sp->IsEnabled() == false) continue; lldb::TypeFormatImplSP format_current_sp = category_sp->GetFormatForType(type_sp); - if (format_current_sp && (format_chosen_sp.get() == NULL || (prio_category > category_sp->GetEnabledPosition()))) + if (format_current_sp && (format_chosen_sp.get() == nullptr || (prio_category > category_sp->GetEnabledPosition()))) { prio_category = category_sp->GetEnabledPosition(); format_chosen_sp = format_current_sp; @@ -365,7 +365,7 @@ if (category_sp->IsEnabled() == false) continue; lldb::TypeSummaryImplSP summary_current_sp = category_sp->GetSummaryForType(type_sp); - if (summary_current_sp && (summary_chosen_sp.get() == NULL || (prio_category > category_sp->GetEnabledPosition()))) + if (summary_current_sp && (summary_chosen_sp.get() == nullptr || (prio_category > category_sp->GetEnabledPosition()))) { prio_category = category_sp->GetEnabledPosition(); summary_chosen_sp = summary_current_sp; @@ -391,7 +391,7 @@ if (category_sp->IsEnabled() == false) continue; lldb::TypeFilterImplSP filter_current_sp((TypeFilterImpl*)category_sp->GetFilterForType(type_sp).get()); - if (filter_current_sp && (filter_chosen_sp.get() == NULL || (prio_category > category_sp->GetEnabledPosition()))) + if (filter_current_sp && (filter_chosen_sp.get() == nullptr || (prio_category > category_sp->GetEnabledPosition()))) { prio_category = category_sp->GetEnabledPosition(); filter_chosen_sp = filter_current_sp; @@ -418,7 +418,7 @@ if (category_sp->IsEnabled() == false) continue; lldb::ScriptedSyntheticChildrenSP synth_current_sp((ScriptedSyntheticChildren*)category_sp->GetSyntheticForType(type_sp).get()); - if (synth_current_sp && (synth_chosen_sp.get() == NULL || (prio_category > category_sp->GetEnabledPosition()))) + if (synth_current_sp && (synth_chosen_sp.get() == nullptr || (prio_category > category_sp->GetEnabledPosition()))) { prio_category = category_sp->GetEnabledPosition(); synth_chosen_sp = synth_current_sp; Index: source/DataFormatters/LibCxx.cpp =================================================================== --- source/DataFormatters/LibCxx.cpp +++ source/DataFormatters/LibCxx.cpp @@ -213,7 +213,7 @@ lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibcxxVectorBoolSyntheticFrontEnd(valobj_sp)); } @@ -262,11 +262,11 @@ // it if were a ValueObjectSP, we would end up with a loop (iterator -> synthetic -> child -> parent == iterator) // and that would in turn leak memory by never allowing the ValueObjects to die and free their memory m_pair_ptr = valobj_sp->GetValueForExpressionPath(".__i_.__ptr_->__value_", - NULL, - NULL, - NULL, + nullptr, + nullptr, + nullptr, ValueObject::GetValueForExpressionPathOptions().DontCheckDotVsArrowSyntax().DontAllowSyntheticChildren(), - NULL).get(); + nullptr).get(); return false; } @@ -311,7 +311,7 @@ lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibCxxMapIteratorSyntheticFrontEnd(valobj_sp)); } @@ -331,13 +331,13 @@ if (!g_item_name) g_item_name.SetCString("__i"); if (!valobj_sp) - return NULL; + return nullptr; return (new VectorIteratorSyntheticFrontEnd(valobj_sp,g_item_name)); } lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::LibcxxSharedPtrSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp.get()), -m_cntrl(NULL), +m_cntrl(nullptr), m_count_sp(), m_weak_count_sp(), m_ptr_size(0), @@ -402,7 +402,7 @@ { m_count_sp.reset(); m_weak_count_sp.reset(); - m_cntrl = NULL; + m_cntrl = nullptr; ValueObjectSP valobj_sp = m_backend.GetSP(); if (!valobj_sp) @@ -446,14 +446,14 @@ lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibcxxSharedPtrSyntheticFrontEnd(valobj_sp)); } lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::LibcxxStdVectorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp.get()), - m_start(NULL), - m_finish(NULL), + m_start(nullptr), + m_finish(nullptr), m_element_type(), m_element_size(0), m_children() @@ -504,7 +504,7 @@ bool lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::Update() { - m_start = m_finish = NULL; + m_start = m_finish = nullptr; m_children.clear(); ValueObjectSP data_type_finder_sp(m_backend.GetChildMemberWithName(ConstString("__end_cap_"),true)); if (!data_type_finder_sp) @@ -549,7 +549,7 @@ lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibcxxStdVectorSyntheticFrontEnd(valobj_sp)); } @@ -563,5 +563,5 @@ return false; stream.Printf("0x%016" PRIx64 " ", value); } - return Debugger::FormatPrompt("size=${svar%#}", NULL, NULL, NULL, stream, &valobj); + return Debugger::FormatPrompt("size=${svar%#}", nullptr, nullptr, nullptr, stream, &valobj); } Index: source/DataFormatters/LibCxxList.cpp =================================================================== --- source/DataFormatters/LibCxxList.cpp +++ source/DataFormatters/LibCxxList.cpp @@ -151,8 +151,8 @@ SyntheticChildrenFrontEnd(*valobj_sp.get()), m_list_capping_size(0), m_node_address(), -m_head(NULL), -m_tail(NULL), +m_head(nullptr), +m_tail(nullptr), m_element_type(), m_count(UINT32_MAX), m_children() @@ -270,7 +270,7 @@ bool lldb_private::formatters::LibcxxStdListSyntheticFrontEnd::Update() { - m_head = m_tail = NULL; + m_head = m_tail = nullptr; m_node_address = 0; m_count = UINT32_MAX; Error err; @@ -280,7 +280,7 @@ m_list_capping_size = m_backend.GetTargetSP()->GetMaximumNumberOfChildrenToDisplay(); if (m_list_capping_size == 0) m_list_capping_size = 255; - if (err.Fail() || backend_addr.get() == NULL) + if (err.Fail() || backend_addr.get() == nullptr) return false; m_node_address = backend_addr->GetValueAsUnsigned(0); if (!m_node_address || m_node_address == LLDB_INVALID_ADDRESS) @@ -320,7 +320,7 @@ lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibcxxStdListSyntheticFrontEnd(valobj_sp)); } Index: source/DataFormatters/LibCxxMap.cpp =================================================================== --- source/DataFormatters/LibCxxMap.cpp +++ source/DataFormatters/LibCxxMap.cpp @@ -239,8 +239,8 @@ lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::LibcxxStdMapSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp.get()), -m_tree(NULL), -m_root_node(NULL), +m_tree(nullptr), +m_root_node(nullptr), m_element_type(), m_skip_size(UINT32_MAX), m_count(UINT32_MAX), @@ -255,7 +255,7 @@ { if (m_count != UINT32_MAX) return m_count; - if (m_tree == NULL) + if (m_tree == nullptr) return 0; ValueObjectSP m_item(m_tree->GetChildMemberWithName(ConstString("__pair3_"), true)); if (!m_item) @@ -294,7 +294,7 @@ return; ClangASTType node_type(node->GetClangType()); uint64_t bit_offset; - if (node_type.GetIndexOfFieldWithName("__value_", NULL, &bit_offset) == UINT32_MAX) + if (node_type.GetIndexOfFieldWithName("__value_", nullptr, &bit_offset) == UINT32_MAX) return; m_skip_size = bit_offset / 8u; } @@ -304,7 +304,7 @@ { if (idx >= CalculateNumChildren()) return lldb::ValueObjectSP(); - if (m_tree == NULL || m_root_node == NULL) + if (m_tree == nullptr || m_root_node == nullptr) return lldb::ValueObjectSP(); auto cached = m_children.find(idx); @@ -314,10 +314,10 @@ bool need_to_skip = (idx > 0); MapIterator iterator(m_root_node, CalculateNumChildren()); ValueObjectSP iterated_sp(iterator.advance(idx)); - if (iterated_sp.get() == NULL) + if (iterated_sp.get() == nullptr) { // this tree is garbage - stop - m_tree = NULL; // this will stop all future searches until an Update() happens + m_tree = nullptr; // this will stop all future searches until an Update() happens return iterated_sp; } if (GetDataType()) @@ -328,14 +328,14 @@ iterated_sp = iterated_sp->Dereference(error); if (!iterated_sp || error.Fail()) { - m_tree = NULL; + m_tree = nullptr; return lldb::ValueObjectSP(); } GetValueOffset(iterated_sp); iterated_sp = iterated_sp->GetChildMemberWithName(ConstString("__value_"), true); if (!iterated_sp) { - m_tree = NULL; + m_tree = nullptr; return lldb::ValueObjectSP(); } } @@ -347,20 +347,20 @@ GetChildAtIndex(0); if (m_skip_size == UINT32_MAX) { - m_tree = NULL; + m_tree = nullptr; return lldb::ValueObjectSP(); } iterated_sp = iterated_sp->GetSyntheticChildAtOffset(m_skip_size, m_element_type, true); if (!iterated_sp) { - m_tree = NULL; + m_tree = nullptr; return lldb::ValueObjectSP(); } } } else { - m_tree = NULL; + m_tree = nullptr; return lldb::ValueObjectSP(); } // at this point we have a valid @@ -370,7 +370,7 @@ iterated_sp->GetData(data, error); if (error.Fail()) { - m_tree = NULL; + m_tree = nullptr; return lldb::ValueObjectSP(); } StreamString name; @@ -382,7 +382,7 @@ lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::Update() { m_count = UINT32_MAX; - m_tree = m_root_node = NULL; + m_tree = m_root_node = nullptr; m_children.clear(); m_tree = m_backend.GetChildMemberWithName(ConstString("__tree_"), true).get(); if (!m_tree) @@ -410,6 +410,6 @@ lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibcxxStdMapSyntheticFrontEnd(valobj_sp)); } Index: source/DataFormatters/LibCxxUnorderedMap.cpp =================================================================== --- source/DataFormatters/LibCxxUnorderedMap.cpp +++ source/DataFormatters/LibCxxUnorderedMap.cpp @@ -27,7 +27,7 @@ lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::LibcxxStdUnorderedMapSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp.get()), -m_tree(NULL), +m_tree(nullptr), m_num_elements(0), m_next_element(nullptr), m_children(), @@ -50,7 +50,7 @@ { if (idx >= CalculateNumChildren()) return lldb::ValueObjectSP(); - if (m_tree == NULL) + if (m_tree == nullptr) return lldb::ValueObjectSP(); auto cached = m_children.find(idx); @@ -134,6 +134,6 @@ lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibcxxStdUnorderedMapSyntheticFrontEnd(valobj_sp)); } Index: source/DataFormatters/LibStdcpp.cpp =================================================================== --- source/DataFormatters/LibStdcpp.cpp +++ source/DataFormatters/LibStdcpp.cpp @@ -90,9 +90,9 @@ Target& target(process_sp->GetTarget()); ValueObjectSP retval_sp; if (bit_set) - target.EvaluateExpression("(bool)true", NULL, retval_sp); + target.EvaluateExpression("(bool)true", nullptr, retval_sp); else - target.EvaluateExpression("(bool)false", NULL, retval_sp); + target.EvaluateExpression("(bool)false", nullptr, retval_sp); StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx); if (retval_sp) retval_sp->SetName(ConstString(name.GetData())); @@ -190,7 +190,7 @@ lldb_private::formatters::LibstdcppVectorBoolSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibstdcppVectorBoolSyntheticFrontEnd(valobj_sp)); } @@ -306,7 +306,7 @@ lldb_private::formatters::LibstdcppMapIteratorSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) - return NULL; + return nullptr; return (new LibstdcppMapIteratorSyntheticFrontEnd(valobj_sp)); } @@ -326,6 +326,6 @@ if (!g_item_name) g_item_name.SetCString("_M_current"); if (!valobj_sp) - return NULL; + return nullptr; return (new VectorIteratorSyntheticFrontEnd(valobj_sp,g_item_name)); } Index: source/DataFormatters/NSArray.cpp =================================================================== --- source/DataFormatters/NSArray.cpp +++ source/DataFormatters/NSArray.cpp @@ -93,8 +93,8 @@ SyntheticChildrenFrontEnd(*valobj_sp.get()), m_exe_ctx_ref(), m_ptr_size(8), - m_data_32(NULL), - m_data_64(NULL) + m_data_32(nullptr), + m_data_64(nullptr) { if (valobj_sp) { @@ -144,9 +144,9 @@ ValueObjectSP valobj_sp = m_backend.GetSP(); m_ptr_size = 0; delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; if (!valobj_sp) return false; m_exe_ctx_ref = valobj_sp->GetExecutionContextRef(); @@ -193,9 +193,9 @@ lldb_private::formatters::NSArrayMSyntheticFrontEnd::~NSArrayMSyntheticFrontEnd () { delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; } lldb_private::formatters::NSArrayISyntheticFrontEnd::NSArrayISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) : @@ -288,28 +288,28 @@ { lldb::ProcessSP process_sp (valobj_sp->GetProcessSP()); if (!process_sp) - return NULL; + return nullptr; ObjCLanguageRuntime *runtime = (ObjCLanguageRuntime*)process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC); if (!runtime) - return NULL; + return nullptr; if (!valobj_sp->IsPointerType()) { Error error; valobj_sp = valobj_sp->AddressOf(error); if (error.Fail() || !valobj_sp) - return NULL; + return nullptr; } ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp.get())); if (!descriptor.get() || !descriptor->IsValid()) - return NULL; + return nullptr; const char* class_name = descriptor->GetClassName().GetCString(); if (!class_name || !*class_name) - return NULL; + return nullptr; if (!strcmp(class_name,"__NSArrayI")) { Index: source/DataFormatters/NSDictionary.cpp =================================================================== --- source/DataFormatters/NSDictionary.cpp +++ source/DataFormatters/NSDictionary.cpp @@ -63,7 +63,7 @@ if (!clang_type) { - clang_type = target_ast_context->CreateRecordType(NULL, lldb::eAccessPublic, type_name, clang::TTK_Struct, lldb::eLanguageTypeC); + clang_type = target_ast_context->CreateRecordType(nullptr, lldb::eAccessPublic, type_name, clang::TTK_Struct, lldb::eLanguageTypeC); if (clang_type) { @@ -156,28 +156,28 @@ lldb::ProcessSP process_sp (valobj_sp->GetProcessSP()); if (!process_sp) - return NULL; + return nullptr; ObjCLanguageRuntime *runtime = (ObjCLanguageRuntime*)process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC); if (!runtime) - return NULL; + return nullptr; if (!valobj_sp->IsPointerType()) { Error error; valobj_sp = valobj_sp->AddressOf(error); if (error.Fail() || !valobj_sp) - return NULL; + return nullptr; } ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp.get())); if (!descriptor.get() || !descriptor->IsValid()) - return NULL; + return nullptr; const char* class_name = descriptor->GetClassName().GetCString(); if (!class_name || !*class_name) - return NULL; + return nullptr; if (!strcmp(class_name,"__NSDictionaryI")) { @@ -253,8 +253,8 @@ m_exe_ctx_ref(), m_ptr_size(8), m_order(lldb::eByteOrderInvalid), -m_data_32(NULL), -m_data_64(NULL), +m_data_32(nullptr), +m_data_64(nullptr), m_pair_type() { } @@ -262,9 +262,9 @@ lldb_private::formatters::NSDictionaryISyntheticFrontEnd::~NSDictionaryISyntheticFrontEnd () { delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; } size_t @@ -290,9 +290,9 @@ { m_children.clear(); delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; m_ptr_size = 0; ValueObjectSP valobj_sp = m_backend.GetSP(); if (!valobj_sp) @@ -415,8 +415,8 @@ m_exe_ctx_ref(), m_ptr_size(8), m_order(lldb::eByteOrderInvalid), -m_data_32(NULL), -m_data_64(NULL), +m_data_32(nullptr), +m_data_64(nullptr), m_pair_type() { } @@ -424,9 +424,9 @@ lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::~NSDictionaryMSyntheticFrontEnd () { delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; } size_t @@ -454,9 +454,9 @@ ValueObjectSP valobj_sp = m_backend.GetSP(); m_ptr_size = 0; delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; if (!valobj_sp) return false; m_exe_ctx_ref = valobj_sp->GetExecutionContextRef(); Index: source/DataFormatters/NSSet.cpp =================================================================== --- source/DataFormatters/NSSet.cpp +++ source/DataFormatters/NSSet.cpp @@ -113,28 +113,28 @@ { lldb::ProcessSP process_sp (valobj_sp->GetProcessSP()); if (!process_sp) - return NULL; + return nullptr; ObjCLanguageRuntime *runtime = (ObjCLanguageRuntime*)process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC); if (!runtime) - return NULL; + return nullptr; if (!valobj_sp->IsPointerType()) { Error error; valobj_sp = valobj_sp->AddressOf(error); if (error.Fail() || !valobj_sp) - return NULL; + return nullptr; } ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp.get())); if (!descriptor.get() || !descriptor->IsValid()) - return NULL; + return nullptr; const char* class_name = descriptor->GetClassName().GetCString(); if (!class_name || !*class_name) - return NULL; + return nullptr; if (!strcmp(class_name,"__NSSetI")) { @@ -150,7 +150,7 @@ } else { - return /*(new NSSetCodeRunningSyntheticFrontEnd(valobj_sp))*/ NULL; + return /*(new NSSetCodeRunningSyntheticFrontEnd(valobj_sp))*/ nullptr; } } @@ -158,8 +158,8 @@ SyntheticChildrenFrontEnd(*valobj_sp.get()), m_exe_ctx_ref(), m_ptr_size(8), -m_data_32(NULL), -m_data_64(NULL) +m_data_32(nullptr), +m_data_64(nullptr) { if (valobj_sp) Update(); @@ -168,9 +168,9 @@ lldb_private::formatters::NSSetISyntheticFrontEnd::~NSSetISyntheticFrontEnd () { delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; } size_t @@ -196,9 +196,9 @@ { m_children.clear(); delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; m_ptr_size = 0; ValueObjectSP valobj_sp = m_backend.GetSP(); if (!valobj_sp) @@ -325,8 +325,8 @@ SyntheticChildrenFrontEnd(*valobj_sp.get()), m_exe_ctx_ref(), m_ptr_size(8), -m_data_32(NULL), -m_data_64(NULL) +m_data_32(nullptr), +m_data_64(nullptr) { if (valobj_sp) Update (); @@ -335,9 +335,9 @@ lldb_private::formatters::NSSetMSyntheticFrontEnd::~NSSetMSyntheticFrontEnd () { delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; } size_t @@ -365,9 +365,9 @@ ValueObjectSP valobj_sp = m_backend.GetSP(); m_ptr_size = 0; delete m_data_32; - m_data_32 = NULL; + m_data_32 = nullptr; delete m_data_64; - m_data_64 = NULL; + m_data_64 = nullptr; if (!valobj_sp) return false; if (!valobj_sp) Index: source/DataFormatters/TypeFormat.cpp =================================================================== --- source/DataFormatters/TypeFormat.cpp +++ source/DataFormatters/TypeFormat.cpp @@ -91,7 +91,7 @@ // put custom bytes to display in the DataExtractor to override the default value logic if (GetFormat() == eFormatCString) { - lldb_private::Flags type_flags(clang_type.GetTypeInfo(NULL)); // disambiguate w.r.t. TypeFormatImpl::Flags + lldb_private::Flags type_flags(clang_type.GetTypeInfo(nullptr)); // disambiguate w.r.t. TypeFormatImpl::Flags if (type_flags.Test(ClangASTType::eTypeIsPointer) && !type_flags.Test(ClangASTType::eTypeIsObjC)) { // if we are dumping a pointer as a c-string, get the pointee data as a string Index: source/DataFormatters/TypeSynthetic.cpp =================================================================== --- source/DataFormatters/TypeSynthetic.cpp +++ source/DataFormatters/TypeSynthetic.cpp @@ -69,7 +69,7 @@ SyntheticChildrenFrontEnd(backend), m_python_class(pclass), m_wrapper_sp(), -m_interpreter(NULL) +m_interpreter(nullptr) { if (backend == LLDB_INVALID_UID) return; @@ -81,7 +81,7 @@ m_interpreter = target_sp->GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); - if (m_interpreter != NULL) + if (m_interpreter != nullptr) m_wrapper_sp = m_interpreter->CreateSyntheticScriptedProvider(m_python_class.c_str(), backend.GetSP()); } Index: source/DataFormatters/ValueObjectPrinter.cpp =================================================================== --- source/DataFormatters/ValueObjectPrinter.cpp +++ source/DataFormatters/ValueObjectPrinter.cpp @@ -270,7 +270,7 @@ TypeSummaryImpl* entry = options.m_summary_sp ? options.m_summary_sp.get() : m_valobj->GetSummaryFormat().get(); if (options.m_omit_summary_depth > 0) - entry = NULL; + entry = nullptr; m_summary_formatter.first = entry; m_summary_formatter.second = true; } @@ -341,7 +341,7 @@ // the value if this thing is nil // (but show the value if the user passes a format explicitly) TypeSummaryImpl* entry = GetSummaryFormatter(); - if (!IsNil() && !m_value.empty() && (entry == NULL || (entry->DoesPrintValue(m_valobj) || options.m_format != eFormatDefault) || m_summary.empty()) && !options.m_hide_value) + if (!IsNil() && !m_value.empty() && (entry == nullptr || (entry->DoesPrintValue(m_valobj) || options.m_format != eFormatDefault) || m_summary.empty()) && !options.m_hide_value) { m_stream->Printf(" %s", m_value.c_str()); value_printed = true; Index: source/Expression/ASTDumper.cpp =================================================================== --- source/Expression/ASTDumper.cpp +++ source/Expression/ASTDumper.cpp @@ -105,7 +105,7 @@ memcpy(str, m_dump.c_str(), len); - char *end = NULL; + char *end = nullptr; end = strchr(str, '\n'); Index: source/Expression/ASTResultSynthesizer.cpp =================================================================== --- source/Expression/ASTResultSynthesizer.cpp +++ source/Expression/ASTResultSynthesizer.cpp @@ -32,11 +32,11 @@ ASTResultSynthesizer::ASTResultSynthesizer(ASTConsumer *passthrough, Target &target) : - m_ast_context (NULL), + m_ast_context (nullptr), m_passthrough (passthrough), - m_passthrough_sema (NULL), + m_passthrough_sema (nullptr), m_target (target), - m_sema (NULL) + m_sema (nullptr) { if (!m_passthrough) return; @@ -330,7 +330,7 @@ log->Printf("Last statement is an %s with type: %s", (is_lvalue ? "lvalue" : "rvalue"), s.c_str()); } - clang::VarDecl *result_decl = NULL; + clang::VarDecl *result_decl = nullptr; if (is_lvalue) { @@ -345,7 +345,7 @@ QualType ptr_qual_type; - if (expr_qual_type->getAs() != NULL) + if (expr_qual_type->getAs() != nullptr) ptr_qual_type = Ctx.getObjCObjectPointerType(expr_qual_type); else ptr_qual_type = Ctx.getPointerType(expr_qual_type); @@ -356,7 +356,7 @@ SourceLocation(), result_ptr_id, ptr_qual_type, - NULL, + nullptr, SC_Static); if (!result_decl) @@ -376,7 +376,7 @@ SourceLocation(), &result_id, expr_qual_type, - NULL, + nullptr, SC_Static); if (!result_decl) @@ -505,7 +505,7 @@ void ASTResultSynthesizer::ForgetSema() { - m_sema = NULL; + m_sema = nullptr; if (m_passthrough_sema) m_passthrough_sema->ForgetSema(); Index: source/Expression/ASTStructExtractor.cpp =================================================================== --- source/Expression/ASTStructExtractor.cpp +++ source/Expression/ASTStructExtractor.cpp @@ -29,11 +29,11 @@ ASTStructExtractor::ASTStructExtractor(ASTConsumer *passthrough, const char *struct_name, ClangFunction &function) : - m_ast_context (NULL), + m_ast_context (nullptr), m_passthrough (passthrough), - m_passthrough_sema (NULL), - m_sema (NULL), - m_action (NULL), + m_passthrough_sema (nullptr), + m_sema (nullptr), + m_action (nullptr), m_function (function), m_struct_name (struct_name) { @@ -68,7 +68,7 @@ if (!body_compound_stmt) return; // do we have to handle this? - RecordDecl *struct_decl = NULL; + RecordDecl *struct_decl = nullptr; StringRef desired_name(m_struct_name.c_str()); @@ -212,8 +212,8 @@ void ASTStructExtractor::ForgetSema() { - m_sema = NULL; - m_action = NULL; + m_sema = nullptr; + m_action = nullptr; if (m_passthrough_sema) m_passthrough_sema->ForgetSema(); Index: source/Expression/ClangASTSource.cpp =================================================================== --- source/Expression/ClangASTSource.cpp +++ source/Expression/ClangASTSource.cpp @@ -316,8 +316,8 @@ dumper.ToLog(log, " [COID] "); } - Decl *original_decl = NULL; - ASTContext *original_ctx = NULL; + Decl *original_decl = nullptr; + ASTContext *original_ctx = nullptr; if (m_ast_importer->ResolveDeclOrigin(interface_decl, &original_decl, &original_ctx)) { @@ -352,31 +352,31 @@ lldb::ProcessSP process(m_target->GetProcessSP()); if (!process) - return NULL; + return nullptr; ObjCLanguageRuntime *language_runtime(process->GetObjCLanguageRuntime()); if (!language_runtime) - return NULL; + return nullptr; ConstString class_name(interface_decl->getNameAsString().c_str()); lldb::TypeSP complete_type_sp(language_runtime->LookupInCompleteClassCache(class_name)); if (!complete_type_sp) - return NULL; + return nullptr; TypeFromUser complete_type = TypeFromUser(complete_type_sp->GetClangFullType()); lldb::clang_type_t complete_opaque_type = complete_type.GetOpaqueQualType(); if (!complete_opaque_type) - return NULL; + return nullptr; const clang::Type *complete_clang_type = QualType::getFromOpaquePtr(complete_opaque_type).getTypePtr(); const ObjCInterfaceType *complete_interface_type = dyn_cast(complete_clang_type); if (!complete_interface_type) - return NULL; + return nullptr; ObjCInterfaceDecl *complete_iface_decl(complete_interface_type->getDecl()); @@ -421,8 +421,8 @@ (predicate ? "non-null" : "null")); } - Decl *original_decl = NULL; - ASTContext *original_ctx = NULL; + Decl *original_decl = nullptr; + ASTContext *original_ctx = nullptr; if (!m_ast_importer->ResolveDeclOrigin(context_decl, &original_decl, &original_ctx)) return ELR_Failure; @@ -630,7 +630,7 @@ if (name == id_name || name == Class_name) return; - if (name_unique_cstr == NULL) + if (name_unique_cstr == nullptr) return; // The ClangASTSource is not responsible for finding $-names. @@ -796,9 +796,9 @@ template class TaggedASTDecl { public: - TaggedASTDecl() : decl(NULL) { } + TaggedASTDecl() : decl(nullptr) { } TaggedASTDecl(D *_decl) : decl(_decl) { } - bool IsValid() const { return (decl != NULL); } + bool IsValid() const { return (decl != nullptr); } bool IsInvalid() const { return !IsValid(); } D *operator->() const { return decl; } D *decl; @@ -835,7 +835,7 @@ DeclFromParser::GetOrigin(ClangASTImporter *importer) { DeclFromUser <> origin_decl; - importer->ResolveDeclOrigin(this->decl, &origin_decl.decl, NULL); + importer->ResolveDeclOrigin(this->decl, &origin_decl.decl, nullptr); if (origin_decl.IsInvalid()) return DeclFromUser(); return DeclFromUser(dyn_cast(origin_decl.decl)); @@ -953,8 +953,8 @@ do { - Decl *original_decl = NULL; - ASTContext *original_ctx = NULL; + Decl *original_decl = nullptr; + ASTContext *original_ctx = nullptr; m_ast_importer->ResolveDeclOrigin(interface_decl, &original_decl, &original_ctx); @@ -1682,19 +1682,19 @@ ClangASTSource::AddNamespace (NameSearchContext &context, ClangASTImporter::NamespaceMapSP &namespace_decls) { if (!namespace_decls) - return NULL; + return nullptr; const ClangNamespaceDecl &namespace_decl = namespace_decls->begin()->second; Decl *copied_decl = m_ast_importer->CopyDecl(m_ast_context, namespace_decl.GetASTContext(), namespace_decl.GetNamespaceDecl()); if (!copied_decl) - return NULL; + return nullptr; NamespaceDecl *copied_namespace_decl = dyn_cast(copied_decl); if (!copied_namespace_decl) - return NULL; + return nullptr; context.m_decls.push_back(copied_namespace_decl); @@ -1728,7 +1728,7 @@ assert (type && "Type for variable must be valid!"); if (!type.IsValid()) - return NULL; + return nullptr; IdentifierInfo *ii = m_decl_name.getAsIdentifierInfo(); @@ -1740,7 +1740,7 @@ SourceLocation(), ii, type.GetQualType(), - 0, + nullptr, SC_Static); m_decls.push_back(Decl); @@ -1753,10 +1753,10 @@ assert (type && "Type for variable must be valid!"); if (!type.IsValid()) - return NULL; + return nullptr; if (m_function_types.count(type)) - return NULL; + return nullptr; m_function_types.insert(type); @@ -1774,7 +1774,7 @@ SourceLocation(), m_decl_name.getAsIdentifierInfo(), qual_type, - NULL, + nullptr, SC_Static, isInlineSpecified, hasWrittenPrototype, @@ -1801,11 +1801,11 @@ const_cast(m_decl_context), SourceLocation(), SourceLocation(), - NULL, + nullptr, arg_qual_type, - NULL, + nullptr, SC_Static, - NULL)); + nullptr)); } func_decl->setParams(ArrayRef(parm_var_decls)); @@ -1869,7 +1869,7 @@ return (NamedDecl*)interface_decl; } } - return NULL; + return nullptr; } void Index: source/Expression/ClangExpressionDeclMap.cpp =================================================================== --- source/Expression/ClangExpressionDeclMap.cpp +++ source/Expression/ClangExpressionDeclMap.cpp @@ -193,7 +193,7 @@ ExecutionContext &exe_ctx = m_parser_vars->m_exe_ctx; Target *target = exe_ctx.GetTargetPtr(); - if (target == NULL) + if (target == nullptr) return false; ASTContext *context(target->GetScratchClangASTContext()->getASTContext()); @@ -233,7 +233,7 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); ExecutionContext &exe_ctx = m_parser_vars->m_exe_ctx; Target *target = exe_ctx.GetTargetPtr(); - if (target == NULL) + if (target == nullptr) return false; ASTContext *context(target->GetScratchClangASTContext()->getASTContext()); @@ -538,7 +538,7 @@ ExecutionContext &exe_ctx = m_parser_vars->m_exe_ctx; Target *target = exe_ctx.GetTargetPtr(); // Back out in all cases where we're not fully initialized - if (target == NULL) + if (target == nullptr) return false; if (!m_parser_vars->m_sym_ctx.target_sp) return false; @@ -573,7 +573,7 @@ SymbolContext sym_ctx; sc_list.GetContextAtIndex(i, sym_ctx); - const Address *func_so_addr = NULL; + const Address *func_so_addr = nullptr; bool is_indirect_function = false; if (sym_ctx.function) func_so_addr = &sym_ctx.function->GetAddressRange().GetBaseAddress(); @@ -818,7 +818,7 @@ } } - return NULL; + return nullptr; } lldb::VariableSP @@ -953,7 +953,7 @@ const char *name_unique_cstr = name.GetCString(); - if (name_unique_cstr == NULL) + if (name_unique_cstr == nullptr) return; static ConstString id_name("id"); @@ -974,7 +974,7 @@ { // Clang is looking for the type of "this" - if (frame == NULL) + if (frame == nullptr) return; SymbolContext sym_ctx = frame->GetSymbolContext(lldb::eSymbolContextFunction); @@ -1314,7 +1314,7 @@ module_sp, name, &namespace_decl, - NULL); + nullptr); if (var) { @@ -1359,8 +1359,8 @@ if (sc_list.GetSize()) { - Symbol *extern_symbol = NULL; - Symbol *non_extern_symbol = NULL; + Symbol *extern_symbol = nullptr; + Symbol *non_extern_symbol = nullptr; for (uint32_t index = 0, num_indices = sc_list.GetSize(); index < num_indices; @@ -1382,7 +1382,7 @@ if (dyn_cast(decl_ctx)) continue; - AddOneFunction(context, sym_ctx.function, NULL, current_id); + AddOneFunction(context, sym_ctx.function, nullptr, current_id); context.m_found.function_with_type_info = true; context.m_found.function = true; } @@ -1391,7 +1391,7 @@ if (sym_ctx.symbol->GetType() == eSymbolTypeReExported) { sym_ctx.symbol = sym_ctx.symbol->ResolveReExportedSymbol(*target); - if (sym_ctx.symbol == NULL) + if (sym_ctx.symbol == nullptr) continue; } @@ -1406,12 +1406,12 @@ { if (extern_symbol) { - AddOneFunction (context, NULL, extern_symbol, current_id); + AddOneFunction (context, nullptr, extern_symbol, current_id); context.m_found.function = true; } else if (non_extern_symbol) { - AddOneFunction (context, NULL, non_extern_symbol, current_id); + AddOneFunction (context, nullptr, non_extern_symbol, current_id); context.m_found.function = true; } } @@ -1614,7 +1614,7 @@ bool is_reference = pt.IsReferenceType(); - NamedDecl *var_decl = NULL; + NamedDecl *var_decl = nullptr; if (is_reference) var_decl = context.AddVarDecl(pt); else @@ -1629,7 +1629,7 @@ ClangExpressionVariable::ParserVars *parser_vars = entity->GetParserVars(GetParserID()); parser_vars->m_parser_type = pt; parser_vars->m_named_decl = var_decl; - parser_vars->m_llvm_value = NULL; + parser_vars->m_llvm_value = nullptr; parser_vars->m_lldb_value = var_location; parser_vars->m_lldb_var = var; @@ -1668,7 +1668,7 @@ ClangExpressionVariable::ParserVars *parser_vars = pvar_sp->GetParserVars(GetParserID()); parser_vars->m_parser_type = parser_type; parser_vars->m_named_decl = var_decl; - parser_vars->m_llvm_value = NULL; + parser_vars->m_llvm_value = nullptr; parser_vars->m_lldb_value.Clear(); if (log) @@ -1689,7 +1689,7 @@ Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr(); - if (target == NULL) + if (target == nullptr) return; ASTContext *scratch_ast_context = target->GetScratchClangASTContext()->getASTContext(); @@ -1720,7 +1720,7 @@ parser_vars->m_parser_type = parser_type; parser_vars->m_named_decl = var_decl; - parser_vars->m_llvm_value = NULL; + parser_vars->m_llvm_value = nullptr; parser_vars->m_lldb_sym = &symbol; if (log) @@ -1827,7 +1827,7 @@ ClangExpressionVariable::ParserVars *parser_vars = entity->GetParserVars(GetParserID()); parser_vars->m_parser_type = parser_clang_type; parser_vars->m_named_decl = var_decl; - parser_vars->m_llvm_value = NULL; + parser_vars->m_llvm_value = nullptr; parser_vars->m_lldb_value.Clear(); entity->m_flags |= ClangExpressionVariable::EVBareRegister; @@ -1848,8 +1848,8 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); - NamedDecl *function_decl = NULL; - const Address *fun_address = NULL; + NamedDecl *function_decl = nullptr; + const Address *fun_address = nullptr; ClangASTType function_clang_type; bool is_indirect_function = false; @@ -1952,7 +1952,7 @@ parser_vars->m_named_decl = function_decl; - parser_vars->m_llvm_value = NULL; + parser_vars->m_llvm_value = nullptr; if (log) { Index: source/Expression/ClangExpressionParser.cpp =================================================================== --- source/Expression/ClangExpressionParser.cpp +++ source/Expression/ClangExpressionParser.cpp @@ -468,7 +468,7 @@ if (decl_map) { - Stream *error_stream = NULL; + Stream *error_stream = nullptr; Target *target = exe_ctx.GetTargetPtr(); if (target) error_stream = target->GetDebugger().GetErrorFile().get(); Index: source/Expression/ClangExpressionVariable.cpp =================================================================== --- source/Expression/ClangExpressionVariable.cpp +++ source/Expression/ClangExpressionVariable.cpp @@ -107,7 +107,7 @@ } return const_cast(m_frozen_sp->GetDataExtractor().GetDataStart()); } - return NULL; + return nullptr; } void @@ -125,10 +125,10 @@ void ClangExpressionVariable::TransferAddress (bool force) { - if (m_live_sp.get() == NULL) + if (m_live_sp.get() == nullptr) return; - if (m_frozen_sp.get() == NULL) + if (m_frozen_sp.get() == nullptr) return; if (force || (m_frozen_sp->GetLiveAddress() == LLDB_INVALID_ADDRESS)) Index: source/Expression/ClangFunction.cpp =================================================================== --- source/Expression/ClangFunction.cpp +++ source/Expression/ClangFunction.cpp @@ -61,7 +61,7 @@ m_execution_unit_sp(), m_jit_module_wp(), m_name (name ? name : ""), - m_function_ptr (NULL), + m_function_ptr (nullptr), m_function_addr (functionAddress), m_function_return_type(return_type), m_wrapper_function_name ("__lldb_caller_function"), @@ -338,7 +338,7 @@ Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) return return_value; lldb::ProcessSP jit_process_sp(m_jit_process_wp.lock()); @@ -435,10 +435,10 @@ // FIXME: Use the errors Stream for better error reporting. Thread *thread = exe_ctx.GetThreadPtr(); - if (thread == NULL) + if (thread == nullptr) { errors.Printf("Can't call a function without a valid thread."); - return NULL; + return nullptr; } // Okay, now run the function: @@ -472,7 +472,7 @@ Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) return false; lldb::ProcessSP jit_process_sp(m_jit_process_wp.lock()); @@ -522,7 +522,7 @@ lldb::addr_t args_addr; - if (args_addr_ptr != NULL) + if (args_addr_ptr != nullptr) args_addr = *args_addr_ptr; else args_addr = LLDB_INVALID_ADDRESS; @@ -573,7 +573,7 @@ if (exe_ctx.GetProcessPtr()) exe_ctx.GetProcessPtr()->SetRunningUserExpression(false); - if (args_addr_ptr != NULL) + if (args_addr_ptr != nullptr) *args_addr_ptr = args_addr; if (return_value != eExecutionCompleted) @@ -581,7 +581,7 @@ FetchFunctionResults(exe_ctx, args_addr, results); - if (args_addr_ptr == NULL) + if (args_addr_ptr == nullptr) DeallocateFunctionResults(exe_ctx, args_addr); return eExecutionCompleted; Index: source/Expression/ClangPersistentVariables.cpp =================================================================== --- source/Expression/ClangPersistentVariables.cpp +++ source/Expression/ClangPersistentVariables.cpp @@ -57,7 +57,7 @@ return; name++; - if (strtoul(name, NULL, 0) == m_next_persistent_variable_id - 1) + if (strtoul(name, nullptr, 0) == m_next_persistent_variable_id - 1) m_next_persistent_variable_id--; } @@ -83,7 +83,7 @@ PersistentTypeMap::const_iterator i = m_persistent_types.find(name.GetCString()); if (i == m_persistent_types.end()) - return NULL; + return nullptr; else return i->second; } Index: source/Expression/ClangUserExpression.cpp =================================================================== --- source/Expression/ClangUserExpression.cpp +++ source/Expression/ClangUserExpression.cpp @@ -77,7 +77,7 @@ m_static_method(false), m_needs_object_ptr (false), m_const_object (false), - m_target (NULL), + m_target (nullptr), m_can_interpret (false), m_materialized_address (LLDB_INVALID_ADDRESS) { @@ -134,7 +134,7 @@ } StackFrame *frame = exe_ctx.GetFramePtr(); - if (frame == NULL) + if (frame == nullptr) { if (log) log->Printf(" [CUE::SC] Null stack frame"); @@ -920,7 +920,7 @@ if (execution_result == eExecutionInterrupted || execution_result == eExecutionHitBreakpoint) { - const char *error_desc = NULL; + const char *error_desc = nullptr; if (call_plan_sp) { @@ -987,7 +987,7 @@ Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL || process->GetState() != lldb::eStateStopped) + if (process == nullptr || process->GetState() != lldb::eStateStopped) { if (execution_policy == eExecutionPolicyAlways) { @@ -1000,7 +1000,7 @@ } } - if (process == NULL || !process->CanJIT()) + if (process == nullptr || !process->CanJIT()) execution_policy = eExecutionPolicyNever; ClangUserExpressionSP user_expression_sp (new ClangUserExpression (expr_cstr, expr_prefix, language, desired_type)); @@ -1080,7 +1080,7 @@ } } - if (result_valobj_sp.get() == NULL) + if (result_valobj_sp.get() == nullptr) { result_valobj_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), error); } Index: source/Expression/ClangUtilityFunction.cpp =================================================================== --- source/Expression/ClangUtilityFunction.cpp +++ source/Expression/ClangUtilityFunction.cpp @@ -115,7 +115,7 @@ m_expr_decl_map.reset(new ClangExpressionDeclMap(keep_result_in_memory, exe_ctx)); - if (!m_expr_decl_map->WillParse(exe_ctx, NULL)) + if (!m_expr_decl_map->WillParse(exe_ctx, nullptr)) { error_stream.PutCString ("error: current process state is unsuitable for expression parsing\n"); return false; Index: source/Expression/DWARFExpression.cpp =================================================================== --- source/Expression/DWARFExpression.cpp +++ source/Expression/DWARFExpression.cpp @@ -734,7 +734,7 @@ Value &value ) { - if (reg_ctx == NULL) + if (reg_ctx == nullptr) { if (error_ptr) error_ptr->SetErrorStringWithFormat("No register context in frame.\n"); @@ -1218,7 +1218,7 @@ ) const { ExecutionContext exe_ctx (exe_scope); - return Evaluate(&exe_ctx, expr_locals, decl_map, NULL, loclist_base_load_addr, initial_value_ptr, result, error_ptr); + return Evaluate(&exe_ctx, expr_locals, decl_map, nullptr, loclist_base_load_addr, initial_value_ptr, result, error_ptr); } bool @@ -1240,7 +1240,7 @@ { lldb::offset_t offset = 0; addr_t pc; - StackFrame *frame = NULL; + StackFrame *frame = nullptr; if (reg_ctx) pc = reg_ctx->GetPC(); else @@ -1326,15 +1326,15 @@ } std::vector stack; - Process *process = NULL; - StackFrame *frame = NULL; + Process *process = nullptr; + StackFrame *frame = nullptr; if (exe_ctx) { process = exe_ctx->GetProcessPtr(); frame = exe_ctx->GetFramePtr(); } - if (reg_ctx == NULL && frame) + if (reg_ctx == nullptr && frame) reg_ctx = frame->GetRegisterContext().get(); if (initial_value_ptr) Index: source/Expression/IRDynamicChecks.cpp =================================================================== --- source/Expression/IRDynamicChecks.cpp +++ source/Expression/IRDynamicChecks.cpp @@ -80,12 +80,12 @@ { // FIXME: We have to get the checkers to know why they scotched the call in more detail, // so we can print a better message here. - if (m_valid_pointer_check.get() != NULL && m_valid_pointer_check->ContainsAddress(addr)) + if (m_valid_pointer_check.get() != nullptr && m_valid_pointer_check->ContainsAddress(addr)) { message.Printf ("Attempted to dereference an invalid pointer."); return true; } - else if (m_objc_object_check.get() != NULL && m_objc_object_check->ContainsAddress(addr)) + else if (m_objc_object_check.get() != nullptr && m_objc_object_check->ContainsAddress(addr)) { message.Printf ("Attempted to dereference an invalid ObjC Object or send it an unrecognized selector"); return true; @@ -146,8 +146,8 @@ DynamicCheckerFunctions &checker_functions) : m_module(module), m_checker_functions(checker_functions), - m_i8ptr_ty(NULL), - m_intptr_ty(NULL) + m_i8ptr_ty(nullptr), + m_intptr_ty(nullptr) { } @@ -355,7 +355,7 @@ ValidPointerChecker (llvm::Module &module, DynamicCheckerFunctions &checker_functions) : Instrumenter(module, checker_functions), - m_valid_pointer_check_func(NULL) + m_valid_pointer_check_func(nullptr) { } @@ -374,7 +374,7 @@ if (!m_valid_pointer_check_func) m_valid_pointer_check_func = BuildPointerValidatorFunc(m_checker_functions.m_valid_pointer_check->StartAddress()); - llvm::Value *dereferenced_ptr = NULL; + llvm::Value *dereferenced_ptr = nullptr; if (llvm::LoadInst *li = dyn_cast (inst)) dereferenced_ptr = li->getPointerOperand(); @@ -424,7 +424,7 @@ ObjcObjectChecker(llvm::Module &module, DynamicCheckerFunctions &checker_functions) : Instrumenter(module, checker_functions), - m_objc_object_check_func(NULL) + m_objc_object_check_func(nullptr) { } @@ -650,7 +650,7 @@ std::string s; raw_string_ostream oss(s); - M.print(oss, NULL); + M.print(oss, nullptr); oss.flush(); Index: source/Expression/IRExecutionUnit.cpp =================================================================== --- source/Expression/IRExecutionUnit.cpp +++ source/Expression/IRExecutionUnit.cpp @@ -166,8 +166,8 @@ ArchSpec arch(target->GetArchitecture()); - const char *plugin_name = NULL; - const char *flavor_string = NULL; + const char *plugin_name = nullptr; + const char *flavor_string = nullptr; lldb::DisassemblerSP disassembler_sp = Disassembler::FindPlugin(arch, flavor_string, plugin_name); if (!disassembler_sp) @@ -273,7 +273,7 @@ std::string s; llvm::raw_string_ostream oss(s); - m_module->print(oss, NULL); + m_module->print(oss, nullptr); oss.flush(); @@ -476,7 +476,7 @@ StubSize, Alignment, eSectionIDInvalid, - NULL)); + nullptr)); if (log) { @@ -618,7 +618,7 @@ Size, Alignment, eSectionIDInvalid, - NULL)); + nullptr)); if (log) { @@ -697,7 +697,7 @@ Size, Alignment, eSectionIDInvalid, - NULL)); + nullptr)); if (log) { Index: source/Expression/IRForTarget.cpp =================================================================== --- source/Expression/IRForTarget.cpp +++ source/Expression/IRForTarget.cpp @@ -87,7 +87,7 @@ static llvm::Value *FindEntryInstruction (llvm::Function *function) { if (function->empty()) - return NULL; + return nullptr; return function->getEntryBlock().getFirstNonPHIOrDbg(); } @@ -100,16 +100,16 @@ ModulePass(ID), m_resolve_vars(resolve_vars), m_func_name(func_name), - m_module(NULL), + m_module(nullptr), m_decl_map(decl_map), m_data_allocator(execution_unit), - m_CFStringCreateWithBytes(NULL), - m_sel_registerName(NULL), - m_intptr_ty(NULL), + m_CFStringCreateWithBytes(nullptr), + m_sel_registerName(nullptr), + m_intptr_ty(nullptr), m_error_stream(error_stream), - m_result_store(NULL), + m_result_store(nullptr), m_result_is_pointer(false), - m_reloc_placeholder(NULL), + m_reloc_placeholder(nullptr), m_entry_instruction_finder (FindEntryInstruction) { } @@ -167,7 +167,7 @@ fun_addr = LLDB_INVALID_ADDRESS; name.Clear(); - value_ptr = NULL; + value_ptr = nullptr; if (fun->isIntrinsic()) { @@ -340,7 +340,7 @@ uint64_t addr = LLDB_INVALID_ADDRESS; lldb_private::ConstString name; - Constant **value_ptr = NULL; + Constant **value_ptr = nullptr; LookupResult result = GetFunctionAddress(fun, addr, @@ -394,7 +394,7 @@ NamedMDNode *named_metadata = module->getNamedMetadata("clang.global.decl.ptrs"); if (!named_metadata) - return NULL; + return nullptr; unsigned num_nodes = named_metadata->getNumOperands(); unsigned node_index; @@ -406,7 +406,7 @@ MDNode *metadata_node = named_metadata->getOperand(node_index); if (!metadata_node) - return NULL; + return nullptr; if (metadata_node->getNumOperands() != 2) continue; @@ -417,14 +417,14 @@ ConstantInt *constant_int = dyn_cast(metadata_node->getOperand(1)); if (!constant_int) - return NULL; + return nullptr; uintptr_t ptr = constant_int->getZExtValue(); return reinterpret_cast(ptr); } - return NULL; + return nullptr; } clang::NamedDecl * @@ -446,7 +446,7 @@ ValueSymbolTable& value_symbol_table = m_module->getValueSymbolTable(); std::string result_name_str; - const char *result_name = NULL; + const char *result_name = nullptr; for (ValueSymbolTable::iterator vi = value_symbol_table.begin(), ve = value_symbol_table.end(); vi != ve; @@ -625,7 +625,7 @@ result_global->getType()->getElementType(), false, /* not constant */ GlobalValue::ExternalLinkage, - NULL, /* no initializer */ + nullptr, /* no initializer */ m_result_name.GetCString ()); // It's too late in compilation to create a new VarDecl for this, but we don't @@ -771,7 +771,7 @@ m_CFStringCreateWithBytes = ConstantExpr::getIntToPtr(CFSCWB_addr_int, CFSCWB_ptr_ty); } - ConstantDataSequential *string_array = NULL; + ConstantDataSequential *string_array = nullptr; if (cstr) string_array = dyn_cast(cstr->getInitializer()); @@ -988,7 +988,7 @@ } if (!cstr_array) - cstr_global = NULL; + cstr_global = nullptr; if (!RewriteObjCConstString(nsstring_global, cstr_global)) { @@ -1238,7 +1238,7 @@ alloc->getType(), false, /* not constant */ GlobalValue::ExternalLinkage, - NULL, /* no initializer */ + nullptr, /* no initializer */ alloc->getName().str().c_str()); // What we're going to do here is make believe this was a regular old external @@ -1492,12 +1492,12 @@ std::string name (named_decl->getName().str()); clang::ValueDecl *value_decl = dyn_cast(named_decl); - if (value_decl == NULL) + if (value_decl == nullptr) return false; lldb_private::ClangASTType clang_type(&value_decl->getASTContext(), value_decl->getType()); - const Type *value_type = NULL; + const Type *value_type = nullptr; if (name[0] == '$') { @@ -2026,12 +2026,12 @@ static bool isGuardVariableRef(Value *V) { - Constant *Old = NULL; + Constant *Old = nullptr; if (!(Old = dyn_cast(V))) return false; - ConstantExpr *CE = NULL; + ConstantExpr *CE = nullptr; if ((CE = dyn_cast(V))) { @@ -2357,8 +2357,8 @@ for (element_index = 0; element_index < num_elements; ++element_index) { - const clang::NamedDecl *decl = NULL; - Value *value = NULL; + const clang::NamedDecl *decl = nullptr; + Value *value = nullptr; off_t offset; lldb_private::ConstString name; @@ -2543,7 +2543,7 @@ std::string s; raw_string_ostream oss(s); - m_module->print(oss, NULL); + m_module->print(oss, nullptr); oss.flush(); @@ -2579,7 +2579,7 @@ GlobalVariable::InternalLinkage, Constant::getNullValue(int8_ty), "reloc_placeholder", - NULL /* InsertBefore */, + nullptr /* InsertBefore */, GlobalVariable::NotThreadLocal /* ThreadLocal */, 0 /* AddressSpace */); @@ -2602,7 +2602,7 @@ std::string s; raw_string_ostream oss(s); - m_module->print(oss, NULL); + m_module->print(oss, nullptr); oss.flush(); @@ -2787,7 +2787,7 @@ std::string s; raw_string_ostream oss(s); - m_module->print(oss, NULL); + m_module->print(oss, nullptr); oss.flush(); Index: source/Expression/IRInterpreter.cpp =================================================================== --- source/Expression/IRInterpreter.cpp +++ source/Expression/IRInterpreter.cpp @@ -620,7 +620,7 @@ std::string s; raw_string_ostream oss(s); - module.print(oss, NULL); + module.print(oss, nullptr); oss.flush(); Index: source/Expression/IRMemoryMap.cpp =================================================================== --- source/Expression/IRMemoryMap.cpp +++ source/Expression/IRMemoryMap.cpp @@ -197,7 +197,7 @@ if (target_sp) return target_sp.get(); - return NULL; + return nullptr; } IRMemoryMap::Allocation::Allocation (lldb::addr_t process_alloc, Index: source/Expression/Materializer.cpp =================================================================== --- source/Expression/Materializer.cpp +++ source/Expression/Materializer.cpp @@ -1334,7 +1334,7 @@ Materializer::Materializer () : m_dematerializer_wp(), - m_result_entity(NULL), + m_result_entity(nullptr), m_current_offset(0), m_struct_alignment(8) { @@ -1455,7 +1455,7 @@ entity_up->Wipe (*m_map, m_process_address); } - m_materializer = NULL; - m_map = NULL; + m_materializer = nullptr; + m_map = nullptr; m_process_address = LLDB_INVALID_ADDRESS; } Index: source/Host/common/Condition.cpp =================================================================== --- source/Host/common/Condition.cpp +++ source/Host/common/Condition.cpp @@ -26,7 +26,7 @@ Condition::Condition () : m_condition() { - ::pthread_cond_init (&m_condition, NULL); + ::pthread_cond_init (&m_condition, nullptr); } //---------------------------------------------------------------------- @@ -85,7 +85,7 @@ err = ::pthread_cond_wait (&m_condition, mutex.GetMutex()); } while (err == EINTR); - if (timed_out != NULL) + if (timed_out != nullptr) { if (err == ETIMEDOUT) *timed_out = true; Index: source/Host/common/DynamicLibrary.cpp =================================================================== --- source/Host/common/DynamicLibrary.cpp +++ source/Host/common/DynamicLibrary.cpp @@ -17,13 +17,13 @@ Error err; m_handle = Host::DynamicLibraryOpen (spec,options,err); if (err.Fail()) - m_handle = NULL; + m_handle = nullptr; } bool DynamicLibrary::IsValid () { - return m_handle != NULL; + return m_handle != nullptr; } DynamicLibrary::~DynamicLibrary () Index: source/Host/common/Editline.cpp =================================================================== --- source/Host/common/Editline.cpp +++ source/Host/common/Editline.cpp @@ -34,7 +34,7 @@ private: // Use static GetHistory() function to get a EditlineHistorySP to one of these objects EditlineHistory(const std::string &prefix, uint32_t size, bool unique_entries) : - m_history (NULL), + m_history (nullptr), m_event (), m_prefix (prefix), m_path () @@ -55,7 +55,7 @@ m_path = std::move(FileSpec(history_path, true).GetPath()); } if (m_path.empty()) - return NULL; + return nullptr; return m_path.c_str(); } @@ -68,7 +68,7 @@ if (m_history) { ::history_end (m_history); - m_history = NULL; + m_history = nullptr; } } @@ -95,7 +95,7 @@ bool IsValid() const { - return m_history != NULL; + return m_history != nullptr; } ::History * @@ -158,7 +158,7 @@ FILE *fin, FILE *fout, FILE *ferr) : - m_editline (NULL), + m_editline (nullptr), m_history_sp (), m_prompt (), m_lines_prompt (), @@ -166,10 +166,10 @@ m_getc_mutex (Mutex::eMutexTypeNormal), m_getc_cond (), // m_gets_mutex (Mutex::eMutexTypeNormal), - m_completion_callback (NULL), - m_completion_callback_baton (NULL), - m_line_complete_callback (NULL), - m_line_complete_callback_baton (NULL), + m_completion_callback (nullptr), + m_completion_callback_baton (nullptr), + m_line_complete_callback (nullptr), + m_line_complete_callback_baton (nullptr), m_lines_command (Command::None), m_line_offset (0), m_lines_curr_line (0), @@ -243,7 +243,7 @@ } // Source $PWD/.editrc then $HOME/.editrc - ::el_source (m_editline, NULL); + ::el_source (m_editline, nullptr); // Always read through our callback function so we don't read // stuff we aren't supposed to. This also stops the extra echoing @@ -268,7 +268,7 @@ ::el_set (m_editline, EL_EDITMODE, 0); ::el_end(m_editline); - m_editline = NULL; + m_editline = nullptr; } void @@ -305,7 +305,7 @@ } line.clear(); - if (m_editline != NULL) + if (m_editline != nullptr) { int line_len = 0; // Call el_gets to prompt the user and read the user's input. @@ -513,7 +513,7 @@ unsigned char Editline::HandleCompletion (int ch) { - if (m_completion_callback == NULL) + if (m_completion_callback == nullptr) return CC_ERROR; const LineInfo *line_info = ::el_line(m_editline); @@ -546,7 +546,7 @@ // If we get a longer match display that first. const char *completion_str = completions.GetStringAtIndex(0); - if (completion_str != NULL && *completion_str != '\0') + if (completion_str != nullptr && *completion_str != '\0') { el_insertstr (m_editline, completion_str); return CC_REDISPLAY; @@ -608,10 +608,10 @@ Editline * Editline::GetClientData (::EditLine *e) { - Editline *editline = NULL; + Editline *editline = nullptr; if (e && ::el_get(e, EL_CLIENTDATA, &editline) == 0) return editline; - return NULL; + return nullptr; } FILE * @@ -667,10 +667,10 @@ FILE * Editline::GetFilePointer (::EditLine *e, int fd) { - FILE *file_ptr = NULL; + FILE *file_ptr = nullptr; if (e && ::el_get(e, EL_GETFP, fd, &file_ptr) == 0) return file_ptr; - return NULL; + return nullptr; } unsigned char @@ -765,7 +765,7 @@ // CTRL+D an empty line, otherwise it will forward // delete the character at the cursor const LineInfo *line_info = ::el_line(e); - if (line_info != NULL && + if (line_info != nullptr && line_info->buffer == line_info->cursor && line_info->cursor == line_info->lastchar) { Index: source/Host/common/File.cpp =================================================================== --- source/Host/common/File.cpp +++ source/Host/common/File.cpp @@ -70,11 +70,11 @@ { return "w"; } - return NULL; + return nullptr; } int File::kInvalidDescriptor = -1; -FILE * File::kInvalidStream = NULL; +FILE * File::kInvalidStream = nullptr; File::File(const char *path, uint32_t options, uint32_t permissions) : m_descriptor (kInvalidDescriptor), @@ -183,7 +183,7 @@ do { m_stream = ::fdopen (m_descriptor, mode); - } while (m_stream == NULL && errno == EINTR); + } while (m_stream == nullptr && errno == EINTR); // If we got a stream, then we own the stream and should no // longer own the descriptor because fclose() will close it for us @@ -833,9 +833,9 @@ size_t result = 0; if (DescriptorIsValid()) { - char *s = NULL; + char *s = nullptr; result = vasprintf(&s, format, args); - if (s != NULL) + if (s != nullptr) { if (result > 0) { Index: source/Host/common/FileSpec.cpp =================================================================== --- source/Host/common/FileSpec.cpp +++ source/Host/common/FileSpec.cpp @@ -64,11 +64,11 @@ { struct passwd *user_entry; user_entry = getpwuid(geteuid()); - if (user_entry != NULL) + if (user_entry != nullptr) g_tilde = user_entry->pw_dir; if (g_tilde.empty()) - return NULL; + return nullptr; } return g_tilde.c_str(); } @@ -83,7 +83,7 @@ size_t FileSpec::ResolveUsername (const char *src_path, char *dst_path, size_t dst_len) { - if (src_path == NULL || src_path[0] == '\0') + if (src_path == nullptr || src_path[0] == '\0') return 0; #ifdef LLDB_CONFIG_TILDE_RESOLVES_TO_USER @@ -110,7 +110,7 @@ const char *first_slash = ::strchr (src_path, '/'); char remainder[PATH_MAX]; - if (first_slash == NULL) + if (first_slash == nullptr) { // The whole name is the username (minus the ~): user_name = src_path + 1; @@ -126,12 +126,12 @@ ::strcpy (remainder, first_slash); } - if (user_name == NULL) + if (user_name == nullptr) return 0; // User name of "" means the current user... struct passwd *user_entry; - const char *home_dir = NULL; + const char *home_dir = nullptr; if (user_name[0] == '\0') { @@ -140,11 +140,11 @@ else { user_entry = ::getpwnam (user_name); - if (user_entry != NULL) + if (user_entry != nullptr) home_dir = user_entry->pw_dir; } - if (home_dir == NULL) + if (home_dir == nullptr) return 0; else return ::snprintf (dst_path, dst_len, "%s%s", home_dir, remainder); @@ -165,7 +165,7 @@ const char *name_start = partial_name + 1; std::set name_list; - while ((user_entry = getpwent()) != NULL) + while ((user_entry = getpwent()) != nullptr) { if (strstr(user_entry->pw_name, name_start) == user_entry->pw_name) { @@ -192,7 +192,7 @@ size_t FileSpec::Resolve (const char *src_path, char *dst_path, size_t dst_len) { - if (src_path == NULL || src_path[0] == '\0') + if (src_path == nullptr || src_path[0] == '\0') return 0; // Glob if needed for ~/, otherwise copy in case src_path is same as dst_path... @@ -300,7 +300,7 @@ m_filename.Clear(); m_directory.Clear(); m_is_resolved = false; - if (pathname == NULL || pathname[0] == '\0') + if (pathname == nullptr || pathname[0] == '\0') return; char resolved_path[PATH_MAX]; @@ -766,11 +766,11 @@ FileSpec::GetFileNameStrippingExtension () const { const char *filename = m_filename.GetCString(); - if (filename == NULL) + if (filename == nullptr) return ConstString(); const char* dot_pos = strrchr(filename, '.'); - if (dot_pos == NULL) + if (dot_pos == nullptr) return m_filename; return ConstString(filename, dot_pos-filename); @@ -1021,7 +1021,7 @@ FindClose(hFind); #else - lldb_utility::CleanUp dir_path_dir(opendir(dir_path), NULL, closedir); + lldb_utility::CleanUp dir_path_dir(opendir(dir_path), nullptr, closedir); if (dir_path_dir.is_valid()) { long path_max = fpathconf (dirfd (dir_path_dir.get()), _PC_NAME_MAX); @@ -1179,7 +1179,7 @@ { const char* dir_cstr = m_directory.GetCString(); const char* last_slash_ptr = ::strrchr(dir_cstr, '/'); - if (last_slash_ptr == NULL) + if (last_slash_ptr == nullptr) return m_directory; if (last_slash_ptr == dir_cstr) { Index: source/Host/common/Host.cpp =================================================================== --- source/Host/common/Host.cpp +++ source/Host/common/Host.cpp @@ -121,7 +121,7 @@ thread = ThreadCreate (thread_name, MonitorChildProcessThreadFunction, info_ptr, - NULL); + nullptr); return thread; } @@ -148,7 +148,7 @@ // Restore the ability for this thread to be cancelled to what it // previously was. if (m_old_state != -1) - ::pthread_setcancelstate (m_old_state, 0); + ::pthread_setcancelstate (m_old_state, nullptr); } private: int m_old_state; // Save the old cancelability state. @@ -207,7 +207,7 @@ bool exited = false; int signal = 0; int exit_status = 0; - const char *status_cstr = NULL; + const char *status_cstr = nullptr; if (WIFSTOPPED(status)) { signal = WSTOPSIG(status); @@ -279,7 +279,7 @@ if (log) log->Printf ("%s (arg = %p) thread exiting...", __FUNCTION__, arg); - return NULL; + return nullptr; } #endif // #if !defined (__APPLE__) && !defined (_WIN32) @@ -566,7 +566,7 @@ default: break; } - return NULL; + return nullptr; } #endif @@ -649,7 +649,7 @@ thread = ::_beginthreadex(0, 0, ThreadCreateTrampoline, info_ptr, 0, NULL); int err = thread <= 0 ? GetLastError() : 0; #else - int err = ::pthread_create (&thread, NULL, ThreadCreateTrampoline, info_ptr); + int err = ::pthread_create (&thread, nullptr, ThreadCreateTrampoline, info_ptr); #endif if (err == 0) { @@ -926,14 +926,14 @@ { error.SetErrorString("failed to extract path"); } - return NULL; + return nullptr; } Error Host::DynamicLibraryClose (void *opaque) { Error error; - if (opaque == NULL) + if (opaque == nullptr) { error.SetErrorString ("invalid dynamic library handle"); } @@ -946,7 +946,7 @@ } dylib_info->open_options = 0; - dylib_info->handle = 0; + dylib_info->handle = nullptr; delete dylib_info; } return error; @@ -955,7 +955,7 @@ void * Host::DynamicLibraryGetSymbol (void *opaque, const char *symbol_name, Error &error) { - if (opaque == NULL) + if (opaque == nullptr) { error.SetErrorString ("invalid dynamic library handle"); } @@ -980,7 +980,7 @@ error.SetErrorStringWithFormat ("symbol not found in \"%s\"", dylib_path); else error.SetErrorString ("symbol not found"); - return NULL; + return nullptr; } } #endif @@ -992,7 +992,7 @@ error.SetErrorString(::dlerror()); } } - return NULL; + return nullptr; } FileSpec @@ -1287,10 +1287,10 @@ if (!g_lldb_tmp_dir) { const char *tmpdir_cstr = getenv("TMPDIR"); - if (tmpdir_cstr == NULL) + if (tmpdir_cstr == nullptr) { tmpdir_cstr = getenv("TMP"); - if (tmpdir_cstr == NULL) + if (tmpdir_cstr == nullptr) tmpdir_cstr = getenv("TEMP"); } if (tmpdir_cstr) @@ -1361,7 +1361,7 @@ } } user_name.clear(); - return NULL; + return nullptr; } const char * @@ -1397,7 +1397,7 @@ } } group_name.clear(); - return NULL; + return nullptr; } uint32_t @@ -1478,10 +1478,10 @@ if (!arch.IsValid()) arch = Host::GetArchitecture (); Error err = debugger.GetTargetList().CreateTarget(debugger, - NULL, + nullptr, arch.GetTriple().getTriple().c_str(), false, - NULL, + nullptr, g_dummy_target_sp); } @@ -1566,7 +1566,7 @@ if (working_dir) launch_info.SetWorkingDirectory(working_dir); char output_file_path_buffer[PATH_MAX]; - const char *output_file_path = NULL; + const char *output_file_path = nullptr; if (command_output_ptr) { @@ -1805,13 +1805,13 @@ const char *tmp_argv[2]; char * const *argv = (char * const*)launch_info.GetArguments().GetConstArgumentVector(); char * const *envp = (char * const*)launch_info.GetEnvironmentEntries().GetConstArgumentVector(); - if (argv == NULL) + if (argv == nullptr) { // posix_spawn gets very unhappy if it doesn't have at least the program // name in argv[0]. One of the side affects I have noticed is the environment // variables don't make it into the child process if "argv == NULL"!!! tmp_argv[0] = exe_path; - tmp_argv[1] = NULL; + tmp_argv[1] = nullptr; argv = (char * const*)tmp_argv; } @@ -1837,7 +1837,7 @@ return error; } #else - if (::getcwd(current_dir, sizeof(current_dir)) == NULL) + if (::getcwd(current_dir, sizeof(current_dir)) == nullptr) { error.SetError(errno, eErrorTypePOSIX); error.LogIfError(log, "unable to save the current directory"); @@ -1907,7 +1907,7 @@ { error.SetError (::posix_spawnp (&pid, exe_path, - NULL, + nullptr, &attr, argv, envp), @@ -1971,7 +1971,7 @@ error = host_platform_sp->ResolveExecutable (exe_spec, arch_spec, exe_module_sp, - NULL); + nullptr); if (error.Fail()) return error; @@ -2009,7 +2009,7 @@ { const bool monitor_signals = false; StartMonitoringChildProcess (Process::SetProcessExitStatus, - NULL, + nullptr, pid, monitor_signals); if (log) Index: source/Host/common/Mutex.cpp =================================================================== --- source/Host/common/Mutex.cpp +++ source/Host/common/Mutex.cpp @@ -98,7 +98,7 @@ // method. //---------------------------------------------------------------------- Mutex::Locker::Locker () : - m_mutex_ptr(NULL) + m_mutex_ptr(nullptr) { } @@ -109,7 +109,7 @@ // mutex owned by "m" and locks it. //---------------------------------------------------------------------- Mutex::Locker::Locker (Mutex& m) : - m_mutex_ptr(NULL) + m_mutex_ptr(nullptr) { Lock (m); } @@ -121,7 +121,7 @@ // mutex owned by "m" and locks it. //---------------------------------------------------------------------- Mutex::Locker::Locker (Mutex* m) : - m_mutex_ptr(NULL) + m_mutex_ptr(nullptr) { if (m) Lock (m); @@ -160,7 +160,7 @@ if (m_mutex_ptr) { m_mutex_ptr->Unlock (); - m_mutex_ptr = NULL; + m_mutex_ptr = nullptr; } } @@ -176,7 +176,7 @@ if (mutex.TryLock(failure_message) == 0) m_mutex_ptr = &mutex; - return m_mutex_ptr != NULL; + return m_mutex_ptr != nullptr; } #ifndef _WIN32 @@ -190,7 +190,7 @@ m_mutex() { int err; - err = ::pthread_mutex_init (&m_mutex, NULL); + err = ::pthread_mutex_init (&m_mutex, nullptr); #if ENABLE_MUTEX_ERROR_CHECKING if (err == 0) error_check_mutex (&m_mutex, eMutexActionInitialized); Index: source/Host/common/OptionParser.cpp =================================================================== --- source/Host/common/OptionParser.cpp +++ source/Host/common/OptionParser.cpp @@ -65,16 +65,16 @@ bool done = false; while (!done) { - if (long_options[i].name == 0 && + if (long_options[i].name == nullptr && long_options[i].has_arg == 0 && - long_options[i].flag == 0 && + long_options[i].flag == nullptr && long_options[i].val == 0) { done = true; } else { - if (long_options[i].flag == NULL && + if (long_options[i].flag == nullptr && isalpha(long_options[i].val)) { s.append(1, (char)long_options[i].val); Index: source/Host/common/ProcessRunLock.cpp =================================================================== --- source/Host/common/ProcessRunLock.cpp +++ source/Host/common/ProcessRunLock.cpp @@ -7,7 +7,7 @@ ProcessRunLock::ProcessRunLock() : m_running(false) { - int err = ::pthread_rwlock_init(&m_rwlock, NULL); (void) err; + int err = ::pthread_rwlock_init(&m_rwlock, nullptr); (void) err; //#if LLDB_CONFIGURATION_DEBUG // assert(err == 0); //#endif Index: source/Host/common/SocketAddress.cpp =================================================================== --- source/Host/common/SocketAddress.cpp +++ source/Host/common/SocketAddress.cpp @@ -220,7 +220,7 @@ hints.ai_protocol = ai_protocol; hints.ai_flags = ai_flags; - struct addrinfo *service_info_list = NULL; + struct addrinfo *service_info_list = nullptr; int err = ::getaddrinfo (host, service, &hints, &service_info_list); if (err == 0 && service_info_list) *this = service_info_list; Index: source/Host/common/Terminal.cpp =================================================================== --- source/Host/common/Terminal.cpp +++ source/Host/common/Terminal.cpp @@ -147,7 +147,7 @@ m_tflags = ::fcntl (fd, F_GETFL, 0); #endif #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED - if (m_termios_ap.get() == NULL) + if (m_termios_ap.get() == nullptr) m_termios_ap.reset (new struct termios); int err = ::tcgetattr (fd, m_termios_ap.get()); if (err != 0) @@ -196,7 +196,7 @@ if (ProcessGroupIsValid()) { // Save the original signal handler. - void (*saved_sigttou_callback) (int) = NULL; + void (*saved_sigttou_callback) (int) = nullptr; saved_sigttou_callback = (void (*)(int)) signal (SIGTTOU, SIG_IGN); // Set the process group tcsetpgrp (fd, m_process_group); @@ -238,7 +238,7 @@ TerminalState::TTYStateIsValid() const { #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED - return m_termios_ap.get() != 0; + return m_termios_ap.get() != nullptr; #else return false; #endif Index: source/Host/common/TimeValue.cpp =================================================================== --- source/Host/common/TimeValue.cpp +++ source/Host/common/TimeValue.cpp @@ -134,7 +134,7 @@ seconds = ((((uint64_t)ft.dwHighDateTime) << 32 | ft.dwLowDateTime) / 10000000) - 11644473600ULL; #else struct timeval tv; - gettimeofday(&tv, NULL); + gettimeofday(&tv, nullptr); seconds = tv.tv_sec; nanoseconds = tv.tv_usec * NanoSecPerMicroSec; #endif @@ -155,7 +155,7 @@ void TimeValue::Dump (Stream *s, uint32_t width) const { - if (s == NULL) + if (s == nullptr) return; #ifndef LLDB_DISABLE_POSIX Index: source/Host/linux/Host.cpp =================================================================== --- source/Host/linux/Host.cpp +++ source/Host/linux/Host.cpp @@ -249,12 +249,12 @@ DIR *dirproc = opendir (procdir); if (dirproc) { - struct dirent *direntry = NULL; + struct dirent *direntry = nullptr; const uid_t our_uid = getuid(); const lldb::pid_t our_pid = getpid(); bool all_users = match_info.GetMatchAllUsers(); - while ((direntry = readdir (dirproc)) != NULL) + while ((direntry = readdir (dirproc)) != nullptr) { if (direntry->d_type != DT_DIR || !IsDirNumeric (direntry->d_name)) continue; @@ -307,8 +307,8 @@ if (dirproc) { - struct dirent *direntry = NULL; - while ((direntry = readdir (dirproc)) != NULL) + struct dirent *direntry = nullptr; + while ((direntry = readdir (dirproc)) != nullptr) { if (direntry->d_type != DT_DIR || !IsDirNumeric (direntry->d_name)) continue; @@ -472,7 +472,7 @@ { if (max_frames > 0) { - std::vector frame_buffer (max_frames, NULL); + std::vector frame_buffer (max_frames, nullptr); int num_frames = ::backtrace (&frame_buffer[0], frame_buffer.size()); char** strs = ::backtrace_symbols (&frame_buffer[0], num_frames); if (strs) @@ -491,7 +491,7 @@ char **host_env = environ; char *env_entry; size_t i; - for (i=0; (env_entry = host_env[i]) != NULL; ++i) + for (i=0; (env_entry = host_env[i]) != nullptr; ++i) env.AppendString(env_entry); return i; } @@ -552,7 +552,7 @@ // retrieve the distribution id string. char distribution_id[256] = { '\0' }; if (fgets (distribution_id, sizeof (distribution_id) - 1, file) - != NULL) + != nullptr) { if (log) log->Printf ("distribution id command returned \"%s\"", Index: source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp =================================================================== --- source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp +++ source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp @@ -39,110 +39,110 @@ { // NAME ALT SZ OFF ENCODING FORMAT COMPILER DWARF GENERIC GDB LLDB NATIVE VALUE REGS INVALIDATE REGS // ========== ======= == === ============= ============ ======================= =================== =========================== ======================= ====================== ========== =============== - { "r0", "arg1", 4, 0, eEncodingUint , eFormatHex, { gcc_r0, dwarf_r0, LLDB_REGNUM_GENERIC_ARG1, gdb_arm_r0, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r1", "arg2", 4, 0, eEncodingUint , eFormatHex, { gcc_r1, dwarf_r1, LLDB_REGNUM_GENERIC_ARG2, gdb_arm_r1, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r2", "arg3", 4, 0, eEncodingUint , eFormatHex, { gcc_r2, dwarf_r2, LLDB_REGNUM_GENERIC_ARG3, gdb_arm_r2, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r3", "arg4", 4, 0, eEncodingUint , eFormatHex, { gcc_r3, dwarf_r3, LLDB_REGNUM_GENERIC_ARG4, gdb_arm_r3, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r4", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r4, dwarf_r4, LLDB_INVALID_REGNUM, gdb_arm_r4, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r5", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r5, dwarf_r5, LLDB_INVALID_REGNUM, gdb_arm_r5, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r6", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r6, dwarf_r6, LLDB_INVALID_REGNUM, gdb_arm_r6, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r7", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r7, dwarf_r7, LLDB_REGNUM_GENERIC_FP, gdb_arm_r7, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r8", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r8, dwarf_r8, LLDB_INVALID_REGNUM, gdb_arm_r8, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r9", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r9, dwarf_r9, LLDB_INVALID_REGNUM, gdb_arm_r9, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r10", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r10, dwarf_r10, LLDB_INVALID_REGNUM, gdb_arm_r10, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r11", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r11, dwarf_r11, LLDB_INVALID_REGNUM, gdb_arm_r11, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r12", NULL, 4, 0, eEncodingUint , eFormatHex, { gcc_r12, dwarf_r12, LLDB_INVALID_REGNUM, gdb_arm_r12, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "sp", "r13", 4, 0, eEncodingUint , eFormatHex, { gcc_sp, dwarf_sp, LLDB_REGNUM_GENERIC_SP, gdb_arm_sp, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "lr", "r14", 4, 0, eEncodingUint , eFormatHex, { gcc_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA, gdb_arm_lr, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "pc", "r15", 4, 0, eEncodingUint , eFormatHex, { gcc_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, gdb_arm_pc, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "cpsr", "psr", 4, 0, eEncodingUint , eFormatHex, { gcc_cpsr, dwarf_cpsr, LLDB_REGNUM_GENERIC_FLAGS, gdb_arm_cpsr, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s0", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s0, LLDB_INVALID_REGNUM, gdb_arm_s0, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s1", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s1, LLDB_INVALID_REGNUM, gdb_arm_s1, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s2", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s2, LLDB_INVALID_REGNUM, gdb_arm_s2, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s3", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s3, LLDB_INVALID_REGNUM, gdb_arm_s3, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s4", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s4, LLDB_INVALID_REGNUM, gdb_arm_s4, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s5", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s5, LLDB_INVALID_REGNUM, gdb_arm_s5, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s6", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s6, LLDB_INVALID_REGNUM, gdb_arm_s6, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s7", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s7, LLDB_INVALID_REGNUM, gdb_arm_s7, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s8", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s8, LLDB_INVALID_REGNUM, gdb_arm_s8, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s9", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s9, LLDB_INVALID_REGNUM, gdb_arm_s9, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s10", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s10, LLDB_INVALID_REGNUM, gdb_arm_s10, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s11", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s11, LLDB_INVALID_REGNUM, gdb_arm_s11, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s12", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s12, LLDB_INVALID_REGNUM, gdb_arm_s12, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s13", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s13, LLDB_INVALID_REGNUM, gdb_arm_s13, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s14", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s14, LLDB_INVALID_REGNUM, gdb_arm_s14, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s15", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s15, LLDB_INVALID_REGNUM, gdb_arm_s15, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s16", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s16, LLDB_INVALID_REGNUM, gdb_arm_s16, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s17", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s17, LLDB_INVALID_REGNUM, gdb_arm_s17, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s18", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s18, LLDB_INVALID_REGNUM, gdb_arm_s18, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s19", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s19, LLDB_INVALID_REGNUM, gdb_arm_s19, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s20", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s20, LLDB_INVALID_REGNUM, gdb_arm_s20, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s21", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s21, LLDB_INVALID_REGNUM, gdb_arm_s21, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s22", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s22, LLDB_INVALID_REGNUM, gdb_arm_s22, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s23", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s23, LLDB_INVALID_REGNUM, gdb_arm_s23, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s24", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s24, LLDB_INVALID_REGNUM, gdb_arm_s24, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s25", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s25, LLDB_INVALID_REGNUM, gdb_arm_s25, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s26", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s26, LLDB_INVALID_REGNUM, gdb_arm_s26, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s27", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s27, LLDB_INVALID_REGNUM, gdb_arm_s27, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s28", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s28, LLDB_INVALID_REGNUM, gdb_arm_s28, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s29", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s29, LLDB_INVALID_REGNUM, gdb_arm_s29, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s30", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s30, LLDB_INVALID_REGNUM, gdb_arm_s30, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "s31", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s31, LLDB_INVALID_REGNUM, gdb_arm_s31, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fpscr", NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,LLDB_INVALID_REGNUM, gdb_arm_fpscr, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d0", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d0, LLDB_INVALID_REGNUM, gdb_arm_d0, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d1", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d1, LLDB_INVALID_REGNUM, gdb_arm_d1, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d2", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d2, LLDB_INVALID_REGNUM, gdb_arm_d2, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d3", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d3, LLDB_INVALID_REGNUM, gdb_arm_d3, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d4", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d4, LLDB_INVALID_REGNUM, gdb_arm_d4, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d5", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d5, LLDB_INVALID_REGNUM, gdb_arm_d5, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d6", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d6, LLDB_INVALID_REGNUM, gdb_arm_d6, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d7", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d7, LLDB_INVALID_REGNUM, gdb_arm_d7, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d8", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d8, LLDB_INVALID_REGNUM, gdb_arm_d8, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d9", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d9, LLDB_INVALID_REGNUM, gdb_arm_d9, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d10", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d10, LLDB_INVALID_REGNUM, gdb_arm_d10, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d11", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d11, LLDB_INVALID_REGNUM, gdb_arm_d11, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d12", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d12, LLDB_INVALID_REGNUM, gdb_arm_d12, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d13", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d13, LLDB_INVALID_REGNUM, gdb_arm_d13, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d14", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d14, LLDB_INVALID_REGNUM, gdb_arm_d14, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d15", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d15, LLDB_INVALID_REGNUM, gdb_arm_d15, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d16", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d16, LLDB_INVALID_REGNUM, gdb_arm_d16, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d17", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d17, LLDB_INVALID_REGNUM, gdb_arm_d17, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d18", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d18, LLDB_INVALID_REGNUM, gdb_arm_d18, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d19", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d19, LLDB_INVALID_REGNUM, gdb_arm_d19, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d20", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d20, LLDB_INVALID_REGNUM, gdb_arm_d20, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d21", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d21, LLDB_INVALID_REGNUM, gdb_arm_d21, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d22", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d22, LLDB_INVALID_REGNUM, gdb_arm_d22, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d23", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d23, LLDB_INVALID_REGNUM, gdb_arm_d23, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d24", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d24, LLDB_INVALID_REGNUM, gdb_arm_d24, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d25", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d25, LLDB_INVALID_REGNUM, gdb_arm_d25, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d26", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d26, LLDB_INVALID_REGNUM, gdb_arm_d26, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d27", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d27, LLDB_INVALID_REGNUM, gdb_arm_d27, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d28", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d28, LLDB_INVALID_REGNUM, gdb_arm_d28, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d29", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d29, LLDB_INVALID_REGNUM, gdb_arm_d29, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d30", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d30, LLDB_INVALID_REGNUM, gdb_arm_d30, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "d31", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d31, LLDB_INVALID_REGNUM, gdb_arm_d31, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r8_usr", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r8_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r9_usr", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r9_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r10_usr", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r10_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r11_usr", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r11_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r12_usr", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r12_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r13_usr", "sp_usr", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r14_usr", "lr_usr", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r8_fiq", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r8_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r9_fiq", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r9_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r10_fiq", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r10_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r11_fiq", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r11_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r12_fiq", NULL, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r12_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r13_fiq", "sp_fiq", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r14_fiq", "lr_fiq", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r13_irq", "sp_irq", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_irq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r14_irq", "lr_irq", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_irq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r13_abt", "sp_abt", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_abt, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r14_abt", "lr_abt", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_abt, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r13_und", "sp_und", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_und, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r14_und", "lr_und", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_und, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r13_svc", "sp_svc", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_svc, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r14_svc", "lr_svc", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_svc, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL} + { "r0", "arg1", 4, 0, eEncodingUint , eFormatHex, { gcc_r0, dwarf_r0, LLDB_REGNUM_GENERIC_ARG1, gdb_arm_r0, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r1", "arg2", 4, 0, eEncodingUint , eFormatHex, { gcc_r1, dwarf_r1, LLDB_REGNUM_GENERIC_ARG2, gdb_arm_r1, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r2", "arg3", 4, 0, eEncodingUint , eFormatHex, { gcc_r2, dwarf_r2, LLDB_REGNUM_GENERIC_ARG3, gdb_arm_r2, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r3", "arg4", 4, 0, eEncodingUint , eFormatHex, { gcc_r3, dwarf_r3, LLDB_REGNUM_GENERIC_ARG4, gdb_arm_r3, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r4", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r4, dwarf_r4, LLDB_INVALID_REGNUM, gdb_arm_r4, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r5", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r5, dwarf_r5, LLDB_INVALID_REGNUM, gdb_arm_r5, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r6", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r6, dwarf_r6, LLDB_INVALID_REGNUM, gdb_arm_r6, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r7", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r7, dwarf_r7, LLDB_REGNUM_GENERIC_FP, gdb_arm_r7, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r8", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r8, dwarf_r8, LLDB_INVALID_REGNUM, gdb_arm_r8, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r9", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r9, dwarf_r9, LLDB_INVALID_REGNUM, gdb_arm_r9, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r10", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r10, dwarf_r10, LLDB_INVALID_REGNUM, gdb_arm_r10, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r11", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r11, dwarf_r11, LLDB_INVALID_REGNUM, gdb_arm_r11, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r12", nullptr, 4, 0, eEncodingUint , eFormatHex, { gcc_r12, dwarf_r12, LLDB_INVALID_REGNUM, gdb_arm_r12, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "sp", "r13", 4, 0, eEncodingUint , eFormatHex, { gcc_sp, dwarf_sp, LLDB_REGNUM_GENERIC_SP, gdb_arm_sp, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "lr", "r14", 4, 0, eEncodingUint , eFormatHex, { gcc_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA, gdb_arm_lr, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "pc", "r15", 4, 0, eEncodingUint , eFormatHex, { gcc_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, gdb_arm_pc, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "cpsr", "psr", 4, 0, eEncodingUint , eFormatHex, { gcc_cpsr, dwarf_cpsr, LLDB_REGNUM_GENERIC_FLAGS, gdb_arm_cpsr, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s0", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s0, LLDB_INVALID_REGNUM, gdb_arm_s0, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s1", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s1, LLDB_INVALID_REGNUM, gdb_arm_s1, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s2", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s2, LLDB_INVALID_REGNUM, gdb_arm_s2, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s3", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s3, LLDB_INVALID_REGNUM, gdb_arm_s3, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s4", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s4, LLDB_INVALID_REGNUM, gdb_arm_s4, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s5", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s5, LLDB_INVALID_REGNUM, gdb_arm_s5, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s6", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s6, LLDB_INVALID_REGNUM, gdb_arm_s6, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s7", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s7, LLDB_INVALID_REGNUM, gdb_arm_s7, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s8", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s8, LLDB_INVALID_REGNUM, gdb_arm_s8, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s9", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s9, LLDB_INVALID_REGNUM, gdb_arm_s9, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s10", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s10, LLDB_INVALID_REGNUM, gdb_arm_s10, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s11", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s11, LLDB_INVALID_REGNUM, gdb_arm_s11, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s12", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s12, LLDB_INVALID_REGNUM, gdb_arm_s12, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s13", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s13, LLDB_INVALID_REGNUM, gdb_arm_s13, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s14", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s14, LLDB_INVALID_REGNUM, gdb_arm_s14, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s15", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s15, LLDB_INVALID_REGNUM, gdb_arm_s15, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s16", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s16, LLDB_INVALID_REGNUM, gdb_arm_s16, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s17", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s17, LLDB_INVALID_REGNUM, gdb_arm_s17, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s18", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s18, LLDB_INVALID_REGNUM, gdb_arm_s18, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s19", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s19, LLDB_INVALID_REGNUM, gdb_arm_s19, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s20", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s20, LLDB_INVALID_REGNUM, gdb_arm_s20, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s21", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s21, LLDB_INVALID_REGNUM, gdb_arm_s21, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s22", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s22, LLDB_INVALID_REGNUM, gdb_arm_s22, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s23", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s23, LLDB_INVALID_REGNUM, gdb_arm_s23, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s24", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s24, LLDB_INVALID_REGNUM, gdb_arm_s24, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s25", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s25, LLDB_INVALID_REGNUM, gdb_arm_s25, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s26", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s26, LLDB_INVALID_REGNUM, gdb_arm_s26, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s27", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s27, LLDB_INVALID_REGNUM, gdb_arm_s27, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s28", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s28, LLDB_INVALID_REGNUM, gdb_arm_s28, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s29", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s29, LLDB_INVALID_REGNUM, gdb_arm_s29, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s30", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s30, LLDB_INVALID_REGNUM, gdb_arm_s30, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "s31", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s31, LLDB_INVALID_REGNUM, gdb_arm_s31, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fpscr", nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,LLDB_INVALID_REGNUM, gdb_arm_fpscr, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d0", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d0, LLDB_INVALID_REGNUM, gdb_arm_d0, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d1", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d1, LLDB_INVALID_REGNUM, gdb_arm_d1, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d2", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d2, LLDB_INVALID_REGNUM, gdb_arm_d2, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d3", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d3, LLDB_INVALID_REGNUM, gdb_arm_d3, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d4", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d4, LLDB_INVALID_REGNUM, gdb_arm_d4, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d5", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d5, LLDB_INVALID_REGNUM, gdb_arm_d5, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d6", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d6, LLDB_INVALID_REGNUM, gdb_arm_d6, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d7", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d7, LLDB_INVALID_REGNUM, gdb_arm_d7, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d8", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d8, LLDB_INVALID_REGNUM, gdb_arm_d8, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d9", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d9, LLDB_INVALID_REGNUM, gdb_arm_d9, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d10", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d10, LLDB_INVALID_REGNUM, gdb_arm_d10, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d11", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d11, LLDB_INVALID_REGNUM, gdb_arm_d11, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d12", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d12, LLDB_INVALID_REGNUM, gdb_arm_d12, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d13", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d13, LLDB_INVALID_REGNUM, gdb_arm_d13, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d14", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d14, LLDB_INVALID_REGNUM, gdb_arm_d14, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d15", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d15, LLDB_INVALID_REGNUM, gdb_arm_d15, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d16", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d16, LLDB_INVALID_REGNUM, gdb_arm_d16, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d17", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d17, LLDB_INVALID_REGNUM, gdb_arm_d17, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d18", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d18, LLDB_INVALID_REGNUM, gdb_arm_d18, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d19", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d19, LLDB_INVALID_REGNUM, gdb_arm_d19, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d20", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d20, LLDB_INVALID_REGNUM, gdb_arm_d20, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d21", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d21, LLDB_INVALID_REGNUM, gdb_arm_d21, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d22", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d22, LLDB_INVALID_REGNUM, gdb_arm_d22, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d23", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d23, LLDB_INVALID_REGNUM, gdb_arm_d23, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d24", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d24, LLDB_INVALID_REGNUM, gdb_arm_d24, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d25", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d25, LLDB_INVALID_REGNUM, gdb_arm_d25, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d26", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d26, LLDB_INVALID_REGNUM, gdb_arm_d26, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d27", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d27, LLDB_INVALID_REGNUM, gdb_arm_d27, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d28", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d28, LLDB_INVALID_REGNUM, gdb_arm_d28, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d29", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d29, LLDB_INVALID_REGNUM, gdb_arm_d29, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d30", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d30, LLDB_INVALID_REGNUM, gdb_arm_d30, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "d31", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d31, LLDB_INVALID_REGNUM, gdb_arm_d31, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r8_usr", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r8_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r9_usr", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r9_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r10_usr", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r10_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r11_usr", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r11_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r12_usr", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r12_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r13_usr", "sp_usr", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r14_usr", "lr_usr", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_usr, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r8_fiq", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r8_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r9_fiq", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r9_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r10_fiq", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r10_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r11_fiq", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r11_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r12_fiq", nullptr, 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r12_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r13_fiq", "sp_fiq", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r14_fiq", "lr_fiq", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_fiq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r13_irq", "sp_irq", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_irq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r14_irq", "lr_irq", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_irq, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r13_abt", "sp_abt", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_abt, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r14_abt", "lr_abt", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_abt, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r13_und", "sp_und", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_und, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r14_und", "lr_und", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_und, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r13_svc", "sp_svc", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r13_svc, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r14_svc", "lr_svc", 4, 0, eEncodingUint , eFormatHex, { LLDB_INVALID_REGNUM, dwarf_r14_svc, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr} }; static const uint32_t k_num_register_infos = sizeof(g_register_infos)/sizeof(RegisterInfo); static bool g_register_info_names_constified = false; @@ -350,7 +350,7 @@ if (value_idx < 4) { // Arguments 1-4 are in r0-r3... - const RegisterInfo *arg_reg_info = NULL; + const RegisterInfo *arg_reg_info = nullptr; // Search by generic ID first, then fall back to by name uint32_t arg_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + value_idx); if (arg_reg_num != LLDB_INVALID_REGNUM) Index: source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp =================================================================== --- source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp +++ source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp @@ -44,142 +44,142 @@ { // NAME ALT SZ OFF ENCODING FORMAT COMPILER DWARF GENERIC GDB LLDB NATIVE // ========== ======= == === ============= =================== =================== ====================== =========================== ======================= ====================== - { "x0", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x0, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x1", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x1, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x2", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x2, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x3", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x3, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x4", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x4, LLDB_REGNUM_GENERIC_ARG5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x5", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x5, LLDB_REGNUM_GENERIC_ARG6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x6", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x6, LLDB_REGNUM_GENERIC_ARG7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x7", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x7, LLDB_REGNUM_GENERIC_ARG8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x8", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x9", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x10", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x11", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x12", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x13", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x14", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x15", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x16", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x17", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x18", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x19", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x20", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x21", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x22", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x23", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x24", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x25", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x26", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x27", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "x28", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "fp", "x29", 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x29, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "lr", "x30", 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x30, LLDB_REGNUM_GENERIC_RA, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "sp", "x31", 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x31, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "pc", NULL, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::pc, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "cpsr", "psr", 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::cpsr, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, + { "x0", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x0, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x1", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x1, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x2", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x2, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x3", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x3, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x4", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x4, LLDB_REGNUM_GENERIC_ARG5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x5", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x5, LLDB_REGNUM_GENERIC_ARG6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x6", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x6, LLDB_REGNUM_GENERIC_ARG7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x7", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x7, LLDB_REGNUM_GENERIC_ARG8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x8", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x9", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x10", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x11", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x12", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x13", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x14", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x15", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x16", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x17", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x18", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x19", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x20", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x21", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x22", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x23", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x24", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x25", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x26", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x27", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "x28", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "fp", "x29", 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x29, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "lr", "x30", 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x30, LLDB_REGNUM_GENERIC_RA, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "sp", "x31", 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::x31, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "pc", nullptr, 8, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::pc, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "cpsr", "psr", 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, arm64_dwarf::cpsr, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, - { "v0", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v1", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v2", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v3", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v4", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v5", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v6", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v7", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v8", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v9", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v10", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v11", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v12", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v13", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v14", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v15", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v16", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v17", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v18", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v19", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v20", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v21", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v22", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v23", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v24", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v25", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v26", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v27", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v28", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v29", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v30", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "v31", NULL, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, + { "v0", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v1", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v2", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v3", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v4", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v5", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v6", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v7", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v8", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v9", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v10", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v11", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v12", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v13", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v14", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v15", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v16", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v17", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v18", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v19", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v20", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v21", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v22", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v23", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v24", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v25", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v26", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v27", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v28", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v29", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v30", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "v31", nullptr, 16, 0, eEncodingVector , eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, arm64_dwarf::v31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, - { "fpsr", NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "fpcr", NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, + { "fpsr", nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "fpcr", nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, - { "s0", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s1", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s2", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s3", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s4", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s5", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s6", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s7", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s8", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s9", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s10", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s11", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s12", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s13", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s14", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s15", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s16", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s17", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s18", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s19", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s20", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s21", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s22", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s23", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s24", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s25", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s26", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s27", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s28", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s29", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s30", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "s31", NULL, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, + { "s0", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s1", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s2", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s3", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s4", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s5", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s6", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s7", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s8", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s9", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s10", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s11", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s12", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s13", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s14", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s15", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s16", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s17", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s18", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s19", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s20", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s21", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s22", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s23", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s24", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s25", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s26", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s27", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s28", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s29", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s30", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "s31", nullptr, 4, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, - { "d0", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d1", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d2", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d3", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d4", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d5", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d6", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d7", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d8", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d9", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d10", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d11", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d12", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d13", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d14", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d15", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d16", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d17", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d18", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d19", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d20", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d21", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d22", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d23", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d24", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d25", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d26", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d27", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d28", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d29", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d30", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }, - { "d31", NULL, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL } + { "d0", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d1", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d2", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d3", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d4", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d5", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d6", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d7", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d8", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d9", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d10", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d11", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d12", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d13", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d14", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d15", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d16", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d17", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d18", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d19", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d20", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d21", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d22", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d23", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d24", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d25", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d26", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d27", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d28", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d29", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d30", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr }, + { "d31", nullptr, 8, 0, eEncodingIEEE754 , eFormatFloat , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, nullptr, nullptr } }; static const uint32_t k_num_register_infos = sizeof(g_register_infos)/sizeof(RegisterInfo); @@ -339,7 +339,7 @@ if (value_idx < 8) { // Arguments 1-6 are in x0-x5... - const RegisterInfo *reg_info = NULL; + const RegisterInfo *reg_info = nullptr; // Search by generic ID first, then fall back to by name uint32_t arg_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + value_idx); if (arg_reg_num != LLDB_INVALID_REGNUM) @@ -439,7 +439,7 @@ return error; } - const uint32_t type_flags = return_value_type.GetTypeInfo (NULL); + const uint32_t type_flags = return_value_type.GetTypeInfo (nullptr); if (type_flags & ClangASTType::eTypeIsScalar || type_flags & ClangASTType::eTypeIsPointer) { @@ -737,7 +737,7 @@ char v_name[8]; ::snprintf (v_name, sizeof(v_name), "v%u", NSRN); const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName(v_name, 0); - if (reg_info == NULL) + if (reg_info == nullptr) return false; if (base_byte_size > reg_info->byte_size) @@ -786,7 +786,7 @@ return false; const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex(reg_num); - if (reg_info == NULL) + if (reg_info == nullptr) return false; RegisterValue reg_value; @@ -807,7 +807,7 @@ } else { - const RegisterInfo *reg_info = NULL; + const RegisterInfo *reg_info = nullptr; if (is_return_value) { // We are assumging we are decoding this immediately after returning @@ -826,12 +826,12 @@ if (reg_num == LLDB_INVALID_REGNUM) return false; reg_info = reg_ctx->GetRegisterInfoAtIndex(reg_num); - if (reg_info == NULL) + if (reg_info == nullptr) return false; ++NGRN; } - if (reg_info == NULL) + if (reg_info == nullptr) return false; const lldb::addr_t value_addr = reg_ctx->ReadRegisterAsUnsigned(reg_info, LLDB_INVALID_ADDRESS); @@ -861,7 +861,7 @@ Value value; ExecutionContext exe_ctx (thread.shared_from_this()); - if (exe_ctx.GetTargetPtr() == NULL || exe_ctx.GetProcessPtr() == NULL) + if (exe_ctx.GetTargetPtr() == nullptr || exe_ctx.GetProcessPtr() == nullptr) return return_valobj_sp; //value.SetContext (Value::eContextTypeClangType, return_clang_type); @@ -873,7 +873,7 @@ const size_t byte_size = return_clang_type.GetByteSize(); - const uint32_t type_flags = return_clang_type.GetTypeInfo (NULL); + const uint32_t type_flags = return_clang_type.GetTypeInfo (nullptr); if (type_flags & ClangASTType::eTypeIsScalar || type_flags & ClangASTType::eTypeIsPointer) { Index: source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp =================================================================== --- source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp +++ source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp @@ -148,55 +148,55 @@ { // NAME ALT SZ OFF ENCODING FORMAT COMPILER DWARF GENERIC GDB LLDB NATIVE VALUE REGS INVALIDATE REGS // ====== ======= == === ============= ============ ===================== ===================== ============================ ==================== ====================== ========== =============== - { "eax", NULL, 4, 0, eEncodingUint , eFormatHex , { gcc_eax , dwarf_eax , LLDB_INVALID_REGNUM , gdb_eax , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ebx" , NULL, 4, 0, eEncodingUint , eFormatHex , { gcc_ebx , dwarf_ebx , LLDB_INVALID_REGNUM , gdb_ebx , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ecx" , NULL, 4, 0, eEncodingUint , eFormatHex , { gcc_ecx , dwarf_ecx , LLDB_REGNUM_GENERIC_ARG4 , gdb_ecx , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "edx" , NULL, 4, 0, eEncodingUint , eFormatHex , { gcc_edx , dwarf_edx , LLDB_REGNUM_GENERIC_ARG3 , gdb_edx , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "esi" , NULL, 4, 0, eEncodingUint , eFormatHex , { gcc_esi , dwarf_esi , LLDB_REGNUM_GENERIC_ARG2 , gdb_esi , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "edi" , NULL, 4, 0, eEncodingUint , eFormatHex , { gcc_edi , dwarf_edi , LLDB_REGNUM_GENERIC_ARG1 , gdb_edi , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ebp" , "fp", 4, 0, eEncodingUint , eFormatHex , { gcc_ebp , dwarf_ebp , LLDB_REGNUM_GENERIC_FP , gdb_ebp , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "esp" , "sp", 4, 0, eEncodingUint , eFormatHex , { gcc_esp , dwarf_esp , LLDB_REGNUM_GENERIC_SP , gdb_esp , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "eip" , "pc", 4, 0, eEncodingUint , eFormatHex , { gcc_eip , dwarf_eip , LLDB_REGNUM_GENERIC_PC , gdb_eip , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "eflags", NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_REGNUM_GENERIC_FLAGS , gdb_eflags , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "cs" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_cs , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ss" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ss , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ds" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ds , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "es" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_es , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fs" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fs , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "gs" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_gs , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm0" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm0 , LLDB_INVALID_REGNUM , gdb_stmm0 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm1" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm1 , LLDB_INVALID_REGNUM , gdb_stmm1 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm2" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm2 , LLDB_INVALID_REGNUM , gdb_stmm2 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm3" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm3 , LLDB_INVALID_REGNUM , gdb_stmm3 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm4" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm4 , LLDB_INVALID_REGNUM , gdb_stmm4 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm5" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm5 , LLDB_INVALID_REGNUM , gdb_stmm5 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm6" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm6 , LLDB_INVALID_REGNUM , gdb_stmm6 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm7" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm7 , LLDB_INVALID_REGNUM , gdb_stmm7 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fctrl" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fctrl , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fstat" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fstat , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ftag" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ftag , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fiseg" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fiseg , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fioff" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fioff , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "foseg" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_foseg , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fooff" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fooff , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fop" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fop , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm0" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm0 , LLDB_INVALID_REGNUM , gdb_xmm0 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm1" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm1 , LLDB_INVALID_REGNUM , gdb_xmm1 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm2" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm2 , LLDB_INVALID_REGNUM , gdb_xmm2 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm3" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm3 , LLDB_INVALID_REGNUM , gdb_xmm3 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm4" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm4 , LLDB_INVALID_REGNUM , gdb_xmm4 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm5" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm5 , LLDB_INVALID_REGNUM , gdb_xmm5 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm6" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm6 , LLDB_INVALID_REGNUM , gdb_xmm6 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm7" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm7 , LLDB_INVALID_REGNUM , gdb_xmm7 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "mxcsr" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_mxcsr , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm0" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm0 , LLDB_INVALID_REGNUM , gdb_ymm0 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm1" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm1 , LLDB_INVALID_REGNUM , gdb_ymm1 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm2" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm2 , LLDB_INVALID_REGNUM , gdb_ymm2 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm3" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm3 , LLDB_INVALID_REGNUM , gdb_ymm3 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm4" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm4 , LLDB_INVALID_REGNUM , gdb_ymm4 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm5" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm5 , LLDB_INVALID_REGNUM , gdb_ymm5 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm6" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm6 , LLDB_INVALID_REGNUM , gdb_ymm6 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm7" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm7 , LLDB_INVALID_REGNUM , gdb_ymm7 , LLDB_INVALID_REGNUM }, NULL, NULL} + { "eax", nullptr, 4, 0, eEncodingUint , eFormatHex , { gcc_eax , dwarf_eax , LLDB_INVALID_REGNUM , gdb_eax , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ebx" , nullptr, 4, 0, eEncodingUint , eFormatHex , { gcc_ebx , dwarf_ebx , LLDB_INVALID_REGNUM , gdb_ebx , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ecx" , nullptr, 4, 0, eEncodingUint , eFormatHex , { gcc_ecx , dwarf_ecx , LLDB_REGNUM_GENERIC_ARG4 , gdb_ecx , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "edx" , nullptr, 4, 0, eEncodingUint , eFormatHex , { gcc_edx , dwarf_edx , LLDB_REGNUM_GENERIC_ARG3 , gdb_edx , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "esi" , nullptr, 4, 0, eEncodingUint , eFormatHex , { gcc_esi , dwarf_esi , LLDB_REGNUM_GENERIC_ARG2 , gdb_esi , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "edi" , nullptr, 4, 0, eEncodingUint , eFormatHex , { gcc_edi , dwarf_edi , LLDB_REGNUM_GENERIC_ARG1 , gdb_edi , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ebp" , "fp", 4, 0, eEncodingUint , eFormatHex , { gcc_ebp , dwarf_ebp , LLDB_REGNUM_GENERIC_FP , gdb_ebp , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "esp" , "sp", 4, 0, eEncodingUint , eFormatHex , { gcc_esp , dwarf_esp , LLDB_REGNUM_GENERIC_SP , gdb_esp , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "eip" , "pc", 4, 0, eEncodingUint , eFormatHex , { gcc_eip , dwarf_eip , LLDB_REGNUM_GENERIC_PC , gdb_eip , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "eflags", nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_REGNUM_GENERIC_FLAGS , gdb_eflags , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "cs" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_cs , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ss" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ss , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ds" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ds , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "es" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_es , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fs" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fs , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "gs" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_gs , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm0" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm0 , LLDB_INVALID_REGNUM , gdb_stmm0 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm1" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm1 , LLDB_INVALID_REGNUM , gdb_stmm1 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm2" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm2 , LLDB_INVALID_REGNUM , gdb_stmm2 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm3" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm3 , LLDB_INVALID_REGNUM , gdb_stmm3 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm4" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm4 , LLDB_INVALID_REGNUM , gdb_stmm4 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm5" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm5 , LLDB_INVALID_REGNUM , gdb_stmm5 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm6" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm6 , LLDB_INVALID_REGNUM , gdb_stmm6 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm7" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_stmm7 , LLDB_INVALID_REGNUM , gdb_stmm7 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fctrl" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fctrl , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fstat" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fstat , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ftag" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ftag , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fiseg" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fiseg , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fioff" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fioff , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "foseg" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_foseg , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fooff" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fooff , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fop" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fop , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm0" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm0 , LLDB_INVALID_REGNUM , gdb_xmm0 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm1" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm1 , LLDB_INVALID_REGNUM , gdb_xmm1 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm2" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm2 , LLDB_INVALID_REGNUM , gdb_xmm2 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm3" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm3 , LLDB_INVALID_REGNUM , gdb_xmm3 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm4" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm4 , LLDB_INVALID_REGNUM , gdb_xmm4 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm5" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm5 , LLDB_INVALID_REGNUM , gdb_xmm5 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm6" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm6 , LLDB_INVALID_REGNUM , gdb_xmm6 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm7" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_xmm7 , LLDB_INVALID_REGNUM , gdb_xmm7 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "mxcsr" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_mxcsr , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm0" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm0 , LLDB_INVALID_REGNUM , gdb_ymm0 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm1" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm1 , LLDB_INVALID_REGNUM , gdb_ymm1 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm2" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm2 , LLDB_INVALID_REGNUM , gdb_ymm2 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm3" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm3 , LLDB_INVALID_REGNUM , gdb_ymm3 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm4" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm4 , LLDB_INVALID_REGNUM , gdb_ymm4 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm5" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm5 , LLDB_INVALID_REGNUM , gdb_ymm5 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm6" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm6 , LLDB_INVALID_REGNUM , gdb_ymm6 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm7" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM , dwarf_ymm7 , LLDB_INVALID_REGNUM , gdb_ymm7 , LLDB_INVALID_REGNUM }, nullptr, nullptr} }; static const uint32_t k_num_register_infos = sizeof(g_register_infos)/sizeof(RegisterInfo); Index: source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp =================================================================== --- source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp +++ source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp @@ -176,79 +176,79 @@ { // NAME ALT SZ OFF ENCODING FORMAT COMPILER DWARF GENERIC GDB LLDB NATIVE VALUE REGS INVALIDATE REGS // ======== ======= == === ============= =================== ======================= ===================== =========================== ===================== ====================== ========== =============== - { "rax" , NULL, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rax , gcc_dwarf_rax , LLDB_INVALID_REGNUM , gdb_rax , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rbx" , NULL, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rbx , gcc_dwarf_rbx , LLDB_INVALID_REGNUM , gdb_rbx , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rcx" , "arg4", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rcx , gcc_dwarf_rcx , LLDB_REGNUM_GENERIC_ARG4 , gdb_rcx , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rdx" , "arg3", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rdx , gcc_dwarf_rdx , LLDB_REGNUM_GENERIC_ARG3 , gdb_rdx , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rsi" , "arg2", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rsi , gcc_dwarf_rsi , LLDB_REGNUM_GENERIC_ARG2 , gdb_rsi , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rdi" , "arg1", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rdi , gcc_dwarf_rdi , LLDB_REGNUM_GENERIC_ARG1 , gdb_rdi , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rbp" , "fp", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rbp , gcc_dwarf_rbp , LLDB_REGNUM_GENERIC_FP , gdb_rbp , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rsp" , "sp", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rsp , gcc_dwarf_rsp , LLDB_REGNUM_GENERIC_SP , gdb_rsp , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r8" , "arg5", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r8 , gcc_dwarf_r8 , LLDB_REGNUM_GENERIC_ARG5 , gdb_r8 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r9" , "arg6", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r9 , gcc_dwarf_r9 , LLDB_REGNUM_GENERIC_ARG6 , gdb_r9 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r10" , NULL, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r10 , gcc_dwarf_r10 , LLDB_INVALID_REGNUM , gdb_r10 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r11" , NULL, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r11 , gcc_dwarf_r11 , LLDB_INVALID_REGNUM , gdb_r11 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r12" , NULL, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r12 , gcc_dwarf_r12 , LLDB_INVALID_REGNUM , gdb_r12 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r13" , NULL, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r13 , gcc_dwarf_r13 , LLDB_INVALID_REGNUM , gdb_r13 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r14" , NULL, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r14 , gcc_dwarf_r14 , LLDB_INVALID_REGNUM , gdb_r14 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "r15" , NULL, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r15 , gcc_dwarf_r15 , LLDB_INVALID_REGNUM , gdb_r15 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rip" , "pc", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rip , gcc_dwarf_rip , LLDB_REGNUM_GENERIC_PC , gdb_rip , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "rflags", NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_REGNUM_GENERIC_FLAGS , gdb_rflags , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "cs" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_cs , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ss" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ss , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ds" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ds , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "es" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_es , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fs" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fs , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "gs" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_gs , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm0" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm0 , gcc_dwarf_stmm0 , LLDB_INVALID_REGNUM , gdb_stmm0 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm1" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm1 , gcc_dwarf_stmm1 , LLDB_INVALID_REGNUM , gdb_stmm1 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm2" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm2 , gcc_dwarf_stmm2 , LLDB_INVALID_REGNUM , gdb_stmm2 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm3" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm3 , gcc_dwarf_stmm3 , LLDB_INVALID_REGNUM , gdb_stmm3 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm4" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm4 , gcc_dwarf_stmm4 , LLDB_INVALID_REGNUM , gdb_stmm4 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm5" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm5 , gcc_dwarf_stmm5 , LLDB_INVALID_REGNUM , gdb_stmm5 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm6" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm6 , gcc_dwarf_stmm6 , LLDB_INVALID_REGNUM , gdb_stmm6 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "stmm7" , NULL, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm7 , gcc_dwarf_stmm7 , LLDB_INVALID_REGNUM , gdb_stmm7 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fctrl" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fctrl , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fstat" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fstat , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ftag" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ftag , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fiseg" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fiseg , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fioff" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fioff , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "foseg" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_foseg , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fooff" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fooff , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "fop" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fop , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm0" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm0 , gcc_dwarf_xmm0 , LLDB_INVALID_REGNUM , gdb_xmm0 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm1" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm1 , gcc_dwarf_xmm1 , LLDB_INVALID_REGNUM , gdb_xmm1 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm2" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm2 , gcc_dwarf_xmm2 , LLDB_INVALID_REGNUM , gdb_xmm2 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm3" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm3 , gcc_dwarf_xmm3 , LLDB_INVALID_REGNUM , gdb_xmm3 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm4" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm4 , gcc_dwarf_xmm4 , LLDB_INVALID_REGNUM , gdb_xmm4 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm5" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm5 , gcc_dwarf_xmm5 , LLDB_INVALID_REGNUM , gdb_xmm5 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm6" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm6 , gcc_dwarf_xmm6 , LLDB_INVALID_REGNUM , gdb_xmm6 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm7" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm7 , gcc_dwarf_xmm7 , LLDB_INVALID_REGNUM , gdb_xmm7 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm8" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm8 , gcc_dwarf_xmm8 , LLDB_INVALID_REGNUM , gdb_xmm8 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm9" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm9 , gcc_dwarf_xmm9 , LLDB_INVALID_REGNUM , gdb_xmm9 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm10" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm10 , gcc_dwarf_xmm10 , LLDB_INVALID_REGNUM , gdb_xmm10 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm11" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm11 , gcc_dwarf_xmm11 , LLDB_INVALID_REGNUM , gdb_xmm11 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm12" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm12 , gcc_dwarf_xmm12 , LLDB_INVALID_REGNUM , gdb_xmm12 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm13" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm13 , gcc_dwarf_xmm13 , LLDB_INVALID_REGNUM , gdb_xmm13 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm14" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm14 , gcc_dwarf_xmm14 , LLDB_INVALID_REGNUM , gdb_xmm14 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "xmm15" , NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm15 , gcc_dwarf_xmm15 , LLDB_INVALID_REGNUM , gdb_xmm15 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "mxcsr" , NULL, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_mxcsr , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm0" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm0 , gcc_dwarf_ymm0 , LLDB_INVALID_REGNUM , gdb_ymm0 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm1" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm1 , gcc_dwarf_ymm1 , LLDB_INVALID_REGNUM , gdb_ymm1 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm2" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm2 , gcc_dwarf_ymm2 , LLDB_INVALID_REGNUM , gdb_ymm2 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm3" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm3 , gcc_dwarf_ymm3 , LLDB_INVALID_REGNUM , gdb_ymm3 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm4" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm4 , gcc_dwarf_ymm4 , LLDB_INVALID_REGNUM , gdb_ymm4 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm5" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm5 , gcc_dwarf_ymm5 , LLDB_INVALID_REGNUM , gdb_ymm5 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm6" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm6 , gcc_dwarf_ymm6 , LLDB_INVALID_REGNUM , gdb_ymm6 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm7" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm7 , gcc_dwarf_ymm7 , LLDB_INVALID_REGNUM , gdb_ymm7 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm8" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm8 , gcc_dwarf_ymm8 , LLDB_INVALID_REGNUM , gdb_ymm8 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm9" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm9 , gcc_dwarf_ymm9 , LLDB_INVALID_REGNUM , gdb_ymm9 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm10" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm10 , gcc_dwarf_ymm10 , LLDB_INVALID_REGNUM , gdb_ymm10 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm11" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm11 , gcc_dwarf_ymm11 , LLDB_INVALID_REGNUM , gdb_ymm11 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm12" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm12 , gcc_dwarf_ymm12 , LLDB_INVALID_REGNUM , gdb_ymm12 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm13" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm13 , gcc_dwarf_ymm13 , LLDB_INVALID_REGNUM , gdb_ymm13 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm14" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm14 , gcc_dwarf_ymm14 , LLDB_INVALID_REGNUM , gdb_ymm14 , LLDB_INVALID_REGNUM }, NULL, NULL}, - { "ymm15" , NULL, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm15 , gcc_dwarf_ymm15 , LLDB_INVALID_REGNUM , gdb_ymm15 , LLDB_INVALID_REGNUM }, NULL, NULL} + { "rax" , nullptr, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rax , gcc_dwarf_rax , LLDB_INVALID_REGNUM , gdb_rax , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rbx" , nullptr, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rbx , gcc_dwarf_rbx , LLDB_INVALID_REGNUM , gdb_rbx , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rcx" , "arg4", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rcx , gcc_dwarf_rcx , LLDB_REGNUM_GENERIC_ARG4 , gdb_rcx , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rdx" , "arg3", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rdx , gcc_dwarf_rdx , LLDB_REGNUM_GENERIC_ARG3 , gdb_rdx , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rsi" , "arg2", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rsi , gcc_dwarf_rsi , LLDB_REGNUM_GENERIC_ARG2 , gdb_rsi , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rdi" , "arg1", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rdi , gcc_dwarf_rdi , LLDB_REGNUM_GENERIC_ARG1 , gdb_rdi , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rbp" , "fp", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rbp , gcc_dwarf_rbp , LLDB_REGNUM_GENERIC_FP , gdb_rbp , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rsp" , "sp", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rsp , gcc_dwarf_rsp , LLDB_REGNUM_GENERIC_SP , gdb_rsp , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r8" , "arg5", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r8 , gcc_dwarf_r8 , LLDB_REGNUM_GENERIC_ARG5 , gdb_r8 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r9" , "arg6", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r9 , gcc_dwarf_r9 , LLDB_REGNUM_GENERIC_ARG6 , gdb_r9 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r10" , nullptr, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r10 , gcc_dwarf_r10 , LLDB_INVALID_REGNUM , gdb_r10 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r11" , nullptr, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r11 , gcc_dwarf_r11 , LLDB_INVALID_REGNUM , gdb_r11 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r12" , nullptr, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r12 , gcc_dwarf_r12 , LLDB_INVALID_REGNUM , gdb_r12 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r13" , nullptr, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r13 , gcc_dwarf_r13 , LLDB_INVALID_REGNUM , gdb_r13 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r14" , nullptr, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r14 , gcc_dwarf_r14 , LLDB_INVALID_REGNUM , gdb_r14 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "r15" , nullptr, 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_r15 , gcc_dwarf_r15 , LLDB_INVALID_REGNUM , gdb_r15 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rip" , "pc", 8, 0, eEncodingUint , eFormatHex , { gcc_dwarf_rip , gcc_dwarf_rip , LLDB_REGNUM_GENERIC_PC , gdb_rip , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "rflags", nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_REGNUM_GENERIC_FLAGS , gdb_rflags , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "cs" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_cs , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ss" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ss , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ds" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ds , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "es" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_es , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fs" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fs , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "gs" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_gs , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm0" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm0 , gcc_dwarf_stmm0 , LLDB_INVALID_REGNUM , gdb_stmm0 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm1" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm1 , gcc_dwarf_stmm1 , LLDB_INVALID_REGNUM , gdb_stmm1 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm2" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm2 , gcc_dwarf_stmm2 , LLDB_INVALID_REGNUM , gdb_stmm2 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm3" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm3 , gcc_dwarf_stmm3 , LLDB_INVALID_REGNUM , gdb_stmm3 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm4" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm4 , gcc_dwarf_stmm4 , LLDB_INVALID_REGNUM , gdb_stmm4 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm5" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm5 , gcc_dwarf_stmm5 , LLDB_INVALID_REGNUM , gdb_stmm5 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm6" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm6 , gcc_dwarf_stmm6 , LLDB_INVALID_REGNUM , gdb_stmm6 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "stmm7" , nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_stmm7 , gcc_dwarf_stmm7 , LLDB_INVALID_REGNUM , gdb_stmm7 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fctrl" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fctrl , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fstat" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fstat , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ftag" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_ftag , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fiseg" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fiseg , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fioff" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fioff , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "foseg" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_foseg , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fooff" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fooff , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "fop" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_fop , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm0" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm0 , gcc_dwarf_xmm0 , LLDB_INVALID_REGNUM , gdb_xmm0 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm1" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm1 , gcc_dwarf_xmm1 , LLDB_INVALID_REGNUM , gdb_xmm1 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm2" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm2 , gcc_dwarf_xmm2 , LLDB_INVALID_REGNUM , gdb_xmm2 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm3" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm3 , gcc_dwarf_xmm3 , LLDB_INVALID_REGNUM , gdb_xmm3 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm4" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm4 , gcc_dwarf_xmm4 , LLDB_INVALID_REGNUM , gdb_xmm4 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm5" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm5 , gcc_dwarf_xmm5 , LLDB_INVALID_REGNUM , gdb_xmm5 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm6" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm6 , gcc_dwarf_xmm6 , LLDB_INVALID_REGNUM , gdb_xmm6 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm7" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm7 , gcc_dwarf_xmm7 , LLDB_INVALID_REGNUM , gdb_xmm7 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm8" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm8 , gcc_dwarf_xmm8 , LLDB_INVALID_REGNUM , gdb_xmm8 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm9" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm9 , gcc_dwarf_xmm9 , LLDB_INVALID_REGNUM , gdb_xmm9 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm10" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm10 , gcc_dwarf_xmm10 , LLDB_INVALID_REGNUM , gdb_xmm10 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm11" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm11 , gcc_dwarf_xmm11 , LLDB_INVALID_REGNUM , gdb_xmm11 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm12" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm12 , gcc_dwarf_xmm12 , LLDB_INVALID_REGNUM , gdb_xmm12 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm13" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm13 , gcc_dwarf_xmm13 , LLDB_INVALID_REGNUM , gdb_xmm13 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm14" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm14 , gcc_dwarf_xmm14 , LLDB_INVALID_REGNUM , gdb_xmm14 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "xmm15" , nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_xmm15 , gcc_dwarf_xmm15 , LLDB_INVALID_REGNUM , gdb_xmm15 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "mxcsr" , nullptr, 4, 0, eEncodingUint , eFormatHex , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , gdb_mxcsr , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm0" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm0 , gcc_dwarf_ymm0 , LLDB_INVALID_REGNUM , gdb_ymm0 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm1" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm1 , gcc_dwarf_ymm1 , LLDB_INVALID_REGNUM , gdb_ymm1 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm2" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm2 , gcc_dwarf_ymm2 , LLDB_INVALID_REGNUM , gdb_ymm2 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm3" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm3 , gcc_dwarf_ymm3 , LLDB_INVALID_REGNUM , gdb_ymm3 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm4" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm4 , gcc_dwarf_ymm4 , LLDB_INVALID_REGNUM , gdb_ymm4 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm5" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm5 , gcc_dwarf_ymm5 , LLDB_INVALID_REGNUM , gdb_ymm5 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm6" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm6 , gcc_dwarf_ymm6 , LLDB_INVALID_REGNUM , gdb_ymm6 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm7" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm7 , gcc_dwarf_ymm7 , LLDB_INVALID_REGNUM , gdb_ymm7 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm8" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm8 , gcc_dwarf_ymm8 , LLDB_INVALID_REGNUM , gdb_ymm8 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm9" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm9 , gcc_dwarf_ymm9 , LLDB_INVALID_REGNUM , gdb_ymm9 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm10" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm10 , gcc_dwarf_ymm10 , LLDB_INVALID_REGNUM , gdb_ymm10 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm11" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm11 , gcc_dwarf_ymm11 , LLDB_INVALID_REGNUM , gdb_ymm11 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm12" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm12 , gcc_dwarf_ymm12 , LLDB_INVALID_REGNUM , gdb_ymm12 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm13" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm13 , gcc_dwarf_ymm13 , LLDB_INVALID_REGNUM , gdb_ymm13 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm14" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm14 , gcc_dwarf_ymm14 , LLDB_INVALID_REGNUM , gdb_ymm14 , LLDB_INVALID_REGNUM }, nullptr, nullptr}, + { "ymm15" , nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, { gcc_dwarf_ymm15 , gcc_dwarf_ymm15 , LLDB_INVALID_REGNUM , gdb_ymm15 , LLDB_INVALID_REGNUM }, nullptr, nullptr} }; static const uint32_t k_num_register_infos = sizeof(g_register_infos)/sizeof(RegisterInfo); @@ -326,7 +326,7 @@ if (!reg_ctx) return false; - const RegisterInfo *reg_info = NULL; + const RegisterInfo *reg_info = nullptr; if (args.size() > 6) // TODO handle more than 6 arguments return false; @@ -759,10 +759,10 @@ { const RegisterInfo *altivec_reg = reg_ctx->GetRegisterInfoByName("ymm0", 0); - if (altivec_reg == NULL) + if (altivec_reg == nullptr) { altivec_reg = reg_ctx->GetRegisterInfoByName("xmm0", 0); - if (altivec_reg == NULL) + if (altivec_reg == nullptr) altivec_reg = reg_ctx->GetRegisterInfoByName("mm0", 0); } @@ -867,7 +867,7 @@ bool is_complex; uint32_t count; - ClangASTType field_clang_type = return_clang_type.GetFieldAtIndex (idx, name, &field_bit_offset, NULL, NULL); + ClangASTType field_clang_type = return_clang_type.GetFieldAtIndex (idx, name, &field_bit_offset, nullptr, nullptr); const size_t field_bit_width = field_clang_type.GetBitSize(); // If there are any unaligned fields, this is stored in memory. @@ -881,7 +881,7 @@ uint32_t field_byte_offset = field_bit_offset/8; - DataExtractor *copy_from_extractor = NULL; + DataExtractor *copy_from_extractor = nullptr; uint32_t copy_from_offset = 0; if (field_clang_type.IsIntegerType (is_signed) || field_clang_type.IsPointerType ()) @@ -953,8 +953,8 @@ ClangASTType next_field_clang_type = return_clang_type.GetFieldAtIndex (idx + 1, name, &next_field_bit_offset, - NULL, - NULL); + nullptr, + nullptr); if (next_field_clang_type.IsIntegerType (is_signed)) in_gpr = true; else @@ -977,8 +977,8 @@ ClangASTType prev_field_clang_type = return_clang_type.GetFieldAtIndex (idx - 1, name, &prev_field_bit_offset, - NULL, - NULL); + nullptr, + nullptr); if (prev_field_clang_type.IsIntegerType (is_signed)) in_gpr = true; else @@ -1061,7 +1061,7 @@ lldb::addr_t storage_addr = (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(rax_id, 0); return_valobj_sp = ValueObjectMemory::Create (&thread, "", - Address (storage_addr, NULL), + Address (storage_addr, nullptr), return_clang_type); } } Index: source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h =================================================================== --- source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h +++ source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h @@ -112,7 +112,7 @@ bool IsValid() { - return (m_disasm_ap.get() != NULL && m_disasm_ap->IsValid()); + return (m_disasm_ap.get() != nullptr && m_disasm_ap->IsValid()); } int OpInfo(uint64_t PC, @@ -149,8 +149,8 @@ void Unlock() { - m_inst = NULL; - m_exe_ctx = NULL; + m_inst = nullptr; + m_exe_ctx = nullptr; m_mutex.Unlock(); } Index: source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp =================================================================== --- source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp +++ source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp @@ -68,7 +68,7 @@ { if (m_does_branch == eLazyBoolCalculate) { - GetDisassemblerLLVMC().Lock(this, NULL); + GetDisassemblerLLVMC().Lock(this, nullptr); DataExtractor data; if (m_opcode.GetData(data)) { @@ -105,7 +105,7 @@ { is_alternate_isa = false; DisassemblerLLVMC &llvm_disasm = GetDisassemblerLLVMC(); - if (llvm_disasm.m_alternate_disasm_ap.get() != NULL) + if (llvm_disasm.m_alternate_disasm_ap.get() != nullptr) { const AddressClass address_class = GetAddressClass (); @@ -205,7 +205,7 @@ const addr_t pc = m_address.GetFileAddress(); llvm::MCInst inst; - llvm_disasm.Lock(this, NULL); + llvm_disasm.Lock(this, nullptr); const size_t inst_size = mc_disasm_ptr->GetMCInst(opcode_data, opcode_data_len, pc, @@ -346,7 +346,7 @@ else { const uint8_t *bytes = data.PeekData(offset, inst_size); - if (bytes == NULL) + if (bytes == nullptr) return; m_opcode_name.assign (".byte"); m_opcode.SetOpcodeBytes(bytes, inst_size); @@ -438,13 +438,13 @@ std::unique_ptr reg_info(curr_target->createMCRegInfo(triple)); m_asm_info_ap.reset(curr_target->createMCAsmInfo(*reg_info, triple)); - if (m_instr_info_ap.get() == NULL || m_reg_info_ap.get() == NULL || m_subtarget_info_ap.get() == NULL || m_asm_info_ap.get() == NULL) + if (m_instr_info_ap.get() == nullptr || m_reg_info_ap.get() == nullptr || m_subtarget_info_ap.get() == nullptr || m_asm_info_ap.get() == nullptr) { m_is_valid = false; return; } - m_context_ap.reset(new llvm::MCContext(m_asm_info_ap.get(), m_reg_info_ap.get(), 0)); + m_context_ap.reset(new llvm::MCContext(m_asm_info_ap.get(), m_reg_info_ap.get(), nullptr)); m_disasm_ap.reset(curr_target->createMCDisassembler(*m_subtarget_info_ap.get(), *m_context_ap.get())); if (m_disasm_ap.get() && m_context_ap.get()) @@ -455,7 +455,7 @@ m_is_valid = false; return; } - m_disasm_ap->setSymbolizer(std::unique_ptr(new llvm::MCExternalSymbolizer(*m_context_ap.get(),std::move(RelInfo),NULL,DisassemblerLLVMC::SymbolLookupCallback,(void *) &owner))); + m_disasm_ap->setSymbolizer(std::unique_ptr(new llvm::MCExternalSymbolizer(*m_context_ap.get(),std::move(RelInfo),nullptr,DisassemblerLLVMC::SymbolLookupCallback,(void *) &owner))); unsigned asm_printer_variant; @@ -471,7 +471,7 @@ *m_instr_info_ap.get(), *m_reg_info_ap.get(), *m_subtarget_info_ap.get())); - if (m_instr_printer_ap.get() == NULL) + if (m_instr_printer_ap.get() == nullptr) { m_disasm_ap.reset(); m_is_valid = false; @@ -567,7 +567,7 @@ DisassemblerLLVMC::FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, const char *flavor) { llvm::Triple triple = arch.GetTriple(); - if (flavor == NULL || strcmp (flavor, "default") == 0) + if (flavor == nullptr || strcmp (flavor, "default") == 0) return true; if (triple.getArch() == llvm::Triple::x86 || triple.getArch() == llvm::Triple::x86_64) @@ -592,13 +592,13 @@ if (disasm_ap.get() && disasm_ap->IsValid()) return disasm_ap.release(); } - return NULL; + return nullptr; } DisassemblerLLVMC::DisassemblerLLVMC (const ArchSpec &arch, const char *flavor_string) : Disassembler(arch, flavor_string), - m_exe_ctx (NULL), - m_inst (NULL), + m_exe_ctx (nullptr), + m_inst (nullptr), m_data_from_file (false) { if (!FlavorValidForArchSpec (arch, m_flavor.c_str())) @@ -705,7 +705,7 @@ AddressClass address_class = eAddressClassCode; - if (m_alternate_disasm_ap.get() != NULL) + if (m_alternate_disasm_ap.get() != nullptr) address_class = inst_addr.GetAddressClass (); InstructionSP inst_sp(new InstructionLLVMC(*this, @@ -809,7 +809,7 @@ if (m_exe_ctx && m_inst) { //std::string remove_this_prior_to_checkin; - Target *target = m_exe_ctx ? m_exe_ctx->GetTargetPtr() : NULL; + Target *target = m_exe_ctx ? m_exe_ctx->GetTargetPtr() : nullptr; Address value_so_addr; if (m_inst->UsingFileAddress()) { @@ -840,8 +840,8 @@ } *type_ptr = LLVMDisassembler_ReferenceType_InOut_None; - *name = NULL; - return NULL; + *name = nullptr; + return nullptr; } //------------------------------------------------------------------ Index: source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp =================================================================== --- source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -82,7 +82,7 @@ if (m_dyld.file_spec == platform_file_spec && m_dyld.uuid.IsValid() == false) return &m_dyld; - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -126,7 +126,7 @@ if (create) return new DynamicLoaderMacOSXDYLD (process); - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -244,7 +244,7 @@ m_process->GetTarget().RemoveBreakpointByID (m_break_id); if (clear_process) - m_process = NULL; + m_process = nullptr; m_dyld.Clear(false); m_dyld_all_image_infos_addr = LLDB_INVALID_ADDRESS; m_dyld_all_image_infos.Clear(); @@ -363,7 +363,7 @@ if (can_create) { module_sp = target.GetSharedModule (module_spec); - if (!module_sp || module_sp->GetObjectFile() == NULL) + if (!module_sp || module_sp->GetObjectFile() == nullptr) module_sp = m_process->ReadModuleFromMemory (image_info.file_spec, image_info.address); if (did_create_ptr) @@ -391,7 +391,7 @@ { if (m_dyld.file_spec) { - dyld_module_sp = FindTargetModuleForDYLDImageInfo (m_dyld, true, NULL); + dyld_module_sp = FindTargetModuleForDYLDImageInfo (m_dyld, true, nullptr); if (dyld_module_sp) UpdateImageLoadAddress (dyld_module_sp.get(), m_dyld); @@ -828,7 +828,7 @@ m_dyld_image_infos.push_back(image_infos[idx]); - ModuleSP image_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[idx], true, NULL)); + ModuleSP image_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[idx], true, nullptr)); if (image_module_sp) { @@ -852,7 +852,7 @@ { module_spec.SetObjectOffset (objfile->GetFileOffset() + commpage_section->GetFileOffset()); commpage_image_module_sp = target.GetSharedModule (module_spec); - if (!commpage_image_module_sp || commpage_image_module_sp->GetObjectFile() == NULL) + if (!commpage_image_module_sp || commpage_image_module_sp->GetObjectFile() == nullptr) { commpage_image_module_sp = m_process->ReadModuleFromMemory (image_infos[idx].file_spec, image_infos[idx].address); @@ -895,7 +895,7 @@ // Also, I'm assuming there can be only one libobjc dylib loaded... ObjCLanguageRuntime *objc_runtime = m_process->GetObjCLanguageRuntime(true); - if (objc_runtime != NULL && !objc_runtime->HasReadObjCLibrary()) + if (objc_runtime != nullptr && !objc_runtime->HasReadObjCLibrary()) { size_t num_modules = loaded_module_list.GetSize(); for (size_t i = 0; i < num_modules; i++) @@ -961,7 +961,7 @@ // Add the module from this image_info to the "unloaded_module_list". We'll remove them all at // one go later on. - ModuleSP unload_image_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[idx], false, NULL)); + ModuleSP unload_image_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[idx], false, nullptr)); if (unload_image_module_sp.get()) { // When we unload, be sure to use the image info from the old list, @@ -1172,7 +1172,7 @@ // Read the rest of dyld's mach header if (data.GetU32(&offset, &header->cputype, (sizeof(llvm::MachO::mach_header)/sizeof(uint32_t)) - 1)) { - if (load_command_data == NULL) + if (load_command_data == nullptr) return true; // We were able to read the mach_header and weren't asked to read the load command bytes DataBufferSP load_cmd_data_sp(new DataBufferHeap(header->sizeofcmds, 0)); @@ -1314,7 +1314,7 @@ if (!ReadMachHeader (image_infos[i].address, &image_infos[i].header, &data)) continue; - ParseLoadCommands (data, image_infos[i], NULL); + ParseLoadCommands (data, image_infos[i], nullptr); if (image_infos[i].header.filetype == llvm::MachO::MH_EXECUTE) exe_idx = i; @@ -1327,7 +1327,7 @@ if (exe_idx < image_infos.size()) { const bool can_create = true; - ModuleSP exe_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[exe_idx], can_create, NULL)); + ModuleSP exe_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[exe_idx], can_create, nullptr)); if (exe_module_sp) { @@ -1378,15 +1378,15 @@ { module_sp = sym_ctx.symbol->GetAddress().GetModule(); } - if (module_sp.get() == NULL && sym_ctx.function) + if (module_sp.get() == nullptr && sym_ctx.function) { module_sp = sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule(); } - if (module_sp.get() == NULL) + if (module_sp.get() == nullptr) return false; ObjCLanguageRuntime *objc_runtime = m_process->GetObjCLanguageRuntime(); - if (objc_runtime != NULL && objc_runtime->IsModuleObjCLibrary (module_sp)) + if (objc_runtime != nullptr && objc_runtime->IsModuleObjCLibrary (module_sp)) { return true; } @@ -1427,7 +1427,7 @@ if (segments[i].name == name) return &segments[i]; } - return NULL; + return nullptr; } @@ -1437,7 +1437,7 @@ void DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const { - if (log == NULL) + if (log == nullptr) return; uint8_t *u = (uint8_t *)uuid.GetBytes(); @@ -1491,7 +1491,7 @@ void DynamicLoaderMacOSXDYLD::PutToLog(Log *log) const { - if (log == NULL) + if (log == nullptr) return; Mutex::Locker locker(m_mutex); @@ -1604,7 +1604,7 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); TargetSP target_sp (thread.CalculateTarget()); - if (current_symbol != NULL) + if (current_symbol != nullptr) { std::vector
addresses; Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp =================================================================== --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -86,7 +86,7 @@ if (create) return new DynamicLoaderPOSIXDYLD (process); - return NULL; + return nullptr; } DynamicLoaderPOSIXDYLD::DynamicLoaderPOSIXDYLD(Process *process) @@ -159,7 +159,7 @@ Log * DynamicLoaderPOSIXDYLD::EnablePluginLogging(Stream *strm, Args &command) { - return NULL; + return nullptr; } Error @@ -312,7 +312,7 @@ const SymbolContext &context = frame->GetSymbolContext(eSymbolContextSymbol); Symbol *sym = context.symbol; - if (sym == NULL || !sym->IsTrampoline()) + if (sym == nullptr || !sym->IsTrampoline()) return thread_plan_sp; const ConstString &sym_name = sym->GetMangled().GetName(Mangled::ePreferMangled); @@ -430,7 +430,7 @@ if (m_entry_point != LLDB_INVALID_ADDRESS) return m_entry_point; - if (m_auxv.get() == NULL) + if (m_auxv.get() == nullptr) return LLDB_INVALID_ADDRESS; AuxVector::iterator I = m_auxv->FindEntry(AuxVector::AT_ENTRY); Index: source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp =================================================================== --- source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp +++ source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp @@ -50,7 +50,7 @@ if (create) return new DynamicLoaderStatic (process); - return NULL; + return nullptr; } //---------------------------------------------------------------------- Index: source/Plugins/Instruction/ARM/EmulateInstructionARM.h =================================================================== --- source/Plugins/Instruction/ARM/EmulateInstructionARM.h +++ source/Plugins/Instruction/ARM/EmulateInstructionARM.h @@ -181,7 +181,7 @@ bool ConditionPassed (const uint32_t opcode, - bool *is_conditional = NULL); // Filled in with true if the opcode is a conditional opcode + bool *is_conditional = nullptr); // Filled in with true if the opcode is a conditional opcode // Filled in with false if the opcode is always executed uint32_t Index: source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp =================================================================== --- source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -214,7 +214,7 @@ } } - return NULL; + return nullptr; } bool @@ -12514,7 +12514,7 @@ (g_arm_opcodes[i].variants & arm_isa) != 0) return &g_arm_opcodes[i]; } - return NULL; + return nullptr; } @@ -12839,7 +12839,7 @@ (g_thumb_opcodes[i].variants & arm_isa) != 0) return &g_thumb_opcodes[i]; } - return NULL; + return nullptr; } bool @@ -13449,14 +13449,14 @@ if (m_opcode_mode == eModeThumb && m_it_session.InITBlock()) m_it_session.ITAdvance(); - ARMOpcode *opcode_data = NULL; + ARMOpcode *opcode_data = nullptr; if (m_opcode_mode == eModeThumb) opcode_data = GetThumbOpcodeForInstruction (m_opcode.GetOpcode32(), m_arm_isa); else if (m_opcode_mode == eModeARM) opcode_data = GetARMOpcodeForInstruction (m_opcode.GetOpcode32(), m_arm_isa); - if (opcode_data == NULL) + if (opcode_data == nullptr) return false; const bool auto_advance_pc = evaluate_options & eEmulateInstructionOptionAutoAdvancePC; @@ -13528,7 +13528,7 @@ OptionValueSP value_sp = test_data->GetValueForKey (opcode_key); uint32_t test_opcode; - if ((value_sp.get() == NULL) || (value_sp->GetType() != OptionValue::eTypeUInt64)) + if ((value_sp.get() == nullptr) || (value_sp->GetType() != OptionValue::eTypeUInt64)) { out_stream->Printf ("TestEmulation: Error reading opcode from test file.\n"); return false; @@ -13559,7 +13559,7 @@ EmulationStateARM after_state; value_sp = test_data->GetValueForKey (before_key); - if ((value_sp.get() == NULL) || (value_sp->GetType() != OptionValue::eTypeDictionary)) + if ((value_sp.get() == nullptr) || (value_sp->GetType() != OptionValue::eTypeDictionary)) { out_stream->Printf ("TestEmulation: Failed to find 'before' state.\n"); return false; @@ -13573,7 +13573,7 @@ } value_sp = test_data->GetValueForKey (after_key); - if ((value_sp.get() == NULL) || (value_sp->GetType() != OptionValue::eTypeDictionary)) + if ((value_sp.get() == nullptr) || (value_sp->GetType() != OptionValue::eTypeDictionary)) { out_stream->Printf ("TestEmulation: Failed to find 'after' state.\n"); return false; Index: source/Plugins/Instruction/ARM/EmulationStateARM.cpp =================================================================== --- source/Plugins/Instruction/ARM/EmulationStateARM.cpp +++ source/Plugins/Instruction/ARM/EmulationStateARM.cpp @@ -328,7 +328,7 @@ // Load memory, if present. - if (value_sp.get() != NULL) + if (value_sp.get() != nullptr) { static ConstString address_key ("address"); static ConstString data_key ("data"); @@ -336,7 +336,7 @@ OptionValueDictionary *mem_dict = value_sp->GetAsDictionary(); value_sp = mem_dict->GetValueForKey (address_key); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) return false; else start_address = value_sp->GetUInt64Value (); @@ -352,7 +352,7 @@ for (uint32_t i = 0; i < num_elts; ++i) { value_sp = mem_array->GetValueAtIndex (i); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) return false; uint64_t value = value_sp->GetUInt64Value(); StoreToPseudoAddress (address, value, 4); @@ -361,7 +361,7 @@ } value_sp = test_data->GetValueForKey (registers_key); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) return false; @@ -376,7 +376,7 @@ sstr.Printf ("r%d", i); ConstString reg_name (sstr.GetData()); value_sp = reg_dict->GetValueForKey (reg_name); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) return false; uint64_t reg_value = value_sp->GetUInt64Value(); StorePseudoRegisterValue (dwarf_r0 + i, reg_value); @@ -384,7 +384,7 @@ static ConstString cpsr_name ("cpsr"); value_sp = reg_dict->GetValueForKey (cpsr_name); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) return false; StorePseudoRegisterValue (dwarf_cpsr, value_sp->GetUInt64Value()); @@ -395,7 +395,7 @@ sstr.Printf ("s%d", i); ConstString reg_name (sstr.GetData()); value_sp = reg_dict->GetValueForKey (reg_name); - if (value_sp.get() == NULL) + if (value_sp.get() == nullptr) return false; uint64_t reg_value = value_sp->GetUInt64Value(); StorePseudoRegisterValue (dwarf_s0 + i, reg_value); Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp =================================================================== --- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp +++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp @@ -178,7 +178,7 @@ } } - return NULL; + return nullptr; } bool @@ -206,7 +206,7 @@ case LLDB_REGNUM_GENERIC_FLAGS: // There is no DWARF register number for the CPSR right now... reg_info.name = "cpsr"; - reg_info.alt_name = NULL; + reg_info.alt_name = nullptr; reg_info.byte_size = 4; reg_info.byte_offset = 0; reg_info.encoding = eEncodingUint; @@ -267,7 +267,7 @@ if ((g_opcodes[i].mask & opcode) == g_opcodes[i].value) return &g_opcodes[i]; } - return NULL; + return nullptr; } bool @@ -293,7 +293,7 @@ { const uint32_t opcode = m_opcode.GetOpcode32(); Opcode *opcode_data = GetOpcodeForInstruction(opcode); - if (opcode_data == NULL) + if (opcode_data == nullptr) return false; //printf ("opcode template for 0x%8.8x: %s\n", opcode, opcode_data->name); Index: source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp =================================================================== --- source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +++ source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp @@ -40,7 +40,7 @@ { const bool check_cxx = true; const bool check_objc = false; - return in_value.GetClangType().IsPossibleDynamicType (NULL, check_cxx, check_objc); + return in_value.GetClangType().IsPossibleDynamicType (nullptr, check_cxx, check_objc); } bool @@ -104,7 +104,7 @@ { target->GetImages().ResolveSymbolContextForAddress (address_point_address, eSymbolContextSymbol, sc); Symbol *symbol = sc.symbol; - if (symbol != NULL) + if (symbol != nullptr) { const char *name = symbol->GetMangled().GetDemangledName().AsCString(); if (name && strstr(name, vtable_demangled_prefix) == name) @@ -271,7 +271,7 @@ bool ItaniumABILanguageRuntime::IsVTableName (const char *name) { - if (name == NULL) + if (name == nullptr) return false; // Can we maybe ask Clang about this? @@ -292,7 +292,7 @@ if (language == eLanguageTypeC_plus_plus) return new ItaniumABILanguageRuntime (process); else - return NULL; + return nullptr; } void @@ -401,7 +401,7 @@ { Target &target = m_process->GetTarget(); FileSpecList filter_modules; - BreakpointResolverSP exception_resolver_sp = CreateExceptionResolver (NULL, catch_bp, throw_bp, for_expressions); + BreakpointResolverSP exception_resolver_sp = CreateExceptionResolver (nullptr, catch_bp, throw_bp, for_expressions); SearchFilterSP filter_sp (CreateExceptionSearchFilter ()); const bool hardware = false; const bool resolve_indirect_functions = false; Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp @@ -111,10 +111,10 @@ // ret.SetContext(Value::eContextTypeClangType, return_clang_type); ret.SetClangType (return_clang_type); - if (exe_ctx.GetFramePtr() == NULL) + if (exe_ctx.GetFramePtr() == nullptr) { Thread *thread = exe_ctx.GetThreadPtr(); - if (thread == NULL) + if (thread == nullptr) { exe_ctx.SetThreadSP(process->GetThreadList().GetSelectedThread()); thread = exe_ctx.GetThreadPtr(); @@ -207,7 +207,7 @@ if ((!modules.FindSymbolsWithNameAndType(ConstString ("_NSPrintForDebugger"), eSymbolTypeCode, contexts)) && (!modules.FindSymbolsWithNameAndType(ConstString ("_CFPrintForDebugger"), eSymbolTypeCode, contexts))) - return NULL; + return nullptr; contexts.GetContextAtIndex(0, context); @@ -220,7 +220,7 @@ bool AppleObjCRuntime::CouldHaveDynamicValue (ValueObject &in_value) { - return in_value.GetClangType().IsPossibleDynamicType (NULL, + return in_value.GetClangType().IsPossibleDynamicType (nullptr, false, // do not check C++ true); // check ObjC } @@ -289,7 +289,7 @@ // Maybe check here and if we have a handler already, and the UUID of this module is the same as the one in the // current module, then we don't have to reread it? m_objc_trampoline_handler_ap.reset(new AppleObjCTrampolineHandler (m_process->shared_from_this(), module_sp)); - if (m_objc_trampoline_handler_ap.get() != NULL) + if (m_objc_trampoline_handler_ap.get() != nullptr) { m_read_objc_library = true; return true; Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h @@ -48,9 +48,9 @@ // v1 does not support tagged pointers virtual bool - GetTaggedPointerInfo (uint64_t* info_bits = NULL, - uint64_t* value_bits = NULL, - uint64_t* payload = NULL) + GetTaggedPointerInfo (uint64_t* info_bits = nullptr, + uint64_t* value_bits = nullptr, + uint64_t* payload = nullptr) { return false; } Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp @@ -80,10 +80,10 @@ if (AppleObjCRuntime::GetObjCVersion (process, objc_module_sp) == eAppleObjC_V1) return new AppleObjCRuntimeV1 (process); else - return NULL; + return nullptr; } else - return NULL; + return nullptr; } Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -351,7 +351,7 @@ m_tagged_pointer_vendor_ap(TaggedPointerVendor::CreateInstance(*this,objc_module_sp)) { static const ConstString g_gdb_object_getClass("gdb_object_getClass"); - m_has_object_getClass = (objc_module_sp->FindFirstSymbolWithNameAndType(g_gdb_object_getClass, eSymbolTypeCode) != NULL); + m_has_object_getClass = (objc_module_sp->FindFirstSymbolWithNameAndType(g_gdb_object_getClass, eSymbolTypeCode) != nullptr); } AppleObjCRuntimeV2::~AppleObjCRuntimeV2() @@ -366,7 +366,7 @@ { // The Runtime is attached to a particular process, you shouldn't pass in a value from another process. assert (in_value.GetProcessSP().get() == m_process); - assert (m_process != NULL); + assert (m_process != nullptr); class_type_or_name.Clear(); @@ -425,10 +425,10 @@ if (AppleObjCRuntime::GetObjCVersion (process, objc_module_sp) == eAppleObjC_V2) return new AppleObjCRuntimeV2 (process, objc_module_sp); else - return NULL; + return nullptr; } else - return NULL; + return nullptr; } void @@ -567,7 +567,7 @@ SymbolContext ivar_offset_symbol; if (sc_list.GetSize() != 1 || !sc_list.GetContextAtIndex(0, ivar_offset_symbol) - || ivar_offset_symbol.symbol == NULL) + || ivar_offset_symbol.symbol == nullptr) return LLDB_INVALID_IVAR_OFFSET; addr_t ivar_offset_address = ivar_offset_symbol.symbol->GetAddress().GetLoadAddress (&target); @@ -601,7 +601,7 @@ m_count (0), m_num_buckets_minus_one (0), m_buckets_ptr (LLDB_INVALID_ADDRESS), - m_process (NULL), + m_process (nullptr), m_end_iterator (*this, -1), m_load_addr (LLDB_INVALID_ADDRESS), m_map_pair_size (0), @@ -919,9 +919,9 @@ // a custom descriptor is used for tagged pointers virtual bool - GetTaggedPointerInfo (uint64_t* info_bits = NULL, - uint64_t* value_bits = NULL, - uint64_t* payload = NULL) + GetTaggedPointerInfo (uint64_t* info_bits = nullptr, + uint64_t* value_bits = nullptr, + uint64_t* payload = nullptr) { return false; } @@ -1001,7 +1001,7 @@ if (class_method_func) { - ClassDescriptorV2 metaclass(m_runtime, objc_class->m_isa, NULL); // The metaclass is not in the cache + ClassDescriptorV2 metaclass(m_runtime, objc_class->m_isa, nullptr); // The metaclass is not in the cache // We don't care about the metaclass's superclass, or its class methods. Its instance methods are // our class methods. @@ -1548,9 +1548,9 @@ } virtual bool - GetTaggedPointerInfo (uint64_t* info_bits = NULL, - uint64_t* value_bits = NULL, - uint64_t* payload = NULL) + GetTaggedPointerInfo (uint64_t* info_bits = nullptr, + uint64_t* value_bits = nullptr, + uint64_t* payload = nullptr) { if (info_bits) *info_bits = GetInfoBits(); @@ -1694,7 +1694,7 @@ { Process *process = GetProcess(); - if (process == NULL) + if (process == nullptr) return false; Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS)); @@ -1776,7 +1776,7 @@ arguments, "objc-v2-isa-to-descriptor")); - if (m_get_class_info_function.get() == NULL) + if (m_get_class_info_function.get() == nullptr) return false; errors.Clear(); @@ -1926,7 +1926,7 @@ { // Read the 32 bit hash for the class name const uint32_t name_hash = data.GetU32(&offset); - ClassDescriptorSP descriptor_sp (new ClassDescriptorV2(*this, isa, NULL)); + ClassDescriptorSP descriptor_sp (new ClassDescriptorV2(*this, isa, nullptr)); AddClass (isa, descriptor_sp, name_hash); if (log && log->GetVerbose()) log->Printf("AppleObjCRuntimeV2 added isa=0x%" PRIx64 ", hash=0x%8.8x", isa, name_hash); @@ -1939,7 +1939,7 @@ { Process *process = GetProcess(); - if (process == NULL) + if (process == nullptr) return false; Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS)); @@ -2026,7 +2026,7 @@ arguments, "objc-isa-to-descriptor-shared-cache")); - if (m_get_shared_cache_class_info_function.get() == NULL) + if (m_get_shared_cache_class_info_function.get() == nullptr) return false; errors.Clear(); @@ -2153,7 +2153,7 @@ Process *process = GetProcess(); - if (process == NULL) + if (process == nullptr) return false; uint32_t num_map_table_isas = 0; @@ -2374,21 +2374,21 @@ objc_module_sp, error); if (error.Fail()) - return NULL; + return nullptr; auto objc_debug_isa_magic_value = ExtractRuntimeGlobalSymbol(process, ConstString("objc_debug_isa_magic_value"), objc_module_sp, error); if (error.Fail()) - return NULL; + return nullptr; auto objc_debug_isa_class_mask = ExtractRuntimeGlobalSymbol(process, ConstString("objc_debug_isa_class_mask"), objc_module_sp, error); if (error.Fail()) - return NULL; + return nullptr; // we might want to have some rules to outlaw these other values (e.g if the mask is zero but the value is non-zero, ...) Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h @@ -98,7 +98,7 @@ public: VTableRegion() : m_valid (false), - m_owner (NULL), + m_owner (nullptr), m_header_addr (LLDB_INVALID_ADDRESS), m_code_start_addr(0), m_code_end_addr (0), Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp @@ -44,7 +44,7 @@ using namespace lldb_private; const char *AppleObjCTrampolineHandler::g_lookup_implementation_function_name = "__lldb_objc_find_implementation_for_selector"; -const char *AppleObjCTrampolineHandler::g_lookup_implementation_function_code = NULL; +const char *AppleObjCTrampolineHandler::g_lookup_implementation_function_code = nullptr; const char *AppleObjCTrampolineHandler::g_lookup_implementation_with_stret_function_code = " \n\ extern \"C\" \n\ { \n\ @@ -458,7 +458,7 @@ ConstString trampoline_name ("gdb_objc_trampolines"); const Symbol *trampoline_symbol = m_objc_module_sp->FindFirstSymbolWithNameAndType (trampoline_name, eSymbolTypeData); - if (trampoline_symbol != NULL) + if (trampoline_symbol != nullptr) { if (!trampoline_symbol->GetAddress().IsValid()) return false; @@ -471,7 +471,7 @@ ConstString changed_name ("gdb_objc_trampolines_changed"); const Symbol *changed_symbol = m_objc_module_sp->FindFirstSymbolWithNameAndType (changed_name, eSymbolTypeCode); - if (changed_symbol != NULL) + if (changed_symbol != nullptr) { if (!changed_symbol->GetAddress().IsValid()) return false; @@ -530,7 +530,7 @@ error = argument_values.GetValueAtIndex(0)->GetValueAsData (&exe_ctx, data, 0, - NULL); + nullptr); lldb::offset_t offset = 0; lldb::addr_t region_addr = data.GetPointer(&offset); @@ -643,7 +643,7 @@ ConstString msg_forward_name("_objc_msgForward"); ConstString msg_forward_stret_name("_objc_msgForward_stret"); - Target *target = m_process_sp ? &m_process_sp->GetTarget() : NULL; + Target *target = m_process_sp ? &m_process_sp->GetTarget() : nullptr; const Symbol *class_getMethodImplementation = m_objc_module_sp->FindFirstSymbolWithNameAndType (get_impl_name, eSymbolTypeCode); const Symbol *class_getMethodImplementation_stret = m_objc_module_sp->FindFirstSymbolWithNameAndType (get_impl_stret_name, eSymbolTypeCode); const Symbol *msg_forward = m_objc_module_sp->FindFirstSymbolWithNameAndType (msg_forward_name, eSymbolTypeCode); @@ -739,7 +739,7 @@ { SymbolContext sc; sc_list.GetContextAtIndex(0, sc); - if (sc.symbol != NULL) + if (sc.symbol != nullptr) impl_code_address = sc.symbol->GetAddress(); //lldb::addr_t addr = impl_code_address.GetOpcodeLoadAddress (exe_ctx.GetTargetPtr()); @@ -753,7 +753,7 @@ } else if (!m_impl_code.get()) { - if (g_lookup_implementation_function_code != NULL) + if (g_lookup_implementation_function_code != nullptr) { m_impl_code.reset (new ClangUtilityFunction (g_lookup_implementation_function_code, g_lookup_implementation_function_name)); @@ -877,11 +877,11 @@ lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0); - const ABI *abi = NULL; + const ABI *abi = nullptr; ProcessSP process_sp (thread.CalculateProcess()); if (process_sp) abi = process_sp->GetABI().get(); - if (abi == NULL) + if (abi == nullptr) return ret_plan_sp; TargetSP target_sp (thread.CalculateTarget()); @@ -1033,7 +1033,7 @@ isa_addr, sel_addr); } ObjCLanguageRuntime *objc_runtime = m_process_sp->GetObjCLanguageRuntime (); - assert(objc_runtime != NULL); + assert(objc_runtime != nullptr); impl_addr = objc_runtime->LookupInMethodCache (isa_addr, sel_addr); } Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp @@ -184,7 +184,7 @@ ObjCLanguageRuntime::ClassDescriptorSP descriptor = m_runtime.GetClassDescriptorFromISA(isa); if (!descriptor) - return NULL; + return nullptr; const ConstString &name(descriptor->GetClassName()); @@ -194,7 +194,7 @@ ast_ctx->getTranslationUnitDecl(), clang::SourceLocation(), &identifier_info, - NULL); + nullptr); ClangASTMetadata meta_data; meta_data.SetISAPtr(isa); @@ -221,7 +221,7 @@ InType, InPos } state = Start; - const char *type = NULL; + const char *type = nullptr; int brace_depth = 0; uint32_t stepsLeft = 256; @@ -275,7 +275,7 @@ m_is_valid = false; return; } - type = NULL; + type = nullptr; } else { @@ -326,7 +326,7 @@ clang::ObjCMethodDecl *BuildMethod (clang::ObjCInterfaceDecl *interface_decl, const char *name, bool instance) { if (!m_is_valid || m_type_vector.size() < 3) - return NULL; + return nullptr; clang::ASTContext &ast_ctx(interface_decl->getASTContext()); @@ -366,14 +366,14 @@ clang::QualType ret_type = BuildType(ast_ctx, m_type_vector[0].c_str()); if (ret_type.isNull()) - return NULL; + return nullptr; clang::ObjCMethodDecl *ret = clang::ObjCMethodDecl::Create(ast_ctx, clang::SourceLocation(), clang::SourceLocation(), sel, ret_type, - NULL, + nullptr, interface_decl, isInstance, isVariadic, @@ -392,17 +392,17 @@ clang::QualType arg_type = BuildType(ast_ctx, m_type_vector[ai].c_str()); if (arg_type.isNull()) - return NULL; // well, we just wasted a bunch of time. Wish we could delete the stuff we'd just made! + return nullptr; // well, we just wasted a bunch of time. Wish we could delete the stuff we'd just made! parm_vars.push_back(clang::ParmVarDecl::Create(ast_ctx, ret, clang::SourceLocation(), clang::SourceLocation(), - NULL, + nullptr, arg_type, - NULL, + nullptr, clang::SC_None, - NULL)); + nullptr)); } ret->setMethodParams(ast_ctx, llvm::ArrayRef(parm_vars), llvm::ArrayRef()); Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp @@ -49,7 +49,7 @@ m_input_values (input_values), m_isa_addr(isa_addr), m_sel_addr(sel_addr), - m_impl_function (NULL), + m_impl_function (nullptr), m_stop_others (stop_others) { @@ -205,7 +205,7 @@ log->Printf("Running to ObjC method implementation: 0x%" PRIx64, target_addr); ObjCLanguageRuntime *objc_runtime = GetThread().GetProcess()->GetObjCLanguageRuntime(); - assert (objc_runtime != NULL); + assert (objc_runtime != nullptr); objc_runtime->AddToMethodCache (m_isa_addr, m_sel_addr, target_addr); if (log) log->Printf("Adding {isa-addr=0x%" PRIx64 ", sel-addr=0x%" PRIx64 "} = addr=0x%" PRIx64 " to cache.", m_isa_addr, m_sel_addr, target_addr); Index: source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h =================================================================== --- source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h +++ source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h @@ -164,7 +164,7 @@ { if (idx < m_objects.size()) return &m_objects[idx]; - return NULL; + return nullptr; } size_t Index: source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp =================================================================== --- source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -192,7 +192,7 @@ return &m_objects[match->value]; } } - return NULL; + return nullptr; } @@ -388,7 +388,7 @@ } } } - return NULL; + return nullptr; } @@ -435,7 +435,7 @@ bool ObjectContainerBSDArchive::ParseHeader () { - if (m_archive_sp.get() == NULL) + if (m_archive_sp.get() == nullptr) { if (m_data.GetByteSize() > 0) { @@ -453,7 +453,7 @@ m_data.Clear(); } } - return m_archive_sp.get() != NULL; + return m_archive_sp.get() != nullptr; } void Index: source/Plugins/ObjectFile/ELF/ELFHeader.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ELFHeader.cpp +++ source/Plugins/ObjectFile/ELF/ELFHeader.cpp @@ -108,7 +108,7 @@ ELFHeader::Parse(lldb_private::DataExtractor &data, lldb::offset_t *offset) { // Read e_ident. This provides byte order and address size info. - if (data.GetU8(offset, &e_ident, EI_NIDENT) == NULL) + if (data.GetU8(offset, &e_ident, EI_NIDENT) == nullptr) return false; const unsigned byte_size = Is32Bit() ? 4 : 8; @@ -116,11 +116,11 @@ data.SetAddressByteSize(byte_size); // Read e_type and e_machine. - if (data.GetU16(offset, &e_type, 2) == NULL) + if (data.GetU16(offset, &e_type, 2) == nullptr) return false; // Read e_version. - if (data.GetU32(offset, &e_version, 1) == NULL) + if (data.GetU32(offset, &e_version, 1) == nullptr) return false; // Read e_entry, e_phoff and e_shoff. @@ -128,12 +128,12 @@ return false; // Read e_flags. - if (data.GetU32(offset, &e_flags, 1) == NULL) + if (data.GetU32(offset, &e_flags, 1) == nullptr) return false; // Read e_ehsize, e_phentsize, e_phnum, e_shentsize, e_shnum and // e_shstrndx. - if (data.GetU16(offset, &e_ehsize, 6) == NULL) + if (data.GetU16(offset, &e_ehsize, 6) == nullptr) return false; return true; @@ -203,7 +203,7 @@ const unsigned byte_size = data.GetAddressByteSize(); // Read sh_name and sh_type. - if (data.GetU32(offset, &sh_name, 2) == NULL) + if (data.GetU32(offset, &sh_name, 2) == nullptr) return false; // Read sh_flags. @@ -215,7 +215,7 @@ return false; // Read sh_link and sh_info. - if (data.GetU32(offset, &sh_link, 2) == NULL) + if (data.GetU32(offset, &sh_link, 2) == nullptr) return false; // Read sh_addralign and sh_entsize. @@ -324,7 +324,7 @@ const bool parsing_32 = byte_size == 4; // Read st_name. - if (data.GetU32(offset, &st_name, 1) == NULL) + if (data.GetU32(offset, &st_name, 1) == nullptr) return false; if (parsing_32) @@ -334,25 +334,25 @@ return false; // Read st_info and st_other. - if (data.GetU8(offset, &st_info, 2) == NULL) + if (data.GetU8(offset, &st_info, 2) == nullptr) return false; // Read st_shndx. - if (data.GetU16(offset, &st_shndx, 1) == NULL) + if (data.GetU16(offset, &st_shndx, 1) == nullptr) return false; } else { // Read st_info and st_other. - if (data.GetU8(offset, &st_info, 2) == NULL) + if (data.GetU8(offset, &st_info, 2) == nullptr) return false; // Read st_shndx. - if (data.GetU16(offset, &st_shndx, 1) == NULL) + if (data.GetU16(offset, &st_shndx, 1) == nullptr) return false; // Read st_value and st_size. - if (data.GetU64(offset, &st_value, 2) == NULL) + if (data.GetU64(offset, &st_value, 2) == nullptr) return false; } return true; @@ -374,7 +374,7 @@ const bool parsing_32 = byte_size == 4; // Read p_type; - if (data.GetU32(offset, &p_type, 1) == NULL) + if (data.GetU32(offset, &p_type, 1) == nullptr) return false; if (parsing_32) { @@ -383,7 +383,7 @@ return false; // Read p_flags. - if (data.GetU32(offset, &p_flags, 1) == NULL) + if (data.GetU32(offset, &p_flags, 1) == nullptr) return false; // Read p_align. @@ -392,7 +392,7 @@ } else { // Read p_flags. - if (data.GetU32(offset, &p_flags, 1) == NULL) + if (data.GetU32(offset, &p_flags, 1) == nullptr) return false; // Read p_offset, p_vaddr, p_paddr, p_filesz, p_memsz and p_align. Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -99,7 +99,7 @@ reloc = new ELFRela(); else { assert(false && "unexpected relocation type"); - reloc = static_cast(NULL); + reloc = static_cast(nullptr); } } @@ -198,7 +198,7 @@ ELFNote::Parse(const DataExtractor &data, lldb::offset_t *offset) { // Read all fields. - if (data.GetU32(offset, &n_namesz, 3) == NULL) + if (data.GetU32(offset, &n_namesz, 3) == nullptr) return false; // The name field is required to be nul-terminated, and n_namesz @@ -220,7 +220,7 @@ } const char *cstr = data.GetCStr(offset, llvm::RoundUpToAlignment (n_namesz, 4)); - if (cstr == NULL) + if (cstr == nullptr) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SYMBOLS)); if (log) @@ -304,7 +304,7 @@ } } } - return NULL; + return nullptr; } @@ -330,7 +330,7 @@ } } } - return NULL; + return nullptr; } bool @@ -981,7 +981,7 @@ (note.n_descsz == 16 || note.n_descsz == 20)) { uint8_t uuidbuf[20]; - if (data.GetU8 (&offset, &uuidbuf, note.n_descsz) == NULL) + if (data.GetU8 (&offset, &uuidbuf, note.n_descsz) == nullptr) return false; uuid.SetBytes (uuidbuf, note.n_descsz); return true; @@ -1090,19 +1090,19 @@ ObjectFileELF::GetProgramHeaderByIndex(lldb::user_id_t id) { if (!id || !ParseProgramHeaders()) - return NULL; + return nullptr; if (--id < m_program_headers.size()) return &m_program_headers[id]; - return NULL; + return nullptr; } DataExtractor ObjectFileELF::GetSegmentDataByIndex(lldb::user_id_t id) { const elf::ELFProgramHeader *segment_header = GetProgramHeaderByIndex(id); - if (segment_header == NULL) + if (segment_header == nullptr) return DataExtractor(); return DataExtractor(m_data, segment_header->p_offset, segment_header->p_filesz); } @@ -1120,12 +1120,12 @@ ObjectFileELF::GetSectionHeaderByIndex(lldb::user_id_t id) { if (!id || !ParseSectionHeaders()) - return NULL; + return nullptr; if (--id < m_section_headers.size()) return &m_section_headers[id]; - return NULL; + return nullptr; } void @@ -1320,7 +1320,7 @@ // No need to add non-section symbols that have no names if (symbol.getType() != STT_SECTION && - (symbol_name == NULL || symbol_name[0] == '\0')) + (symbol_name == nullptr || symbol_name[0] == '\0')) continue; //symbol.Dump (&strm, i, &strtab_data, section_list); @@ -1540,7 +1540,7 @@ ObjectFileELF::FindDynamicSymbol(unsigned tag) { if (!ParseDynamicSymbols()) - return NULL; + return nullptr; DynamicSymbolCollIter I = m_dynamic_symbols.begin(); DynamicSymbolCollIter E = m_dynamic_symbols.end(); @@ -1552,7 +1552,7 @@ return symbol; } - return NULL; + return nullptr; } unsigned @@ -1755,7 +1755,7 @@ if (rel.Parse(rel_data, &offset) == false) break; - Symbol* symbol = NULL; + Symbol* symbol = nullptr; if (hdr->Is32Bit()) { @@ -1861,7 +1861,7 @@ { ModuleSP module_sp(GetModule()); if (!module_sp) - return NULL; + return nullptr; // We always want to use the main object file so we (hopefully) only have one cached copy // of our symtab, dynamic sections, etc. @@ -1869,11 +1869,11 @@ if (module_obj_file && module_obj_file != this) return module_obj_file->GetSymtab(); - if (m_symtab_ap.get() == NULL) + if (m_symtab_ap.get() == nullptr) { SectionList *section_list = GetSectionList(); if (!section_list) - return NULL; + return nullptr; uint64_t symbol_id = 0; lldb_private::Mutex::Locker locker(module_sp->GetMutex()); @@ -2015,10 +2015,10 @@ s->EOL(); SectionList *section_list = GetSectionList(); if (section_list) - section_list->Dump(s, NULL, true, UINT32_MAX); + section_list->Dump(s, nullptr, true, UINT32_MAX); Symtab *symtab = GetSymtab(); if (symtab) - symtab->Dump(s, NULL, eSortOrderNone); + symtab->Dump(s, nullptr, eSortOrderNone); s->EOL(); DumpDependentModules(s); s->EOL(); Index: source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp =================================================================== --- source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp +++ source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp @@ -83,7 +83,7 @@ { // JIT'ed object file is backed by the ObjectFileJITDelegate, never // read from a file - return NULL; + return nullptr; } ObjectFile * @@ -94,7 +94,7 @@ { // JIT'ed object file is backed by the ObjectFileJITDelegate, never // read from memory - return NULL; + return nullptr; } size_t @@ -111,7 +111,7 @@ ObjectFileJIT::ObjectFileJIT (const lldb::ModuleSP &module_sp, const ObjectFileJITDelegateSP &delegate_sp) : - ObjectFile(module_sp, NULL, 0, 0, DataBufferSP(), 0), + ObjectFile(module_sp, nullptr, 0, 0, DataBufferSP(), 0), m_delegate_wp () { if (delegate_sp) @@ -160,7 +160,7 @@ if (module_sp) { lldb_private::Mutex::Locker locker(module_sp->GetMutex()); - if (m_symtab_ap.get() == NULL) + if (m_symtab_ap.get() == nullptr) { m_symtab_ap.reset(new Symtab(this)); Mutex::Locker symtab_locker (m_symtab_ap->GetMutex()); @@ -214,10 +214,10 @@ SectionList *sections = GetSectionList(); if (sections) - sections->Dump(s, NULL, true, UINT32_MAX); + sections->Dump(s, nullptr, true, UINT32_MAX); if (m_symtab_ap.get()) - m_symtab_ap->Dump(s, NULL, eSortOrderNone); + m_symtab_ap->Dump(s, nullptr, eSortOrderNone); } } Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp =================================================================== --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -89,7 +89,7 @@ if (objfile_ap.get() && objfile_ap->ParseHeader()) return objfile_ap.release(); } - return NULL; + return nullptr; } ObjectFile * @@ -98,7 +98,7 @@ const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) { - return NULL; + return nullptr; } size_t @@ -476,7 +476,7 @@ { if (sect.name[0] == '/') { - lldb::offset_t stroff = strtoul(§.name[1], NULL, 10); + lldb::offset_t stroff = strtoul(§.name[1], nullptr, 10); lldb::offset_t string_file_offset = m_coff_header.symoff + (m_coff_header.nsyms * 18) + stroff; const char *name = m_data.GetCStr (&string_file_offset); if (name) @@ -501,7 +501,7 @@ if (module_sp) { lldb_private::Mutex::Locker locker(module_sp->GetMutex()); - if (m_symtab_ap.get() == NULL) + if (m_symtab_ap.get() == nullptr) { SectionList *sect_list = GetSectionList(); m_symtab_ap.reset(new Symtab(this)); @@ -534,7 +534,7 @@ { coff_symbol_t symbol; const uint32_t symbol_offset = offset; - const char *symbol_name_cstr = NULL; + const char *symbol_name_cstr = nullptr; // If the first 4 bytes of the symbol string are zero, then we // it is followed by a 4 byte string table offset. Else these // 8 bytes contain the symbol name @@ -551,7 +551,7 @@ // Short string that fits into the symbol table name which is 8 bytes offset += sizeof(symbol.name) - 4; // Skip remaining symbol_name_cstr = symtab_data.PeekCStr (symbol_offset); - if (symbol_name_cstr == NULL) + if (symbol_name_cstr == nullptr) break; symbol_name.assign (symbol_name_cstr, sizeof(symbol.name)); } @@ -801,10 +801,10 @@ SectionList *sections = GetSectionList(); if (sections) - sections->Dump(s, NULL, true, UINT32_MAX); + sections->Dump(s, nullptr, true, UINT32_MAX); if (m_symtab_ap.get()) - m_symtab_ap->Dump(s, NULL, eSortOrderNone); + m_symtab_ap->Dump(s, nullptr, eSortOrderNone); if (m_dos_header.e_magic) DumpDOSHeader (s, m_dos_header); Index: source/Plugins/OperatingSystem/Python/OperatingSystemPython.h =================================================================== --- source/Plugins/OperatingSystem/Python/OperatingSystemPython.h +++ source/Plugins/OperatingSystem/Python/OperatingSystemPython.h @@ -86,7 +86,7 @@ bool IsValid() const { - return m_python_object_sp && m_python_object_sp->GetObject() != NULL; + return m_python_object_sp && m_python_object_sp->GetObject() != nullptr; } lldb::ThreadSP Index: source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp =================================================================== --- source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -66,7 +66,7 @@ if (os_ap.get() && os_ap->IsValid()) return os_ap.release(); } - return NULL; + return nullptr; } @@ -88,7 +88,7 @@ OperatingSystem (process), m_thread_list_valobj_sp (), m_register_info_ap (), - m_interpreter (NULL), + m_interpreter (nullptr), m_python_object_sp () { if (!process) @@ -131,10 +131,10 @@ DynamicRegisterInfo * OperatingSystemPython::GetDynamicRegisterInfo () { - if (m_register_info_ap.get() == NULL) + if (m_register_info_ap.get() == nullptr) { if (!m_interpreter || !m_python_object_sp) - return NULL; + return nullptr; Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OS)); if (log) @@ -142,7 +142,7 @@ PythonDictionary dictionary(m_interpreter->OSPlugin_RegisterInfo(m_python_object_sp)); if (!dictionary) - return NULL; + return nullptr; m_register_info_ap.reset (new DynamicRegisterInfo (dictionary, m_process->GetTarget().GetArchitecture().GetByteOrder())); assert (m_register_info_ap->GetNumRegisters() > 0); @@ -214,7 +214,7 @@ PythonDictionary thread_dict(threads_list.GetItemAtIndex(i)); if (thread_dict) { - ThreadSP thread_sp (CreateThreadFromThreadInfo (thread_dict, core_thread_list, old_thread_list, core_used_map, NULL)); + ThreadSP thread_sp (CreateThreadFromThreadInfo (thread_dict, core_thread_list, old_thread_list, core_used_map, nullptr)); if (thread_sp) new_thread_list.AddThread(thread_sp); } Index: source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp =================================================================== --- source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp +++ source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp @@ -84,7 +84,7 @@ } if (create) return new PlatformFreeBSD (is_host); - return NULL; + return nullptr; } @@ -246,10 +246,10 @@ error = ModuleList::GetSharedModule (module_spec, exe_module_sp, module_search_paths_ptr, - NULL, - NULL); + nullptr, + nullptr); - if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL) + if (!exe_module_sp || exe_module_sp->GetObjectFile() == nullptr) { exe_module_sp.reset(); error.SetErrorStringWithFormat ("'%s' doesn't contain the architecture %s", @@ -269,8 +269,8 @@ error = ModuleList::GetSharedModule (module_spec, exe_module_sp, module_search_paths_ptr, - NULL, - NULL); + nullptr, + nullptr); // Did we find an executable using one of the if (error.Success()) { @@ -302,7 +302,7 @@ PlatformFreeBSD::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite *bp_site) { ArchSpec arch = target.GetArchitecture(); - const uint8_t *trap_opcode = NULL; + const uint8_t *trap_opcode = nullptr; size_t trap_opcode_size = 0; switch (arch.GetMachine()) @@ -372,7 +372,7 @@ if (m_remote_platform_sp) return m_remote_platform_sp->GetHostname (); - return NULL; + return nullptr; } bool @@ -505,13 +505,13 @@ lldb::ProcessSP process_sp; if (IsHost()) { - if (target == NULL) + if (target == nullptr) { TargetSP new_target_sp; ArchSpec emptyArchSpec; error = debugger.GetTargetList().CreateTarget (debugger, - NULL, + nullptr, emptyArchSpec, false, m_remote_platform_sp, @@ -527,7 +527,7 @@ // The freebsd always currently uses the GDB remote debugger plug-in // so even when debugging locally we are debugging remotely! // Just like the darwin plugin. - process_sp = target->CreateProcess (listener, "gdb-remote", NULL); + process_sp = target->CreateProcess (listener, "gdb-remote", nullptr); if (process_sp) error = process_sp->Attach (attach_info); @@ -553,7 +553,7 @@ if (IsRemote() && m_remote_platform_sp) return m_remote_platform_sp->GetUserName(uid); - return NULL; + return nullptr; } const char * @@ -565,7 +565,7 @@ if (IsRemote() && m_remote_platform_sp) return m_remote_platform_sp->GetGroupName(gid); - return NULL; + return nullptr; } Index: source/Plugins/Platform/Linux/PlatformLinux.cpp =================================================================== --- source/Plugins/Platform/Linux/PlatformLinux.cpp +++ source/Plugins/Platform/Linux/PlatformLinux.cpp @@ -86,7 +86,7 @@ } if (create) return new PlatformLinux(false); - return NULL; + return nullptr; } @@ -188,7 +188,7 @@ error = m_remote_platform_sp->ResolveExecutable (exe_file, exe_arch, exe_module_sp, - NULL); + nullptr); } else { @@ -208,9 +208,9 @@ { error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); if (error.Fail()) { // If we failed, it may be because the vendor and os aren't known. If that is the @@ -229,14 +229,14 @@ error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); } } // TODO find out why exe_module_sp might be NULL - if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL) + if (!exe_module_sp || exe_module_sp->GetObjectFile() == nullptr) { exe_module_sp.reset(); error.SetErrorStringWithFormat ("'%s' doesn't contain the architecture %s", @@ -254,9 +254,9 @@ { error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); // Did we find an executable using one of the if (error.Success()) { @@ -379,7 +379,7 @@ BreakpointSite *bp_site) { ArchSpec arch = target.GetArchitecture(); - const uint8_t *trap_opcode = NULL; + const uint8_t *trap_opcode = nullptr; size_t trap_opcode_size = 0; switch (arch.GetMachine()) @@ -444,13 +444,13 @@ lldb::ProcessSP process_sp; if (IsHost()) { - if (target == NULL) + if (target == nullptr) { TargetSP new_target_sp; ArchSpec emptyArchSpec; error = debugger.GetTargetList().CreateTarget (debugger, - NULL, + nullptr, emptyArchSpec, false, m_remote_platform_sp, @@ -466,7 +466,7 @@ process_sp = target->CreateProcess (listener, attach_info.GetProcessPluginName(), - NULL); + nullptr); if (process_sp) error = process_sp->Attach (attach_info); Index: source/Plugins/Platform/MacOSX/PlatformDarwin.cpp =================================================================== --- source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -190,10 +190,10 @@ error = ModuleList::GetSharedModule (module_spec, exe_module_sp, module_search_paths_ptr, - NULL, - NULL); + nullptr, + nullptr); - if (error.Fail() || exe_module_sp.get() == NULL || exe_module_sp->GetObjectFile() == NULL) + if (error.Fail() || exe_module_sp.get() == nullptr || exe_module_sp->GetObjectFile() == nullptr) { exe_module_sp.reset(); error.SetErrorStringWithFormat ("'%s' doesn't contain the architecture %s", @@ -212,8 +212,8 @@ error = GetSharedModule (module_spec, exe_module_sp, module_search_paths_ptr, - NULL, - NULL); + nullptr, + nullptr); // Did we find an executable using one of the if (error.Success()) { @@ -461,7 +461,7 @@ { Error new_error (Platform::GetSharedModule (new_module_spec, module_sp, - NULL, + nullptr, old_module_sp_ptr, did_create_ptr)); @@ -490,7 +490,7 @@ new_module_spec.GetFileSpec() = new_file_spec; Error new_error (Platform::GetSharedModule (new_module_spec, module_sp, - NULL, + nullptr, old_module_sp_ptr, did_create_ptr)); @@ -514,7 +514,7 @@ size_t PlatformDarwin::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite *bp_site) { - const uint8_t *trap_opcode = NULL; + const uint8_t *trap_opcode = nullptr; uint32_t trap_opcode_size = 0; bool bp_is_thumb = false; @@ -635,7 +635,7 @@ if (m_remote_platform_sp) return m_remote_platform_sp->GetHostname (); - return NULL; + return nullptr; } bool @@ -814,15 +814,15 @@ if (IsHost()) { - if (target == NULL) + if (target == nullptr) { TargetSP new_target_sp; error = debugger.GetTargetList().CreateTarget (debugger, - NULL, - NULL, + nullptr, + nullptr, false, - NULL, + nullptr, new_target_sp); target = new_target_sp.get(); } @@ -833,7 +833,7 @@ { debugger.GetTargetList().SetSelectedTarget(target); - process_sp = target->CreateProcess (listener, attach_info.GetProcessPluginName(), NULL); + process_sp = target->CreateProcess (listener, attach_info.GetProcessPluginName(), nullptr); if (process_sp) { @@ -864,7 +864,7 @@ if (IsRemote() && m_remote_platform_sp) return m_remote_platform_sp->GetUserName(uid); - return NULL; + return nullptr; } const char * @@ -876,7 +876,7 @@ if (IsRemote() && m_remote_platform_sp) return m_remote_platform_sp->GetGroupName(gid); - return NULL; + return nullptr; } bool @@ -1238,7 +1238,7 @@ xcode_dir_path.append (xcode_select_prefix_dir); xcode_dir_path.append ("/usr/share/xcode-select/xcode_dir_path"); temp_file_spec.SetFile(xcode_dir_path.c_str(), false); - size_t bytes_read = temp_file_spec.ReadFileContents(0, developer_dir_path, sizeof(developer_dir_path), NULL); + size_t bytes_read = temp_file_spec.ReadFileContents(0, developer_dir_path, sizeof(developer_dir_path), nullptr); if (bytes_read > 0) { developer_dir_path[bytes_read] = '\0'; @@ -1258,12 +1258,12 @@ int signo = -1; std::string command_output; Error error = Host::RunShellCommand ("/usr/bin/xcode-select --print-path", - NULL, // current working directory + nullptr, // current working directory &exit_status, &signo, &command_output, 2, // short timeout - NULL); // don't run in a shell + nullptr); // don't run in a shell if (error.Success() && exit_status == 0 && !command_output.empty()) { const char *cmd_output_ptr = command_output.c_str(); @@ -1305,7 +1305,7 @@ assert (m_developer_directory.empty() == false); if (m_developer_directory[0]) return m_developer_directory.c_str(); - return NULL; + return nullptr; } @@ -1337,7 +1337,7 @@ bool hardware = false; LazyBool skip_prologue = eLazyBoolNo; bp_sp = target.CreateBreakpoint (&bp_modules, - NULL, + nullptr, g_bp_names, sizeof(g_bp_names)/sizeof(const char *), eFunctionNameTypeFull, @@ -1365,11 +1365,11 @@ PlatformDarwin::GetResumeCountForLaunchInfo (ProcessLaunchInfo &launch_info) { const char *shell = launch_info.GetShell(); - if (shell == NULL) + if (shell == nullptr) return 1; const char *shell_name = strrchr (shell, '/'); - if (shell_name == NULL) + if (shell_name == nullptr) shell_name = shell; else shell_name++; @@ -1380,9 +1380,9 @@ // But it only does this if the COMMAND_MODE environment variable // is set to "legacy". char * const *envp = (char * const*)launch_info.GetEnvironmentEntries().GetConstArgumentVector(); - if (envp != NULL) + if (envp != nullptr) { - for (int i = 0; envp[i] != NULL; i++) + for (int i = 0; envp[i] != nullptr; i++) { if (strcmp (envp[i], "COMMAND_MODE=legacy" ) == 0) return 2; Index: source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp =================================================================== --- source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp +++ source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp @@ -122,7 +122,7 @@ } if (create) return new PlatformMacOSX (is_host); - return NULL; + return nullptr; } lldb_private::ConstString @@ -201,7 +201,7 @@ std::string output; const char *command = "xcrun -sdk macosx --show-sdk-path"; lldb_private::Error error = RunShellCommand (command, // shell command to run - NULL, // current working directory + nullptr, // current working directory &status, // Put the exit status of the process in here &signo, // Put the signal that caused the process to exit in here &output, // Get the output from the command and place it in this string @@ -333,7 +333,7 @@ if (module_spec.GetArchitecture().GetCore() == ArchSpec::eCore_x86_64_x86_64h) { ObjectFile *objfile = module_sp->GetObjectFile(); - if (objfile == NULL) + if (objfile == nullptr) { // We didn't find an x86_64h slice, fall back to a x86_64 slice ModuleSpec module_spec_x86_64 (module_spec); Index: source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp =================================================================== --- source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp +++ source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp @@ -145,7 +145,7 @@ if (create) return new PlatformRemoteiOS (); - return NULL; + return nullptr; } @@ -236,9 +236,9 @@ ModuleSpec module_spec (resolved_exe_file, exe_arch); error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); if (exe_module_sp && exe_module_sp->GetObjectFile()) return error; @@ -254,9 +254,9 @@ ModuleSpec module_spec (resolved_exe_file, platform_arch); error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); // Did we find an executable using one of the if (error.Success()) { @@ -412,13 +412,13 @@ return &m_sdk_directory_infos[i]; } } - return NULL; + return nullptr; } const PlatformRemoteiOS::SDKDirectoryInfo * PlatformRemoteiOS::GetSDKDirectoryForLatestOSVersion () { - const PlatformRemoteiOS::SDKDirectoryInfo *result = NULL; + const PlatformRemoteiOS::SDKDirectoryInfo *result = nullptr; if (UpdateSDKDirectoryInfosInNeeded()) { const uint32_t num_sdk_infos = m_sdk_directory_infos.size(); @@ -428,7 +428,7 @@ const SDKDirectoryInfo &sdk_dir_info = m_sdk_directory_infos[i]; if (sdk_dir_info.version_major != UINT32_MAX) { - if (result == NULL || sdk_dir_info.version_major > result->version_major) + if (result == nullptr || sdk_dir_info.version_major > result->version_major) { result = &sdk_dir_info; } @@ -477,7 +477,7 @@ assert (m_device_support_directory.empty() == false); if (m_device_support_directory[0]) return m_device_support_directory.c_str(); - return NULL; + return nullptr; } @@ -490,7 +490,7 @@ if (m_device_support_directory_for_os_version.empty()) { const PlatformRemoteiOS::SDKDirectoryInfo *sdk_dir_info = GetSDKDirectoryForCurrentOSVersion (); - if (sdk_dir_info == NULL) + if (sdk_dir_info == nullptr) sdk_dir_info = GetSDKDirectoryForLatestOSVersion (); if (sdk_dir_info) { @@ -513,7 +513,7 @@ assert (m_device_support_directory_for_os_version.empty() == false); if (m_device_support_directory_for_os_version[0]) return m_device_support_directory_for_os_version.c_str(); - return NULL; + return nullptr; } uint32_t @@ -684,8 +684,8 @@ Error error (GetSymbolFile (platform_file, module_uuid_ptr, local_file)); if (error.Success()) { - error = ResolveExecutable (local_file, module_spec.GetArchitecture(), module_sp, NULL); - if (module_sp && ((module_uuid_ptr == NULL) || (module_sp->GetUUID() == *module_uuid_ptr))) + error = ResolveExecutable (local_file, module_spec.GetArchitecture(), module_sp, nullptr); + if (module_sp && ((module_uuid_ptr == nullptr) || (module_sp->GetUUID() == *module_uuid_ptr))) { //printf ("found in user specified SDK\n"); error.Clear(); @@ -708,8 +708,8 @@ error = ResolveExecutable (local_file, module_spec.GetArchitecture(), module_sp, - NULL); - if (module_sp && ((module_uuid_ptr == NULL) || (module_sp->GetUUID() == *module_uuid_ptr))) + nullptr); + if (module_sp && ((module_uuid_ptr == nullptr) || (module_sp->GetUUID() == *module_uuid_ptr))) { //printf ("sdk[%u] last found\n", m_last_module_sdk_idx); error.Clear(); @@ -734,8 +734,8 @@ error = ResolveExecutable (local_file, module_spec.GetArchitecture(), module_sp, - NULL); - if (module_sp && ((module_uuid_ptr == NULL) || (module_sp->GetUUID() == *module_uuid_ptr))) + nullptr); + if (module_sp && ((module_uuid_ptr == nullptr) || (module_sp->GetUUID() == *module_uuid_ptr))) { // Remember the index of the last SDK that we found a file // in in case the wrong SDK was selected. Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp =================================================================== --- source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp +++ source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp @@ -120,7 +120,7 @@ } if (create) return new PlatformiOSSimulator (); - return NULL; + return nullptr; } @@ -198,9 +198,9 @@ { error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); if (exe_module_sp && exe_module_sp->GetObjectFile()) return error; @@ -216,9 +216,9 @@ error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); // Did we find an executable using one of the if (error.Success()) { @@ -311,7 +311,7 @@ assert (m_sdk_directory.empty() == false); if (m_sdk_directory[0]) return m_sdk_directory.c_str(); - return NULL; + return nullptr; } Error Index: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp =================================================================== --- source/Plugins/Platform/POSIX/PlatformPOSIX.cpp +++ source/Plugins/Platform/POSIX/PlatformPOSIX.cpp @@ -47,7 +47,7 @@ lldb_private::OptionGroupOptions* PlatformPOSIX::GetConnectionOptions (lldb_private::CommandInterpreter& interpreter) { - if (m_options.get() == NULL) + if (m_options.get() == nullptr) { m_options.reset(new OptionGroupOptions(interpreter)); m_options->Append(new OptionGroupPlatformRSync()); @@ -179,10 +179,10 @@ command.Printf("%s",path); int status; platform->RunShellCommand(command.GetData(), - NULL, + nullptr, &status, - NULL, - NULL, + nullptr, + nullptr, 10); return status; } @@ -211,10 +211,10 @@ command.Printf("cp %s %s", src_path.c_str(), dst_path.c_str()); int status; RunShellCommand(command.GetData(), - NULL, + nullptr, &status, - NULL, - NULL, + nullptr, + nullptr, 10); if (status != 0) return Error("unable to perform copy"); @@ -259,10 +259,10 @@ log->Printf("[PutFile] Running command: %s\n", command.GetData()); int retcode; Host::RunShellCommand(command.GetData(), - NULL, + nullptr, &retcode, - NULL, - NULL, + nullptr, + nullptr, 60); if (retcode == 0) { @@ -401,10 +401,10 @@ cp_command.Printf("cp %s %s", src_path.c_str(), dst_path.c_str()); int status; RunShellCommand(cp_command.GetData(), - NULL, + nullptr, &status, - NULL, - NULL, + nullptr, + nullptr, 10); if (status != 0) return Error("unable to perform copy"); @@ -439,10 +439,10 @@ log->Printf("[GetFile] Running command: %s\n", command.GetData()); int retcode; Host::RunShellCommand(command.GetData(), - NULL, + nullptr, &retcode, - NULL, - NULL, + nullptr, + nullptr, 60); if (retcode == 0) return Error(); Index: source/Plugins/Platform/Windows/PlatformWindows.cpp =================================================================== --- source/Plugins/Platform/Windows/PlatformWindows.cpp +++ source/Plugins/Platform/Windows/PlatformWindows.cpp @@ -77,7 +77,7 @@ } if (create) return new PlatformWindows (is_host); - return NULL; + return nullptr; } @@ -201,7 +201,7 @@ error = m_remote_platform_sp->ResolveExecutable (exe_file, exe_arch, exe_module_sp, - NULL); + nullptr); } else { @@ -220,11 +220,11 @@ { error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); - if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL) + if (!exe_module_sp || exe_module_sp->GetObjectFile() == nullptr) { exe_module_sp.reset(); error.SetErrorStringWithFormat ("'%s' doesn't contain the architecture %s", @@ -242,9 +242,9 @@ { error = ModuleList::GetSharedModule (module_spec, exe_module_sp, - NULL, - NULL, - NULL); + nullptr, + nullptr, + nullptr); // Did we find an executable using one of the if (error.Success()) { @@ -276,7 +276,7 @@ PlatformWindows::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite *bp_site) { ArchSpec arch = target.GetArchitecture(); - const uint8_t *trap_opcode = NULL; + const uint8_t *trap_opcode = nullptr; size_t trap_opcode_size = 0; switch (arch.GetMachine()) @@ -348,7 +348,7 @@ if (m_remote_platform_sp) return m_remote_platform_sp->GetHostname (); - return NULL; + return nullptr; } bool @@ -479,17 +479,17 @@ lldb::ProcessSP process_sp; if (IsHost()) { - if (target == NULL) + if (target == nullptr) { TargetSP new_target_sp; FileSpec emptyFileSpec; ArchSpec emptyArchSpec; error = debugger.GetTargetList().CreateTarget (debugger, - NULL, - NULL, + nullptr, + nullptr, false, - NULL, + nullptr, new_target_sp); target = new_target_sp.get(); } @@ -502,7 +502,7 @@ // The Windows platform always currently uses the GDB remote debugger plug-in // so even when debugging locally we are debugging remotely! // Just like the darwin plugin. - process_sp = target->CreateProcess (listener, "gdb-remote", NULL); + process_sp = target->CreateProcess (listener, "gdb-remote", nullptr); if (process_sp) error = process_sp->Attach (attach_info); @@ -528,7 +528,7 @@ if (IsRemote() && m_remote_platform_sp) return m_remote_platform_sp->GetUserName(uid); - return NULL; + return nullptr; } const char * @@ -540,7 +540,7 @@ if (IsRemote() && m_remote_platform_sp) return m_remote_platform_sp->GetGroupName(gid); - return NULL; + return nullptr; } Error Index: source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp =================================================================== --- source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp +++ source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp @@ -70,7 +70,7 @@ } if (create) return new PlatformRemoteGDBServer (); - return NULL; + return nullptr; } @@ -296,7 +296,7 @@ { m_gdb_client.GetHostname (m_name); if (m_name.empty()) - return NULL; + return nullptr; return m_name.c_str(); } @@ -312,7 +312,7 @@ return SetCachedUserName(uid, name.c_str(), name.size()); SetUserNameNotFound(uid); // Negative cache so we don't keep sending packets - return NULL; + return nullptr; } const char * @@ -326,7 +326,7 @@ return SetCachedGroupName(gid, name.c_str(), name.size()); SetGroupNameNotFound(gid); // Negative cache so we don't keep sending packets - return NULL; + return nullptr; } uint32_t @@ -428,7 +428,7 @@ else { // All other hosts should use their actual hostname - port = m_gdb_client.LaunchGDBserverAndGetPort(debugserver_pid, NULL); + port = m_gdb_client.LaunchGDBserverAndGetPort(debugserver_pid, nullptr); } if (port == 0) @@ -437,15 +437,15 @@ } else { - if (target == NULL) + if (target == nullptr) { TargetSP new_target_sp; error = debugger.GetTargetList().CreateTarget (debugger, - NULL, - NULL, + nullptr, + nullptr, false, - NULL, + nullptr, new_target_sp); target = new_target_sp.get(); } @@ -458,7 +458,7 @@ // The darwin always currently uses the GDB remote debugger plug-in // so even when debugging locally we are debugging remotely! - process_sp = target->CreateProcess (listener, "gdb-remote", NULL); + process_sp = target->CreateProcess (listener, "gdb-remote", nullptr); if (process_sp) { @@ -472,7 +472,7 @@ override_hostname ? override_hostname : GetHostname (), port + port_offset); assert (connect_url_len < (int)sizeof(connect_url)); - error = process_sp->ConnectRemote (NULL, connect_url); + error = process_sp->ConnectRemote (nullptr, connect_url); if (error.Success()) error = process_sp->Launch(launch_info); else if (debugserver_pid != LLDB_INVALID_PROCESS_ID) @@ -516,7 +516,7 @@ else { // All other hosts should use their actual hostname - port = m_gdb_client.LaunchGDBserverAndGetPort(debugserver_pid, NULL); + port = m_gdb_client.LaunchGDBserverAndGetPort(debugserver_pid, nullptr); } if (port == 0) @@ -525,15 +525,15 @@ } else { - if (target == NULL) + if (target == nullptr) { TargetSP new_target_sp; error = debugger.GetTargetList().CreateTarget (debugger, - NULL, - NULL, + nullptr, + nullptr, false, - NULL, + nullptr, new_target_sp); target = new_target_sp.get(); } @@ -546,7 +546,7 @@ // The darwin always currently uses the GDB remote debugger plug-in // so even when debugging locally we are debugging remotely! - process_sp = target->CreateProcess (listener, "gdb-remote", NULL); + process_sp = target->CreateProcess (listener, "gdb-remote", nullptr); if (process_sp) { @@ -560,7 +560,7 @@ override_hostname ? override_hostname : GetHostname (), port + port_offset); assert (connect_url_len < (int)sizeof(connect_url)); - error = process_sp->ConnectRemote (NULL, connect_url); + error = process_sp->ConnectRemote (nullptr, connect_url); if (error.Success()) error = process_sp->Attach(attach_info); else if (debugserver_pid != LLDB_INVALID_PROCESS_ID) Index: source/Plugins/Process/Linux/ProcessLinux.cpp =================================================================== --- source/Plugins/Process/Linux/ProcessLinux.cpp +++ source/Plugins/Process/Linux/ProcessLinux.cpp @@ -133,7 +133,7 @@ Log * ProcessLinux::EnablePluginLogging(Stream *strm, Args &command) { - return NULL; + return nullptr; } Error Index: source/Plugins/Process/Linux/ProcessMonitor.cpp =================================================================== --- source/Plugins/Process/Linux/ProcessMonitor.cpp +++ source/Plugins/Process/Linux/ProcessMonitor.cpp @@ -989,7 +989,7 @@ m_monitor_thread(LLDB_INVALID_HOST_THREAD), m_pid(LLDB_INVALID_PROCESS_ID), m_terminal_fd(-1), - m_operation(0) + m_operation(nullptr) { std::unique_ptr args(new LaunchArgs(this, module, argv, envp, stdin_path, stdout_path, stderr_path, @@ -1042,7 +1042,7 @@ m_monitor_thread(LLDB_INVALID_HOST_THREAD), m_pid(LLDB_INVALID_PROCESS_ID), m_terminal_fd(-1), - m_operation(0) + m_operation(nullptr) { sem_init(&m_operation_pending, 0, 0); sem_init(&m_operation_done, 0, 0); @@ -1111,11 +1111,11 @@ if (!Launch(args)) { sem_post(&args->m_semaphore); - return NULL; + return nullptr; } ServeOperation(args); - return NULL; + return nullptr; } bool @@ -1139,7 +1139,7 @@ Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS)); // Propagate the environment if one is not supplied. - if (envp == NULL || envp[0] == NULL) + if (envp == nullptr || envp[0] == nullptr) envp = const_cast(environ); if ((pid = terminal.Fork(err_str, err_len)) == static_cast(-1)) @@ -1178,20 +1178,20 @@ // // FIXME: If two or more of the paths are the same we needlessly open // the same file multiple times. - if (stdin_path != NULL && stdin_path[0]) + if (stdin_path != nullptr && stdin_path[0]) if (!DupDescriptor(stdin_path, STDIN_FILENO, O_RDONLY)) exit(eDupStdinFailed); - if (stdout_path != NULL && stdout_path[0]) + if (stdout_path != nullptr && stdout_path[0]) if (!DupDescriptor(stdout_path, STDOUT_FILENO, O_WRONLY | O_CREAT)) exit(eDupStdoutFailed); - if (stderr_path != NULL && stderr_path[0]) + if (stderr_path != nullptr && stderr_path[0]) if (!DupDescriptor(stderr_path, STDERR_FILENO, O_WRONLY | O_CREAT)) exit(eDupStderrFailed); // Change working directory - if (working_dir != NULL && working_dir[0]) + if (working_dir != nullptr && working_dir[0]) if (0 != ::chdir(working_dir)) exit(eChdirFailed); @@ -1300,11 +1300,11 @@ if (!Attach(args)) { sem_post(&args->m_semaphore); - return NULL; + return nullptr; } ServeOperation(args); - return NULL; + return nullptr; } bool @@ -1356,7 +1356,7 @@ int status; // Need to use __WALL otherwise we receive an error with errno=ECHLD // At this point we should have a thread stopped if waitpid succeeds. - if ((status = waitpid(tid, NULL, __WALL)) < 0) + if ((status = waitpid(tid, nullptr, __WALL)) < 0) { // No such thread. The thread may have exited. // More error handling may be needed. @@ -2257,8 +2257,8 @@ if (IS_VALID_LLDB_HOST_THREAD(m_monitor_thread)) { - Host::ThreadCancel(m_monitor_thread, NULL); - Host::ThreadJoin(m_monitor_thread, &thread_result, NULL); + Host::ThreadCancel(m_monitor_thread, nullptr); + Host::ThreadJoin(m_monitor_thread, &thread_result, nullptr); m_monitor_thread = LLDB_INVALID_HOST_THREAD; } } @@ -2285,7 +2285,7 @@ if (!IS_VALID_LLDB_HOST_THREAD(m_operation_thread)) return; - Host::ThreadCancel(m_operation_thread, NULL); - Host::ThreadJoin(m_operation_thread, &result, NULL); + Host::ThreadCancel(m_operation_thread, nullptr); + Host::ThreadJoin(m_operation_thread, &result, nullptr); m_operation_thread = LLDB_INVALID_HOST_THREAD; } Index: source/Plugins/Process/POSIX/POSIXThread.cpp =================================================================== --- source/Plugins/Process/POSIX/POSIXThread.cpp +++ source/Plugins/Process/POSIX/POSIXThread.cpp @@ -49,7 +49,7 @@ m_breakpoint (), m_thread_name_valid (false), m_thread_name (), - m_posix_thread(NULL) + m_posix_thread(nullptr) { Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD)); if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) @@ -119,7 +119,7 @@ const char * POSIXThread::GetInfo() { - return NULL; + return nullptr; } void @@ -142,7 +142,7 @@ } if (m_thread_name.empty()) - return NULL; + return nullptr; return m_thread_name.c_str(); } @@ -151,9 +151,9 @@ { if (!m_reg_context_sp) { - m_posix_thread = NULL; + m_posix_thread = nullptr; - RegisterInfoInterface *reg_interface = NULL; + RegisterInfoInterface *reg_interface = nullptr; const ArchSpec &target_arch = GetProcess()->GetTarget().GetArchitecture(); switch (target_arch.GetTriple().getOS()) @@ -271,7 +271,7 @@ Unwind * POSIXThread::GetUnwinder() { - if (m_unwinder_ap.get() == NULL) + if (m_unwinder_ap.get() == nullptr) m_unwinder_ap.reset(new UnwindLLDB(*this)); return m_unwinder_ap.get(); Index: source/Plugins/Process/POSIX/ProcessMessage.cpp =================================================================== --- source/Plugins/Process/POSIX/ProcessMessage.cpp +++ source/Plugins/Process/POSIX/ProcessMessage.cpp @@ -113,7 +113,7 @@ chcar str[8]; sprintf(str, "%d", reason); #else - const char *str = NULL; + const char *str = nullptr; switch (reason) { @@ -211,7 +211,7 @@ chcar str[8]; sprintf(str, "%d", reason); #else - const char *str = NULL; + const char *str = nullptr; switch (kind) { Index: source/Plugins/Process/POSIX/ProcessPOSIX.cpp =================================================================== --- source/Plugins/Process/POSIX/ProcessPOSIX.cpp +++ source/Plugins/Process/POSIX/ProcessPOSIX.cpp @@ -73,8 +73,8 @@ ProcessPOSIX::ProcessPOSIX(Target& target, Listener &listener) : Process(target, listener), m_byte_order(lldb::endian::InlHostByteOrder()), - m_monitor(NULL), - m_module(NULL), + m_monitor(nullptr), + m_module(nullptr), m_message_mutex (Mutex::eMutexTypeRecursive), m_exit_now(false), m_seen_initial_stop() @@ -117,7 +117,7 @@ ProcessPOSIX::DoAttachToProcessWithID(lldb::pid_t pid) { Error error; - assert(m_monitor == NULL); + assert(m_monitor == nullptr); Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS)); if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) @@ -143,7 +143,7 @@ error = platform_sp->ResolveExecutable(process_info.GetExecutableFile(), m_target.GetArchitecture(), exe_module_sp, - executable_search_paths.GetSize() ? &executable_search_paths : NULL); + executable_search_paths.GetSize() ? &executable_search_paths : nullptr); if (!error.Success()) return error; @@ -181,7 +181,7 @@ const char *default_path) { const char *pts_name = "/dev/pts/"; - const char *path = NULL; + const char *path = nullptr; if (file_action) { @@ -205,7 +205,7 @@ ProcessLaunchInfo &launch_info) { Error error; - assert(m_monitor == NULL); + assert(m_monitor == nullptr); const char* working_dir = launch_info.GetWorkingDirectory(); if (working_dir) { @@ -222,9 +222,9 @@ const lldb_private::ProcessLaunchInfo::FileAction *file_action; // Default of NULL will mean to use existing open file descriptors - const char *stdin_path = NULL; - const char *stdout_path = NULL; - const char *stderr_path = NULL; + const char *stdin_path = nullptr; + const char *stdout_path = nullptr; + const char *stderr_path = nullptr; file_action = launch_info.GetFileActionForFD (STDIN_FILENO); stdin_path = GetFilePath(file_action, stdin_path); @@ -368,7 +368,7 @@ Error error = platform_sp->ResolveExecutable(process_info.GetExecutableFile(), target->GetArchitecture(), exe_module_sp, - executable_search_paths.GetSize() ? &executable_search_paths : NULL); + executable_search_paths.GetSize() ? &executable_search_paths : nullptr); if (!error.Success()) return; target->SetExecutableModule(exe_module_sp, true); @@ -434,7 +434,7 @@ if (message.GetTID() == GetID()) { m_exit_status = message.GetExitStatus(); - SetExitStatus(m_exit_status, NULL); + SetExitStatus(m_exit_status, nullptr); } else if (!IsAThreadRunning()) SetPrivateState(eStateStopped); @@ -646,7 +646,7 @@ static const uint8_t g_i386_opcode[] = { 0xCC }; ArchSpec arch = GetTarget().GetArchitecture(); - const uint8_t *opcode = NULL; + const uint8_t *opcode = nullptr; size_t opcode_size = 0; switch (arch.GetMachine()) Index: source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp =================================================================== --- source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp +++ source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp @@ -24,12 +24,12 @@ // that will construct the static g_log_sp the first time this function is // called. static bool g_log_enabled = false; -static Log * g_log = NULL; +static Log * g_log = nullptr; static Log * GetLog () { if (!g_log_enabled) - return NULL; + return nullptr; return g_log; } @@ -42,7 +42,7 @@ { uint32_t log_mask = log->GetMask().Get(); if ((log_mask & mask) != mask) - return NULL; + return nullptr; } return log; } Index: source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp =================================================================== --- source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp +++ source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp @@ -191,7 +191,7 @@ if (data_sp && ReadGPR () && ReadFPR ()) { uint8_t *dst = data_sp->GetBytes(); - success = dst != 0; + success = dst != nullptr; if (success) { Index: source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp =================================================================== --- source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp +++ source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp @@ -343,7 +343,7 @@ if (data_sp && ReadGPR () && ReadFPR ()) { uint8_t *dst = data_sp->GetBytes(); - success = dst != 0; + success = dst != nullptr; if (success) { Index: source/Plugins/Process/Utility/DynamicRegisterInfo.cpp =================================================================== --- source/Plugins/Process/Utility/DynamicRegisterInfo.cpp +++ source/Plugins/Process/Utility/DynamicRegisterInfo.cpp @@ -75,7 +75,7 @@ set_name.SetCString(py_set_name.GetString()); if (set_name) { - RegisterSet new_set = { set_name.AsCString(), NULL, 0, NULL }; + RegisterSet new_set = { set_name.AsCString(), nullptr, 0, nullptr }; m_sets.push_back (new_set); } else @@ -118,7 +118,7 @@ bzero (®_info, sizeof(reg_info)); reg_info.name = ConstString (reg_info_dict.GetItemForKeyAsString(name_pystr)).GetCString(); - if (reg_info.name == NULL) + if (reg_info.name == nullptr) { Clear(); return 0; @@ -305,7 +305,7 @@ const char *format_cstr = reg_info_dict.GetItemForKeyAsString(format_pystr); if (format_cstr) { - if (Args::StringToFormat(format_cstr, reg_info.format, NULL).Fail()) + if (Args::StringToFormat(format_cstr, reg_info.format, nullptr).Fail()) { Clear(); return 0; @@ -429,7 +429,7 @@ const uint32_t reg_num = m_regs.size(); reg_info.name = reg_name.AsCString(); assert (reg_info.name); - reg_info.alt_name = reg_alt_name.AsCString(NULL); + reg_info.alt_name = reg_alt_name.AsCString(nullptr); uint32_t i; if (reg_info.value_regs) { @@ -493,7 +493,7 @@ if (m_value_regs_map.find(i) != m_value_regs_map.end()) m_regs[i].value_regs = m_value_regs_map[i].data(); else - m_regs[i].value_regs = NULL; + m_regs[i].value_regs = nullptr; } // Expand all invalidation dependencies @@ -546,7 +546,7 @@ if (m_invalidate_regs_map.find(i) != m_invalidate_regs_map.end()) m_regs[i].invalidate_regs = m_invalidate_regs_map[i].data(); else - m_regs[i].invalidate_regs = NULL; + m_regs[i].invalidate_regs = nullptr; } } @@ -573,7 +573,7 @@ { if (i < m_regs.size()) return &m_regs[i]; - return NULL; + return nullptr; } const RegisterSet * @@ -581,7 +581,7 @@ { if (i < m_sets.size()) return &m_sets[i]; - return NULL; + return nullptr; } uint32_t @@ -596,7 +596,7 @@ m_set_names.push_back(set_name); m_set_reg_nums.resize(m_set_reg_nums.size()+1); - RegisterSet new_set = { set_name.AsCString(), NULL, 0, NULL }; + RegisterSet new_set = { set_name.AsCString(), nullptr, 0, nullptr }; m_sets.push_back (new_set); return m_sets.size() - 1; } @@ -701,5 +701,5 @@ return ®_info; } } - return NULL; + return nullptr; } Index: source/Plugins/Process/Utility/HistoryThread.cpp =================================================================== --- source/Plugins/Process/Utility/HistoryThread.cpp +++ source/Plugins/Process/Utility/HistoryThread.cpp @@ -79,7 +79,7 @@ HistoryThread::GetStackFrameList () { Mutex::Locker (m_framelist_mutex); - if (m_framelist.get() == NULL) + if (m_framelist.get() == nullptr) { m_framelist.reset (new StackFrameList (*this, StackFrameListSP(), true)); } Index: source/Plugins/Process/Utility/InferiorCallPOSIX.cpp =================================================================== --- source/Plugins/Process/Utility/InferiorCallPOSIX.cpp +++ source/Plugins/Process/Utility/InferiorCallPOSIX.cpp @@ -45,7 +45,7 @@ addr_t offset) { Thread *thread = process->GetThreadList().GetSelectedThread().get(); - if (thread == NULL) + if (thread == nullptr) return false; const bool append = true; @@ -152,7 +152,7 @@ addr_t length) { Thread *thread = process->GetThreadList().GetSelectedThread().get(); - if (thread == NULL) + if (thread == nullptr) return false; const bool append = true; @@ -228,7 +228,7 @@ addr_t &returned_func) { Thread *thread = process->GetThreadList().GetSelectedThread().get(); - if (thread == NULL || address == NULL) + if (thread == nullptr || address == nullptr) return false; EvaluateExpressionOptions options; Index: source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp +++ source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp @@ -232,33 +232,33 @@ { // Macro auto defines most stuff GCC DWARF GENERIC GDB LLDB VALUE REGS INVALIDATE REGS // =============================== ======================= =================== ========================= ================== ================= ========== =============== - { DEFINE_GPR(eax , NULL) , { gcc_eax , dwarf_eax , LLDB_INVALID_REGNUM , gdb_eax , gpr_eax }, NULL, NULL}, - { DEFINE_GPR(ebx , NULL) , { gcc_ebx , dwarf_ebx , LLDB_INVALID_REGNUM , gdb_ebx , gpr_ebx }, NULL, NULL}, - { DEFINE_GPR(ecx , NULL) , { gcc_ecx , dwarf_ecx , LLDB_INVALID_REGNUM , gdb_ecx , gpr_ecx }, NULL, NULL}, - { DEFINE_GPR(edx , NULL) , { gcc_edx , dwarf_edx , LLDB_INVALID_REGNUM , gdb_edx , gpr_edx }, NULL, NULL}, - { DEFINE_GPR(edi , NULL) , { gcc_edi , dwarf_edi , LLDB_INVALID_REGNUM , gdb_edi , gpr_edi }, NULL, NULL}, - { DEFINE_GPR(esi , NULL) , { gcc_esi , dwarf_esi , LLDB_INVALID_REGNUM , gdb_esi , gpr_esi }, NULL, NULL}, - { DEFINE_GPR(ebp , "fp") , { gcc_ebp , dwarf_ebp , LLDB_REGNUM_GENERIC_FP , gdb_ebp , gpr_ebp }, NULL, NULL}, - { DEFINE_GPR(esp , "sp") , { gcc_esp , dwarf_esp , LLDB_REGNUM_GENERIC_SP , gdb_esp , gpr_esp }, NULL, NULL}, - { DEFINE_GPR(ss , NULL) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ss , gpr_ss }, NULL, NULL}, - { DEFINE_GPR(eflags , "flags") , { gcc_eflags , dwarf_eflags , LLDB_REGNUM_GENERIC_FLAGS , gdb_eflags , gpr_eflags }, NULL, NULL}, - { DEFINE_GPR(eip , "pc") , { gcc_eip , dwarf_eip , LLDB_REGNUM_GENERIC_PC , gdb_eip , gpr_eip }, NULL, NULL}, - { DEFINE_GPR(cs , NULL) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_cs , gpr_cs }, NULL, NULL}, - { DEFINE_GPR(ds , NULL) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ds , gpr_ds }, NULL, NULL}, - { DEFINE_GPR(es , NULL) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_es , gpr_es }, NULL, NULL}, - { DEFINE_GPR(fs , NULL) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fs , gpr_fs }, NULL, NULL}, - { DEFINE_GPR(gs , NULL) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_gs , gpr_gs }, NULL, NULL}, + { DEFINE_GPR(eax , nullptr) , { gcc_eax , dwarf_eax , LLDB_INVALID_REGNUM , gdb_eax , gpr_eax }, nullptr, nullptr}, + { DEFINE_GPR(ebx , nullptr) , { gcc_ebx , dwarf_ebx , LLDB_INVALID_REGNUM , gdb_ebx , gpr_ebx }, nullptr, nullptr}, + { DEFINE_GPR(ecx , nullptr) , { gcc_ecx , dwarf_ecx , LLDB_INVALID_REGNUM , gdb_ecx , gpr_ecx }, nullptr, nullptr}, + { DEFINE_GPR(edx , nullptr) , { gcc_edx , dwarf_edx , LLDB_INVALID_REGNUM , gdb_edx , gpr_edx }, nullptr, nullptr}, + { DEFINE_GPR(edi , nullptr) , { gcc_edi , dwarf_edi , LLDB_INVALID_REGNUM , gdb_edi , gpr_edi }, nullptr, nullptr}, + { DEFINE_GPR(esi , nullptr) , { gcc_esi , dwarf_esi , LLDB_INVALID_REGNUM , gdb_esi , gpr_esi }, nullptr, nullptr}, + { DEFINE_GPR(ebp , "fp") , { gcc_ebp , dwarf_ebp , LLDB_REGNUM_GENERIC_FP , gdb_ebp , gpr_ebp }, nullptr, nullptr}, + { DEFINE_GPR(esp , "sp") , { gcc_esp , dwarf_esp , LLDB_REGNUM_GENERIC_SP , gdb_esp , gpr_esp }, nullptr, nullptr}, + { DEFINE_GPR(ss , nullptr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ss , gpr_ss }, nullptr, nullptr}, + { DEFINE_GPR(eflags , "flags") , { gcc_eflags , dwarf_eflags , LLDB_REGNUM_GENERIC_FLAGS , gdb_eflags , gpr_eflags }, nullptr, nullptr}, + { DEFINE_GPR(eip , "pc") , { gcc_eip , dwarf_eip , LLDB_REGNUM_GENERIC_PC , gdb_eip , gpr_eip }, nullptr, nullptr}, + { DEFINE_GPR(cs , nullptr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_cs , gpr_cs }, nullptr, nullptr}, + { DEFINE_GPR(ds , nullptr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ds , gpr_ds }, nullptr, nullptr}, + { DEFINE_GPR(es , nullptr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_es , gpr_es }, nullptr, nullptr}, + { DEFINE_GPR(fs , nullptr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fs , gpr_fs }, nullptr, nullptr}, + { DEFINE_GPR(gs , nullptr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_gs , gpr_gs }, nullptr, nullptr}, - { DEFINE_FPU_UINT(fcw) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fcw , fpu_fcw }, NULL, NULL}, - { DEFINE_FPU_UINT(fsw) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fsw , fpu_fsw }, NULL, NULL}, - { DEFINE_FPU_UINT(ftw) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ftw , fpu_ftw }, NULL, NULL}, - { DEFINE_FPU_UINT(fop) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fop , fpu_fop }, NULL, NULL}, - { DEFINE_FPU_UINT(ip) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ip , fpu_ip }, NULL, NULL}, - { DEFINE_FPU_UINT(cs) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_cs , fpu_cs }, NULL, NULL}, - { DEFINE_FPU_UINT(dp) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_dp , fpu_dp }, NULL, NULL}, - { DEFINE_FPU_UINT(ds) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ds , fpu_ds }, NULL, NULL}, - { DEFINE_FPU_UINT(mxcsr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_mxcsr , fpu_mxcsr }, NULL, NULL}, - { DEFINE_FPU_UINT(mxcsrmask) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, fpu_mxcsrmask}, NULL, NULL}, + { DEFINE_FPU_UINT(fcw) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fcw , fpu_fcw }, nullptr, nullptr}, + { DEFINE_FPU_UINT(fsw) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fsw , fpu_fsw }, nullptr, nullptr}, + { DEFINE_FPU_UINT(ftw) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ftw , fpu_ftw }, nullptr, nullptr}, + { DEFINE_FPU_UINT(fop) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fop , fpu_fop }, nullptr, nullptr}, + { DEFINE_FPU_UINT(ip) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ip , fpu_ip }, nullptr, nullptr}, + { DEFINE_FPU_UINT(cs) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_cs , fpu_cs }, nullptr, nullptr}, + { DEFINE_FPU_UINT(dp) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_dp , fpu_dp }, nullptr, nullptr}, + { DEFINE_FPU_UINT(ds) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_ds , fpu_ds }, nullptr, nullptr}, + { DEFINE_FPU_UINT(mxcsr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_mxcsr , fpu_mxcsr }, nullptr, nullptr}, + { DEFINE_FPU_UINT(mxcsrmask) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, fpu_mxcsrmask}, nullptr, nullptr}, { DEFINE_FPU_VECT(stmm,0) }, { DEFINE_FPU_VECT(stmm,1) }, { DEFINE_FPU_VECT(stmm,2) }, @@ -276,9 +276,9 @@ { DEFINE_FPU_VECT(xmm,6) }, { DEFINE_FPU_VECT(xmm,7) }, - { DEFINE_EXC(trapno) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_trapno }, NULL, NULL}, - { DEFINE_EXC(err) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_err }, NULL, NULL}, - { DEFINE_EXC(faultvaddr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_faultvaddr }, NULL, NULL} + { DEFINE_EXC(trapno) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_trapno }, nullptr, nullptr}, + { DEFINE_EXC(err) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_err }, nullptr, nullptr}, + { DEFINE_EXC(faultvaddr) , { LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_faultvaddr }, nullptr, nullptr} }; static size_t k_num_register_infos = (sizeof(g_register_infos)/sizeof(RegisterInfo)); @@ -303,7 +303,7 @@ assert(k_num_register_infos == k_num_registers); if (reg < k_num_registers) return &g_register_infos[reg]; - return NULL; + return nullptr; } size_t @@ -414,7 +414,7 @@ { if (reg_set < k_num_regsets) return &g_reg_sets[reg_set]; - return NULL; + return nullptr; } Index: source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp +++ source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp @@ -256,38 +256,38 @@ { // Macro auto defines most stuff GCC DWARF GENERIC GDB LLDB VALUE REGS INVALIDATE REGS // =============================== ====================== =================== ========================== ==================== =================== ========== =============== - { DEFINE_GPR (rax , NULL) , { gcc_dwarf_gpr_rax , gcc_dwarf_gpr_rax , LLDB_INVALID_REGNUM , gdb_gpr_rax , gpr_rax }, NULL, NULL}, - { DEFINE_GPR (rbx , NULL) , { gcc_dwarf_gpr_rbx , gcc_dwarf_gpr_rbx , LLDB_INVALID_REGNUM , gdb_gpr_rbx , gpr_rbx }, NULL, NULL}, - { DEFINE_GPR (rcx , NULL) , { gcc_dwarf_gpr_rcx , gcc_dwarf_gpr_rcx , LLDB_INVALID_REGNUM , gdb_gpr_rcx , gpr_rcx }, NULL, NULL}, - { DEFINE_GPR (rdx , NULL) , { gcc_dwarf_gpr_rdx , gcc_dwarf_gpr_rdx , LLDB_INVALID_REGNUM , gdb_gpr_rdx , gpr_rdx }, NULL, NULL}, - { DEFINE_GPR (rdi , NULL) , { gcc_dwarf_gpr_rdi , gcc_dwarf_gpr_rdi , LLDB_INVALID_REGNUM , gdb_gpr_rdi , gpr_rdi }, NULL, NULL}, - { DEFINE_GPR (rsi , NULL) , { gcc_dwarf_gpr_rsi , gcc_dwarf_gpr_rsi , LLDB_INVALID_REGNUM , gdb_gpr_rsi , gpr_rsi }, NULL, NULL}, - { DEFINE_GPR (rbp , "fp") , { gcc_dwarf_gpr_rbp , gcc_dwarf_gpr_rbp , LLDB_REGNUM_GENERIC_FP , gdb_gpr_rbp , gpr_rbp }, NULL, NULL}, - { DEFINE_GPR (rsp , "sp") , { gcc_dwarf_gpr_rsp , gcc_dwarf_gpr_rsp , LLDB_REGNUM_GENERIC_SP , gdb_gpr_rsp , gpr_rsp }, NULL, NULL}, - { DEFINE_GPR (r8 , NULL) , { gcc_dwarf_gpr_r8 , gcc_dwarf_gpr_r8 , LLDB_INVALID_REGNUM , gdb_gpr_r8 , gpr_r8 }, NULL, NULL}, - { DEFINE_GPR (r9 , NULL) , { gcc_dwarf_gpr_r9 , gcc_dwarf_gpr_r9 , LLDB_INVALID_REGNUM , gdb_gpr_r9 , gpr_r9 }, NULL, NULL}, - { DEFINE_GPR (r10 , NULL) , { gcc_dwarf_gpr_r10 , gcc_dwarf_gpr_r10 , LLDB_INVALID_REGNUM , gdb_gpr_r10 , gpr_r10 }, NULL, NULL}, - { DEFINE_GPR (r11 , NULL) , { gcc_dwarf_gpr_r11 , gcc_dwarf_gpr_r11 , LLDB_INVALID_REGNUM , gdb_gpr_r11 , gpr_r11 }, NULL, NULL}, - { DEFINE_GPR (r12 , NULL) , { gcc_dwarf_gpr_r12 , gcc_dwarf_gpr_r12 , LLDB_INVALID_REGNUM , gdb_gpr_r12 , gpr_r12 }, NULL, NULL}, - { DEFINE_GPR (r13 , NULL) , { gcc_dwarf_gpr_r13 , gcc_dwarf_gpr_r13 , LLDB_INVALID_REGNUM , gdb_gpr_r13 , gpr_r13 }, NULL, NULL}, - { DEFINE_GPR (r14 , NULL) , { gcc_dwarf_gpr_r14 , gcc_dwarf_gpr_r14 , LLDB_INVALID_REGNUM , gdb_gpr_r14 , gpr_r14 }, NULL, NULL}, - { DEFINE_GPR (r15 , NULL) , { gcc_dwarf_gpr_r15 , gcc_dwarf_gpr_r15 , LLDB_INVALID_REGNUM , gdb_gpr_r15 , gpr_r15 }, NULL, NULL}, - { DEFINE_GPR (rip , "pc") , { gcc_dwarf_gpr_rip , gcc_dwarf_gpr_rip , LLDB_REGNUM_GENERIC_PC , gdb_gpr_rip , gpr_rip }, NULL, NULL}, - { DEFINE_GPR (rflags, "flags") , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_REGNUM_GENERIC_FLAGS, gdb_gpr_rflags , gpr_rflags }, NULL, NULL}, - { DEFINE_GPR (cs , NULL) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_gpr_cs , gpr_cs }, NULL, NULL}, - { DEFINE_GPR (fs , NULL) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_gpr_fs , gpr_fs }, NULL, NULL}, - { DEFINE_GPR (gs , NULL) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_gpr_gs , gpr_gs }, NULL, NULL}, + { DEFINE_GPR (rax , nullptr) , { gcc_dwarf_gpr_rax , gcc_dwarf_gpr_rax , LLDB_INVALID_REGNUM , gdb_gpr_rax , gpr_rax }, nullptr, nullptr}, + { DEFINE_GPR (rbx , nullptr) , { gcc_dwarf_gpr_rbx , gcc_dwarf_gpr_rbx , LLDB_INVALID_REGNUM , gdb_gpr_rbx , gpr_rbx }, nullptr, nullptr}, + { DEFINE_GPR (rcx , nullptr) , { gcc_dwarf_gpr_rcx , gcc_dwarf_gpr_rcx , LLDB_INVALID_REGNUM , gdb_gpr_rcx , gpr_rcx }, nullptr, nullptr}, + { DEFINE_GPR (rdx , nullptr) , { gcc_dwarf_gpr_rdx , gcc_dwarf_gpr_rdx , LLDB_INVALID_REGNUM , gdb_gpr_rdx , gpr_rdx }, nullptr, nullptr}, + { DEFINE_GPR (rdi , nullptr) , { gcc_dwarf_gpr_rdi , gcc_dwarf_gpr_rdi , LLDB_INVALID_REGNUM , gdb_gpr_rdi , gpr_rdi }, nullptr, nullptr}, + { DEFINE_GPR (rsi , nullptr) , { gcc_dwarf_gpr_rsi , gcc_dwarf_gpr_rsi , LLDB_INVALID_REGNUM , gdb_gpr_rsi , gpr_rsi }, nullptr, nullptr}, + { DEFINE_GPR (rbp , "fp") , { gcc_dwarf_gpr_rbp , gcc_dwarf_gpr_rbp , LLDB_REGNUM_GENERIC_FP , gdb_gpr_rbp , gpr_rbp }, nullptr, nullptr}, + { DEFINE_GPR (rsp , "sp") , { gcc_dwarf_gpr_rsp , gcc_dwarf_gpr_rsp , LLDB_REGNUM_GENERIC_SP , gdb_gpr_rsp , gpr_rsp }, nullptr, nullptr}, + { DEFINE_GPR (r8 , nullptr) , { gcc_dwarf_gpr_r8 , gcc_dwarf_gpr_r8 , LLDB_INVALID_REGNUM , gdb_gpr_r8 , gpr_r8 }, nullptr, nullptr}, + { DEFINE_GPR (r9 , nullptr) , { gcc_dwarf_gpr_r9 , gcc_dwarf_gpr_r9 , LLDB_INVALID_REGNUM , gdb_gpr_r9 , gpr_r9 }, nullptr, nullptr}, + { DEFINE_GPR (r10 , nullptr) , { gcc_dwarf_gpr_r10 , gcc_dwarf_gpr_r10 , LLDB_INVALID_REGNUM , gdb_gpr_r10 , gpr_r10 }, nullptr, nullptr}, + { DEFINE_GPR (r11 , nullptr) , { gcc_dwarf_gpr_r11 , gcc_dwarf_gpr_r11 , LLDB_INVALID_REGNUM , gdb_gpr_r11 , gpr_r11 }, nullptr, nullptr}, + { DEFINE_GPR (r12 , nullptr) , { gcc_dwarf_gpr_r12 , gcc_dwarf_gpr_r12 , LLDB_INVALID_REGNUM , gdb_gpr_r12 , gpr_r12 }, nullptr, nullptr}, + { DEFINE_GPR (r13 , nullptr) , { gcc_dwarf_gpr_r13 , gcc_dwarf_gpr_r13 , LLDB_INVALID_REGNUM , gdb_gpr_r13 , gpr_r13 }, nullptr, nullptr}, + { DEFINE_GPR (r14 , nullptr) , { gcc_dwarf_gpr_r14 , gcc_dwarf_gpr_r14 , LLDB_INVALID_REGNUM , gdb_gpr_r14 , gpr_r14 }, nullptr, nullptr}, + { DEFINE_GPR (r15 , nullptr) , { gcc_dwarf_gpr_r15 , gcc_dwarf_gpr_r15 , LLDB_INVALID_REGNUM , gdb_gpr_r15 , gpr_r15 }, nullptr, nullptr}, + { DEFINE_GPR (rip , "pc") , { gcc_dwarf_gpr_rip , gcc_dwarf_gpr_rip , LLDB_REGNUM_GENERIC_PC , gdb_gpr_rip , gpr_rip }, nullptr, nullptr}, + { DEFINE_GPR (rflags, "flags") , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_REGNUM_GENERIC_FLAGS, gdb_gpr_rflags , gpr_rflags }, nullptr, nullptr}, + { DEFINE_GPR (cs , nullptr) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_gpr_cs , gpr_cs }, nullptr, nullptr}, + { DEFINE_GPR (fs , nullptr) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_gpr_fs , gpr_fs }, nullptr, nullptr}, + { DEFINE_GPR (gs , nullptr) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_gpr_gs , gpr_gs }, nullptr, nullptr}, - { DEFINE_FPU_UINT(fcw) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_fcw , fpu_fcw }, NULL, NULL}, - { DEFINE_FPU_UINT(fsw) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_fsw , fpu_fsw }, NULL, NULL}, - { DEFINE_FPU_UINT(ftw) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_ftw , fpu_ftw }, NULL, NULL}, - { DEFINE_FPU_UINT(fop) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_fop , fpu_fop }, NULL, NULL}, - { DEFINE_FPU_UINT(ip) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_ip , fpu_ip }, NULL, NULL}, - { DEFINE_FPU_UINT(cs) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_cs , fpu_cs }, NULL, NULL}, - { DEFINE_FPU_UINT(dp) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_dp , fpu_dp }, NULL, NULL}, - { DEFINE_FPU_UINT(ds) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_ds , fpu_ds }, NULL, NULL}, - { DEFINE_FPU_UINT(mxcsr) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_mxcsr , fpu_mxcsr }, NULL, NULL}, - { DEFINE_FPU_UINT(mxcsrmask) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, fpu_mxcsrmask }, NULL, NULL}, + { DEFINE_FPU_UINT(fcw) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_fcw , fpu_fcw }, nullptr, nullptr}, + { DEFINE_FPU_UINT(fsw) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_fsw , fpu_fsw }, nullptr, nullptr}, + { DEFINE_FPU_UINT(ftw) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_ftw , fpu_ftw }, nullptr, nullptr}, + { DEFINE_FPU_UINT(fop) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_fop , fpu_fop }, nullptr, nullptr}, + { DEFINE_FPU_UINT(ip) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_ip , fpu_ip }, nullptr, nullptr}, + { DEFINE_FPU_UINT(cs) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_cs , fpu_cs }, nullptr, nullptr}, + { DEFINE_FPU_UINT(dp) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_dp , fpu_dp }, nullptr, nullptr}, + { DEFINE_FPU_UINT(ds) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_ds , fpu_ds }, nullptr, nullptr}, + { DEFINE_FPU_UINT(mxcsr) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , gdb_fpu_mxcsr , fpu_mxcsr }, nullptr, nullptr}, + { DEFINE_FPU_UINT(mxcsrmask) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, fpu_mxcsrmask }, nullptr, nullptr}, { DEFINE_FPU_VECT(stmm,0) }, { DEFINE_FPU_VECT(stmm,1) }, { DEFINE_FPU_VECT(stmm,2) }, @@ -313,9 +313,9 @@ { DEFINE_FPU_VECT(xmm,14) }, { DEFINE_FPU_VECT(xmm,15) }, - { DEFINE_EXC(trapno) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_trapno }, NULL, NULL}, - { DEFINE_EXC(err) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_err }, NULL, NULL}, - { DEFINE_EXC(faultvaddr) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_faultvaddr }, NULL, NULL} + { DEFINE_EXC(trapno) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_trapno }, nullptr, nullptr}, + { DEFINE_EXC(err) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_err }, nullptr, nullptr}, + { DEFINE_EXC(faultvaddr) , { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM , LLDB_INVALID_REGNUM, exc_faultvaddr }, nullptr, nullptr} }; static size_t k_num_register_infos = (sizeof(g_register_infos)/sizeof(RegisterInfo)); @@ -342,7 +342,7 @@ assert(k_num_register_infos == k_num_registers); if (reg < k_num_registers) return &g_register_infos[reg]; - return NULL; + return nullptr; } @@ -462,7 +462,7 @@ { if (reg_set < k_num_regsets) return &g_reg_sets[reg_set]; - return NULL; + return nullptr; } int Index: source/Plugins/Process/Utility/RegisterContextDummy.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextDummy.cpp +++ source/Plugins/Process/Utility/RegisterContextDummy.cpp @@ -49,8 +49,8 @@ m_pc_reg_info.byte_size = address_byte_size; m_pc_reg_info.encoding = eEncodingUint; m_pc_reg_info.format = eFormatPointer; - m_pc_reg_info.invalidate_regs = NULL; - m_pc_reg_info.value_regs = NULL; + m_pc_reg_info.invalidate_regs = nullptr; + m_pc_reg_info.value_regs = nullptr; m_pc_reg_info.kinds[eRegisterKindGCC] = LLDB_INVALID_REGNUM; m_pc_reg_info.kinds[eRegisterKindDWARF] = LLDB_INVALID_REGNUM; m_pc_reg_info.kinds[eRegisterKindGeneric] = LLDB_REGNUM_GENERIC_PC; @@ -78,7 +78,7 @@ RegisterContextDummy::GetRegisterInfoAtIndex (size_t reg) { if (reg) - return NULL; + return nullptr; return &m_pc_reg_info; } @@ -92,7 +92,7 @@ RegisterContextDummy::GetRegisterSet (size_t reg_set) { if (reg_set) - return NULL; + return nullptr; return &m_reg_set0; } Index: source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp +++ source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp @@ -81,6 +81,6 @@ return g_register_infos_i386; default: assert(false && "Unhandled target architecture."); - return NULL; + return nullptr; } } Index: source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp +++ source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp @@ -118,7 +118,7 @@ return g_register_infos_x86_64; default: assert(false && "Unhandled target architecture."); - return NULL; + return nullptr; } } Index: source/Plugins/Process/Utility/RegisterContextHistory.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextHistory.cpp +++ source/Plugins/Process/Utility/RegisterContextHistory.cpp @@ -50,8 +50,8 @@ m_pc_reg_info.byte_size = address_byte_size; m_pc_reg_info.encoding = eEncodingUint; m_pc_reg_info.format = eFormatPointer; - m_pc_reg_info.invalidate_regs = NULL; - m_pc_reg_info.value_regs = NULL; + m_pc_reg_info.invalidate_regs = nullptr; + m_pc_reg_info.value_regs = nullptr; m_pc_reg_info.kinds[eRegisterKindGCC] = LLDB_INVALID_REGNUM; m_pc_reg_info.kinds[eRegisterKindDWARF] = LLDB_INVALID_REGNUM; m_pc_reg_info.kinds[eRegisterKindGeneric] = LLDB_REGNUM_GENERIC_PC; @@ -79,7 +79,7 @@ RegisterContextHistory::GetRegisterInfoAtIndex (size_t reg) { if (reg) - return NULL; + return nullptr; return &m_pc_reg_info; } @@ -93,7 +93,7 @@ RegisterContextHistory::GetRegisterSet (size_t reg_set) { if (reg_set) - return NULL; + return nullptr; return &m_reg_set0; } Index: source/Plugins/Process/Utility/RegisterContextLLDB.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -126,7 +126,7 @@ ExecutionContext exe_ctx(m_thread.shared_from_this()); RegisterContextSP reg_ctx_sp = m_thread.GetRegisterContext(); - if (reg_ctx_sp.get() == NULL) + if (reg_ctx_sp.get() == nullptr) { m_frame_type = eNotAValidFrame; UnwindLogMsg ("frame does not have a register context"); @@ -629,7 +629,7 @@ UnwindPlanSP unwind_plan_sp; ModuleSP pc_module_sp (m_current_pc.GetModule()); - if (!m_current_pc.IsValid() || !pc_module_sp || pc_module_sp->GetObjectFile() == NULL) + if (!m_current_pc.IsValid() || !pc_module_sp || pc_module_sp->GetObjectFile() == nullptr) return unwind_plan_sp; if (IsFrameZero ()) @@ -681,7 +681,7 @@ UnwindPlanSP arch_default_unwind_plan_sp; ExecutionContext exe_ctx(m_thread.shared_from_this()); Process *process = exe_ctx.GetProcessPtr(); - ABI *abi = process ? process->GetABI().get() : NULL; + ABI *abi = process ? process->GetABI().get() : nullptr; if (abi) { arch_default_unwind_plan_sp.reset (new UnwindPlan (lldb::eRegisterKindGeneric)); @@ -710,7 +710,7 @@ // Note, if we have a symbol context & a symbol, we don't want to follow this code path. This is // for jumping to memory regions without any information available. - if ((!m_sym_ctx_valid || (m_sym_ctx.function == NULL && m_sym_ctx.symbol == NULL)) && behaves_like_zeroth_frame && m_current_pc.IsValid()) + if ((!m_sym_ctx_valid || (m_sym_ctx.function == nullptr && m_sym_ctx.symbol == nullptr)) && behaves_like_zeroth_frame && m_current_pc.IsValid()) { uint32_t permissions; addr_t current_pc_addr = m_current_pc.GetLoadAddress (exe_ctx.GetTargetPtr()); @@ -727,7 +727,7 @@ // No Module for the current pc, try using the architecture default unwind. ModuleSP pc_module_sp (m_current_pc.GetModule()); - if (!m_current_pc.IsValid() || !pc_module_sp || pc_module_sp->GetObjectFile() == NULL) + if (!m_current_pc.IsValid() || !pc_module_sp || pc_module_sp->GetObjectFile() == nullptr) { m_frame_type = eNormalFrame; return arch_default_unwind_plan_sp; @@ -1229,7 +1229,7 @@ { // If a volatile register is being requested, we don't want to forward the next frame's register contents // up the stack -- the register is not retrievable at this frame. - ABI *abi = process ? process->GetABI().get() : NULL; + ABI *abi = process ? process->GetABI().get() : nullptr; if (abi) { const RegisterInfo *reg_info = GetRegisterInfoAtIndex(lldb_regnum); @@ -1326,7 +1326,7 @@ dwarfexpr.SetRegisterKind (unwindplan_registerkind); Value result; Error error; - if (dwarfexpr.Evaluate (&exe_ctx, NULL, NULL, this, 0, NULL, result, &error)) + if (dwarfexpr.Evaluate (&exe_ctx, nullptr, nullptr, this, 0, nullptr, result, &error)) { addr_t val; val = result.GetScalar().ULongLong(); @@ -1370,7 +1370,7 @@ RegisterContextLLDB::TryFallbackUnwindPlan () { UnwindPlan::Row::RegisterLocation unwindplan_regloc; - if (m_fallback_unwind_plan_sp.get() == NULL) + if (m_fallback_unwind_plan_sp.get() == nullptr) return false; UnwindPlanSP original_full_unwind_plan_sp = m_full_unwind_plan_sp; @@ -1627,7 +1627,7 @@ va_start (args, fmt); char *logmsg; - if (vasprintf (&logmsg, fmt, args) == -1 || logmsg == NULL) + if (vasprintf (&logmsg, fmt, args) == -1 || logmsg == nullptr) { if (logmsg) free (logmsg); @@ -1653,7 +1653,7 @@ va_start (args, fmt); char *logmsg; - if (vasprintf (&logmsg, fmt, args) == -1 || logmsg == NULL) + if (vasprintf (&logmsg, fmt, args) == -1 || logmsg == nullptr) { if (logmsg) free (logmsg); Index: source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp +++ source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp @@ -119,6 +119,6 @@ return g_register_infos_i386; default: assert(false && "Unhandled target architecture."); - return NULL; + return nullptr; } } Index: source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp +++ source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp @@ -131,7 +131,7 @@ return g_register_infos_x86_64; default: assert(false && "Unhandled target architecture."); - return NULL; + return nullptr; } } Index: source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp +++ source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp @@ -163,7 +163,7 @@ if (reg < k_num_registers_mips64) return &GetRegisterInfo()[reg]; else - return NULL; + return nullptr; } size_t @@ -185,7 +185,7 @@ if (IsRegisterSetAvailable(set)) return &g_reg_sets_mips64[set]; else - return NULL; + return nullptr; } const char * Index: source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp +++ source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp @@ -513,7 +513,7 @@ if (reg < m_reg_info.num_registers) return &GetRegisterInfo()[reg]; else - return NULL; + return nullptr; } size_t @@ -542,10 +542,10 @@ return &g_reg_sets_x86_64[set]; default: assert(false && "Unhandled target architecture."); - return NULL; + return nullptr; } } - return NULL; + return nullptr; } const char * Index: source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp =================================================================== --- source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp +++ source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp @@ -100,7 +100,7 @@ UpdateRegisterContext (); if (m_reg_ctx_sp) return m_reg_ctx_sp->GetRegisterInfoAtIndex(reg); - return NULL; + return nullptr; } size_t @@ -118,7 +118,7 @@ UpdateRegisterContext (); if (m_reg_ctx_sp) return m_reg_ctx_sp->GetRegisterSet(reg_set); - return NULL; + return nullptr; } bool Index: source/Plugins/Process/Utility/RegisterInfos_i386.h =================================================================== --- source/Plugins/Process/Utility/RegisterInfos_i386.h +++ source/Plugins/Process/Utility/RegisterInfos_i386.h @@ -94,22 +94,22 @@ g_register_infos_i386[] = { // General purpose registers. - DEFINE_GPR(eax, NULL, gcc_eax_i386, dwarf_eax_i386, LLDB_INVALID_REGNUM, gdb_eax_i386), - DEFINE_GPR(ebx, NULL, gcc_ebx_i386, dwarf_ebx_i386, LLDB_INVALID_REGNUM, gdb_ebx_i386), - DEFINE_GPR(ecx, NULL, gcc_ecx_i386, dwarf_ecx_i386, LLDB_INVALID_REGNUM, gdb_ecx_i386), - DEFINE_GPR(edx, NULL, gcc_edx_i386, dwarf_edx_i386, LLDB_INVALID_REGNUM, gdb_edx_i386), - DEFINE_GPR(edi, NULL, gcc_edi_i386, dwarf_edi_i386, LLDB_INVALID_REGNUM, gdb_edi_i386), - DEFINE_GPR(esi, NULL, gcc_esi_i386, dwarf_esi_i386, LLDB_INVALID_REGNUM, gdb_esi_i386), + DEFINE_GPR(eax, nullptr, gcc_eax_i386, dwarf_eax_i386, LLDB_INVALID_REGNUM, gdb_eax_i386), + DEFINE_GPR(ebx, nullptr, gcc_ebx_i386, dwarf_ebx_i386, LLDB_INVALID_REGNUM, gdb_ebx_i386), + DEFINE_GPR(ecx, nullptr, gcc_ecx_i386, dwarf_ecx_i386, LLDB_INVALID_REGNUM, gdb_ecx_i386), + DEFINE_GPR(edx, nullptr, gcc_edx_i386, dwarf_edx_i386, LLDB_INVALID_REGNUM, gdb_edx_i386), + DEFINE_GPR(edi, nullptr, gcc_edi_i386, dwarf_edi_i386, LLDB_INVALID_REGNUM, gdb_edi_i386), + DEFINE_GPR(esi, nullptr, gcc_esi_i386, dwarf_esi_i386, LLDB_INVALID_REGNUM, gdb_esi_i386), DEFINE_GPR(ebp, "fp", gcc_ebp_i386, dwarf_ebp_i386, LLDB_REGNUM_GENERIC_FP, gdb_ebp_i386), DEFINE_GPR(esp, "sp", gcc_esp_i386, dwarf_esp_i386, LLDB_REGNUM_GENERIC_SP, gdb_esp_i386), DEFINE_GPR(eip, "pc", gcc_eip_i386, dwarf_eip_i386, LLDB_REGNUM_GENERIC_PC, gdb_eip_i386), DEFINE_GPR(eflags, "flags", gcc_eflags_i386, dwarf_eflags_i386, LLDB_REGNUM_GENERIC_FLAGS, gdb_eflags_i386), - DEFINE_GPR(cs, NULL, LLDB_INVALID_REGNUM, dwarf_cs_i386, LLDB_INVALID_REGNUM, gdb_cs_i386), - DEFINE_GPR(fs, NULL, LLDB_INVALID_REGNUM, dwarf_fs_i386, LLDB_INVALID_REGNUM, gdb_fs_i386), - DEFINE_GPR(gs, NULL, LLDB_INVALID_REGNUM, dwarf_gs_i386, LLDB_INVALID_REGNUM, gdb_gs_i386), - DEFINE_GPR(ss, NULL, LLDB_INVALID_REGNUM, dwarf_ss_i386, LLDB_INVALID_REGNUM, gdb_ss_i386), - DEFINE_GPR(ds, NULL, LLDB_INVALID_REGNUM, dwarf_ds_i386, LLDB_INVALID_REGNUM, gdb_ds_i386), - DEFINE_GPR(es, NULL, LLDB_INVALID_REGNUM, dwarf_es_i386, LLDB_INVALID_REGNUM, gdb_es_i386), + DEFINE_GPR(cs, nullptr, LLDB_INVALID_REGNUM, dwarf_cs_i386, LLDB_INVALID_REGNUM, gdb_cs_i386), + DEFINE_GPR(fs, nullptr, LLDB_INVALID_REGNUM, dwarf_fs_i386, LLDB_INVALID_REGNUM, gdb_fs_i386), + DEFINE_GPR(gs, nullptr, LLDB_INVALID_REGNUM, dwarf_gs_i386, LLDB_INVALID_REGNUM, gdb_gs_i386), + DEFINE_GPR(ss, nullptr, LLDB_INVALID_REGNUM, dwarf_ss_i386, LLDB_INVALID_REGNUM, gdb_ss_i386), + DEFINE_GPR(ds, nullptr, LLDB_INVALID_REGNUM, dwarf_ds_i386, LLDB_INVALID_REGNUM, gdb_ds_i386), + DEFINE_GPR(es, nullptr, LLDB_INVALID_REGNUM, dwarf_es_i386, LLDB_INVALID_REGNUM, gdb_es_i386), DEFINE_GPR_PSEUDO_16(ax, eax), DEFINE_GPR_PSEUDO_16(bx, ebx), Index: source/Plugins/Process/Utility/RegisterInfos_mips64.h =================================================================== --- source/Plugins/Process/Utility/RegisterInfos_mips64.h +++ source/Plugins/Process/Utility/RegisterInfos_mips64.h @@ -25,45 +25,45 @@ { // General purpose registers. GCC, DWARF, Generic, GDB DEFINE_GPR(zero, "r0", gcc_dwarf_zero_mips64, gcc_dwarf_zero_mips64, LLDB_INVALID_REGNUM, gdb_zero_mips64), - DEFINE_GPR(r1, NULL, gcc_dwarf_r1_mips64, gcc_dwarf_r1_mips64, LLDB_INVALID_REGNUM, gdb_r1_mips64), - DEFINE_GPR(r2, NULL, gcc_dwarf_r2_mips64, gcc_dwarf_r2_mips64, LLDB_INVALID_REGNUM, gdb_r2_mips64), - DEFINE_GPR(r3, NULL, gcc_dwarf_r3_mips64, gcc_dwarf_r3_mips64, LLDB_INVALID_REGNUM, gdb_r3_mips64), - DEFINE_GPR(r4, NULL, gcc_dwarf_r4_mips64, gcc_dwarf_r4_mips64, LLDB_INVALID_REGNUM, gdb_r4_mips64), - DEFINE_GPR(r5, NULL, gcc_dwarf_r5_mips64, gcc_dwarf_r5_mips64, LLDB_INVALID_REGNUM, gdb_r5_mips64), - DEFINE_GPR(r6, NULL, gcc_dwarf_r6_mips64, gcc_dwarf_r6_mips64, LLDB_INVALID_REGNUM, gdb_r6_mips64), - DEFINE_GPR(r7, NULL, gcc_dwarf_r7_mips64, gcc_dwarf_r7_mips64, LLDB_INVALID_REGNUM, gdb_r7_mips64), - DEFINE_GPR(r8, NULL, gcc_dwarf_r8_mips64, gcc_dwarf_r8_mips64, LLDB_INVALID_REGNUM, gdb_r8_mips64), - DEFINE_GPR(r9, NULL, gcc_dwarf_r9_mips64, gcc_dwarf_r9_mips64, LLDB_INVALID_REGNUM, gdb_r9_mips64), - DEFINE_GPR(r10, NULL, gcc_dwarf_r10_mips64, gcc_dwarf_r10_mips64, LLDB_INVALID_REGNUM, gdb_r10_mips64), - DEFINE_GPR(r11, NULL, gcc_dwarf_r11_mips64, gcc_dwarf_r11_mips64, LLDB_INVALID_REGNUM, gdb_r11_mips64), - DEFINE_GPR(r12, NULL, gcc_dwarf_r12_mips64, gcc_dwarf_r12_mips64, LLDB_INVALID_REGNUM, gdb_r12_mips64), - DEFINE_GPR(r13, NULL, gcc_dwarf_r13_mips64, gcc_dwarf_r13_mips64, LLDB_INVALID_REGNUM, gdb_r13_mips64), - DEFINE_GPR(r14, NULL, gcc_dwarf_r14_mips64, gcc_dwarf_r14_mips64, LLDB_INVALID_REGNUM, gdb_r14_mips64), - DEFINE_GPR(r15, NULL, gcc_dwarf_r15_mips64, gcc_dwarf_r15_mips64, LLDB_INVALID_REGNUM, gdb_r15_mips64), - DEFINE_GPR(r16, NULL, gcc_dwarf_r16_mips64, gcc_dwarf_r16_mips64, LLDB_INVALID_REGNUM, gdb_r16_mips64), - DEFINE_GPR(r17, NULL, gcc_dwarf_r17_mips64, gcc_dwarf_r17_mips64, LLDB_INVALID_REGNUM, gdb_r17_mips64), - DEFINE_GPR(r18, NULL, gcc_dwarf_r18_mips64, gcc_dwarf_r18_mips64, LLDB_INVALID_REGNUM, gdb_r18_mips64), - DEFINE_GPR(r19, NULL, gcc_dwarf_r19_mips64, gcc_dwarf_r19_mips64, LLDB_INVALID_REGNUM, gdb_r19_mips64), - DEFINE_GPR(r20, NULL, gcc_dwarf_r20_mips64, gcc_dwarf_r20_mips64, LLDB_INVALID_REGNUM, gdb_r20_mips64), - DEFINE_GPR(r21, NULL, gcc_dwarf_r21_mips64, gcc_dwarf_r21_mips64, LLDB_INVALID_REGNUM, gdb_r21_mips64), - DEFINE_GPR(r22, NULL, gcc_dwarf_r22_mips64, gcc_dwarf_r22_mips64, LLDB_INVALID_REGNUM, gdb_r22_mips64), - DEFINE_GPR(r23, NULL, gcc_dwarf_r23_mips64, gcc_dwarf_r23_mips64, LLDB_INVALID_REGNUM, gdb_r23_mips64), - DEFINE_GPR(r24, NULL, gcc_dwarf_r24_mips64, gcc_dwarf_r24_mips64, LLDB_INVALID_REGNUM, gdb_r24_mips64), - DEFINE_GPR(r25, NULL, gcc_dwarf_r25_mips64, gcc_dwarf_r25_mips64, LLDB_INVALID_REGNUM, gdb_r25_mips64), - DEFINE_GPR(r26, NULL, gcc_dwarf_r26_mips64, gcc_dwarf_r26_mips64, LLDB_INVALID_REGNUM, gdb_r26_mips64), - DEFINE_GPR(r27, NULL, gcc_dwarf_r27_mips64, gcc_dwarf_r27_mips64, LLDB_INVALID_REGNUM, gdb_r27_mips64), + DEFINE_GPR(r1, nullptr, gcc_dwarf_r1_mips64, gcc_dwarf_r1_mips64, LLDB_INVALID_REGNUM, gdb_r1_mips64), + DEFINE_GPR(r2, nullptr, gcc_dwarf_r2_mips64, gcc_dwarf_r2_mips64, LLDB_INVALID_REGNUM, gdb_r2_mips64), + DEFINE_GPR(r3, nullptr, gcc_dwarf_r3_mips64, gcc_dwarf_r3_mips64, LLDB_INVALID_REGNUM, gdb_r3_mips64), + DEFINE_GPR(r4, nullptr, gcc_dwarf_r4_mips64, gcc_dwarf_r4_mips64, LLDB_INVALID_REGNUM, gdb_r4_mips64), + DEFINE_GPR(r5, nullptr, gcc_dwarf_r5_mips64, gcc_dwarf_r5_mips64, LLDB_INVALID_REGNUM, gdb_r5_mips64), + DEFINE_GPR(r6, nullptr, gcc_dwarf_r6_mips64, gcc_dwarf_r6_mips64, LLDB_INVALID_REGNUM, gdb_r6_mips64), + DEFINE_GPR(r7, nullptr, gcc_dwarf_r7_mips64, gcc_dwarf_r7_mips64, LLDB_INVALID_REGNUM, gdb_r7_mips64), + DEFINE_GPR(r8, nullptr, gcc_dwarf_r8_mips64, gcc_dwarf_r8_mips64, LLDB_INVALID_REGNUM, gdb_r8_mips64), + DEFINE_GPR(r9, nullptr, gcc_dwarf_r9_mips64, gcc_dwarf_r9_mips64, LLDB_INVALID_REGNUM, gdb_r9_mips64), + DEFINE_GPR(r10, nullptr, gcc_dwarf_r10_mips64, gcc_dwarf_r10_mips64, LLDB_INVALID_REGNUM, gdb_r10_mips64), + DEFINE_GPR(r11, nullptr, gcc_dwarf_r11_mips64, gcc_dwarf_r11_mips64, LLDB_INVALID_REGNUM, gdb_r11_mips64), + DEFINE_GPR(r12, nullptr, gcc_dwarf_r12_mips64, gcc_dwarf_r12_mips64, LLDB_INVALID_REGNUM, gdb_r12_mips64), + DEFINE_GPR(r13, nullptr, gcc_dwarf_r13_mips64, gcc_dwarf_r13_mips64, LLDB_INVALID_REGNUM, gdb_r13_mips64), + DEFINE_GPR(r14, nullptr, gcc_dwarf_r14_mips64, gcc_dwarf_r14_mips64, LLDB_INVALID_REGNUM, gdb_r14_mips64), + DEFINE_GPR(r15, nullptr, gcc_dwarf_r15_mips64, gcc_dwarf_r15_mips64, LLDB_INVALID_REGNUM, gdb_r15_mips64), + DEFINE_GPR(r16, nullptr, gcc_dwarf_r16_mips64, gcc_dwarf_r16_mips64, LLDB_INVALID_REGNUM, gdb_r16_mips64), + DEFINE_GPR(r17, nullptr, gcc_dwarf_r17_mips64, gcc_dwarf_r17_mips64, LLDB_INVALID_REGNUM, gdb_r17_mips64), + DEFINE_GPR(r18, nullptr, gcc_dwarf_r18_mips64, gcc_dwarf_r18_mips64, LLDB_INVALID_REGNUM, gdb_r18_mips64), + DEFINE_GPR(r19, nullptr, gcc_dwarf_r19_mips64, gcc_dwarf_r19_mips64, LLDB_INVALID_REGNUM, gdb_r19_mips64), + DEFINE_GPR(r20, nullptr, gcc_dwarf_r20_mips64, gcc_dwarf_r20_mips64, LLDB_INVALID_REGNUM, gdb_r20_mips64), + DEFINE_GPR(r21, nullptr, gcc_dwarf_r21_mips64, gcc_dwarf_r21_mips64, LLDB_INVALID_REGNUM, gdb_r21_mips64), + DEFINE_GPR(r22, nullptr, gcc_dwarf_r22_mips64, gcc_dwarf_r22_mips64, LLDB_INVALID_REGNUM, gdb_r22_mips64), + DEFINE_GPR(r23, nullptr, gcc_dwarf_r23_mips64, gcc_dwarf_r23_mips64, LLDB_INVALID_REGNUM, gdb_r23_mips64), + DEFINE_GPR(r24, nullptr, gcc_dwarf_r24_mips64, gcc_dwarf_r24_mips64, LLDB_INVALID_REGNUM, gdb_r24_mips64), + DEFINE_GPR(r25, nullptr, gcc_dwarf_r25_mips64, gcc_dwarf_r25_mips64, LLDB_INVALID_REGNUM, gdb_r25_mips64), + DEFINE_GPR(r26, nullptr, gcc_dwarf_r26_mips64, gcc_dwarf_r26_mips64, LLDB_INVALID_REGNUM, gdb_r26_mips64), + DEFINE_GPR(r27, nullptr, gcc_dwarf_r27_mips64, gcc_dwarf_r27_mips64, LLDB_INVALID_REGNUM, gdb_r27_mips64), DEFINE_GPR(gp, "r28", gcc_dwarf_gp_mips64, gcc_dwarf_gp_mips64, LLDB_INVALID_REGNUM, gdb_gp_mips64), DEFINE_GPR(sp, "r29", gcc_dwarf_sp_mips64, gcc_dwarf_sp_mips64, LLDB_REGNUM_GENERIC_SP, gdb_sp_mips64), - DEFINE_GPR(r30, NULL, gcc_dwarf_r30_mips64, gcc_dwarf_r30_mips64, LLDB_INVALID_REGNUM, gdb_r30_mips64), + DEFINE_GPR(r30, nullptr, gcc_dwarf_r30_mips64, gcc_dwarf_r30_mips64, LLDB_INVALID_REGNUM, gdb_r30_mips64), DEFINE_GPR(ra, "r31", gcc_dwarf_ra_mips64, gcc_dwarf_ra_mips64, LLDB_INVALID_REGNUM, gdb_ra_mips64), - DEFINE_GPR(sr, NULL, gcc_dwarf_sr_mips64, gcc_dwarf_sr_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR(mullo, NULL, gcc_dwarf_lo_mips64, gcc_dwarf_lo_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR(mulhi, NULL, gcc_dwarf_hi_mips64, gcc_dwarf_hi_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR(badvaddr, NULL, gcc_dwarf_bad_mips64, gcc_dwarf_bad_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR(cause, NULL, gcc_dwarf_cause_mips64, gcc_dwarf_cause_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), + DEFINE_GPR(sr, nullptr, gcc_dwarf_sr_mips64, gcc_dwarf_sr_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), + DEFINE_GPR(mullo, nullptr, gcc_dwarf_lo_mips64, gcc_dwarf_lo_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), + DEFINE_GPR(mulhi, nullptr, gcc_dwarf_hi_mips64, gcc_dwarf_hi_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), + DEFINE_GPR(badvaddr, nullptr, gcc_dwarf_bad_mips64, gcc_dwarf_bad_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), + DEFINE_GPR(cause, nullptr, gcc_dwarf_cause_mips64, gcc_dwarf_cause_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), DEFINE_GPR(pc, "pc", gcc_dwarf_pc_mips64, gcc_dwarf_pc_mips64, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM), - DEFINE_GPR(ic, NULL, gcc_dwarf_ic_mips64, gcc_dwarf_ic_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR(dummy, NULL, gcc_dwarf_dummy_mips64, gcc_dwarf_dummy_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), + DEFINE_GPR(ic, nullptr, gcc_dwarf_ic_mips64, gcc_dwarf_ic_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), + DEFINE_GPR(dummy, nullptr, gcc_dwarf_dummy_mips64, gcc_dwarf_dummy_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), }; static_assert((sizeof(g_register_infos_mips64) / sizeof(g_register_infos_mips64[0])) == k_num_registers_mips64, "g_register_infos_mips64 has wrong number of register infos"); Index: source/Plugins/Process/Utility/RegisterInfos_x86_64.h =================================================================== --- source/Plugins/Process/Utility/RegisterInfos_x86_64.h +++ source/Plugins/Process/Utility/RegisterInfos_x86_64.h @@ -94,8 +94,8 @@ g_register_infos_x86_64[] = { // General purpose registers. GCC, DWARF, Generic, GDB - DEFINE_GPR(rax, NULL, gcc_dwarf_rax_x86_64, gcc_dwarf_rax_x86_64, LLDB_INVALID_REGNUM, gdb_rax_x86_64), - DEFINE_GPR(rbx, NULL, gcc_dwarf_rbx_x86_64, gcc_dwarf_rbx_x86_64, LLDB_INVALID_REGNUM, gdb_rbx_x86_64), + DEFINE_GPR(rax, nullptr, gcc_dwarf_rax_x86_64, gcc_dwarf_rax_x86_64, LLDB_INVALID_REGNUM, gdb_rax_x86_64), + DEFINE_GPR(rbx, nullptr, gcc_dwarf_rbx_x86_64, gcc_dwarf_rbx_x86_64, LLDB_INVALID_REGNUM, gdb_rbx_x86_64), DEFINE_GPR(rcx, "arg4", gcc_dwarf_rcx_x86_64, gcc_dwarf_rcx_x86_64, LLDB_REGNUM_GENERIC_ARG4, gdb_rcx_x86_64), DEFINE_GPR(rdx, "arg3", gcc_dwarf_rdx_x86_64, gcc_dwarf_rdx_x86_64, LLDB_REGNUM_GENERIC_ARG3, gdb_rdx_x86_64), DEFINE_GPR(rdi, "arg1", gcc_dwarf_rdi_x86_64, gcc_dwarf_rdi_x86_64, LLDB_REGNUM_GENERIC_ARG1, gdb_rdi_x86_64), @@ -104,20 +104,20 @@ DEFINE_GPR(rsp, "sp", gcc_dwarf_rsp_x86_64, gcc_dwarf_rsp_x86_64, LLDB_REGNUM_GENERIC_SP, gdb_rsp_x86_64), DEFINE_GPR(r8, "arg5", gcc_dwarf_r8_x86_64, gcc_dwarf_r8_x86_64, LLDB_REGNUM_GENERIC_ARG5, gdb_r8_x86_64), DEFINE_GPR(r9, "arg6", gcc_dwarf_r9_x86_64, gcc_dwarf_r9_x86_64, LLDB_REGNUM_GENERIC_ARG6, gdb_r9_x86_64), - DEFINE_GPR(r10, NULL, gcc_dwarf_r10_x86_64, gcc_dwarf_r10_x86_64, LLDB_INVALID_REGNUM, gdb_r10_x86_64), - DEFINE_GPR(r11, NULL, gcc_dwarf_r11_x86_64, gcc_dwarf_r11_x86_64, LLDB_INVALID_REGNUM, gdb_r11_x86_64), - DEFINE_GPR(r12, NULL, gcc_dwarf_r12_x86_64, gcc_dwarf_r12_x86_64, LLDB_INVALID_REGNUM, gdb_r12_x86_64), - DEFINE_GPR(r13, NULL, gcc_dwarf_r13_x86_64, gcc_dwarf_r13_x86_64, LLDB_INVALID_REGNUM, gdb_r13_x86_64), - DEFINE_GPR(r14, NULL, gcc_dwarf_r14_x86_64, gcc_dwarf_r14_x86_64, LLDB_INVALID_REGNUM, gdb_r14_x86_64), - DEFINE_GPR(r15, NULL, gcc_dwarf_r15_x86_64, gcc_dwarf_r15_x86_64, LLDB_INVALID_REGNUM, gdb_r15_x86_64), + DEFINE_GPR(r10, nullptr, gcc_dwarf_r10_x86_64, gcc_dwarf_r10_x86_64, LLDB_INVALID_REGNUM, gdb_r10_x86_64), + DEFINE_GPR(r11, nullptr, gcc_dwarf_r11_x86_64, gcc_dwarf_r11_x86_64, LLDB_INVALID_REGNUM, gdb_r11_x86_64), + DEFINE_GPR(r12, nullptr, gcc_dwarf_r12_x86_64, gcc_dwarf_r12_x86_64, LLDB_INVALID_REGNUM, gdb_r12_x86_64), + DEFINE_GPR(r13, nullptr, gcc_dwarf_r13_x86_64, gcc_dwarf_r13_x86_64, LLDB_INVALID_REGNUM, gdb_r13_x86_64), + DEFINE_GPR(r14, nullptr, gcc_dwarf_r14_x86_64, gcc_dwarf_r14_x86_64, LLDB_INVALID_REGNUM, gdb_r14_x86_64), + DEFINE_GPR(r15, nullptr, gcc_dwarf_r15_x86_64, gcc_dwarf_r15_x86_64, LLDB_INVALID_REGNUM, gdb_r15_x86_64), DEFINE_GPR(rip, "pc", gcc_dwarf_rip_x86_64, gcc_dwarf_rip_x86_64, LLDB_REGNUM_GENERIC_PC, gdb_rip_x86_64), DEFINE_GPR(rflags, "flags", gcc_dwarf_rflags_x86_64, gcc_dwarf_rflags_x86_64, LLDB_REGNUM_GENERIC_FLAGS, gdb_rflags_x86_64), - DEFINE_GPR(cs, NULL, gcc_dwarf_cs_x86_64, gcc_dwarf_cs_x86_64, LLDB_INVALID_REGNUM, gdb_cs_x86_64), - DEFINE_GPR(fs, NULL, gcc_dwarf_fs_x86_64, gcc_dwarf_fs_x86_64, LLDB_INVALID_REGNUM, gdb_fs_x86_64), - DEFINE_GPR(gs, NULL, gcc_dwarf_gs_x86_64, gcc_dwarf_gs_x86_64, LLDB_INVALID_REGNUM, gdb_gs_x86_64), - DEFINE_GPR(ss, NULL, gcc_dwarf_ss_x86_64, gcc_dwarf_ss_x86_64, LLDB_INVALID_REGNUM, gdb_ss_x86_64), - DEFINE_GPR(ds, NULL, gcc_dwarf_ds_x86_64, gcc_dwarf_ds_x86_64, LLDB_INVALID_REGNUM, gdb_ds_x86_64), - DEFINE_GPR(es, NULL, gcc_dwarf_es_x86_64, gcc_dwarf_es_x86_64, LLDB_INVALID_REGNUM, gdb_es_x86_64), + DEFINE_GPR(cs, nullptr, gcc_dwarf_cs_x86_64, gcc_dwarf_cs_x86_64, LLDB_INVALID_REGNUM, gdb_cs_x86_64), + DEFINE_GPR(fs, nullptr, gcc_dwarf_fs_x86_64, gcc_dwarf_fs_x86_64, LLDB_INVALID_REGNUM, gdb_fs_x86_64), + DEFINE_GPR(gs, nullptr, gcc_dwarf_gs_x86_64, gcc_dwarf_gs_x86_64, LLDB_INVALID_REGNUM, gdb_gs_x86_64), + DEFINE_GPR(ss, nullptr, gcc_dwarf_ss_x86_64, gcc_dwarf_ss_x86_64, LLDB_INVALID_REGNUM, gdb_ss_x86_64), + DEFINE_GPR(ds, nullptr, gcc_dwarf_ds_x86_64, gcc_dwarf_ds_x86_64, LLDB_INVALID_REGNUM, gdb_ds_x86_64), + DEFINE_GPR(es, nullptr, gcc_dwarf_es_x86_64, gcc_dwarf_es_x86_64, LLDB_INVALID_REGNUM, gdb_es_x86_64), DEFINE_GPR_PSEUDO_32(eax, rax), DEFINE_GPR_PSEUDO_32(ebx, rbx), Index: source/Plugins/Process/Utility/StopInfoMachException.cpp =================================================================== --- source/Plugins/Process/Utility/StopInfoMachException.cpp +++ source/Plugins/Process/Utility/StopInfoMachException.cpp @@ -38,11 +38,11 @@ Target *target = exe_ctx.GetTargetPtr(); const llvm::Triple::ArchType cpu = target ? target->GetArchitecture().GetMachine() : llvm::Triple::UnknownArch; - const char *exc_desc = NULL; + const char *exc_desc = nullptr; const char *code_label = "code"; - const char *code_desc = NULL; + const char *code_desc = nullptr; const char *subcode_label = "subcode"; - const char *subcode_desc = NULL; + const char *subcode_desc = nullptr; switch (m_value) { case 1: // EXC_BAD_ACCESS Index: source/Plugins/Process/Utility/ThreadMemory.h =================================================================== --- source/Plugins/Process/Utility/ThreadMemory.h +++ source/Plugins/Process/Utility/ThreadMemory.h @@ -47,7 +47,7 @@ { if (m_backing_thread_sp) m_backing_thread_sp->GetInfo(); - return NULL; + return nullptr; } virtual const char * @@ -57,7 +57,7 @@ return m_name.c_str(); if (m_backing_thread_sp) m_backing_thread_sp->GetName(); - return NULL; + return nullptr; } virtual const char * @@ -67,7 +67,7 @@ return m_queue.c_str(); if (m_backing_thread_sp) m_backing_thread_sp->GetQueueName(); - return NULL; + return nullptr; } virtual void Index: source/Plugins/Process/Utility/UnwindLLDB.cpp =================================================================== --- source/Plugins/Process/Utility/UnwindLLDB.cpp +++ source/Plugins/Process/Utility/UnwindLLDB.cpp @@ -57,7 +57,7 @@ return 0; ProcessSP process_sp (m_thread.GetProcess()); - ABI *abi = process_sp ? process_sp->GetABI().get() : NULL; + ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr; while (AddOneMoreFrame (abi)) { @@ -91,7 +91,7 @@ RegisterContextLLDBSP(), first_cursor_sp->sctx, 0, *this)); - if (reg_ctx_sp.get() == NULL) + if (reg_ctx_sp.get() == nullptr) goto unwind_done; if (!reg_ctx_sp->IsValid()) @@ -156,7 +156,7 @@ goto unwind_done; } - if (reg_ctx_sp.get() == NULL) + if (reg_ctx_sp.get() == nullptr) { // If the RegisterContextLLDB has a fallback UnwindPlan, it will switch to that and return // true. Subsequent calls to TryFallbackUnwindPlan() will return false. @@ -285,7 +285,7 @@ } ProcessSP process_sp (m_thread.GetProcess()); - ABI *abi = process_sp ? process_sp->GetABI().get() : NULL; + ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr; while (idx >= m_frames.size() && AddOneMoreFrame (abi)) ; @@ -317,7 +317,7 @@ } ProcessSP process_sp (m_thread.GetProcess()); - ABI *abi = process_sp ? process_sp->GetABI().get() : NULL; + ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr; while (idx >= m_frames.size()) { Index: source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp =================================================================== --- source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp +++ source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp @@ -91,7 +91,7 @@ StackFrame *first_frame = exe_ctx.GetFramePtr(); Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) return 0; std::pair fp_pc_pair; @@ -138,7 +138,7 @@ eSymbolContextSymbol; SymbolContext first_frame_sc (first_frame->GetSymbolContext(resolve_scope)); - const AddressRange *addr_range_ptr = NULL; + const AddressRange *addr_range_ptr = nullptr; AddressRange range; if (first_frame_sc.function) addr_range_ptr = &first_frame_sc.function->GetAddressRange(); @@ -188,7 +188,7 @@ m_cursors.clear(); Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) return 0; StackFrame *first_frame = exe_ctx.GetFramePtr(); @@ -237,7 +237,7 @@ eSymbolContextSymbol; SymbolContext first_frame_sc(first_frame->GetSymbolContext(resolve_scope)); - const AddressRange *addr_range_ptr = NULL; + const AddressRange *addr_range_ptr = nullptr; AddressRange range; if (first_frame_sc.function) addr_range_ptr = &first_frame_sc.function->GetAddressRange(); Index: source/Plugins/Process/elf-core/ProcessElfCore.cpp =================================================================== --- source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -86,7 +86,7 @@ { ModuleSpec core_module_spec(m_core_file, target.GetArchitecture()); Error error (ModuleList::GetSharedModule (core_module_spec, m_core_module_sp, - NULL, NULL, NULL)); + nullptr, nullptr, nullptr)); if (m_core_module_sp) { ObjectFile *core_objfile = m_core_module_sp->GetObjectFile(); @@ -180,7 +180,7 @@ } ObjectFileELF *core = (ObjectFileELF *)(m_core_module_sp->GetObjectFile()); - if (core == NULL) + if (core == nullptr) { error.SetErrorString ("invalid core object file"); return error; @@ -205,7 +205,7 @@ for(uint32_t i = 1; i <= num_segments; i++) { const elf::ELFProgramHeader *header = core->GetProgramHeaderByIndex(i); - assert(header != NULL); + assert(header != nullptr); DataExtractor data = core->GetSegmentDataByIndex(i); @@ -247,7 +247,7 @@ lldb_private::DynamicLoader * ProcessElfCore::GetDynamicLoader () { - if (m_dyld_ap.get() == NULL) + if (m_dyld_ap.get() == nullptr) m_dyld_ap.reset (DynamicLoader::FindPlugin(this, DynamicLoaderPOSIXDYLD::GetPluginNameStatic().GetCString())); return m_dyld_ap.get(); } @@ -305,12 +305,12 @@ { ObjectFile *core_objfile = m_core_module_sp->GetObjectFile(); - if (core_objfile == NULL) + if (core_objfile == nullptr) return 0; // Get the address range const VMRangeToFileOffset::Entry *address_range = m_core_aranges.FindEntryThatContains (addr); - if (address_range == NULL || address_range->GetRangeEnd() < addr) + if (address_range == nullptr || address_range->GetRangeEnd() < addr) { error.SetErrorStringWithFormat ("core file does not contain 0x%" PRIx64, addr); return 0; Index: source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp =================================================================== --- source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp +++ source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp @@ -37,7 +37,7 @@ bool RegisterContextCorePOSIX_x86_64::ReadGPR() { - return m_gpregset != NULL; + return m_gpregset != nullptr; } bool Index: source/Plugins/Process/elf-core/ThreadElfCore.h =================================================================== --- source/Plugins/Process/elf-core/ThreadElfCore.h +++ source/Plugins/Process/elf-core/ThreadElfCore.h @@ -146,7 +146,7 @@ GetName () { if (m_thread_name.empty()) - return NULL; + return nullptr; return m_thread_name.c_str(); } Index: source/Plugins/Process/elf-core/ThreadElfCore.cpp =================================================================== --- source/Plugins/Process/elf-core/ThreadElfCore.cpp +++ source/Plugins/Process/elf-core/ThreadElfCore.cpp @@ -63,8 +63,8 @@ RegisterContextSP ThreadElfCore::GetRegisterContext () { - if (m_reg_context_sp.get() == NULL) { - m_reg_context_sp = CreateRegisterContextForFrame (NULL); + if (m_reg_context_sp.get() == nullptr) { + m_reg_context_sp = CreateRegisterContextForFrame (nullptr); } return m_reg_context_sp; } @@ -86,7 +86,7 @@ ProcessElfCore *process = static_cast(GetProcess().get()); ArchSpec arch = process->GetArchitecture(); - RegisterInfoInterface *reg_interface = NULL; + RegisterInfoInterface *reg_interface = nullptr; switch (arch.GetTriple().getOS()) { Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h @@ -72,7 +72,7 @@ size_t payload_length); bool - GetSequenceMutex (lldb_private::Mutex::Locker& locker, const char *failure_message = NULL); + GetSequenceMutex (lldb_private::Mutex::Locker& locker, const char *failure_message = nullptr); bool CheckForPacket (const uint8_t *src, Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -179,7 +179,7 @@ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS)); ConnectionStatus status = eConnectionStatusSuccess; char ch = '+'; - const size_t bytes_written = Write (&ch, 1, status, NULL); + const size_t bytes_written = Write (&ch, 1, status, nullptr); if (log) log->Printf ("<%4" PRIu64 "> send packet: %c", (uint64_t)bytes_written, ch); m_history.AddPacket (ch, History::ePacketTypeSend, bytes_written); @@ -192,7 +192,7 @@ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS)); ConnectionStatus status = eConnectionStatusSuccess; char ch = '-'; - const size_t bytes_written = Write (&ch, 1, status, NULL); + const size_t bytes_written = Write (&ch, 1, status, nullptr); if (log) log->Printf("<%4" PRIu64 "> send packet: %c", (uint64_t)bytes_written, ch); m_history.AddPacket (ch, History::ePacketTypeSend, bytes_written); @@ -220,7 +220,7 @@ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS)); ConnectionStatus status = eConnectionStatusSuccess; - size_t bytes_written = Write (packet.GetData(), packet.GetSize(), status, NULL); + size_t bytes_written = Write (packet.GetData(), packet.GetSize(), status, nullptr); if (log) { // If logging was just enabled and we have history, then dump out what @@ -281,7 +281,7 @@ bool GDBRemoteCommunication::WaitForNotRunningPrivate (const TimeValue *timeout_ptr) { - return m_private_is_running.WaitForValueEqualTo (false, timeout_ptr, NULL); + return m_private_is_running.WaitForValueEqualTo (false, timeout_ptr, nullptr); } GDBRemoteCommunication::PacketResult @@ -293,7 +293,7 @@ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS | GDBR_LOG_VERBOSE)); // Check for a packet from our cache first without trying any reading... - if (CheckForPacket (NULL, 0, packet)) + if (CheckForPacket (nullptr, 0, packet)) return PacketResult::Success; bool timed_out = false; @@ -519,7 +519,7 @@ if (GetSendAcks ()) { const char *packet_checksum_cstr = &m_bytes[checksum_idx]; - char packet_checksum = strtol (packet_checksum_cstr, NULL, 16); + char packet_checksum = strtol (packet_checksum_cstr, nullptr, 16); char actual_checksum = CalculcateChecksum (packet_str.c_str(), packet_str.size()); success = packet_checksum == actual_checksum; if (!success) @@ -582,7 +582,7 @@ { if (IS_VALID_LLDB_HOST_THREAD(m_listen_thread)) { - Host::ThreadJoin(m_listen_thread, NULL, NULL); + Host::ThreadJoin(m_listen_thread, nullptr, nullptr); m_listen_thread = LLDB_INVALID_HOST_THREAD; } return true; @@ -599,9 +599,9 @@ { // Do the listen on another thread so we can continue on... if (connection->Connect(comm->m_listen_url.c_str(), &error) != eConnectionStatusSuccess) - comm->SetConnection(NULL); + comm->SetConnection(nullptr); } - return NULL; + return nullptr; } Error Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -161,7 +161,7 @@ SendLaunchArchPacket (const char *arch); int - SendLaunchEventDataPacket (const char *data, bool *was_supported = NULL); + SendLaunchEventDataPacket (const char *data, bool *was_supported = nullptr); //------------------------------------------------------------------ /// Sends a "vAttach:PID" where PID is in hex. Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -704,7 +704,7 @@ if (usec_name.compare("thread_used_usec") == 0) { has_used_usec = true; - curr_used_usec = strtoull(usec_value.c_str(), NULL, 0); + curr_used_usec = strtoull(usec_value.c_str(), nullptr, 0); } else { @@ -784,7 +784,7 @@ Mutex::Locker locker(m_sequence_mutex); StateType state = eStateRunning; - BroadcastEvent(eBroadcastBitRunPacketSent, NULL); + BroadcastEvent(eBroadcastBitRunPacketSent, nullptr); m_public_is_running.SetValue (true, eBroadcastNever); // Set the starting continue packet into "continue_packet". This packet // may change if we are interrupted and we continue after an async packet... @@ -1106,7 +1106,7 @@ // inferior to stop, so send the interrupt on the down low... char ctrl_c = '\x03'; ConnectionStatus status = eConnectionStatusSuccess; - size_t bytes_written = Write (&ctrl_c, 1, status, NULL); + size_t bytes_written = Write (&ctrl_c, 1, status, nullptr); if (log) log->PutCString("send packet: \\x03"); if (bytes_written > 0) @@ -1202,7 +1202,7 @@ std::vector argv; FileSpec exe_file = launch_info.GetExecutableFile(); std::string exe_path; - const char *arg = NULL; + const char *arg = nullptr; const Args &launch_args = launch_info.GetArguments(); if (exe_file) exe_path = exe_file.GetPath(); @@ -1215,7 +1215,7 @@ if (!exe_path.empty()) { argv.push_back(exe_path.c_str()); - for (uint32_t i=1; (arg = launch_args.GetArgumentAtIndex(i)) != NULL; ++i) + for (uint32_t i=1; (arg = launch_args.GetArgumentAtIndex(i)) != nullptr; ++i) { if (arg) argv.push_back(arg); @@ -1502,7 +1502,7 @@ if (!m_gdb_server_name.empty()) return m_gdb_server_name.c_str(); } - return NULL; + return nullptr; } uint32_t Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -597,7 +597,7 @@ } else if (key.compare("triple") == 0) { - match_info.GetProcessInfo().GetArchitecture().SetTriple (value.c_str(), NULL); + match_info.GetProcessInfo().GetArchitecture().SetTriple (value.c_str(), nullptr); } else { @@ -930,7 +930,7 @@ debugserver_launch_info.SetMonitorProcessCallback(ReapDebugserverProcess, this, false); - error = StartDebugserverProcess (hostname.empty() ? NULL : hostname.c_str(), + error = StartDebugserverProcess (hostname.empty() ? nullptr : hostname.c_str(), port, debugserver_launch_info, port); @@ -1121,7 +1121,7 @@ if (bytes_left > 0) { const char* arch_triple = packet.Peek(); - ArchSpec arch_spec(arch_triple,NULL); + ArchSpec arch_spec(arch_triple,nullptr); m_process_launch_info.SetArchitecture(arch_spec); return SendOKResponse(); } @@ -1172,7 +1172,7 @@ { // If this packet is sent to a platform, then change the current working directory char cwd[PATH_MAX]; - if (getcwd(cwd, sizeof(cwd)) == NULL) + if (getcwd(cwd, sizeof(cwd)) == nullptr) { return SendErrorResponse(errno); } @@ -1534,7 +1534,7 @@ int status, signo; std::string output; Error err = Host::RunShellCommand(path.c_str(), - working_dir.empty() ? NULL : working_dir.c_str(), + working_dir.empty() ? nullptr : working_dir.c_str(), &status, &signo, &output, timeout); StreamGDBRemote response; if (err.Fail()) Index: source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -127,7 +127,7 @@ GDBRemoteRegisterContext::PrivateSetRegisterValue (uint32_t reg, StringExtractor &response) { const RegisterInfo *reg_info = GetRegisterInfoAtIndex (reg); - if (reg_info == NULL) + if (reg_info == nullptr) return false; // Invalidate if needed @@ -168,7 +168,7 @@ Process *process = exe_ctx.GetProcessPtr(); Thread *thread = exe_ctx.GetThreadPtr(); - if (process == NULL || thread == NULL) + if (process == nullptr || thread == nullptr) return false; GDBRemoteCommunicationClient &gdb_comm (((ProcessGDBRemote *)process)->GetGDBRemote()); @@ -203,7 +203,7 @@ // We have a valid primordial regsiter as our constituent. // Grab the corresponding register info. const RegisterInfo *prim_reg_info = GetRegisterInfoAtIndex(prim_reg); - if (prim_reg_info == NULL) + if (prim_reg_info == nullptr) success = false; else { @@ -313,7 +313,7 @@ Process *process = exe_ctx.GetProcessPtr(); Thread *thread = exe_ctx.GetThreadPtr(); - if (process == NULL || thread == NULL) + if (process == nullptr || thread == nullptr) return false; GDBRemoteCommunicationClient &gdb_comm (((ProcessGDBRemote *)process)->GetGDBRemote()); @@ -326,7 +326,7 @@ // Grab a pointer to where we are going to put this register uint8_t *dst = const_cast(m_reg_data.PeekData(reg_info->byte_offset, reg_info->byte_size)); - if (dst == NULL) + if (dst == nullptr) return false; @@ -393,7 +393,7 @@ // We have a valid primordial regsiter as our constituent. // Grab the corresponding register info. const RegisterInfo *value_reg_info = GetRegisterInfoAtIndex(reg); - if (value_reg_info == NULL) + if (value_reg_info == nullptr) success = false; else success = SetPrimordialRegister(value_reg_info, gdb_comm); @@ -447,7 +447,7 @@ Process *process = exe_ctx.GetProcessPtr(); Thread *thread = exe_ctx.GetThreadPtr(); - if (process == NULL || thread == NULL) + if (process == nullptr || thread == nullptr) return false; GDBRemoteCommunicationClient &gdb_comm (((ProcessGDBRemote *)process)->GetGDBRemote()); @@ -476,7 +476,7 @@ Process *process = exe_ctx.GetProcessPtr(); Thread *thread = exe_ctx.GetThreadPtr(); - if (process == NULL || thread == NULL) + if (process == nullptr || thread == nullptr) return false; GDBRemoteCommunicationClient &gdb_comm (((ProcessGDBRemote *)process)->GetGDBRemote()); @@ -496,7 +496,7 @@ Process *process = exe_ctx.GetProcessPtr(); Thread *thread = exe_ctx.GetThreadPtr(); - if (process == NULL || thread == NULL) + if (process == nullptr || thread == nullptr) return false; GDBRemoteCommunicationClient &gdb_comm (((ProcessGDBRemote *)process)->GetGDBRemote()); @@ -561,7 +561,7 @@ // data_sp will take ownership of this DataBufferHeap pointer soon. DataBufferSP reg_ctx(new DataBufferHeap(m_reg_info.GetRegisterDataByteSize(), 0)); - for (uint32_t i = 0; (reg_info = GetRegisterInfoAtIndex (i)) != NULL; i++) + for (uint32_t i = 0; (reg_info = GetRegisterInfoAtIndex (i)) != nullptr; i++) { if (reg_info->value_regs) // skip registers that are slices of real registers continue; @@ -599,14 +599,14 @@ bool GDBRemoteRegisterContext::WriteAllRegisterValues (const lldb::DataBufferSP &data_sp) { - if (!data_sp || data_sp->GetBytes() == NULL || data_sp->GetByteSize() == 0) + if (!data_sp || data_sp->GetBytes() == nullptr || data_sp->GetByteSize() == 0) return false; ExecutionContext exe_ctx (CalculateThread()); Process *process = exe_ctx.GetProcessPtr(); Thread *thread = exe_ctx.GetThreadPtr(); - if (process == NULL || thread == NULL) + if (process == nullptr || thread == nullptr) return false; GDBRemoteCommunicationClient &gdb_comm (((ProcessGDBRemote *)process)->GetGDBRemote()); @@ -684,10 +684,10 @@ int size_not_including_slice_registers = 0; int size_by_highest_offset = 0; - for (uint32_t reg_idx=0; (reg_info = GetRegisterInfoAtIndex (reg_idx)) != NULL; ++reg_idx) + for (uint32_t reg_idx=0; (reg_info = GetRegisterInfoAtIndex (reg_idx)) != nullptr; ++reg_idx) { size_including_slice_registers += reg_info->byte_size; - if (reg_info->value_regs == NULL) + if (reg_info->value_regs == nullptr) size_not_including_slice_registers += reg_info->byte_size; if (static_cast(reg_info->byte_offset) >= size_by_highest_offset) size_by_highest_offset = reg_info->byte_offset + reg_info->byte_size; @@ -721,7 +721,7 @@ // In case our register definitions don't include the correct offsets, // keep track of the size of each reg & compute offset based on that. uint32_t running_byte_offset = 0; - for (uint32_t reg_idx=0; (reg_info = GetRegisterInfoAtIndex (reg_idx)) != NULL; ++reg_idx, running_byte_offset += reg_info->byte_size) + for (uint32_t reg_idx=0; (reg_info = GetRegisterInfoAtIndex (reg_idx)) != nullptr; ++reg_idx, running_byte_offset += reg_info->byte_size) { // Skip composite aka slice registers (e.g. eax is a slice of rax). if (reg_info->value_regs) @@ -816,7 +816,7 @@ } uint32_t num_restored = 0; const RegisterInfo *reg_info; - for (uint32_t i = 0; (reg_info = GetRegisterInfoAtIndex (i)) != NULL; i++) + for (uint32_t i = 0; (reg_info = GetRegisterInfoAtIndex (i)) != nullptr; i++) { if (reg_info->value_regs) // skip registers that are slices of real registers continue; @@ -922,113 +922,113 @@ static RegisterInfo g_register_infos[] = { // NAME ALT SZ OFF ENCODING FORMAT COMPILER DWARF GENERIC GDB LLDB VALUE REGS INVALIDATE REGS // ====== ====== === === ============= ============ =================== =================== ====================== === ==== ========== =============== - { "r0", "arg1", 4, 0, eEncodingUint, eFormatHex, { gcc_r0, dwarf_r0, LLDB_REGNUM_GENERIC_ARG1,0, 0 }, NULL, NULL}, - { "r1", "arg2", 4, 0, eEncodingUint, eFormatHex, { gcc_r1, dwarf_r1, LLDB_REGNUM_GENERIC_ARG2,1, 1 }, NULL, NULL}, - { "r2", "arg3", 4, 0, eEncodingUint, eFormatHex, { gcc_r2, dwarf_r2, LLDB_REGNUM_GENERIC_ARG3,2, 2 }, NULL, NULL}, - { "r3", "arg4", 4, 0, eEncodingUint, eFormatHex, { gcc_r3, dwarf_r3, LLDB_REGNUM_GENERIC_ARG4,3, 3 }, NULL, NULL}, - { "r4", NULL, 4, 0, eEncodingUint, eFormatHex, { gcc_r4, dwarf_r4, LLDB_INVALID_REGNUM, 4, 4 }, NULL, NULL}, - { "r5", NULL, 4, 0, eEncodingUint, eFormatHex, { gcc_r5, dwarf_r5, LLDB_INVALID_REGNUM, 5, 5 }, NULL, NULL}, - { "r6", NULL, 4, 0, eEncodingUint, eFormatHex, { gcc_r6, dwarf_r6, LLDB_INVALID_REGNUM, 6, 6 }, NULL, NULL}, - { "r7", "fp", 4, 0, eEncodingUint, eFormatHex, { gcc_r7, dwarf_r7, LLDB_REGNUM_GENERIC_FP, 7, 7 }, NULL, NULL}, - { "r8", NULL, 4, 0, eEncodingUint, eFormatHex, { gcc_r8, dwarf_r8, LLDB_INVALID_REGNUM, 8, 8 }, NULL, NULL}, - { "r9", NULL, 4, 0, eEncodingUint, eFormatHex, { gcc_r9, dwarf_r9, LLDB_INVALID_REGNUM, 9, 9 }, NULL, NULL}, - { "r10", NULL, 4, 0, eEncodingUint, eFormatHex, { gcc_r10, dwarf_r10, LLDB_INVALID_REGNUM, 10, 10 }, NULL, NULL}, - { "r11", NULL, 4, 0, eEncodingUint, eFormatHex, { gcc_r11, dwarf_r11, LLDB_INVALID_REGNUM, 11, 11 }, NULL, NULL}, - { "r12", NULL, 4, 0, eEncodingUint, eFormatHex, { gcc_r12, dwarf_r12, LLDB_INVALID_REGNUM, 12, 12 }, NULL, NULL}, - { "sp", "r13", 4, 0, eEncodingUint, eFormatHex, { gcc_sp, dwarf_sp, LLDB_REGNUM_GENERIC_SP, 13, 13 }, NULL, NULL}, - { "lr", "r14", 4, 0, eEncodingUint, eFormatHex, { gcc_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA, 14, 14 }, NULL, NULL}, - { "pc", "r15", 4, 0, eEncodingUint, eFormatHex, { gcc_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, 15, 15 }, NULL, NULL}, - { "f0", NULL, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 16, 16 }, NULL, NULL}, - { "f1", NULL, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 17, 17 }, NULL, NULL}, - { "f2", NULL, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 18, 18 }, NULL, NULL}, - { "f3", NULL, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 19, 19 }, NULL, NULL}, - { "f4", NULL, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 20, 20 }, NULL, NULL}, - { "f5", NULL, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 21, 21 }, NULL, NULL}, - { "f6", NULL, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 22, 22 }, NULL, NULL}, - { "f7", NULL, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 23, 23 }, NULL, NULL}, - { "fps", NULL, 4, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 24, 24 }, NULL, NULL}, - { "cpsr","flags", 4, 0, eEncodingUint, eFormatHex, { gcc_cpsr, dwarf_cpsr, LLDB_INVALID_REGNUM, 25, 25 }, NULL, NULL}, - { "s0", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s0, LLDB_INVALID_REGNUM, 26, 26 }, NULL, NULL}, - { "s1", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s1, LLDB_INVALID_REGNUM, 27, 27 }, NULL, NULL}, - { "s2", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s2, LLDB_INVALID_REGNUM, 28, 28 }, NULL, NULL}, - { "s3", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s3, LLDB_INVALID_REGNUM, 29, 29 }, NULL, NULL}, - { "s4", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s4, LLDB_INVALID_REGNUM, 30, 30 }, NULL, NULL}, - { "s5", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s5, LLDB_INVALID_REGNUM, 31, 31 }, NULL, NULL}, - { "s6", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s6, LLDB_INVALID_REGNUM, 32, 32 }, NULL, NULL}, - { "s7", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s7, LLDB_INVALID_REGNUM, 33, 33 }, NULL, NULL}, - { "s8", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s8, LLDB_INVALID_REGNUM, 34, 34 }, NULL, NULL}, - { "s9", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s9, LLDB_INVALID_REGNUM, 35, 35 }, NULL, NULL}, - { "s10", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s10, LLDB_INVALID_REGNUM, 36, 36 }, NULL, NULL}, - { "s11", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s11, LLDB_INVALID_REGNUM, 37, 37 }, NULL, NULL}, - { "s12", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s12, LLDB_INVALID_REGNUM, 38, 38 }, NULL, NULL}, - { "s13", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s13, LLDB_INVALID_REGNUM, 39, 39 }, NULL, NULL}, - { "s14", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s14, LLDB_INVALID_REGNUM, 40, 40 }, NULL, NULL}, - { "s15", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s15, LLDB_INVALID_REGNUM, 41, 41 }, NULL, NULL}, - { "s16", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s16, LLDB_INVALID_REGNUM, 42, 42 }, NULL, NULL}, - { "s17", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s17, LLDB_INVALID_REGNUM, 43, 43 }, NULL, NULL}, - { "s18", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s18, LLDB_INVALID_REGNUM, 44, 44 }, NULL, NULL}, - { "s19", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s19, LLDB_INVALID_REGNUM, 45, 45 }, NULL, NULL}, - { "s20", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s20, LLDB_INVALID_REGNUM, 46, 46 }, NULL, NULL}, - { "s21", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s21, LLDB_INVALID_REGNUM, 47, 47 }, NULL, NULL}, - { "s22", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s22, LLDB_INVALID_REGNUM, 48, 48 }, NULL, NULL}, - { "s23", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s23, LLDB_INVALID_REGNUM, 49, 49 }, NULL, NULL}, - { "s24", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s24, LLDB_INVALID_REGNUM, 50, 50 }, NULL, NULL}, - { "s25", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s25, LLDB_INVALID_REGNUM, 51, 51 }, NULL, NULL}, - { "s26", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s26, LLDB_INVALID_REGNUM, 52, 52 }, NULL, NULL}, - { "s27", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s27, LLDB_INVALID_REGNUM, 53, 53 }, NULL, NULL}, - { "s28", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s28, LLDB_INVALID_REGNUM, 54, 54 }, NULL, NULL}, - { "s29", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s29, LLDB_INVALID_REGNUM, 55, 55 }, NULL, NULL}, - { "s30", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s30, LLDB_INVALID_REGNUM, 56, 56 }, NULL, NULL}, - { "s31", NULL, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s31, LLDB_INVALID_REGNUM, 57, 57 }, NULL, NULL}, - { "fpscr",NULL, 4, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 58, 58 }, NULL, NULL}, - { "d16", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d16, LLDB_INVALID_REGNUM, 59, 59 }, NULL, NULL}, - { "d17", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d17, LLDB_INVALID_REGNUM, 60, 60 }, NULL, NULL}, - { "d18", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d18, LLDB_INVALID_REGNUM, 61, 61 }, NULL, NULL}, - { "d19", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d19, LLDB_INVALID_REGNUM, 62, 62 }, NULL, NULL}, - { "d20", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d20, LLDB_INVALID_REGNUM, 63, 63 }, NULL, NULL}, - { "d21", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d21, LLDB_INVALID_REGNUM, 64, 64 }, NULL, NULL}, - { "d22", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d22, LLDB_INVALID_REGNUM, 65, 65 }, NULL, NULL}, - { "d23", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d23, LLDB_INVALID_REGNUM, 66, 66 }, NULL, NULL}, - { "d24", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d24, LLDB_INVALID_REGNUM, 67, 67 }, NULL, NULL}, - { "d25", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d25, LLDB_INVALID_REGNUM, 68, 68 }, NULL, NULL}, - { "d26", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d26, LLDB_INVALID_REGNUM, 69, 69 }, NULL, NULL}, - { "d27", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d27, LLDB_INVALID_REGNUM, 70, 70 }, NULL, NULL}, - { "d28", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d28, LLDB_INVALID_REGNUM, 71, 71 }, NULL, NULL}, - { "d29", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d29, LLDB_INVALID_REGNUM, 72, 72 }, NULL, NULL}, - { "d30", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d30, LLDB_INVALID_REGNUM, 73, 73 }, NULL, NULL}, - { "d31", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d31, LLDB_INVALID_REGNUM, 74, 74 }, NULL, NULL}, - { "d0", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d0, LLDB_INVALID_REGNUM, 75, 75 }, g_d0_regs, NULL}, - { "d1", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d1, LLDB_INVALID_REGNUM, 76, 76 }, g_d1_regs, NULL}, - { "d2", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d2, LLDB_INVALID_REGNUM, 77, 77 }, g_d2_regs, NULL}, - { "d3", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d3, LLDB_INVALID_REGNUM, 78, 78 }, g_d3_regs, NULL}, - { "d4", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d4, LLDB_INVALID_REGNUM, 79, 79 }, g_d4_regs, NULL}, - { "d5", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d5, LLDB_INVALID_REGNUM, 80, 80 }, g_d5_regs, NULL}, - { "d6", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d6, LLDB_INVALID_REGNUM, 81, 81 }, g_d6_regs, NULL}, - { "d7", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d7, LLDB_INVALID_REGNUM, 82, 82 }, g_d7_regs, NULL}, - { "d8", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d8, LLDB_INVALID_REGNUM, 83, 83 }, g_d8_regs, NULL}, - { "d9", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d9, LLDB_INVALID_REGNUM, 84, 84 }, g_d9_regs, NULL}, - { "d10", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d10, LLDB_INVALID_REGNUM, 85, 85 }, g_d10_regs, NULL}, - { "d11", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d11, LLDB_INVALID_REGNUM, 86, 86 }, g_d11_regs, NULL}, - { "d12", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d12, LLDB_INVALID_REGNUM, 87, 87 }, g_d12_regs, NULL}, - { "d13", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d13, LLDB_INVALID_REGNUM, 88, 88 }, g_d13_regs, NULL}, - { "d14", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d14, LLDB_INVALID_REGNUM, 89, 89 }, g_d14_regs, NULL}, - { "d15", NULL, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d15, LLDB_INVALID_REGNUM, 90, 90 }, g_d15_regs, NULL}, - { "q0", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q0, LLDB_INVALID_REGNUM, 91, 91 }, g_q0_regs, NULL}, - { "q1", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q1, LLDB_INVALID_REGNUM, 92, 92 }, g_q1_regs, NULL}, - { "q2", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q2, LLDB_INVALID_REGNUM, 93, 93 }, g_q2_regs, NULL}, - { "q3", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q3, LLDB_INVALID_REGNUM, 94, 94 }, g_q3_regs, NULL}, - { "q4", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q4, LLDB_INVALID_REGNUM, 95, 95 }, g_q4_regs, NULL}, - { "q5", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q5, LLDB_INVALID_REGNUM, 96, 96 }, g_q5_regs, NULL}, - { "q6", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q6, LLDB_INVALID_REGNUM, 97, 97 }, g_q6_regs, NULL}, - { "q7", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q7, LLDB_INVALID_REGNUM, 98, 98 }, g_q7_regs, NULL}, - { "q8", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q8, LLDB_INVALID_REGNUM, 99, 99 }, g_q8_regs, NULL}, - { "q9", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q9, LLDB_INVALID_REGNUM, 100, 100 }, g_q9_regs, NULL}, - { "q10", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q10, LLDB_INVALID_REGNUM, 101, 101 }, g_q10_regs, NULL}, - { "q11", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q11, LLDB_INVALID_REGNUM, 102, 102 }, g_q11_regs, NULL}, - { "q12", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q12, LLDB_INVALID_REGNUM, 103, 103 }, g_q12_regs, NULL}, - { "q13", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q13, LLDB_INVALID_REGNUM, 104, 104 }, g_q13_regs, NULL}, - { "q14", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q14, LLDB_INVALID_REGNUM, 105, 105 }, g_q14_regs, NULL}, - { "q15", NULL, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q15, LLDB_INVALID_REGNUM, 106, 106 }, g_q15_regs, NULL} + { "r0", "arg1", 4, 0, eEncodingUint, eFormatHex, { gcc_r0, dwarf_r0, LLDB_REGNUM_GENERIC_ARG1,0, 0 }, nullptr, nullptr}, + { "r1", "arg2", 4, 0, eEncodingUint, eFormatHex, { gcc_r1, dwarf_r1, LLDB_REGNUM_GENERIC_ARG2,1, 1 }, nullptr, nullptr}, + { "r2", "arg3", 4, 0, eEncodingUint, eFormatHex, { gcc_r2, dwarf_r2, LLDB_REGNUM_GENERIC_ARG3,2, 2 }, nullptr, nullptr}, + { "r3", "arg4", 4, 0, eEncodingUint, eFormatHex, { gcc_r3, dwarf_r3, LLDB_REGNUM_GENERIC_ARG4,3, 3 }, nullptr, nullptr}, + { "r4", nullptr, 4, 0, eEncodingUint, eFormatHex, { gcc_r4, dwarf_r4, LLDB_INVALID_REGNUM, 4, 4 }, nullptr, nullptr}, + { "r5", nullptr, 4, 0, eEncodingUint, eFormatHex, { gcc_r5, dwarf_r5, LLDB_INVALID_REGNUM, 5, 5 }, nullptr, nullptr}, + { "r6", nullptr, 4, 0, eEncodingUint, eFormatHex, { gcc_r6, dwarf_r6, LLDB_INVALID_REGNUM, 6, 6 }, nullptr, nullptr}, + { "r7", "fp", 4, 0, eEncodingUint, eFormatHex, { gcc_r7, dwarf_r7, LLDB_REGNUM_GENERIC_FP, 7, 7 }, nullptr, nullptr}, + { "r8", nullptr, 4, 0, eEncodingUint, eFormatHex, { gcc_r8, dwarf_r8, LLDB_INVALID_REGNUM, 8, 8 }, nullptr, nullptr}, + { "r9", nullptr, 4, 0, eEncodingUint, eFormatHex, { gcc_r9, dwarf_r9, LLDB_INVALID_REGNUM, 9, 9 }, nullptr, nullptr}, + { "r10", nullptr, 4, 0, eEncodingUint, eFormatHex, { gcc_r10, dwarf_r10, LLDB_INVALID_REGNUM, 10, 10 }, nullptr, nullptr}, + { "r11", nullptr, 4, 0, eEncodingUint, eFormatHex, { gcc_r11, dwarf_r11, LLDB_INVALID_REGNUM, 11, 11 }, nullptr, nullptr}, + { "r12", nullptr, 4, 0, eEncodingUint, eFormatHex, { gcc_r12, dwarf_r12, LLDB_INVALID_REGNUM, 12, 12 }, nullptr, nullptr}, + { "sp", "r13", 4, 0, eEncodingUint, eFormatHex, { gcc_sp, dwarf_sp, LLDB_REGNUM_GENERIC_SP, 13, 13 }, nullptr, nullptr}, + { "lr", "r14", 4, 0, eEncodingUint, eFormatHex, { gcc_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA, 14, 14 }, nullptr, nullptr}, + { "pc", "r15", 4, 0, eEncodingUint, eFormatHex, { gcc_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, 15, 15 }, nullptr, nullptr}, + { "f0", nullptr, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 16, 16 }, nullptr, nullptr}, + { "f1", nullptr, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 17, 17 }, nullptr, nullptr}, + { "f2", nullptr, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 18, 18 }, nullptr, nullptr}, + { "f3", nullptr, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 19, 19 }, nullptr, nullptr}, + { "f4", nullptr, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 20, 20 }, nullptr, nullptr}, + { "f5", nullptr, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 21, 21 }, nullptr, nullptr}, + { "f6", nullptr, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 22, 22 }, nullptr, nullptr}, + { "f7", nullptr, 12, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 23, 23 }, nullptr, nullptr}, + { "fps", nullptr, 4, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 24, 24 }, nullptr, nullptr}, + { "cpsr","flags", 4, 0, eEncodingUint, eFormatHex, { gcc_cpsr, dwarf_cpsr, LLDB_INVALID_REGNUM, 25, 25 }, nullptr, nullptr}, + { "s0", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s0, LLDB_INVALID_REGNUM, 26, 26 }, nullptr, nullptr}, + { "s1", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s1, LLDB_INVALID_REGNUM, 27, 27 }, nullptr, nullptr}, + { "s2", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s2, LLDB_INVALID_REGNUM, 28, 28 }, nullptr, nullptr}, + { "s3", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s3, LLDB_INVALID_REGNUM, 29, 29 }, nullptr, nullptr}, + { "s4", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s4, LLDB_INVALID_REGNUM, 30, 30 }, nullptr, nullptr}, + { "s5", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s5, LLDB_INVALID_REGNUM, 31, 31 }, nullptr, nullptr}, + { "s6", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s6, LLDB_INVALID_REGNUM, 32, 32 }, nullptr, nullptr}, + { "s7", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s7, LLDB_INVALID_REGNUM, 33, 33 }, nullptr, nullptr}, + { "s8", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s8, LLDB_INVALID_REGNUM, 34, 34 }, nullptr, nullptr}, + { "s9", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s9, LLDB_INVALID_REGNUM, 35, 35 }, nullptr, nullptr}, + { "s10", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s10, LLDB_INVALID_REGNUM, 36, 36 }, nullptr, nullptr}, + { "s11", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s11, LLDB_INVALID_REGNUM, 37, 37 }, nullptr, nullptr}, + { "s12", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s12, LLDB_INVALID_REGNUM, 38, 38 }, nullptr, nullptr}, + { "s13", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s13, LLDB_INVALID_REGNUM, 39, 39 }, nullptr, nullptr}, + { "s14", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s14, LLDB_INVALID_REGNUM, 40, 40 }, nullptr, nullptr}, + { "s15", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s15, LLDB_INVALID_REGNUM, 41, 41 }, nullptr, nullptr}, + { "s16", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s16, LLDB_INVALID_REGNUM, 42, 42 }, nullptr, nullptr}, + { "s17", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s17, LLDB_INVALID_REGNUM, 43, 43 }, nullptr, nullptr}, + { "s18", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s18, LLDB_INVALID_REGNUM, 44, 44 }, nullptr, nullptr}, + { "s19", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s19, LLDB_INVALID_REGNUM, 45, 45 }, nullptr, nullptr}, + { "s20", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s20, LLDB_INVALID_REGNUM, 46, 46 }, nullptr, nullptr}, + { "s21", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s21, LLDB_INVALID_REGNUM, 47, 47 }, nullptr, nullptr}, + { "s22", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s22, LLDB_INVALID_REGNUM, 48, 48 }, nullptr, nullptr}, + { "s23", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s23, LLDB_INVALID_REGNUM, 49, 49 }, nullptr, nullptr}, + { "s24", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s24, LLDB_INVALID_REGNUM, 50, 50 }, nullptr, nullptr}, + { "s25", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s25, LLDB_INVALID_REGNUM, 51, 51 }, nullptr, nullptr}, + { "s26", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s26, LLDB_INVALID_REGNUM, 52, 52 }, nullptr, nullptr}, + { "s27", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s27, LLDB_INVALID_REGNUM, 53, 53 }, nullptr, nullptr}, + { "s28", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s28, LLDB_INVALID_REGNUM, 54, 54 }, nullptr, nullptr}, + { "s29", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s29, LLDB_INVALID_REGNUM, 55, 55 }, nullptr, nullptr}, + { "s30", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s30, LLDB_INVALID_REGNUM, 56, 56 }, nullptr, nullptr}, + { "s31", nullptr, 4, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_s31, LLDB_INVALID_REGNUM, 57, 57 }, nullptr, nullptr}, + { "fpscr",nullptr, 4, 0, eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, 58, 58 }, nullptr, nullptr}, + { "d16", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d16, LLDB_INVALID_REGNUM, 59, 59 }, nullptr, nullptr}, + { "d17", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d17, LLDB_INVALID_REGNUM, 60, 60 }, nullptr, nullptr}, + { "d18", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d18, LLDB_INVALID_REGNUM, 61, 61 }, nullptr, nullptr}, + { "d19", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d19, LLDB_INVALID_REGNUM, 62, 62 }, nullptr, nullptr}, + { "d20", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d20, LLDB_INVALID_REGNUM, 63, 63 }, nullptr, nullptr}, + { "d21", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d21, LLDB_INVALID_REGNUM, 64, 64 }, nullptr, nullptr}, + { "d22", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d22, LLDB_INVALID_REGNUM, 65, 65 }, nullptr, nullptr}, + { "d23", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d23, LLDB_INVALID_REGNUM, 66, 66 }, nullptr, nullptr}, + { "d24", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d24, LLDB_INVALID_REGNUM, 67, 67 }, nullptr, nullptr}, + { "d25", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d25, LLDB_INVALID_REGNUM, 68, 68 }, nullptr, nullptr}, + { "d26", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d26, LLDB_INVALID_REGNUM, 69, 69 }, nullptr, nullptr}, + { "d27", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d27, LLDB_INVALID_REGNUM, 70, 70 }, nullptr, nullptr}, + { "d28", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d28, LLDB_INVALID_REGNUM, 71, 71 }, nullptr, nullptr}, + { "d29", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d29, LLDB_INVALID_REGNUM, 72, 72 }, nullptr, nullptr}, + { "d30", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d30, LLDB_INVALID_REGNUM, 73, 73 }, nullptr, nullptr}, + { "d31", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d31, LLDB_INVALID_REGNUM, 74, 74 }, nullptr, nullptr}, + { "d0", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d0, LLDB_INVALID_REGNUM, 75, 75 }, g_d0_regs, nullptr}, + { "d1", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d1, LLDB_INVALID_REGNUM, 76, 76 }, g_d1_regs, nullptr}, + { "d2", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d2, LLDB_INVALID_REGNUM, 77, 77 }, g_d2_regs, nullptr}, + { "d3", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d3, LLDB_INVALID_REGNUM, 78, 78 }, g_d3_regs, nullptr}, + { "d4", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d4, LLDB_INVALID_REGNUM, 79, 79 }, g_d4_regs, nullptr}, + { "d5", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d5, LLDB_INVALID_REGNUM, 80, 80 }, g_d5_regs, nullptr}, + { "d6", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d6, LLDB_INVALID_REGNUM, 81, 81 }, g_d6_regs, nullptr}, + { "d7", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d7, LLDB_INVALID_REGNUM, 82, 82 }, g_d7_regs, nullptr}, + { "d8", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d8, LLDB_INVALID_REGNUM, 83, 83 }, g_d8_regs, nullptr}, + { "d9", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d9, LLDB_INVALID_REGNUM, 84, 84 }, g_d9_regs, nullptr}, + { "d10", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d10, LLDB_INVALID_REGNUM, 85, 85 }, g_d10_regs, nullptr}, + { "d11", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d11, LLDB_INVALID_REGNUM, 86, 86 }, g_d11_regs, nullptr}, + { "d12", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d12, LLDB_INVALID_REGNUM, 87, 87 }, g_d12_regs, nullptr}, + { "d13", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d13, LLDB_INVALID_REGNUM, 88, 88 }, g_d13_regs, nullptr}, + { "d14", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d14, LLDB_INVALID_REGNUM, 89, 89 }, g_d14_regs, nullptr}, + { "d15", nullptr, 8, 0, eEncodingIEEE754, eFormatFloat, { LLDB_INVALID_REGNUM, dwarf_d15, LLDB_INVALID_REGNUM, 90, 90 }, g_d15_regs, nullptr}, + { "q0", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q0, LLDB_INVALID_REGNUM, 91, 91 }, g_q0_regs, nullptr}, + { "q1", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q1, LLDB_INVALID_REGNUM, 92, 92 }, g_q1_regs, nullptr}, + { "q2", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q2, LLDB_INVALID_REGNUM, 93, 93 }, g_q2_regs, nullptr}, + { "q3", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q3, LLDB_INVALID_REGNUM, 94, 94 }, g_q3_regs, nullptr}, + { "q4", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q4, LLDB_INVALID_REGNUM, 95, 95 }, g_q4_regs, nullptr}, + { "q5", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q5, LLDB_INVALID_REGNUM, 96, 96 }, g_q5_regs, nullptr}, + { "q6", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q6, LLDB_INVALID_REGNUM, 97, 97 }, g_q6_regs, nullptr}, + { "q7", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q7, LLDB_INVALID_REGNUM, 98, 98 }, g_q7_regs, nullptr}, + { "q8", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q8, LLDB_INVALID_REGNUM, 99, 99 }, g_q8_regs, nullptr}, + { "q9", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q9, LLDB_INVALID_REGNUM, 100, 100 }, g_q9_regs, nullptr}, + { "q10", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q10, LLDB_INVALID_REGNUM, 101, 101 }, g_q10_regs, nullptr}, + { "q11", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q11, LLDB_INVALID_REGNUM, 102, 102 }, g_q11_regs, nullptr}, + { "q12", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q12, LLDB_INVALID_REGNUM, 103, 103 }, g_q12_regs, nullptr}, + { "q13", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q13, LLDB_INVALID_REGNUM, 104, 104 }, g_q13_regs, nullptr}, + { "q14", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q14, LLDB_INVALID_REGNUM, 105, 105 }, g_q14_regs, nullptr}, + { "q15", nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q15, LLDB_INVALID_REGNUM, 106, 106 }, g_q15_regs, nullptr} }; static const uint32_t num_registers = llvm::array_lengthof(g_register_infos); Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp =================================================================== --- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -98,9 +98,9 @@ static PropertyDefinition g_properties[] = { - { "packet-timeout" , OptionValue::eTypeUInt64 , true , 1, NULL, NULL, "Specify the default packet timeout in seconds." }, - { "target-definition-file" , OptionValue::eTypeFileSpec , true, 0 , NULL, NULL, "The file that provides the description for remote target registers." }, - { NULL , OptionValue::eTypeInvalid, false, 0, NULL, NULL, NULL } + { "packet-timeout" , OptionValue::eTypeUInt64 , true , 1, nullptr, nullptr, "Specify the default packet timeout in seconds." }, + { "target-definition-file" , OptionValue::eTypeFileSpec , true, 0 , nullptr, nullptr, "The file that provides the description for remote target registers." }, + { nullptr , OptionValue::eTypeInvalid, false, 0, nullptr, nullptr, nullptr } }; enum @@ -135,21 +135,21 @@ GetPacketTimeout() { const uint32_t idx = ePropertyPacketTimeout; - return m_collection_sp->GetPropertyAtIndexAsUInt64(NULL, idx, g_properties[idx].default_uint_value); + return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx, g_properties[idx].default_uint_value); } bool SetPacketTimeout(uint64_t timeout) { const uint32_t idx = ePropertyPacketTimeout; - return m_collection_sp->SetPropertyAtIndexAsUInt64(NULL, idx, timeout); + return m_collection_sp->SetPropertyAtIndexAsUInt64(nullptr, idx, timeout); } FileSpec GetTargetDefinitionFile () const { const uint32_t idx = ePropertyTargetDefinitionFile; - return m_collection_sp->GetPropertyAtIndexAsFileSpec (NULL, idx); + return m_collection_sp->GetPropertyAtIndexAsFileSpec (nullptr, idx); } }; @@ -219,7 +219,7 @@ ProcessGDBRemote::CreateInstance (Target &target, Listener &listener, const FileSpec *crash_file_path) { lldb::ProcessSP process_sp; - if (crash_file_path == NULL) + if (crash_file_path == nullptr) process_sp.reset (new ProcessGDBRemote (target, listener)); return process_sp; } @@ -268,7 +268,7 @@ m_last_stop_packet (), m_last_stop_packet_mutex (Mutex::eMutexTypeNormal), m_register_info (), - m_async_broadcaster (NULL, "lldb.process.gdb-remote.async-broadcaster"), + m_async_broadcaster (nullptr, "lldb.process.gdb-remote.async-broadcaster"), m_async_thread (LLDB_INVALID_HOST_THREAD), m_async_thread_state(eAsyncThreadNotStarted), m_async_thread_state_mutex(Mutex::eMutexTypeRecursive), @@ -399,8 +399,8 @@ ConstString set_name; std::vector value_regs; std::vector invalidate_regs; - RegisterInfo reg_info = { NULL, // Name - NULL, // Alt name + RegisterInfo reg_info = { nullptr, // Name + nullptr, // Alt name 0, // byte size reg_offset, // offset eEncodingUint, // encoding @@ -412,8 +412,8 @@ reg_num, // GDB reg num reg_num // native register number }, - NULL, - NULL + nullptr, + nullptr }; while (response.GetNameColonValue(name, value)) @@ -447,7 +447,7 @@ else if (name.compare("format") == 0) { Format format = eFormatInvalid; - if (Args::StringToFormat (value.c_str(), format, NULL).Success()) + if (Args::StringToFormat (value.c_str(), format, nullptr).Success()) reg_info.format = format; else if (value.compare("binary") == 0) reg_info.format = eFormatBinary; @@ -707,9 +707,9 @@ Error error; uint32_t launch_flags = launch_info.GetFlags().Get(); - const char *stdin_path = NULL; - const char *stdout_path = NULL; - const char *stderr_path = NULL; + const char *stdin_path = nullptr; + const char *stdout_path = nullptr; + const char *stderr_path = nullptr; const char *working_dir = launch_info.GetWorkingDirectory(); const ProcessLaunchInfo::FileAction *file_action; @@ -758,35 +758,35 @@ PlatformSP platform_sp (m_target.GetPlatform()); if (platform_sp && platform_sp->IsHost() && !disable_stdio) { - const char *slave_name = NULL; - if (stdin_path == NULL || stdout_path == NULL || stderr_path == NULL) + const char *slave_name = nullptr; + if (stdin_path == nullptr || stdout_path == nullptr || stderr_path == nullptr) { - if (pty.OpenFirstAvailableMaster(O_RDWR|O_NOCTTY, NULL, 0)) - slave_name = pty.GetSlaveName (NULL, 0); + if (pty.OpenFirstAvailableMaster(O_RDWR|O_NOCTTY, nullptr, 0)) + slave_name = pty.GetSlaveName (nullptr, 0); } - if (stdin_path == NULL) + if (stdin_path == nullptr) stdin_path = slave_name; - if (stdout_path == NULL) + if (stdout_path == nullptr) stdout_path = slave_name; - if (stderr_path == NULL) + if (stderr_path == nullptr) stderr_path = slave_name; } // Set STDIN to /dev/null if we want STDIO disabled or if either // STDOUT or STDERR have been set to something and STDIN hasn't - if (disable_stdio || (stdin_path == NULL && (stdout_path || stderr_path))) + if (disable_stdio || (stdin_path == nullptr && (stdout_path || stderr_path))) stdin_path = "/dev/null"; // Set STDOUT to /dev/null if we want STDIO disabled or if either // STDIN or STDERR have been set to something and STDOUT hasn't - if (disable_stdio || (stdout_path == NULL && (stdin_path || stderr_path))) + if (disable_stdio || (stdout_path == nullptr && (stdin_path || stderr_path))) stdout_path = "/dev/null"; // Set STDERR to /dev/null if we want STDIO disabled or if either // STDIN or STDOUT have been set to something and STDERR hasn't - if (disable_stdio || (stderr_path == NULL && (stdin_path || stdout_path))) + if (disable_stdio || (stderr_path == nullptr && (stdin_path || stdout_path))) stderr_path = "/dev/null"; if (stdin_path) @@ -801,7 +801,7 @@ m_gdb_comm.SendLaunchArchPacket (m_target.GetArchitecture().GetArchitectureName()); const char * launch_event_data = launch_info.GetLaunchEventData(); - if (launch_event_data != NULL && *launch_event_data != '\0') + if (launch_event_data != nullptr && *launch_event_data != '\0') m_gdb_comm.SendLaunchEventDataPacket (launch_event_data); if (working_dir && working_dir[0]) @@ -817,7 +817,7 @@ for (size_t i=0; i exc_data; addr_t thread_dispatch_qaddr = LLDB_INVALID_ADDRESS; ThreadSP thread_sp; - ThreadGDBRemote *gdb_thread = NULL; + ThreadGDBRemote *gdb_thread = nullptr; while (stop_packet.GetNameColonValue(name, value)) { @@ -1669,7 +1669,7 @@ thread_sp->SetStopInfo (StopInfoSP()); gdb_thread->SetThreadDispatchQAddr (thread_dispatch_qaddr); - gdb_thread->SetName (thread_name.empty() ? NULL : thread_name.c_str()); + gdb_thread->SetName (thread_name.empty() ? nullptr : thread_name.c_str()); if (exc_type != 0) { const size_t exc_data_size = exc_data.size(); @@ -2299,7 +2299,7 @@ if (m_stdio_communication.IsConnected()) { ConnectionStatus status; - m_stdio_communication.Write(src, src_len, status, NULL); + m_stdio_communication.Write(src, src_len, status, nullptr); } return 0; } @@ -2308,7 +2308,7 @@ ProcessGDBRemote::EnableBreakpointSite (BreakpointSite *bp_site) { Error error; - assert(bp_site != NULL); + assert(bp_site != nullptr); // Get logging info Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS)); @@ -2414,7 +2414,7 @@ ProcessGDBRemote::DisableBreakpointSite (BreakpointSite *bp_site) { Error error; - assert (bp_site != NULL); + assert (bp_site != nullptr); addr_t addr = bp_site->GetLoadAddress(); user_id_t site_id = bp_site->GetID(); Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS)); @@ -2616,7 +2616,7 @@ // Set hostname being NULL to do the reverse connect where debugserver // will bind to port zero and it will communicate back to us the port // that we will connect to - const char *hostname = NULL; + const char *hostname = nullptr; uint16_t port = 0; #endif @@ -2645,7 +2645,7 @@ if (m_gdb_comm.IsConnected()) { // Finish the connection process by doing the handshake without connecting (send NULL URL) - ConnectToDebugserver (NULL); + ConnectToDebugserver (nullptr); } else { @@ -2806,7 +2806,7 @@ { // Create a thread that watches our internal state and controls which // events make it to clients (into the DCProcess event queue). - m_async_thread = Host::ThreadCreate ("", ProcessGDBRemote::AsyncThread, this, NULL); + m_async_thread = Host::ThreadCreate ("", ProcessGDBRemote::AsyncThread, this, nullptr); if (IS_VALID_LLDB_HOST_THREAD(m_async_thread)) { m_async_thread_state = eAsyncThreadRunning; @@ -2847,7 +2847,7 @@ // Stop the stdio thread if (IS_VALID_LLDB_HOST_THREAD(m_async_thread)) { - Host::ThreadJoin (m_async_thread, NULL, NULL); + Host::ThreadJoin (m_async_thread, nullptr, nullptr); } m_async_thread_state = eAsyncThreadDone; } @@ -2882,7 +2882,7 @@ { if (log) log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID()); - if (listener.WaitForEvent (NULL, event_sp)) + if (listener.WaitForEvent (nullptr, event_sp)) { const uint32_t event_type = event_sp->GetType(); if (event_sp->BroadcasterIs (&process->m_async_broadcaster)) @@ -2903,7 +2903,7 @@ if (log) log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") got eBroadcastBitAsyncContinue: %s", __FUNCTION__, arg, process->GetID(), continue_cstr); - if (::strstr (continue_cstr, "vAttach") == NULL) + if (::strstr (continue_cstr, "vAttach") == nullptr) process->SetPrivateState(eStateRunning); StringExtractorGDBRemote response; StateType stop_state = process->GetGDBRemote().SendContinuePacketAndWaitForResponse (process, continue_cstr, continue_cstr_len, response); @@ -2930,7 +2930,7 @@ response.SetFilePos(1); int exit_status = response.GetHexU8(); - const char *desc_cstr = NULL; + const char *desc_cstr = nullptr; StringExtractor extractor; std::string desc_string; if (response.GetBytesLeft() > 0 && response.GetChar('-') == ';') @@ -2998,7 +2998,7 @@ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") thread exiting...", __FUNCTION__, arg, process->GetID()); process->m_async_thread = LLDB_INVALID_HOST_THREAD; - return NULL; + return nullptr; } //uint32_t @@ -3062,7 +3062,7 @@ } } } - return m_thread_create_bp_sp.get() != NULL; + return m_thread_create_bp_sp.get() != nullptr; } bool @@ -3081,8 +3081,8 @@ lldb_private::DynamicLoader * ProcessGDBRemote::GetDynamicLoader () { - if (m_dyld_ap.get() == NULL) - m_dyld_ap.reset (DynamicLoader::FindPlugin(this, NULL)); + if (m_dyld_ap.get() == nullptr) + m_dyld_ap.reset (DynamicLoader::FindPlugin(this, nullptr)); return m_dyld_ap.get(); } @@ -3127,7 +3127,7 @@ CommandObjectParsed (interpreter, "process plugin packet history", "Dumps the packet history buffer. ", - NULL) + nullptr) { } @@ -3168,7 +3168,7 @@ "process plugin packet send", "Send a custom packet through the GDB remote protocol and print the answer. " "The packet header and footer will automatically be added to the packet prior to sending and stripped from the result.", - NULL) + nullptr) { } @@ -3201,7 +3201,7 @@ output_strm.Printf (" packet: %s\n", packet_cstr); std::string &response_str = response.GetStringRef(); - if (strstr(packet_cstr, "qGetProfileData") != NULL) + if (strstr(packet_cstr, "qGetProfileData") != nullptr) { response_str = process->GetGDBRemote().HarmonizeThreadIdsForProfileData(process, response); } @@ -3226,7 +3226,7 @@ "process plugin packet monitor", "Send a qRcmd packet through the GDB remote protocol and print the response." "The argument passed to this command will be hex encoded into a valid 'qRcmd' packet, sent and the response will be printed.", - NULL) + nullptr) { } @@ -3237,7 +3237,7 @@ bool DoExecute (const char *command, CommandReturnObject &result) { - if (command == NULL || command[0] == '\0') + if (command == nullptr || command[0] == '\0') { result.AppendErrorWithFormat ("'%s' takes a command string argument", m_cmd_name.c_str()); result.SetStatus (eReturnStatusFailed); @@ -3278,7 +3278,7 @@ CommandObjectMultiword (interpreter, "process plugin packet", "Commands that deal with GDB remote packets.", - NULL) + nullptr) { LoadSubCommand ("history", CommandObjectSP (new CommandObjectProcessGDBRemotePacketHistory (interpreter))); LoadSubCommand ("send", CommandObjectSP (new CommandObjectProcessGDBRemotePacketSend (interpreter))); Index: source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp =================================================================== --- source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp +++ source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp @@ -23,12 +23,12 @@ // that will construct the static g_lob_sp the first time this function is // called. static bool g_log_enabled = false; -static Log * g_log = NULL; +static Log * g_log = nullptr; static Log * GetLog () { if (!g_log_enabled) - return NULL; + return nullptr; return g_log; } @@ -41,7 +41,7 @@ { uint32_t log_mask = log->GetMask().Get(); if ((log_mask & mask) != mask) - return NULL; + return nullptr; } return log; } @@ -52,7 +52,7 @@ Log *log(GetLog ()); if (log && log->GetMask().Get() & mask) return log; - return NULL; + return nullptr; } void @@ -63,10 +63,10 @@ { uint32_t flag_bits = 0; - if (categories[0] != NULL) + if (categories[0] != nullptr) { flag_bits = log->GetMask().Get(); - for (size_t i = 0; categories[i] != NULL; ++i) + for (size_t i = 0; categories[i] != nullptr; ++i) { const char *arg = categories[i]; @@ -124,7 +124,7 @@ if (g_log) { bool got_unknown_category = false; - for (size_t i=0; categories[i] != NULL; ++i) + for (size_t i=0; categories[i] != nullptr; ++i) { const char *arg = categories[i]; Index: source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp =================================================================== --- source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +++ source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp @@ -60,7 +60,7 @@ ThreadGDBRemote::GetName () { if (m_thread_name.empty()) - return NULL; + return nullptr; return m_thread_name.c_str(); } @@ -86,7 +86,7 @@ } } } - return NULL; + return nullptr; } queue_id_t @@ -217,8 +217,8 @@ lldb::RegisterContextSP ThreadGDBRemote::GetRegisterContext () { - if (m_reg_context_sp.get() == NULL) - m_reg_context_sp = CreateRegisterContextForFrame (NULL); + if (m_reg_context_sp.get() == nullptr) + m_reg_context_sp = CreateRegisterContextForFrame (nullptr); return m_reg_context_sp; } Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h +++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h @@ -67,7 +67,7 @@ { ExtractDIEsIfNeeded (true); if (m_die_array.empty()) - return NULL; + return nullptr; return &m_die_array[0]; } @@ -76,7 +76,7 @@ { ExtractDIEsIfNeeded (false); if (m_die_array.empty()) - return NULL; + return nullptr; return &m_die_array[0]; } Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -37,8 +37,8 @@ DWARFCompileUnit::DWARFCompileUnit(SymbolFileDWARF* dwarf2Data) : m_dwarf2Data (dwarf2Data), - m_abbrevs (NULL), - m_user_data (NULL), + m_abbrevs (nullptr), + m_user_data (nullptr), m_die_array (), m_func_aranges_ap (), m_base_addr (0), @@ -59,12 +59,12 @@ m_offset = DW_INVALID_OFFSET; m_length = 0; m_version = 0; - m_abbrevs = NULL; + m_abbrevs = nullptr; m_addr_size = DWARFCompileUnit::GetDefaultAddressSize(); m_base_addr = 0; m_die_array.clear(); m_func_aranges_ap.reset(); - m_user_data = NULL; + m_user_data = nullptr; m_producer = eProducerInvalid; } @@ -89,7 +89,7 @@ bool abbr_offset_OK = m_dwarf2Data->get_debug_abbrev_data().ValidOffset(abbr_offset); bool addr_size_OK = ((m_addr_size == 4) || (m_addr_size == 8)); - if (length_OK && version_OK && addr_size_OK && abbr_offset_OK && abbr != NULL) + if (length_OK && version_OK && addr_size_OK && abbr_offset_OK && abbr != nullptr) { m_abbrevs = abbr->GetAbbreviationDeclarationSet(abbr_offset); return true; @@ -410,7 +410,7 @@ if (sc.comp_unit) { SymbolFileDWARFDebugMap *debug_map_sym_file = m_dwarf2Data->GetDebugMapSymfile(); - if (debug_map_sym_file == NULL) + if (debug_map_sym_file == nullptr) { LineTable *line_table = sc.comp_unit->GetLineTable(); @@ -443,7 +443,7 @@ const DWARFDebugAranges & DWARFCompileUnit::GetFunctionAranges () { - if (m_func_aranges_ap.get() == NULL) + if (m_func_aranges_ap.get() == nullptr) { m_func_aranges_ap.reset (new DWARFDebugAranges()); Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES)); @@ -473,7 +473,7 @@ { bool success = false; - if (function_die_handle != NULL && DIE()) + if (function_die_handle != nullptr && DIE()) { const DWARFDebugAranges &func_aranges = GetFunctionAranges (); @@ -482,15 +482,15 @@ if (!func_aranges.IsEmpty()) { *function_die_handle = GetDIEPtr(func_aranges.FindAddress(address)); - if (*function_die_handle != NULL) + if (*function_die_handle != nullptr) { success = true; - if (block_die_handle != NULL) + if (block_die_handle != nullptr) { DWARFDebugInfoEntry* child = (*function_die_handle)->GetFirstChild(); while (child) { - if (child->LookupAddress(address, m_dwarf2Data, this, NULL, block_die_handle)) + if (child->LookupAddress(address, m_dwarf2Data, this, nullptr, block_die_handle)) break; child = child->GetSibling(); } @@ -530,7 +530,7 @@ return &(*pos); } } - return NULL; // Not found in any compile units + return nullptr; // Not found in any compile units } //---------------------------------------------------------------------- @@ -562,7 +562,7 @@ } } } - return NULL; // Not found in any compile units + return nullptr; // Not found in any compile units } @@ -662,8 +662,8 @@ } DWARFDebugInfoEntry::Attributes attributes; - const char *name = NULL; - const char *mangled_cstr = NULL; + const char *name = nullptr; + const char *mangled_cstr = nullptr; bool is_declaration = false; //bool is_artificial = false; bool has_address = false; @@ -716,7 +716,7 @@ if (tag == DW_TAG_variable) { const DWARFDebugInfoEntry* parent_die = die.GetParent(); - while ( parent_die != NULL ) + while ( parent_die != nullptr ) { switch (parent_die->Tag()) { @@ -743,12 +743,12 @@ // } // } // } - parent_die = NULL; // Terminate the while loop. + parent_die = nullptr; // Terminate the while loop. break; case DW_TAG_compile_unit: is_global_or_static_variable = true; - parent_die = NULL; // Terminate the while loop. + parent_die = nullptr; // Terminate the while loop. break; default: @@ -808,7 +808,7 @@ { if (specification_die_offset != DW_INVALID_OFFSET) { - const DWARFDebugInfoEntry *specification_die = m_dwarf2Data->DebugInfo()->GetDIEPtr (specification_die_offset, NULL); + const DWARFDebugInfoEntry *specification_die = m_dwarf2Data->DebugInfo()->GetDIEPtr (specification_die_offset, nullptr); if (specification_die) { parent = specification_die->GetParent(); @@ -965,7 +965,7 @@ if (die) { - const char *producer_cstr = die->GetAttributeValueAsString(m_dwarf2Data, this, DW_AT_producer, NULL); + const char *producer_cstr = die->GetAttributeValueAsString(m_dwarf2Data, this, DW_AT_producer, nullptr); if (producer_cstr) { RegularExpression llvm_gcc_regex("^4\\.[012]\\.[01] \\(Based on Apple Inc\\. build [0-9]+\\) \\(LLVM build [\\.0-9]+\\)$"); Index: source/Plugins/SymbolFile/DWARF/DWARFDIECollection.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDIECollection.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDIECollection.cpp @@ -40,7 +40,7 @@ { if (idx < m_dies.size()) return m_dies[idx]; - return NULL; + return nullptr; } Index: source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp @@ -85,7 +85,7 @@ if (idx < m_decls.size()) return &m_decls[idx]; } - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -198,5 +198,5 @@ if (pos != m_abbrevCollMap.end()) return &(pos->second); - return NULL; + return nullptr; } Index: source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h +++ source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h @@ -52,7 +52,7 @@ { if (i < m_arange_descriptors.size()) return &m_arange_descriptors[i]; - return NULL; + return nullptr; } const Descriptor & Index: source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp @@ -109,7 +109,7 @@ void DWARFDebugAranges::Dump (Log *log) const { - if (log == NULL) + if (log == nullptr) return; const size_t num_entries = m_aranges.GetSize(); Index: source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h +++ source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h @@ -48,7 +48,7 @@ size_t GetNumCompileUnits(); bool ContainsCompileUnit (const DWARFCompileUnit *cu) const; DWARFCompileUnit* GetCompileUnitAtIndex(uint32_t idx); - DWARFCompileUnitSP GetCompileUnit(dw_offset_t cu_offset, uint32_t* idx_ptr = NULL); + DWARFCompileUnitSP GetCompileUnit(dw_offset_t cu_offset, uint32_t* idx_ptr = nullptr); DWARFCompileUnitSP GetCompileUnitContainingDIE(dw_offset_t die_offset); DWARFDebugInfoEntry* GetDIEPtr(dw_offset_t die_offset, DWARFCompileUnitSP* cu_sp_ptr); Index: source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -32,7 +32,7 @@ // Constructor //---------------------------------------------------------------------- DWARFDebugInfo::DWARFDebugInfo() : - m_dwarf2Data(NULL), + m_dwarf2Data(nullptr), m_compile_units(), m_cu_aranges_ap () { @@ -52,7 +52,7 @@ DWARFDebugAranges & DWARFDebugInfo::GetCompileUnitAranges () { - if (m_cu_aranges_ap.get() == NULL && m_dwarf2Data) + if (m_cu_aranges_ap.get() == nullptr && m_dwarf2Data) { Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES)); @@ -159,7 +159,7 @@ { if (m_compile_units.empty()) { - if (m_dwarf2Data != NULL) + if (m_dwarf2Data != nullptr) { lldb::offset_t offset = 0; const DWARFDataExtractor &debug_info_data = m_dwarf2Data->get_debug_info_data(); @@ -167,7 +167,7 @@ { DWARFCompileUnitSP cu_sp(new DWARFCompileUnit(m_dwarf2Data)); // Out of memory? - if (cu_sp.get() == NULL) + if (cu_sp.get() == nullptr) break; if (cu_sp->Extract(debug_info_data, &offset) == false) @@ -191,7 +191,7 @@ DWARFCompileUnit* DWARFDebugInfo::GetCompileUnitAtIndex(uint32_t idx) { - DWARFCompileUnit* cu = NULL; + DWARFCompileUnit* cu = nullptr; if (idx < GetNumCompileUnits()) cu = m_compile_units[idx].get(); return cu; @@ -284,18 +284,18 @@ *cu_sp_ptr = cu_sp; if (cu_sp.get()) return cu_sp->GetDIEPtr(die_offset); - return NULL; // Not found in any compile units + return nullptr; // Not found in any compile units } DWARFDebugInfoEntry* DWARFDebugInfo::GetDIEPtrWithCompileUnitHint (dw_offset_t die_offset, DWARFCompileUnit**cu_handle) { assert (cu_handle); - DWARFDebugInfoEntry* die = NULL; + DWARFDebugInfoEntry* die = nullptr; if (*cu_handle) die = (*cu_handle)->GetDIEPtr(die_offset); - if (die == NULL) + if (die == nullptr) { DWARFCompileUnitSP cu_sp (GetCompileUnitContainingDIE(die_offset)); if (cu_sp.get()) @@ -304,8 +304,8 @@ die = cu_sp->GetDIEPtr(die_offset); } } - if (die == NULL) - *cu_handle = NULL; + if (die == nullptr) + *cu_handle = nullptr; return die; } @@ -319,7 +319,7 @@ if (cu_sp.get()) return cu_sp->GetDIEPtrContainingOffset(die_offset); - return NULL; // Not found in any compile units + return nullptr; // Not found in any compile units } @@ -361,7 +361,7 @@ lldb::offset_t offset = 0; uint32_t depth = 0; DWARFCompileUnitSP cu(new DWARFCompileUnit(dwarf2Data)); - if (cu.get() == NULL) + if (cu.get() == nullptr) return; DWARFDebugInfoEntry die; @@ -372,7 +372,7 @@ depth = 0; // Call the callback function with no DIE pointer for the compile unit // and get the offset that we are to continue to parse from - offset = callback(dwarf2Data, cu, NULL, offset, depth, userData); + offset = callback(dwarf2Data, cu, nullptr, offset, depth, userData); // Make sure we are within our compile unit if (offset < next_cu_offset) @@ -546,7 +546,7 @@ } else { - if (cu == NULL) + if (cu == nullptr) s->PutCString("NULL - cu"); // We have a compile unit, reset our indent level to zero just in case s->SetIndentLevel(0); @@ -663,7 +663,7 @@ for (pos = m_compile_units.begin(); pos != m_compile_units.end(); ++pos) { const DWARFCompileUnitSP& cu_sp = *pos; - DumpCallback(m_dwarf2Data, (DWARFCompileUnitSP&)cu_sp, NULL, 0, curr_depth, &dumpInfo); + DumpCallback(m_dwarf2Data, (DWARFCompileUnitSP&)cu_sp, nullptr, 0, curr_depth, &dumpInfo); const DWARFDebugInfoEntry* die = cu_sp->DIE(); if (die) @@ -739,7 +739,7 @@ die_offsets.clear(); if (name && name[0]) { - FindCallbackStringInfo info = { name, ignore_case, NULL, die_offsets }; + FindCallbackStringInfo info = { name, ignore_case, nullptr, die_offsets }; DWARFDebugInfo::Parse(m_dwarf2Data, FindCallbackString, &info); } return !die_offsets.empty(); @@ -757,7 +757,7 @@ DWARFDebugInfo::Find(RegularExpression& re, vector& die_offsets) const { die_offsets.clear(); - FindCallbackStringInfo info = { NULL, false, &re, die_offsets }; + FindCallbackStringInfo info = { nullptr, false, &re, die_offsets }; DWARFDebugInfo::Parse(m_dwarf2Data, FindCallbackString, &info); return !die_offsets.empty(); } Index: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h +++ source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h @@ -171,7 +171,7 @@ const DWARFCompileUnit* cu, const dw_attr_t attr, DWARFFormValue& formValue, - dw_offset_t* end_attr_offset_ptr = NULL) const; + dw_offset_t* end_attr_offset_ptr = nullptr) const; const char* GetAttributeValueAsString( SymbolFileDWARF* dwarf2Data, @@ -318,7 +318,7 @@ int& call_file, int& call_line, int& call_column, - lldb_private::DWARFExpression *frame_base = NULL) const; + lldb_private::DWARFExpression *frame_base = nullptr) const; const DWARFAbbreviationDeclaration* GetAbbreviationDeclarationPtr (SymbolFileDWARF* dwarf2Data, @@ -363,17 +363,17 @@ // We know we are kept in a vector of contiguous entries, so we know // our parent will be some index behind "this". - DWARFDebugInfoEntry* GetParent() { return m_parent_idx > 0 ? this - m_parent_idx : NULL; } - const DWARFDebugInfoEntry* GetParent() const { return m_parent_idx > 0 ? this - m_parent_idx : NULL; } + DWARFDebugInfoEntry* GetParent() { return m_parent_idx > 0 ? this - m_parent_idx : nullptr; } + const DWARFDebugInfoEntry* GetParent() const { return m_parent_idx > 0 ? this - m_parent_idx : nullptr; } // We know we are kept in a vector of contiguous entries, so we know // our sibling will be some index after "this". - DWARFDebugInfoEntry* GetSibling() { return m_sibling_idx > 0 ? this + m_sibling_idx : NULL; } - const DWARFDebugInfoEntry* GetSibling() const { return m_sibling_idx > 0 ? this + m_sibling_idx : NULL; } + DWARFDebugInfoEntry* GetSibling() { return m_sibling_idx > 0 ? this + m_sibling_idx : nullptr; } + const DWARFDebugInfoEntry* GetSibling() const { return m_sibling_idx > 0 ? this + m_sibling_idx : nullptr; } // We know we are kept in a vector of contiguous entries, so we know // we don't need to store our child pointer, if we have a child it will // be the next entry in the list... - DWARFDebugInfoEntry* GetFirstChild() { return (HasChildren() && !m_empty_children) ? this + 1 : NULL; } - const DWARFDebugInfoEntry* GetFirstChild() const { return (HasChildren() && !m_empty_children) ? this + 1 : NULL; } + DWARFDebugInfoEntry* GetFirstChild() { return (HasChildren() && !m_empty_children) ? this + 1 : nullptr; } + const DWARFDebugInfoEntry* GetFirstChild() const { return (HasChildren() && !m_empty_children) ? this + 1 : nullptr; } void GetDeclContextDIEs (SymbolFileDWARF* dwarf2Data, Index: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -138,7 +138,7 @@ const DWARFAbbreviationDeclaration *abbrevDecl = cu->GetAbbreviations()->GetAbbreviationDeclaration(m_abbr_idx); - if (abbrevDecl == NULL) + if (abbrevDecl == nullptr) { cu->GetSymbolFileDWARF()->GetObjectFile()->GetModule()->ReportError ("{0x%8.8x}: invalid abbreviation code %u, please file a bug and attach the file at the start of this error message", m_offset, @@ -752,7 +752,7 @@ DWARFExpression *frame_base ) const { - if (dwarf2Data == NULL) + if (dwarf2Data == nullptr) return false; dw_addr_t lo_pc = LLDB_INVALID_ADDRESS; @@ -821,13 +821,13 @@ break; case DW_AT_name: - if (name == NULL) + if (name == nullptr) name = form_value.AsCString(&dwarf2Data->get_debug_str_data()); break; case DW_AT_MIPS_linkage_name: case DW_AT_linkage_name: - if (mangled == NULL) + if (mangled == nullptr) mangled = form_value.AsCString(&dwarf2Data->get_debug_str_data()); break; @@ -926,14 +926,14 @@ frame_base->SetLocationListSlide (lowest_range_pc - cu->GetBaseAddress()); } - if (ranges.IsEmpty() || name == NULL || mangled == NULL) + if (ranges.IsEmpty() || name == nullptr || mangled == nullptr) { std::vector::const_iterator pos; std::vector::const_iterator end = die_offsets.end(); for (pos = die_offsets.begin(); pos != end; ++pos) { DWARFCompileUnitSP cu_sp_ptr; - const DWARFDebugInfoEntry* die = NULL; + const DWARFDebugInfoEntry* die = nullptr; dw_offset_t die_offset = *pos; if (die_offset != DW_INVALID_OFFSET) { @@ -1027,10 +1027,10 @@ ) const { const DWARFDebugInfoEntry *cu_die = cu->GetCompileUnitDIEOnly(); - const char *cu_name = NULL; - if (cu_die != NULL) + const char *cu_name = nullptr; + if (cu_die != nullptr) cu_name = cu_die->GetName (dwarf2Data, cu); - const char *obj_file_name = NULL; + const char *obj_file_name = nullptr; ObjectFile *obj_file = dwarf2Data->GetObjectFile(); if (obj_file) obj_file_name = obj_file->GetFileSpec().GetFilename().AsCString(); @@ -1065,7 +1065,7 @@ bool verbose = s.GetVerbose(); bool show_form = s.GetFlags().Test(DWARFDebugInfo::eDumpFlag_ShowForm); - const DWARFDataExtractor* debug_str_data = dwarf2Data ? &dwarf2Data->get_debug_str_data() : NULL; + const DWARFDataExtractor* debug_str_data = dwarf2Data ? &dwarf2Data->get_debug_str_data() : nullptr; if (verbose) s.Offset (*offset_ptr); else @@ -1153,7 +1153,7 @@ else { if ( !verbose ) - form_value.Dump(s, NULL, cu); + form_value.Dump(s, nullptr, cu); } } } @@ -1225,7 +1225,7 @@ { const DWARFDataExtractor& debug_info_data = dwarf2Data->get_debug_info_data(); - if (fixed_form_sizes == NULL) + if (fixed_form_sizes == nullptr) fixed_form_sizes = DWARFFormValue::GetFixedFormSizesForAddressSize(cu->GetAddressByteSize()); const uint32_t num_attributes = abbrevDecl->NumAttributes(); @@ -1262,7 +1262,7 @@ form_value.SetForm(form); if (form_value.ExtractValue(debug_info_data, &offset, cu)) { - const DWARFDebugInfoEntry* die = NULL; + const DWARFDebugInfoEntry* die = nullptr; dw_offset_t die_offset = form_value.Reference(cu); if (cu->ContainsDIEOffset(die_offset)) { @@ -1595,7 +1595,7 @@ return die->GetName(dwarf2Data, cu_sp_ptr.get()); } } - return NULL; + return nullptr; } @@ -1613,7 +1613,7 @@ bool substitute_name_allowed ) const { - const char* name = NULL; + const char* name = nullptr; DWARFFormValue form_value; if (GetAttributeValue(dwarf2Data, cu, DW_AT_MIPS_linkage_name, form_value)) @@ -1622,7 +1622,7 @@ if (GetAttributeValue(dwarf2Data, cu, DW_AT_linkage_name, form_value)) name = form_value.AsCString(&dwarf2Data->get_debug_str_data()); - if (substitute_name_allowed && name == NULL) + if (substitute_name_allowed && name == nullptr) { if (GetAttributeValue(dwarf2Data, cu, DW_AT_name, form_value)) name = form_value.AsCString(&dwarf2Data->get_debug_str_data()); @@ -1644,7 +1644,7 @@ const DWARFCompileUnit* cu ) const { - const char* name = NULL; + const char* name = nullptr; if (!dwarf2Data) return name; @@ -1687,7 +1687,7 @@ Stream &s ) { - if (dwarf2Data == NULL) + if (dwarf2Data == nullptr) { s.PutCString("NULL"); return false; @@ -1736,7 +1736,7 @@ Stream &s ) { - if (dwarf2Data == NULL) + if (dwarf2Data == nullptr) { s.PutCString("NULL"); return false; @@ -1763,7 +1763,7 @@ bool result = true; const DWARFAbbreviationDeclaration* abbrevDecl = die.GetAbbreviationDeclarationPtr(dwarf2Data, cu, offset); - if (abbrevDecl == NULL) + if (abbrevDecl == nullptr) return false; switch (abbrevDecl->Tag()) @@ -1955,7 +1955,7 @@ DWARFCompileUnit* cu) const { DWARFDebugInfoEntry::Attributes attributes; - GetAttributes(dwarf2Data, cu, NULL, attributes); + GetAttributes(dwarf2Data, cu, nullptr, attributes); return GetParentDeclContextDIE (dwarf2Data, cu, attributes); } @@ -1966,7 +1966,7 @@ { const DWARFDebugInfoEntry * die = this; - while (die != NULL) + while (die != nullptr) { // If this is the original DIE that we are searching for a declaration // for, then don't look in the cache as we don't want our own decl @@ -2015,7 +2015,7 @@ die = die->GetParent(); } - return NULL; + return nullptr; } @@ -2025,7 +2025,7 @@ std::string &storage) const { DWARFDebugInfoEntry::Attributes attributes; - GetAttributes(dwarf2Data, cu, NULL, attributes); + GetAttributes(dwarf2Data, cu, nullptr, attributes); return GetQualifiedName (dwarf2Data, cu, attributes, storage); } @@ -2080,7 +2080,7 @@ break; default: - parent_decl_ctx_die = NULL; + parent_decl_ctx_die = nullptr; break; } } @@ -2091,7 +2091,7 @@ storage.append (name); } if (storage.empty()) - return NULL; + return nullptr; return storage.c_str(); } @@ -2192,13 +2192,13 @@ switch (m_tag) { case DW_TAG_compile_unit: // File - check_children = ((function_die != NULL) || (block_die != NULL)); + check_children = ((function_die != nullptr) || (block_die != nullptr)); break; case DW_TAG_subprogram: // Function if (function_die) *function_die = this; - check_children = (block_die != NULL); + check_children = (block_die != nullptr); break; case DW_TAG_inlined_subroutine: // Inlined Function @@ -2220,7 +2220,7 @@ { // compile units may not have a valid high/low pc when there // are address gaps in subroutines so we must always search // if there is no valid high and low PC - check_children = (m_tag == DW_TAG_compile_unit) && ((function_die != NULL) || (block_die != NULL)); + check_children = (m_tag == DW_TAG_compile_unit) && ((function_die != nullptr) || (block_die != nullptr)); } } else @@ -2242,13 +2242,13 @@ switch (m_tag) { case DW_TAG_compile_unit: // File - check_children = ((function_die != NULL) || (block_die != NULL)); + check_children = ((function_die != nullptr) || (block_die != nullptr)); break; case DW_TAG_subprogram: // Function if (function_die) *function_die = this; - check_children = (block_die != NULL); + check_children = (block_die != nullptr); break; case DW_TAG_inlined_subroutine: // Inlined Function @@ -2316,7 +2316,7 @@ } } offset = DW_INVALID_OFFSET; - return NULL; + return nullptr; } Index: source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -41,7 +41,7 @@ { const lldb::offset_t debug_line_offset = offset; - if (line_table_sp.get() == NULL) + if (line_table_sp.get() == nullptr) break; if (ParseStatementTable(debug_line_data, &offset, line_table_sp.get())) Index: source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp @@ -19,7 +19,7 @@ m_line(0), m_op2() { - m_op2.cstr = NULL; + m_op2.cstr = nullptr; } DWARFDebugMacinfoEntry::~DWARFDebugMacinfoEntry() @@ -34,7 +34,7 @@ case 0: case DW_MACINFO_start_file: case DW_MACINFO_end_file: - return NULL; + return nullptr; default: break; } @@ -114,7 +114,7 @@ case DW_MACINFO_end_file: // No operands m_line = DW_INVALID_OFFSET; - m_op2.cstr = NULL; + m_op2.cstr = nullptr; break; default: // Vendor specific entries always have a ULEB128 and a string Index: source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp @@ -103,8 +103,8 @@ { const DWARFDebugInfoEntry *die = dies.GetDIEPtrAtIndex(die_idx); DWARFDebugInfoEntry::Attributes attributes; - const char *name = NULL; - const char *mangled = NULL; + const char *name = nullptr; + const char *mangled = nullptr; bool add_die = false; const size_t num_attributes = die->GetAttributes(dwarf2Data, cu, fixed_form_sizes, attributes); if (num_attributes > 0) @@ -141,7 +141,7 @@ if (tag == DW_TAG_variable) { const DWARFDebugInfoEntry* parent_die = die->GetParent(); - while ( parent_die != NULL ) + while ( parent_die != nullptr ) { switch (parent_die->Tag()) { @@ -168,12 +168,12 @@ // } // } // } - parent_die = NULL; // Terminate the while loop. + parent_die = nullptr; // Terminate the while loop. break; case DW_TAG_compile_unit: add_die = true; - parent_die = NULL; // Terminate the while loop. + parent_die = nullptr; // Terminate the while loop. break; default: @@ -232,7 +232,7 @@ for (die_idx = 0; die_idx < die_count; ++die_idx) { const DWARFDebugInfoEntry *die = dies.GetDIEPtrAtIndex(die_idx); - const char *name = die->GetAttributeValueAsString(dwarf2Data, cu, DW_AT_name, NULL); + const char *name = die->GetAttributeValueAsString(dwarf2Data, cu, DW_AT_name, nullptr); if (name) { Index: source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h +++ source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h @@ -65,7 +65,7 @@ { if (i < m_descriptors.size()) return &m_descriptors[i]; - return NULL; + return nullptr; } uint32_t NumDescriptors() const { return m_descriptors.size(); } void AddDescriptor(dw_offset_t cu_rel_offset, const char* name); Index: source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp @@ -172,7 +172,7 @@ dw_addr_t begin_addr = begin + base_addr; dw_addr_t end_addr = end + base_addr; - s.AddressRange(begin_addr, end_addr, sizeof (dw_addr_t), verbose ? " ==> addrs = " : NULL); + s.AddressRange(begin_addr, end_addr, sizeof (dw_addr_t), verbose ? " ==> addrs = " : nullptr); } } } Index: source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h +++ source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h @@ -34,7 +34,7 @@ { Entry () : tag(0), - name(NULL) + name(nullptr) { } Entry (dw_tag_t t, const char *n) : Index: source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp @@ -39,7 +39,7 @@ { if (pos != begin) m_qualified_name.append("::"); - if (pos->name == NULL) + if (pos->name == nullptr) { if (pos->tag == DW_TAG_namespace) m_qualified_name.append ("(anonymous namespace)"); @@ -59,7 +59,7 @@ } } if (m_qualified_name.empty()) - return NULL; + return nullptr; return m_qualified_name.c_str(); } Index: source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp @@ -24,7 +24,7 @@ return "NULL"; const char *llvmstr = llvm::dwarf::TagString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_TAG constant: 0x%x", val); return invalid; @@ -37,7 +37,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::ChildrenString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_CHILDREN constant: 0x%x", val); return invalid; @@ -50,7 +50,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::AttributeString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_AT constant: 0x%x", val); return invalid; @@ -63,7 +63,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::FormEncodingString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_FORM constant: 0x%x", val); return invalid; @@ -76,7 +76,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::OperationEncodingString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_OP constant: 0x%x", val); return invalid; @@ -249,7 +249,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::AttributeEncodingString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_ATE constant: 0x%x", val); return invalid; @@ -263,7 +263,7 @@ static char invalid[100]; const char *llvmstr = llvm::dwarf::AccessibilityString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_ACCESS constant: 0x%x", val); return invalid; @@ -276,7 +276,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::VisibilityString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_VIS constant: 0x%x", val); return invalid; @@ -289,7 +289,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::VirtualityString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_VIRTUALITY constant: 0x%x", val); return invalid; @@ -302,7 +302,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::LanguageString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_LANG constant: 0x%x", val); return invalid; @@ -315,7 +315,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::CaseString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_ID constant: 0x%x", val); return invalid; @@ -328,7 +328,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::ConventionString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_CC constant: 0x%x", val); return invalid; @@ -341,7 +341,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::InlineCodeString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_INL constant: 0x%x", val); return invalid; @@ -354,7 +354,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::ArrayOrderString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_ORD constant: 0x%x", val); return invalid; @@ -367,7 +367,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::DiscriminantString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_DSC constant: 0x%x", val); return invalid; @@ -380,7 +380,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::LNStandardString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_LNS constant: 0x%x", val); return invalid; @@ -393,7 +393,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::LNExtendedString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_LNE constant: 0x%x", val); return invalid; @@ -406,7 +406,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::MacinfoString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_MACINFO constant: 0x%x", val); return invalid; @@ -419,7 +419,7 @@ { static char invalid[100]; const char *llvmstr = llvm::dwarf::CallFrameString (val); - if (llvmstr == NULL) + if (llvmstr == nullptr) { snprintf (invalid, sizeof (invalid), "Unknown DW_CFA constant: 0x%x", val); return invalid; Index: source/Plugins/SymbolFile/DWARF/DWARFFormValue.h =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFFormValue.h +++ source/Plugins/SymbolFile/DWARF/DWARFFormValue.h @@ -22,7 +22,7 @@ { ValueTypeTag() : value(), - data(NULL) + data(nullptr) { value.uval = 0; } @@ -53,7 +53,7 @@ bool ExtractValue(const lldb_private::DWARFDataExtractor& data, lldb::offset_t* offset_ptr, const DWARFCompileUnit* cu); - bool IsInlinedCStr() const { return (m_value.data != NULL) && m_value.data == (const uint8_t*)m_value.value.cstr; } + bool IsInlinedCStr() const { return (m_value.data != nullptr) && m_value.data == (const uint8_t*)m_value.value.cstr; } const uint8_t* BlockData() const; uint64_t Reference(const DWARFCompileUnit* cu) const; uint64_t Reference (dw_offset_t offset) const; Index: source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -104,7 +104,7 @@ case 4: return g_form_sizes_addr4; case 8: return g_form_sizes_addr8; } - return NULL; + return nullptr; } DWARFFormValue::DWARFFormValue(dw_form_t form) : @@ -118,7 +118,7 @@ { bool indirect = false; bool is_block = false; - m_value.data = NULL; + m_value.data = nullptr; // Read the value for the form into value and follow and DW_FORM_indirect instances we run into do { @@ -173,7 +173,7 @@ if (is_block) { m_value.data = data.PeekData(*offset_ptr, m_value.value.uval); - if (m_value.data != NULL) + if (m_value.data != nullptr) { *offset_ptr += m_value.value.uval; } @@ -295,7 +295,7 @@ case DW_FORM_data4: s.PutHex32(uvalue); break; case DW_FORM_ref_sig8: case DW_FORM_data8: s.PutHex64(uvalue); break; - case DW_FORM_string: s.QuotedCString(AsCString(NULL)); break; + case DW_FORM_string: s.QuotedCString(AsCString(nullptr)); break; case DW_FORM_exprloc: case DW_FORM_block: case DW_FORM_block1: @@ -384,7 +384,7 @@ return m_value.value.cstr; else if (debug_str_data_ptr) return debug_str_data_ptr->PeekCStr(m_value.value.uval); - return NULL; + return nullptr; } uint64_t @@ -461,7 +461,7 @@ { if (!IsInlinedCStr()) return m_value.data; - return NULL; + return nullptr; } @@ -547,7 +547,7 @@ return 0; else if (a_string && b_string) return strcmp(a_string, b_string); - else if (a_string == NULL) + else if (a_string == nullptr) return -1; // A string is NULL, and B is valid else return 1; // A string valid, and B is NULL Index: source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp @@ -38,7 +38,7 @@ s.AddressRange (start_addr + base_addr, end_addr + base_addr, cu->GetAddressByteSize(), - NULL, + nullptr, ": "); uint32_t loc_length = debug_loc_data.GetU16(&offset); Index: source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h =================================================================== --- source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h +++ source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h @@ -444,7 +444,7 @@ { DWARFFormValue form_value (header_data.atoms[i].form); - if (!form_value.ExtractValue(data, offset_ptr, NULL)) + if (!form_value.ExtractValue(data, offset_ptr, nullptr)) return false; switch (header_data.atoms[i].type) @@ -644,7 +644,7 @@ // There definitely should be a string for this string offset, if // there isn't, there is something wrong, return and error const char *strp_cstr = m_string_table.PeekCStr (pair.key); - if (strp_cstr == NULL) + if (strp_cstr == nullptr) { *hash_data_offset_ptr = UINT32_MAX; return eResultError; @@ -720,7 +720,7 @@ // There definitely should be a string for this string offset, if // there isn't, there is something wrong, return and error const char *strp_cstr = m_string_table.PeekCStr (pair.key); - if (strp_cstr == NULL) + if (strp_cstr == nullptr) return eResultError; const uint32_t count = m_data.GetU32 (hash_data_offset_ptr); Index: source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp +++ source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp @@ -19,7 +19,7 @@ // when the one and only logging channel is abled, then this will be non NULL. -static LogChannelDWARF* g_log_channel = NULL; +static LogChannelDWARF* g_log_channel = nullptr; LogChannelDWARF::LogChannelDWARF () : LogChannel () @@ -79,18 +79,18 @@ void LogChannelDWARF::Delete () { - g_log_channel = NULL; + g_log_channel = nullptr; } void LogChannelDWARF::Disable (const char **categories, Stream *feedback_strm) { - if (m_log_ap.get() == NULL) + if (m_log_ap.get() == nullptr) return; uint32_t flag_bits = m_log_ap->GetMask().Get(); - for (size_t i = 0; categories[i] != NULL; ++i) + for (size_t i = 0; categories[i] != nullptr; ++i) { const char *arg = categories[i]; @@ -139,7 +139,7 @@ g_log_channel = this; uint32_t flag_bits = 0; bool got_unknown_category = false; - for (size_t i = 0; categories[i] != NULL; ++i) + for (size_t i = 0; categories[i] != nullptr; ++i) { const char *arg = categories[i]; @@ -168,7 +168,7 @@ flag_bits = DWARF_LOG_DEFAULT; m_log_ap->GetMask().Reset(flag_bits); m_log_ap->GetOptions().Reset(log_options); - return m_log_ap.get() != NULL; + return m_log_ap.get() != nullptr; } void @@ -193,7 +193,7 @@ if (g_log_channel) return g_log_channel->m_log_ap.get(); - return NULL; + return nullptr; } Log * @@ -204,7 +204,7 @@ if (g_log_channel->m_log_ap->GetMask().AllSet(mask)) return g_log_channel->m_log_ap.get(); } - return NULL; + return nullptr; } Log * @@ -215,7 +215,7 @@ if (g_log_channel->m_log_ap->GetMask().AnySet(mask)) return g_log_channel->m_log_ap.get(); } - return NULL; + return nullptr; } void Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h =================================================================== --- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -237,7 +237,7 @@ if (pos != m_die_to_decl_ctx.end()) return pos->second; else - return NULL; + return nullptr; } clang::DeclContext * @@ -334,7 +334,7 @@ const DWARFDebugInfoEntry *die, bool parse_siblings, bool parse_children, - lldb_private::VariableList* cc_variable_list = NULL); + lldb_private::VariableList* cc_variable_list = nullptr); class DelayedAddObjCClassProperty; typedef std::vector DelayedPropertyList; Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -290,7 +290,7 @@ } for (const DWARFDebugInfoEntry *child_die = die->GetFirstChild(); - child_die != NULL; + child_die != nullptr; child_die = child_die->GetSibling()) { GetTypes (cu, child_die, min_die_offset, max_die_offset, type_mask, type_set); @@ -307,15 +307,15 @@ { TypeSet type_set; - CompileUnit *comp_unit = NULL; - DWARFCompileUnit* dwarf_cu = NULL; + CompileUnit *comp_unit = nullptr; + DWARFCompileUnit* dwarf_cu = nullptr; if (sc_scope) comp_unit = sc_scope->CalculateSymbolContextCompileUnit(); if (comp_unit) { dwarf_cu = GetDWARFCompileUnit(comp_unit); - if (dwarf_cu == 0) + if (dwarf_cu == nullptr) return 0; GetTypes (dwarf_cu, dwarf_cu->DIE(), @@ -431,7 +431,7 @@ GetParentSymbolContextDIE(const DWARFDebugInfoEntry *child_die) { const DWARFDebugInfoEntry *die; - for (die = child_die->GetParent(); die != NULL; die = die->GetParent()) + for (die = child_die->GetParent(); die != nullptr; die = die->GetParent()) { dw_tag_t tag = die->Tag(); @@ -444,7 +444,7 @@ return die; } } - return NULL; + return nullptr; } @@ -452,8 +452,8 @@ SymbolFile (objfile), UserID (0), // Used by SymbolFileDWARFDebugMap to when this class parses .o files to contain the .o file index/ID m_debug_map_module_wp (), - m_debug_map_symfile (NULL), - m_clang_tu_decl (NULL), + m_debug_map_symfile (nullptr), + m_clang_tu_decl (nullptr), m_flags(), m_data_debug_abbrev (), m_data_debug_aranges (), @@ -602,11 +602,11 @@ SymbolFileDWARF::CalculateAbilities () { uint32_t abilities = 0; - if (m_obj_file != NULL) + if (m_obj_file != nullptr) { - const Section* section = NULL; + const Section* section = nullptr; const SectionList *section_list = m_obj_file->GetSectionList(); - if (section_list == NULL) + if (section_list == nullptr) return 0; uint64_t debug_abbrev_file_size = 0; @@ -619,7 +619,7 @@ section_list = §ion->GetChildren (); section = section_list->FindSectionByType (eSectionTypeDWARFDebugInfo, true).get(); - if (section != NULL) + if (section != nullptr) { debug_info_file_size = section->GetFileSize(); @@ -804,7 +804,7 @@ DWARFDebugAbbrev* SymbolFileDWARF::DebugAbbrev() { - if (m_abbr.get() == NULL) + if (m_abbr.get() == nullptr) { const DWARFDataExtractor &debug_abbrev_data = get_debug_abbrev_data(); if (debug_abbrev_data.GetByteSize() > 0) @@ -827,7 +827,7 @@ DWARFDebugInfo* SymbolFileDWARF::DebugInfo() { - if (m_info.get() == NULL) + if (m_info.get() == nullptr) { Timer scoped_timer(__PRETTY_FUNCTION__, "%s this = %p", __PRETTY_FUNCTION__, static_cast(this)); @@ -871,14 +871,14 @@ return info->GetCompileUnit((dw_offset_t)comp_unit->GetID()).get(); } } - return NULL; + return nullptr; } DWARFDebugRanges* SymbolFileDWARF::DebugRanges() { - if (m_ranges.get() == NULL) + if (m_ranges.get() == nullptr) { Timer scoped_timer(__PRETTY_FUNCTION__, "%s this = %p", __PRETTY_FUNCTION__, static_cast(this)); @@ -927,14 +927,14 @@ if (cu_die) { const char * cu_die_name = cu_die->GetName(this, dwarf_cu); - const char * cu_comp_dir = cu_die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_comp_dir, NULL); + const char * cu_comp_dir = cu_die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_comp_dir, nullptr); LanguageType cu_language = (LanguageType)cu_die->GetAttributeValueAsUnsigned(this, dwarf_cu, DW_AT_language, 0); if (cu_die_name) { std::string ramapped_file; FileSpec cu_file_spec; - if (cu_die_name[0] == '/' || cu_comp_dir == NULL || cu_comp_dir[0] == '\0') + if (cu_die_name[0] == '/' || cu_comp_dir == nullptr || cu_comp_dir[0] == '\0') { // If we have a full path to the compile unit, we don't need to resolve // the file. This can be expensive e.g. when the source files are NFS mounted. @@ -1023,8 +1023,8 @@ SymbolFileDWARF::ParseCompileUnitFunction (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, const DWARFDebugInfoEntry *die) { DWARFDebugRanges::RangeList func_ranges; - const char *name = NULL; - const char *mangled = NULL; + const char *name = nullptr; + const char *mangled = nullptr; int decl_file = 0; int decl_line = 0; int decl_column = 0; @@ -1036,7 +1036,7 @@ assert (die->Tag() == DW_TAG_subprogram); if (die->Tag() != DW_TAG_subprogram) - return NULL; + return nullptr; if (die->GetDIENamesAndRanges (this, dwarf_cu, @@ -1081,7 +1081,7 @@ // Supply the type _only_ if it has already been parsed Type *func_type = m_die_to_type.lookup (die); - assert(func_type == NULL || func_type != DIE_IS_BEING_PARSED); + assert(func_type == nullptr || func_type != DIE_IS_BEING_PARSED); if (FixupAddress (func_range.GetBaseAddress())) { @@ -1093,7 +1093,7 @@ func_type, func_range)); // first address range - if (func_sp.get() != NULL) + if (func_sp.get() != nullptr) { if (frame_base.IsValid()) func_sp->GetFrameBaseExpression() = frame_base; @@ -1103,7 +1103,7 @@ } } } - return NULL; + return nullptr; } bool @@ -1149,7 +1149,7 @@ for (func_idx = 0; func_idx < num_functions; ++func_idx) { const DWARFDebugInfoEntry *die = function_dies.GetDIEPtrAtIndex(func_idx); - if (sc.comp_unit->FindFunctionByUID (MakeUserID(die->GetOffset())).get() == NULL) + if (sc.comp_unit->FindFunctionByUID (MakeUserID(die->GetOffset())).get() == nullptr) { if (ParseCompileUnitFunction(sc, dwarf_cu, die)) ++functions_added; @@ -1171,7 +1171,7 @@ if (cu_die) { - const char * cu_comp_dir = cu_die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_comp_dir, NULL); + const char * cu_comp_dir = cu_die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_comp_dir, nullptr); dw_offset_t stmt_list = cu_die->GetAttributeValueAsUnsigned(this, dwarf_cu, DW_AT_stmt_list, DW_INVALID_OFFSET); // All file indexes in DWARF are one based and a file of index zero is @@ -1240,7 +1240,7 @@ SymbolFileDWARF::ParseCompileUnitLineTable (const SymbolContext &sc) { assert (sc.comp_unit); - if (sc.comp_unit->GetLineTable() != NULL) + if (sc.comp_unit->GetLineTable() != nullptr) return true; DWARFCompileUnit* dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); @@ -1291,7 +1291,7 @@ ) { size_t blocks_added = 0; - while (die != NULL) + while (die != nullptr) { dw_tag_t tag = die->Tag(); @@ -1301,7 +1301,7 @@ case DW_TAG_subprogram: case DW_TAG_lexical_block: { - Block *block = NULL; + Block *block = nullptr; if (tag == DW_TAG_subprogram) { // Skip any DW_TAG_subprogram DIEs that are inside @@ -1320,8 +1320,8 @@ block = block_sp.get(); } DWARFDebugRanges::RangeList ranges; - const char *name = NULL; - const char *mangled_name = NULL; + const char *name = nullptr; + const char *mangled_name = nullptr; int decl_file = 0; int decl_line = 0; @@ -1360,7 +1360,7 @@ AddRangesToBlock (*block, ranges, subprogram_low_pc); - if (tag != DW_TAG_subprogram && (name != NULL || mangled_name != NULL)) + if (tag != DW_TAG_subprogram && (name != nullptr || mangled_name != nullptr)) { std::unique_ptr decl_ap; if (decl_file != 0 || decl_line != 0 || decl_column != 0) @@ -1398,7 +1398,7 @@ // DW_TAG_subprogram DIE if (depth == 0) - die = NULL; + die = nullptr; else die = die->GetSibling(); } @@ -1424,8 +1424,8 @@ dwarf_cu, fixed_form_sizes, attributes); - const char *name = NULL; - Type *lldb_type = NULL; + const char *name = nullptr; + Type *lldb_type = nullptr; ClangASTType clang_type; uint64_t uval64 = 0; bool uval64_valid = false; @@ -1475,10 +1475,10 @@ if (name && name[0]) template_param_infos.names.push_back(name); else - template_param_infos.names.push_back(NULL); + template_param_infos.names.push_back(nullptr); if (tag == DW_TAG_template_value_parameter && - lldb_type != NULL && + lldb_type != nullptr && clang_type.IsIntegerType (is_signed) && uval64_valid) { @@ -1513,12 +1513,12 @@ ClangASTContext::TemplateParameterInfos &template_param_infos) { - if (parent_die == NULL) + if (parent_die == nullptr) return false; Args template_parameter_names; for (const DWARFDebugInfoEntry *die = parent_die->GetFirstChild(); - die != NULL; + die != nullptr; die = die->GetSibling()) { const dw_tag_t tag = die->Tag(); @@ -1558,7 +1558,7 @@ tag_decl_kind, template_param_infos); } - return NULL; + return nullptr; } class SymbolFileDWARF::DelayedAddObjCClassProperty @@ -1583,7 +1583,7 @@ m_property_getter_name (property_getter_name), m_property_attributes (property_attributes) { - if (metadata != NULL) + if (metadata != nullptr) { m_metadata_ap.reset(new ClangASTMetadata()); *m_metadata_ap = *metadata; @@ -1667,7 +1667,7 @@ { if (parent_die) { - for (const DWARFDebugInfoEntry *die = parent_die->GetFirstChild(); die != NULL; die = die->GetSibling()) + for (const DWARFDebugInfoEntry *die = parent_die->GetFirstChild(); die != nullptr; die = die->GetSibling()) { dw_tag_t tag = die->Tag(); bool check_virtuality = false; @@ -1707,7 +1707,7 @@ LayoutInfo &layout_info ) { - if (parent_die == NULL) + if (parent_die == nullptr) return 0; size_t count = 0; @@ -1717,7 +1717,7 @@ BitfieldInfo last_field_info; ModuleSP module = GetObjectFile()->GetModule(); - for (die = parent_die->GetFirstChild(); die != NULL; die = die->GetSibling()) + for (die = parent_die->GetFirstChild(); die != nullptr; die = die->GetSibling()) { dw_tag_t tag = die->Tag(); @@ -1735,10 +1735,10 @@ { Declaration decl; //DWARFExpression location; - const char *name = NULL; - const char *prop_name = NULL; - const char *prop_getter_name = NULL; - const char *prop_setter_name = NULL; + const char *name = nullptr; + const char *prop_name = nullptr; + const char *prop_getter_name = nullptr; + const char *prop_setter_name = nullptr; uint32_t prop_attributes = 0; @@ -1775,10 +1775,10 @@ const DWARFDataExtractor& debug_info_data = get_debug_info_data(); uint32_t block_length = form_value.Unsigned(); uint32_t block_offset = form_value.BlockData() - debug_info_data.GetDataStart(); - if (DWARFExpression::Evaluate(NULL, // ExecutionContext * - NULL, // ClangExpressionVariableList * - NULL, // ClangExpressionDeclMap * - NULL, // RegisterContext * + if (DWARFExpression::Evaluate(nullptr, // ExecutionContext * + nullptr, // ClangExpressionVariableList * + nullptr, // ClangExpressionDeclMap * + nullptr, // RegisterContext * module, debug_info_data, block_offset, @@ -1786,9 +1786,9 @@ eRegisterKindDWARF, &initialValue, memberOffset, - NULL)) + nullptr)) { - member_byte_offset = memberOffset.ResolveValue(NULL).UInt(); + member_byte_offset = memberOffset.ResolveValue(nullptr).UInt(); } } else @@ -1915,7 +1915,7 @@ { Type *member_type = ResolveTypeUID(encoding_uid); - clang::FieldDecl *field_decl = NULL; + clang::FieldDecl *field_decl = nullptr; if (tag == DW_TAG_member) { if (member_type) @@ -2021,7 +2021,7 @@ if (anon_field_info.IsValid()) { - clang::FieldDecl *unnamed_bitfield_decl = class_clang_type.AddFieldToRecordType (NULL, + clang::FieldDecl *unnamed_bitfield_decl = class_clang_type.AddFieldToRecordType (nullptr, GetClangASTContext().GetBuiltinTypeForEncodingAndBitSize(eEncodingSint, word_width), accessibility, anon_field_info.bit_size); @@ -2094,14 +2094,14 @@ } } - if (prop_name != NULL) + if (prop_name != nullptr) { - clang::ObjCIvarDecl *ivar_decl = NULL; + clang::ObjCIvarDecl *ivar_decl = nullptr; if (field_decl) { ivar_decl = clang::dyn_cast(field_decl); - assert (ivar_decl != NULL); + assert (ivar_decl != nullptr); } ClangASTMetadata metadata; @@ -2170,10 +2170,10 @@ const DWARFDataExtractor& debug_info_data = get_debug_info_data(); uint32_t block_length = form_value.Unsigned(); uint32_t block_offset = form_value.BlockData() - debug_info_data.GetDataStart(); - if (DWARFExpression::Evaluate (NULL, - NULL, - NULL, - NULL, + if (DWARFExpression::Evaluate (nullptr, + nullptr, + nullptr, + nullptr, module, debug_info_data, block_offset, @@ -2181,9 +2181,9 @@ eRegisterKindDWARF, &initialValue, memberOffset, - NULL)) + nullptr)) { - member_byte_offset = memberOffset.ResolveValue(NULL).UInt(); + member_byte_offset = memberOffset.ResolveValue(nullptr).UInt(); } } else @@ -2265,9 +2265,9 @@ DWARFCompileUnitSP cu_sp; const DWARFDebugInfoEntry* die = debug_info->GetDIEPtr(type_uid, &cu_sp); if (die) - return GetClangDeclContextContainingDIE (cu_sp.get(), die, NULL); + return GetClangDeclContextContainingDIE (cu_sp.get(), die, nullptr); } - return NULL; + return nullptr; } clang::DeclContext* @@ -2275,7 +2275,7 @@ { if (UserIDMatches(type_uid)) return GetClangDeclContextForDIEOffset (sc, type_uid); - return NULL; + return nullptr; } Type* @@ -2292,13 +2292,13 @@ return ResolveTypeUID (cu_sp.get(), type_die, assert_not_being_parsed); } } - return NULL; + return nullptr; } Type* SymbolFileDWARF::ResolveTypeUID (DWARFCompileUnit* cu, const DWARFDebugInfoEntry* die, bool assert_not_being_parsed) { - if (die != NULL) + if (die != nullptr) { Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO)); if (log) @@ -2351,7 +2351,7 @@ } return ResolveType (cu, die); } - return NULL; + return nullptr; } // This function is used when SymbolFileDWARFDebugMap owns a bunch of @@ -2362,7 +2362,7 @@ { ClangASTType clang_type_no_qualifiers = clang_type.RemoveFastQualifiers(); const DWARFDebugInfoEntry* die = m_forward_decl_clang_type_to_die.lookup (clang_type_no_qualifiers.GetOpaqueQualType()); - return die != NULL; + return die != nullptr; } @@ -2372,7 +2372,7 @@ // We have a struct/union/class/enum that needs to be fully resolved. ClangASTType clang_type_no_qualifiers = clang_type.RemoveFastQualifiers(); const DWARFDebugInfoEntry* die = m_forward_decl_clang_type_to_die.lookup (clang_type_no_qualifiers.GetOpaqueQualType()); - if (die == NULL) + if (die == nullptr) { // We have already resolved this type... return true; @@ -2496,7 +2496,7 @@ { DWARFDebugInfo* debug_info = DebugInfo(); - DWARFCompileUnit* method_cu = NULL; + DWARFCompileUnit* method_cu = nullptr; const size_t num_matches = method_die_offsets.size(); for (size_t i=0; iGetUserData() == NULL) + if (dwarf_cu->GetUserData() == nullptr) { // The symbol vendor doesn't know about this compile unit, we // need to parse and add it to the symbol vendor object. @@ -2734,7 +2734,7 @@ sc.comp_unit = GetCompUnitForDWARFCompUnit(dwarf_cu, UINT32_MAX); sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(func_die->GetOffset())).get(); - if (sc.function == NULL) + if (sc.function == nullptr) sc.function = ParseCompileUnitFunction(sc, dwarf_cu, func_die); if (sc.function) @@ -2779,21 +2779,21 @@ bool force_check_line_table = false; if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) { - DWARFDebugInfoEntry *function_die = NULL; - DWARFDebugInfoEntry *block_die = NULL; + DWARFDebugInfoEntry *function_die = nullptr; + DWARFDebugInfoEntry *block_die = nullptr; if (resolve_scope & eSymbolContextBlock) { dwarf_cu->LookupAddress(file_vm_addr, &function_die, &block_die); } else { - dwarf_cu->LookupAddress(file_vm_addr, &function_die, NULL); + dwarf_cu->LookupAddress(file_vm_addr, &function_die, nullptr); } - if (function_die != NULL) + if (function_die != nullptr) { sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(function_die->GetOffset())).get(); - if (sc.function == NULL) + if (sc.function == nullptr) sc.function = ParseCompileUnitFunction(sc, dwarf_cu, function_die); } else @@ -2807,7 +2807,7 @@ force_check_line_table = true; } - if (sc.function != NULL) + if (sc.function != nullptr) { resolved |= eSymbolContextFunction; @@ -2815,7 +2815,7 @@ { Block& block = sc.function->GetBlock (true); - if (block_die != NULL) + if (block_die != nullptr) sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset())); else sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset())); @@ -2828,7 +2828,7 @@ if ((resolve_scope & eSymbolContextLineEntry) || force_check_line_table) { LineTable *line_table = sc.comp_unit->GetLineTable(); - if (line_table != NULL) + if (line_table != nullptr) { // And address that makes it into this function should be in terms // of this debug file if there is no debug map, or it will be an @@ -2854,7 +2854,7 @@ // should only happen when there aren't other functions from // other compile units in these gaps. This helps keep the size // of the aranges down. - sc.comp_unit = NULL; + sc.comp_unit = nullptr; resolved &= ~eSymbolContextCompUnit; } } @@ -2883,13 +2883,13 @@ if (debug_info) { uint32_t cu_idx; - DWARFCompileUnit* dwarf_cu = NULL; + DWARFCompileUnit* dwarf_cu = nullptr; - for (cu_idx = 0; (dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx)) != NULL; ++cu_idx) + for (cu_idx = 0; (dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx)) != nullptr; ++cu_idx) { CompileUnit *dc_cu = GetCompUnitForDWARFCompUnit(dwarf_cu, cu_idx); const bool full_match = (bool)file_spec.GetDirectory(); - bool file_spec_matches_cu_file_spec = dc_cu != NULL && FileSpec::Equal(file_spec, *dc_cu, full_match); + bool file_spec_matches_cu_file_spec = dc_cu != nullptr && FileSpec::Equal(file_spec, *dc_cu, full_match); if (check_inlines || file_spec_matches_cu_file_spec) { SymbolContext sc (m_obj_file->GetModule()); @@ -2911,7 +2911,7 @@ { LineTable *line_table = sc.comp_unit->GetLineTable(); - if (line_table != NULL && line != 0) + if (line_table != nullptr && line != 0) { // We will have already looked up the file index if // we are searching for inline entries. @@ -2926,29 +2926,29 @@ while (line_idx != UINT32_MAX) { - sc.function = NULL; - sc.block = NULL; + sc.function = nullptr; + sc.block = nullptr; if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) { const lldb::addr_t file_vm_addr = sc.line_entry.range.GetBaseAddress().GetFileAddress(); if (file_vm_addr != LLDB_INVALID_ADDRESS) { - DWARFDebugInfoEntry *function_die = NULL; - DWARFDebugInfoEntry *block_die = NULL; - dwarf_cu->LookupAddress(file_vm_addr, &function_die, resolve_scope & eSymbolContextBlock ? &block_die : NULL); + DWARFDebugInfoEntry *function_die = nullptr; + DWARFDebugInfoEntry *block_die = nullptr; + dwarf_cu->LookupAddress(file_vm_addr, &function_die, resolve_scope & eSymbolContextBlock ? &block_die : nullptr); - if (function_die != NULL) + if (function_die != nullptr) { sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(function_die->GetOffset())).get(); - if (sc.function == NULL) + if (sc.function == nullptr) sc.function = ParseCompileUnitFunction(sc, dwarf_cu, function_die); } - if (sc.function != NULL) + if (sc.function != nullptr) { Block& block = sc.function->GetBlock (true); - if (block_die != NULL) + if (block_die != nullptr) sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset())); else sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset())); @@ -3050,7 +3050,7 @@ bool SymbolFileDWARF::NamespaceDeclMatchesThisSymbolFile (const ClangNamespaceDecl *namespace_decl) { - if (namespace_decl == NULL) + if (namespace_decl == nullptr) { // Invalid namespace decl which means we aren't matching only things // in this symbol file, so return true to indicate it matches this @@ -3060,7 +3060,7 @@ clang::ASTContext *namespace_ast = namespace_decl->GetASTContext(); - if (namespace_ast == NULL) + if (namespace_ast == nullptr) return true; // No AST in the "namespace_decl", return true since it // could then match any symbol file, including this one @@ -3082,12 +3082,12 @@ const DWARFDebugInfoEntry* die) { // No namespace specified, so the answesr i - if (namespace_decl == NULL) + if (namespace_decl == nullptr) return true; Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); - const DWARFDebugInfoEntry *decl_ctx_die = NULL; + const DWARFDebugInfoEntry *decl_ctx_die = nullptr; clang::DeclContext *die_clang_decl_ctx = GetClangDeclContextContainingDIE (cu, die, &decl_ctx_die); if (decl_ctx_die) { @@ -3139,7 +3139,7 @@ return 0; DWARFDebugInfo* info = DebugInfo(); - if (info == NULL) + if (info == nullptr) return 0; // If we aren't appending the results to this list, then clear the list @@ -3158,7 +3158,7 @@ { const char *name_cstr = name.GetCString(); const char *base_name_start; - const char *base_name_end = NULL; + const char *base_name_end = nullptr; if (!CPPLanguageRuntime::StripNamespacesFromVariableName(name_cstr, base_name_start, base_name_end)) base_name_start = name_cstr; @@ -3183,8 +3183,8 @@ assert (sc.module_sp); DWARFDebugInfo* debug_info = DebugInfo(); - DWARFCompileUnit* dwarf_cu = NULL; - const DWARFDebugInfoEntry* die = NULL; + DWARFCompileUnit* dwarf_cu = nullptr; + const DWARFDebugInfoEntry* die = nullptr; bool done = false; for (size_t i=0; iGetModule(); assert (sc.module_sp); - DWARFCompileUnit* dwarf_cu = NULL; - const DWARFDebugInfoEntry* die = NULL; + DWARFCompileUnit* dwarf_cu = nullptr; + const DWARFDebugInfoEntry* die = nullptr; const size_t num_matches = die_offsets.size(); if (num_matches) { @@ -3344,19 +3344,19 @@ { SymbolContext sc; - if (die == NULL) + if (die == nullptr) return false; // If we were passed a die that is not a function, just return false... if (die->Tag() != DW_TAG_subprogram && die->Tag() != DW_TAG_inlined_subroutine) return false; - const DWARFDebugInfoEntry* inlined_die = NULL; + const DWARFDebugInfoEntry* inlined_die = nullptr; if (die->Tag() == DW_TAG_inlined_subroutine) { inlined_die = die; - while ((die = die->GetParent()) != NULL) + while ((die = die->GetParent()) != nullptr) { if (die->Tag() == DW_TAG_subprogram) break; @@ -3370,13 +3370,13 @@ if (inlined_die) { sc.block = sc.function->GetBlock (true).FindBlockByID (MakeUserID(inlined_die->GetOffset())); - assert (sc.block != NULL); + assert (sc.block != nullptr); if (sc.block->GetStartAddress (addr) == false) addr.Clear(); } else { - sc.block = NULL; + sc.block = nullptr; addr = sc.function->GetAddressRange().GetBaseAddress(); } @@ -3439,7 +3439,7 @@ { SymbolContext sc; - DWARFCompileUnit* dwarf_cu = NULL; + DWARFCompileUnit* dwarf_cu = nullptr; for (size_t i=0; iGetAttributes(this, dwarf_cu, NULL, attributes); + die->GetAttributes(this, dwarf_cu, nullptr, attributes); uint32_t idx = attributes.FindAttributeIndex(DW_AT_MIPS_linkage_name); if (idx == UINT32_MAX) idx = attributes.FindAttributeIndex(DW_AT_linkage_name); @@ -3519,7 +3519,7 @@ { std::string name_no_parens(partial_name, base_name_end - partial_name); const char *partial_in_demangled = strstr (demangled, name_no_parens.c_str()); - if (partial_in_demangled == NULL) + if (partial_in_demangled == nullptr) return false; else { @@ -3605,10 +3605,10 @@ const uint32_t original_size = sc_list.GetSize(); DWARFDebugInfo* info = DebugInfo(); - if (info == NULL) + if (info == nullptr) return 0; - DWARFCompileUnit *dwarf_cu = NULL; + DWARFCompileUnit *dwarf_cu = nullptr; std::set resolved_dies; if (m_using_apple_tables) { @@ -3814,7 +3814,7 @@ #endif } DIEArray die_offsets; - DWARFCompileUnit *dwarf_cu = NULL; + DWARFCompileUnit *dwarf_cu = nullptr; if (name_type_mask & eFunctionNameTypeBase) { @@ -3945,7 +3945,7 @@ TypeList& types) { DWARFDebugInfo* info = DebugInfo(); - if (info == NULL) + if (info == nullptr) return 0; Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); @@ -3996,8 +3996,8 @@ if (num_die_matches) { const uint32_t initial_types_size = types.GetSize(); - DWARFCompileUnit* dwarf_cu = NULL; - const DWARFDebugInfoEntry* die = NULL; + DWARFCompileUnit* dwarf_cu = nullptr; + const DWARFDebugInfoEntry* die = nullptr; DWARFDebugInfo* debug_info = DebugInfo(); for (size_t i=0; iGetAddressByteSize()); size_t arg_idx = 0; const DWARFDebugInfoEntry *die; - for (die = parent_die->GetFirstChild(); die != NULL; die = die->GetSibling()) + for (die = parent_die->GetFirstChild(); die != nullptr; die = die->GetSibling()) { dw_tag_t tag = die->Tag(); switch (tag) @@ -4206,7 +4206,7 @@ const size_t num_attributes = die->GetAttributes(this, dwarf_cu, fixed_form_sizes, attributes); if (num_attributes > 0) { - const char *name = NULL; + const char *name = nullptr; Declaration decl; dw_offset_t param_type_die_offset = DW_INVALID_OFFSET; bool is_artificial = false; @@ -4269,7 +4269,7 @@ // Often times compilers omit the "this" name for the // specification DIEs, so we can't rely upon the name // being in the formal parameter DIE... - if (name == NULL || ::strcmp(name, "this")==0) + if (name == nullptr || ::strcmp(name, "this")==0) { Type *this_type = ResolveTypeUID (param_type_die_offset); if (this_type) @@ -4364,14 +4364,14 @@ const DWARFDebugInfoEntry *parent_die ) { - if (parent_die == NULL) + if (parent_die == nullptr) return 0; size_t enumerators_added = 0; const DWARFDebugInfoEntry *die; const uint8_t *fixed_form_sizes = DWARFFormValue::GetFixedFormSizesForAddressSize (dwarf_cu->GetAddressByteSize()); - for (die = parent_die->GetFirstChild(); die != NULL; die = die->GetSibling()) + for (die = parent_die->GetFirstChild(); die != nullptr; die = die->GetSibling()) { const dw_tag_t tag = die->Tag(); if (tag == DW_TAG_enumerator) @@ -4380,7 +4380,7 @@ const size_t num_child_attributes = die->GetAttributes(this, dwarf_cu, fixed_form_sizes, attributes); if (num_child_attributes > 0) { - const char *name = NULL; + const char *name = nullptr; bool got_value = false; int64_t enum_value = 0; Declaration decl; @@ -4444,12 +4444,12 @@ uint32_t& bit_stride ) { - if (parent_die == NULL) + if (parent_die == nullptr) return; const DWARFDebugInfoEntry *die; const uint8_t *fixed_form_sizes = DWARFFormValue::GetFixedFormSizesForAddressSize (dwarf_cu->GetAddressByteSize()); - for (die = parent_die->GetFirstChild(); die != NULL; die = die->GetSibling()) + for (die = parent_die->GetFirstChild(); die != nullptr; die = die->GetSibling()) { const dw_tag_t tag = die->Tag(); switch (tag) @@ -4532,16 +4532,16 @@ SymbolFileDWARF::GetTypeForDIE (DWARFCompileUnit *dwarf_cu, const DWARFDebugInfoEntry* die) { TypeSP type_sp; - if (die != NULL) + if (die != nullptr) { - assert(dwarf_cu != NULL); + assert(dwarf_cu != nullptr); Type *type_ptr = m_die_to_type.lookup (die); - if (type_ptr == NULL) + if (type_ptr == nullptr) { CompileUnit* lldb_cu = GetCompUnitForDWARFCompUnit(dwarf_cu); assert (lldb_cu); SymbolContext sc(lldb_cu); - type_sp = ParseType(sc, dwarf_cu, die, NULL); + type_sp = ParseType(sc, dwarf_cu, die, nullptr); } else if (type_ptr != DIE_IS_BEING_PARSED) { @@ -4560,9 +4560,9 @@ { DWARFCompileUnitSP cu_sp; const DWARFDebugInfoEntry* die = DebugInfo()->GetDIEPtr(die_offset, &cu_sp); - return GetClangDeclContextContainingDIE (cu_sp.get(), die, NULL); + return GetClangDeclContextContainingDIE (cu_sp.get(), die, nullptr); } - return NULL; + return nullptr; } clang::DeclContext * @@ -4579,7 +4579,7 @@ return GetClangDeclContextForDIE (sc, cu_sp.get(), die); } } - return NULL; + return nullptr; } clang::NamespaceDecl * @@ -4594,8 +4594,8 @@ return namespace_decl; else { - const char *namespace_name = die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_name, NULL); - clang::DeclContext *containing_decl_ctx = GetClangDeclContextContainingDIE (dwarf_cu, die, NULL); + const char *namespace_name = die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_name, nullptr); + clang::DeclContext *containing_decl_ctx = GetClangDeclContextContainingDIE (dwarf_cu, die, nullptr); namespace_decl = GetClangASTContext().GetUniqueNamespaceDeclaration (namespace_name, containing_decl_ctx); Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO)); if (log) @@ -4626,7 +4626,7 @@ return namespace_decl; } } - return NULL; + return nullptr; } clang::DeclContext * @@ -4660,7 +4660,7 @@ clang::DeclContext * SymbolFileDWARF::GetClangDeclContextContainingDIE (DWARFCompileUnit *cu, const DWARFDebugInfoEntry *die, const DWARFDebugInfoEntry **decl_ctx_die_copy) { - if (m_clang_tu_decl == NULL) + if (m_clang_tu_decl == nullptr) m_clang_tu_decl = GetClangASTContext().getASTContext()->getTranslationUnitDecl(); const DWARFDebugInfoEntry *decl_ctx_die = GetDeclContextDIEContainingDIE (cu, die); @@ -4717,7 +4717,7 @@ { const DWARFDebugInfoEntry * const decl_die = die; - while (die != NULL) + while (die != nullptr) { // If this is the original DIE that we are searching for a declaration // for, then don't look in the cache as we don't want our own decl @@ -4761,14 +4761,14 @@ die = die->GetParent(); } } - return NULL; + return nullptr; } Symbol * SymbolFileDWARF::GetObjCClassSymbol (const ConstString &objc_class_name) { - Symbol *objc_class_symbol = NULL; + Symbol *objc_class_symbol = nullptr; if (m_obj_file) { Symtab *symtab = m_obj_file->GetSymtab (); @@ -4849,8 +4849,8 @@ const size_t num_matches = die_offsets.size(); - DWARFCompileUnit* type_cu = NULL; - const DWARFDebugInfoEntry* type_die = NULL; + DWARFCompileUnit* type_cu = nullptr; + const DWARFDebugInfoEntry* type_die = nullptr; if (num_matches) { DWARFDebugInfo* debug_info = DebugInfo(); @@ -5036,7 +5036,7 @@ assert (DebugInfo()->ContainsCompileUnit (cu)); #endif - if (cu == NULL || die == NULL || !type_name) + if (cu == nullptr || die == nullptr || !type_name) return type_sp; std::string qualified_name; @@ -5094,8 +5094,8 @@ const dw_tag_t die_tag = die->Tag(); - DWARFCompileUnit* type_cu = NULL; - const DWARFDebugInfoEntry* type_die = NULL; + DWARFCompileUnit* type_cu = nullptr; + const DWARFDebugInfoEntry* type_die = nullptr; if (num_matches) { DWARFDebugInfo* debug_info = DebugInfo(); @@ -5265,8 +5265,8 @@ const size_t num_matches = die_offsets.size(); - DWARFCompileUnit* type_cu = NULL; - const DWARFDebugInfoEntry* type_die = NULL; + DWARFCompileUnit* type_cu = nullptr; + const DWARFDebugInfoEntry* type_die = nullptr; if (num_matches) { DWARFDebugInfo* debug_info = DebugInfo(); @@ -5392,7 +5392,7 @@ UniqueCStringMap dst_name_to_die; UniqueCStringMap src_name_to_die_artificial; UniqueCStringMap dst_name_to_die_artificial; - for (src_die = src_class_die->GetFirstChild(); src_die != NULL; src_die = src_die->GetSibling()) + for (src_die = src_class_die->GetFirstChild(); src_die != nullptr; src_die = src_die->GetSibling()) { if (src_die->Tag() == DW_TAG_subprogram) { @@ -5414,7 +5414,7 @@ } } } - for (dst_die = dst_class_die->GetFirstChild(); dst_die != NULL; dst_die = dst_die->GetSibling()) + for (dst_die = dst_class_die->GetFirstChild(); dst_die != nullptr; dst_die = dst_die->GetSibling()) { if (dst_die->Tag() == DW_TAG_subprogram) { @@ -5557,7 +5557,7 @@ { const char *dst_name = dst_name_to_die.GetCStringAtIndex(idx); dst_die = dst_name_to_die.GetValueAtIndexUnchecked(idx); - src_die = src_name_to_die.Find(dst_name, NULL); + src_die = src_name_to_die.Find(dst_name, nullptr); if (src_die && (src_die->Tag() == dst_die->Tag())) { @@ -5618,7 +5618,7 @@ { const char *src_name_artificial = src_name_to_die_artificial.GetCStringAtIndex(idx); src_die = src_name_to_die_artificial.GetValueAtIndexUnchecked (idx); - dst_die = dst_name_to_die_artificial.Find(src_name_artificial, NULL); + dst_die = dst_name_to_die_artificial.Find(src_name_artificial, nullptr); if (dst_die) { @@ -5687,7 +5687,7 @@ #endif AccessType accessibility = eAccessNone; - if (die != NULL) + if (die != nullptr) { Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO)); if (log) @@ -5719,7 +5719,7 @@ Type *type_ptr = m_die_to_type.lookup (die); TypeList* type_list = GetTypeList(); - if (type_ptr == NULL) + if (type_ptr == nullptr) { ClangASTContext &ast = GetClangASTContext(); if (type_is_new_ptr) @@ -5729,7 +5729,7 @@ bool is_forward_declaration = false; DWARFDebugInfoEntry::Attributes attributes; - const char *type_name_cstr = NULL; + const char *type_name_cstr = nullptr; ConstString type_name_const_str; Type::ResolveState resolve_state = Type::eResolveStateUnresolved; uint64_t byte_size = 0; @@ -5756,7 +5756,7 @@ // Set a bit that lets us know that we are currently parsing this m_die_to_type[die] = DIE_IS_BEING_PARSED; - const size_t num_attributes = die->GetAttributes(this, dwarf_cu, NULL, attributes); + const size_t num_attributes = die->GetAttributes(this, dwarf_cu, nullptr, attributes); uint32_t encoding = 0; lldb::user_id_t encoding_uid = LLDB_INVALID_UID; @@ -5780,8 +5780,8 @@ // include the "&"... if (tag == DW_TAG_reference_type) { - if (strchr (type_name_cstr, '&') == NULL) - type_name_cstr = NULL; + if (strchr (type_name_cstr, '&') == nullptr) + type_name_cstr = nullptr; } if (type_name_cstr) type_name_const_str.SetCString(type_name_cstr); @@ -5830,13 +5830,13 @@ case DW_TAG_volatile_type: encoding_data_type = Type::eEncodingIsVolatileUID; break; } - if (!clang_type && (encoding_data_type == Type::eEncodingIsPointerUID || encoding_data_type == Type::eEncodingIsTypedefUID) && sc.comp_unit != NULL) + if (!clang_type && (encoding_data_type == Type::eEncodingIsPointerUID || encoding_data_type == Type::eEncodingIsTypedefUID) && sc.comp_unit != nullptr) { bool translation_unit_is_objc = (sc.comp_unit->GetLanguage() == eLanguageTypeObjC || sc.comp_unit->GetLanguage() == eLanguageTypeObjC_plus_plus); if (translation_unit_is_objc) { - if (type_name_cstr != NULL) + if (type_name_cstr != nullptr) { static ConstString g_objc_type_name_id("id"); static ConstString g_objc_type_name_Class("Class"); @@ -5888,7 +5888,7 @@ if (encoding_die && encoding_die->Tag() == DW_TAG_structure_type) { - if (const char *struct_name = encoding_die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_name, NULL)) + if (const char *struct_name = encoding_die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_name, nullptr)) { if (!strcmp(struct_name, "objc_object")) { @@ -5912,7 +5912,7 @@ this, type_name_const_str, byte_size, - NULL, + nullptr, encoding_uid, encoding_data_type, &decl, @@ -5943,7 +5943,7 @@ LanguageType class_language = eLanguageTypeUnknown; bool is_complete_objc_class = false; //bool struct_is_class = false; - const size_t num_attributes = die->GetAttributes(this, dwarf_cu, NULL, attributes); + const size_t num_attributes = die->GetAttributes(this, dwarf_cu, nullptr, attributes); if (num_attributes > 0) { uint32_t i; @@ -6238,7 +6238,7 @@ this, type_name_const_str, byte_size, - NULL, + nullptr, LLDB_INVALID_UID, Type::eEncodingIsUID, &decl, @@ -6279,7 +6279,7 @@ case DW_TAG_enumeration_type: case DW_TAG_typedef: case DW_TAG_union_type: - child_die = NULL; + child_die = nullptr; is_forward_declaration = false; break; default: @@ -6344,7 +6344,7 @@ lldb::user_id_t encoding_uid = DW_INVALID_OFFSET; - const size_t num_attributes = die->GetAttributes(this, dwarf_cu, NULL, attributes); + const size_t num_attributes = die->GetAttributes(this, dwarf_cu, nullptr, attributes); if (num_attributes > 0) { uint32_t i; @@ -6397,12 +6397,12 @@ } if (!enumerator_clang_type) - enumerator_clang_type = ast.GetBuiltinTypeForDWARFEncodingAndBitSize (NULL, + enumerator_clang_type = ast.GetBuiltinTypeForDWARFEncodingAndBitSize (nullptr, DW_ATE_signed, byte_size * 8); clang_type = ast.CreateEnumerationType (type_name_cstr, - GetClangDeclContextContainingDIE (dwarf_cu, die, NULL), + GetClangDeclContextContainingDIE (dwarf_cu, die, nullptr), decl, enumerator_clang_type); } @@ -6417,7 +6417,7 @@ this, type_name_const_str, byte_size, - NULL, + nullptr, encoding_uid, Type::eEncodingIsUID, &decl, @@ -6460,7 +6460,7 @@ clang::StorageClass storage = clang::SC_None;//, Extern, Static, PrivateExtern - const size_t num_attributes = die->GetAttributes(this, dwarf_cu, NULL, attributes); + const size_t num_attributes = die->GetAttributes(this, dwarf_cu, nullptr, attributes); if (num_attributes > 0) { uint32_t i; @@ -6555,7 +6555,7 @@ DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); ClangASTType return_clang_type; - Type *func_type = NULL; + Type *func_type = nullptr; if (type_die_offset != DW_INVALID_OFFSET) func_type = ResolveTypeUID(type_die_offset); @@ -6571,7 +6571,7 @@ // Parse the function children for the parameters - const DWARFDebugInfoEntry *decl_ctx_die = NULL; + const DWARFDebugInfoEntry *decl_ctx_die = nullptr; clang::DeclContext *containing_decl_ctx = GetClangDeclContextContainingDIE (dwarf_cu, die, &decl_ctx_die); const clang::Decl::Kind containing_decl_kind = containing_decl_ctx->getDeclKind(); @@ -6618,7 +6618,7 @@ ConstString class_name(objc_method.GetClassName()); if (class_name) { - TypeSP complete_objc_class_type_sp (FindCompleteObjCDefinitionTypeForDIE (NULL, class_name, false)); + TypeSP complete_objc_class_type_sp (FindCompleteObjCDefinitionTypeForDIE (nullptr, class_name, false)); if (complete_objc_class_type_sp) { @@ -6639,7 +6639,7 @@ clang_type, accessibility, is_artificial); - type_handled = objc_method_decl != NULL; + type_handled = objc_method_decl != nullptr; if (type_handled) { LinkDeclContextToDIE(ClangASTContext::GetAsDeclContext(objc_method_decl), die); @@ -6667,9 +6667,9 @@ // We uniqued the parent class of this function to another class // so we now need to associate all dies under "decl_ctx_die" to // DIEs in the DIE for "class_type"... - SymbolFileDWARF *class_symfile = NULL; + SymbolFileDWARF *class_symfile = nullptr; DWARFCompileUnitSP class_type_cu_sp; - const DWARFDebugInfoEntry *class_type_die = NULL; + const DWARFDebugInfoEntry *class_type_die = nullptr; SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile(); if (debug_map_symfile) @@ -6796,13 +6796,13 @@ is_attr_used, is_artificial); - type_handled = cxx_method_decl != NULL; + type_handled = cxx_method_decl != nullptr; if (type_handled) { LinkDeclContextToDIE(ClangASTContext::GetAsDeclContext(cxx_method_decl), die); - Host::SetCrashDescription (NULL); + Host::SetCrashDescription (nullptr); ClangASTMetadata metadata; @@ -6833,7 +6833,7 @@ // DIE should then have an entry in the m_die_to_type map. First // we need to modify the m_die_to_type so it doesn't think we are // trying to parse this DIE anymore... - m_die_to_type[die] = NULL; + m_die_to_type[die] = nullptr; // Now we get the full type to force our class type to complete itself // using the clang::ExternalASTSource protocol which will parse all @@ -6905,7 +6905,7 @@ this, type_name_const_str, 0, - NULL, + nullptr, LLDB_INVALID_UID, Type::eEncodingIsUID, &decl, @@ -6925,7 +6925,7 @@ uint32_t byte_stride = 0; uint32_t bit_stride = 0; bool is_vector = false; - const size_t num_attributes = die->GetAttributes(this, dwarf_cu, NULL, attributes); + const size_t num_attributes = die->GetAttributes(this, dwarf_cu, nullptr, attributes); if (num_attributes > 0) { @@ -6996,7 +6996,7 @@ this, empty_name, array_element_bit_stride / 8, - NULL, + nullptr, type_die_offset, Type::eEncodingIsUID, &decl, @@ -7013,7 +7013,7 @@ dw_offset_t type_die_offset = DW_INVALID_OFFSET; dw_offset_t containing_type_die_offset = DW_INVALID_OFFSET; - const size_t num_attributes = die->GetAttributes(this, dwarf_cu, NULL, attributes); + const size_t num_attributes = die->GetAttributes(this, dwarf_cu, nullptr, attributes); if (num_attributes > 0) { uint32_t i; @@ -7046,10 +7046,10 @@ this, type_name_const_str, byte_size, - NULL, + nullptr, LLDB_INVALID_UID, Type::eEncodingIsUID, - NULL, + nullptr, clang_type, Type::eResolveStateForward)); } @@ -7069,19 +7069,19 @@ const DWARFDebugInfoEntry *sc_parent_die = GetParentSymbolContextDIE(die); dw_tag_t sc_parent_tag = sc_parent_die ? sc_parent_die->Tag() : 0; - SymbolContextScope * symbol_context_scope = NULL; + SymbolContextScope * symbol_context_scope = nullptr; if (sc_parent_tag == DW_TAG_compile_unit) { symbol_context_scope = sc.comp_unit; } - else if (sc.function != NULL) + else if (sc.function != nullptr) { symbol_context_scope = sc.function->GetBlock(true).FindBlockByID(MakeUserID(sc_parent_die->GetOffset())); - if (symbol_context_scope == NULL) + if (symbol_context_scope == nullptr) symbol_context_scope = sc.function; } - if (symbol_context_scope != NULL) + if (symbol_context_scope != nullptr) { type_sp->SetSymbolContextScope(symbol_context_scope); } @@ -7111,7 +7111,7 @@ ) { size_t types_added = 0; - while (die != NULL) + while (die != nullptr) { bool type_is_new = false; if (ParseType(sc, dwarf_cu, die, &type_is_new).get()) @@ -7135,7 +7135,7 @@ if (parse_siblings) die = die->GetSibling(); else - die = NULL; + die = nullptr; } return types_added; } @@ -7195,17 +7195,17 @@ size_t SymbolFileDWARF::ParseVariablesForContext (const SymbolContext& sc) { - if (sc.comp_unit != NULL) + if (sc.comp_unit != nullptr) { DWARFDebugInfo* info = DebugInfo(); - if (info == NULL) + if (info == nullptr) return 0; if (sc.function) { DWARFCompileUnit* dwarf_cu = info->GetCompileUnitContainingDIE(sc.function->GetID()).get(); - if (dwarf_cu == NULL) + if (dwarf_cu == nullptr) return 0; const DWARFDebugInfoEntry *function_die = dwarf_cu->GetDIEPtr(sc.function->GetID()); @@ -7224,19 +7224,19 @@ { DWARFCompileUnit* dwarf_cu = info->GetCompileUnit(sc.comp_unit->GetID()).get(); - if (dwarf_cu == NULL) + if (dwarf_cu == nullptr) return 0; uint32_t vars_added = 0; VariableListSP variables (sc.comp_unit->GetVariableList(false)); - if (variables.get() == NULL) + if (variables.get() == nullptr) { variables.reset(new VariableList()); sc.comp_unit->SetVariableList(variables); - DWARFCompileUnit* match_dwarf_cu = NULL; - const DWARFDebugInfoEntry* die = NULL; + DWARFCompileUnit* match_dwarf_cu = nullptr; + const DWARFDebugInfoEntry* die = nullptr; DIEArray die_offsets; if (m_using_apple_tables) { @@ -7320,11 +7320,11 @@ (tag == DW_TAG_formal_parameter && sc.function)) { DWARFDebugInfoEntry::Attributes attributes; - const size_t num_attributes = die->GetAttributes(this, dwarf_cu, NULL, attributes); + const size_t num_attributes = die->GetAttributes(this, dwarf_cu, nullptr, attributes); if (num_attributes > 0) { - const char *name = NULL; - const char *mangled = NULL; + const char *name = nullptr; + const char *mangled = nullptr; Declaration decl; uint32_t i; lldb::user_id_t type_uid = LLDB_INVALID_UID; @@ -7442,7 +7442,7 @@ const DWARFDebugInfoEntry *sc_parent_die = GetParentSymbolContextDIE(die); dw_tag_t parent_tag = sc_parent_die ? sc_parent_die->Tag() : 0; - SymbolContextScope * symbol_context_scope = NULL; + SymbolContextScope * symbol_context_scope = nullptr; // DWARF doesn't specify if a DW_TAG_variable is a local, global // or static variable, so we have to do a little digging by @@ -7467,7 +7467,7 @@ if (op_error) { StreamString strm; - location.DumpLocationForAddress (&strm, eDescriptionLevelFull, 0, 0, NULL); + location.DumpLocationForAddress (&strm, eDescriptionLevelFull, 0, 0, nullptr); GetObjectFile()->GetModule()->ReportError ("0x%8.8x: %s has an invalid location: %s", die->GetOffset(), DW_TAG_value_to_name(die->Tag()), strm.GetString().c_str()); } } @@ -7560,7 +7560,7 @@ } } - if (symbol_context_scope == NULL) + if (symbol_context_scope == nullptr) { switch (parent_tag) { @@ -7570,7 +7570,7 @@ if (sc.function) { symbol_context_scope = sc.function->GetBlock(true).FindBlockByID(MakeUserID(sc_parent_die->GetOffset())); - if (symbol_context_scope == NULL) + if (symbol_context_scope == nullptr) symbol_context_scope = sc.function; } break; @@ -7630,7 +7630,7 @@ assert (*result_die_cu_handle); return FindBlockContainingSpecification (*result_die_cu_handle, die, spec_block_die_offset, result_die_cu_handle); } - return NULL; + return nullptr; } @@ -7666,7 +7666,7 @@ // Give the concrete function die specified by "func_die_offset", find the // concrete block whose DW_AT_specification or DW_AT_abstract_origin points // to "spec_block_die_offset" - for (const DWARFDebugInfoEntry *child_die = die->GetFirstChild(); child_die != NULL; child_die = child_die->GetSibling()) + for (const DWARFDebugInfoEntry *child_die = die->GetFirstChild(); child_die != nullptr; child_die = child_die->GetSibling()) { const DWARFDebugInfoEntry *result_die = FindBlockContainingSpecification (dwarf_cu, child_die, @@ -7677,8 +7677,8 @@ } } - *result_die_cu_handle = NULL; - return NULL; + *result_die_cu_handle = nullptr; + return nullptr; } size_t @@ -7693,14 +7693,14 @@ VariableList* cc_variable_list ) { - if (orig_die == NULL) + if (orig_die == nullptr) return 0; VariableListSP variable_list_sp; size_t vars_added = 0; const DWARFDebugInfoEntry *die = orig_die; - while (die != NULL) + while (die != nullptr) { dw_tag_t tag = die->Tag(); @@ -7717,17 +7717,17 @@ (tag == DW_TAG_constant) || (tag == DW_TAG_formal_parameter && sc.function)) { - if (variable_list_sp.get() == NULL) + if (variable_list_sp.get() == nullptr) { const DWARFDebugInfoEntry *sc_parent_die = GetParentSymbolContextDIE(orig_die); dw_tag_t parent_tag = sc_parent_die ? sc_parent_die->Tag() : 0; switch (parent_tag) { case DW_TAG_compile_unit: - if (sc.comp_unit != NULL) + if (sc.comp_unit != nullptr) { variable_list_sp = sc.comp_unit->GetVariableList(false); - if (variable_list_sp.get() == NULL) + if (variable_list_sp.get() == nullptr) { variable_list_sp.reset(new VariableList()); sc.comp_unit->SetVariableList(variable_list_sp); @@ -7746,12 +7746,12 @@ case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: case DW_TAG_lexical_block: - if (sc.function != NULL) + if (sc.function != nullptr) { // Check to see if we already have parsed the variables for the given scope Block *block = sc.function->GetBlock(true).FindBlockByID(MakeUserID(sc_parent_die->GetOffset())); - if (block == NULL) + if (block == nullptr) { // This must be a specification or abstract origin with // a concrete block couterpart in the current function. We need @@ -7765,11 +7765,11 @@ block = sc.function->GetBlock(true).FindBlockByID(MakeUserID(concrete_block_die->GetOffset())); } - if (block != NULL) + if (block != nullptr) { const bool can_create = false; variable_list_sp = block->GetBlockVariableList (can_create); - if (variable_list_sp.get() == NULL) + if (variable_list_sp.get() == nullptr) { variable_list_sp.reset(new VariableList()); block->SetVariableList(variable_list_sp); @@ -7800,7 +7800,7 @@ } } - bool skip_children = (sc.function == NULL && tag == DW_TAG_subprogram); + bool skip_children = (sc.function == nullptr && tag == DW_TAG_subprogram); if (!skip_children && parse_children && die->HasChildren()) { @@ -7810,7 +7810,7 @@ if (parse_siblings) die = die->GetSibling(); else - die = NULL; + die = nullptr; } return vars_added; } @@ -7887,8 +7887,8 @@ DIEArray die_offsets; - DWARFCompileUnit* dwarf_cu = NULL; - const DWARFDebugInfoEntry* die = NULL; + DWARFCompileUnit* dwarf_cu = nullptr; + const DWARFDebugInfoEntry* die = nullptr; if (m_using_apple_tables) { @@ -8015,7 +8015,7 @@ SymbolFileDWARFDebugMap * SymbolFileDWARF::GetDebugMapSymfile () { - if (m_debug_map_symfile == NULL && !m_debug_map_module_wp.expired()) + if (m_debug_map_symfile == nullptr && !m_debug_map_module_wp.expired()) { lldb::ModuleSP module_sp (m_debug_map_module_wp.lock()); if (module_sp) Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -197,7 +197,7 @@ virtual SymbolVendor* - GetSymbolVendor(bool can_create = true, lldb_private::Stream *feedback_strm = NULL) + GetSymbolVendor(bool can_create = true, lldb_private::Stream *feedback_strm = nullptr) { // Scope for locker if (m_symfile_ap.get() || can_create == false) @@ -220,7 +220,7 @@ SymbolFileDWARF *oso_symfile = SymbolFileDWARFDebugMap::GetSymbolFileAsSymbolFileDWARF(symbol_vendor->GetSymbolFile()); if (!oso_symfile) - return NULL; + return nullptr; ObjectFile *exe_objfile = exe_module_sp->GetObjectFile(); SymbolVendor *exe_sym_vendor = exe_module_sp->GetSymbolVendor(); @@ -244,7 +244,7 @@ } } } - return NULL; + return nullptr; } protected: @@ -309,7 +309,7 @@ llvm::IntrusiveRefCntPtr ast_source_ap ( new ClangExternalASTSourceCallbacks (SymbolFileDWARFDebugMap::CompleteTagDecl, SymbolFileDWARFDebugMap::CompleteObjCInterfaceDecl, - NULL, + nullptr, SymbolFileDWARFDebugMap::LayoutRecordType, this)); @@ -434,9 +434,9 @@ } else { - if (oso_symbol == NULL) + if (oso_symbol == nullptr) m_obj_file->GetModule()->ReportError ("N_OSO symbol[%u] can't be found, please file a bug and attach the binary listed in this error", oso_idx); - else if (so_symbol == NULL) + else if (so_symbol == nullptr) m_obj_file->GetModule()->ReportError ("N_SO not found for N_OSO symbol[%u], please file a bug and attach the binary listed in this error", oso_idx); else if (so_symbol->GetType() != eSymbolTypeSourceFile) m_obj_file->GetModule()->ReportError ("N_SO has incorrect symbol type (%u) for N_OSO symbol[%u], please file a bug and attach the binary listed in this error", so_symbol->GetType(), oso_idx); @@ -454,7 +454,7 @@ const uint32_t cu_count = GetNumCompileUnits(); if (oso_idx < cu_count) return GetModuleByCompUnitInfo (&m_compile_unit_infos[oso_idx]); - return NULL; + return nullptr; } Module * @@ -484,7 +484,7 @@ oso_file.GetPath().c_str(), oso_mod_time.GetAsSecondsSinceJan1_1970(), comp_unit_info->oso_mod_time.GetAsSecondsSinceJan1_1970()); - return NULL; + return nullptr; } } @@ -497,7 +497,7 @@ oso_object, must_exist)) { - return NULL; + return nullptr; } } // Always create a new module for .o files. Why? Because we @@ -508,14 +508,14 @@ GetCompUnitInfoIndex(comp_unit_info), oso_file, m_obj_file->GetModule()->GetArchitecture(), - oso_object ? &oso_object : NULL, + oso_object ? &oso_object : nullptr, 0, - oso_object ? &comp_unit_info->oso_mod_time : NULL)); + oso_object ? &comp_unit_info->oso_mod_time : nullptr)); } } if (comp_unit_info->oso_sp) return comp_unit_info->oso_sp->module_sp.get(); - return NULL; + return nullptr; } @@ -541,7 +541,7 @@ Module *oso_module = GetModuleByOSOIndex (oso_idx); if (oso_module) return oso_module->GetObjectFile(); - return NULL; + return nullptr; } SymbolFileDWARF * @@ -550,7 +550,7 @@ CompileUnitInfo *comp_unit_info = GetCompUnitInfo (sc); if (comp_unit_info) return GetSymbolFileByCompUnitInfo (comp_unit_info); - return NULL; + return nullptr; } ObjectFile * @@ -559,7 +559,7 @@ Module *oso_module = GetModuleByCompUnitInfo (comp_unit_info); if (oso_module) return oso_module->GetObjectFile(); - return NULL; + return nullptr; } @@ -581,7 +581,7 @@ { if (oso_idx < m_compile_unit_infos.size()) return GetSymbolFileByCompUnitInfo (&m_compile_unit_infos[oso_idx]); - return NULL; + return nullptr; } SymbolFileDWARF * @@ -589,7 +589,7 @@ { if (sym_file && sym_file->GetPluginName() == SymbolFileDWARF::GetPluginNameStatic()) return (SymbolFileDWARF *)sym_file; - return NULL; + return nullptr; } SymbolFileDWARF * @@ -602,7 +602,7 @@ if (sym_vendor) return GetSymbolFileAsSymbolFileDWARF (sym_vendor->GetSymbolFile()); } - return NULL; + return nullptr; } uint32_t @@ -658,7 +658,7 @@ // one compile unit for now. lldb::user_id_t cu_id = 0; m_compile_unit_infos[cu_idx].compile_unit_sp.reset(new CompileUnit (m_obj_file->GetModule(), - NULL, + nullptr, so_file_spec, cu_id, eLanguageTypeUnknown)); @@ -685,7 +685,7 @@ if (sc.comp_unit == m_compile_unit_infos[i].compile_unit_sp.get()) return &m_compile_unit_infos[i]; } - return NULL; + return nullptr; } @@ -776,7 +776,7 @@ SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex (oso_idx); if (oso_dwarf) return oso_dwarf->ResolveTypeUID (type_uid); - return NULL; + return nullptr; } bool @@ -801,7 +801,7 @@ sc.symbol = symtab->SymbolAtIndex(debug_map_entry->data.GetExeSymbolIndex()); - if (sc.symbol != NULL) + if (sc.symbol != nullptr) { resolved_flags |= eSymbolContextSymbol; @@ -904,7 +904,7 @@ uint32_t total_matches = 0; SymbolFileDWARF *oso_dwarf; - for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != NULL); ++oso_idx) + for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { const uint32_t oso_matches = oso_dwarf->FindGlobalVariables (name, namespace_decl, @@ -946,7 +946,7 @@ uint32_t total_matches = 0; SymbolFileDWARF *oso_dwarf; - for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != NULL); ++oso_idx) + for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { const uint32_t oso_matches = oso_dwarf->FindGlobalVariables (regex, true, @@ -1008,7 +1008,7 @@ SymbolFileDWARFDebugMap::GetCompileUnitInfoForSymbolWithIndex (uint32_t symbol_idx, uint32_t *oso_idx_ptr) { const uint32_t oso_index_count = m_compile_unit_infos.size(); - CompileUnitInfo *comp_unit_info = NULL; + CompileUnitInfo *comp_unit_info = nullptr; if (oso_index_count) { comp_unit_info = (CompileUnitInfo*)bsearch(&symbol_idx, @@ -1020,7 +1020,7 @@ if (oso_idx_ptr) { - if (comp_unit_info != NULL) + if (comp_unit_info != nullptr) *oso_idx_ptr = comp_unit_info - &m_compile_unit_infos[0]; else *oso_idx_ptr = UINT32_MAX; @@ -1032,7 +1032,7 @@ SymbolFileDWARFDebugMap::GetCompileUnitInfoForSymbolWithID (user_id_t symbol_id, uint32_t *oso_idx_ptr) { const uint32_t oso_index_count = m_compile_unit_infos.size(); - CompileUnitInfo *comp_unit_info = NULL; + CompileUnitInfo *comp_unit_info = nullptr; if (oso_index_count) { comp_unit_info = (CompileUnitInfo*)::bsearch (&symbol_id, @@ -1044,7 +1044,7 @@ if (oso_idx_ptr) { - if (comp_unit_info != NULL) + if (comp_unit_info != nullptr) *oso_idx_ptr = comp_unit_info - &m_compile_unit_infos[0]; else *oso_idx_ptr = UINT32_MAX; @@ -1095,7 +1095,7 @@ uint32_t oso_idx = 0; SymbolFileDWARF *oso_dwarf; - while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL) + while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != nullptr) { uint32_t sc_idx = sc_list.GetSize(); if (oso_dwarf->FindFunctions(name, namespace_decl, name_type_mask, include_inlines, true, sc_list)) @@ -1123,7 +1123,7 @@ uint32_t oso_idx = 0; SymbolFileDWARF *oso_dwarf; - while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL) + while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != nullptr) { uint32_t sc_idx = sc_list.GetSize(); @@ -1147,7 +1147,7 @@ uint32_t initial_size = type_list.GetSize(); - SymbolFileDWARF *oso_dwarf = NULL; + SymbolFileDWARF *oso_dwarf = nullptr; if (sc_scope) { SymbolContext sc; @@ -1164,7 +1164,7 @@ else { uint32_t oso_idx = 0; - while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL) + while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != nullptr) { oso_dwarf->GetTypes (sc_scope, type_mask, type_list); } @@ -1178,7 +1178,7 @@ { TypeSP type_sp; SymbolFileDWARF *oso_dwarf; - for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != NULL); ++oso_idx) + for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { type_sp = oso_dwarf->FindDefinitionTypeForDWARFDeclContext (die_decl_ctx); if (type_sp) @@ -1196,9 +1196,9 @@ { m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolNo; SymbolFileDWARF *oso_dwarf; - for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != NULL); ++oso_idx) + for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { - if (skip_dwarf_oso != oso_dwarf && oso_dwarf->Supports_DW_AT_APPLE_objc_complete_type(NULL)) + if (skip_dwarf_oso != oso_dwarf && oso_dwarf->Supports_DW_AT_APPLE_objc_complete_type(nullptr)) { m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolYes; break; @@ -1215,7 +1215,7 @@ { TypeSP type_sp; SymbolFileDWARF *oso_dwarf; - for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != NULL); ++oso_idx) + for (uint32_t oso_idx = 0; ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { type_sp = oso_dwarf->FindCompleteObjCDefinitionTypeForDIE (die, type_name, must_be_implementation); if (type_sp) @@ -1250,7 +1250,7 @@ else { uint32_t oso_idx = 0; - while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL) + while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != nullptr) oso_dwarf->FindTypes (sc, name, namespace_decl, append, max_matches, types); } @@ -1285,7 +1285,7 @@ else { for (uint32_t oso_idx = 0; - ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != NULL); + ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { matching_namespace = oso_dwarf->FindNamespace (sc, name, parent_namespace_decl); @@ -1350,7 +1350,7 @@ } } } - return NULL; + return nullptr; } @@ -1389,7 +1389,7 @@ { SymbolFileDWARF *oso_dwarf; - for (uint32_t oso_idx = 0; ((oso_dwarf = symbol_file_dwarf->GetSymbolFileByOSOIndex (oso_idx)) != NULL); ++oso_idx) + for (uint32_t oso_idx = 0; ((oso_dwarf = symbol_file_dwarf->GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { if (oso_dwarf->HasForwardDeclForClangType (clang_type)) { @@ -1409,7 +1409,7 @@ { SymbolFileDWARF *oso_dwarf; - for (uint32_t oso_idx = 0; ((oso_dwarf = symbol_file_dwarf->GetSymbolFileByOSOIndex (oso_idx)) != NULL); ++oso_idx) + for (uint32_t oso_idx = 0; ((oso_dwarf = symbol_file_dwarf->GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { if (oso_dwarf->HasForwardDeclForClangType (clang_type)) { @@ -1431,7 +1431,7 @@ { SymbolFileDWARFDebugMap *symbol_file_dwarf = (SymbolFileDWARFDebugMap *)baton; SymbolFileDWARF *oso_dwarf; - for (uint32_t oso_idx = 0; ((oso_dwarf = symbol_file_dwarf->GetSymbolFileByOSOIndex (oso_idx)) != NULL); ++oso_idx) + for (uint32_t oso_idx = 0; ((oso_dwarf = symbol_file_dwarf->GetSymbolFileByOSOIndex (oso_idx)) != nullptr); ++oso_idx) { if (oso_dwarf->LayoutRecordType (record_decl, size, alignment, field_offsets, base_offsets, vbase_offsets)) return true; @@ -1448,7 +1448,7 @@ SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex (oso_idx); if (oso_dwarf) return oso_dwarf->GetClangDeclContextContainingTypeUID (type_uid); - return NULL; + return nullptr; } clang::DeclContext* @@ -1458,7 +1458,7 @@ SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex (oso_idx); if (oso_dwarf) return oso_dwarf->GetClangDeclContextForTypeUID (sc, type_uid); - return NULL; + return nullptr; } bool @@ -1553,7 +1553,7 @@ CompileUnitInfo *cu_info = GetCompileUnitInfo (oso_dwarf); if (cu_info) return line_table->LinkLineTable(cu_info->GetFileRangeMap(this)); - return NULL; + return nullptr; } size_t Index: source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h =================================================================== --- source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h +++ source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h @@ -32,9 +32,9 @@ //------------------------------------------------------------------ UniqueDWARFASTType () : m_type_sp (), - m_symfile (NULL), - m_cu (NULL), - m_die (NULL), + m_symfile (nullptr), + m_cu (nullptr), + m_die (nullptr), m_declaration (), m_byte_size (-1) // Set to negative value to make sure we have a valid value { Index: source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp +++ source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp @@ -59,14 +59,14 @@ case DW_TAG_namespace: { const char *parent_arg_die_name = parent_arg_die->GetName(symfile, cu); - if (parent_arg_die_name == NULL) // Anonymous (i.e. no-name) struct + if (parent_arg_die_name == nullptr) // Anonymous (i.e. no-name) struct { match = false; } else { const char *parent_pos_die_name = parend_pos_die->GetName(pos->m_symfile, pos->m_cu); - if (parent_pos_die_name == NULL || strcmp (parent_arg_die_name, parent_pos_die_name)) + if (parent_pos_die_name == nullptr || strcmp (parent_arg_die_name, parent_pos_die_name)) match = false; } } Index: source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp =================================================================== --- source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp +++ source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp @@ -161,7 +161,7 @@ { const Symbol *cu_symbol = m_obj_file->GetSymtab()->SymbolAtIndex(m_source_indexes[idx]); if (cu_symbol) - cu_sp.reset(new CompileUnit (m_obj_file->GetModule(), NULL, cu_symbol->GetMangled().GetName().AsCString(), 0, eLanguageTypeUnknown)); + cu_sp.reset(new CompileUnit (m_obj_file->GetModule(), nullptr, cu_symbol->GetMangled().GetName().AsCString(), 0, eLanguageTypeUnknown)); } return cu_sp; } @@ -178,10 +178,10 @@ { size_t num_added = 0; // We must at least have a valid compile unit - assert (sc.comp_unit != NULL); + assert (sc.comp_unit != nullptr); const Symtab *symtab = m_obj_file->GetSymtab(); - const Symbol *curr_symbol = NULL; - const Symbol *next_symbol = NULL; + const Symbol *curr_symbol = nullptr; + const Symbol *next_symbol = nullptr; // const char *prefix = m_obj_file->SymbolPrefix(); // if (prefix == NULL) // prefix == ""; @@ -233,10 +233,10 @@ symbol_idx, // UserID is the DIE offset LLDB_INVALID_UID, // We don't have any type info for this function curr_symbol->GetMangled(), // Linker/mangled name - NULL, // no return type for a code symbol... + nullptr, // no return type for a code symbol... func_range)); // first address range - if (func_sp.get() != NULL) + if (func_sp.get() != nullptr) { sc.comp_unit->AddFunction(func_sp); ++num_added; @@ -289,7 +289,7 @@ Type* SymbolFileSymtab::ResolveTypeUID(lldb::user_id_t type_uid) { - return NULL; + return nullptr; } bool @@ -307,7 +307,7 @@ uint32_t SymbolFileSymtab::ResolveSymbolContext (const Address& so_addr, uint32_t resolve_scope, SymbolContext& sc) { - if (m_obj_file->GetSymtab() == NULL) + if (m_obj_file->GetSymtab() == nullptr) return 0; uint32_t resolved_flags = 0; Index: source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp =================================================================== --- source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -80,20 +80,20 @@ SymbolVendorELF::CreateInstance (const lldb::ModuleSP &module_sp, lldb_private::Stream *feedback_strm) { if (!module_sp) - return NULL; + return nullptr; ObjectFile *obj_file = module_sp->GetObjectFile(); if (!obj_file) - return NULL; + return nullptr; static ConstString obj_file_elf("elf"); ConstString obj_name = obj_file->GetPluginName(); if (obj_name != obj_file_elf) - return NULL; + return nullptr; lldb_private::UUID uuid; if (!obj_file->GetUUID (&uuid)) - return NULL; + return nullptr; // Get the .gnu_debuglink file (if specified). FileSpecList file_spec_list = obj_file->GetDebugSymbolFilePaths(); @@ -105,7 +105,7 @@ // If we have no debug symbol files, then nothing to do. if (file_spec_list.IsEmpty()) - return NULL; + return nullptr; Timer scoped_timer (__PRETTY_FUNCTION__, "SymbolVendorELF::CreateInstance (module = %s)", @@ -175,7 +175,7 @@ } } } - return NULL; + return nullptr; } //------------------------------------------------------------------ Index: source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h =================================================================== --- source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h +++ source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h @@ -127,9 +127,9 @@ lldb_private::EmulateInstruction *inst_emulator) : UnwindAssembly (arch), m_inst_emulator_ap (inst_emulator), - m_range_ptr (NULL), - m_thread_ptr (NULL), - m_unwind_plan_ptr (NULL), + m_range_ptr (nullptr), + m_thread_ptr (nullptr), + m_unwind_plan_ptr (nullptr), m_curr_row (), m_cfa_reg_info (), m_fp_is_cfa (false), Index: source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp =================================================================== --- source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp +++ source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp @@ -55,8 +55,8 @@ thread.CalculateExecutionContext(exe_ctx); const bool prefer_file_cache = true; DisassemblerSP disasm_sp (Disassembler::DisassembleRange (m_arch, - NULL, - NULL, + nullptr, + nullptr, exe_ctx, range, prefer_file_cache)); @@ -146,7 +146,7 @@ if (log && log->GetVerbose ()) { StreamString strm; - inst->Dump(&strm, inst_list.GetMaxOpcocdeByteSize (), show_address, show_bytes, NULL); + inst->Dump(&strm, inst_list.GetMaxOpcocdeByteSize (), show_address, show_bytes, nullptr); log->PutCString (strm.GetData()); } @@ -303,11 +303,11 @@ UnwindAssembly * UnwindAssemblyInstEmulation::CreateInstance (const ArchSpec &arch) { - std::unique_ptr inst_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypePrologueEpilogue, NULL)); + std::unique_ptr inst_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypePrologueEpilogue, nullptr)); // Make sure that all prologue instructions are handled if (inst_emulator_ap.get()) return new UnwindAssemblyInstEmulation (arch, inst_emulator_ap.release()); - return NULL; + return nullptr; } Index: source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp =================================================================== --- source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp +++ source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp @@ -179,7 +179,7 @@ m_cpu(cpu), m_arch(arch) { - int *initialized_flag = NULL; + int *initialized_flag = nullptr; if (cpu == k_i386) { m_machine_ip_regnum = k_machine_eip; @@ -245,8 +245,8 @@ m_disasm_context = ::LLVMCreateDisasm(m_arch.GetTriple().getTriple().c_str(), (void*)this, /*TagType=*/1, - NULL, - NULL); + nullptr, + nullptr); } AssemblyParse_x86::~AssemblyParse_x86 () @@ -938,7 +938,7 @@ return new UnwindAssembly_x86 (arch, k_i386); else if (cpu == llvm::Triple::x86_64) return new UnwindAssembly_x86 (arch, k_x86_64); - return NULL; + return nullptr; } Index: source/Target/ABI.cpp =================================================================== --- source/Target/ABI.cpp +++ source/Target/ABI.cpp @@ -25,7 +25,7 @@ ABICreateInstance create_callback; for (uint32_t idx = 0; - (create_callback = PluginManager::GetABICreateCallbackAtIndex(idx)) != NULL; + (create_callback = PluginManager::GetABICreateCallbackAtIndex(idx)) != nullptr; ++idx) { abi_sp = create_callback(arch); Index: source/Target/CPPLanguageRuntime.cpp =================================================================== --- source/Target/CPPLanguageRuntime.cpp +++ source/Target/CPPLanguageRuntime.cpp @@ -47,7 +47,7 @@ uint32_t count = 0; for (ImplData match = m_impl.FindFirstValueForName(type_name.AsCString()); - match != NULL; + match != nullptr; match = m_impl.FindNextValueForName(match)) { equivalents.push_back(match->value); @@ -115,7 +115,7 @@ uint32_t count = 0; for (ImplData match = m_impl.FindFirstValueForName(matching_key); - match != NULL; + match != nullptr; match = m_impl.FindNextValueForName(match)) { std::string target(original); @@ -192,12 +192,12 @@ bool CPPLanguageRuntime::StripNamespacesFromVariableName (const char *name, const char *&base_name_start, const char *&base_name_end) { - if (base_name_end == NULL) + if (base_name_end == nullptr) base_name_end = name + strlen (name); const char *last_colon = strrchr (name, ':'); - if (last_colon == NULL) + if (last_colon == nullptr) { base_name_start = name; return true; @@ -223,8 +223,8 @@ bool might_have_partials= ( count == 0 ) // if we have a full name match just use it - && (strchr(type_name.AsCString(), '<') != NULL // we should only have partial matches when templates are involved, check that we have - && strchr(type_name.AsCString(), '>') != NULL); // angle brackets in the type_name before trying to scan for partial matches + && (strchr(type_name.AsCString(), '<') != nullptr // we should only have partial matches when templates are involved, check that we have + && strchr(type_name.AsCString(), '>') != nullptr); // angle brackets in the type_name before trying to scan for partial matches if ( might_have_partials ) count = GetEquivalentsMap().FindPartialMatches(type_name, equivalents); Index: source/Target/ExecutionContext.cpp =================================================================== --- source/Target/ExecutionContext.cpp +++ source/Target/ExecutionContext.cpp @@ -261,7 +261,7 @@ return m_frame_sp->GetRegisterContext().get(); else if (m_thread_sp) return m_thread_sp->GetRegisterContext().get(); - return NULL; + return nullptr; } Target * @@ -271,7 +271,7 @@ return m_target_sp.get(); if (m_process_sp) return &m_process_sp->GetTarget(); - return NULL; + return nullptr; } Process * @@ -281,7 +281,7 @@ return m_process_sp.get(); if (m_target_sp) return m_target_sp->GetProcessSP().get(); - return NULL; + return nullptr; } ExecutionContextScope * Index: source/Target/JITLoader.cpp =================================================================== --- source/Target/JITLoader.cpp +++ source/Target/JITLoader.cpp @@ -19,8 +19,8 @@ void JITLoader::LoadPlugins (Process *process, JITLoaderList &list) { - JITLoaderCreateInstance create_callback = NULL; - for (uint32_t idx = 0; (create_callback = PluginManager::GetJITLoaderCreateCallbackAtIndex(idx)) != NULL; ++idx) + JITLoaderCreateInstance create_callback = nullptr; + for (uint32_t idx = 0; (create_callback = PluginManager::GetJITLoaderCreateCallbackAtIndex(idx)) != nullptr; ++idx) { JITLoaderSP instance_sp(create_callback(process, false)); if (instance_sp) Index: source/Target/LanguageRuntime.cpp =================================================================== --- source/Target/LanguageRuntime.cpp +++ source/Target/LanguageRuntime.cpp @@ -22,7 +22,7 @@ lldb::LanguageType language) : SearchFilter (target_sp), m_language (language), - m_language_runtime (NULL), + m_language_runtime (nullptr), m_filter_sp () { UpdateModuleListIfNeeded (); @@ -75,7 +75,7 @@ if (process_sp) { bool refreash_filter = !m_filter_sp; - if (m_language_runtime == NULL) + if (m_language_runtime == nullptr) { m_language_runtime = process_sp->GetLanguageRuntime(m_language); refreash_filter = true; @@ -98,7 +98,7 @@ else { m_filter_sp.reset(); - m_language_runtime = NULL; + m_language_runtime = nullptr; } } }; @@ -111,9 +111,9 @@ ExceptionBreakpointResolver (lldb::LanguageType language, bool catch_bp, bool throw_bp) : - BreakpointResolver (NULL, BreakpointResolver::ExceptionResolver), + BreakpointResolver (nullptr, BreakpointResolver::ExceptionResolver), m_language (language), - m_language_runtime (NULL), + m_language_runtime (nullptr), m_catch_bp (catch_bp), m_throw_bp (throw_bp) { @@ -184,7 +184,7 @@ if (process_sp) { bool refreash_resolver = !m_actual_resolver_sp; - if (m_language_runtime == NULL) + if (m_language_runtime == nullptr) { m_language_runtime = process_sp->GetLanguageRuntime(m_language); refreash_resolver = true; @@ -207,13 +207,13 @@ else { m_actual_resolver_sp.reset(); - m_language_runtime = NULL; + m_language_runtime = nullptr; } } else { m_actual_resolver_sp.reset(); - m_language_runtime = NULL; + m_language_runtime = nullptr; } return (bool)m_actual_resolver_sp; } @@ -232,7 +232,7 @@ LanguageRuntimeCreateInstance create_callback; for (uint32_t idx = 0; - (create_callback = PluginManager::GetLanguageRuntimeCreateCallbackAtIndex(idx)) != NULL; + (create_callback = PluginManager::GetLanguageRuntimeCreateCallbackAtIndex(idx)) != nullptr; ++idx) { language_runtime_ap.reset (create_callback(process, language)); @@ -241,7 +241,7 @@ return language_runtime_ap.release(); } - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -337,7 +337,7 @@ lldb::SearchFilterSP LanguageRuntime::CreateExceptionSearchFilter () { - return m_process->GetTarget().GetSearchFilterForModule(NULL); + return m_process->GetTarget().GetSearchFilterForModule(nullptr); } Index: source/Target/ObjCLanguageRuntime.cpp =================================================================== --- source/Target/ObjCLanguageRuntime.cpp +++ source/Target/ObjCLanguageRuntime.cpp @@ -301,7 +301,7 @@ m_class_category.SetCStringWithLength (class_start, space_pos - class_start); // If m_class hasn't been filled in and the class with category doesn't // contain a '(', then we can also fill in the m_class - if (!m_class && strchr (m_class_category.GetCString(), '(') == NULL) + if (!m_class && strchr (m_class_category.GetCString(), '(') == nullptr) { m_class = m_class_category; // No '(' was found in the full name, we can definitively say Index: source/Target/OperatingSystem.cpp =================================================================== --- source/Target/OperatingSystem.cpp +++ source/Target/OperatingSystem.cpp @@ -22,7 +22,7 @@ OperatingSystem* OperatingSystem::FindPlugin (Process *process, const char *plugin_name) { - OperatingSystemCreateInstance create_callback = NULL; + OperatingSystemCreateInstance create_callback = nullptr; if (plugin_name) { ConstString const_plugin_name(plugin_name); @@ -36,14 +36,14 @@ } else { - for (uint32_t idx = 0; (create_callback = PluginManager::GetOperatingSystemCreateCallbackAtIndex(idx)) != NULL; ++idx) + for (uint32_t idx = 0; (create_callback = PluginManager::GetOperatingSystemCreateCallbackAtIndex(idx)) != nullptr; ++idx) { std::unique_ptr instance_ap(create_callback(process, false)); if (instance_ap.get()) return instance_ap.release(); } } - return NULL; + return nullptr; } Index: source/Target/PathMappingList.cpp =================================================================== --- source/Target/PathMappingList.cpp +++ source/Target/PathMappingList.cpp @@ -27,8 +27,8 @@ //---------------------------------------------------------------------- PathMappingList::PathMappingList () : m_pairs (), - m_callback (NULL), - m_callback_baton (NULL), + m_callback (nullptr), + m_callback_baton (nullptr), m_mod_id (0) { } @@ -45,8 +45,8 @@ PathMappingList::PathMappingList (const PathMappingList &rhs) : m_pairs (rhs.m_pairs), - m_callback (NULL), - m_callback_baton (NULL), + m_callback (nullptr), + m_callback_baton (nullptr), m_mod_id (0) { @@ -58,8 +58,8 @@ if (this != &rhs) { m_pairs = rhs.m_pairs; - m_callback = NULL; - m_callback_baton = NULL; + m_callback = nullptr; + m_callback_baton = nullptr; m_mod_id = rhs.m_mod_id; } return *this; @@ -204,7 +204,7 @@ bool PathMappingList::RemapPath (const char *path, std::string &new_path) const { - if (m_pairs.empty() || path == NULL || path[0] == '\0') + if (m_pairs.empty() || path == nullptr || path[0] == '\0') return false; const_iterator pos, end = m_pairs.end(); Index: source/Target/Platform.cpp =================================================================== --- source/Target/Platform.cpp +++ source/Target/Platform.cpp @@ -99,7 +99,7 @@ Platform* Platform::FindPlugin (Process *process, const ConstString &plugin_name) { - PlatformCreateInstance create_callback = NULL; + PlatformCreateInstance create_callback = nullptr; if (plugin_name) { create_callback = PluginManager::GetPlatformCreateCallbackForPluginName (plugin_name); @@ -117,14 +117,14 @@ } else { - for (uint32_t idx = 0; (create_callback = PluginManager::GetPlatformCreateCallbackAtIndex(idx)) != NULL; ++idx) + for (uint32_t idx = 0; (create_callback = PluginManager::GetPlatformCreateCallbackAtIndex(idx)) != nullptr; ++idx) { std::unique_ptr instance_ap(create_callback(process, nullptr)); if (instance_ap.get()) return instance_ap.release(); } } - return NULL; + return nullptr; } Error @@ -153,14 +153,14 @@ PlatformSP Platform::Create (const char *platform_name, Error &error) { - PlatformCreateInstance create_callback = NULL; + PlatformCreateInstance create_callback = nullptr; lldb::PlatformSP platform_sp; if (platform_name && platform_name[0]) { ConstString const_platform_name (platform_name); create_callback = PluginManager::GetPlatformCreateCallbackForPluginName (const_platform_name); if (create_callback) - platform_sp.reset(create_callback(true, NULL)); + platform_sp.reset(create_callback(true, nullptr)); else error.SetErrorStringWithFormat ("unable to find a plug-in for the platform named \"%s\"", platform_name); } @@ -747,7 +747,7 @@ return "127.0.0.1"; if (m_name.empty()) - return NULL; + return nullptr; return m_name.c_str(); } @@ -773,7 +773,7 @@ if (Host::GetUserName(uid, name)) return SetCachedUserName (uid, name.c_str(), name.size()); } - return NULL; + return nullptr; } const char * @@ -788,7 +788,7 @@ if (Host::GetGroupName(gid, name)) return SetCachedGroupName (gid, name.c_str(), name.size()); } - return NULL; + return nullptr; } bool @@ -840,8 +840,8 @@ error = ModuleList::GetSharedModule (module_spec, exe_module_sp, module_search_paths_ptr, - NULL, - NULL); + nullptr, + nullptr); } else { @@ -853,8 +853,8 @@ error = ModuleList::GetSharedModule (module_spec, exe_module_sp, module_search_paths_ptr, - NULL, - NULL); + nullptr, + nullptr); // Did we find an executable using one of the if (error.Success() && exe_module_sp) break; @@ -1200,23 +1200,23 @@ static OptionDefinition g_rsync_option_table[] = { - { LLDB_OPT_SET_ALL, false, "rsync" , 'r', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Enable rsync." }, - { LLDB_OPT_SET_ALL, false, "rsync-opts" , 'R', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCommandName , "Platform-specific options required for rsync to work." }, - { LLDB_OPT_SET_ALL, false, "rsync-prefix" , 'P', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCommandName , "Platform-specific rsync prefix put before the remote path." }, - { LLDB_OPT_SET_ALL, false, "ignore-remote-hostname" , 'i', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Do not automatically fill in the remote hostname when composing the rsync command." }, + { LLDB_OPT_SET_ALL, false, "rsync" , 'r', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Enable rsync." }, + { LLDB_OPT_SET_ALL, false, "rsync-opts" , 'R', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCommandName , "Platform-specific options required for rsync to work." }, + { LLDB_OPT_SET_ALL, false, "rsync-prefix" , 'P', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCommandName , "Platform-specific rsync prefix put before the remote path." }, + { LLDB_OPT_SET_ALL, false, "ignore-remote-hostname" , 'i', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Do not automatically fill in the remote hostname when composing the rsync command." }, }; static OptionDefinition g_ssh_option_table[] = { - { LLDB_OPT_SET_ALL, false, "ssh" , 's', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Enable SSH." }, - { LLDB_OPT_SET_ALL, false, "ssh-opts" , 'S', OptionParser::eRequiredArgument, NULL, 0, eArgTypeCommandName , "Platform-specific options required for SSH to work." }, + { LLDB_OPT_SET_ALL, false, "ssh" , 's', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone , "Enable SSH." }, + { LLDB_OPT_SET_ALL, false, "ssh-opts" , 'S', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeCommandName , "Platform-specific options required for SSH to work." }, }; static OptionDefinition g_caching_option_table[] = { - { LLDB_OPT_SET_ALL, false, "local-cache-dir" , 'c', OptionParser::eRequiredArgument, NULL, 0, eArgTypePath , "Path in which to store local copies of files." }, + { LLDB_OPT_SET_ALL, false, "local-cache-dir" , 'c', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePath , "Path in which to store local copies of files." }, }; OptionGroupPlatformRSync::OptionGroupPlatformRSync () Index: source/Target/Process.cpp =================================================================== --- source/Target/Process.cpp +++ source/Target/Process.cpp @@ -103,15 +103,15 @@ static PropertyDefinition g_properties[] = { - { "disable-memory-cache" , OptionValue::eTypeBoolean, false, DISABLE_MEM_CACHE_DEFAULT, NULL, NULL, "Disable reading and caching of memory in fixed-size units." }, - { "extra-startup-command", OptionValue::eTypeArray , false, OptionValue::eTypeString, NULL, NULL, "A list containing extra commands understood by the particular process plugin used. " + { "disable-memory-cache" , OptionValue::eTypeBoolean, false, DISABLE_MEM_CACHE_DEFAULT, nullptr, nullptr, "Disable reading and caching of memory in fixed-size units." }, + { "extra-startup-command", OptionValue::eTypeArray , false, OptionValue::eTypeString, nullptr, nullptr, "A list containing extra commands understood by the particular process plugin used. " "For instance, to turn on debugserver logging set this to \"QSetLogging:bitmask=LOG_DEFAULT;\"" }, - { "ignore-breakpoints-in-expressions", OptionValue::eTypeBoolean, true, true, NULL, NULL, "If true, breakpoints will be ignored during expression evaluation." }, - { "unwind-on-error-in-expressions", OptionValue::eTypeBoolean, true, true, NULL, NULL, "If true, errors in expression evaluation will unwind the stack back to the state before the call." }, - { "python-os-plugin-path", OptionValue::eTypeFileSpec, false, true, NULL, NULL, "A path to a python OS plug-in module file that contains a OperatingSystemPlugIn class." }, - { "stop-on-sharedlibrary-events" , OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, stop when a shared library is loaded or unloaded." }, - { "detach-keeps-stopped" , OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, detach will attempt to keep the process stopped." }, - { NULL , OptionValue::eTypeInvalid, false, 0, NULL, NULL, NULL } + { "ignore-breakpoints-in-expressions", OptionValue::eTypeBoolean, true, true, nullptr, nullptr, "If true, breakpoints will be ignored during expression evaluation." }, + { "unwind-on-error-in-expressions", OptionValue::eTypeBoolean, true, true, nullptr, nullptr, "If true, errors in expression evaluation will unwind the stack back to the state before the call." }, + { "python-os-plugin-path", OptionValue::eTypeFileSpec, false, true, nullptr, nullptr, "A path to a python OS plug-in module file that contains a OperatingSystemPlugIn class." }, + { "stop-on-sharedlibrary-events" , OptionValue::eTypeBoolean, true, false, nullptr, nullptr, "If true, stop when a shared library is loaded or unloaded." }, + { "detach-keeps-stopped" , OptionValue::eTypeBoolean, true, false, nullptr, nullptr, "If true, detach will attempt to keep the process stopped." }, + { nullptr , OptionValue::eTypeInvalid, false, 0, nullptr, nullptr, nullptr } }; enum { @@ -148,7 +148,7 @@ ProcessProperties::GetDisableMemoryCache() const { const uint32_t idx = ePropertyDisableMemCache; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } Args @@ -156,7 +156,7 @@ { Args args; const uint32_t idx = ePropertyExtraStartCommand; - m_collection_sp->GetPropertyAtIndexAsArgs(NULL, idx, args); + m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args); return args; } @@ -164,21 +164,21 @@ ProcessProperties::SetExtraStartupCommands (const Args &args) { const uint32_t idx = ePropertyExtraStartCommand; - m_collection_sp->SetPropertyAtIndexFromArgs(NULL, idx, args); + m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args); } FileSpec ProcessProperties::GetPythonOSPluginPath () const { const uint32_t idx = ePropertyPythonOSPluginPath; - return m_collection_sp->GetPropertyAtIndexAsFileSpec(NULL, idx); + return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx); } void ProcessProperties::SetPythonOSPluginPath (const FileSpec &file) { const uint32_t idx = ePropertyPythonOSPluginPath; - m_collection_sp->SetPropertyAtIndexAsFileSpec(NULL, idx, file); + m_collection_sp->SetPropertyAtIndexAsFileSpec(nullptr, idx, file); } @@ -186,56 +186,56 @@ ProcessProperties::GetIgnoreBreakpointsInExpressions () const { const uint32_t idx = ePropertyIgnoreBreakpointsInExpressions; - return m_collection_sp->GetPropertyAtIndexAsBoolean(NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx, g_properties[idx].default_uint_value != 0); } void ProcessProperties::SetIgnoreBreakpointsInExpressions (bool ignore) { const uint32_t idx = ePropertyIgnoreBreakpointsInExpressions; - m_collection_sp->SetPropertyAtIndexAsBoolean(NULL, idx, ignore); + m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, ignore); } bool ProcessProperties::GetUnwindOnErrorInExpressions () const { const uint32_t idx = ePropertyUnwindOnErrorInExpressions; - return m_collection_sp->GetPropertyAtIndexAsBoolean(NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx, g_properties[idx].default_uint_value != 0); } void ProcessProperties::SetUnwindOnErrorInExpressions (bool ignore) { const uint32_t idx = ePropertyUnwindOnErrorInExpressions; - m_collection_sp->SetPropertyAtIndexAsBoolean(NULL, idx, ignore); + m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, ignore); } bool ProcessProperties::GetStopOnSharedLibraryEvents () const { const uint32_t idx = ePropertyStopOnSharedLibraryEvents; - return m_collection_sp->GetPropertyAtIndexAsBoolean(NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx, g_properties[idx].default_uint_value != 0); } void ProcessProperties::SetStopOnSharedLibraryEvents (bool stop) { const uint32_t idx = ePropertyStopOnSharedLibraryEvents; - m_collection_sp->SetPropertyAtIndexAsBoolean(NULL, idx, stop); + m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, stop); } bool ProcessProperties::GetDetachKeepsStopped () const { const uint32_t idx = ePropertyDetachKeepsStopped; - return m_collection_sp->GetPropertyAtIndexAsBoolean(NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx, g_properties[idx].default_uint_value != 0); } void ProcessProperties::SetDetachKeepsStopped (bool stop) { const uint32_t idx = ePropertyDetachKeepsStopped; - m_collection_sp->SetPropertyAtIndexAsBoolean(NULL, idx, stop); + m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, stop); } void @@ -439,8 +439,8 @@ { // If nothing for stdin or stdout or stderr was specified, then check the process for any default // settings that were set with "settings set" - if (GetFileActionForFD(STDIN_FILENO) == NULL || GetFileActionForFD(STDOUT_FILENO) == NULL || - GetFileActionForFD(STDERR_FILENO) == NULL) + if (GetFileActionForFD(STDIN_FILENO) == nullptr || GetFileActionForFD(STDOUT_FILENO) == nullptr || + GetFileActionForFD(STDERR_FILENO) == nullptr) { if (m_flags.Test(eLaunchFlagDisableSTDIO)) { @@ -475,8 +475,8 @@ AppendOpenFileAction(STDERR_FILENO, path, false, true); if (default_to_use_pty && (!in_path || !out_path || !err_path)) { - if (m_pty.OpenFirstAvailableMaster(O_RDWR| O_NOCTTY, NULL, 0)) { - const char *slave_path = m_pty.GetSlaveName(NULL, 0); + if (m_pty.OpenFirstAvailableMaster(O_RDWR| O_NOCTTY, nullptr, 0)) { + const char *slave_path = m_pty.GetSlaveName(nullptr, 0); if (!in_path) { AppendOpenFileAction(STDIN_FILENO, slave_path, true, false); @@ -530,7 +530,7 @@ } const char **argv = GetArguments().GetConstArgumentVector (); - if (argv == NULL || argv[0] == NULL) + if (argv == nullptr || argv[0] == nullptr) return false; Args shell_arguments; std::string safe_arg; @@ -604,7 +604,7 @@ } else { - for (size_t i=0; argv[i] != NULL; ++i) + for (size_t i=0; argv[i] != nullptr; ++i) { const char *arg = Args::GetShellSafeArgument (argv[i], safe_arg); shell_command.Printf(" %s", arg); @@ -686,7 +686,7 @@ Log *log, Error& error) { - if (info == NULL) + if (info == nullptr) return false; posix_spawn_file_actions_t *file_actions = reinterpret_cast(_file_actions); @@ -848,23 +848,23 @@ OptionDefinition ProcessLaunchCommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_ALL, false, "stop-at-entry", 's', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Stop at the entry point of the program when launching a process."}, -{ LLDB_OPT_SET_ALL, false, "disable-aslr", 'A', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Disable address space layout randomization when launching a process."}, -{ LLDB_OPT_SET_ALL, false, "plugin", 'p', OptionParser::eRequiredArgument, NULL, 0, eArgTypePlugin, "Name of the process plugin you want to use."}, -{ LLDB_OPT_SET_ALL, false, "working-dir", 'w', OptionParser::eRequiredArgument, NULL, 0, eArgTypeDirectoryName, "Set the current working directory to when running the inferior."}, -{ LLDB_OPT_SET_ALL, false, "arch", 'a', OptionParser::eRequiredArgument, NULL, 0, eArgTypeArchitecture, "Set the architecture for the process to launch when ambiguous."}, -{ LLDB_OPT_SET_ALL, false, "environment", 'v', OptionParser::eRequiredArgument, NULL, 0, eArgTypeNone, "Specify an environment variable name/value string (--environment NAME=VALUE). Can be specified multiple times for subsequent environment entries."}, -{ LLDB_OPT_SET_ALL, false, "shell", 'c', OptionParser::eOptionalArgument, NULL, 0, eArgTypeFilename, "Run the process in a shell (not supported on all platforms)."}, +{ LLDB_OPT_SET_ALL, false, "stop-at-entry", 's', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Stop at the entry point of the program when launching a process."}, +{ LLDB_OPT_SET_ALL, false, "disable-aslr", 'A', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Disable address space layout randomization when launching a process."}, +{ LLDB_OPT_SET_ALL, false, "plugin", 'p', OptionParser::eRequiredArgument, nullptr, 0, eArgTypePlugin, "Name of the process plugin you want to use."}, +{ LLDB_OPT_SET_ALL, false, "working-dir", 'w', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeDirectoryName, "Set the current working directory to when running the inferior."}, +{ LLDB_OPT_SET_ALL, false, "arch", 'a', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeArchitecture, "Set the architecture for the process to launch when ambiguous."}, +{ LLDB_OPT_SET_ALL, false, "environment", 'v', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeNone, "Specify an environment variable name/value string (--environment NAME=VALUE). Can be specified multiple times for subsequent environment entries."}, +{ LLDB_OPT_SET_ALL, false, "shell", 'c', OptionParser::eOptionalArgument, nullptr, 0, eArgTypeFilename, "Run the process in a shell (not supported on all platforms)."}, -{ LLDB_OPT_SET_1 , false, "stdin", 'i', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFilename, "Redirect stdin for the process to ."}, -{ LLDB_OPT_SET_1 , false, "stdout", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFilename, "Redirect stdout for the process to ."}, -{ LLDB_OPT_SET_1 , false, "stderr", 'e', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFilename, "Redirect stderr for the process to ."}, +{ LLDB_OPT_SET_1 , false, "stdin", 'i', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFilename, "Redirect stdin for the process to ."}, +{ LLDB_OPT_SET_1 , false, "stdout", 'o', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFilename, "Redirect stdout for the process to ."}, +{ LLDB_OPT_SET_1 , false, "stderr", 'e', OptionParser::eRequiredArgument, nullptr, 0, eArgTypeFilename, "Redirect stderr for the process to ."}, -{ LLDB_OPT_SET_2 , false, "tty", 't', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Start the process in a terminal (not supported on all platforms)."}, +{ LLDB_OPT_SET_2 , false, "tty", 't', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Start the process in a terminal (not supported on all platforms)."}, -{ LLDB_OPT_SET_3 , false, "no-stdio", 'n', OptionParser::eNoArgument, NULL, 0, eArgTypeNone, "Do not set up for terminal I/O to go to running process."}, +{ LLDB_OPT_SET_3 , false, "no-stdio", 'n', OptionParser::eNoArgument, nullptr, 0, eArgTypeNone, "Do not set up for terminal I/O to go to running process."}, -{ 0 , false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } +{ 0 , false, nullptr, 0, 0, nullptr, 0, eArgTypeNone, nullptr } }; @@ -872,7 +872,7 @@ bool ProcessInstanceInfoMatch::NameMatches (const char *process_name) const { - if (m_name_match_type == eNameMatchIgnore || process_name == NULL) + if (m_name_match_type == eNameMatchIgnore || process_name == nullptr) return true; const char *match_name = m_match_info.GetName(); if (!match_name) @@ -965,7 +965,7 @@ static uint32_t g_process_unique_id = 0; ProcessSP process_sp; - ProcessCreateInstance create_callback = NULL; + ProcessCreateInstance create_callback = nullptr; if (plugin_name) { ConstString const_plugin_name(plugin_name); @@ -986,7 +986,7 @@ } else { - for (uint32_t idx = 0; (create_callback = PluginManager::GetProcessCreateCallbackAtIndex(idx)) != NULL; ++idx) + for (uint32_t idx = 0; (create_callback = PluginManager::GetProcessCreateCallbackAtIndex(idx)) != nullptr; ++idx) { process_sp = create_callback(target, listener, crash_file_path); if (process_sp) @@ -1021,8 +1021,8 @@ m_target (target), m_public_state (eStateUnloaded), m_private_state (eStateUnloaded), - m_private_state_broadcaster (NULL, "lldb.process.internal_state_broadcaster"), - m_private_state_control_broadcaster (NULL, "lldb.process.internal_state_control_broadcaster"), + m_private_state_broadcaster (nullptr, "lldb.process.internal_state_broadcaster"), + m_private_state_control_broadcaster (nullptr, "lldb.process.internal_state_control_broadcaster"), m_private_state_listener ("lldb.process.internal_state_listener"), m_private_state_control_wait(), m_private_state_thread (LLDB_INVALID_HOST_THREAD), @@ -1200,7 +1200,7 @@ Process::RegisterNotificationCallbacks (const Notifications& callbacks) { m_notifications.push_back(callbacks); - if (callbacks.initialize != NULL) + if (callbacks.initialize != nullptr) callbacks.initialize (callbacks.baton, this); } @@ -1335,7 +1335,7 @@ if (state == eStateDetached || state == eStateExited) return state; - state = WaitForStateChangedEvents (timeout, event_sp, NULL); + state = WaitForStateChangedEvents (timeout, event_sp, nullptr); for (i=0; i(timeout)); Listener *listener = hijack_listener; - if (listener == NULL) + if (listener == nullptr) listener = &m_listener; StateType state = eStateInvalid; @@ -1502,7 +1502,7 @@ { if (m_public_state.GetValue() == eStateExited && !m_exit_string.empty()) return m_exit_string.c_str(); - return NULL; + return nullptr; } bool @@ -1565,7 +1565,7 @@ ProcessSP process_sp (target_sp->GetProcessSP()); if (process_sp) { - const char *signal_cstr = NULL; + const char *signal_cstr = nullptr; if (signo) signal_cstr = process_sp->GetUnixSignals().GetSignalAsCString (signo); @@ -2033,18 +2033,18 @@ Process::GetCPPLanguageRuntime (bool retry_if_null) { LanguageRuntime *runtime = GetLanguageRuntime(eLanguageTypeC_plus_plus, retry_if_null); - if (runtime != NULL && runtime->GetLanguageType() == eLanguageTypeC_plus_plus) + if (runtime != nullptr && runtime->GetLanguageType() == eLanguageTypeC_plus_plus) return static_cast (runtime); - return NULL; + return nullptr; } ObjCLanguageRuntime * Process::GetObjCLanguageRuntime (bool retry_if_null) { LanguageRuntime *runtime = GetLanguageRuntime(eLanguageTypeObjC, retry_if_null); - if (runtime != NULL && runtime->GetLanguageType() == eLanguageTypeObjC) + if (runtime != nullptr && runtime->GetLanguageType() == eLanguageTypeObjC) return static_cast (runtime); - return NULL; + return nullptr; } bool @@ -2296,7 +2296,7 @@ Process::EnableSoftwareBreakpoint (BreakpointSite *bp_site) { Error error; - assert (bp_site != NULL); + assert (bp_site != nullptr); Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); const addr_t bp_addr = bp_site->GetLoadAddress(); if (log) @@ -2325,7 +2325,7 @@ { const uint8_t * const bp_opcode_bytes = bp_site->GetTrapOpcodeBytes(); - if (bp_opcode_bytes == NULL) + if (bp_opcode_bytes == nullptr) { error.SetErrorString ("BreakpointSite doesn't contain a valid breakpoint trap opcode."); return error; @@ -2373,7 +2373,7 @@ Process::DisableSoftwareBreakpoint (BreakpointSite *bp_site) { Error error; - assert (bp_site != NULL); + assert (bp_site != nullptr); Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); addr_t bp_addr = bp_site->GetLoadAddress(); lldb::user_id_t breakID = bp_site->GetID(); @@ -2630,7 +2630,7 @@ } else { - if (dst == NULL) + if (dst == nullptr) result_error.SetErrorString("invalid arguments"); else result_error.Clear(); @@ -2641,7 +2641,7 @@ size_t Process::ReadMemoryFromInferior (addr_t addr, void *buf, size_t size, Error &error) { - if (buf == NULL || size == 0) + if (buf == nullptr || size == 0) return 0; size_t bytes_read = 0; @@ -2726,7 +2726,7 @@ m_memory_cache.Flush (addr, size); #endif - if (buf == NULL || size == 0) + if (buf == nullptr || size == 0) return 0; m_mod_id.BumpMemoryID(); @@ -3049,7 +3049,7 @@ { SetID (LLDB_INVALID_PROCESS_ID); const char *error_string = error.AsCString(); - if (error_string == NULL) + if (error_string == nullptr) error_string = "launch failed"; SetExitStatus (-1, error_string); } @@ -3062,7 +3062,7 @@ timeout_time.OffsetWithSeconds(10); StateType state = WaitForProcessStopPrivate(&timeout_time, event_sp); - if (state == eStateInvalid || event_sp.get() == NULL) + if (state == eStateInvalid || event_sp.get() == nullptr) { // We were able to launch the process, but we failed to // catch the initial stop. @@ -3084,7 +3084,7 @@ if (system_runtime) system_runtime->DidLaunch(); - m_os_ap.reset (OperatingSystem::FindPlugin (this, NULL)); + m_os_ap.reset (OperatingSystem::FindPlugin (this, nullptr)); // This delays passing the stopped event to listeners till DidLaunch gets // a chance to complete... HandlePrivateEvent (event_sp); @@ -3133,7 +3133,7 @@ if (system_runtime) system_runtime->DidAttach(); - m_os_ap.reset (OperatingSystem::FindPlugin (this, NULL)); + m_os_ap.reset (OperatingSystem::FindPlugin (this, nullptr)); // We successfully loaded a core file, now pretend we stopped so we can // show all of the threads in the core file and explore the crashed // state. @@ -3146,8 +3146,8 @@ DynamicLoader * Process::GetDynamicLoader () { - if (m_dyld_ap.get() == NULL) - m_dyld_ap.reset (DynamicLoader::FindPlugin(this, NULL)); + if (m_dyld_ap.get() == nullptr) + m_dyld_ap.reset (DynamicLoader::FindPlugin(this, nullptr)); return m_dyld_ap.get(); } @@ -3165,7 +3165,7 @@ SystemRuntime * Process::GetSystemRuntime () { - if (m_system_runtime_ap.get() == NULL) + if (m_system_runtime_ap.get() == nullptr) m_system_runtime_ap.reset (SystemRuntime::FindPlugin(this)); return m_system_runtime_ap.get(); } @@ -3270,7 +3270,7 @@ if (GetID() != LLDB_INVALID_PROCESS_ID) { SetID (LLDB_INVALID_PROCESS_ID); - if (error.AsCString() == NULL) + if (error.AsCString() == nullptr) error.SetErrorString("attach failed"); SetExitStatus(-1, error.AsCString()); @@ -3355,7 +3355,7 @@ { SetID (LLDB_INVALID_PROCESS_ID); const char *error_string = error.AsCString(); - if (error_string == NULL) + if (error_string == nullptr) error_string = "attach failed"; SetExitStatus(-1, error_string); @@ -3380,7 +3380,7 @@ if (platform_sp) { const ArchSpec &target_arch = m_target.GetArchitecture(); - if (target_arch.IsValid() && !platform_sp->IsCompatibleArchitecture (target_arch, false, NULL)) + if (target_arch.IsValid() && !platform_sp->IsCompatibleArchitecture (target_arch, false, nullptr)) { ArchSpec platform_arch; platform_sp = platform_sp->GetPlatformForArchitecture (target_arch, &platform_arch); @@ -3412,7 +3412,7 @@ if (system_runtime) system_runtime->DidAttach(); - m_os_ap.reset (OperatingSystem::FindPlugin (this, NULL)); + m_os_ap.reset (OperatingSystem::FindPlugin (this, nullptr)); // Figure out which one is the executable, and set that in our target: const ModuleList &target_modules = m_target.GetImages(); Mutex::Locker modules_locker(target_modules.GetMutex()); @@ -3448,7 +3448,7 @@ if (GetID() != LLDB_INVALID_PROCESS_ID) { EventSP event_sp; - StateType state = WaitForProcessStopPrivate(NULL, event_sp); + StateType state = WaitForProcessStopPrivate(nullptr, event_sp); if (state == eStateStopped || state == eStateCrashed) { @@ -4007,7 +4007,7 @@ snprintf(thread_name, sizeof(thread_name), "", GetID()); // Create the private state thread, and start it running. - m_private_state_thread = Host::ThreadCreate (thread_name, Process::PrivateStateThread, this, NULL); + m_private_state_thread = Host::ThreadCreate (thread_name, Process::PrivateStateThread, this, nullptr); bool success = IS_VALID_LLDB_HOST_THREAD(m_private_state_thread); if (success) { @@ -4064,7 +4064,7 @@ TimeValue timeout_time; bool timed_out; - m_private_state_control_broadcaster.BroadcastEvent (signal, NULL); + m_private_state_control_broadcaster.BroadcastEvent (signal, nullptr); timeout_time = TimeValue::Now(); timeout_time.OffsetWithSeconds(2); @@ -4088,8 +4088,8 @@ log->Printf ("The control event killed the private state thread without having to cancel."); } - thread_result_t result = NULL; - Host::ThreadJoin (private_state_thread, &result, NULL); + thread_result_t result = nullptr; + Host::ThreadJoin (private_state_thread, &result, nullptr); m_private_state_thread = LLDB_INVALID_HOST_THREAD; } } @@ -4104,9 +4104,9 @@ Process::SendAsyncInterrupt () { if (PrivateStateThreadIsValid()) - m_private_state_broadcaster.BroadcastEvent (Process::eBroadcastBitInterrupt, NULL); + m_private_state_broadcaster.BroadcastEvent (Process::eBroadcastBitInterrupt, nullptr); else - BroadcastEvent (Process::eBroadcastBitInterrupt, NULL); + BroadcastEvent (Process::eBroadcastBitInterrupt, nullptr); } void @@ -4120,7 +4120,7 @@ const StateType new_state = Process::ProcessEventData::GetStateFromEvent(event_sp.get()); // First check to see if anybody wants a shot at this event: - if (m_next_event_action_ap.get() != NULL) + if (m_next_event_action_ap.get() != nullptr) { NextEventAction::EventActionResult action_result = m_next_event_action_ap->PerformAction(event_sp); if (log) @@ -4129,7 +4129,7 @@ switch (action_result) { case NextEventAction::eEventActionSuccess: - SetNextEventAction(NULL); + SetNextEventAction(nullptr); break; case NextEventAction::eEventActionRetry: @@ -4144,10 +4144,10 @@ // FIXME: should cons up an exited event, and discard this one. SetExitStatus(0, m_next_event_action_ap->GetExitString()); m_currently_handling_event.SetValue(false, eBroadcastAlways); - SetNextEventAction(NULL); + SetNextEventAction(nullptr); return; } - SetNextEventAction(NULL); + SetNextEventAction(nullptr); break; } } @@ -4252,7 +4252,7 @@ while (!exit_now) { EventSP event_sp; - WaitForEventsPrivate (NULL, event_sp, control_only); + WaitForEventsPrivate (nullptr, event_sp, control_only); if (event_sp->BroadcasterIs(&m_private_state_control_broadcaster)) { if (log) @@ -4286,7 +4286,7 @@ log->Printf ("Process::%s (arg = %p, pid = %" PRIu64 ") woke up with an interrupt while attaching - forwarding interrupt.", __FUNCTION__, static_cast(this), GetID()); - BroadcastEvent (eBroadcastBitInterrupt, NULL); + BroadcastEvent (eBroadcastBitInterrupt, nullptr); } else { @@ -4333,7 +4333,7 @@ m_public_run_lock.SetStopped(); m_private_state_control_wait.SetValue (true, eBroadcastAlways); m_private_state_thread = LLDB_INVALID_HOST_THREAD; - return NULL; + return nullptr; } //------------------------------------------------------------------ @@ -4526,7 +4526,7 @@ if (event_data && event_data->GetFlavor() == ProcessEventData::GetFlavorString()) return static_cast (event_ptr->GetData()); } - return NULL; + return nullptr; } ProcessSP @@ -4543,7 +4543,7 @@ Process::ProcessEventData::GetStateFromEvent (const Event *event_ptr) { const ProcessEventData *data = GetEventDataFromEvent (event_ptr); - if (data == NULL) + if (data == nullptr) return eStateInvalid; else return data->GetState(); @@ -4553,7 +4553,7 @@ Process::ProcessEventData::GetRestartedFromEvent (const Event *event_ptr) { const ProcessEventData *data = GetEventDataFromEvent (event_ptr); - if (data == NULL) + if (data == nullptr) return false; else return data->GetRestarted(); @@ -4563,7 +4563,7 @@ Process::ProcessEventData::SetRestartedInEvent (Event *event_ptr, bool new_value) { ProcessEventData *data = const_cast(GetEventDataFromEvent (event_ptr)); - if (data != NULL) + if (data != nullptr) data->SetRestarted(new_value); } @@ -4571,7 +4571,7 @@ Process::ProcessEventData::GetNumRestartedReasons(const Event *event_ptr) { ProcessEventData *data = const_cast(GetEventDataFromEvent (event_ptr)); - if (data != NULL) + if (data != nullptr) return data->GetNumRestartedReasons(); else return 0; @@ -4581,17 +4581,17 @@ Process::ProcessEventData::GetRestartedReasonAtIndex(const Event *event_ptr, size_t idx) { ProcessEventData *data = const_cast(GetEventDataFromEvent (event_ptr)); - if (data != NULL) + if (data != nullptr) return data->GetRestartedReasonAtIndex(idx); else - return NULL; + return nullptr; } void Process::ProcessEventData::AddRestartedReason (Event *event_ptr, const char *reason) { ProcessEventData *data = const_cast(GetEventDataFromEvent (event_ptr)); - if (data != NULL) + if (data != nullptr) data->AddRestartedReason(reason); } @@ -4599,7 +4599,7 @@ Process::ProcessEventData::GetInterruptedFromEvent (const Event *event_ptr) { const ProcessEventData *data = GetEventDataFromEvent (event_ptr); - if (data == NULL) + if (data == nullptr) return false; else return data->GetInterrupted (); @@ -4609,7 +4609,7 @@ Process::ProcessEventData::SetInterruptedInEvent (Event *event_ptr, bool new_value) { ProcessEventData *data = const_cast(GetEventDataFromEvent (event_ptr)); - if (data != NULL) + if (data != nullptr) data->SetInterrupted(new_value); } @@ -4636,8 +4636,8 @@ { exe_ctx.SetTargetPtr (&m_target); exe_ctx.SetProcessPtr (this); - exe_ctx.SetThreadPtr(NULL); - exe_ctx.SetFramePtr (NULL); + exe_ctx.SetThreadPtr(nullptr); + exe_ctx.SetFramePtr (nullptr); } //uint32_t @@ -4858,7 +4858,7 @@ FD_SET (read_fd, &read_fdset); FD_SET (pipe_read_fd, &read_fdset); const int nfds = std::max(read_fd, pipe_read_fd) + 1; - int num_set_fds = select (nfds, &read_fdset, NULL, NULL, NULL); + int num_set_fds = select (nfds, &read_fdset, nullptr, nullptr, nullptr); if (num_set_fds < 0) { const int select_errno = errno; @@ -5044,13 +5044,13 @@ { ExecutionResults return_value = eExecutionSetupError; - if (thread_plan_sp.get() == NULL) + if (thread_plan_sp.get() == nullptr) { errors.Printf("RunThreadPlan called with empty thread plan."); return eExecutionSetupError; } - if (!thread_plan_sp->ValidatePlan(NULL)) + if (!thread_plan_sp->ValidatePlan(nullptr)) { errors.Printf ("RunThreadPlan called with an invalid thread plan."); return eExecutionSetupError; @@ -5063,7 +5063,7 @@ } Thread *thread = exe_ctx.GetThreadPtr(); - if (thread == NULL) + if (thread == nullptr) { errors.Printf("RunThreadPlan called with invalid thread."); return eExecutionSetupError; @@ -5087,7 +5087,7 @@ StackFrameSP selected_frame_sp = thread->GetSelectedFrame(); if (!selected_frame_sp) { - thread->SetSelectedFrame(0); + thread->SetSelectedFrame(nullptr); selected_frame_sp = thread->GetSelectedFrame(); if (!selected_frame_sp) { @@ -5187,7 +5187,7 @@ lldb::EventSP event_sp; lldb::StateType stop_state = lldb::eStateInvalid; - TimeValue* timeout_ptr = NULL; + TimeValue* timeout_ptr = nullptr; TimeValue real_timeout; bool before_first_timeout = true; // This is set to false the first time that we have to halt the target. @@ -5263,7 +5263,7 @@ // call the function? That's probably being too tricky for our own good. Event *other_events = listener.PeekAtNextEvent(); - if (other_events != NULL) + if (other_events != nullptr) { errors.Printf("Calling RunThreadPlan with pending events on the queue."); return eExecutionSetupError; @@ -5391,7 +5391,7 @@ else { if (timeout_usec == 0) - timeout_ptr = NULL; + timeout_ptr = nullptr; else { final_timeout = TimeValue::Now(); @@ -5403,7 +5403,7 @@ else { if (timeout_usec == 0) - timeout_ptr = NULL; + timeout_ptr = nullptr; else { final_timeout = TimeValue::Now(); @@ -5767,7 +5767,7 @@ StreamString ts; - const char *event_explanation = NULL; + const char *event_explanation = nullptr; do { @@ -6033,7 +6033,7 @@ if (only_threads_with_stop_reason) { StopInfoSP stop_info_sp = thread_sp->GetStopInfo(); - if (stop_info_sp.get() == NULL || !stop_info_sp->IsValid()) + if (stop_info_sp.get() == nullptr || !stop_info_sp->IsValid()) continue; } thread_sp->GetStatus (strm, Index: source/Target/Queue.cpp =================================================================== --- source/Target/Queue.cpp +++ source/Target/Queue.cpp @@ -45,7 +45,7 @@ const char * Queue::GetName () { - const char *result = NULL; + const char *result = nullptr; if (m_queue_name.size() > 0) result = m_queue_name.c_str(); return result; Index: source/Target/RegisterContext.cpp =================================================================== --- source/Target/RegisterContext.cpp +++ source/Target/RegisterContext.cpp @@ -71,14 +71,14 @@ { const RegisterInfo * reg_info = GetRegisterInfoAtIndex(reg); - if ((reg_info->name != NULL && ::strcasecmp (reg_info->name, reg_name) == 0) || - (reg_info->alt_name != NULL && ::strcasecmp (reg_info->alt_name, reg_name) == 0)) + if ((reg_info->name != nullptr && ::strcasecmp (reg_info->name, reg_name) == 0) || + (reg_info->alt_name != nullptr && ::strcasecmp (reg_info->alt_name, reg_name) == 0)) { return reg_info; } } } - return NULL; + return nullptr; } const RegisterInfo * @@ -86,7 +86,7 @@ { const uint32_t reg_num = ConvertRegisterKindToRegisterNumber(kind, num); if (reg_num == LLDB_INVALID_REGNUM) - return NULL; + return nullptr; return GetRegisterInfoAtIndex (reg_num); } @@ -96,7 +96,7 @@ const RegisterInfo * reg_info = GetRegisterInfoAtIndex(reg); if (reg_info) return reg_info->name; - return NULL; + return nullptr; } uint64_t @@ -315,7 +315,7 @@ RegisterValue ®_value) { Error error; - if (reg_info == NULL) + if (reg_info == nullptr) { error.SetErrorString ("invalid register info argument."); return error; Index: source/Target/SectionLoadHistory.cpp =================================================================== --- source/Target/SectionLoadHistory.cpp +++ source/Target/SectionLoadHistory.cpp @@ -105,7 +105,7 @@ return section_load_list_sp.get(); } } - return NULL; + return nullptr; } SectionLoadList & @@ -113,7 +113,7 @@ { const bool read_only = true; SectionLoadList *section_load_list = GetSectionLoadListForStopID (eStopIDNow, read_only); - assert(section_load_list != NULL); + assert(section_load_list != nullptr); return *section_load_list; } Index: source/Target/StackFrame.cpp =================================================================== --- source/Target/StackFrame.cpp +++ source/Target/StackFrame.cpp @@ -58,7 +58,7 @@ m_frame_index (frame_idx), m_concrete_frame_index (unwind_frame_index), m_reg_context_sp (), - m_id (pc, cfa, NULL), + m_id (pc, cfa, nullptr), m_frame_code_addr (pc), m_sc (), m_flags (), @@ -79,7 +79,7 @@ m_id.SetCFA (m_frame_index); } - if (sc_ptr != NULL) + if (sc_ptr != nullptr) { m_sc = *sc_ptr; m_flags.Set(m_sc.GetResolvedMask ()); @@ -97,7 +97,7 @@ m_frame_index (frame_idx), m_concrete_frame_index (unwind_frame_index), m_reg_context_sp (reg_context_sp), - m_id (pc, cfa, NULL), + m_id (pc, cfa, nullptr), m_frame_code_addr (pc), m_sc (), m_flags (), @@ -111,7 +111,7 @@ m_variable_list_value_objects (), m_disassembly () { - if (sc_ptr != NULL) + if (sc_ptr != nullptr) { m_sc = *sc_ptr; m_flags.Set(m_sc.GetResolvedMask ()); @@ -136,7 +136,7 @@ m_frame_index (frame_idx), m_concrete_frame_index (unwind_frame_index), m_reg_context_sp (reg_context_sp), - m_id (pc_addr.GetLoadAddress (thread_sp->CalculateTarget().get()), cfa, NULL), + m_id (pc_addr.GetLoadAddress (thread_sp->CalculateTarget().get()), cfa, nullptr), m_frame_code_addr (pc_addr), m_sc (), m_flags (), @@ -150,13 +150,13 @@ m_variable_list_value_objects (), m_disassembly () { - if (sc_ptr != NULL) + if (sc_ptr != nullptr) { m_sc = *sc_ptr; m_flags.Set(m_sc.GetResolvedMask ()); } - if (m_sc.target_sp.get() == NULL && reg_context_sp) + if (m_sc.target_sp.get() == nullptr && reg_context_sp) { m_sc.target_sp = reg_context_sp->CalculateTarget(); if (m_sc.target_sp) @@ -205,7 +205,7 @@ // Calculate the frame block and use this for the stack ID symbol // context scope if we have one. SymbolContextScope *scope = GetFrameBlock (); - if (scope == NULL) + if (scope == nullptr) { // We don't have a block, so use the symbol if (m_flags.IsClear (eSymbolContextSymbol)) @@ -293,8 +293,8 @@ Target *target = exe_ctx.GetTargetPtr(); if (target) { - const char *plugin_name = NULL; - const char *flavor = NULL; + const char *plugin_name = nullptr; + const char *flavor = nullptr; Disassembler::Disassemble (target->GetDebugger(), target->GetArchitecture(), plugin_name, @@ -306,7 +306,7 @@ m_disassembly); } if (m_disassembly.GetSize() == 0) - return NULL; + return nullptr; } return m_disassembly.GetData(); } @@ -314,7 +314,7 @@ Block * StackFrame::GetFrameBlock () { - if (m_sc.block == NULL && m_flags.IsClear (eSymbolContextBlock)) + if (m_sc.block == nullptr && m_flags.IsClear (eSymbolContextBlock)) GetSymbolContext (eSymbolContextBlock); if (m_sc.block) @@ -334,7 +334,7 @@ return &m_sc.function->GetBlock (false); } } - return NULL; + return nullptr; } //---------------------------------------------------------------------- @@ -454,13 +454,13 @@ // Only replace what we didn't already have as we may have // information for an inlined function scope that won't match // what a standard lookup by address would match - if ((resolved & eSymbolContextCompUnit) && m_sc.comp_unit == NULL) + if ((resolved & eSymbolContextCompUnit) && m_sc.comp_unit == nullptr) m_sc.comp_unit = sc.comp_unit; - if ((resolved & eSymbolContextFunction) && m_sc.function == NULL) + if ((resolved & eSymbolContextFunction) && m_sc.function == nullptr) m_sc.function = sc.function; - if ((resolved & eSymbolContextBlock) && m_sc.block == NULL) + if ((resolved & eSymbolContextBlock) && m_sc.block == nullptr) m_sc.block = sc.block; - if ((resolved & eSymbolContextSymbol) && m_sc.symbol == NULL) + if ((resolved & eSymbolContextSymbol) && m_sc.symbol == nullptr) m_sc.symbol = sc.symbol; if ((resolved & eSymbolContextLineEntry) && !m_sc.line_entry.IsValid()) { @@ -679,7 +679,7 @@ { // Make sure we aren't trying to deref an objective // C ivar if this is not allowed - const uint32_t pointer_type_flags = valobj_sp->GetClangType().GetTypeInfo (NULL); + const uint32_t pointer_type_flags = valobj_sp->GetClangType().GetTypeInfo (nullptr); if ((pointer_type_flags & ClangASTType::eTypeIsObjC) && (pointer_type_flags & ClangASTType::eTypeIsPointer)) { @@ -788,7 +788,7 @@ // Array member access, or treating pointer as an array if (var_path.size() > 2) // Need at least two brackets and a number { - char *end = NULL; + char *end = nullptr; long child_index = ::strtol (&var_path[1], &end, 0); if (end && *end == ']' && *(end-1) != '[') // this code forces an error in the case of arr[]. as bitfield[] is not a good syntax we're good to go @@ -853,7 +853,7 @@ { // dereferencing ObjC variables is not valid.. so let's try and recur to synthetic children ValueObjectSP synthetic = valobj_sp->GetSyntheticValue(); - if (synthetic.get() == NULL /* no synthetic */ + if (synthetic.get() == nullptr /* no synthetic */ || synthetic == valobj_sp) /* synthetic is the same as the original object */ { valobj_sp->GetExpressionPath (var_expr_path_strm, false); @@ -895,7 +895,7 @@ } } } - else if (valobj_sp->GetClangType().IsArrayType (NULL, NULL, &is_incomplete_array)) + else if (valobj_sp->GetClangType().IsArrayType (nullptr, nullptr, &is_incomplete_array)) { // Pass false to dynamic_value here so we can tell the difference between // no dynamic value and no member of this type... @@ -929,7 +929,7 @@ { ValueObjectSP synthetic = valobj_sp->GetSyntheticValue(); if (no_synth_child /* synthetic is forbidden */ || - synthetic.get() == NULL /* no synthetic */ + synthetic.get() == nullptr /* no synthetic */ || synthetic == valobj_sp) /* synthetic is the same as the original object */ { valobj_sp->GetExpressionPath (var_expr_path_strm, false); @@ -982,7 +982,7 @@ else if (end && *end == '-') { // this is most probably a BitField, let's take a look - char *real_end = NULL; + char *real_end = nullptr; long final_index = ::strtol (end+1, &real_end, 0); bool expand_bitfield = true; if (real_end && *real_end == ']') @@ -1162,7 +1162,7 @@ if (m_sc.function->GetFrameBaseExpression().IsLocationList()) loclist_base_addr = m_sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (exe_ctx.GetTargetPtr()); - if (m_sc.function->GetFrameBaseExpression().Evaluate(&exe_ctx, NULL, NULL, NULL, loclist_base_addr, NULL, expr_value, &m_frame_base_error) == false) + if (m_sc.function->GetFrameBaseExpression().Evaluate(&exe_ctx, nullptr, nullptr, nullptr, loclist_base_addr, nullptr, expr_value, &m_frame_base_error) == false) { // We should really have an error if evaluate returns, but in case // we don't, lets set the error to something at least. @@ -1225,7 +1225,7 @@ if (var_idx < num_variables) { valobj_sp = m_variable_list_value_objects.GetValueObjectAtIndex (var_idx); - if (valobj_sp.get() == NULL) + if (valobj_sp.get() == nullptr) { if (m_variable_list_value_objects.GetSize() < num_variables) m_variable_list_value_objects.Resize(num_variables); @@ -1256,7 +1256,7 @@ // We aren't already tracking this global VariableList *var_list = GetVariableList (true); // If this frame has no variables, create a new list - if (var_list == NULL) + if (var_list == nullptr) m_variable_list_sp.reset (new VariableList()); // Add the global/static variable to this frame @@ -1271,10 +1271,10 @@ bool StackFrame::IsInlined () { - if (m_sc.block == NULL) + if (m_sc.block == nullptr) GetSymbolContext (eSymbolContextBlock); if (m_sc.block) - return m_sc.block->GetContainingInlinedBlock() != NULL; + return m_sc.block->GetContainingInlinedBlock() != nullptr; return false; } @@ -1324,7 +1324,7 @@ void StackFrame::DumpUsingSettingsFormat (Stream *strm, const char *frame_marker) { - if (strm == NULL) + if (strm == nullptr) return; GetSymbolContext(eSymbolContextEverything); @@ -1334,11 +1334,11 @@ if (frame_marker) s.PutCString(frame_marker); - const char *frame_format = NULL; + const char *frame_format = nullptr; Target *target = exe_ctx.GetTargetPtr(); if (target) frame_format = target->GetDebugger().GetFrameFormat(); - if (frame_format && Debugger::FormatPrompt (frame_format, &m_sc, &exe_ctx, NULL, s)) + if (frame_format && Debugger::FormatPrompt (frame_format, &m_sc, &exe_ctx, nullptr, s)) { strm->Write(s.GetData(), s.GetSize()); } @@ -1352,7 +1352,7 @@ void StackFrame::Dump (Stream *strm, bool show_frame_index, bool show_fullpaths) { - if (strm == NULL) + if (strm == nullptr) return; if (show_frame_index) @@ -1394,10 +1394,10 @@ m_concrete_frame_index = curr_frame.m_concrete_frame_index; m_reg_context_sp = curr_frame.m_reg_context_sp; m_frame_code_addr = curr_frame.m_frame_code_addr; - assert (m_sc.target_sp.get() == NULL || curr_frame.m_sc.target_sp.get() == NULL || m_sc.target_sp.get() == curr_frame.m_sc.target_sp.get()); - assert (m_sc.module_sp.get() == NULL || curr_frame.m_sc.module_sp.get() == NULL || m_sc.module_sp.get() == curr_frame.m_sc.module_sp.get()); - assert (m_sc.comp_unit == NULL || curr_frame.m_sc.comp_unit == NULL || m_sc.comp_unit == curr_frame.m_sc.comp_unit); - assert (m_sc.function == NULL || curr_frame.m_sc.function == NULL || m_sc.function == curr_frame.m_sc.function); + assert (m_sc.target_sp.get() == nullptr || curr_frame.m_sc.target_sp.get() == nullptr || m_sc.target_sp.get() == curr_frame.m_sc.target_sp.get()); + assert (m_sc.module_sp.get() == nullptr || curr_frame.m_sc.module_sp.get() == nullptr || m_sc.module_sp.get() == curr_frame.m_sc.module_sp.get()); + assert (m_sc.comp_unit == nullptr || curr_frame.m_sc.comp_unit == nullptr || m_sc.comp_unit == curr_frame.m_sc.comp_unit); + assert (m_sc.function == nullptr || curr_frame.m_sc.function == nullptr || m_sc.function == curr_frame.m_sc.function); m_sc = curr_frame.m_sc; m_flags.Clear(GOT_FRAME_BASE | eSymbolContextEverything); m_flags.Set (m_sc.GetResolvedMask()); @@ -1478,8 +1478,8 @@ AddressRange pc_range; pc_range.GetBaseAddress() = GetFrameCodeAddress(); pc_range.SetByteSize(disasm_lines * target_arch.GetMaximumOpcodeByteSize()); - const char *plugin_name = NULL; - const char *flavor = NULL; + const char *plugin_name = nullptr; + const char *flavor = nullptr; Disassembler::Disassemble (target->GetDebugger(), target_arch, plugin_name, Index: source/Target/StackFrameList.cpp =================================================================== --- source/Target/StackFrameList.cpp +++ source/Target/StackFrameList.cpp @@ -195,7 +195,7 @@ int num_inlined_functions = 0; for (Block *container_ptr = block_ptr->GetInlinedParent(); - container_ptr != NULL; + container_ptr != nullptr; container_ptr = container_ptr->GetInlinedParent()) { if (!container_ptr->GetRangeContainingAddress(pc_as_address, containing_range)) @@ -317,7 +317,7 @@ reg_ctx_sp, cfa, pc, - NULL)); + nullptr)); m_frames.push_back (unwind_frame_sp); } } @@ -339,7 +339,7 @@ const bool cfa_is_valid = true; const bool stop_id_is_valid = false; const bool is_history_frame = false; - unwind_frame_sp.reset (new StackFrame (m_thread.shared_from_this(), m_frames.size(), idx, cfa, cfa_is_valid, pc, 0, stop_id_is_valid, is_history_frame, NULL)); + unwind_frame_sp.reset (new StackFrame (m_thread.shared_from_this(), m_frames.size(), idx, cfa, cfa_is_valid, pc, 0, stop_id_is_valid, is_history_frame, nullptr)); m_frames.push_back (unwind_frame_sp); } @@ -420,7 +420,7 @@ StackFrame *curr_frame = curr_frame_sp.get(); StackFrame *prev_frame = prev_frame_sp.get(); - if (curr_frame == NULL || prev_frame == NULL) + if (curr_frame == nullptr || prev_frame == nullptr) break; // Check the stack ID to make sure they are equal @@ -483,7 +483,7 @@ void StackFrameList::Dump (Stream *s) { - if (s == NULL) + if (s == nullptr) return; Mutex::Locker locker (m_mutex); @@ -543,7 +543,7 @@ const bool cfa_is_valid = true; const bool stop_id_is_valid = false; const bool is_history_frame = false; - frame_sp.reset (new StackFrame (m_thread.shared_from_this(), idx, idx, cfa, cfa_is_valid, pc, 0, stop_id_is_valid, is_history_frame, NULL)); + frame_sp.reset (new StackFrame (m_thread.shared_from_this(), idx, idx, cfa, cfa_is_valid, pc, 0, stop_id_is_valid, is_history_frame, nullptr)); Function *function = frame_sp->GetSymbolContext (eSymbolContextFunction).function; if (function) @@ -751,8 +751,8 @@ void StackFrameList::Merge (std::unique_ptr& curr_ap, lldb::StackFrameListSP& prev_sp) { - Mutex::Locker curr_locker (curr_ap.get() ? &curr_ap->m_mutex : NULL); - Mutex::Locker prev_locker (prev_sp.get() ? &prev_sp->m_mutex : NULL); + Mutex::Locker curr_locker (curr_ap.get() ? &curr_ap->m_mutex : nullptr); + Mutex::Locker prev_locker (prev_sp.get() ? &prev_sp->m_mutex : nullptr); #if defined (DEBUG_STACK_FRAMES) StreamFile s(stdout, false); @@ -769,7 +769,7 @@ s.EOL(); #endif - if (curr_ap.get() == NULL || curr_ap->GetNumFrames (false) == 0) + if (curr_ap.get() == nullptr || curr_ap->GetNumFrames (false) == 0) { #if defined (DEBUG_STACK_FRAMES) s.PutCString("No current frames, leave previous frames alone...\n"); @@ -778,7 +778,7 @@ return; } - if (prev_sp.get() == NULL || prev_sp->GetNumFrames (false) == 0) + if (prev_sp.get() == nullptr || prev_sp->GetNumFrames (false) == 0) { #if defined (DEBUG_STACK_FRAMES) s.PutCString("No previous frames, so use current frames...\n"); @@ -891,7 +891,7 @@ last_frame = first_frame + num_frames; StackFrameSP selected_frame_sp = m_thread.GetSelectedFrame(); - const char *unselected_marker = NULL; + const char *unselected_marker = nullptr; std::string buffer; if (selected_frame_marker) { @@ -899,15 +899,15 @@ buffer.insert(buffer.begin(), len, ' '); unselected_marker = buffer.c_str(); } - const char *marker = NULL; + const char *marker = nullptr; for (frame_idx = first_frame; frame_idx < last_frame; ++frame_idx) { frame_sp = GetFrameAtIndex(frame_idx); - if (frame_sp.get() == NULL) + if (frame_sp.get() == nullptr) break; - if (selected_frame_marker != NULL) + if (selected_frame_marker != nullptr) { if (frame_sp == selected_frame_sp) marker = selected_frame_marker; Index: source/Target/StackID.cpp =================================================================== --- source/Target/StackID.cpp +++ source/Target/StackID.cpp @@ -49,7 +49,7 @@ SymbolContextScope *rhs_scope = rhs.GetSymbolContextScope(); // Only compare the PC values if both symbol context scopes are NULL - if (lhs_scope == NULL && rhs_scope == NULL) + if (lhs_scope == nullptr && rhs_scope == nullptr) return lhs.GetPC() == rhs.GetPC(); return lhs_scope == rhs_scope; @@ -64,7 +64,7 @@ SymbolContextScope *lhs_scope = lhs.GetSymbolContextScope(); SymbolContextScope *rhs_scope = rhs.GetSymbolContextScope(); - if (lhs_scope == NULL && rhs_scope == NULL) + if (lhs_scope == nullptr && rhs_scope == nullptr) return lhs.GetPC() != rhs.GetPC(); return lhs_scope != rhs_scope; @@ -88,7 +88,7 @@ SymbolContextScope *lhs_scope = lhs.GetSymbolContextScope(); SymbolContextScope *rhs_scope = rhs.GetSymbolContextScope(); - if (lhs_scope != NULL && rhs_scope != NULL) + if (lhs_scope != nullptr && rhs_scope != nullptr) { // Same exact scope, lhs is not less than (younger than rhs) if (lhs_scope == rhs_scope) @@ -101,8 +101,8 @@ // Items with the same function can only be compared if (lhs_sc.function == rhs_sc.function && - lhs_sc.function != NULL && lhs_sc.block != NULL && - rhs_sc.function != NULL && rhs_sc.block != NULL) + lhs_sc.function != nullptr && lhs_sc.block != nullptr && + rhs_sc.function != nullptr && rhs_sc.block != nullptr) { return rhs_sc.block->Contains (lhs_sc.block); } Index: source/Target/StopInfo.cpp =================================================================== --- source/Target/StopInfo.cpp +++ source/Target/StopInfo.cpp @@ -244,7 +244,7 @@ for (size_t idx = 0; idx < num_owners; idx++) { const char *kind = bp_site_sp->GetOwnerAtIndex(idx)->GetBreakpoint().GetBreakpointKind(); - if (kind != NULL) + if (kind != nullptr) { m_description.assign (kind); return kind; @@ -432,7 +432,7 @@ // First run the condition for the breakpoint. If that says we should stop, then we'll run // the callback for the breakpoint. If the callback says we shouldn't stop that will win. - if (bp_loc_sp->GetConditionText() != NULL) + if (bp_loc_sp->GetConditionText() != nullptr) { Error condition_error; bool condition_says_stop = bp_loc_sp->ConditionSaysStop(exe_ctx, condition_error); @@ -696,7 +696,7 @@ new_plan_sp->SetPrivate (true); process->GetThreadList().SetSelectedThreadByID (thread_sp->GetID()); process->Resume (); - process->WaitForProcessToStop (NULL); + process->WaitForProcessToStop (nullptr); process->GetThreadList().SetSelectedThreadByID (thread_sp->GetID()); thread_sp->SetStopInfo(stored_stop_info_sp); } @@ -704,7 +704,7 @@ } } - if (m_should_stop && wp_sp->GetConditionText() != NULL) + if (m_should_stop && wp_sp->GetConditionText() != nullptr) { // We need to make sure the user sees any parse errors in their condition, so we'll hook the // constructor errors up to the debugger's Async I/O. @@ -717,7 +717,7 @@ result_code = ClangUserExpression::Evaluate (exe_ctx, expr_options, wp_sp->GetConditionText(), - NULL, + nullptr, result_value_sp, error); if (result_code == eExecutionCompleted) Index: source/Target/SystemRuntime.cpp =================================================================== --- source/Target/SystemRuntime.cpp +++ source/Target/SystemRuntime.cpp @@ -18,14 +18,14 @@ SystemRuntime* SystemRuntime::FindPlugin (Process *process) { - SystemRuntimeCreateInstance create_callback = NULL; - for (uint32_t idx = 0; (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(idx)) != NULL; ++idx) + SystemRuntimeCreateInstance create_callback = nullptr; + for (uint32_t idx = 0; (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(idx)) != nullptr; ++idx) { std::unique_ptr instance_ap(create_callback(process)); if (instance_ap.get()) return instance_ap.release(); } - return NULL; + return nullptr; } Index: source/Target/Target.cpp =================================================================== --- source/Target/Target.cpp +++ source/Target/Target.cpp @@ -250,7 +250,7 @@ bool hardware) { SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, source_file_spec_list)); - BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex (NULL, source_regex)); + BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex (nullptr, source_regex)); return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, true); } @@ -300,7 +300,7 @@ if (skip_prologue == eLazyBoolCalculate) skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo; - BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine (NULL, + BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine (nullptr, file, line_no, check_inlines, @@ -331,7 +331,7 @@ Target::CreateBreakpoint (Address &addr, bool internal, bool hardware) { SearchFilterSP filter_sp(new SearchFilterForNonModuleSpecificSearches (shared_from_this())); - BreakpointResolverSP resolver_sp (new BreakpointResolverAddress (NULL, addr)); + BreakpointResolverSP resolver_sp (new BreakpointResolverAddress (nullptr, addr)); return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, false); } @@ -352,7 +352,7 @@ if (skip_prologue == eLazyBoolCalculate) skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo; - BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, + BreakpointResolverSP resolver_sp (new BreakpointResolverName (nullptr, func_name, func_name_type_mask, Breakpoint::Exact, @@ -380,7 +380,7 @@ if (skip_prologue == eLazyBoolCalculate) skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo; - BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, + BreakpointResolverSP resolver_sp (new BreakpointResolverName (nullptr, func_names, func_name_type_mask, skip_prologue)); @@ -407,7 +407,7 @@ if (skip_prologue == eLazyBoolCalculate) skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo; - BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, + BreakpointResolverSP resolver_sp (new BreakpointResolverName (nullptr, func_names, num_names, func_name_type_mask, @@ -421,7 +421,7 @@ Target::GetSearchFilterForModule (const FileSpec *containingModule) { SearchFilterSP filter_sp; - if (containingModule != NULL) + if (containingModule != nullptr) { // TODO: We should look into sharing module based search filters // across many breakpoints like we do for the simple target based one @@ -429,7 +429,7 @@ } else { - if (m_search_filter_sp.get() == NULL) + if (m_search_filter_sp.get() == nullptr) m_search_filter_sp.reset (new SearchFilterForNonModuleSpecificSearches (shared_from_this())); filter_sp = m_search_filter_sp; } @@ -448,7 +448,7 @@ } else { - if (m_search_filter_sp.get() == NULL) + if (m_search_filter_sp.get() == nullptr) m_search_filter_sp.reset (new SearchFilterForNonModuleSpecificSearches (shared_from_this())); filter_sp = m_search_filter_sp; } @@ -459,11 +459,11 @@ Target::GetSearchFilterForModuleAndCUList (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles) { - if (containingSourceFiles == NULL || containingSourceFiles->GetSize() == 0) + if (containingSourceFiles == nullptr || containingSourceFiles->GetSize() == 0) return GetSearchFilterForModuleList(containingModules); SearchFilterSP filter_sp; - if (containingModules == NULL) + if (containingModules == nullptr) { // We could make a special "CU List only SearchFilter". Better yet was if these could be composable, // but that will take a little reworking. @@ -486,7 +486,7 @@ bool hardware) { SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, containingSourceFiles)); - BreakpointResolverSP resolver_sp(new BreakpointResolverName (NULL, + BreakpointResolverSP resolver_sp(new BreakpointResolverName (nullptr, func_regex, skip_prologue == eLazyBoolCalculate ? GetSkipPrologue() : skip_prologue)); @@ -1068,7 +1068,7 @@ FileSpec dependent_file_spec (dependent_files.GetFileSpecPointerAtIndex(i)); FileSpec platform_dependent_file_spec; if (m_platform_sp) - m_platform_sp->GetFileWithUUID (dependent_file_spec, NULL, platform_dependent_file_spec); + m_platform_sp->GetFileWithUUID (dependent_file_spec, nullptr, platform_dependent_file_spec); else platform_dependent_file_spec = dependent_file_spec; @@ -1120,8 +1120,8 @@ Error error = ModuleList::GetSharedModule (module_spec, executable_sp, &GetExecutableSearchPaths(), - NULL, - NULL); + nullptr, + nullptr); if (!error.Fail() && executable_sp) { @@ -1182,7 +1182,7 @@ m_process_sp->ModulesDidLoad (module_list); } // TODO: make event data that packages up the module_list - BroadcastEvent (eBroadcastBitModulesLoaded, NULL); + BroadcastEvent (eBroadcastBitModulesLoaded, nullptr); } } @@ -1202,7 +1202,7 @@ } m_breakpoint_list.UpdateBreakpoints (module_list, true, false); - BroadcastEvent(eBroadcastBitSymbolsLoaded, NULL); + BroadcastEvent(eBroadcastBitSymbolsLoaded, nullptr); } } @@ -1213,7 +1213,7 @@ { m_breakpoint_list.UpdateBreakpoints (module_list, false, delete_locations); // TODO: make event data that packages up the module_list - BroadcastEvent (eBroadcastBitModulesUnloaded, NULL); + BroadcastEvent (eBroadcastBitModulesUnloaded, nullptr); } } @@ -1464,7 +1464,7 @@ } else { - if (dst == NULL) + if (dst == nullptr) result_error.SetErrorString("invalid arguments"); else result_error.Clear(); @@ -1765,7 +1765,7 @@ Target::GetScratchClangASTContext(bool create_on_demand) { // Now see if we know the target triple, and if so, create our scratch AST context: - if (m_scratch_ast_context_ap.get() == NULL && m_arch.IsValid() && create_on_demand) + if (m_scratch_ast_context_ap.get() == nullptr && m_arch.IsValid() && create_on_demand) { m_scratch_ast_context_ap.reset (new ClangASTContext(m_arch.GetTriple().str().c_str())); m_scratch_ast_source_ap.reset (new ClangASTSource(shared_from_this())); @@ -1847,10 +1847,10 @@ // the "target_sp" member of SymbolContext. This accessor helper function // will get the target from one of these locations. - Target *target = NULL; - if (sc_ptr != NULL) + Target *target = nullptr; + if (sc_ptr != nullptr) target = sc_ptr->target_sp.get(); - if (target == NULL && exe_ctx_ptr) + if (target == nullptr && exe_ctx_ptr) target = exe_ctx_ptr->GetTargetPtr(); return target; } @@ -1868,7 +1868,7 @@ ExecutionResults execution_results = eExecutionSetupError; - if (expr_cstr == NULL || expr_cstr[0] == '\0') + if (expr_cstr == nullptr || expr_cstr[0] == '\0') return execution_results; // We shouldn't run stop hooks in expressions. @@ -1998,7 +1998,7 @@ SourceManager & Target::GetSourceManager () { - if (m_source_manager_ap.get() == NULL) + if (m_source_manager_ap.get() == nullptr) m_source_manager_ap.reset (new SourceManager(shared_from_this())); return *m_source_manager_ap; } @@ -2147,9 +2147,9 @@ bool any_thread_matched = false; for (size_t i = 0; keep_going && i < num_exe_ctx; i++) { - if ((cur_hook_sp->GetSpecifier () == NULL + if ((cur_hook_sp->GetSpecifier () == nullptr || cur_hook_sp->GetSpecifier()->SymbolContextMatches(sym_ctx_with_reasons[i])) - && (cur_hook_sp->GetThreadSpecifier() == NULL + && (cur_hook_sp->GetThreadSpecifier() == nullptr || cur_hook_sp->GetThreadSpecifier()->ThreadPassesBasicTests(exc_ctx_with_reasons[i].GetThreadRef()))) { if (!hooks_ran) @@ -2160,7 +2160,7 @@ { const char *cmd = (cur_hook_sp->GetCommands().GetSize() == 1 ? cur_hook_sp->GetCommands().GetStringAtIndex(0) : - NULL); + nullptr); if (cmd) result.AppendMessageWithFormat("\n- Hook %" PRIu64 " (%s)\n", cur_hook_sp->GetID(), cmd); else @@ -2206,7 +2206,7 @@ static TargetPropertiesSP g_settings_sp; if (!g_settings_sp) { - g_settings_sp.reset (new TargetProperties (NULL)); + g_settings_sp.reset (new TargetProperties (nullptr)); } return g_settings_sp; } @@ -2386,7 +2386,7 @@ else { const char *plugin_name = launch_info.GetProcessPluginName(); - CreateProcess (listener, plugin_name, NULL); + CreateProcess (listener, plugin_name, nullptr); } if (m_process_sp) @@ -2406,7 +2406,7 @@ { ListenerSP hijack_listener_sp (launch_info.GetHijackListener()); - StateType state = m_process_sp->WaitForProcessToStop (NULL, NULL, false, hijack_listener_sp.get()); + StateType state = m_process_sp->WaitForProcessToStop (nullptr, nullptr, false, hijack_listener_sp.get()); if (state == eStateStopped) { @@ -2419,7 +2419,7 @@ { if (synchronous_execution) { - state = m_process_sp->WaitForProcessToStop (NULL, NULL, true, hijack_listener_sp.get()); + state = m_process_sp->WaitForProcessToStop (nullptr, nullptr, true, hijack_listener_sp.get()); const bool must_be_alive = false; // eStateExited is ok, so this must be false if (!StateIsStoppedState(state, must_be_alive)) { @@ -2470,7 +2470,7 @@ m_thread_spec_ap (), m_active (rhs.m_active) { - if (rhs.m_thread_spec_ap.get() != NULL) + if (rhs.m_thread_spec_ap.get() != nullptr) m_thread_spec_ap.reset (new ThreadSpec(*rhs.m_thread_spec_ap.get())); } @@ -2508,7 +2508,7 @@ s->SetIndentLevel (indent_level + 2); } - if (m_thread_spec_ap.get() != NULL) + if (m_thread_spec_ap.get() != nullptr) { StreamString tmp; s->Indent("Thread:\n"); @@ -2540,7 +2540,7 @@ { eNoDynamicValues, "no-dynamic-values", "Don't calculate the dynamic type of values"}, { eDynamicCanRunTarget, "run-target", "Calculate the dynamic type of values even if you have to run the target."}, { eDynamicDontRunTarget, "no-run-target", "Calculate the dynamic type of values, but don't run the target."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; static OptionEnumValueElement @@ -2549,7 +2549,7 @@ { eInlineBreakpointsNever, "never", "Never look for inline breakpoint locations (fastest). This setting should only be used if you know that no inlining occurs in your programs."}, { eInlineBreakpointsHeaders, "headers", "Only check for inline breakpoint locations when setting breakpoints in header files, but not when setting breakpoint in implementation source files (default)."}, { eInlineBreakpointsAlways, "always", "Always look for inline breakpoint locations when setting file and line breakpoints (slower but most accurate)."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; typedef enum x86DisassemblyFlavor @@ -2565,7 +2565,7 @@ { eX86DisFlavorDefault, "default", "Disassembler default (currently att)."}, { eX86DisFlavorIntel, "intel", "Intel disassembler flavor."}, { eX86DisFlavorATT, "att", "AT&T disassembler flavor."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; static OptionEnumValueElement @@ -2573,7 +2573,7 @@ { { Disassembler::eHexStyleC, "c", "C-style (0xffff)."}, { Disassembler::eHexStyleAsm, "asm", "Asm-style (0ffffh)."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; static OptionEnumValueElement @@ -2582,7 +2582,7 @@ { eLoadScriptFromSymFileTrue, "true", "Load debug scripts inside symbol files"}, { eLoadScriptFromSymFileFalse, "false", "Do not load debug scripts inside symbol files."}, { eLoadScriptFromSymFileWarn, "warn", "Warn about debug scripts inside symbol files but do not load them."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; @@ -2592,38 +2592,38 @@ { eMemoryModuleLoadLevelMinimal, "minimal" , "Load minimal information when loading modules from memory. Currently this setting loads sections only."}, { eMemoryModuleLoadLevelPartial, "partial" , "Load partial information when loading modules from memory. Currently this setting loads sections and function bounds."}, { eMemoryModuleLoadLevelComplete, "complete", "Load complete information when loading modules from memory. Currently this setting loads sections and all symbols."}, - { 0, NULL, NULL } + { 0, nullptr, nullptr } }; static PropertyDefinition g_properties[] = { - { "default-arch" , OptionValue::eTypeArch , true , 0 , NULL, NULL, "Default architecture to choose, when there's a choice." }, - { "expr-prefix" , OptionValue::eTypeFileSpec , false, 0 , NULL, NULL, "Path to a file containing expressions to be prepended to all expressions." }, - { "prefer-dynamic-value" , OptionValue::eTypeEnum , false, eNoDynamicValues , NULL, g_dynamic_value_types, "Should printed values be shown as their dynamic value." }, - { "enable-synthetic-value" , OptionValue::eTypeBoolean , false, true , NULL, NULL, "Should synthetic values be used by default whenever available." }, - { "skip-prologue" , OptionValue::eTypeBoolean , false, true , NULL, NULL, "Skip function prologues when setting breakpoints by name." }, - { "source-map" , OptionValue::eTypePathMap , false, 0 , NULL, NULL, "Source path remappings used to track the change of location between a source file when built, and " + { "default-arch" , OptionValue::eTypeArch , true , 0 , nullptr, nullptr, "Default architecture to choose, when there's a choice." }, + { "expr-prefix" , OptionValue::eTypeFileSpec , false, 0 , nullptr, nullptr, "Path to a file containing expressions to be prepended to all expressions." }, + { "prefer-dynamic-value" , OptionValue::eTypeEnum , false, eNoDynamicValues , nullptr, g_dynamic_value_types, "Should printed values be shown as their dynamic value." }, + { "enable-synthetic-value" , OptionValue::eTypeBoolean , false, true , nullptr, nullptr, "Should synthetic values be used by default whenever available." }, + { "skip-prologue" , OptionValue::eTypeBoolean , false, true , nullptr, nullptr, "Skip function prologues when setting breakpoints by name." }, + { "source-map" , OptionValue::eTypePathMap , false, 0 , nullptr, nullptr, "Source path remappings used to track the change of location between a source file when built, and " "where it exists on the current system. It consists of an array of duples, the first element of each duple is " "some part (starting at the root) of the path to the file when it was built, " "and the second is where the remainder of the original build hierarchy is rooted on the local system. " "Each element of the array is checked in order and the first one that results in a match wins." }, - { "exec-search-paths" , OptionValue::eTypeFileSpecList, false, 0 , NULL, NULL, "Executable search paths to use when locating executable files whose paths don't match the local file system." }, - { "debug-file-search-paths" , OptionValue::eTypeFileSpecList, false, 0 , NULL, NULL, "List of directories to be searched when locating debug symbol files." }, - { "max-children-count" , OptionValue::eTypeSInt64 , false, 256 , NULL, NULL, "Maximum number of children to expand in any level of depth." }, - { "max-string-summary-length" , OptionValue::eTypeSInt64 , false, 1024 , NULL, NULL, "Maximum number of characters to show when using %s in summary strings." }, - { "max-memory-read-size" , OptionValue::eTypeSInt64 , false, 1024 , NULL, NULL, "Maximum number of bytes that 'memory read' will fetch before --force must be specified." }, - { "breakpoints-use-platform-avoid-list", OptionValue::eTypeBoolean , false, true , NULL, NULL, "Consult the platform module avoid list when setting non-module specific breakpoints." }, - { "arg0" , OptionValue::eTypeString , false, 0 , NULL, NULL, "The first argument passed to the program in the argument array which can be different from the executable itself." }, - { "run-args" , OptionValue::eTypeArgs , false, 0 , NULL, NULL, "A list containing all the arguments to be passed to the executable when it is run. Note that this does NOT include the argv[0] which is in target.arg0." }, - { "env-vars" , OptionValue::eTypeDictionary, false, OptionValue::eTypeString , NULL, NULL, "A list of all the environment variables to be passed to the executable's environment, and their values." }, - { "inherit-env" , OptionValue::eTypeBoolean , false, true , NULL, NULL, "Inherit the environment from the process that is running LLDB." }, - { "input-path" , OptionValue::eTypeFileSpec , false, 0 , NULL, NULL, "The file/path to be used by the executable program for reading its standard input." }, - { "output-path" , OptionValue::eTypeFileSpec , false, 0 , NULL, NULL, "The file/path to be used by the executable program for writing its standard output." }, - { "error-path" , OptionValue::eTypeFileSpec , false, 0 , NULL, NULL, "The file/path to be used by the executable program for writing its standard error." }, - { "disable-aslr" , OptionValue::eTypeBoolean , false, true , NULL, NULL, "Disable Address Space Layout Randomization (ASLR)" }, - { "disable-stdio" , OptionValue::eTypeBoolean , false, false , NULL, NULL, "Disable stdin/stdout for process (e.g. for a GUI application)" }, - { "inline-breakpoint-strategy" , OptionValue::eTypeEnum , false, eInlineBreakpointsHeaders , NULL, g_inline_breakpoint_enums, "The strategy to use when settings breakpoints by file and line. " + { "exec-search-paths" , OptionValue::eTypeFileSpecList, false, 0 , nullptr, nullptr, "Executable search paths to use when locating executable files whose paths don't match the local file system." }, + { "debug-file-search-paths" , OptionValue::eTypeFileSpecList, false, 0 , nullptr, nullptr, "List of directories to be searched when locating debug symbol files." }, + { "max-children-count" , OptionValue::eTypeSInt64 , false, 256 , nullptr, nullptr, "Maximum number of children to expand in any level of depth." }, + { "max-string-summary-length" , OptionValue::eTypeSInt64 , false, 1024 , nullptr, nullptr, "Maximum number of characters to show when using %s in summary strings." }, + { "max-memory-read-size" , OptionValue::eTypeSInt64 , false, 1024 , nullptr, nullptr, "Maximum number of bytes that 'memory read' will fetch before --force must be specified." }, + { "breakpoints-use-platform-avoid-list", OptionValue::eTypeBoolean , false, true , nullptr, nullptr, "Consult the platform module avoid list when setting non-module specific breakpoints." }, + { "arg0" , OptionValue::eTypeString , false, 0 , nullptr, nullptr, "The first argument passed to the program in the argument array which can be different from the executable itself." }, + { "run-args" , OptionValue::eTypeArgs , false, 0 , nullptr, nullptr, "A list containing all the arguments to be passed to the executable when it is run. Note that this does NOT include the argv[0] which is in target.arg0." }, + { "env-vars" , OptionValue::eTypeDictionary, false, OptionValue::eTypeString , nullptr, nullptr, "A list of all the environment variables to be passed to the executable's environment, and their values." }, + { "inherit-env" , OptionValue::eTypeBoolean , false, true , nullptr, nullptr, "Inherit the environment from the process that is running LLDB." }, + { "input-path" , OptionValue::eTypeFileSpec , false, 0 , nullptr, nullptr, "The file/path to be used by the executable program for reading its standard input." }, + { "output-path" , OptionValue::eTypeFileSpec , false, 0 , nullptr, nullptr, "The file/path to be used by the executable program for writing its standard output." }, + { "error-path" , OptionValue::eTypeFileSpec , false, 0 , nullptr, nullptr, "The file/path to be used by the executable program for writing its standard error." }, + { "disable-aslr" , OptionValue::eTypeBoolean , false, true , nullptr, nullptr, "Disable Address Space Layout Randomization (ASLR)" }, + { "disable-stdio" , OptionValue::eTypeBoolean , false, false , nullptr, nullptr, "Disable stdin/stdout for process (e.g. for a GUI application)" }, + { "inline-breakpoint-strategy" , OptionValue::eTypeEnum , false, eInlineBreakpointsHeaders , nullptr, g_inline_breakpoint_enums, "The strategy to use when settings breakpoints by file and line. " "Breakpoint locations can end up being inlined by the compiler, so that a compile unit 'a.c' might contain an inlined function from another source file. " "Usually this is limitted to breakpoint locations from inlined functions from header or other include files, or more accurately non-implementation source files. " "Sometimes code might #include implementation files and cause inlined breakpoint locations in inlined implementation files. " @@ -2631,20 +2631,20 @@ "times we look for inlined locations. This setting allows you to control exactly which strategy is used when settings " "file and line breakpoints." }, // FIXME: This is the wrong way to do per-architecture settings, but we don't have a general per architecture settings system in place yet. - { "x86-disassembly-flavor" , OptionValue::eTypeEnum , false, eX86DisFlavorDefault, NULL, g_x86_dis_flavor_value_types, "The default disassembly flavor to use for x86 or x86-64 targets." }, - { "use-hex-immediates" , OptionValue::eTypeBoolean , false, true, NULL, NULL, "Show immediates in disassembly as hexadecimal." }, - { "hex-immediate-style" , OptionValue::eTypeEnum , false, Disassembler::eHexStyleC, NULL, g_hex_immediate_style_values, "Which style to use for printing hexadecimal disassembly values." }, - { "use-fast-stepping" , OptionValue::eTypeBoolean , false, true, NULL, NULL, "Use a fast stepping algorithm based on running from branch to branch rather than instruction single-stepping." }, - { "load-script-from-symbol-file" , OptionValue::eTypeEnum , false, eLoadScriptFromSymFileWarn, NULL, g_load_script_from_sym_file_values, "Allow LLDB to load scripting resources embedded in symbol files when available." }, - { "memory-module-load-level" , OptionValue::eTypeEnum , false, eMemoryModuleLoadLevelComplete, NULL, g_memory_module_load_level_values, + { "x86-disassembly-flavor" , OptionValue::eTypeEnum , false, eX86DisFlavorDefault, nullptr, g_x86_dis_flavor_value_types, "The default disassembly flavor to use for x86 or x86-64 targets." }, + { "use-hex-immediates" , OptionValue::eTypeBoolean , false, true, nullptr, nullptr, "Show immediates in disassembly as hexadecimal." }, + { "hex-immediate-style" , OptionValue::eTypeEnum , false, Disassembler::eHexStyleC, nullptr, g_hex_immediate_style_values, "Which style to use for printing hexadecimal disassembly values." }, + { "use-fast-stepping" , OptionValue::eTypeBoolean , false, true, nullptr, nullptr, "Use a fast stepping algorithm based on running from branch to branch rather than instruction single-stepping." }, + { "load-script-from-symbol-file" , OptionValue::eTypeEnum , false, eLoadScriptFromSymFileWarn, nullptr, g_load_script_from_sym_file_values, "Allow LLDB to load scripting resources embedded in symbol files when available." }, + { "memory-module-load-level" , OptionValue::eTypeEnum , false, eMemoryModuleLoadLevelComplete, nullptr, g_memory_module_load_level_values, "Loading modules from memory can be slow as reading the symbol tables and other data can take a long time depending on your connection to the debug target. " "This setting helps users control how much information gets loaded when loading modules from memory." "'complete' is the default value for this setting which will load all sections and symbols by reading them from memory (slowest, most accurate). " "'partial' will load sections and attempt to find function bounds without downloading the symbol table (faster, still accurate, missing symbol names). " "'minimal' is the fastest setting and will load section data with no symbols, but should rarely be used as stack frames in these memory regions will be inaccurate and not provide any context (fastest). " }, - { "display-expression-in-crashlogs" , OptionValue::eTypeBoolean , false, false, NULL, NULL, "Expressions that crash will show up in crash logs if the host system supports executable specific crash log strings and this setting is set to true." }, - { "trap-handler-names" , OptionValue::eTypeArray , true, OptionValue::eTypeString, NULL, NULL, "A list of trap handler function names, e.g. a common Unix user process one is _sigtramp." }, - { NULL , OptionValue::eTypeInvalid , false, 0 , NULL, NULL, NULL } + { "display-expression-in-crashlogs" , OptionValue::eTypeBoolean , false, false, nullptr, nullptr, "Expressions that crash will show up in crash logs if the host system supports executable specific crash log strings and this setting is set to true." }, + { "trap-handler-names" , OptionValue::eTypeArray , true, OptionValue::eTypeString, nullptr, nullptr, "A list of trap handler function names, e.g. a common Unix user process one is _sigtramp." }, + { nullptr , OptionValue::eTypeInvalid , false, 0 , nullptr, nullptr, nullptr } }; enum { @@ -2686,7 +2686,7 @@ public: TargetOptionValueProperties (const ConstString &name) : OptionValueProperties (name), - m_target (NULL), + m_target (nullptr), m_got_host_env (false) { } @@ -2740,7 +2740,7 @@ { m_got_host_env = true; const uint32_t idx = ePropertyInheritEnv; - if (GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0)) + if (GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0)) { PlatformSP platform_sp (m_target->GetPlatform()); if (platform_sp) @@ -2748,7 +2748,7 @@ StringList env; if (platform_sp->GetEnvironment(env)) { - OptionValueDictionary *env_dict = GetPropertyAtIndexAsOptionValueDictionary (NULL, ePropertyEnvVars); + OptionValueDictionary *env_dict = GetPropertyAtIndexAsOptionValueDictionary (nullptr, ePropertyEnvVars); if (env_dict) { const bool can_replace = false; @@ -2761,7 +2761,7 @@ const char *equal_pos = ::strchr(env_entry, '='); ConstString key; // It is ok to have environment variables with no values - const char *value = NULL; + const char *value = nullptr; if (equal_pos) { key.SetCStringWithLength(env_entry, equal_pos - env_entry); @@ -2814,7 +2814,7 @@ ArchSpec TargetProperties::GetDefaultArchitecture () const { - OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch (NULL, ePropertyDefaultArch); + OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch (nullptr, ePropertyDefaultArch); if (value) return value->GetCurrentValue(); return ArchSpec(); @@ -2823,7 +2823,7 @@ void TargetProperties::SetDefaultArchitecture (const ArchSpec& arch) { - OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch (NULL, ePropertyDefaultArch); + OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch (nullptr, ePropertyDefaultArch); if (value) return value->SetCurrentValue(arch, true); } @@ -2832,35 +2832,35 @@ TargetProperties::GetPreferDynamicValue() const { const uint32_t idx = ePropertyPreferDynamic; - return (lldb::DynamicValueType)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_properties[idx].default_uint_value); + return (lldb::DynamicValueType)m_collection_sp->GetPropertyAtIndexAsEnumeration (nullptr, idx, g_properties[idx].default_uint_value); } bool TargetProperties::GetDisableASLR () const { const uint32_t idx = ePropertyDisableASLR; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } void TargetProperties::SetDisableASLR (bool b) { const uint32_t idx = ePropertyDisableASLR; - m_collection_sp->SetPropertyAtIndexAsBoolean (NULL, idx, b); + m_collection_sp->SetPropertyAtIndexAsBoolean (nullptr, idx, b); } bool TargetProperties::GetDisableSTDIO () const { const uint32_t idx = ePropertyDisableSTDIO; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } void TargetProperties::SetDisableSTDIO (bool b) { const uint32_t idx = ePropertyDisableSTDIO; - m_collection_sp->SetPropertyAtIndexAsBoolean (NULL, idx, b); + m_collection_sp->SetPropertyAtIndexAsBoolean (nullptr, idx, b); } const char * @@ -2869,7 +2869,7 @@ const uint32_t idx = ePropertyDisassemblyFlavor; const char *return_value; - x86DisassemblyFlavor flavor_value = (x86DisassemblyFlavor) m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_properties[idx].default_uint_value); + x86DisassemblyFlavor flavor_value = (x86DisassemblyFlavor) m_collection_sp->GetPropertyAtIndexAsEnumeration (nullptr, idx, g_properties[idx].default_uint_value); return_value = g_x86_dis_flavor_value_types[flavor_value].string_value; return return_value; } @@ -2878,56 +2878,56 @@ TargetProperties::GetInlineStrategy () const { const uint32_t idx = ePropertyInlineStrategy; - return (InlineStrategy)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_properties[idx].default_uint_value); + return (InlineStrategy)m_collection_sp->GetPropertyAtIndexAsEnumeration (nullptr, idx, g_properties[idx].default_uint_value); } const char * TargetProperties::GetArg0 () const { const uint32_t idx = ePropertyArg0; - return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, NULL); + return m_collection_sp->GetPropertyAtIndexAsString (nullptr, idx, nullptr); } void TargetProperties::SetArg0 (const char *arg) { const uint32_t idx = ePropertyArg0; - m_collection_sp->SetPropertyAtIndexAsString (NULL, idx, arg); + m_collection_sp->SetPropertyAtIndexAsString (nullptr, idx, arg); } bool TargetProperties::GetRunArguments (Args &args) const { const uint32_t idx = ePropertyRunArgs; - return m_collection_sp->GetPropertyAtIndexAsArgs (NULL, idx, args); + return m_collection_sp->GetPropertyAtIndexAsArgs (nullptr, idx, args); } void TargetProperties::SetRunArguments (const Args &args) { const uint32_t idx = ePropertyRunArgs; - m_collection_sp->SetPropertyAtIndexFromArgs (NULL, idx, args); + m_collection_sp->SetPropertyAtIndexFromArgs (nullptr, idx, args); } size_t TargetProperties::GetEnvironmentAsArgs (Args &env) const { const uint32_t idx = ePropertyEnvVars; - return m_collection_sp->GetPropertyAtIndexAsArgs (NULL, idx, env); + return m_collection_sp->GetPropertyAtIndexAsArgs (nullptr, idx, env); } bool TargetProperties::GetSkipPrologue() const { const uint32_t idx = ePropertySkipPrologue; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } PathMappingList & TargetProperties::GetSourcePathMap () const { const uint32_t idx = ePropertySourceMap; - OptionValuePathMappings *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValuePathMappings (NULL, false, idx); + OptionValuePathMappings *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValuePathMappings (nullptr, false, idx); assert(option_value); return option_value->GetCurrentValue(); } @@ -2936,7 +2936,7 @@ TargetProperties::GetExecutableSearchPaths () { const uint32_t idx = ePropertyExecutableSearchPaths; - OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList (NULL, false, idx); + OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList (nullptr, false, idx); assert(option_value); return option_value->GetCurrentValue(); } @@ -2945,7 +2945,7 @@ TargetProperties::GetDebugFileSearchPaths () { const uint32_t idx = ePropertyDebugFileSearchPaths; - OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList (NULL, false, idx); + OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList (nullptr, false, idx); assert(option_value); return option_value->GetCurrentValue(); } @@ -2954,70 +2954,70 @@ TargetProperties::GetEnableSyntheticValue () const { const uint32_t idx = ePropertyEnableSynthetic; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } uint32_t TargetProperties::GetMaximumNumberOfChildrenToDisplay() const { const uint32_t idx = ePropertyMaxChildrenCount; - return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value); + return m_collection_sp->GetPropertyAtIndexAsSInt64 (nullptr, idx, g_properties[idx].default_uint_value); } uint32_t TargetProperties::GetMaximumSizeOfStringSummary() const { const uint32_t idx = ePropertyMaxSummaryLength; - return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value); + return m_collection_sp->GetPropertyAtIndexAsSInt64 (nullptr, idx, g_properties[idx].default_uint_value); } uint32_t TargetProperties::GetMaximumMemReadSize () const { const uint32_t idx = ePropertyMaxMemReadSize; - return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value); + return m_collection_sp->GetPropertyAtIndexAsSInt64 (nullptr, idx, g_properties[idx].default_uint_value); } FileSpec TargetProperties::GetStandardInputPath () const { const uint32_t idx = ePropertyInputPath; - return m_collection_sp->GetPropertyAtIndexAsFileSpec (NULL, idx); + return m_collection_sp->GetPropertyAtIndexAsFileSpec (nullptr, idx); } void TargetProperties::SetStandardInputPath (const char *p) { const uint32_t idx = ePropertyInputPath; - m_collection_sp->SetPropertyAtIndexAsString (NULL, idx, p); + m_collection_sp->SetPropertyAtIndexAsString (nullptr, idx, p); } FileSpec TargetProperties::GetStandardOutputPath () const { const uint32_t idx = ePropertyOutputPath; - return m_collection_sp->GetPropertyAtIndexAsFileSpec (NULL, idx); + return m_collection_sp->GetPropertyAtIndexAsFileSpec (nullptr, idx); } void TargetProperties::SetStandardOutputPath (const char *p) { const uint32_t idx = ePropertyOutputPath; - m_collection_sp->SetPropertyAtIndexAsString (NULL, idx, p); + m_collection_sp->SetPropertyAtIndexAsString (nullptr, idx, p); } FileSpec TargetProperties::GetStandardErrorPath () const { const uint32_t idx = ePropertyErrorPath; - return m_collection_sp->GetPropertyAtIndexAsFileSpec(NULL, idx); + return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx); } const char * TargetProperties::GetExpressionPrefixContentsAsCString () { const uint32_t idx = ePropertyExprPrefix; - OptionValueFileSpec *file = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec (NULL, false, idx); + OptionValueFileSpec *file = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec (nullptr, false, idx); if (file) { const bool null_terminate = true; @@ -3025,77 +3025,77 @@ if (data_sp) return (const char *) data_sp->GetBytes(); } - return NULL; + return nullptr; } void TargetProperties::SetStandardErrorPath (const char *p) { const uint32_t idx = ePropertyErrorPath; - m_collection_sp->SetPropertyAtIndexAsString (NULL, idx, p); + m_collection_sp->SetPropertyAtIndexAsString (nullptr, idx, p); } bool TargetProperties::GetBreakpointsConsultPlatformAvoidList () { const uint32_t idx = ePropertyBreakpointUseAvoidList; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } bool TargetProperties::GetUseHexImmediates () const { const uint32_t idx = ePropertyUseHexImmediates; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } bool TargetProperties::GetUseFastStepping () const { const uint32_t idx = ePropertyUseFastStepping; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } bool TargetProperties::GetDisplayExpressionsInCrashlogs () const { const uint32_t idx = ePropertyDisplayExpressionsInCrashlogs; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } LoadScriptFromSymFile TargetProperties::GetLoadScriptFromSymbolFile () const { const uint32_t idx = ePropertyLoadScriptFromSymbolFile; - return (LoadScriptFromSymFile)m_collection_sp->GetPropertyAtIndexAsEnumeration(NULL, idx, g_properties[idx].default_uint_value); + return (LoadScriptFromSymFile)m_collection_sp->GetPropertyAtIndexAsEnumeration(nullptr, idx, g_properties[idx].default_uint_value); } Disassembler::HexImmediateStyle TargetProperties::GetHexImmediateStyle () const { const uint32_t idx = ePropertyHexImmediateStyle; - return (Disassembler::HexImmediateStyle)m_collection_sp->GetPropertyAtIndexAsEnumeration(NULL, idx, g_properties[idx].default_uint_value); + return (Disassembler::HexImmediateStyle)m_collection_sp->GetPropertyAtIndexAsEnumeration(nullptr, idx, g_properties[idx].default_uint_value); } MemoryModuleLoadLevel TargetProperties::GetMemoryModuleLoadLevel() const { const uint32_t idx = ePropertyMemoryModuleLoadLevel; - return (MemoryModuleLoadLevel)m_collection_sp->GetPropertyAtIndexAsEnumeration(NULL, idx, g_properties[idx].default_uint_value); + return (MemoryModuleLoadLevel)m_collection_sp->GetPropertyAtIndexAsEnumeration(nullptr, idx, g_properties[idx].default_uint_value); } bool TargetProperties::GetUserSpecifiedTrapHandlerNames (Args &args) const { const uint32_t idx = ePropertyTrapHandlerNames; - return m_collection_sp->GetPropertyAtIndexAsArgs (NULL, idx, args); + return m_collection_sp->GetPropertyAtIndexAsArgs (nullptr, idx, args); } void TargetProperties::SetUserSpecifiedTrapHandlerNames (const Args &args) { const uint32_t idx = ePropertyTrapHandlerNames; - m_collection_sp->SetPropertyAtIndexFromArgs (NULL, idx, args); + m_collection_sp->SetPropertyAtIndexFromArgs (nullptr, idx, args); } //---------------------------------------------------------------------- @@ -3152,6 +3152,6 @@ if (event_data && event_data->GetFlavor() == TargetEventData::GetFlavorString()) return static_cast (event_ptr->GetData()); } - return NULL; + return nullptr; } Index: source/Target/TargetList.cpp =================================================================== --- source/Target/TargetList.cpp +++ source/Target/TargetList.cpp @@ -204,7 +204,7 @@ { if (arch.IsValid()) { - if (!platform_sp->IsCompatibleArchitecture(arch, false, NULL)) + if (!platform_sp->IsCompatibleArchitecture(arch, false, nullptr)) platform_sp = Platform::GetPlatformForArchitecture(specified_arch, &arch); } } @@ -269,12 +269,12 @@ error = platform_sp->ResolveExecutable (file, arch, exe_module_sp, - executable_search_paths.GetSize() ? &executable_search_paths : NULL); + executable_search_paths.GetSize() ? &executable_search_paths : nullptr); } if (error.Success() && exe_module_sp) { - if (exe_module_sp->GetObjectFile() == NULL) + if (exe_module_sp->GetObjectFile() == nullptr) { if (arch.IsValid()) { @@ -468,7 +468,7 @@ { // We don't have a valid pid to broadcast to, so broadcast to the target // list's async broadcaster... - BroadcastEvent (Process::eBroadcastBitInterrupt, NULL); + BroadcastEvent (Process::eBroadcastBitInterrupt, nullptr); } return num_async_interrupts_sent; @@ -478,7 +478,7 @@ TargetList::SignalIfRunning (lldb::pid_t pid, int signo) { uint32_t num_signals_sent = 0; - Process *process = NULL; + Process *process = nullptr; if (pid == LLDB_INVALID_PROCESS_ID) { // Signal all processes with signal Index: source/Target/Thread.cpp =================================================================== --- source/Target/Thread.cpp +++ source/Target/Thread.cpp @@ -61,13 +61,13 @@ static PropertyDefinition g_properties[] = { - { "step-in-avoid-nodebug", OptionValue::eTypeBoolean, true, true, NULL, NULL, "If true, step-in will not stop in functions with no debug information." }, - { "step-out-avoid-nodebug", OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, when step-in/step-out/step-over leave the current frame, they will continue to step out till they come to a function with " + { "step-in-avoid-nodebug", OptionValue::eTypeBoolean, true, true, nullptr, nullptr, "If true, step-in will not stop in functions with no debug information." }, + { "step-out-avoid-nodebug", OptionValue::eTypeBoolean, true, false, nullptr, nullptr, "If true, when step-in/step-out/step-over leave the current frame, they will continue to step out till they come to a function with " "debug information. Passing a frame argument to step-out will override this option." }, - { "step-avoid-regexp", OptionValue::eTypeRegex , true , REG_EXTENDED, "^std::", NULL, "A regular expression defining functions step-in won't stop in." }, - { "step-avoid-libraries", OptionValue::eTypeFileSpecList , true , REG_EXTENDED, NULL, NULL, "A list of libraries that source stepping won't stop in." }, - { "trace-thread", OptionValue::eTypeBoolean, false, false, NULL, NULL, "If true, this thread will single-step and log execution." }, - { NULL , OptionValue::eTypeInvalid, false, 0 , NULL, NULL, NULL } + { "step-avoid-regexp", OptionValue::eTypeRegex , true , REG_EXTENDED, "^std::", nullptr, "A regular expression defining functions step-in won't stop in." }, + { "step-avoid-libraries", OptionValue::eTypeFileSpecList , true , REG_EXTENDED, nullptr, nullptr, "A list of libraries that source stepping won't stop in." }, + { "trace-thread", OptionValue::eTypeBoolean, false, false, nullptr, nullptr, "If true, this thread will single-step and log execution." }, + { nullptr , OptionValue::eTypeInvalid, false, 0 , nullptr, nullptr, nullptr } }; enum { @@ -137,14 +137,14 @@ ThreadProperties::GetSymbolsToAvoidRegexp() { const uint32_t idx = ePropertyStepAvoidRegex; - return m_collection_sp->GetPropertyAtIndexAsOptionValueRegex (NULL, idx); + return m_collection_sp->GetPropertyAtIndexAsOptionValueRegex (nullptr, idx); } FileSpecList & ThreadProperties::GetLibrariesToAvoid() const { const uint32_t idx = ePropertyStepAvoidLibraries; - OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList (NULL, false, idx); + OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList (nullptr, false, idx); assert(option_value); return option_value->GetCurrentValue(); } @@ -153,21 +153,21 @@ ThreadProperties::GetTraceEnabledState() const { const uint32_t idx = ePropertyEnableThreadTrace; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } bool ThreadProperties::GetStepInAvoidsNoDebug() const { const uint32_t idx = ePropertyStepInAvoidsNoDebug; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } bool ThreadProperties::GetStepOutAvoidsNoDebug() const { const uint32_t idx = ePropertyStepOutAvoidsNoDebug; - return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); + return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0); } @@ -220,7 +220,7 @@ if (event_data && event_data->GetFlavor() == ThreadEventData::GetFlavorString()) return static_cast (event_ptr->GetData()); } - return NULL; + return nullptr; } ThreadSP @@ -708,7 +708,7 @@ { need_to_resume = plan_ptr->WillResume(resume_state, true); - while ((plan_ptr = GetPreviousPlan(plan_ptr)) != NULL) + while ((plan_ptr = GetPreviousPlan(plan_ptr)) != nullptr) { plan_ptr->WillResume (resume_state, false); } @@ -837,7 +837,7 @@ // If the current plan doesn't explain the stop, then find one that // does and let it handle the situation. ThreadPlan *plan_ptr = current_plan; - while ((plan_ptr = GetPreviousPlan(plan_ptr)) != NULL) + while ((plan_ptr = GetPreviousPlan(plan_ptr)) != nullptr) { if (plan_ptr->PlanExplainsStop(event_ptr)) { @@ -922,7 +922,7 @@ PopPlan(); current_plan = GetCurrentPlan(); - if (current_plan == NULL) + if (current_plan == nullptr) { break; } @@ -1072,7 +1072,7 @@ bool Thread::MatchesSpec (const ThreadSpec *spec) { - if (spec == NULL) + if (spec == nullptr) return true; return spec->ThreadPassesBasicTests(*this); @@ -1144,7 +1144,7 @@ // There will always be at least the base plan. If somebody is mucking with a // thread with an empty plan stack, we should assert right away. if (m_plan_stack.empty()) - return NULL; + return nullptr; return m_plan_stack.back().get(); } @@ -1212,8 +1212,8 @@ ThreadPlan * Thread::GetPreviousPlan (ThreadPlan *current_plan) { - if (current_plan == NULL) - return NULL; + if (current_plan == nullptr) + return nullptr; int stack_size = m_completed_plan_stack.size(); for (int i = stack_size - 1; i > 0; i--) @@ -1227,7 +1227,7 @@ if (m_plan_stack.size() > 0) return m_plan_stack.back().get(); else - return NULL; + return nullptr; } stack_size = m_plan_stack.size(); @@ -1236,7 +1236,7 @@ if (current_plan == m_plan_stack[i].get()) return m_plan_stack[i-1].get(); } - return NULL; + return nullptr; } void @@ -1290,7 +1290,7 @@ // If the input plan is NULL, discard all plans. Otherwise make sure this plan is in the // stack, and if so discard up to and including it. - if (up_to_plan_ptr == NULL) + if (up_to_plan_ptr == nullptr) { for (int i = stack_size - 1; i > 0; i--) DiscardPlan(); @@ -1504,7 +1504,7 @@ frame_idx, step_out_avoids_code_withoug_debug_info)); - if (thread_plan_sp->ValidatePlan(NULL)) + if (thread_plan_sp->ValidatePlan(nullptr)) { QueueThreadPlan (thread_plan_sp, abort_other_plans); return thread_plan_sp; @@ -1538,7 +1538,7 @@ new_plan->ClearShouldStopHereCallbacks(); ThreadPlanSP thread_plan_sp(new_plan); - if (thread_plan_sp->ValidatePlan(NULL)) + if (thread_plan_sp->ValidatePlan(nullptr)) { QueueThreadPlan (thread_plan_sp, abort_other_plans); return thread_plan_sp; @@ -1553,7 +1553,7 @@ Thread::QueueThreadPlanForStepThrough (StackID &return_stack_id, bool abort_other_plans, bool stop_other_threads) { ThreadPlanSP thread_plan_sp(new ThreadPlanStepThrough (*this, return_stack_id, stop_other_threads)); - if (!thread_plan_sp || !thread_plan_sp->ValidatePlan (NULL)) + if (!thread_plan_sp || !thread_plan_sp->ValidatePlan (nullptr)) return ThreadPlanSP(); QueueThreadPlan (thread_plan_sp, abort_other_plans); @@ -1763,7 +1763,7 @@ // FIXME: ValueObject::Cast doesn't currently work correctly, at least not for scalars. // Turn that back on when that works. - if (0 && sc.function != NULL) + if (0 && sc.function != nullptr) { Type *function_type = sc.function->GetType(); if (function_type) @@ -1901,7 +1901,7 @@ { ExecutionContext exe_ctx (shared_from_this()); Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL) + if (process == nullptr) return; StackFrameSP frame_sp; @@ -1919,9 +1919,9 @@ const char *thread_format = exe_ctx.GetTargetRef().GetDebugger().GetThreadFormat(); assert (thread_format); Debugger::FormatPrompt (thread_format, - frame_sp ? &frame_sc : NULL, + frame_sp ? &frame_sc : nullptr, &exe_ctx, - NULL, + nullptr, strm); } @@ -2033,7 +2033,7 @@ const bool show_frame_info = true; - const char *selected_frame_marker = NULL; + const char *selected_frame_marker = nullptr; if (num_frames == 1 || (GetID() != GetProcess()->GetThreadList().GetSelectedThread()->GetID())) strm.IndentMore (); else @@ -2069,7 +2069,7 @@ Unwind * Thread::GetUnwinder () { - if (m_unwinder_ap.get() == NULL) + if (m_unwinder_ap.get() == nullptr) { const ArchSpec target_arch (CalculateTarget()->GetArchitecture ()); const llvm::Triple::ArchType machine = target_arch.GetMachine(); @@ -2148,7 +2148,7 @@ new_plan_sp = QueueThreadPlanForStepInRange (abort_other_plans, sc.line_entry.range, sc, - NULL, + nullptr, run_mode, step_in_avoids_code_without_debug_info, step_out_avoids_code_without_debug_info); @@ -2230,7 +2230,7 @@ const bool abort_other_plans = false; ThreadPlanSP new_plan_sp(QueueThreadPlanForStepOut (abort_other_plans, - NULL, + nullptr, first_instruction, stop_other_threads, eVoteYes, Index: source/Target/ThreadPlan.cpp =================================================================== --- source/Target/ThreadPlan.cpp +++ source/Target/ThreadPlan.cpp @@ -131,7 +131,7 @@ { ThreadPlan *prev_plan; prev_plan = GetPreviousPlan (); - if (prev_plan == NULL) + if (prev_plan == nullptr) return false; else return prev_plan->StopOthers(); Index: source/Target/ThreadPlanCallFunction.cpp =================================================================== --- source/Target/ThreadPlanCallFunction.cpp +++ source/Target/ThreadPlanCallFunction.cpp @@ -76,7 +76,7 @@ Module *exe_module = GetTarget().GetExecutableModulePointer(); - if (exe_module == NULL) + if (exe_module == nullptr) { m_constructor_errors.Printf ("Can't execute code without an executable module."); if (log) @@ -223,7 +223,7 @@ if (success) { ProcessSP process_sp (m_thread.GetProcess()); - const ABI *abi = process_sp ? process_sp->GetABI().get() : NULL; + const ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr; if (abi && m_return_type.IsValid()) { const bool persistent = false; @@ -314,7 +314,7 @@ // If our subplan knows why we stopped, even if it's done (which would forward the question to us) // we answer yes. - if (m_subplan_sp.get() != NULL && m_subplan_sp->PlanExplainsStop(event_ptr)) + if (m_subplan_sp.get() != nullptr && m_subplan_sp->PlanExplainsStop(event_ptr)) { SetPlanComplete(); return true; Index: source/Target/ThreadPlanRunToAddress.cpp =================================================================== --- source/Target/ThreadPlanRunToAddress.cpp +++ source/Target/ThreadPlanRunToAddress.cpp @@ -89,7 +89,7 @@ { Breakpoint *breakpoint; breakpoint = m_thread.CalculateTarget()->CreateBreakpoint (m_addresses[i], true, false).get(); - if (breakpoint != NULL) + if (breakpoint != nullptr) { m_break_ids[i] = breakpoint->GetID(); breakpoint->SetThreadID(m_thread.GetID()); Index: source/Target/ThreadPlanShouldStopHere.cpp =================================================================== --- source/Target/ThreadPlanShouldStopHere.cpp +++ source/Target/ThreadPlanShouldStopHere.cpp @@ -25,7 +25,7 @@ //---------------------------------------------------------------------- ThreadPlanShouldStopHere::ThreadPlanShouldStopHere(ThreadPlan *owner) : m_callbacks (), - m_baton (NULL), + m_baton (nullptr), m_owner (owner), m_flags (ThreadPlanShouldStopHere::eNone) { @@ -135,7 +135,7 @@ if (!return_plan_sp) return_plan_sp = current_plan->GetThread().QueueThreadPlanForStepOutNoShouldStop (false, - NULL, + nullptr, true, stop_others, eVoteNo, Index: source/Target/ThreadPlanStepInRange.cpp =================================================================== --- source/Target/ThreadPlanStepInRange.cpp +++ source/Target/ThreadPlanStepInRange.cpp @@ -310,7 +310,7 @@ void ThreadPlanStepInRange::SetAvoidRegexp(const char *name) { - if (m_avoid_regexp_ap.get() == NULL) + if (m_avoid_regexp_ap.get() == nullptr) m_avoid_regexp_ap.reset (new RegularExpression(name)); m_avoid_regexp_ap->Compile (name); @@ -355,13 +355,13 @@ return true; const RegularExpression *avoid_regexp_to_use = m_avoid_regexp_ap.get(); - if (avoid_regexp_to_use == NULL) + if (avoid_regexp_to_use == nullptr) avoid_regexp_to_use = GetThread().GetSymbolsToAvoidRegexp(); - if (avoid_regexp_to_use != NULL) + if (avoid_regexp_to_use != nullptr) { SymbolContext sc = frame->GetSymbolContext(eSymbolContextFunction|eSymbolContextBlock|eSymbolContextSymbol); - if (sc.symbol != NULL) + if (sc.symbol != nullptr) { const char *frame_function_name = sc.GetFunctionName().GetCString(); if (frame_function_name) @@ -419,7 +419,7 @@ if (step_in_range_plan->m_step_into_target) { SymbolContext sc = frame->GetSymbolContext(eSymbolContextFunction|eSymbolContextBlock|eSymbolContextSymbol); - if (sc.symbol != NULL) + if (sc.symbol != nullptr) { // First try an exact match, since that's cheap with ConstStrings. Then do a strstr compare. if (step_in_range_plan->m_step_into_target == sc.GetFunctionName()) @@ -431,9 +431,9 @@ const char *target_name = step_in_range_plan->m_step_into_target.AsCString(); const char *function_name = sc.GetFunctionName().AsCString(); - if (function_name == NULL) + if (function_name == nullptr) should_stop_here = false; - else if (strstr (function_name, target_name) == NULL) + else if (strstr (function_name, target_name) == nullptr) should_stop_here = false; } if (log && !should_stop_here) Index: source/Target/ThreadPlanStepInstruction.cpp =================================================================== --- source/Target/ThreadPlanStepInstruction.cpp +++ source/Target/ThreadPlanStepInstruction.cpp @@ -47,7 +47,7 @@ StackFrameSP m_start_frame_sp(m_thread.GetStackFrameAtIndex(0)); m_stack_id = m_start_frame_sp->GetStackID(); - m_start_has_symbol = m_start_frame_sp->GetSymbolContext(eSymbolContextSymbol).symbol != NULL; + m_start_has_symbol = m_start_frame_sp->GetSymbolContext(eSymbolContextSymbol).symbol != nullptr; StackFrameSP parent_frame_sp = m_thread.GetStackFrameAtIndex(1); if (parent_frame_sp) @@ -148,7 +148,7 @@ // run others. const bool stop_others = false; m_thread.QueueThreadPlanForStepOutNoShouldStop(false, - NULL, + nullptr, true, stop_others, eVoteNo, Index: source/Target/ThreadPlanStepOut.cpp =================================================================== --- source/Target/ThreadPlanStepOut.cpp +++ source/Target/ThreadPlanStepOut.cpp @@ -53,7 +53,7 @@ m_return_bp_id (LLDB_INVALID_BREAK_ID), m_return_addr (LLDB_INVALID_ADDRESS), m_stop_others (stop_others), - m_immediate_step_from_function(NULL) + m_immediate_step_from_function(nullptr) { SetFlagsToDefault(); @@ -82,7 +82,7 @@ // First queue a plan that gets us to this inlined frame, and when we get there we'll queue a second // plan that walks us out of this frame. m_step_out_to_inline_plan_sp.reset (new ThreadPlanStepOut(m_thread, - NULL, + nullptr, false, stop_others, eVoteNoOpinion, @@ -109,7 +109,7 @@ return; Breakpoint *return_bp = m_thread.CalculateTarget()->CreateBreakpoint (m_return_addr, true, false).get(); - if (return_bp != NULL) + if (return_bp != nullptr) { return_bp->SetThreadID(m_thread.GetID()); m_return_bp_id = return_bp->GetID(); @@ -393,7 +393,7 @@ if (current_plan) { Breakpoint *return_bp = m_thread.CalculateTarget()->GetBreakpointByID(m_return_bp_id).get(); - if (return_bp != NULL) + if (return_bp != nullptr) return_bp->SetEnabled (true); } return true; @@ -405,7 +405,7 @@ if (m_return_bp_id != LLDB_INVALID_BREAK_ID) { Breakpoint *return_bp = m_thread.CalculateTarget()->GetBreakpointByID(m_return_bp_id).get(); - if (return_bp != NULL) + if (return_bp != nullptr) return_bp->SetEnabled (false); } @@ -510,7 +510,7 @@ if (m_return_valobj_sp) return; - if (m_immediate_step_from_function != NULL) + if (m_immediate_step_from_function != nullptr) { ClangASTType return_clang_type = m_immediate_step_from_function->GetClangType().GetFunctionReturnType(); if (return_clang_type) Index: source/Target/ThreadPlanStepOverRange.cpp =================================================================== --- source/Target/ThreadPlanStepOverRange.cpp +++ source/Target/ThreadPlanStepOverRange.cpp @@ -174,7 +174,7 @@ if (IsEquivalentContext(older_context)) { new_plan_sp = m_thread.QueueThreadPlanForStepOutNoShouldStop (false, - NULL, + nullptr, true, stop_others, eVoteNo, Index: source/Target/ThreadPlanStepRange.cpp =================================================================== --- source/Target/ThreadPlanStepRange.cpp +++ source/Target/ThreadPlanStepRange.cpp @@ -235,7 +235,7 @@ ThreadPlanStepRange::InSymbol() { lldb::addr_t cur_pc = m_thread.GetRegisterContext()->GetPC(); - if (m_addr_context.function != NULL) + if (m_addr_context.function != nullptr) { return m_addr_context.function->GetAddressRange().ContainsLoadAddress (cur_pc, m_thread.CalculateTarget().get()); } @@ -295,14 +295,14 @@ { // Some joker added a zero size range to the stepping range... if (m_address_ranges[i].GetByteSize() == 0) - return NULL; + return nullptr; if (!m_instruction_ranges[i]) { //Disassemble the address range given: ExecutionContext exe_ctx (m_thread.GetProcess()); - const char *plugin_name = NULL; - const char *flavor = NULL; + const char *plugin_name = nullptr; + const char *flavor = nullptr; const bool prefer_file_cache = true; m_instruction_ranges[i] = Disassembler::DisassembleRange(GetTarget().GetArchitecture(), plugin_name, @@ -313,7 +313,7 @@ } if (!m_instruction_ranges[i]) - return NULL; + return nullptr; else { // Find where we are in the instruction list as well. If we aren't at an instruction, @@ -321,7 +321,7 @@ insn_offset = m_instruction_ranges[i]->GetInstructionList().GetIndexOfInstructionAtLoadAddress(addr, GetTarget()); if (insn_offset == UINT32_MAX) - return NULL; + return nullptr; else { range_index = i; @@ -330,7 +330,7 @@ } } } - return NULL; + return nullptr; } void @@ -363,7 +363,7 @@ size_t pc_index; size_t range_index; InstructionList *instructions = GetInstructionsForAddress (cur_addr, range_index, pc_index); - if (instructions == NULL) + if (instructions == nullptr) return false; else { Index: source/Target/ThreadPlanStepThrough.cpp =================================================================== --- source/Target/ThreadPlanStepThrough.cpp +++ source/Target/ThreadPlanStepThrough.cpp @@ -57,7 +57,7 @@ { m_backstop_addr = return_frame_sp->GetFrameCodeAddress().GetLoadAddress(m_thread.CalculateTarget().get()); Breakpoint *return_bp = m_thread.GetProcess()->GetTarget().CreateBreakpoint (m_backstop_addr, true, false).get(); - if (return_bp != NULL) + if (return_bp != nullptr) { return_bp->SetThreadID(m_thread.GetID()); m_backstop_bkpt_id = return_bp->GetID(); @@ -135,7 +135,7 @@ bool ThreadPlanStepThrough::ValidatePlan (Stream *error) { - return m_sub_plan_sp.get() != NULL; + return m_sub_plan_sp.get() != nullptr; } bool Index: source/Target/ThreadPlanStepUntil.cpp =================================================================== --- source/Target/ThreadPlanStepUntil.cpp +++ source/Target/ThreadPlanStepUntil.cpp @@ -69,7 +69,7 @@ // TODO: add inline functionality m_return_addr = return_frame_sp->GetStackID().GetPC(); Breakpoint *return_bp = target_sp->CreateBreakpoint (m_return_addr, true, false).get(); - if (return_bp != NULL) + if (return_bp != nullptr) { return_bp->SetThreadID(thread_id); m_return_bp_id = return_bp->GetID(); @@ -83,7 +83,7 @@ for (size_t i = 0; i < num_addresses; i++) { Breakpoint *until_bp = target_sp->CreateBreakpoint (address_list[i], true, false).get(); - if (until_bp != NULL) + if (until_bp != nullptr) { until_bp->SetThreadID(thread_id); m_until_points[address_list[i]] = until_bp->GetID(); @@ -349,14 +349,14 @@ if (target_sp) { Breakpoint *return_bp = target_sp->GetBreakpointByID(m_return_bp_id).get(); - if (return_bp != NULL) + if (return_bp != nullptr) return_bp->SetEnabled (true); until_collection::iterator pos, end = m_until_points.end(); for (pos = m_until_points.begin(); pos != end; pos++) { Breakpoint *until_bp = target_sp->GetBreakpointByID((*pos).second).get(); - if (until_bp != NULL) + if (until_bp != nullptr) until_bp->SetEnabled (true); } } @@ -375,14 +375,14 @@ if (target_sp) { Breakpoint *return_bp = target_sp->GetBreakpointByID(m_return_bp_id).get(); - if (return_bp != NULL) + if (return_bp != nullptr) return_bp->SetEnabled (false); until_collection::iterator pos, end = m_until_points.end(); for (pos = m_until_points.begin(); pos != end; pos++) { Breakpoint *until_bp = target_sp->GetBreakpointByID((*pos).second).get(); - if (until_bp != NULL) + if (until_bp != nullptr) until_bp->SetEnabled (false); } } Index: source/Target/ThreadPlanTracer.cpp =================================================================== --- source/Target/ThreadPlanTracer.cpp +++ source/Target/ThreadPlanTracer.cpp @@ -65,7 +65,7 @@ if (target_sp) return target_sp->GetDebugger().GetOutputFile().get(); } - return NULL; + return nullptr; } void @@ -121,8 +121,8 @@ Disassembler * ThreadPlanAssemblyTracer::GetDisassembler () { - if (m_disassembler_sp.get() == NULL) - m_disassembler_sp = Disassembler::FindPlugin(m_thread.GetProcess()->GetTarget().GetArchitecture(), NULL, NULL); + if (m_disassembler_sp.get() == nullptr) + m_disassembler_sp = Disassembler::FindPlugin(m_thread.GetProcess()->GetTarget().GetArchitecture(), nullptr, nullptr); return m_disassembler_sp.get(); } @@ -216,7 +216,7 @@ max_opcode_byte_size, show_address, show_bytes, - NULL); + nullptr); } } } Index: source/Target/ThreadSpec.cpp =================================================================== --- source/Target/ThreadSpec.cpp +++ source/Target/ThreadSpec.cpp @@ -43,7 +43,7 @@ ThreadSpec::GetName () const { if (m_name.empty()) - return NULL; + return nullptr; else return m_name.c_str(); } @@ -52,7 +52,7 @@ ThreadSpec::GetQueueName () const { if (m_queue_name.empty()) - return NULL; + return nullptr; else return m_queue_name.c_str(); } Index: source/Target/UnixSignals.cpp =================================================================== --- source/Target/UnixSignals.cpp +++ source/Target/UnixSignals.cpp @@ -123,7 +123,7 @@ { collection::const_iterator pos = m_signals.find (signo); if (pos == m_signals.end()) - return NULL; + return nullptr; else return pos->second.m_name.GetCString (); } @@ -191,7 +191,7 @@ { collection::const_iterator pos = m_signals.find (signo); if (pos == m_signals.end()) - return NULL; + return nullptr; else { const Signal &signal = pos->second; Index: source/Target/UnwindAssembly.cpp =================================================================== --- source/Target/UnwindAssembly.cpp +++ source/Target/UnwindAssembly.cpp @@ -21,14 +21,14 @@ UnwindAssemblyCreateInstance create_callback; for (uint32_t idx = 0; - (create_callback = PluginManager::GetUnwindAssemblyCreateCallbackAtIndex(idx)) != NULL; + (create_callback = PluginManager::GetUnwindAssemblyCreateCallbackAtIndex(idx)) != nullptr; ++idx) { UnwindAssemblySP assembly_profiler_ap (create_callback (arch)); if (assembly_profiler_ap.get ()) return assembly_profiler_ap; } - return NULL; + return nullptr; } UnwindAssembly::UnwindAssembly (const ArchSpec &arch) : Index: source/lldb-log.cpp =================================================================== --- source/lldb-log.cpp +++ source/lldb-log.cpp @@ -28,12 +28,12 @@ // called. static bool g_log_enabled = false; -static Log * g_log = NULL; +static Log * g_log = nullptr; static Log * GetLog () { if (!g_log_enabled) - return NULL; + return nullptr; return g_log; } @@ -61,7 +61,7 @@ { uint32_t log_mask = log->GetMask().Get(); if ((log_mask & mask) != mask) - return NULL; + return nullptr; } return log; } @@ -98,7 +98,7 @@ Log *log(GetLog ()); if (log && mask && (mask & log->GetMask().Get())) return log; - return NULL; + return nullptr; } void @@ -109,10 +109,10 @@ if (log) { uint32_t flag_bits = 0; - if (categories[0] != NULL) + if (categories[0] != nullptr) { flag_bits = log->GetMask().Get(); - for (size_t i = 0; categories[i] != NULL; ++i) + for (size_t i = 0; categories[i] != nullptr; ++i) { const char *arg = categories[i]; @@ -188,7 +188,7 @@ if (g_log) { - for (size_t i=0; categories[i] != NULL; ++i) + for (size_t i=0; categories[i] != nullptr; ++i) { const char *arg = categories[i];