forked from yavfast/dbg-spider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uMain.pas
7437 lines (6405 loc) · 221 KB
/
uMain.pas
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
unit uMain;
interface
uses
Windows, uShareData, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Mask, ExtCtrls, ComCtrls, ActnList, DebugInfo,
Grids, VirtualTrees, GdiPlus, GdiPlusHelpers,
Debuger, DebugerTypes, DelphiDebugInfo,
PlatformDefaultStyleActnCtrls, ActnMan, Ribbon, RibbonLunaStyleActnCtrls,
RibbonSilverStyleActnCtrls, ToolWin, ActnCtrls, ActnMenus,
RibbonActnMenus, ImgList, ActnColorMaps, XPMan,
uActionController, uSpiderOptions, System.Actions,
Vcl.Menus, uUpdateInfo, uSourceViewFrame;
type
TProgectType = (ptEmpty, ptSpider, ptApplication, ptDebugInfo);
TLinkType = (ltNone = 0, ltProject, ltProcess, ltThread, ltMemInfo, ltMemStack, ltExceptInfo, ltExceptStack,
ltDbgUnitGroup, ltDbgUnitInfo, ltDbgConstInfo, ltDbgTypeInfo, ltDbgVarInfo, ltDbgFuncInfo, ltDbgStructMemberInfo,
ltDbgFuncParamInfo, ltDbgLogItem, ltTrackFuncInfo, ltTrackUnitInfo, ltTrackCallFuncInfo,
ltSpiderInfo, ltVersionInfo, ltChangeLogItemInfo, ltSyncObjInfo, ltSyncObjChildInfo, ltSyncObjStack);
PLinkData = ^TLinkData;
TLinkData = record
SyncNode: PVirtualNode;
case LinkType: TLinkType of
ltNone:
();
ltProject:
();
ltProcess:
(ProcessData: TProcessData);
ltThread:
(ThreadData: PThreadData);
ltMemInfo:
(MemPtr: Pointer);
ltMemStack:
(MemStackPtr: Pointer);
ltExceptInfo:
(ExceptInfo: TExceptInfo);
ltExceptStack:
(ExceptStackEntry: TStackEntry);
ltDbgUnitGroup:
(DbgUnitGroupType: TUnitType);
ltDbgUnitInfo:
(DbgUnitInfo: TUnitInfo);
ltDbgConstInfo:
(DbgConstInfo: TConstInfo);
ltDbgTypeInfo:
(DbgTypeInfo: TTypeInfo);
ltDbgVarInfo:
(DbgVarInfo: TVarInfo);
ltDbgFuncInfo:
(DbgFuncInfo: TFuncInfo);
ltDbgStructMemberInfo:
(DbgStructMemberInfo: TStructMember);
ltDbgFuncParamInfo:
(DbgFuncParamInfo: TVarInfo);
ltDbgLogItem:
(DbgLogItemIdx: Integer);
ltTrackFuncInfo:
(TrackFuncInfo: TTrackFuncInfo);
ltTrackUnitInfo:
(TrackUnitInfo: TTrackUnitInfo);
ltTrackCallFuncInfo:
(TrackCallFuncInfo: TCallFuncInfo);
ltSpiderInfo:
();
ltVersionInfo:
(VersionInfo: TChangeLogVersionInfo);
ltChangeLogItemInfo:
(ChangeLogItem: TChangeLogItem);
ltSyncObjInfo, ltSyncObjChildInfo:
(SyncObjItem: PSyncObjsInfo);
ltSyncObjStack:
(SyncObjStackPtr: Pointer);
end;
TCheckFunc = function(LinkData: PLinkData; CmpData: Pointer): LongBool;
TMainForm = class(TForm)
acAbout: TAction;
acAddressInfo: TAction;
acAppOpen: TAction;
acAttachProcess: TAction;
acCALLMethod: TAction;
acCloseProject: TAction;
acCodeTrackHistoryBack: TAction;
acCodeTracking: TAction;
acCodeTrackRefresh: TAction;
acContinue: TAction;
acCopy: TAction;
acCPUTimeLine: TAction;
acDebugInfo: TAction;
acDebugOptions: TAction;
acEditProject: TAction;
acExcepInfoRefresh: TAction;
acExceptionCallStack: TAction;
acExceptions: TAction;
acExit: TAction;
acFeedback: TAction;
acFunc0: TAction;
acFunc1: TAction;
acFunc2: TAction;
acFunc3: TAction;
acFunc4: TAction;
acFunc5: TAction;
acFunc6: TAction;
acFunc7: TAction;
acFunc8: TAction;
acFunc9: TAction;
acLockTracking: TAction;
acLockTrackingRefresh: TAction;
acMemInfoCallStack: TAction;
acMemInfoDblFree: TAction;
acMemInfoHistory: TAction;
acMemInfoRefresh: TAction;
acMemoryInfo: TAction;
acNewProject: TAction;
acOpenProject: TAction;
acOpenSite: TAction;
acOptions: TAction;
acParentViewSource: TAction;
acPause: TAction;
acPauseContinue: TAction;
acProcessTimeline: TAction;
acRealTimeLine: TAction;
acRecent0: TAction;
acRecent1: TAction;
acRecent2: TAction;
acRecent3: TAction;
acRecent4: TAction;
acRecent5: TAction;
acRecent6: TAction;
acRecent7: TAction;
acRecent8: TAction;
acRecent9: TAction;
acRecentProjects: TAction;
acRun: TAction;
acRunStop: TAction;
acSamplingMethod: TAction;
acSave: TAction;
acSaveCopy: TAction;
acStatusDbgInfo: TAction;
acStatusDebuger: TAction;
acStausEventCount: TAction;
acStepInto: TAction;
acStepOut: TAction;
acStepOver: TAction;
acStop: TAction;
acTabCodeTracking: TAction;
acTabDebugInfo: TAction;
acTabExceptions: TAction;
acTabLockTracking: TAction;
acTabLog: TAction;
acTabMemoryInfo: TAction;
acTabTimeline: TAction;
acTabUpdateInfo: TAction;
actbCodeTrackingInfo: TActionToolBar;
actbExceptionInfo: TActionToolBar;
actbLockTracking: TActionToolBar;
actbMainTabs: TActionToolBar;
actbMemInfo: TActionToolBar;
actbUpdateInfo: TActionToolBar;
acTrackSystemUnits: TAction;
acUseShortNames: TAction;
acViewSyncObjsOnTimeLine: TAction;
AL: TActionList;
alCodeTrackHistory: TActionList;
alRecent: TActionList;
amMain: TActionManager;
cbCodeTrackingInfo: TCoolBar;
cbExceptionInfo: TCoolBar;
cbLockTracking: TCoolBar;
cbMainTabs: TCoolBar;
cbMemInfo: TCoolBar;
cbStatusInfo: TCoolBar;
cbUpdateInfo: TCoolBar;
lbStateEventCntLabel: TLabel;
lbStatusAction: TLabel;
lbStatusDbgInfoLabel: TLabel;
lbStatusDbgInfoValue: TLabel;
lbStatusDbgStateLabel: TLabel;
lbStatusDbgStateValue: TLabel;
lbStatusEventsCntValue: TLabel;
lbStatusTrackEventCntLabel: TLabel;
lbStatusTrackEventCntValue: TLabel;
mnViewSource: TMenuItem;
OD: TFileOpenDialog;
p2: TPanel;
pbProgress: TProgressBar;
pcDbgInfoDetail: TPageControl;
pcLockTrackingLinks: TPageControl;
pcMain: TPageControl;
pcMemInfo: TPageControl;
pcMemInfoFuncInfo: TPageControl;
pCodeTrackingInfo: TPanel;
pcTrackFuncAdv: TPageControl;
pDbgInfoDetail: TPanel;
pDbgInfoFuncAdv: TPanel;
pExceptInfoAdv: TPanel;
pExceptionInfo: TPanel;
pLockTrackingAdv: TPanel;
pLockTrackingInfo: TPanel;
pLockTrackingLinks: TPanel;
pMemInfoButtom: TPanel;
pMemInfoClient: TPanel;
pMemInfoFuncLinks: TPanel;
pMemInfoTreeLeft: TPanel;
pMemoryInfoAdv: TPanel;
pmTrackFuncAdvParents: TPopupMenu;
pnl1: TPanel;
pnl2: TPanel;
pStatusBar: TPanel;
pStatusDbgInfo: TPanel;
pStatusDbgState: TPanel;
pStatusEventCnt: TPanel;
pStatusTrackEventCnt: TPanel;
pTrackAdv: TPanel;
pTrackFuncAdv: TPanel;
rbambMain: TRibbonApplicationMenuBar;
rbgApplication: TRibbonGroup;
rbgProject: TRibbonGroup;
rbngrpCodeTracking: TRibbonGroup;
rbngrpDbgInfoOptions: TRibbonGroup;
rbngrpDebug: TRibbonGroup;
rbngrpExceptionOptions: TRibbonGroup;
rbngrpFeedback: TRibbonGroup;
rbngrpLockTracking: TRibbonGroup;
rbngrpMemInfoOptions: TRibbonGroup;
rbngrpProfilers: TRibbonGroup;
rbngrpTimeLineSettings: TRibbonGroup;
rbnMain: TRibbon;
rbnpgOptions: TRibbonPage;
rbpMain: TRibbonPage;
rbqtbMain: TRibbonQuickAccessToolbar;
spl1: TSplitter;
spl2: TSplitter;
spl3: TSplitter;
spl4: TSplitter;
splCodeTrack1: TSplitter;
splCodeTrack2: TSplitter;
splDbgInfoFuncAdv: TSplitter;
splDbgInfoFuncs: TSplitter;
splDebugInfo: TSplitter;
splExceptInfo: TSplitter;
splExceptInfo2: TSplitter;
splExceptInfoAdv: TSplitter;
splLockTrack1: TSplitter;
splLockTrack2: TSplitter;
splLockTrack3: TSplitter;
splMemInfo: TSplitter;
splMemInfoAdv: TSplitter;
splMemInfoSmpView: TSplitter;
splMemInfoTreeView1: TSplitter;
splMemInfoTreeView2: TSplitter;
splTrackFuncAdv: TSplitter;
svfDbgInfoFuncAdv: TSourceViewFrame;
svfDbgInfoUnitSource: TSourceViewFrame;
svfExceptInfoSource: TSourceViewFrame;
svfLockTrackingSource: TSourceViewFrame;
svfMemInfoFuncSrc: TSourceViewFrame;
svfMemInfoSource: TSourceViewFrame;
svfTrackFuncAdvSource: TSourceViewFrame;
tmrThreadsUpdate: TTimer;
ts1: TTabSheet;
ts2: TTabSheet;
tsCodeTracking: TTabSheet;
tsDbgUnitConsts: TTabSheet;
tsDbgUnitFunctions: TTabSheet;
tsDbgUnitSource: TTabSheet;
tsDbgUnitTypes: TTabSheet;
tsDbgUnitVars: TTabSheet;
tsDebugInfo: TTabSheet;
tsExceptions: TTabSheet;
tsLockTracking: TTabSheet;
tsLog: TTabSheet;
tsMemInfo: TTabSheet;
tsMemInfoFuncLinks: TTabSheet;
tsMemInfoFuncSrc: TTabSheet;
tsMemInfoTreeView: TTabSheet;
tsMemInfoViewStack: TTabSheet;
tsThreads1: TTabSheet;
tsTrackFuncAdvLinks: TTabSheet;
tsTrackFuncAdvSrc: TTabSheet;
tsUpdateInfo: TTabSheet;
vdtTimeLine: TVirtualDrawTree;
vstDbgInfoConsts: TVirtualStringTree;
vstDbgInfoFunctions: TVirtualStringTree;
vstDbgInfoFuncVars: TVirtualStringTree;
vstDbgInfoTypes: TVirtualStringTree;
vstDbgInfoUnits: TVirtualStringTree;
vstDbgInfoVars: TVirtualStringTree;
vstExceptionCallStack: TVirtualStringTree;
vstExceptionList: TVirtualStringTree;
vstExceptionThreads: TVirtualStringTree;
vstLockThreads: TVirtualStringTree;
vstLockTrackingChilds: TVirtualStringTree;
vstLockTrackingList: TVirtualStringTree;
vstLockTrackingParents: TVirtualStringTree;
vstLockTrackingSyncObjs: TVirtualStringTree;
vstLockTrackingSyncObjStack: TVirtualStringTree;
vstLog: TVirtualStringTree;
vstMemInfoFuncChilds: TVirtualStringTree;
vstMemInfoFuncParents: TVirtualStringTree;
vstMemInfoFuncTree: TVirtualStringTree;
vstMemInfoObjects: TVirtualStringTree;
vstMemInfoObjStack: TVirtualStringTree;
vstMemInfoThreads: TVirtualStringTree;
vstMemList: TVirtualStringTree;
vstMemStack: TVirtualStringTree;
vstThreads: TVirtualStringTree;
vstTrackFuncChilds: TVirtualStringTree;
vstTrackFuncParent: TVirtualStringTree;
vstTrackFuncs: TVirtualStringTree;
vstTrackThreads: TVirtualStringTree;
vstUpdateInfo: TVirtualStringTree;
pmVirtualTreeView: TPopupMenu;
mnuCollapseAll: TMenuItem;
acCollapseAll: TAction;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure vstThreadsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstThreadsDrawText(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
const Text: string; const CellRect: TRect; var DefaultDraw: Boolean);
procedure vstThreadsGetNodeDataSize(Sender: TBaseVirtualTree; var NodeDataSize: Integer);
procedure vstThreadsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstThreadsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstThreadsScroll(Sender: TBaseVirtualTree; DeltaX, DeltaY: Integer);
procedure vstThreadsCollapsed(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstThreadsExpanded(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstColumnResize(Sender: TVTHeader; Column: TColumnIndex);
procedure vdtTimeLineDrawNode(Sender: TBaseVirtualTree; const PaintInfo: TVTPaintInfo);
procedure vdtTimeLineAdvancedHeaderDraw(Sender: TVTHeader; var PaintInfo: THeaderPaintInfo; const Elements: THeaderPaintElements);
procedure vdtTimeLineHeaderDrawQueryElements(Sender: TVTHeader; var PaintInfo: THeaderPaintInfo; var Elements: THeaderPaintElements);
procedure vdtTimeLineScroll(Sender: TBaseVirtualTree; DeltaX, DeltaY: Integer);
procedure vdtTimeLineChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vdtTimeLinePaintBackground(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; R: TRect; var Handled: Boolean);
procedure vstMemInfoThreadsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstMemInfoThreadsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstMemListGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstMemListFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstMemInfoFuncTreeGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstMemInfoFuncTreeFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstMemInfoFuncTreeCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstMemInfoFuncLinksGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstMemInfoFuncParentsDblClick(Sender: TObject);
procedure vstMemInfoObjectsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstMemInfoObjectsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstMemInfoObjectsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstMemStackGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstMemStackFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstExceptionThreadsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstExceptionThreadsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstExceptionListGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstExceptionListFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstExceptionCallStackGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstExceptionCallStackFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstDbgInfoUnitsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstDbgInfoUnitsDrawText(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
const Text: string; const CellRect: TRect; var DefaultDraw: Boolean);
procedure vstDbgInfoUnitsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstDbgInfoUnitsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstDbgInfoUnitsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstDbgInfoConstsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstDbgInfoConstsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstDbgInfoConstsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstDbgInfoTypesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstDbgInfoTypesCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstDbgInfoTypesIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstDbgInfoVarsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstDbgInfoVarsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstDbgInfoVarsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstDbgInfoFunctionsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstDbgInfoFunctionsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstDbgInfoFunctionsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstDbgInfoFunctionsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstDbgInfoFuncVarsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstLogGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstLogDrawText(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
const Text: string; const CellRect: TRect; var DefaultDraw: Boolean);
procedure vstLogResize(Sender: TObject);
procedure vstLogColumnResize(Sender: TVTHeader; Column: TColumnIndex);
procedure vstTrackThreadsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstTrackThreadsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstTrackThreadsFocusChanging(Sender: TBaseVirtualTree; OldNode, NewNode: PVirtualNode; OldColumn, NewColumn: TColumnIndex;
var Allowed: Boolean);
procedure vstTrackFuncsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstTrackFuncsDrawText(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
const Text: string; const CellRect: TRect; var DefaultDraw: Boolean);
procedure vstTrackFuncsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstTrackFuncsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstTrackFuncsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstTrackFuncsFocusChanging(Sender: TBaseVirtualTree; OldNode, NewNode: PVirtualNode; OldColumn, NewColumn: TColumnIndex;
var Allowed: Boolean);
procedure vstTrackFuncParentGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstTrackFuncParentDblClick(Sender: TObject);
procedure vstTrackFuncChildsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstTrackFuncChildsDblClick(Sender: TObject);
procedure vstTrackFuncChildsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstTrackFuncChildsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstTrackFuncLinksDrawText(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
const Text: string; const CellRect: TRect; var DefaultDraw: Boolean);
procedure vstUpdateInfoGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstUpdateInfoDrawText(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
const Text: string; const CellRect: TRect; var DefaultDraw: Boolean);
procedure vstLockThreadsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstLockThreadsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstLockThreadsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstLockThreadsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstLockTrackingChildsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstLockTrackingChildsDblClick(Sender: TObject);
procedure vstLockTrackingChildsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstLockTrackingLinksGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstLockTrackingListCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstLockTrackingListFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstLockTrackingListGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstLockTrackingListIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstLockTrackingParentsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstLockTrackingParentsDblClick(Sender: TObject);
procedure vstLockTrackingParentsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstLockTrackingSyncObjsCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstLockTrackingSyncObjsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
procedure vstLockTrackingSyncObjsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstLockTrackingSyncObjsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstLockTrackingSyncObjStackCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure vstLockTrackingSyncObjStackDblClick(Sender: TObject);
procedure vstLockTrackingSyncObjStackGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
procedure vstLockTrackingSyncObjStackIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
procedure vstTreeResize(Sender: TObject);
procedure tmrThreadsUpdateTimer(Sender: TObject);
procedure cbCPUTimeLineClick(Sender: TObject);
procedure acAppOpenExecute(Sender: TObject);
procedure acAttachProcessExecute(Sender: TObject);
procedure acRunExecute(Sender: TObject);
procedure acStopExecute(Sender: TObject);
procedure acPauseExecute(Sender: TObject);
procedure acContinueExecute(Sender: TObject);
procedure acStepIntoExecute(Sender: TObject);
procedure acStepOverExecute(Sender: TObject);
procedure acStepOutExecute(Sender: TObject);
procedure acOptionsExecute(Sender: TObject);
procedure acExitExecute(Sender: TObject);
procedure acCPUTimeLineExecute(Sender: TObject);
procedure acRealTimeLineExecute(Sender: TObject);
procedure acMainTabExecute(Sender: TObject);
procedure acOpenProjectExecute(Sender: TObject);
procedure acCloseProjectExecute(Sender: TObject);
procedure acNewProjectExecute(Sender: TObject);
procedure acRecentExecute(Sender: TObject);
procedure acEditProjectExecute(Sender: TObject);
procedure acSaveCopyExecute(Sender: TObject);
procedure acUseShortNamesExecute(Sender: TObject);
procedure acCodeTrackingExecute(Sender: TObject);
procedure acTrackSystemUnitsExecute(Sender: TObject);
procedure acParentViewSourceExecute(Sender: TObject);
procedure acMemoryInfoExecute(Sender: TObject);
procedure acProcessTimelineExecute(Sender: TObject);
procedure acMemInfoDblFreeExecute(Sender: TObject);
procedure acMemInfoCallStackExecute(Sender: TObject);
procedure acExceptionsExecute(Sender: TObject);
procedure acExceptionCallStackExecute(Sender: TObject);
procedure acCodeTrackHistoryBackExecute(Sender: TObject);
procedure acCodeTrackRefreshExecute(Sender: TObject);
procedure acFuncExecute(Sender: TObject);
procedure acMemInfoRefreshExecute(Sender: TObject);
procedure acMemInfoHistoryExecute(Sender: TObject);
procedure acAddressInfoExecute(Sender: TObject);
procedure acOpenSiteExecute(Sender: TObject);
procedure acFeedbackExecute(Sender: TObject);
procedure acExcepInfoRefreshExecute(Sender: TObject);
procedure acCopyExecute(Sender: TObject);
procedure acLockTrackingRefreshExecute(Sender: TObject);
procedure acLockTrackingExecute(Sender: TObject);
procedure acViewSyncObjsOnTimeLineExecute(Sender: TObject);
procedure acCollapseAllExecute(Sender: TObject);
procedure acDebugOptionsExecute(Sender: TObject);
procedure acSamplingMethodExecute(Sender: TObject);
procedure pcMainChange(Sender: TObject);
procedure pcMemInfoChange(Sender: TObject);
procedure pTrackFuncAdvResize(Sender: TObject);
procedure pMemInfoFuncLinksResize(Sender: TObject);
procedure pLockTrackingLinksResize(Sender: TObject);
procedure vstMemInfoFuncChildsDblClick(Sender: TObject);
procedure vstMemInfoObjStackDblClick(Sender: TObject);
private
FSpiderOptions: TSpiderOptions;
FProjectType: TProgectType;
FTrackHistory: TList;
FPID: DWORD;
FCloseApp: LongBool;
procedure WMClose(var Message: TWMClose); message WM_CLOSE;
procedure SetProjectName(const ProjectName: String);
procedure UpdateProjectOptions;
procedure ProgressAction(const Action: String; const Progress: Integer);
function GetLineTimeOffset: Cardinal;
procedure HidePCTabs(PC: TPageControl);
procedure SendGAEvent(const Category, Action: String; const ELabel: String = '');
procedure SendGAException(E: Exception);
procedure SendGAFeedback(const FeedbackType, FeedbackText: String);
procedure StartGASession;
procedure FinishGASession;
procedure LoadUpdateInfo;
procedure ClearProject;
procedure ClearTrees;
procedure ClearDbgTrees;
procedure ClearDbgInfoTrees;
procedure ClearTrackTrees;
procedure ClearMemInfoTrees;
procedure ClearLockInfoTrees;
procedure UpdateTrees;
procedure UpdateStatusInfo;
procedure UpdateDebugActions;
procedure UpdateLog;
procedure InitLog(const RootMsg: String);
procedure UpdateMainActions;
procedure LoadUnits;
procedure LoadConsts(UnitInfo: TUnitInfo; UnitNode: PVirtualNode);
procedure LoadTypes(UnitInfo: TUnitInfo; UnitNode: PVirtualNode);
procedure LoadVars(UnitInfo: TUnitInfo; UnitNode: PVirtualNode);
procedure LoadFunctions(UnitInfo: TUnitInfo; UnitNode: PVirtualNode);
procedure LoadFunctionParams(FuncInfo: TFuncInfo; FuncNode: PVirtualNode);
function LoadFunctionSource(SrcView: TSourceViewFrame; FuncInfo: TFuncInfo; LineNo: Integer = 0): LongBool; overload;
procedure LoadUnitSource(UnitInfo: TUnitInfo; UnitNode: PVirtualNode);
procedure LoadTrackProcessFunctions(ProcData: TProcessData; ThreadNode: PVirtualNode);
procedure LoadTrackThreadFunctions(ThData: PThreadData; ThreadNode: PVirtualNode);
procedure LoadTrackParentFunctions(TrackFuncInfo: TTrackFuncInfo; TrackFuncNode: PVirtualNode);
procedure LoadTrackChildFunctions(TrackFuncInfo: TTrackFuncInfo; TrackFuncNode: PVirtualNode);
procedure LoadLockTrackThreadFunctions(ThData: PThreadData; ThreadNode: PVirtualNode);
procedure LoadMemInfoThreadFunctions(ThData: PThreadData; ThreadNode: PVirtualNode);
procedure LoadMemInfoParentFunctions(Tree: TBaseVirtualTree; TrackFuncInfo: TTrackFuncInfo; TrackFuncNode: PVirtualNode);
procedure LoadMemInfoChildFunctions(Tree: TBaseVirtualTree; TrackFuncInfo: TTrackFuncInfo; TrackFuncNode: PVirtualNode);
procedure LoadMemInfoObjects(Tree: TBaseVirtualTree; MemInfo: TGetMemInfoList; SyncNode: PVirtualNode);
procedure LoadMemInfoObjectStack(Tree: TBaseVirtualTree; MemInfo: TGetMemInfo; SyncNode: PVirtualNode);
procedure LoadSyncObjsInfoObjects(Tree: TBaseVirtualTree; SyncObjsInfo: TFuncSyncObjsInfoList; SyncNode: PVirtualNode);
procedure LoadSyncObjsInfoStack(Tree: TBaseVirtualTree; SyncObjInfo: PSyncObjsInfo; SyncNode: PVirtualNode);
procedure AddTrackHistory(TrackFuncInfo: TTrackFuncInfo);
procedure UpdateTrackHistoryList;
procedure ClearTrackHistoryList;
procedure DrawTimeLineHeaderEx(const GP: IGPGraphics; const R: TRect; const Offset: Integer);
procedure DrawThreadTimeLine(const GP: IGPGraphics; const R: TRect; ThData: PThreadData; const CurOffset: Cardinal);
procedure DrawThreadCPUTimeLine(const GP: IGPGraphics; const R: TRect; ThData: PThreadData; const CurOffset: Cardinal);
procedure DrawProcessTimeLine(const GP: IGPGraphics; const R: TRect; ProcData: TProcessData; const CurOffset: Cardinal);
procedure DrawProcessCPUTimeLine(const GP: IGPGraphics; const R: TRect; ProcData: TProcessData; const CurOffset: Cardinal);
procedure DrawBackgroundEx(const GP: IGPGraphics; const R: TRect; const BkColor: TColor);
procedure AddProcess(const ProcessID: Cardinal);
function AddProcessToTree(Tree: TBaseVirtualTree): PVirtualNode;
procedure AddThread(const ThreadID: Cardinal);
function AddThreadToTree(Tree: TBaseVirtualTree; ThData: PThreadData): PVirtualNode;
procedure SyncNodes(Tree: TBaseVirtualTree; Node: PVirtualNode);
function ElapsedToTime(const Elapsed: UInt64): String;
function FuncElapsedToTime(const FullCPUTime, FullElapsed, Elapsed: UInt64): String; overload;
function ElapsedTimeToStr(Tree: TBaseVirtualTree; Data: PLinkData; const Elapsed: UInt64): String;
function ThreadIDToStr(const ThreadID: TThreadId): String;
function ProcessIDToStr(const ProcessID: TProcessId): String;
function FindThreadNode(vTree: TBaseVirtualTree; ThData: PThreadData): PVirtualNode;
//function FindThreadNodeById(vTree: TBaseVirtualTree; const ThreadId: TThreadId): PVirtualNode;
function FindTrackUnitNode(vTree: TBaseVirtualTree; const UnitInfo: TUnitInfo): PVirtualNode;
function FindTrackFuncNode(vTree: TBaseVirtualTree; const FuncInfo: TFuncInfo): PVirtualNode;
function FindNode(vTree: TBaseVirtualTree; Node: PVirtualNode; CheckFunc: TCheckFunc; CmpData: Pointer): PVirtualNode;
procedure LoadGUIOptions;
procedure LoadRecentProjects;
function GetDebugOptions: TDbgOptions;
function GetAppID: String;
procedure FillUpdateInfo(Sender: TObject);
public
procedure OnException(Sender: TObject; E: Exception);
procedure DoAction(Action: TacAction; const Args: array of Variant);
procedure ViewDebugInfo(DebugInfo: TDebugInfo);
end;
var
MainForm: TMainForm = nil;
implementation
{$R *.dfm}
uses Math, ClassUtils, uProcessList, uDebugerThread,
uProjectOptions, WinAPIUtils, System.UITypes, System.Types,
uGA, System.Win.Registry, Winapi.ActiveX, Winapi.ShellAPI, uFeedback,
DbgHookTypes, Collections.Dictionaries, Collections.Base;
const
_TrackingID_web = 'UA-44820931-1';
_TrackingID_app = 'UA-44820931-2';
_AppName = 'Spider';
type
THookBaseVirtualTree = class(TBaseVirtualTree);
const
CUnitTypeStrings: array [TUnitType] of string =
('Project units', 'System units', 'Components', 'External', 'Other');
CDbgSyncObjsType: array [TDbgSyncObjsType] of String = ('Unknown', 'Sleep',
'WaitForSingleObject', 'WaitForMultipleObjects', 'EnterCriticalSection',
'LeaveCriticalSection', 'InCriticalSection', 'SendMessage');
procedure TMainForm.acAddressInfoExecute(Sender: TObject);
var
AddressListStr: String;
AddressList: TStringList;
ExceptInfo: TExceptInfo;
I: Integer;
StackEntry: TStackEntry;
AddressStr: String;
Address: Integer;
begin
AddressListStr := '';
if InputQuery('Get stack info', 'Stack', AddressListStr) then
begin
AddressList := TStringList.Create;
try
AddressList.DelimitedText := AddressListStr;
if AddressList.Count > 0 then
begin
ExceptInfo := TExceptInfo.Create();
ExceptInfo.ExceptionName := '### DBG_STACK_INFO';
ExceptInfo.Message := AddressListStr;
ExceptInfo.Stack.Capacity := AddressList.Count;
for I := 0 to AddressList.Count - 1 do
begin
AddressStr := AddressList[I];
if AddressStr <> '' then
begin
// Mac address style
if AddressStr.StartsWith('0x', True) then
AddressStr := Copy(AddressStr, Length('0x') + 1, MaxInt);
if AddressStr[1] <> '$' then
AddressStr := '$' + AddressStr;
if TryStrToInt(AddressStr, Address) then
begin
StackEntry := TStackEntry.Create;
StackEntry.UpdateInfo(Pointer(Address));
ExceptInfo.Stack.Add(StackEntry);
end;
end;
end;
gvDebuger.ProcessData.DbgExceptions.Add(ExceptInfo);
vstExceptionThreadsFocusChanged(nil, nil, 0);
end;
finally
FreeAndNil(AddressList);
end;
end;
end;
procedure TMainForm.acAppOpenExecute(Sender: TObject);
begin
if OD.Execute then
SetProjectName(OD.FileName);
end;
procedure TMainForm.acAttachProcessExecute(Sender: TObject);
var
F: TfrmProcessList;
begin
Application.CreateForm(TfrmProcessList, F);
try
if F.ShowModal = mrOk then
begin
FPID := TProcessId(F.GetSelProcessID);
SetProjectName(F.GetSelProcessName);
end;
finally
F.Release;
end;
end;
procedure TMainForm.acCloseProjectExecute(Sender: TObject);
begin
ClearProject;
end;
procedure TMainForm.acCodeTrackHistoryBackExecute(Sender: TObject);
begin
vstTrackFuncs.OnFocusChanging := nil;
try
acFunc0.Execute;
finally
vstTrackFuncs.OnFocusChanging := vstTrackFuncsFocusChanging;
end;
end;
procedure TMainForm.acCodeTrackingExecute(Sender: TObject);
begin
if Assigned(gvDebuger) then
begin
gvDebuger.CodeTracking := acCodeTracking.Checked;
acSamplingMethod.Enabled := gvDebuger.CodeTracking;
acCALLMethod.Enabled := gvDebuger.CodeTracking;
acTrackSystemUnits.Enabled := gvDebuger.CodeTracking;
end;
end;
procedure TMainForm.acCodeTrackRefreshExecute(Sender: TObject);
begin
vstTrackThreadsFocusChanged(vstTrackThreads, vstTrackThreads.FocusedNode, 0);
end;
procedure TMainForm.acCollapseAllExecute(Sender: TObject);
var
VirtualTreeView: TBaseVirtualTree;
Node: PVirtualNode;
begin
if vstTrackFuncs.Focused then
VirtualTreeView := vstTrackFuncs
else
if vstTrackFuncChilds.Focused then
VirtualTreeView := vstTrackFuncChilds
else
Exit;
if VirtualTreeView is TBaseVirtualTree then
for Node in VirtualTreeView.Nodes do
VirtualTreeView.Expanded[Node] := False;
end;
procedure TMainForm.acContinueExecute(Sender: TObject);
begin
_AC.TraceDebug(dtsContinue);
end;
procedure TMainForm.acCopyExecute(Sender: TObject);
begin
if Assigned(ActiveControl) then
ActiveControl.Perform(WM_COPY, 0, 0);
end;
procedure TMainForm.acCPUTimeLineExecute(Sender: TObject);
begin
UpdateTrees;
end;
procedure TMainForm.acDebugOptionsExecute(Sender: TObject);
begin
rbnMain.TabIndex := rbnpgOptions.Index;
end;
procedure TMainForm.acEditProjectExecute(Sender: TObject);
begin
OpenProjectOptions(otEdit);
end;
procedure TMainForm.acExcepInfoRefreshExecute(Sender: TObject);
begin
vstExceptionThreadsFocusChanged(vstExceptionThreads, vstExceptionThreads.FocusedNode, 0);
end;
procedure TMainForm.acExceptionCallStackExecute(Sender: TObject);
begin
//
end;
procedure TMainForm.acExceptionsExecute(Sender: TObject);
begin
//
end;
procedure TMainForm.acExitExecute(Sender: TObject);
begin
FCloseApp := True;
Close;
end;
procedure TMainForm.acFeedbackExecute(Sender: TObject);
var
F: TfrmFeedback;
begin
Application.CreateForm(TfrmFeedback, F);
try
if F.ShowModal = mrOk then
begin
//SendGAEvent('Feedback', F.FeedbackType, F.FeedbackText);
SendGAFeedback(F.FeedbackType, F.FeedbackText);
end;
finally
FreeAndNil(F);
end;
end;
procedure TMainForm.acFuncExecute(Sender: TObject);
var
Action: TAction;
TrackFuncInfo: TTrackFuncInfo;
FuncNode: PVirtualNode;
begin
if Sender is TAction then
begin
Action := TAction(Sender);
if Action.Tag <> 0 then
begin
TrackFuncInfo := TTrackFuncInfo(Action.Tag);
FTrackHistory.Remove(TrackFuncInfo);
UpdateTrackHistoryList;
FuncNode := FindTrackFuncNode(vstTrackFuncs, TFuncInfo(TrackFuncInfo.FuncInfo));
if Assigned(FuncNode) then
begin
vstTrackFuncs.ClearSelection;
vstTrackFuncs.FocusedNode := FuncNode;
vstTrackFuncs.Selected[FuncNode] := True;
end;
end;
end;
end;
procedure TMainForm.acLockTrackingExecute(Sender: TObject);
begin
//
end;
procedure TMainForm.acLockTrackingRefreshExecute(Sender: TObject);
begin
vstLockThreadsFocusChanged(vstLockThreads, vstLockThreads.FocusedNode, 0);
end;
procedure TMainForm.acOpenProjectExecute(Sender: TObject);
begin
if OD.Execute then
SetProjectName(OD.FileName);
end;
procedure TMainForm.acOpenSiteExecute(Sender: TObject);
const
_SPIDER_URL = 'http://dbg-spider.net';
begin
ShellExecute(WindowHandle, 'open', _SPIDER_URL, nil, nil, SW_SHOWNORMAL);
end;
procedure TMainForm.acOptionsExecute(Sender: TObject);
begin
//
end;
procedure TMainForm.acRealTimeLineExecute(Sender: TObject);
begin
UpdateTrees;
end;
procedure TMainForm.acRecentExecute(Sender: TObject);
var
PName: String;
begin
if Sender is TAction then
begin
PName := TAction(Sender).Caption;
UniqueString(PName);
SetProjectName(PName);
end;
end;
function TMainForm.GetDebugOptions: TDbgOptions;
begin
Result := [];
if acProcessTimeline.Checked then
Include(Result, doProfiler);
if acMemoryInfo.Checked then
begin
Include(Result, doMemProfiler);
if acMemInfoCallStack.Checked then
Include(Result, doMemCallStack);
if acMemInfoDblFree.Checked then
Include(Result, doMemCheckDoubleFree);
end;
if acExceptions.Checked then
begin
Include(Result, doExceptions);
if acExceptionCallStack.Checked then
Include(Result, doExceptionCallStack);
end;
if acCodeTracking.Checked then
begin
Include(Result, doCodeTracking);
if acTrackSystemUnits.Checked then
Include(Result, doTrackSystemUnits);
if acSamplingMethod.Checked then
Include(Result, doSamplingMethod);
end;
if acLockTracking.Checked then
begin
Include(Result, doSyncObjsTracking);
end;
end;
procedure TMainForm.acRunExecute(Sender: TObject);
begin
SendGAEvent('Run Spider project', GetAppID, 'Run');
acRun.Enabled := False;
ClearTrees;
tmrThreadsUpdate.Enabled := True;
if Assigned(gvDebuger) then
gvDebuger.ClearDbgInfo;
UpdateStatusInfo;
UpdateMainActions;
_AC.RunDebug([doRun, doDebugInfo] + GetDebugOptions, FPID);
end;
procedure TMainForm.acSamplingMethodExecute(Sender: TObject);