Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 1 | //===-- SWIG Interface for SBTarget -----------------------------*- 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 | namespace lldb { |
| 11 | |
Greg Clayton | 0e61568 | 2012-02-24 05:03:03 +0000 | [diff] [blame] | 12 | class SBLaunchInfo |
| 13 | { |
Greg Clayton | 38d1f05 | 2012-02-24 20:59:25 +0000 | [diff] [blame] | 14 | public: |
| 15 | SBLaunchInfo (const char **argv); |
Greg Clayton | 0e61568 | 2012-02-24 05:03:03 +0000 | [diff] [blame] | 16 | |
| 17 | uint32_t |
| 18 | GetUserID(); |
| 19 | |
| 20 | uint32_t |
| 21 | GetGroupID(); |
| 22 | |
| 23 | bool |
| 24 | UserIDIsValid (); |
| 25 | |
| 26 | bool |
| 27 | GroupIDIsValid (); |
| 28 | |
| 29 | void |
| 30 | SetUserID (uint32_t uid); |
| 31 | |
| 32 | void |
| 33 | SetGroupID (uint32_t gid); |
| 34 | |
Greg Clayton | 3e32ad6 | 2014-05-07 20:16:06 +0000 | [diff] [blame] | 35 | lldb::SBFileSpec |
| 36 | GetExecutableFile (); |
| 37 | |
| 38 | void |
| 39 | SetExecutableFile (lldb::SBFileSpec exe_file, bool add_as_first_arg); |
| 40 | |
Greg Clayton | 0e61568 | 2012-02-24 05:03:03 +0000 | [diff] [blame] | 41 | uint32_t |
| 42 | GetNumArguments (); |
| 43 | |
| 44 | const char * |
| 45 | GetArgumentAtIndex (uint32_t idx); |
| 46 | |
| 47 | void |
| 48 | SetArguments (const char **argv, bool append); |
| 49 | |
| 50 | uint32_t |
| 51 | GetNumEnvironmentEntries (); |
| 52 | |
| 53 | const char * |
| 54 | GetEnvironmentEntryAtIndex (uint32_t idx); |
| 55 | |
| 56 | void |
| 57 | SetEnvironmentEntries (const char **envp, bool append); |
| 58 | |
| 59 | void |
| 60 | Clear (); |
| 61 | |
| 62 | const char * |
| 63 | GetWorkingDirectory () const; |
| 64 | |
| 65 | void |
| 66 | SetWorkingDirectory (const char *working_dir); |
| 67 | |
| 68 | uint32_t |
| 69 | GetLaunchFlags (); |
| 70 | |
| 71 | void |
| 72 | SetLaunchFlags (uint32_t flags); |
| 73 | |
| 74 | const char * |
| 75 | GetProcessPluginName (); |
| 76 | |
| 77 | void |
| 78 | SetProcessPluginName (const char *plugin_name); |
| 79 | |
| 80 | const char * |
| 81 | GetShell (); |
| 82 | |
| 83 | void |
| 84 | SetShell (const char * path); |
| 85 | |
| 86 | uint32_t |
| 87 | GetResumeCount (); |
| 88 | |
| 89 | void |
| 90 | SetResumeCount (uint32_t c); |
| 91 | |
| 92 | bool |
| 93 | AddCloseFileAction (int fd); |
| 94 | |
| 95 | bool |
| 96 | AddDuplicateFileAction (int fd, int dup_fd); |
| 97 | |
| 98 | bool |
| 99 | AddOpenFileAction (int fd, const char *path, bool read, bool write); |
| 100 | |
| 101 | bool |
| 102 | AddSuppressFileAction (int fd, bool read, bool write); |
Jason Molenda | a332978 | 2014-03-29 18:54:20 +0000 | [diff] [blame] | 103 | |
| 104 | void |
| 105 | SetLaunchEventData (const char *data); |
| 106 | |
| 107 | const char * |
| 108 | GetLaunchEventData () const; |
| 109 | |
Jim Ingham | 106d028 | 2014-06-25 02:32:56 +0000 | [diff] [blame] | 110 | bool |
| 111 | GetDetachOnError() const; |
| 112 | |
| 113 | void |
| 114 | SetDetachOnError(bool enable); |
Greg Clayton | 0e61568 | 2012-02-24 05:03:03 +0000 | [diff] [blame] | 115 | }; |
| 116 | |
| 117 | class SBAttachInfo |
| 118 | { |
| 119 | public: |
| 120 | SBAttachInfo (); |
| 121 | |
| 122 | SBAttachInfo (lldb::pid_t pid); |
| 123 | |
| 124 | SBAttachInfo (const char *path, bool wait_for); |
| 125 | |
| 126 | SBAttachInfo (const lldb::SBAttachInfo &rhs); |
| 127 | |
| 128 | lldb::pid_t |
| 129 | GetProcessID (); |
| 130 | |
| 131 | void |
| 132 | SetProcessID (lldb::pid_t pid); |
| 133 | |
| 134 | void |
| 135 | SetExecutable (const char *path); |
| 136 | |
| 137 | void |
| 138 | SetExecutable (lldb::SBFileSpec exe_file); |
| 139 | |
| 140 | bool |
| 141 | GetWaitForLaunch (); |
| 142 | |
| 143 | void |
| 144 | SetWaitForLaunch (bool b); |
| 145 | |
Jim Ingham | cd16df9 | 2012-07-20 21:37:13 +0000 | [diff] [blame] | 146 | bool |
| 147 | GetIgnoreExisting (); |
| 148 | |
| 149 | void |
| 150 | SetIgnoreExisting (bool b); |
| 151 | |
Greg Clayton | 0e61568 | 2012-02-24 05:03:03 +0000 | [diff] [blame] | 152 | uint32_t |
| 153 | GetResumeCount (); |
| 154 | |
| 155 | void |
| 156 | SetResumeCount (uint32_t c); |
| 157 | |
| 158 | const char * |
| 159 | GetProcessPluginName (); |
| 160 | |
| 161 | void |
| 162 | SetProcessPluginName (const char *plugin_name); |
| 163 | |
| 164 | uint32_t |
Greg Clayton | 41bd8ac | 2012-02-24 23:56:06 +0000 | [diff] [blame] | 165 | GetUserID(); |
| 166 | |
| 167 | uint32_t |
| 168 | GetGroupID(); |
| 169 | |
| 170 | bool |
| 171 | UserIDIsValid (); |
| 172 | |
| 173 | bool |
| 174 | GroupIDIsValid (); |
| 175 | |
| 176 | void |
| 177 | SetUserID (uint32_t uid); |
| 178 | |
| 179 | void |
| 180 | SetGroupID (uint32_t gid); |
| 181 | |
| 182 | uint32_t |
Greg Clayton | 0e61568 | 2012-02-24 05:03:03 +0000 | [diff] [blame] | 183 | GetEffectiveUserID(); |
| 184 | |
| 185 | uint32_t |
| 186 | GetEffectiveGroupID(); |
| 187 | |
| 188 | bool |
| 189 | EffectiveUserIDIsValid (); |
| 190 | |
| 191 | bool |
| 192 | EffectiveGroupIDIsValid (); |
| 193 | |
| 194 | void |
| 195 | SetEffectiveUserID (uint32_t uid); |
| 196 | |
| 197 | void |
| 198 | SetEffectiveGroupID (uint32_t gid); |
| 199 | |
| 200 | lldb::pid_t |
| 201 | GetParentProcessID (); |
| 202 | |
| 203 | void |
| 204 | SetParentProcessID (lldb::pid_t pid); |
| 205 | |
| 206 | bool |
| 207 | ParentProcessIDIsValid(); |
| 208 | }; |
| 209 | |
| 210 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 211 | %feature("docstring", |
| 212 | "Represents the target program running under the debugger. |
| 213 | |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 214 | SBTarget supports module, breakpoint, and watchpoint iterations. For example, |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 215 | |
| 216 | for m in target.module_iter(): |
| 217 | print m |
| 218 | |
| 219 | produces: |
| 220 | |
| 221 | (x86_64) /Volumes/data/lldb/svn/trunk/test/python_api/lldbutil/iter/a.out |
| 222 | (x86_64) /usr/lib/dyld |
| 223 | (x86_64) /usr/lib/libstdc++.6.dylib |
| 224 | (x86_64) /usr/lib/libSystem.B.dylib |
| 225 | (x86_64) /usr/lib/system/libmathCommon.A.dylib |
| 226 | (x86_64) /usr/lib/libSystem.B.dylib(__commpage) |
| 227 | |
| 228 | and, |
| 229 | |
| 230 | for b in target.breakpoint_iter(): |
| 231 | print b |
| 232 | |
| 233 | produces: |
| 234 | |
| 235 | SBBreakpoint: id = 1, file ='main.cpp', line = 66, locations = 1 |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 236 | SBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1 |
| 237 | |
| 238 | and, |
| 239 | |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 240 | for wp_loc in target.watchpoint_iter(): |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 241 | print wp_loc |
| 242 | |
| 243 | produces: |
| 244 | |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 245 | Watchpoint 1: addr = 0x1034ca048 size = 4 state = enabled type = rw |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 246 | declare @ '/Volumes/data/lldb/svn/trunk/test/python_api/watchpoint/main.c:12' |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 247 | hw_index = 0 hit_count = 2 ignore_count = 0" |
Johnny Chen | 357033b | 2011-07-18 20:13:38 +0000 | [diff] [blame] | 248 | ) SBTarget; |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 249 | class SBTarget |
| 250 | { |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 251 | public: |
| 252 | //------------------------------------------------------------------ |
| 253 | // Broadcaster bits. |
| 254 | //------------------------------------------------------------------ |
| 255 | enum |
| 256 | { |
| 257 | eBroadcastBitBreakpointChanged = (1 << 0), |
| 258 | eBroadcastBitModulesLoaded = (1 << 1), |
Jim Ingham | 1b5792e | 2012-12-18 02:03:49 +0000 | [diff] [blame] | 259 | eBroadcastBitModulesUnloaded = (1 << 2), |
Enrico Granata | f15ee4e | 2013-04-05 18:49:06 +0000 | [diff] [blame] | 260 | eBroadcastBitWatchpointChanged = (1 << 3), |
| 261 | eBroadcastBitSymbolsLoaded = (1 << 4) |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 262 | }; |
| 263 | |
| 264 | //------------------------------------------------------------------ |
| 265 | // Constructors |
| 266 | //------------------------------------------------------------------ |
| 267 | SBTarget (); |
| 268 | |
| 269 | SBTarget (const lldb::SBTarget& rhs); |
| 270 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 271 | //------------------------------------------------------------------ |
| 272 | // Destructor |
| 273 | //------------------------------------------------------------------ |
| 274 | ~SBTarget(); |
| 275 | |
Jim Ingham | 4bddaeb | 2012-02-16 06:50:00 +0000 | [diff] [blame] | 276 | static const char * |
| 277 | GetBroadcasterClassName (); |
| 278 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 279 | bool |
| 280 | IsValid() const; |
| 281 | |
| 282 | lldb::SBProcess |
| 283 | GetProcess (); |
| 284 | |
| 285 | %feature("docstring", " |
| 286 | //------------------------------------------------------------------ |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 287 | /// Install any binaries that need to be installed. |
| 288 | /// |
| 289 | /// This function does nothing when debugging on the host system. |
| 290 | /// When connected to remote platforms, the target's main executable |
| 291 | /// and any modules that have their install path set will be |
| 292 | /// installed on the remote platform. If the main executable doesn't |
| 293 | /// have an install location set, it will be installed in the remote |
| 294 | /// platform's working directory. |
| 295 | /// |
| 296 | /// @return |
| 297 | /// An error describing anything that went wrong during |
| 298 | /// installation. |
| 299 | //------------------------------------------------------------------ |
| 300 | ") Install; |
| 301 | lldb::SBError |
| 302 | Install(); |
| 303 | |
| 304 | %feature("docstring", " |
| 305 | //------------------------------------------------------------------ |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 306 | /// Launch a new process. |
| 307 | /// |
| 308 | /// Launch a new process by spawning a new process using the |
| 309 | /// target object's executable module's file as the file to launch. |
| 310 | /// Arguments are given in \a argv, and the environment variables |
| 311 | /// are in \a envp. Standard input and output files can be |
| 312 | /// optionally re-directed to \a stdin_path, \a stdout_path, and |
| 313 | /// \a stderr_path. |
| 314 | /// |
| 315 | /// @param[in] listener |
| 316 | /// An optional listener that will receive all process events. |
| 317 | /// If \a listener is valid then \a listener will listen to all |
| 318 | /// process events. If not valid, then this target's debugger |
| 319 | /// (SBTarget::GetDebugger()) will listen to all process events. |
| 320 | /// |
| 321 | /// @param[in] argv |
| 322 | /// The argument array. |
| 323 | /// |
| 324 | /// @param[in] envp |
| 325 | /// The environment array. |
| 326 | /// |
| 327 | /// @param[in] launch_flags |
| 328 | /// Flags to modify the launch (@see lldb::LaunchFlags) |
| 329 | /// |
| 330 | /// @param[in] stdin_path |
| 331 | /// The path to use when re-directing the STDIN of the new |
| 332 | /// process. If all stdXX_path arguments are NULL, a pseudo |
| 333 | /// terminal will be used. |
| 334 | /// |
| 335 | /// @param[in] stdout_path |
| 336 | /// The path to use when re-directing the STDOUT of the new |
| 337 | /// process. If all stdXX_path arguments are NULL, a pseudo |
| 338 | /// terminal will be used. |
| 339 | /// |
| 340 | /// @param[in] stderr_path |
| 341 | /// The path to use when re-directing the STDERR of the new |
| 342 | /// process. If all stdXX_path arguments are NULL, a pseudo |
| 343 | /// terminal will be used. |
| 344 | /// |
| 345 | /// @param[in] working_directory |
| 346 | /// The working directory to have the child process run in |
| 347 | /// |
| 348 | /// @param[in] launch_flags |
| 349 | /// Some launch options specified by logical OR'ing |
| 350 | /// lldb::LaunchFlags enumeration values together. |
| 351 | /// |
| 352 | /// @param[in] stop_at_endtry |
| 353 | /// If false do not stop the inferior at the entry point. |
| 354 | /// |
| 355 | /// @param[out] |
| 356 | /// An error object. Contains the reason if there is some failure. |
| 357 | /// |
| 358 | /// @return |
| 359 | /// A process object for the newly created process. |
| 360 | //------------------------------------------------------------------ |
| 361 | |
| 362 | For example, |
| 363 | |
| 364 | process = target.Launch(self.dbg.GetListener(), None, None, |
| 365 | None, '/tmp/stdout.txt', None, |
| 366 | None, 0, False, error) |
| 367 | |
| 368 | launches a new process by passing nothing for both the args and the envs |
| 369 | and redirect the standard output of the inferior to the /tmp/stdout.txt |
| 370 | file. It does not specify a working directory so that the debug server |
| 371 | will use its idea of what the current working directory is for the |
| 372 | inferior. Also, we ask the debugger not to stop the inferior at the |
| 373 | entry point. If no breakpoint is specified for the inferior, it should |
| 374 | run to completion if no user interaction is required. |
| 375 | ") Launch; |
| 376 | lldb::SBProcess |
| 377 | Launch (SBListener &listener, |
| 378 | char const **argv, |
| 379 | char const **envp, |
| 380 | const char *stdin_path, |
| 381 | const char *stdout_path, |
| 382 | const char *stderr_path, |
| 383 | const char *working_directory, |
| 384 | uint32_t launch_flags, // See LaunchFlags |
| 385 | bool stop_at_entry, |
| 386 | lldb::SBError& error); |
| 387 | |
| 388 | %feature("docstring", " |
| 389 | //------------------------------------------------------------------ |
| 390 | /// Launch a new process with sensible defaults. |
| 391 | /// |
| 392 | /// @param[in] argv |
| 393 | /// The argument array. |
| 394 | /// |
| 395 | /// @param[in] envp |
| 396 | /// The environment array. |
| 397 | /// |
| 398 | /// @param[in] working_directory |
| 399 | /// The working directory to have the child process run in |
| 400 | /// |
| 401 | /// Default: listener |
| 402 | /// Set to the target's debugger (SBTarget::GetDebugger()) |
| 403 | /// |
| 404 | /// Default: launch_flags |
| 405 | /// Empty launch flags |
| 406 | /// |
| 407 | /// Default: stdin_path |
| 408 | /// Default: stdout_path |
| 409 | /// Default: stderr_path |
| 410 | /// A pseudo terminal will be used. |
| 411 | /// |
| 412 | /// @return |
| 413 | /// A process object for the newly created process. |
| 414 | //------------------------------------------------------------------ |
| 415 | |
| 416 | For example, |
| 417 | |
| 418 | process = target.LaunchSimple(['X', 'Y', 'Z'], None, os.getcwd()) |
| 419 | |
| 420 | launches a new process by passing 'X', 'Y', 'Z' as the args to the |
| 421 | executable. |
| 422 | ") LaunchSimple; |
| 423 | lldb::SBProcess |
| 424 | LaunchSimple (const char **argv, |
| 425 | const char **envp, |
| 426 | const char *working_directory); |
| 427 | |
Greg Clayton | 0e61568 | 2012-02-24 05:03:03 +0000 | [diff] [blame] | 428 | lldb::SBProcess |
| 429 | Launch (lldb::SBLaunchInfo &launch_info, lldb::SBError& error); |
Greg Clayton | 4d8ad55 | 2013-03-25 22:40:51 +0000 | [diff] [blame] | 430 | |
| 431 | %feature("docstring", " |
| 432 | //------------------------------------------------------------------ |
| 433 | /// Load a core file |
| 434 | /// |
| 435 | /// @param[in] core_file |
| 436 | /// File path of the core dump. |
| 437 | /// |
| 438 | /// @return |
| 439 | /// A process object for the newly created core file. |
| 440 | //------------------------------------------------------------------ |
| 441 | |
| 442 | For example, |
| 443 | |
| 444 | process = target.LoadCore('./a.out.core') |
| 445 | |
| 446 | loads a new core file and returns the process object. |
| 447 | ") LoadCore; |
| 448 | lldb::SBProcess |
| 449 | LoadCore(const char *core_file); |
Greg Clayton | 0e61568 | 2012-02-24 05:03:03 +0000 | [diff] [blame] | 450 | |
| 451 | lldb::SBProcess |
| 452 | Attach (lldb::SBAttachInfo &attach_info, lldb::SBError& error); |
| 453 | |
| 454 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 455 | %feature("docstring", " |
| 456 | //------------------------------------------------------------------ |
| 457 | /// Attach to process with pid. |
| 458 | /// |
| 459 | /// @param[in] listener |
| 460 | /// An optional listener that will receive all process events. |
| 461 | /// If \a listener is valid then \a listener will listen to all |
| 462 | /// process events. If not valid, then this target's debugger |
| 463 | /// (SBTarget::GetDebugger()) will listen to all process events. |
| 464 | /// |
| 465 | /// @param[in] pid |
| 466 | /// The process ID to attach to. |
| 467 | /// |
| 468 | /// @param[out] |
| 469 | /// An error explaining what went wrong if attach fails. |
| 470 | /// |
| 471 | /// @return |
| 472 | /// A process object for the attached process. |
| 473 | //------------------------------------------------------------------ |
| 474 | ") AttachToProcessWithID; |
| 475 | lldb::SBProcess |
| 476 | AttachToProcessWithID (SBListener &listener, |
| 477 | lldb::pid_t pid, |
| 478 | lldb::SBError& error); |
| 479 | |
| 480 | %feature("docstring", " |
| 481 | //------------------------------------------------------------------ |
| 482 | /// Attach to process with name. |
| 483 | /// |
| 484 | /// @param[in] listener |
| 485 | /// An optional listener that will receive all process events. |
| 486 | /// If \a listener is valid then \a listener will listen to all |
| 487 | /// process events. If not valid, then this target's debugger |
| 488 | /// (SBTarget::GetDebugger()) will listen to all process events. |
| 489 | /// |
| 490 | /// @param[in] name |
| 491 | /// Basename of process to attach to. |
| 492 | /// |
| 493 | /// @param[in] wait_for |
| 494 | /// If true wait for a new instance of 'name' to be launched. |
| 495 | /// |
| 496 | /// @param[out] |
| 497 | /// An error explaining what went wrong if attach fails. |
| 498 | /// |
| 499 | /// @return |
| 500 | /// A process object for the attached process. |
| 501 | //------------------------------------------------------------------ |
| 502 | ") AttachToProcessWithName; |
| 503 | lldb::SBProcess |
| 504 | AttachToProcessWithName (SBListener &listener, |
| 505 | const char *name, |
| 506 | bool wait_for, |
| 507 | lldb::SBError& error); |
| 508 | |
| 509 | %feature("docstring", " |
| 510 | //------------------------------------------------------------------ |
| 511 | /// Connect to a remote debug server with url. |
| 512 | /// |
| 513 | /// @param[in] listener |
| 514 | /// An optional listener that will receive all process events. |
| 515 | /// If \a listener is valid then \a listener will listen to all |
| 516 | /// process events. If not valid, then this target's debugger |
| 517 | /// (SBTarget::GetDebugger()) will listen to all process events. |
| 518 | /// |
| 519 | /// @param[in] url |
| 520 | /// The url to connect to, e.g., 'connect://localhost:12345'. |
| 521 | /// |
| 522 | /// @param[in] plugin_name |
| 523 | /// The plugin name to be used; can be NULL. |
| 524 | /// |
| 525 | /// @param[out] |
| 526 | /// An error explaining what went wrong if the connect fails. |
| 527 | /// |
| 528 | /// @return |
| 529 | /// A process object for the connected process. |
| 530 | //------------------------------------------------------------------ |
| 531 | ") ConnectRemote; |
| 532 | lldb::SBProcess |
| 533 | ConnectRemote (SBListener &listener, |
| 534 | const char *url, |
| 535 | const char *plugin_name, |
| 536 | SBError& error); |
| 537 | |
| 538 | lldb::SBFileSpec |
| 539 | GetExecutable (); |
| 540 | |
Greg Clayton | cac9c5f | 2011-09-24 00:52:29 +0000 | [diff] [blame] | 541 | bool |
| 542 | AddModule (lldb::SBModule &module); |
| 543 | |
| 544 | lldb::SBModule |
| 545 | AddModule (const char *path, |
| 546 | const char *triple, |
| 547 | const char *uuid); |
| 548 | |
Greg Clayton | b210aec | 2012-04-23 20:23:39 +0000 | [diff] [blame] | 549 | lldb::SBModule |
| 550 | AddModule (const char *path, |
| 551 | const char *triple, |
| 552 | const char *uuid_cstr, |
| 553 | const char *symfile); |
| 554 | |
Greg Clayton | 226cce2 | 2013-07-08 22:22:41 +0000 | [diff] [blame] | 555 | lldb::SBModule |
| 556 | AddModule (const SBModuleSpec &module_spec); |
| 557 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 558 | uint32_t |
| 559 | GetNumModules () const; |
| 560 | |
| 561 | lldb::SBModule |
| 562 | GetModuleAtIndex (uint32_t idx); |
| 563 | |
Greg Clayton | cac9c5f | 2011-09-24 00:52:29 +0000 | [diff] [blame] | 564 | bool |
| 565 | RemoveModule (lldb::SBModule module); |
| 566 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 567 | lldb::SBDebugger |
| 568 | GetDebugger() const; |
| 569 | |
| 570 | lldb::SBModule |
| 571 | FindModule (const lldb::SBFileSpec &file_spec); |
| 572 | |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 573 | lldb::ByteOrder |
| 574 | GetByteOrder (); |
| 575 | |
| 576 | uint32_t |
| 577 | GetAddressByteSize(); |
| 578 | |
| 579 | const char * |
| 580 | GetTriple (); |
| 581 | |
Greg Clayton | cac9c5f | 2011-09-24 00:52:29 +0000 | [diff] [blame] | 582 | lldb::SBError |
| 583 | SetSectionLoadAddress (lldb::SBSection section, |
| 584 | lldb::addr_t section_base_addr); |
| 585 | |
| 586 | lldb::SBError |
| 587 | ClearSectionLoadAddress (lldb::SBSection section); |
| 588 | |
| 589 | lldb::SBError |
| 590 | SetModuleLoadAddress (lldb::SBModule module, |
| 591 | int64_t sections_offset); |
| 592 | |
| 593 | lldb::SBError |
| 594 | ClearModuleLoadAddress (lldb::SBModule module); |
| 595 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 596 | %feature("docstring", " |
| 597 | //------------------------------------------------------------------ |
| 598 | /// Find functions by name. |
| 599 | /// |
| 600 | /// @param[in] name |
| 601 | /// The name of the function we are looking for. |
| 602 | /// |
| 603 | /// @param[in] name_type_mask |
| 604 | /// A logical OR of one or more FunctionNameType enum bits that |
| 605 | /// indicate what kind of names should be used when doing the |
| 606 | /// lookup. Bits include fully qualified names, base names, |
| 607 | /// C++ methods, or ObjC selectors. |
| 608 | /// See FunctionNameType for more details. |
| 609 | /// |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 610 | /// @return |
Greg Clayton | 5569e64 | 2012-02-06 01:44:54 +0000 | [diff] [blame] | 611 | /// A lldb::SBSymbolContextList that gets filled in with all of |
| 612 | /// the symbol contexts for all the matches. |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 613 | //------------------------------------------------------------------ |
| 614 | ") FindFunctions; |
Greg Clayton | 5569e64 | 2012-02-06 01:44:54 +0000 | [diff] [blame] | 615 | lldb::SBSymbolContextList |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 616 | FindFunctions (const char *name, |
Greg Clayton | 5569e64 | 2012-02-06 01:44:54 +0000 | [diff] [blame] | 617 | uint32_t name_type_mask = lldb::eFunctionNameTypeAny); |
Enrico Granata | 6f3533f | 2011-07-29 19:53:35 +0000 | [diff] [blame] | 618 | |
| 619 | lldb::SBType |
| 620 | FindFirstType (const char* type); |
| 621 | |
| 622 | lldb::SBTypeList |
| 623 | FindTypes (const char* type); |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 624 | |
Greg Clayton | b43165b | 2012-12-05 21:24:42 +0000 | [diff] [blame] | 625 | lldb::SBType |
| 626 | GetBasicType(lldb::BasicType type); |
| 627 | |
Jim Ingham | e37d605 | 2011-09-13 00:29:56 +0000 | [diff] [blame] | 628 | lldb::SBSourceManager |
| 629 | GetSourceManager (); |
| 630 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 631 | %feature("docstring", " |
| 632 | //------------------------------------------------------------------ |
| 633 | /// Find global and static variables by name. |
| 634 | /// |
| 635 | /// @param[in] name |
| 636 | /// The name of the global or static variable we are looking |
| 637 | /// for. |
| 638 | /// |
| 639 | /// @param[in] max_matches |
| 640 | /// Allow the number of matches to be limited to \a max_matches. |
| 641 | /// |
| 642 | /// @return |
| 643 | /// A list of matched variables in an SBValueList. |
| 644 | //------------------------------------------------------------------ |
| 645 | ") FindGlobalVariables; |
| 646 | lldb::SBValueList |
| 647 | FindGlobalVariables (const char *name, |
| 648 | uint32_t max_matches); |
| 649 | |
Enrico Granata | bcd80b4 | 2013-01-16 18:53:52 +0000 | [diff] [blame] | 650 | %feature("docstring", " |
| 651 | //------------------------------------------------------------------ |
| 652 | /// Find the first global (or static) variable by name. |
| 653 | /// |
| 654 | /// @param[in] name |
| 655 | /// The name of the global or static variable we are looking |
| 656 | /// for. |
| 657 | /// |
| 658 | /// @return |
| 659 | /// An SBValue that gets filled in with the found variable (if any). |
| 660 | //------------------------------------------------------------------ |
| 661 | ") FindFirstGlobalVariable; |
| 662 | lldb::SBValue |
| 663 | FindFirstGlobalVariable (const char* name); |
| 664 | |
Carlo Kok | b77aba7 | 2014-09-19 20:12:24 +0000 | [diff] [blame^] | 665 | |
| 666 | lldb::SBValueList |
| 667 | FindGlobalVariables(const char *name, |
| 668 | uint32_t max_matches, |
| 669 | MatchType matchtype); |
| 670 | |
| 671 | lldb::SBSymbolContextList |
| 672 | FindGlobalFunctions(const char *name, |
| 673 | uint32_t max_matches, |
| 674 | MatchType matchtype); |
| 675 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 676 | void |
| 677 | Clear (); |
| 678 | |
Greg Clayton | 00e6fbf | 2011-07-22 16:46:35 +0000 | [diff] [blame] | 679 | lldb::SBAddress |
| 680 | ResolveLoadAddress (lldb::addr_t vm_addr); |
Greg Clayton | d5944cd | 2013-12-06 01:12:00 +0000 | [diff] [blame] | 681 | |
| 682 | lldb::SBAddress |
| 683 | ResolvePastLoadAddress (uint32_t stop_id, lldb::addr_t vm_addr); |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 684 | |
| 685 | SBSymbolContext |
| 686 | ResolveSymbolContextForAddress (const SBAddress& addr, |
| 687 | uint32_t resolve_scope); |
| 688 | |
| 689 | lldb::SBBreakpoint |
| 690 | BreakpointCreateByLocation (const char *file, uint32_t line); |
| 691 | |
| 692 | lldb::SBBreakpoint |
| 693 | BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line); |
| 694 | |
| 695 | lldb::SBBreakpoint |
| 696 | BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL); |
| 697 | |
| 698 | lldb::SBBreakpoint |
Jim Ingham | 2dd7f7f | 2011-10-11 01:18:55 +0000 | [diff] [blame] | 699 | BreakpointCreateByName (const char *symbol_name, |
| 700 | uint32_t func_name_type, // Logical OR one or more FunctionNameType enum bits |
| 701 | const SBFileSpecList &module_list, |
| 702 | const SBFileSpecList &comp_unit_list); |
| 703 | |
| 704 | lldb::SBBreakpoint |
Jim Ingham | fab10e8 | 2012-03-06 00:37:27 +0000 | [diff] [blame] | 705 | BreakpointCreateByNames (const char *symbol_name[], |
| 706 | uint32_t num_names, |
| 707 | uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits |
| 708 | const SBFileSpecList &module_list, |
| 709 | const SBFileSpecList &comp_unit_list); |
| 710 | |
| 711 | lldb::SBBreakpoint |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 712 | BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL); |
| 713 | |
| 714 | lldb::SBBreakpoint |
Jim Ingham | 969795f | 2011-09-21 01:17:13 +0000 | [diff] [blame] | 715 | BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpec &source_file, const char *module_name = NULL); |
| 716 | |
| 717 | lldb::SBBreakpoint |
Jim Ingham | fab10e8 | 2012-03-06 00:37:27 +0000 | [diff] [blame] | 718 | BreakpointCreateForException (lldb::LanguageType language, |
| 719 | bool catch_bp, |
| 720 | bool throw_bp); |
| 721 | |
| 722 | lldb::SBBreakpoint |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 723 | BreakpointCreateByAddress (addr_t address); |
| 724 | |
| 725 | uint32_t |
| 726 | GetNumBreakpoints () const; |
| 727 | |
| 728 | lldb::SBBreakpoint |
| 729 | GetBreakpointAtIndex (uint32_t idx) const; |
| 730 | |
| 731 | bool |
| 732 | BreakpointDelete (break_id_t break_id); |
| 733 | |
| 734 | lldb::SBBreakpoint |
| 735 | FindBreakpointByID (break_id_t break_id); |
| 736 | |
| 737 | bool |
| 738 | EnableAllBreakpoints (); |
| 739 | |
| 740 | bool |
| 741 | DisableAllBreakpoints (); |
| 742 | |
| 743 | bool |
| 744 | DeleteAllBreakpoints (); |
| 745 | |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 746 | uint32_t |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 747 | GetNumWatchpoints () const; |
| 748 | |
| 749 | lldb::SBWatchpoint |
| 750 | GetWatchpointAtIndex (uint32_t idx) const; |
| 751 | |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 752 | bool |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 753 | DeleteWatchpoint (lldb::watch_id_t watch_id); |
| 754 | |
| 755 | lldb::SBWatchpoint |
| 756 | FindWatchpointByID (lldb::watch_id_t watch_id); |
| 757 | |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 758 | bool |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 759 | EnableAllWatchpoints (); |
| 760 | |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 761 | bool |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 762 | DisableAllWatchpoints (); |
| 763 | |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 764 | bool |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 765 | DeleteAllWatchpoints (); |
| 766 | |
| 767 | lldb::SBWatchpoint |
| 768 | WatchAddress (lldb::addr_t addr, |
| 769 | size_t size, |
| 770 | bool read, |
Johnny Chen | b90827e | 2012-06-04 23:19:54 +0000 | [diff] [blame] | 771 | bool write, |
| 772 | SBError &error); |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 773 | |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 774 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 775 | lldb::SBBroadcaster |
| 776 | GetBroadcaster () const; |
Enrico Granata | 347c2aa | 2013-10-08 21:49:02 +0000 | [diff] [blame] | 777 | |
| 778 | lldb::SBValue |
| 779 | CreateValueFromAddress (const char *name, lldb::SBAddress addr, lldb::SBType type); |
Sean Callanan | 50952e9 | 2011-12-14 23:49:37 +0000 | [diff] [blame] | 780 | |
| 781 | lldb::SBInstructionList |
Greg Clayton | 9c76611 | 2012-03-06 22:24:44 +0000 | [diff] [blame] | 782 | ReadInstructions (lldb::SBAddress base_addr, uint32_t count); |
| 783 | |
| 784 | lldb::SBInstructionList |
Jim Ingham | 0f063ba | 2013-03-02 00:26:47 +0000 | [diff] [blame] | 785 | ReadInstructions (lldb::SBAddress base_addr, uint32_t count, const char *flavor_string); |
| 786 | |
| 787 | lldb::SBInstructionList |
Sean Callanan | 50952e9 | 2011-12-14 23:49:37 +0000 | [diff] [blame] | 788 | GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size); |
| 789 | |
Jim Ingham | 0f063ba | 2013-03-02 00:26:47 +0000 | [diff] [blame] | 790 | lldb::SBInstructionList |
| 791 | GetInstructionsWithFlavor (lldb::SBAddress base_addr, const char *flavor_string, const void *buf, size_t size); |
| 792 | |
Greg Clayton | e14e192 | 2012-12-04 02:22:16 +0000 | [diff] [blame] | 793 | lldb::SBSymbolContextList |
| 794 | FindSymbols (const char *name, lldb::SymbolType type = eSymbolTypeAny); |
| 795 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 796 | bool |
Greg Clayton | da7bc7d | 2011-11-13 06:57:31 +0000 | [diff] [blame] | 797 | GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 798 | |
Greg Clayton | 13fbb99 | 2013-02-01 00:47:49 +0000 | [diff] [blame] | 799 | lldb::addr_t |
| 800 | GetStackRedZoneSize(); |
| 801 | |
Enrico Granata | c338733 | 2013-05-03 01:29:27 +0000 | [diff] [blame] | 802 | bool |
| 803 | operator == (const lldb::SBTarget &rhs) const; |
| 804 | |
| 805 | bool |
| 806 | operator != (const lldb::SBTarget &rhs) const; |
| 807 | |
Greg Clayton | 4b63a5c | 2013-01-04 18:10:18 +0000 | [diff] [blame] | 808 | lldb::SBValue |
| 809 | EvaluateExpression (const char *expr, const lldb::SBExpressionOptions &options); |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 810 | %pythoncode %{ |
Greg Clayton | 6b2bd93 | 2012-02-01 08:09:32 +0000 | [diff] [blame] | 811 | class modules_access(object): |
| 812 | '''A helper object that will lazily hand out lldb.SBModule objects for a target when supplied an index, or by full or partial path.''' |
| 813 | def __init__(self, sbtarget): |
| 814 | self.sbtarget = sbtarget |
| 815 | |
| 816 | def __len__(self): |
| 817 | if self.sbtarget: |
Filipe Cabecinhas | 1a96ef8 | 2012-05-11 20:39:42 +0000 | [diff] [blame] | 818 | return int(self.sbtarget.GetNumModules()) |
Greg Clayton | 6b2bd93 | 2012-02-01 08:09:32 +0000 | [diff] [blame] | 819 | return 0 |
| 820 | |
| 821 | def __getitem__(self, key): |
| 822 | num_modules = self.sbtarget.GetNumModules() |
| 823 | if type(key) is int: |
| 824 | if key < num_modules: |
| 825 | return self.sbtarget.GetModuleAtIndex(key) |
| 826 | elif type(key) is str: |
| 827 | if key.find('/') == -1: |
| 828 | for idx in range(num_modules): |
| 829 | module = self.sbtarget.GetModuleAtIndex(idx) |
| 830 | if module.file.basename == key: |
| 831 | return module |
| 832 | else: |
| 833 | for idx in range(num_modules): |
| 834 | module = self.sbtarget.GetModuleAtIndex(idx) |
| 835 | if module.file.fullpath == key: |
| 836 | return module |
| 837 | # See if the string is a UUID |
Greg Clayton | 1fb7c62 | 2013-03-07 02:58:47 +0000 | [diff] [blame] | 838 | try: |
| 839 | the_uuid = uuid.UUID(key) |
| 840 | if the_uuid: |
| 841 | for idx in range(num_modules): |
| 842 | module = self.sbtarget.GetModuleAtIndex(idx) |
| 843 | if module.uuid == the_uuid: |
| 844 | return module |
| 845 | except: |
| 846 | return None |
Greg Clayton | 6b2bd93 | 2012-02-01 08:09:32 +0000 | [diff] [blame] | 847 | elif type(key) is uuid.UUID: |
| 848 | for idx in range(num_modules): |
| 849 | module = self.sbtarget.GetModuleAtIndex(idx) |
| 850 | if module.uuid == key: |
| 851 | return module |
| 852 | elif type(key) is re.SRE_Pattern: |
| 853 | matching_modules = [] |
| 854 | for idx in range(num_modules): |
| 855 | module = self.sbtarget.GetModuleAtIndex(idx) |
| 856 | re_match = key.search(module.path.fullpath) |
| 857 | if re_match: |
| 858 | matching_modules.append(module) |
| 859 | return matching_modules |
| 860 | else: |
| 861 | print "error: unsupported item type: %s" % type(key) |
| 862 | return None |
| 863 | |
| 864 | def get_modules_access_object(self): |
Greg Clayton | b62bb8c | 2012-02-03 03:22:53 +0000 | [diff] [blame] | 865 | '''An accessor function that returns a modules_access() object which allows lazy module access from a lldb.SBTarget object.''' |
Greg Clayton | 6b2bd93 | 2012-02-01 08:09:32 +0000 | [diff] [blame] | 866 | return self.modules_access (self) |
| 867 | |
| 868 | def get_modules_array(self): |
Greg Clayton | b62bb8c | 2012-02-03 03:22:53 +0000 | [diff] [blame] | 869 | '''An accessor function that returns a list() that contains all modules in a lldb.SBTarget object.''' |
Greg Clayton | 6b2bd93 | 2012-02-01 08:09:32 +0000 | [diff] [blame] | 870 | modules = [] |
| 871 | for idx in range(self.GetNumModules()): |
| 872 | modules.append(self.GetModuleAtIndex(idx)) |
| 873 | return modules |
| 874 | |
| 875 | __swig_getmethods__["modules"] = get_modules_array |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 876 | if _newclass: modules = property(get_modules_array, None, doc='''A read only property that returns a list() of lldb.SBModule objects contained in this target. This list is a list all modules that the target currently is tracking (the main executable and all dependent shared libraries).''') |
Greg Clayton | 6b2bd93 | 2012-02-01 08:09:32 +0000 | [diff] [blame] | 877 | |
| 878 | __swig_getmethods__["module"] = get_modules_access_object |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 879 | if _newclass: module = property(get_modules_access_object, None, doc=r'''A read only property that returns an object that implements python operator overloading with the square brackets().\n target.module[<int>] allows array access to any modules.\n target.module[<str>] allows access to modules by basename, full path, or uuid string value.\n target.module[uuid.UUID()] allows module access by UUID.\n target.module[re] allows module access using a regular expression that matches the module full path.''') |
Greg Clayton | 6b2bd93 | 2012-02-01 08:09:32 +0000 | [diff] [blame] | 880 | |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 881 | __swig_getmethods__["process"] = GetProcess |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 882 | if _newclass: process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that this target owns.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 883 | |
| 884 | __swig_getmethods__["executable"] = GetExecutable |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 885 | if _newclass: executable = property(GetExecutable, None, doc='''A read only property that returns an lldb object that represents the main executable module (lldb.SBModule) for this target.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 886 | |
| 887 | __swig_getmethods__["debugger"] = GetDebugger |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 888 | if _newclass: debugger = property(GetDebugger, None, doc='''A read only property that returns an lldb object that represents the debugger (lldb.SBDebugger) that owns this target.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 889 | |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 890 | __swig_getmethods__["num_breakpoints"] = GetNumBreakpoints |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 891 | if _newclass: num_breakpoints = property(GetNumBreakpoints, None, doc='''A read only property that returns the number of breakpoints that this target has as an integer.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 892 | |
| 893 | __swig_getmethods__["num_watchpoints"] = GetNumWatchpoints |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 894 | if _newclass: num_watchpoints = property(GetNumWatchpoints, None, doc='''A read only property that returns the number of watchpoints that this target has as an integer.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 895 | |
| 896 | __swig_getmethods__["broadcaster"] = GetBroadcaster |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 897 | if _newclass: broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this target.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 898 | |
| 899 | __swig_getmethods__["byte_order"] = GetByteOrder |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 900 | if _newclass: byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this target.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 901 | |
| 902 | __swig_getmethods__["addr_size"] = GetAddressByteSize |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 903 | if _newclass: addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this target.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 904 | |
| 905 | __swig_getmethods__["triple"] = GetTriple |
Greg Clayton | 5ef31a9 | 2012-06-29 22:00:42 +0000 | [diff] [blame] | 906 | if _newclass: triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this target as a string.''') |
Greg Clayton | 13d1950 | 2012-01-29 06:07:39 +0000 | [diff] [blame] | 907 | %} |
| 908 | |
Johnny Chen | dc7d3c1 | 2011-07-16 21:15:39 +0000 | [diff] [blame] | 909 | }; |
| 910 | |
| 911 | } // namespace lldb |