-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathLLDB Python API
More file actions
8441 lines (8277 loc) · 300 KB
/
Copy pathLLDB Python API
File metadata and controls
8441 lines (8277 loc) · 300 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(lldb) scrip help(lldb)
Help on package lldb:
NAME
lldb - The lldb module contains the public APIs for Python binding.
FILE
/System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/__init__.py
DESCRIPTION
Some of the important classes are describe here:
o SBTarget: Represents the target program running under the debugger.
o SBProcess: Represents the process associated with the target program.
o SBThread: Represents a thread of execution. SBProcess contains SBThread(s).
o SBFrame: Represents one of the stack frames associated with a thread. SBThread
contains SBFrame(s).
o SBSymbolContext: A container that stores various debugger related info.
o SBValue: Represents the value of a variable, a register, or an expression.
o SBModule: Represents an executable image and its associated object and symbol
files. SBTarget conatins SBModule(s).
o SBBreakpoint: Represents a logical breakpoint and its associated settings.
SBTarget conatins SBBreakpoint(s).
o SBSymbol: Represents the symbol possibly associated with a stack frame.
o SBCompileUnit: Represents a compilation unit, or compiled source file.
o SBFunction: Represents a generic function, which can be inlined or not.
o SBBlock: Represents a lexical block. SBFunction contains SBBlock(s).
o SBLineEntry: Specifies an association with a contiguous range of instructions
and a source file location. SBCompileUnit contains SBLineEntry(s).
PACKAGE CONTENTS
_lldb
embedded_interpreter
formatters (package)
macosx (package)
runtime (package)
utils (package)
CLASSES
__builtin__.object
SBAddress
SBAttachInfo
SBBlock
SBBreakpoint
SBBreakpointLocation
SBBroadcaster
SBCommandInterpreter
SBCommandReturnObject
SBCommunication
SBCompileUnit
SBData
SBDebugger
SBDeclaration
SBError
SBEvent
SBExpressionOptions
SBFileSpec
SBFileSpecList
SBFrame
SBFunction
SBHostOS
SBInputReader
SBInstruction
SBInstructionList
SBLaunchInfo
SBLineEntry
SBListener
SBModule
SBProcess
SBSection
SBSourceManager
SBStream
SBStringList
SBSymbol
SBSymbolContext
SBSymbolContextList
SBTarget
SBThread
SBType
SBTypeCategory
SBTypeFilter
SBTypeFormat
SBTypeList
SBTypeMember
SBTypeNameSpecifier
SBTypeSummary
SBTypeSynthetic
SBValue
SBValueList
SBWatchpoint
declaration
value
class SBAddress(__builtin__.object)
| A section + offset based address class.
|
| The SBAddress class allows addresses to be relative to a section
| that can move during runtime due to images (executables, shared
| libraries, bundles, frameworks) being loaded at different
| addresses than the addresses found in the object file that
| represents them on disk. There are currently two types of addresses
| for a section:
| o file addresses
| o load addresses
|
| File addresses represents the virtual addresses that are in the 'on
| disk' object files. These virtual addresses are converted to be
| relative to unique sections scoped to the object file so that
| when/if the addresses slide when the images are loaded/unloaded
| in memory, we can easily track these changes without having to
| update every object (compile unit ranges, line tables, function
| address ranges, lexical block and inlined subroutine address
| ranges, global and static variables) each time an image is loaded or
| unloaded.
|
| Load addresses represents the virtual addresses where each section
| ends up getting loaded at runtime. Before executing a program, it
| is common for all of the load addresses to be unresolved. When a
| DynamicLoader plug-in receives notification that shared libraries
| have been loaded/unloaded, the load addresses of the main executable
| and any images (shared libraries) will be resolved/unresolved. When
| this happens, breakpoints that are in one of these sections can be
| set/cleared.
|
| See docstring of SBFunction for example usage of SBAddress.
|
| Methods defined here:
|
| Clear(self)
| Clear(self)
|
| GetAddressClass(self)
| GetAddressClass(self) -> AddressClass
|
| GetBlock(self)
| GetBlock(self) -> SBBlock
|
| GetCompileUnit(self)
| GetCompileUnit(self) -> SBCompileUnit
|
| GetDescription(self, *args)
| GetDescription(self, SBStream description) -> bool
|
| GetFileAddress(self)
| GetFileAddress(self) -> addr_t
|
| GetFunction(self)
| GetFunction(self) -> SBFunction
|
| GetLineEntry(self)
| GetLineEntry(self) -> SBLineEntry
|
| GetLoadAddress(self, *args)
| GetLoadAddress(self, SBTarget target) -> addr_t
|
| GetModule(self)
| GetModule(self) -> SBModule
|
| GetModule() and the following grab individual objects for a given address and
| are less efficient if you want more than one symbol related objects.
| Use one of the following when you want multiple debug symbol related
| objects for an address:
| lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope);
| lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope);
| One or more bits from the SymbolContextItem enumerations can be logically
| OR'ed together to more efficiently retrieve multiple symbol objects.
|
| GetOffset(self)
| GetOffset(self) -> addr_t
|
| GetSection(self)
| GetSection(self) -> SBSection
|
| GetSymbol(self)
| GetSymbol(self) -> SBSymbol
|
| GetSymbolContext(self, *args)
| GetSymbolContext(self, uint32_t resolve_scope) -> SBSymbolContext
|
| GetSymbolContext() and the following can lookup symbol information for a given address.
| An address might refer to code or data from an existing module, or it
| might refer to something on the stack or heap. The following functions
| will only return valid values if the address has been resolved to a code
| or data address using 'void SBAddress::SetLoadAddress(...)' or
| 'lldb::SBAddress SBTarget::ResolveLoadAddress (...)'.
|
| IsValid(self)
| IsValid(self) -> bool
|
| OffsetAddress(self, *args)
| OffsetAddress(self, addr_t offset) -> bool
|
| SetAddress(self, *args)
| SetAddress(self, SBSection section, addr_t offset)
|
| SetLoadAddress(self, *args)
| SetLoadAddress(self, addr_t load_addr, SBTarget target)
|
| __del__ lambda self
|
| __eq__(self, other)
|
| __get_load_addr_property__(self)
| Get the load address for a lldb.SBAddress using the current target.
|
| __getattr__ lambda self, name
|
| __hex__(self)
| Convert the address to an hex string
|
| __init__(self, *args)
| __init__(self) -> SBAddress
| __init__(self, SBAddress rhs) -> SBAddress
| __init__(self, SBSection section, addr_t offset) -> SBAddress
| __init__(self, addr_t load_addr, SBTarget target) -> SBAddress
|
| Create an address by resolving a load address using the supplied target.
|
| __int__(self)
| Convert an address to a load address if there is a process and that process is alive, or to a file address otherwise.
|
| __ne__(self, other)
|
| __nonzero__(self)
|
| __oct__(self)
| Convert the address to an octal string
|
| __repr__ = _swig_repr(self)
|
| __set_load_addr_property__(self, load_addr)
| Set the load address for a lldb.SBAddress using the current target.
|
| __setattr__ lambda self, name, value
|
| __str__(self)
| __str__(self) -> PyObject
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| block
| A read only property that returns an lldb object that represents the block (lldb.SBBlock) that this address resides within.
|
| compile_unit
| A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) that this address resides within.
|
| file_addr
| A read only property that returns file address for the section as an integer. This is the address that represents the address as it is found in the object file that defines it.
|
| function
| A read only property that returns an lldb object that represents the function (lldb.SBFunction) that this address resides within.
|
| line_entry
| A read only property that returns an lldb object that represents the line entry (lldb.SBLineEntry) that this address resides within.
|
| load_addr
| A read/write property that gets/sets the SBAddress using load address. The setter resolves SBAddress using the SBTarget from lldb.target.
|
| module
| A read only property that returns an lldb object that represents the module (lldb.SBModule) that this address resides within.
|
| offset
| A read only property that returns the section offset in bytes as an integer.
|
| section
| A read only property that returns an lldb object that represents the section (lldb.SBSection) that this address resides within.
|
| symbol
| A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) that this address resides within.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __swig_destroy__ = <built-in function delete_SBAddress>
| delete_SBAddress(SBAddress self)
|
| __swig_getmethods__ = {'block': <function GetBlock>, 'compile_unit': <...
|
| __swig_setmethods__ = {'load_addr': <function __set_load_addr_property...
class SBAttachInfo(__builtin__.object)
| Proxy of C++ lldb::SBAttachInfo class
|
| Methods defined here:
|
| EffectiveGroupIDIsValid(self)
| EffectiveGroupIDIsValid(self) -> bool
|
| EffectiveUserIDIsValid(self)
| EffectiveUserIDIsValid(self) -> bool
|
| GetEffectiveGroupID(self)
| GetEffectiveGroupID(self) -> uint32_t
|
| GetEffectiveUserID(self)
| GetEffectiveUserID(self) -> uint32_t
|
| GetGroupID(self)
| GetGroupID(self) -> uint32_t
|
| GetIgnoreExisting(self)
| GetIgnoreExisting(self) -> bool
|
| GetParentProcessID(self)
| GetParentProcessID(self) -> pid_t
|
| GetProcessID(self)
| GetProcessID(self) -> pid_t
|
| GetProcessPluginName(self)
| GetProcessPluginName(self) -> str
|
| GetResumeCount(self)
| GetResumeCount(self) -> uint32_t
|
| GetUserID(self)
| GetUserID(self) -> uint32_t
|
| GetWaitForLaunch(self)
| GetWaitForLaunch(self) -> bool
|
| GroupIDIsValid(self)
| GroupIDIsValid(self) -> bool
|
| ParentProcessIDIsValid(self)
| ParentProcessIDIsValid(self) -> bool
|
| SetEffectiveGroupID(self, *args)
| SetEffectiveGroupID(self, uint32_t gid)
|
| SetEffectiveUserID(self, *args)
| SetEffectiveUserID(self, uint32_t uid)
|
| SetExecutable(self, *args)
| SetExecutable(self, str path)
| SetExecutable(self, SBFileSpec exe_file)
|
| SetGroupID(self, *args)
| SetGroupID(self, uint32_t gid)
|
| SetIgnoreExisting(self, *args)
| SetIgnoreExisting(self, bool b)
|
| SetParentProcessID(self, *args)
| SetParentProcessID(self, pid_t pid)
|
| SetProcessID(self, *args)
| SetProcessID(self, pid_t pid)
|
| SetProcessPluginName(self, *args)
| SetProcessPluginName(self, str plugin_name)
|
| SetResumeCount(self, *args)
| SetResumeCount(self, uint32_t c)
|
| SetUserID(self, *args)
| SetUserID(self, uint32_t uid)
|
| SetWaitForLaunch(self, *args)
| SetWaitForLaunch(self, bool b)
|
| UserIDIsValid(self)
| UserIDIsValid(self) -> bool
|
| __del__ lambda self
|
| __getattr__ lambda self, name
|
| __init__(self, *args)
| __init__(self) -> SBAttachInfo
| __init__(self, pid_t pid) -> SBAttachInfo
| __init__(self, str path, bool wait_for) -> SBAttachInfo
| __init__(self, SBAttachInfo rhs) -> SBAttachInfo
|
| __repr__ = _swig_repr(self)
|
| __setattr__ lambda self, name, value
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __swig_destroy__ = <built-in function delete_SBAttachInfo>
| delete_SBAttachInfo(SBAttachInfo self)
|
| __swig_getmethods__ = {}
|
| __swig_setmethods__ = {}
class SBBlock(__builtin__.object)
| Represents a lexical block. SBFunction contains SBBlock(s).
|
| Methods defined here:
|
| GetContainingInlinedBlock(self)
| GetContainingInlinedBlock(self) -> SBBlock
|
| Get the inlined block that is or contains this block.
|
| GetDescription(self, *args)
| GetDescription(self, SBStream description) -> bool
|
| GetFirstChild(self)
| GetFirstChild(self) -> SBBlock
|
| Get the first child block.
|
| GetInlinedCallSiteColumn(self)
| GetInlinedCallSiteColumn(self) -> uint32_t
|
| Get the call site column if this block represents an inlined function;
| otherwise, return 0.
|
| GetInlinedCallSiteFile(self)
| GetInlinedCallSiteFile(self) -> SBFileSpec
|
| Get the call site file if this block represents an inlined function;
| otherwise, return an invalid file spec.
|
| GetInlinedCallSiteLine(self)
| GetInlinedCallSiteLine(self) -> uint32_t
|
| Get the call site line if this block represents an inlined function;
| otherwise, return 0.
|
| GetInlinedName(self)
| GetInlinedName(self) -> str
|
| Get the function name if this block represents an inlined function;
| otherwise, return None.
|
| GetNumRanges(self)
| GetNumRanges(self) -> uint32_t
|
| GetParent(self)
| GetParent(self) -> SBBlock
|
| Get the parent block.
|
| GetRangeEndAddress(self, *args)
| GetRangeEndAddress(self, uint32_t idx) -> SBAddress
|
| GetRangeIndexForBlockAddress(self, *args)
| GetRangeIndexForBlockAddress(self, SBAddress block_addr) -> uint32_t
|
| GetRangeStartAddress(self, *args)
| GetRangeStartAddress(self, uint32_t idx) -> SBAddress
|
| GetSibling(self)
| GetSibling(self) -> SBBlock
|
| Get the sibling block for this block.
|
| GetVariables(self, *args)
| GetVariables(self, SBFrame frame, bool arguments, bool locals, bool statics,
| DynamicValueType use_dynamic) -> SBValueList
| GetVariables(self, SBTarget target, bool arguments, bool locals, bool statics) -> SBValueList
|
| IsInlined(self)
| IsInlined(self) -> bool
|
| Does this block represent an inlined function?
|
| IsValid(self)
| IsValid(self) -> bool
|
| __del__ lambda self
|
| __getattr__ lambda self, name
|
| __init__(self, *args)
| __init__(self) -> SBBlock
| __init__(self, SBBlock rhs) -> SBBlock
|
| __nonzero__(self)
|
| __repr__ = _swig_repr(self)
|
| __setattr__ lambda self, name, value
|
| __str__(self)
| __str__(self) -> PyObject
|
| get_call_site(self)
|
| get_range_at_index(self, idx)
|
| get_ranges_access_object(self)
| An accessor function that returns a ranges_access() object which allows lazy block address ranges access.
|
| get_ranges_array(self)
| An accessor function that returns an array object that contains all ranges in this block object.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| call_site
| A read only property that returns a lldb.declaration object that contains the inlined call site file, line and column.
|
| first_child
| A read only property that returns the same result as GetFirstChild().
|
| inlined_block
| A read only property that returns the same result as GetContainingInlinedBlock().
|
| name
| A read only property that returns the same result as GetInlinedName().
|
| num_ranges
| A read only property that returns the same result as GetNumRanges().
|
| parent
| A read only property that returns the same result as GetParent().
|
| range
| A read only property that allows item access to the address ranges for a block by integer (range = block.range[0]) and by lldb.SBAdddress (find the range that contains the specified lldb.SBAddress like "pc_range = lldb.frame.block.range[frame.addr]").
|
| ranges
| A read only property that returns a list() object that contains all of the address ranges for the block.
|
| sibling
| A read only property that returns the same result as GetSibling().
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __swig_destroy__ = <built-in function delete_SBBlock>
| delete_SBBlock(SBBlock self)
|
| __swig_getmethods__ = {'call_site': <function get_call_site>, 'first_c...
|
| __swig_setmethods__ = {}
|
| ranges_access = <class 'lldb.ranges_access'>
| A helper object that will lazily hand out an array of lldb.SBAddress that represent address ranges for a block.
class SBBreakpoint(__builtin__.object)
| Represents a logical breakpoint and its associated settings.
|
| For example (from test/functionalities/breakpoint/breakpoint_ignore_count/
| TestBreakpointIgnoreCount.py),
|
| def breakpoint_ignore_count_python(self):
| '''Use Python APIs to set breakpoint ignore count.'''
| exe = os.path.join(os.getcwd(), 'a.out')
|
| # Create a target by the debugger.
| target = self.dbg.CreateTarget(exe)
| self.assertTrue(target, VALID_TARGET)
|
| # Now create a breakpoint on main.c by name 'c'.
| breakpoint = target.BreakpointCreateByName('c', 'a.out')
| self.assertTrue(breakpoint and
| breakpoint.GetNumLocations() == 1,
| VALID_BREAKPOINT)
|
| # Get the breakpoint location from breakpoint after we verified that,
| # indeed, it has one location.
| location = breakpoint.GetLocationAtIndex(0)
| self.assertTrue(location and
| location.IsEnabled(),
| VALID_BREAKPOINT_LOCATION)
|
| # Set the ignore count on the breakpoint location.
| location.SetIgnoreCount(2)
| self.assertTrue(location.GetIgnoreCount() == 2,
| 'SetIgnoreCount() works correctly')
|
| # Now launch the process, and do not stop at entry point.
| process = target.LaunchSimple(None, None, os.getcwd())
| self.assertTrue(process, PROCESS_IS_VALID)
|
| # Frame#0 should be on main.c:37, frame#1 should be on main.c:25, and
| # frame#2 should be on main.c:48.
| #lldbutil.print_stacktraces(process)
| from lldbutil import get_stopped_thread
| thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
| self.assertTrue(thread != None, 'There should be a thread stopped due to breakpoint')
| frame0 = thread.GetFrameAtIndex(0)
| frame1 = thread.GetFrameAtIndex(1)
| frame2 = thread.GetFrameAtIndex(2)
| self.assertTrue(frame0.GetLineEntry().GetLine() == self.line1 and
| frame1.GetLineEntry().GetLine() == self.line3 and
| frame2.GetLineEntry().GetLine() == self.line4,
| STOPPED_DUE_TO_BREAKPOINT_IGNORE_COUNT)
|
| # The hit count for the breakpoint should be 3.
| self.assertTrue(breakpoint.GetHitCount() == 3)
|
| process.Continue()
|
| SBBreakpoint supports breakpoint location iteration, for example,
|
| for bl in breakpoint:
| print 'breakpoint location load addr: %s' % hex(bl.GetLoadAddress())
| print 'breakpoint location condition: %s' % hex(bl.GetCondition())
|
| and rich comparion methods which allow the API program to use,
|
| if aBreakpoint == bBreakpoint:
| ...
|
| to compare two breakpoints for equality.
|
| Methods defined here:
|
| ClearAllBreakpointSites(self)
| ClearAllBreakpointSites(self)
|
| FindLocationByAddress(self, *args)
| FindLocationByAddress(self, addr_t vm_addr) -> SBBreakpointLocation
|
| FindLocationByID(self, *args)
| FindLocationByID(self, break_id_t bp_loc_id) -> SBBreakpointLocation
|
| FindLocationIDByAddress(self, *args)
| FindLocationIDByAddress(self, addr_t vm_addr) -> break_id_t
|
| GetCondition(self)
| GetCondition(self) -> str
|
| Get the condition expression for the breakpoint.
|
| GetDescription(self, *args)
| GetDescription(self, SBStream description) -> bool
|
| GetHitCount(self)
| GetHitCount(self) -> uint32_t
|
| GetID(self)
| GetID(self) -> break_id_t
|
| GetIgnoreCount(self)
| GetIgnoreCount(self) -> uint32_t
|
| GetLocationAtIndex(self, *args)
| GetLocationAtIndex(self, uint32_t index) -> SBBreakpointLocation
|
| GetNumLocations(self)
| GetNumLocations(self) -> size_t
|
| GetNumResolvedLocations(self)
| GetNumResolvedLocations(self) -> size_t
|
| GetQueueName(self)
| GetQueueName(self) -> str
|
| GetThreadID(self)
| GetThreadID(self) -> tid_t
|
| GetThreadIndex(self)
| GetThreadIndex(self) -> uint32_t
|
| GetThreadName(self)
| GetThreadName(self) -> str
|
| IsEnabled(self)
| IsEnabled(self) -> bool
|
| IsInternal(self)
| IsInternal(self) -> bool
|
| IsOneShot(self)
| IsOneShot(self) -> bool
|
| IsValid(self)
| IsValid(self) -> bool
|
| SetCallback(self, *args)
| SetCallback(self, BreakpointHitCallback callback, void baton)
|
| SetCondition(self, *args)
| SetCondition(self, str condition)
|
| The breakpoint stops only if the condition expression evaluates to true.
|
| SetEnabled(self, *args)
| SetEnabled(self, bool enable)
|
| SetIgnoreCount(self, *args)
| SetIgnoreCount(self, uint32_t count)
|
| SetOneShot(self, *args)
| SetOneShot(self, bool one_shot)
|
| SetQueueName(self, *args)
| SetQueueName(self, str queue_name)
|
| SetThreadID(self, *args)
| SetThreadID(self, tid_t sb_thread_id)
|
| SetThreadIndex(self, *args)
| SetThreadIndex(self, uint32_t index)
|
| SetThreadName(self, *args)
| SetThreadName(self, str thread_name)
|
| __del__ lambda self
|
| __eq__(self, other)
|
| __getattr__ lambda self, name
|
| __init__(self, *args)
| __init__(self) -> SBBreakpoint
| __init__(self, SBBreakpoint rhs) -> SBBreakpoint
|
| __iter__(self)
|
| __len__(self)
|
| __ne__(self, other)
|
| __nonzero__(self)
|
| __repr__ = _swig_repr(self)
|
| __setattr__ lambda self, name, value
|
| __str__(self)
| __str__(self) -> PyObject
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| EventIsBreakpointEvent(*args)
| EventIsBreakpointEvent(SBEvent event) -> bool
|
| GetBreakpointEventTypeFromEvent(*args)
| GetBreakpointEventTypeFromEvent(SBEvent event) -> BreakpointEventType
|
| GetBreakpointFromEvent(*args)
| GetBreakpointFromEvent(SBEvent event) -> SBBreakpoint
|
| GetBreakpointLocationAtIndexFromEvent(*args)
| GetBreakpointLocationAtIndexFromEvent(SBEvent event, uint32_t loc_idx) -> SBBreakpointLocation
|
| GetNumBreakpointLocationsFromEvent(*args)
| GetNumBreakpointLocationsFromEvent(SBEvent event_sp) -> uint32_t
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __swig_destroy__ = <built-in function delete_SBBreakpoint>
| delete_SBBreakpoint(SBBreakpoint self)
|
| __swig_getmethods__ = {'EventIsBreakpointEvent': <function <lambda>>, ...
|
| __swig_setmethods__ = {}
class SBBreakpointLocation(__builtin__.object)
| Represents one unique instance (by address) of a logical breakpoint.
|
| A breakpoint location is defined by the breakpoint that produces it,
| and the address that resulted in this particular instantiation.
| Each breakpoint location has its settable options.
|
| SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint
| for retrieval of an SBBreakpointLocation from an SBBreakpoint.
|
| Methods defined here:
|
| GetAddress(self)
| GetAddress(self) -> SBAddress
|
| GetBreakpoint(self)
| GetBreakpoint(self) -> SBBreakpoint
|
| GetCondition(self)
| GetCondition(self) -> str
|
| Get the condition expression for the breakpoint location.
|
| GetDescription(self, *args)
| GetDescription(self, SBStream description, DescriptionLevel level) -> bool
|
| GetID(self)
| GetID(self) -> break_id_t
|
| GetIgnoreCount(self)
| GetIgnoreCount(self) -> uint32_t
|
| GetLoadAddress(self)
| GetLoadAddress(self) -> addr_t
|
| GetQueueName(self)
| GetQueueName(self) -> str
|
| GetThreadID(self)
| GetThreadID(self) -> tid_t
|
| GetThreadIndex(self)
| GetThreadIndex(self) -> uint32_t
|
| GetThreadName(self)
| GetThreadName(self) -> str
|
| IsEnabled(self)
| IsEnabled(self) -> bool
|
| IsResolved(self)
| IsResolved(self) -> bool
|
| IsValid(self)
| IsValid(self) -> bool
|
| SetCondition(self, *args)
| SetCondition(self, str condition)
|
| The breakpoint location stops only if the condition expression evaluates
| to true.
|
| SetEnabled(self, *args)
| SetEnabled(self, bool enabled)
|
| SetIgnoreCount(self, *args)
| SetIgnoreCount(self, uint32_t n)
|
| SetQueueName(self, *args)
| SetQueueName(self, str queue_name)
|
| SetThreadID(self, *args)
| SetThreadID(self, tid_t sb_thread_id)
|
| SetThreadIndex(self, *args)
| SetThreadIndex(self, uint32_t index)
|
| SetThreadName(self, *args)
| SetThreadName(self, str thread_name)
|
| __del__ lambda self
|
| __getattr__ lambda self, name
|
| __init__(self, *args)
| __init__(self) -> SBBreakpointLocation
| __init__(self, SBBreakpointLocation rhs) -> SBBreakpointLocation
|
| __nonzero__(self)
|
| __repr__ = _swig_repr(self)
|
| __setattr__ lambda self, name, value
|
| __str__(self)
| __str__(self) -> PyObject
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __swig_destroy__ = <built-in function delete_SBBreakpointLocation>
| delete_SBBreakpointLocation(SBBreakpointLocation self)
|
| __swig_getmethods__ = {}
|
| __swig_setmethods__ = {}
class SBBroadcaster(__builtin__.object)
| Represents an entity which can broadcast events. A default broadcaster is
| associated with an SBCommandInterpreter, SBProcess, and SBTarget. For
| example, use
|
| broadcaster = process.GetBroadcaster()
|
| to retrieve the process's broadcaster.
|
| See also SBEvent for example usage of interacting with a broadcaster.
|
| Methods defined here:
|
| AddInitialEventsToListener(self, *args)
| AddInitialEventsToListener(self, SBListener listener, uint32_t requested_events)
|
| AddListener(self, *args)
| AddListener(self, SBListener listener, uint32_t event_mask) -> uint32_t
|
| BroadcastEvent(self, *args)
| BroadcastEvent(self, SBEvent event, bool unique = False)
| BroadcastEvent(self, SBEvent event)
|
| BroadcastEventByType(self, *args)
| BroadcastEventByType(self, uint32_t event_type, bool unique = False)
| BroadcastEventByType(self, uint32_t event_type)
|
| Clear(self)
| Clear(self)
|
| EventTypeHasListeners(self, *args)
| EventTypeHasListeners(self, uint32_t event_type) -> bool
|
| GetName(self)
| GetName(self) -> str
|
| IsValid(self)
| IsValid(self) -> bool
|
| RemoveListener(self, *args)
| RemoveListener(self, SBListener listener, uint32_t event_mask = 4294967295U) -> bool
| RemoveListener(self, SBListener listener) -> bool
|
| __del__ lambda self
|
| __getattr__ lambda self, name
|
| __init__(self, *args)
| __init__(self) -> SBBroadcaster
| __init__(self, str name) -> SBBroadcaster
| __init__(self, SBBroadcaster rhs) -> SBBroadcaster
|
| __nonzero__(self)
|
| __repr__ = _swig_repr(self)
|
| __setattr__ lambda self, name, value
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __swig_destroy__ = <built-in function delete_SBBroadcaster>
| delete_SBBroadcaster(SBBroadcaster self)
|
| __swig_getmethods__ = {}
|
| __swig_setmethods__ = {}
class SBCommandInterpreter(__builtin__.object)
| SBCommandInterpreter handles/interprets commands for lldb. You get the
| command interpreter from the SBDebugger instance. For example (from test/
| python_api/interpreter/TestCommandInterpreterAPI.py),
|
| def command_interpreter_api(self):
| '''Test the SBCommandInterpreter APIs.'''
| exe = os.path.join(os.getcwd(), 'a.out')
|
| # Create a target by the debugger.
| target = self.dbg.CreateTarget(exe)
| self.assertTrue(target, VALID_TARGET)
|
| # Retrieve the associated command interpreter from our debugger.
| ci = self.dbg.GetCommandInterpreter()
| self.assertTrue(ci, VALID_COMMAND_INTERPRETER)
|
| # Exercise some APIs....
|
| self.assertTrue(ci.HasCommands())
| self.assertTrue(ci.HasAliases())
| self.assertTrue(ci.HasAliasOptions())
| self.assertTrue(ci.CommandExists('breakpoint'))
| self.assertTrue(ci.CommandExists('target'))
| self.assertTrue(ci.CommandExists('platform'))
| self.assertTrue(ci.AliasExists('file'))
| self.assertTrue(ci.AliasExists('run'))