|
|
|||
File indexing completed on 2026-05-10 08:42:43
0001 //===-- SBValueList.h -------------------------------------------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLDB_API_SBVALUELIST_H 0010 #define LLDB_API_SBVALUELIST_H 0011 0012 #include "lldb/API/SBDefines.h" 0013 0014 class ValueListImpl; 0015 0016 namespace lldb { 0017 0018 class LLDB_API SBValueList { 0019 public: 0020 SBValueList(); 0021 0022 SBValueList(const lldb::SBValueList &rhs); 0023 0024 ~SBValueList(); 0025 0026 explicit operator bool() const; 0027 0028 bool IsValid() const; 0029 0030 void Clear(); 0031 0032 void Append(const lldb::SBValue &val_obj); 0033 0034 void Append(const lldb::SBValueList &value_list); 0035 0036 uint32_t GetSize() const; 0037 0038 lldb::SBValue GetValueAtIndex(uint32_t idx) const; 0039 0040 lldb::SBValue GetFirstValueByName(const char *name) const; 0041 0042 lldb::SBValue FindValueObjectByUID(lldb::user_id_t uid); 0043 0044 const lldb::SBValueList &operator=(const lldb::SBValueList &rhs); 0045 0046 // Get an error for why this list is empty. 0047 // 0048 // If this list is empty, check for an underlying error in the debug 0049 // information that prevented this list from being populated. This is not 0050 // meant to return an error if there is no debug information as it is ok for a 0051 // value list to be empty and no error should be returned in that case. If the 0052 // debug info is for an assembly file or language that doesn't have any 0053 // variables, no error should be returned. 0054 // 0055 // This is designed as a way to let users know when they enable certain 0056 // compiler options that enable debug information but provide a degraded 0057 // debug information content, like -gline-tables-only, which is a compiler 0058 // option that allows users to set file and line breakpoints, but users get 0059 // confused when no variables show up during debugging. 0060 // 0061 // It is also designed to inform a user that debug information might be 0062 // available if an external file, like a .dwo file, but that file doesn't 0063 // exist or wasn't able to be loaded due to a mismatched ID. When debugging 0064 // with fission enabled, the line tables are linked into the main executable, 0065 // but if the .dwo or .dwp files are not available or have been modified, 0066 // users can get confused if they can stop at a file and line breakpoint but 0067 // can't see variables in this case. 0068 // 0069 // This error can give vital clues to the user about the cause is and allow 0070 // the user to fix the issue. 0071 lldb::SBError GetError(); 0072 0073 protected: 0074 // only useful for visualizing the pointer or comparing two SBValueLists to 0075 // see if they are backed by the same underlying Impl. 0076 void *opaque_ptr(); 0077 0078 private: 0079 friend class SBFrame; 0080 0081 SBValueList(const ValueListImpl *lldb_object_ptr); 0082 0083 void Append(lldb::ValueObjectSP &val_obj_sp); 0084 0085 void CreateIfNeeded(); 0086 0087 ValueListImpl *operator->(); 0088 0089 ValueListImpl &operator*(); 0090 0091 const ValueListImpl *operator->() const; 0092 0093 const ValueListImpl &operator*() const; 0094 0095 ValueListImpl &ref(); 0096 0097 std::unique_ptr<ValueListImpl> m_opaque_up; 0098 0099 void SetError(lldb_private::Status &&status); 0100 }; 0101 0102 } // namespace lldb 0103 0104 #endif // LLDB_API_SBVALUELIST_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|