Johnny Chen | 9a5b16b | 2011-07-18 19:15:22 +0000 | [diff] [blame] | 1 | //===-- SWIG Interface for SBValue ------------------------------*- C++ -*-===// |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | namespace lldb { |
| 11 | |
| 12 | %feature("docstring", |
| 13 | "Represents the value of a variable, a register, or an expression. |
| 14 | |
| 15 | SBValue supports iteration through its child, which in turn is represented |
| 16 | as an SBValue. For example, we can get the general purpose registers of a |
| 17 | frame as an SBValue, and iterate through all the registers, |
| 18 | |
| 19 | registerSet = frame.GetRegisters() # Returns an SBValueList. |
| 20 | for regs in registerSet: |
| 21 | if 'general purpose registers' in regs.getName().lower(): |
| 22 | GPRs = regs |
| 23 | break |
| 24 | |
| 25 | print '%s (number of children = %d):' % (GPRs.GetName(), GPRs.GetNumChildren()) |
| 26 | for reg in GPRs: |
| 27 | print 'Name: ', reg.GetName(), ' Value: ', reg.GetValue() |
| 28 | |
| 29 | produces the output: |
| 30 | |
| 31 | General Purpose Registers (number of children = 21): |
| 32 | Name: rax Value: 0x0000000100000c5c |
| 33 | Name: rbx Value: 0x0000000000000000 |
| 34 | Name: rcx Value: 0x00007fff5fbffec0 |
| 35 | Name: rdx Value: 0x00007fff5fbffeb8 |
| 36 | Name: rdi Value: 0x0000000000000001 |
| 37 | Name: rsi Value: 0x00007fff5fbffea8 |
| 38 | Name: rbp Value: 0x00007fff5fbffe80 |
| 39 | Name: rsp Value: 0x00007fff5fbffe60 |
| 40 | Name: r8 Value: 0x0000000008668682 |
| 41 | Name: r9 Value: 0x0000000000000000 |
| 42 | Name: r10 Value: 0x0000000000001200 |
| 43 | Name: r11 Value: 0x0000000000000206 |
| 44 | Name: r12 Value: 0x0000000000000000 |
| 45 | Name: r13 Value: 0x0000000000000000 |
| 46 | Name: r14 Value: 0x0000000000000000 |
| 47 | Name: r15 Value: 0x0000000000000000 |
| 48 | Name: rip Value: 0x0000000100000dae |
| 49 | Name: rflags Value: 0x0000000000000206 |
| 50 | Name: cs Value: 0x0000000000000027 |
| 51 | Name: fs Value: 0x0000000000000010 |
Johnny Chen | a4bc3a7 | 2011-07-25 23:41:08 +0000 | [diff] [blame] | 52 | Name: gs Value: 0x0000000000000048 |
| 53 | |
| 54 | See also linked_list_iter() for another perspective on how to iterate through an |
| 55 | SBValue instance which interprets the value object as representing the head of a |
| 56 | linked list." |
Johnny Chen | 357033b | 2011-07-18 20:13:38 +0000 | [diff] [blame] | 57 | ) SBValue; |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 58 | class SBValue |
| 59 | { |
| 60 | public: |
| 61 | SBValue (); |
| 62 | |
| 63 | SBValue (const SBValue &rhs); |
| 64 | |
| 65 | ~SBValue (); |
| 66 | |
| 67 | bool |
Greg Clayton | bf2331c | 2011-09-09 23:04:00 +0000 | [diff] [blame] | 68 | IsValid(); |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 69 | |
Jim Ingham | 5d3bca4 | 2011-12-19 20:39:44 +0000 | [diff] [blame] | 70 | void |
| 71 | Clear(); |
| 72 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 73 | SBError |
| 74 | GetError(); |
| 75 | |
| 76 | lldb::user_id_t |
| 77 | GetID (); |
| 78 | |
| 79 | const char * |
| 80 | GetName(); |
| 81 | |
| 82 | const char * |
| 83 | GetTypeName (); |
Enrico Granata | e8daa2f | 2014-05-17 19:14:17 +0000 | [diff] [blame] | 84 | |
| 85 | const char * |
| 86 | GetDisplayTypeName (); |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 87 | |
| 88 | size_t |
| 89 | GetByteSize (); |
| 90 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 91 | bool |
| 92 | IsInScope (); |
| 93 | |
| 94 | lldb::Format |
Greg Clayton | bf2331c | 2011-09-09 23:04:00 +0000 | [diff] [blame] | 95 | GetFormat (); |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 96 | |
| 97 | void |
| 98 | SetFormat (lldb::Format format); |
| 99 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 100 | const char * |
| 101 | GetValue (); |
| 102 | |
Greg Clayton | fe42ac4 | 2011-08-03 22:57:10 +0000 | [diff] [blame] | 103 | int64_t |
Enrico Granata | 6fd87d5 | 2011-08-04 01:41:02 +0000 | [diff] [blame] | 104 | GetValueAsSigned(SBError& error, int64_t fail_value=0); |
Greg Clayton | fe42ac4 | 2011-08-03 22:57:10 +0000 | [diff] [blame] | 105 | |
| 106 | uint64_t |
Enrico Granata | 6fd87d5 | 2011-08-04 01:41:02 +0000 | [diff] [blame] | 107 | GetValueAsUnsigned(SBError& error, uint64_t fail_value=0); |
| 108 | |
| 109 | int64_t |
| 110 | GetValueAsSigned(int64_t fail_value=0); |
| 111 | |
| 112 | uint64_t |
Greg Clayton | fe42ac4 | 2011-08-03 22:57:10 +0000 | [diff] [blame] | 113 | GetValueAsUnsigned(uint64_t fail_value=0); |
| 114 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 115 | ValueType |
| 116 | GetValueType (); |
| 117 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 118 | bool |
| 119 | GetValueDidChange (); |
| 120 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 121 | const char * |
| 122 | GetSummary (); |
| 123 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 124 | const char * |
Enrico Granata | 49bfafb | 2014-11-18 23:36:25 +0000 | [diff] [blame] | 125 | GetSummary (lldb::SBStream& stream, |
| 126 | lldb::SBTypeSummaryOptions& options); |
Enrico Granata | c1247f5 | 2014-11-06 21:23:20 +0000 | [diff] [blame] | 127 | |
| 128 | const char * |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 129 | GetObjectDescription (); |
Enrico Granata | edc4414 | 2014-09-06 01:30:04 +0000 | [diff] [blame] | 130 | |
| 131 | const char * |
| 132 | GetTypeValidatorResult (); |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 133 | |
Jim Ingham | 60dbabb | 2011-12-08 19:44:08 +0000 | [diff] [blame] | 134 | lldb::SBValue |
| 135 | GetDynamicValue (lldb::DynamicValueType use_dynamic); |
| 136 | |
| 137 | lldb::SBValue |
| 138 | GetStaticValue (); |
| 139 | |
Enrico Granata | c5bc412 | 2012-03-27 02:35:13 +0000 | [diff] [blame] | 140 | lldb::SBValue |
| 141 | GetNonSyntheticValue (); |
Enrico Granata | e3e9151 | 2012-10-22 18:18:36 +0000 | [diff] [blame] | 142 | |
| 143 | lldb::DynamicValueType |
| 144 | GetPreferDynamicValue (); |
| 145 | |
| 146 | void |
| 147 | SetPreferDynamicValue (lldb::DynamicValueType use_dynamic); |
| 148 | |
| 149 | bool |
| 150 | GetPreferSyntheticValue (); |
| 151 | |
| 152 | void |
| 153 | SetPreferSyntheticValue (bool use_synthetic); |
Enrico Granata | c5bc412 | 2012-03-27 02:35:13 +0000 | [diff] [blame] | 154 | |
Jim Ingham | 60dbabb | 2011-12-08 19:44:08 +0000 | [diff] [blame] | 155 | bool |
| 156 | IsDynamic(); |
Enrico Granata | e3e9151 | 2012-10-22 18:18:36 +0000 | [diff] [blame] | 157 | |
| 158 | bool |
| 159 | IsSynthetic (); |
Jim Ingham | 60dbabb | 2011-12-08 19:44:08 +0000 | [diff] [blame] | 160 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 161 | const char * |
| 162 | GetLocation (); |
| 163 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 164 | bool |
| 165 | SetValueFromCString (const char *value_str); |
| 166 | |
Enrico Granata | 07a4ac2 | 2012-05-08 21:25:06 +0000 | [diff] [blame] | 167 | bool |
| 168 | SetValueFromCString (const char *value_str, lldb::SBError& error); |
| 169 | |
Enrico Granata | 864e3e8 | 2012-02-17 03:18:30 +0000 | [diff] [blame] | 170 | lldb::SBTypeFormat |
| 171 | GetTypeFormat (); |
| 172 | |
| 173 | lldb::SBTypeSummary |
| 174 | GetTypeSummary (); |
| 175 | |
| 176 | lldb::SBTypeFilter |
| 177 | GetTypeFilter (); |
| 178 | |
| 179 | lldb::SBTypeSynthetic |
| 180 | GetTypeSynthetic (); |
| 181 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 182 | lldb::SBValue |
| 183 | GetChildAtIndex (uint32_t idx); |
| 184 | |
| 185 | %feature("docstring", " |
| 186 | //------------------------------------------------------------------ |
| 187 | /// Get a child value by index from a value. |
| 188 | /// |
Bruce Mitchener | d93c4a3 | 2014-07-01 21:22:11 +0000 | [diff] [blame] | 189 | /// Structs, unions, classes, arrays and pointers have child |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 190 | /// values that can be access by index. |
| 191 | /// |
| 192 | /// Structs and unions access child members using a zero based index |
| 193 | /// for each child member. For |
| 194 | /// |
| 195 | /// Classes reserve the first indexes for base classes that have |
| 196 | /// members (empty base classes are omitted), and all members of the |
| 197 | /// current class will then follow the base classes. |
| 198 | /// |
| 199 | /// Pointers differ depending on what they point to. If the pointer |
| 200 | /// points to a simple type, the child at index zero |
| 201 | /// is the only child value available, unless \a synthetic_allowed |
| 202 | /// is \b true, in which case the pointer will be used as an array |
| 203 | /// and can create 'synthetic' child values using positive or |
| 204 | /// negative indexes. If the pointer points to an aggregate type |
| 205 | /// (an array, class, union, struct), then the pointee is |
| 206 | /// transparently skipped and any children are going to be the indexes |
| 207 | /// of the child values within the aggregate type. For example if |
| 208 | /// we have a 'Point' type and we have a SBValue that contains a |
| 209 | /// pointer to a 'Point' type, then the child at index zero will be |
| 210 | /// the 'x' member, and the child at index 1 will be the 'y' member |
| 211 | /// (the child at index zero won't be a 'Point' instance). |
| 212 | /// |
| 213 | /// Arrays have a preset number of children that can be accessed by |
| 214 | /// index and will returns invalid child values for indexes that are |
| 215 | /// out of bounds unless the \a synthetic_allowed is \b true. In this |
| 216 | /// case the array can create 'synthetic' child values for indexes |
| 217 | /// that aren't in the array bounds using positive or negative |
| 218 | /// indexes. |
| 219 | /// |
| 220 | /// @param[in] idx |
| 221 | /// The index of the child value to get |
| 222 | /// |
| 223 | /// @param[in] use_dynamic |
Bruce Mitchener | d93c4a3 | 2014-07-01 21:22:11 +0000 | [diff] [blame] | 224 | /// An enumeration that specifies whether to get dynamic values, |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 225 | /// and also if the target can be run to figure out the dynamic |
| 226 | /// type of the child value. |
| 227 | /// |
| 228 | /// @param[in] synthetic_allowed |
| 229 | /// If \b true, then allow child values to be created by index |
| 230 | /// for pointers and arrays for indexes that normally wouldn't |
| 231 | /// be allowed. |
| 232 | /// |
| 233 | /// @return |
| 234 | /// A new SBValue object that represents the child member value. |
| 235 | //------------------------------------------------------------------ |
| 236 | ") GetChildAtIndex; |
| 237 | lldb::SBValue |
| 238 | GetChildAtIndex (uint32_t idx, |
| 239 | lldb::DynamicValueType use_dynamic, |
| 240 | bool can_create_synthetic); |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 241 | |
| 242 | lldb::SBValue |
Greg Clayton | bf2331c | 2011-09-09 23:04:00 +0000 | [diff] [blame] | 243 | CreateChildAtOffset (const char *name, uint32_t offset, lldb::SBType type); |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 244 | |
| 245 | lldb::SBValue |
Greg Clayton | bf2331c | 2011-09-09 23:04:00 +0000 | [diff] [blame] | 246 | SBValue::Cast (lldb::SBType type); |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 247 | |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 248 | lldb::SBValue |
| 249 | CreateValueFromExpression (const char *name, const char* expression); |
Jim Ingham | 35e1bda | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 250 | |
| 251 | lldb::SBValue |
| 252 | CreateValueFromExpression (const char *name, const char* expression, SBExpressionOptions &options); |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 253 | |
| 254 | lldb::SBValue |
Greg Clayton | bf2331c | 2011-09-09 23:04:00 +0000 | [diff] [blame] | 255 | CreateValueFromAddress(const char* name, lldb::addr_t address, lldb::SBType type); |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 256 | |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 257 | lldb::SBValue |
| 258 | CreateValueFromData (const char* name, |
Greg Clayton | bf2331c | 2011-09-09 23:04:00 +0000 | [diff] [blame] | 259 | lldb::SBData data, |
| 260 | lldb::SBType type); |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 261 | |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 262 | lldb::SBType |
| 263 | GetType(); |
| 264 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 265 | %feature("docstring", " |
| 266 | //------------------------------------------------------------------ |
| 267 | /// Returns the child member index. |
| 268 | /// |
| 269 | /// Matches children of this object only and will match base classes and |
| 270 | /// member names if this is a clang typed object. |
| 271 | /// |
| 272 | /// @param[in] name |
| 273 | /// The name of the child value to get |
| 274 | /// |
| 275 | /// @return |
| 276 | /// An index to the child member value. |
| 277 | //------------------------------------------------------------------ |
| 278 | ") GetIndexOfChildWithName; |
| 279 | uint32_t |
| 280 | GetIndexOfChildWithName (const char *name); |
| 281 | |
| 282 | lldb::SBValue |
| 283 | GetChildMemberWithName (const char *name); |
| 284 | |
| 285 | %feature("docstring", " |
| 286 | //------------------------------------------------------------------ |
| 287 | /// Returns the child member value. |
| 288 | /// |
| 289 | /// Matches child members of this object and child members of any base |
| 290 | /// classes. |
| 291 | /// |
| 292 | /// @param[in] name |
| 293 | /// The name of the child value to get |
| 294 | /// |
| 295 | /// @param[in] use_dynamic |
Bruce Mitchener | d93c4a3 | 2014-07-01 21:22:11 +0000 | [diff] [blame] | 296 | /// An enumeration that specifies whether to get dynamic values, |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 297 | /// and also if the target can be run to figure out the dynamic |
| 298 | /// type of the child value. |
| 299 | /// |
| 300 | /// @return |
| 301 | /// A new SBValue object that represents the child member value. |
| 302 | //------------------------------------------------------------------ |
| 303 | ") GetChildMemberWithName; |
| 304 | lldb::SBValue |
| 305 | GetChildMemberWithName (const char *name, lldb::DynamicValueType use_dynamic); |
| 306 | |
| 307 | %feature("docstring", "Expands nested expressions like .a->b[0].c[1]->d." |
| 308 | ) GetValueForExpressionPath; |
| 309 | lldb::SBValue |
| 310 | GetValueForExpressionPath(const char* expr_path); |
| 311 | |
Enrico Granata | 10de090 | 2012-10-10 22:54:17 +0000 | [diff] [blame] | 312 | lldb::SBDeclaration |
| 313 | GetDeclaration (); |
| 314 | |
Greg Clayton | 4a79207 | 2012-10-23 01:50:10 +0000 | [diff] [blame] | 315 | bool |
| 316 | MightHaveChildren (); |
| 317 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 318 | uint32_t |
| 319 | GetNumChildren (); |
| 320 | |
| 321 | void * |
| 322 | GetOpaqueType(); |
| 323 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 324 | lldb::SBValue |
| 325 | Dereference (); |
| 326 | |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 327 | lldb::SBValue |
| 328 | AddressOf(); |
| 329 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 330 | bool |
| 331 | TypeIsPointerType (); |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 332 | |
| 333 | lldb::SBTarget |
| 334 | GetTarget(); |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 335 | |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 336 | lldb::SBProcess |
| 337 | GetProcess(); |
| 338 | |
| 339 | lldb::SBThread |
| 340 | GetThread(); |
| 341 | |
| 342 | lldb::SBFrame |
| 343 | GetFrame(); |
| 344 | |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 345 | %feature("docstring", " |
| 346 | /// Find and watch a variable. |
| 347 | /// It returns an SBWatchpoint, which may be invalid. |
| 348 | ") Watch; |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 349 | lldb::SBWatchpoint |
Johnny Chen | b90827e | 2012-06-04 23:19:54 +0000 | [diff] [blame] | 350 | Watch (bool resolve_location, bool read, bool write, SBError &error); |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 351 | |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 352 | %feature("docstring", " |
| 353 | /// Find and watch the location pointed to by a variable. |
| 354 | /// It returns an SBWatchpoint, which may be invalid. |
| 355 | ") WatchPointee; |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 356 | lldb::SBWatchpoint |
Johnny Chen | b90827e | 2012-06-04 23:19:54 +0000 | [diff] [blame] | 357 | WatchPointee (bool resolve_location, bool read, bool write, SBError &error); |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 358 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 359 | bool |
| 360 | GetDescription (lldb::SBStream &description); |
| 361 | |
| 362 | bool |
| 363 | GetExpressionPath (lldb::SBStream &description); |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 364 | |
| 365 | %feature("docstring", " |
| 366 | //------------------------------------------------------------------ |
| 367 | /// Get an SBData wrapping what this SBValue points to. |
| 368 | /// |
| 369 | /// This method will dereference the current SBValue, if its |
| 370 | /// data type is a T* or T[], and extract item_count elements |
| 371 | /// of type T from it, copying their contents in an SBData. |
| 372 | /// |
| 373 | /// @param[in] item_idx |
| 374 | /// The index of the first item to retrieve. For an array |
| 375 | /// this is equivalent to array[item_idx], for a pointer |
| 376 | /// to *(pointer + item_idx). In either case, the measurement |
| 377 | /// unit for item_idx is the sizeof(T) rather than the byte |
| 378 | /// |
| 379 | /// @param[in] item_count |
| 380 | /// How many items should be copied into the output. By default |
| 381 | /// only one item is copied, but more can be asked for. |
| 382 | /// |
| 383 | /// @return |
| 384 | /// An SBData with the contents of the copied items, on success. |
| 385 | /// An empty SBData otherwise. |
| 386 | //------------------------------------------------------------------ |
| 387 | ") GetPointeeData; |
| 388 | lldb::SBData |
| 389 | GetPointeeData (uint32_t item_idx = 0, |
| 390 | uint32_t item_count = 1); |
| 391 | |
| 392 | %feature("docstring", " |
| 393 | //------------------------------------------------------------------ |
| 394 | /// Get an SBData wrapping the contents of this SBValue. |
| 395 | /// |
| 396 | /// This method will read the contents of this object in memory |
| 397 | /// and copy them into an SBData for future use. |
| 398 | /// |
| 399 | /// @return |
| 400 | /// An SBData with the contents of this SBValue, on success. |
| 401 | /// An empty SBData otherwise. |
| 402 | //------------------------------------------------------------------ |
| 403 | ") GetData; |
| 404 | lldb::SBData |
| 405 | GetData (); |
Sean Callanan | d3f9968 | 2013-04-13 01:28:33 +0000 | [diff] [blame] | 406 | |
| 407 | bool |
| 408 | SetData (lldb::SBData &data, lldb::SBError& error); |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 409 | |
| 410 | lldb::addr_t |
| 411 | GetLoadAddress(); |
| 412 | |
| 413 | lldb::SBAddress |
| 414 | GetAddress(); |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 415 | |
Enrico Granata | 0c10a85 | 2014-12-08 23:13:56 +0000 | [diff] [blame^] | 416 | lldb::SBValue |
| 417 | Persist (); |
| 418 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 419 | %feature("docstring", "Returns an expression path for this value." |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 420 | ) GetExpressionPath; |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 421 | bool |
| 422 | GetExpressionPath (lldb::SBStream &description, bool qualify_cxx_base_classes); |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 423 | |
| 424 | %pythoncode %{ |
Greg Clayton | 851eacb | 2012-04-11 16:20:15 +0000 | [diff] [blame] | 425 | def __get_dynamic__ (self): |
| 426 | '''Helper function for the "SBValue.dynamic" property.''' |
| 427 | return self.GetDynamicValue (eDynamicCanRunTarget) |
| 428 | |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 429 | __swig_getmethods__["name"] = GetName |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 430 | if _newclass: name = property(GetName, None, doc='''A read only property that returns the name of this value as a string.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 431 | |
| 432 | __swig_getmethods__["type"] = GetType |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 433 | if _newclass: type = property(GetType, None, doc='''A read only property that returns a lldb.SBType object that represents the type for this value.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 434 | |
| 435 | __swig_getmethods__["size"] = GetByteSize |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 436 | if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes of this value.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 437 | |
| 438 | __swig_getmethods__["is_in_scope"] = IsInScope |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 439 | if _newclass: is_in_scope = property(IsInScope, None, doc='''A read only property that returns a boolean value that indicates whether this value is currently lexically in scope.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 440 | |
| 441 | __swig_getmethods__["format"] = GetFormat |
| 442 | __swig_setmethods__["format"] = SetFormat |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 443 | if _newclass: format = property(GetName, SetFormat, doc='''A read/write property that gets/sets the format used for lldb.SBValue().GetValue() for this value. See enumerations that start with "lldb.eFormat".''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 444 | |
| 445 | __swig_getmethods__["value"] = GetValue |
| 446 | __swig_setmethods__["value"] = SetValueFromCString |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 447 | if _newclass: value = property(GetValue, SetValueFromCString, doc='''A read/write property that gets/sets value from a string.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 448 | |
| 449 | __swig_getmethods__["value_type"] = GetValueType |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 450 | if _newclass: value_type = property(GetValueType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eValueType") that represents the type of this value (local, argument, global, register, etc.).''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 451 | |
| 452 | __swig_getmethods__["changed"] = GetValueDidChange |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 453 | if _newclass: changed = property(GetValueDidChange, None, doc='''A read only property that returns a boolean value that indicates if this value has changed since it was last updated.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 454 | |
| 455 | __swig_getmethods__["data"] = GetData |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 456 | if _newclass: data = property(GetData, None, doc='''A read only property that returns an lldb object (lldb.SBData) that represents the bytes that make up the value for this object.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 457 | |
| 458 | __swig_getmethods__["load_addr"] = GetLoadAddress |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 459 | if _newclass: load_addr = property(GetLoadAddress, None, doc='''A read only property that returns the load address of this value as an integer.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 460 | |
| 461 | __swig_getmethods__["addr"] = GetAddress |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 462 | if _newclass: addr = property(GetAddress, None, doc='''A read only property that returns an lldb.SBAddress that represents the address of this value if it is in memory.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 463 | |
| 464 | __swig_getmethods__["deref"] = Dereference |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 465 | if _newclass: deref = property(Dereference, None, doc='''A read only property that returns an lldb.SBValue that is created by dereferencing this value.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 466 | |
| 467 | __swig_getmethods__["address_of"] = AddressOf |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 468 | if _newclass: address_of = property(AddressOf, None, doc='''A read only property that returns an lldb.SBValue that represents the address-of this value.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 469 | |
| 470 | __swig_getmethods__["error"] = GetError |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 471 | if _newclass: error = property(GetError, None, doc='''A read only property that returns the lldb.SBError that represents the error from the last time the variable value was calculated.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 472 | |
| 473 | __swig_getmethods__["summary"] = GetSummary |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 474 | if _newclass: summary = property(GetSummary, None, doc='''A read only property that returns the summary for this value as a string''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 475 | |
| 476 | __swig_getmethods__["description"] = GetObjectDescription |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 477 | if _newclass: description = property(GetObjectDescription, None, doc='''A read only property that returns the language-specific description of this value as a string''') |
Greg Clayton | 851eacb | 2012-04-11 16:20:15 +0000 | [diff] [blame] | 478 | |
| 479 | __swig_getmethods__["dynamic"] = __get_dynamic__ |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 480 | if _newclass: dynamic = property(__get_dynamic__, None, doc='''A read only property that returns an lldb.SBValue that is created by finding the dynamic type of this value.''') |
Greg Clayton | 851eacb | 2012-04-11 16:20:15 +0000 | [diff] [blame] | 481 | |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 482 | __swig_getmethods__["location"] = GetLocation |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 483 | if _newclass: location = property(GetLocation, None, doc='''A read only property that returns the location of this value as a string.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 484 | |
| 485 | __swig_getmethods__["target"] = GetTarget |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 486 | if _newclass: target = property(GetTarget, None, doc='''A read only property that returns the lldb.SBTarget that this value is associated with.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 487 | |
| 488 | __swig_getmethods__["process"] = GetProcess |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 489 | if _newclass: process = property(GetProcess, None, doc='''A read only property that returns the lldb.SBProcess that this value is associated with, the returned value might be invalid and should be tested.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 490 | |
| 491 | __swig_getmethods__["thread"] = GetThread |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 492 | if _newclass: thread = property(GetThread, None, doc='''A read only property that returns the lldb.SBThread that this value is associated with, the returned value might be invalid and should be tested.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 493 | |
| 494 | __swig_getmethods__["frame"] = GetFrame |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 495 | if _newclass: frame = property(GetFrame, None, doc='''A read only property that returns the lldb.SBFrame that this value is associated with, the returned value might be invalid and should be tested.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 496 | |
| 497 | __swig_getmethods__["num_children"] = GetNumChildren |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 498 | if _newclass: num_children = property(GetNumChildren, None, doc='''A read only property that returns the number of child lldb.SBValues that this value has.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 499 | |
Greg Clayton | 7edbdfc | 2012-02-03 07:02:37 +0000 | [diff] [blame] | 500 | __swig_getmethods__["unsigned"] = GetValueAsUnsigned |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 501 | if _newclass: unsigned = property(GetValueAsUnsigned, None, doc='''A read only property that returns the value of this SBValue as an usigned integer.''') |
Greg Clayton | 7edbdfc | 2012-02-03 07:02:37 +0000 | [diff] [blame] | 502 | |
| 503 | __swig_getmethods__["signed"] = GetValueAsSigned |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 504 | if _newclass: signed = property(GetValueAsSigned, None, doc='''A read only property that returns the value of this SBValue as a signed integer.''') |
Greg Clayton | 7edbdfc | 2012-02-03 07:02:37 +0000 | [diff] [blame] | 505 | |
| 506 | def get_expr_path(self): |
| 507 | s = SBStream() |
| 508 | self.GetExpressionPath (s) |
| 509 | return s.GetData() |
| 510 | |
| 511 | __swig_getmethods__["path"] = get_expr_path |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 512 | if _newclass: path = property(get_expr_path, None, doc='''A read only property that returns the expression path that one can use to reach this value in an expression.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 513 | %} |
| 514 | |
Johnny Chen | 67ae7bd | 2011-07-18 19:08:30 +0000 | [diff] [blame] | 515 | }; |
| 516 | |
| 517 | } // namespace lldb |