| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 1 | //===-- SWIG Interface for SBData -------------------------------*- C++ -*-===// | 
|  | 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 |  | 
|  | 11 | namespace lldb { | 
|  | 12 |  | 
|  | 13 | class SBData | 
|  | 14 | { | 
|  | 15 | public: | 
|  | 16 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 17 | SBData (); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 18 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 19 | SBData (const SBData &rhs); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 20 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 21 | ~SBData (); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 22 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 23 | uint8_t | 
|  | 24 | GetAddressByteSize (); | 
| Greg Clayton | 0f28986 | 2012-01-07 00:45:50 +0000 | [diff] [blame] | 25 |  | 
|  | 26 | void | 
|  | 27 | SetAddressByteSize (uint8_t addr_byte_size); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 28 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 29 | void | 
|  | 30 | Clear (); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 31 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 32 | bool | 
|  | 33 | IsValid(); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 34 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 35 | size_t | 
|  | 36 | GetByteSize (); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 37 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 38 | lldb::ByteOrder | 
|  | 39 | GetByteOrder(); | 
| Greg Clayton | 0f28986 | 2012-01-07 00:45:50 +0000 | [diff] [blame] | 40 |  | 
|  | 41 | void | 
|  | 42 | SetByteOrder (lldb::ByteOrder endian); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 43 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 44 | float | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 45 | GetFloat (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 46 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 47 | double | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 48 | GetDouble (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 49 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 50 | long double | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 51 | GetLongDouble (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 52 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 53 | lldb::addr_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 54 | GetAddress (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 55 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 56 | uint8_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 57 | GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 58 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 59 | uint16_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 60 | GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 61 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 62 | uint32_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 63 | GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 64 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 65 | uint64_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 66 | GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 67 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 68 | int8_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 69 | GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 70 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 71 | int16_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 72 | GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 73 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 74 | int32_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 75 | GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 76 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 77 | int64_t | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 78 | GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 79 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 80 | const char* | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 81 | GetString (lldb::SBError& error, lldb::offset_t offset); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 82 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 83 | bool | 
| Greg Clayton | d9dc52d | 2011-09-24 05:04:40 +0000 | [diff] [blame] | 84 | GetDescription (lldb::SBStream &description, lldb::addr_t base_addr); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 85 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 86 | size_t | 
|  | 87 | ReadRawData (lldb::SBError& error, | 
| Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 88 | lldb::offset_t offset, | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 89 | void *buf, | 
|  | 90 | size_t size); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 91 |  | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 92 | void | 
| Greg Clayton | 0f28986 | 2012-01-07 00:45:50 +0000 | [diff] [blame] | 93 | SetData (lldb::SBError& error, const void *buf, size_t size, lldb::ByteOrder endian, uint8_t addr_size); | 
| Johnny Chen | 55114c2 | 2011-09-15 22:05:38 +0000 | [diff] [blame] | 94 |  | 
|  | 95 | bool | 
| Greg Clayton | 0f28986 | 2012-01-07 00:45:50 +0000 | [diff] [blame] | 96 | Append (const SBData& rhs); | 
|  | 97 |  | 
|  | 98 | static lldb::SBData | 
|  | 99 | CreateDataFromCString (lldb::ByteOrder endian, uint32_t addr_byte_size, const char* data); | 
|  | 100 |  | 
|  | 101 | // in the following CreateData*() and SetData*() prototypes, the two parameters array and array_len | 
|  | 102 | // should not be renamed or rearranged, because doing so will break the SWIG typemap | 
|  | 103 | static lldb::SBData | 
|  | 104 | CreateDataFromUInt64Array (lldb::ByteOrder endian, uint32_t addr_byte_size, uint64_t* array, size_t array_len); | 
|  | 105 |  | 
|  | 106 | static lldb::SBData | 
|  | 107 | CreateDataFromUInt32Array (lldb::ByteOrder endian, uint32_t addr_byte_size, uint32_t* array, size_t array_len); | 
|  | 108 |  | 
|  | 109 | static lldb::SBData | 
|  | 110 | CreateDataFromSInt64Array (lldb::ByteOrder endian, uint32_t addr_byte_size, int64_t* array, size_t array_len); | 
|  | 111 |  | 
|  | 112 | static lldb::SBData | 
|  | 113 | CreateDataFromSInt32Array (lldb::ByteOrder endian, uint32_t addr_byte_size, int32_t* array, size_t array_len); | 
|  | 114 |  | 
|  | 115 | static lldb::SBData | 
|  | 116 | CreateDataFromDoubleArray (lldb::ByteOrder endian, uint32_t addr_byte_size, double* array, size_t array_len); | 
|  | 117 |  | 
|  | 118 | bool | 
|  | 119 | SetDataFromCString (const char* data); | 
|  | 120 |  | 
|  | 121 | bool | 
|  | 122 | SetDataFromUInt64Array (uint64_t* array, size_t array_len); | 
|  | 123 |  | 
|  | 124 | bool | 
|  | 125 | SetDataFromUInt32Array (uint32_t* array, size_t array_len); | 
|  | 126 |  | 
|  | 127 | bool | 
|  | 128 | SetDataFromSInt64Array (int64_t* array, size_t array_len); | 
|  | 129 |  | 
|  | 130 | bool | 
|  | 131 | SetDataFromSInt32Array (int32_t* array, size_t array_len); | 
|  | 132 |  | 
|  | 133 | bool | 
|  | 134 | SetDataFromDoubleArray (double* array, size_t array_len); | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 135 |  | 
| Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 136 | %pythoncode %{ | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 137 |  | 
|  | 138 | class read_data_helper: | 
|  | 139 | def __init__(self, sbdata, readerfunc, item_size): | 
|  | 140 | self.sbdata = sbdata | 
|  | 141 | self.readerfunc = readerfunc | 
|  | 142 | self.item_size = item_size | 
|  | 143 | def __getitem__(self,key): | 
|  | 144 | if isinstance(key,slice): | 
|  | 145 | list = [] | 
|  | 146 | for x in range(*key.indices(self.__len__())): | 
|  | 147 | list.append(self.__getitem__(x)) | 
|  | 148 | return list | 
|  | 149 | if not (isinstance(key,(int,long))): | 
|  | 150 | raise TypeError('must be int') | 
|  | 151 | key = key * self.item_size # SBData uses byte-based indexes, but we want to use itemsize-based indexes here | 
|  | 152 | error = SBError() | 
|  | 153 | my_data = self.readerfunc(self.sbdata,error,key) | 
|  | 154 | if error.Fail(): | 
|  | 155 | raise IndexError(error.GetCString()) | 
|  | 156 | else: | 
|  | 157 | return my_data | 
|  | 158 | def __len__(self): | 
| Filipe Cabecinhas | 1a96ef8 | 2012-05-11 20:39:42 +0000 | [diff] [blame] | 159 | return int(self.sbdata.GetByteSize()/self.item_size) | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 160 | def all(self): | 
|  | 161 | return self[0:len(self)] | 
|  | 162 |  | 
| Enrico Granata | b0c72d9 | 2013-06-11 22:06:06 +0000 | [diff] [blame] | 163 | @classmethod | 
|  | 164 | def CreateDataFromInt (cls, value, size = None, target = None, ptr_size = None, endian = None): | 
|  | 165 | import sys | 
|  | 166 | lldbmodule = sys.modules[cls.__module__] | 
|  | 167 | lldbdict = lldbmodule.__dict__ | 
|  | 168 | if 'target' in lldbdict: | 
|  | 169 | lldbtarget = lldbdict['target'] | 
|  | 170 | else: | 
|  | 171 | lldbtarget = None | 
|  | 172 | if target == None and lldbtarget != None and lldbtarget.IsValid(): | 
|  | 173 | target = lldbtarget | 
|  | 174 | if ptr_size == None: | 
|  | 175 | if target and target.IsValid(): | 
|  | 176 | ptr_size = target.addr_size | 
|  | 177 | else: | 
|  | 178 | ptr_size = 8 | 
|  | 179 | if endian == None: | 
|  | 180 | if target and target.IsValid(): | 
|  | 181 | endian = target.byte_order | 
|  | 182 | else: | 
|  | 183 | endian = lldbdict['eByteOrderLittle'] | 
|  | 184 | if size == None: | 
|  | 185 | if value > 2147483647: | 
|  | 186 | size = 8 | 
|  | 187 | elif value < -2147483648: | 
|  | 188 | size = 8 | 
|  | 189 | elif value > 4294967295: | 
|  | 190 | size = 8 | 
|  | 191 | else: | 
|  | 192 | size = 4 | 
|  | 193 | if size == 4: | 
|  | 194 | if value < 0: | 
|  | 195 | return SBData().CreateDataFromSInt32Array(endian, ptr_size, [value]) | 
|  | 196 | return SBData().CreateDataFromUInt32Array(endian, ptr_size, [value]) | 
|  | 197 | if size == 8: | 
|  | 198 | if value < 0: | 
|  | 199 | return SBData().CreateDataFromSInt64Array(endian, ptr_size, [value]) | 
|  | 200 | return SBData().CreateDataFromUInt64Array(endian, ptr_size, [value]) | 
|  | 201 | return None | 
|  | 202 |  | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 203 | def _make_helper(self, sbdata, getfunc, itemsize): | 
|  | 204 | return self.read_data_helper(sbdata, getfunc, itemsize) | 
|  | 205 |  | 
|  | 206 | def _make_helper_uint8(self): | 
|  | 207 | return self._make_helper(self, SBData.GetUnsignedInt8, 1) | 
|  | 208 |  | 
|  | 209 | def _make_helper_uint16(self): | 
|  | 210 | return self._make_helper(self, SBData.GetUnsignedInt16, 2) | 
|  | 211 |  | 
|  | 212 | def _make_helper_uint32(self): | 
|  | 213 | return self._make_helper(self, SBData.GetUnsignedInt32, 4) | 
|  | 214 |  | 
|  | 215 | def _make_helper_uint64(self): | 
|  | 216 | return self._make_helper(self, SBData.GetUnsignedInt64, 8) | 
|  | 217 |  | 
|  | 218 | def _make_helper_sint8(self): | 
|  | 219 | return self._make_helper(self, SBData.GetSignedInt8, 1) | 
|  | 220 |  | 
|  | 221 | def _make_helper_sint16(self): | 
|  | 222 | return self._make_helper(self, SBData.GetSignedInt16, 2) | 
|  | 223 |  | 
|  | 224 | def _make_helper_sint32(self): | 
|  | 225 | return self._make_helper(self, SBData.GetSignedInt32, 4) | 
|  | 226 |  | 
|  | 227 | def _make_helper_sint64(self): | 
|  | 228 | return self._make_helper(self, SBData.GetSignedInt64, 8) | 
|  | 229 |  | 
|  | 230 | def _make_helper_float(self): | 
|  | 231 | return self._make_helper(self, SBData.GetFloat, 4) | 
|  | 232 |  | 
|  | 233 | def _make_helper_double(self): | 
|  | 234 | return self._make_helper(self, SBData.GetDouble, 8) | 
|  | 235 |  | 
|  | 236 | def _read_all_uint8(self): | 
|  | 237 | return self._make_helper_uint8().all() | 
|  | 238 |  | 
|  | 239 | def _read_all_uint16(self): | 
|  | 240 | return self._make_helper_uint16().all() | 
|  | 241 |  | 
|  | 242 | def _read_all_uint32(self): | 
|  | 243 | return self._make_helper_uint32().all() | 
|  | 244 |  | 
|  | 245 | def _read_all_uint64(self): | 
|  | 246 | return self._make_helper_uint64().all() | 
|  | 247 |  | 
|  | 248 | def _read_all_sint8(self): | 
|  | 249 | return self._make_helper_sint8().all() | 
|  | 250 |  | 
|  | 251 | def _read_all_sint16(self): | 
|  | 252 | return self._make_helper_sint16().all() | 
|  | 253 |  | 
|  | 254 | def _read_all_sint32(self): | 
|  | 255 | return self._make_helper_sint32().all() | 
|  | 256 |  | 
|  | 257 | def _read_all_sint64(self): | 
|  | 258 | return self._make_helper_sint64().all() | 
|  | 259 |  | 
|  | 260 | def _read_all_float(self): | 
|  | 261 | return self._make_helper_float().all() | 
|  | 262 |  | 
|  | 263 | def _read_all_double(self): | 
|  | 264 | return self._make_helper_double().all() | 
|  | 265 |  | 
|  | 266 | __swig_getmethods__["uint8"] = _make_helper_uint8 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 267 | if _newclass: uint8 = property(_make_helper_uint8, None, doc='''A read only property that returns an array-like object out of which you can read uint8 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 268 |  | 
|  | 269 | __swig_getmethods__["uint16"] = _make_helper_uint16 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 270 | if _newclass: uint16 = property(_make_helper_uint16, None, doc='''A read only property that returns an array-like object out of which you can read uint16 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 271 |  | 
|  | 272 | __swig_getmethods__["uint32"] = _make_helper_uint32 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 273 | if _newclass: uint32 = property(_make_helper_uint32, None, doc='''A read only property that returns an array-like object out of which you can read uint32 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 274 |  | 
|  | 275 | __swig_getmethods__["uint64"] = _make_helper_uint64 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 276 | if _newclass: uint64 = property(_make_helper_uint64, None, doc='''A read only property that returns an array-like object out of which you can read uint64 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 277 |  | 
|  | 278 | __swig_getmethods__["sint8"] = _make_helper_sint8 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 279 | if _newclass: sint8 = property(_make_helper_sint8, None, doc='''A read only property that returns an array-like object out of which you can read sint8 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 280 |  | 
|  | 281 | __swig_getmethods__["sint16"] = _make_helper_sint16 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 282 | if _newclass: sint16 = property(_make_helper_sint16, None, doc='''A read only property that returns an array-like object out of which you can read sint16 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 283 |  | 
|  | 284 | __swig_getmethods__["sint32"] = _make_helper_sint32 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 285 | if _newclass: sint32 = property(_make_helper_sint32, None, doc='''A read only property that returns an array-like object out of which you can read sint32 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 286 |  | 
|  | 287 | __swig_getmethods__["sint64"] = _make_helper_sint64 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 288 | if _newclass: sint64 = property(_make_helper_sint64, None, doc='''A read only property that returns an array-like object out of which you can read sint64 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 289 |  | 
|  | 290 | __swig_getmethods__["float"] = _make_helper_float | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 291 | if _newclass: float = property(_make_helper_float, None, doc='''A read only property that returns an array-like object out of which you can read float values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 292 |  | 
|  | 293 | __swig_getmethods__["double"] = _make_helper_double | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 294 | if _newclass: double = property(_make_helper_double, None, doc='''A read only property that returns an array-like object out of which you can read double values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 295 |  | 
|  | 296 | __swig_getmethods__["uint8s"] = _read_all_uint8 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 297 | if _newclass: uint8s = property(_read_all_uint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint8 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 298 |  | 
|  | 299 | __swig_getmethods__["uint16s"] = _read_all_uint16 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 300 | if _newclass: uint16s = property(_read_all_uint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint16 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 301 |  | 
|  | 302 | __swig_getmethods__["uint32s"] = _read_all_uint32 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 303 | if _newclass: uint32s = property(_read_all_uint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint32 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 304 |  | 
|  | 305 | __swig_getmethods__["uint64s"] = _read_all_uint64 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 306 | if _newclass: uint64s = property(_read_all_uint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint64 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 307 |  | 
|  | 308 | __swig_getmethods__["sint8s"] = _read_all_sint8 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 309 | if _newclass: sint8s = property(_read_all_sint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint8 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 310 |  | 
|  | 311 | __swig_getmethods__["sint16s"] = _read_all_sint16 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 312 | if _newclass: sint16s = property(_read_all_sint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint16 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 313 |  | 
|  | 314 | __swig_getmethods__["sint32s"] = _read_all_sint32 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 315 | if _newclass: sint32s = property(_read_all_sint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint32 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 316 |  | 
|  | 317 | __swig_getmethods__["sint64s"] = _read_all_sint64 | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 318 | if _newclass: sint64s = property(_read_all_sint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint64 values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 319 |  | 
|  | 320 | __swig_getmethods__["floats"] = _read_all_float | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 321 | if _newclass: floats = property(_read_all_float, None, doc='''A read only property that returns an array with all the contents of this SBData represented as float values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 322 |  | 
|  | 323 | __swig_getmethods__["doubles"] = _read_all_double | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 324 | if _newclass: doubles = property(_read_all_double, None, doc='''A read only property that returns an array with all the contents of this SBData represented as double values.''') | 
| Enrico Granata | 385ad4e | 2012-03-03 00:45:57 +0000 | [diff] [blame] | 325 |  | 
|  | 326 | %} | 
|  | 327 |  | 
|  | 328 | %pythoncode %{ | 
| Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 329 | __swig_getmethods__["byte_order"] = GetByteOrder | 
|  | 330 | __swig_setmethods__["byte_order"] = SetByteOrder | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 331 | if _newclass: byte_order = property(GetByteOrder, SetByteOrder, doc='''A read/write property getting and setting the endianness of this SBData (data.byte_order = lldb.eByteOrderLittle).''') | 
| Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 332 |  | 
|  | 333 | __swig_getmethods__["size"] = GetByteSize | 
| Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 334 | if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns the size the same result as GetByteSize().''') | 
| Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 335 |  | 
|  | 336 | %} | 
|  | 337 |  | 
| Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 338 | }; | 
|  | 339 |  | 
|  | 340 | } // namespace lldb |