fpdebug.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Debugger call routines for the IDE
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit FPDebug;
  13. interface
  14. uses
  15. Views,FPViews,
  16. Objects,GDBCon,GDBInt;
  17. type
  18. PDebugController=^TDebugController;
  19. TDebugController=object(TGDBController)
  20. InvalidSourceLine : boolean;
  21. LastFileName : string;
  22. LastSource : PView; {PsourceWindow !! }
  23. HiddenStepsCount : longint;
  24. constructor Init(const exefn:string);
  25. destructor Done;
  26. procedure DoSelectSourceline(const fn:string;line:longint);virtual;
  27. { procedure DoStartSession;virtual;
  28. procedure DoBreakSession;virtual;}
  29. procedure DoEndSession(code:longint);virtual;
  30. procedure AnnotateError;
  31. procedure InsertBreakpoints;
  32. procedure RemoveBreakpoints;
  33. procedure ResetBreakpointsValues;
  34. procedure DoDebuggerScreen;virtual;
  35. procedure DoUserScreen;virtual;
  36. procedure Reset;virtual;
  37. procedure Run;virtual;
  38. procedure Continue;virtual;
  39. procedure CommandBegin(const s:string);virtual;
  40. procedure CommandEnd(const s:string);virtual;
  41. end;
  42. BreakpointType = (bt_function,bt_file_line,bt_watch,bt_awatch,bt_rwatch,bt_invalid);
  43. BreakpointState = (bs_enabled,bs_disabled,bs_deleted);
  44. PBreakpointCollection=^TBreakpointCollection;
  45. PBreakpoint=^TBreakpoint;
  46. TBreakpoint=object(TObject)
  47. typ : BreakpointType;
  48. state : BreakpointState;
  49. owner : PBreakpointCollection;
  50. Name : PString; { either function name or expr to watch }
  51. FileName : PString;
  52. OldValue,CurrentValue : Pstring;
  53. Line : Longint; { only used for bt_file_line type }
  54. Conditions : PString; { conditions relative to that breakpoint }
  55. IgnoreCount : Longint; { how many counts should be ignored }
  56. Commands : pchar; { commands that should be executed on breakpoint }
  57. GDBIndex : longint;
  58. GDBState : BreakpointState;
  59. constructor Init_function(Const AFunc : String);
  60. constructor Init_file_line(AFile : String; ALine : longint);
  61. constructor Init_type(atyp : BreakpointType;Const AnExpr : String);
  62. procedure Insert;
  63. procedure Remove;
  64. procedure Enable;
  65. procedure Disable;
  66. procedure ResetValues;
  67. destructor Done;virtual;
  68. end;
  69. TBreakpointCollection=object(TCollection)
  70. function At(Index: Integer): PBreakpoint;
  71. function GetGDB(index : longint) : PBreakpoint;
  72. function GetType(typ : BreakpointType;Const s : String) : PBreakpoint;
  73. function ToggleFileLine(Const FileName: String;LineNr : Longint) : boolean;
  74. procedure Update;
  75. procedure FreeItem(Item: Pointer); virtual;
  76. procedure ShowBreakpoints(W : PSourceWindow);
  77. end;
  78. const
  79. BreakpointTypeStr : Array[BreakpointType] of String[9]
  80. = ( 'function','file-line','watch','awatch','rwatch','invalid' );
  81. BreakpointStateStr : Array[BreakpointState] of String[8]
  82. = ( 'enabled','disabled','invalid' );
  83. var
  84. Debugger : PDebugController;
  85. BreakpointCollection : PBreakpointCollection;
  86. procedure InitDebugger;
  87. procedure DoneDebugger;
  88. procedure InitGDBWindow;
  89. procedure DoneGDBWindow;
  90. procedure InitBreakpoints;
  91. procedure DoneBreakpoints;
  92. implementation
  93. uses
  94. Dos,Mouse,Video,
  95. App,Strings,
  96. FPVars,FPUtils,FPConst,
  97. FPIntf,FPCompile,FPIde;
  98. {****************************************************************************
  99. TDebugController
  100. ****************************************************************************}
  101. constructor TDebugController.Init(const exefn:string);
  102. var f: string;
  103. begin
  104. inherited Init;
  105. f := exefn;
  106. LoadFile(f);
  107. SetArgs(GetRunParameters);
  108. Debugger:=@self;
  109. InsertBreakpoints;
  110. end;
  111. procedure TDebugController.InsertBreakpoints;
  112. procedure DoInsert(PB : PBreakpoint);
  113. begin
  114. PB^.Insert;
  115. end;
  116. begin
  117. BreakpointCollection^.ForEach(@DoInsert);
  118. end;
  119. procedure TDebugController.RemoveBreakpoints;
  120. procedure DoDelete(PB : PBreakpoint);
  121. begin
  122. PB^.Remove;
  123. end;
  124. begin
  125. BreakpointCollection^.ForEach(@DoDelete);
  126. end;
  127. procedure TDebugController.ResetBreakpointsValues;
  128. procedure DoResetVal(PB : PBreakpoint);
  129. begin
  130. PB^.ResetValues;
  131. end;
  132. begin
  133. BreakpointCollection^.ForEach(@DoResetVal);
  134. end;
  135. destructor TDebugController.Done;
  136. begin
  137. { kill the program if running }
  138. Reset;
  139. RemoveBreakpoints;
  140. inherited Done;
  141. end;
  142. procedure TDebugController.Run;
  143. begin
  144. ResetBreakpointsValues;
  145. inherited Run;
  146. MyApp.SetCmdState([cmResetDebugger],true);
  147. end;
  148. procedure TDebugController.Continue;
  149. begin
  150. if not debugger_started then
  151. Run;
  152. inherited Continue;
  153. end;
  154. procedure TDebugController.CommandBegin(const s:string);
  155. begin
  156. if assigned(GDBWindow) and (in_command>1) then
  157. begin
  158. { We should do something special for errors !! }
  159. If StrLen(GetError)>0 then
  160. GDBWindow^.WriteErrorText(GetError);
  161. GDBWindow^.WriteOutputText(GetOutput);
  162. end;
  163. if assigned(GDBWindow) then
  164. GDBWindow^.WriteString(S);
  165. end;
  166. procedure TDebugController.CommandEnd(const s:string);
  167. begin
  168. if assigned(GDBWindow) and (in_command=0) then
  169. begin
  170. { We should do somethnig special for errors !! }
  171. If StrLen(GetError)>0 then
  172. GDBWindow^.WriteErrorText(GetError);
  173. GDBWindow^.WriteOutputText(GetOutput);
  174. GDBWindow^.Editor^.TextEnd;
  175. end;
  176. end;
  177. procedure TDebugController.Reset;
  178. var
  179. W : PSourceWindow;
  180. begin
  181. inherited Reset;
  182. MyApp.SetCmdState([cmResetDebugger],false);
  183. W:=PSourceWindow(LastSource);
  184. if assigned(W) then
  185. W^.Editor^.SetHighlightRow(-1);
  186. end;
  187. procedure TDebugController.AnnotateError;
  188. var errornb : longint;
  189. begin
  190. if error then
  191. begin
  192. errornb:=error_num;
  193. ErrorBox(#3'Error within GDB'#13#3'Error code = %d',@errornb);
  194. end;
  195. end;
  196. procedure TDebugController.DoSelectSourceLine(const fn:string;line:longint);
  197. var
  198. W: PSourceWindow;
  199. Found : boolean;
  200. PB : PBreakpoint;
  201. S : String;
  202. BreakIndex : longint;
  203. begin
  204. BreakIndex:=stop_breakpoint_number;
  205. Desktop^.Lock;
  206. if Line>0 then
  207. dec(Line);
  208. if (fn=LastFileName) then
  209. begin
  210. W:=PSourceWindow(LastSource);
  211. if assigned(W) then
  212. begin
  213. W^.Editor^.SetCurPtr(0,Line);
  214. W^.Editor^.TrackCursor(true);
  215. W^.Editor^.SetHighlightRow(Line);
  216. if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
  217. W^.Select;
  218. InvalidSourceLine:=false;
  219. end
  220. else
  221. InvalidSourceLine:=true;
  222. end
  223. else
  224. begin
  225. W:=TryToOpenFile(nil,fn,0,Line);
  226. if assigned(W) then
  227. begin
  228. W^.Editor^.SetHighlightRow(Line);
  229. W^.Editor^.TrackCursor(true);
  230. if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
  231. W^.Select;
  232. LastSource:=W;
  233. InvalidSourceLine:=false;
  234. end
  235. { only search a file once }
  236. else
  237. begin
  238. Desktop^.UnLock;
  239. Found:=MyApp.OpenSearch(fn);
  240. Desktop^.Lock;
  241. if not Found then
  242. begin
  243. InvalidSourceLine:=true;
  244. LastSource:=Nil;
  245. end
  246. else
  247. begin
  248. { should now be open }
  249. W:=TryToOpenFile(nil,fn,0,Line);
  250. W^.Editor^.SetHighlightRow(Line);
  251. W^.Editor^.TrackCursor(true);
  252. if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
  253. W^.Select;
  254. LastSource:=W;
  255. InvalidSourceLine:=false;
  256. end;
  257. end;
  258. end;
  259. LastFileName:=fn;
  260. Desktop^.UnLock;
  261. if BreakIndex>0 then
  262. begin
  263. PB:=BreakpointCollection^.GetGDB(stop_breakpoint_number);
  264. { For watch we should get old and new value !! }
  265. if (Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive)) and
  266. (PB^.typ<>bt_file_line) then
  267. begin
  268. Command('p '+GetStr(PB^.Name));
  269. S:=StrPas(GetOutput);
  270. If Pos('=',S)>0 then
  271. S:=Copy(S,Pos('=',S)+1,255);
  272. If S[Length(S)]=#10 then
  273. Delete(S,Length(S),1);
  274. if Assigned(PB^.OldValue) then
  275. DisposeStr(PB^.OldValue);
  276. PB^.OldValue:=PB^.CurrentValue;
  277. PB^.CurrentValue:=NewStr(S);
  278. If PB^.typ=bt_function then
  279. WarningBox(#3'GDB stopped due to'#13+
  280. #3+BreakpointTypeStr[PB^.typ]+' '+GetStr(PB^.Name),nil)
  281. else if (GetStr(PB^.OldValue)<>S) then
  282. WarningBox(#3'GDB stopped due to'#13+
  283. #3+BreakpointTypeStr[PB^.typ]+' '+GetStr(PB^.Name)+#13+
  284. #3+'Old value = '+GetStr(PB^.OldValue)+#13+
  285. #3+'New value = '+GetStr(PB^.CurrentValue),nil)
  286. else
  287. WarningBox(#3'GDB stopped due to'#13+
  288. #3+BreakpointTypeStr[PB^.typ]+' '+GetStr(PB^.Name)+#13+
  289. #3+' value = '+GetStr(PB^.CurrentValue),nil);
  290. end;
  291. end;
  292. end;
  293. procedure TDebugController.DoEndSession(code:longint);
  294. var P :Array[1..2] of longint;
  295. W : PSourceWindow;
  296. begin
  297. MyApp.SetCmdState([cmResetDebugger],false);
  298. W:=PSourceWindow(LastSource);
  299. if assigned(W) then
  300. W^.Editor^.SetHighlightRow(-1);
  301. If HiddenStepsCount=0 then
  302. InformationBox(#3'Program exited with '#13#3'exitcode = %d',@code)
  303. else
  304. begin
  305. P[1]:=code;
  306. P[2]:=HiddenStepsCount;
  307. WarningBox(#3'Program exited with '#13+
  308. #3'exitcode = %d'#13+
  309. #3'hidden steps = %d',@P);
  310. end;
  311. end;
  312. procedure TDebugController.DoDebuggerScreen;
  313. begin
  314. MyApp.ShowIDEScreen;
  315. end;
  316. procedure TDebugController.DoUserScreen;
  317. begin
  318. MyApp.ShowUserScreen;
  319. end;
  320. {****************************************************************************
  321. TBreakpoint
  322. ****************************************************************************}
  323. constructor TBreakpoint.Init_function(Const AFunc : String);
  324. begin
  325. typ:=bt_function;
  326. state:=bs_enabled;
  327. GDBState:=bs_deleted;
  328. Name:=NewStr(AFunc);
  329. FileName:=nil;
  330. Line:=0;
  331. IgnoreCount:=0;
  332. Commands:=nil;
  333. Conditions:=nil;
  334. OldValue:=nil;
  335. CurrentValue:=nil;
  336. end;
  337. constructor TBreakpoint.Init_type(atyp : BreakpointType;Const AnExpr : String);
  338. begin
  339. typ:=atyp;
  340. state:=bs_enabled;
  341. GDBState:=bs_deleted;
  342. Name:=NewStr(AnExpr);
  343. IgnoreCount:=0;
  344. Commands:=nil;
  345. Conditions:=nil;
  346. OldValue:=nil;
  347. CurrentValue:=nil;
  348. end;
  349. constructor TBreakpoint.Init_file_line(AFile : String; ALine : longint);
  350. begin
  351. typ:=bt_file_line;
  352. state:=bs_enabled;
  353. GDBState:=bs_deleted;
  354. { d:test.pas:12 does not work !! }
  355. { I do not know how to solve this if
  356. if (Length(AFile)>1) and (AFile[2]=':') then
  357. AFile:=Copy(AFile,3,255);
  358. Only use base name for now !! PM }
  359. FileName:=NewStr(AFile);
  360. Name:=nil;
  361. Line:=ALine;
  362. IgnoreCount:=0;
  363. Commands:=nil;
  364. Conditions:=nil;
  365. OldValue:=nil;
  366. CurrentValue:=nil;
  367. end;
  368. procedure TBreakpoint.Insert;
  369. begin
  370. If not assigned(Debugger) then Exit;
  371. Remove;
  372. Debugger^.last_breakpoint_number:=0;
  373. if (GDBState=bs_deleted) and (state=bs_enabled) then
  374. begin
  375. if (typ=bt_file_line) then
  376. Debugger^.Command('break '+NameAndExtOf(FileName^)+':'+IntToStr(Line))
  377. else if typ=bt_function then
  378. Debugger^.Command('break '+name^)
  379. else if typ=bt_watch then
  380. Debugger^.Command('watch '+name^)
  381. else if typ=bt_awatch then
  382. Debugger^.Command('awatch '+name^)
  383. else if typ=bt_rwatch then
  384. Debugger^.Command('rwatch '+name^);
  385. if Debugger^.last_breakpoint_number<>0 then
  386. begin
  387. GDBIndex:=Debugger^.last_breakpoint_number;
  388. GDBState:=bs_enabled;
  389. Debugger^.Command('cond '+IntToStr(GDBIndex)+' '+GetStr(Conditions));
  390. Debugger^.Command('ignore '+IntToStr(GDBIndex)+' '+IntToStr(IgnoreCount));
  391. If Assigned(Commands) then
  392. begin
  393. {Commands are not handled yet }
  394. end;
  395. end
  396. else
  397. { Here there was a problem !! }
  398. begin
  399. GDBIndex:=0;
  400. ErrorBox(#3'Could not set Breakpoint'#13+
  401. #3+BreakpointTypeStr[typ]+' '+Name^,nil);
  402. state:=bs_disabled;
  403. end;
  404. end
  405. else if (GDBState=bs_disabled) and (state=bs_enabled) then
  406. Enable
  407. else if (GDBState=bs_enabled) and (state=bs_disabled) then
  408. Disable;
  409. end;
  410. procedure TBreakpoint.Remove;
  411. begin
  412. If not assigned(Debugger) then Exit;
  413. if GDBIndex>0 then
  414. Debugger^.Command('delete '+IntToStr(GDBIndex));
  415. GDBIndex:=0;
  416. GDBState:=bs_deleted;
  417. end;
  418. procedure TBreakpoint.Enable;
  419. begin
  420. If not assigned(Debugger) then Exit;
  421. if GDBIndex>0 then
  422. Debugger^.Command('enable '+IntToStr(GDBIndex))
  423. else
  424. Insert;
  425. GDBState:=bs_enabled;
  426. end;
  427. procedure TBreakpoint.Disable;
  428. begin
  429. If not assigned(Debugger) then Exit;
  430. if GDBIndex>0 then
  431. Debugger^.Command('disable '+IntToStr(GDBIndex));
  432. GDBState:=bs_disabled;
  433. end;
  434. procedure TBreakpoint.ResetValues;
  435. begin
  436. if assigned(OldValue) then
  437. DisposeStr(OldValue);
  438. OldValue:=nil;
  439. if assigned(CurrentValue) then
  440. DisposeStr(CurrentValue);
  441. CurrentValue:=nil;
  442. end;
  443. destructor TBreakpoint.Done;
  444. begin
  445. Remove;
  446. ResetValues;
  447. if assigned(Name) then
  448. DisposeStr(Name);
  449. if assigned(FileName) then
  450. DisposeStr(FileName);
  451. if assigned(Conditions) then
  452. DisposeStr(Conditions);
  453. if assigned(Commands) then
  454. StrDispose(Commands);
  455. inherited Done;
  456. end;
  457. {****************************************************************************
  458. TBreakpointCollection
  459. ****************************************************************************}
  460. function TBreakpointCollection.At(Index: Integer): PBreakpoint;
  461. begin
  462. At:=inherited At(Index);
  463. end;
  464. procedure TBreakpointCollection.FreeItem(Item: Pointer);
  465. begin
  466. if Item<>nil then
  467. Dispose(PBreakpoint(Item),Done);
  468. end;
  469. procedure TBreakpointCollection.Update;
  470. begin
  471. if assigned(Debugger) then
  472. begin
  473. Debugger^.RemoveBreakpoints;
  474. Debugger^.InsertBreakpoints;
  475. end;
  476. end;
  477. function TBreakpointCollection.GetGDB(index : longint) : PBreakpoint;
  478. function IsNum(P : PBreakpoint) : boolean;
  479. begin
  480. IsNum:=P^.GDBIndex=index;
  481. end;
  482. begin
  483. if index=0 then
  484. GetGDB:=nil
  485. else
  486. GetGDB:=FirstThat(@IsNum);
  487. end;
  488. procedure TBreakpointCollection.ShowBreakpoints(W : PSourceWindow);
  489. procedure SetInSource(P : PBreakpoint);
  490. begin
  491. If assigned(P^.FileName) and (P^.FileName^=W^.Editor^.FileName) then
  492. W^.Editor^.SetLineBreakState(P^.Line,P^.state=bs_enabled);
  493. end;
  494. begin
  495. ForEach(@SetInSource);
  496. end;
  497. function TBreakpointCollection.GetType(typ : BreakpointType;Const s : String) : PBreakpoint;
  498. function IsThis(P : PBreakpoint) : boolean;
  499. begin
  500. IsThis:=(P^.typ=typ) and (P^.Name^=S);
  501. end;
  502. begin
  503. GetType:=FirstThat(@IsThis);
  504. end;
  505. function TBreakpointCollection.ToggleFileLine(Const FileName: String;LineNr : Longint) : boolean;
  506. var PB : PBreakpoint;
  507. function IsThere(P : PBreakpoint) : boolean;
  508. begin
  509. IsThere:=(P^.typ=bt_file_line) and (P^.FileName^=FileName) and (P^.Line=LineNr);
  510. end;
  511. begin
  512. PB:=FirstThat(@IsThere);
  513. ToggleFileLine:=false;
  514. If Assigned(PB) then
  515. if PB^.state=bs_disabled then
  516. begin
  517. PB^.state:=bs_enabled;
  518. ToggleFileLine:=true;
  519. end
  520. else if PB^.state=bs_enabled then
  521. PB^.state:=bs_disabled;
  522. If not assigned(PB) then
  523. begin
  524. PB:= New(PBreakpoint,Init_file_line(FileName,LineNr));
  525. if assigned(PB) then
  526. Begin
  527. Insert(PB);
  528. ToggleFileLine:=true;
  529. End;
  530. end;
  531. Update;
  532. end;
  533. {****************************************************************************
  534. Initialize
  535. ****************************************************************************}
  536. procedure InitDebugger;
  537. begin
  538. {$ifdef DEBUG}
  539. Assign(gdb_file,'gdb$$$.out');
  540. Rewrite(gdb_file);
  541. Use_gdb_file:=true;
  542. {$endif}
  543. if (not ExistsFile(ExeFile)) or (CompilationPhase<>cpDone) then
  544. DoCompile(cRun);
  545. if CompilationPhase<>cpDone then
  546. Exit;
  547. if (EXEFile='') then
  548. begin
  549. ErrorBox('Oooops, nothing to debug.',nil);
  550. Exit;
  551. end;
  552. { init debugcontroller }
  553. if assigned(Debugger) then
  554. dispose(Debugger,Done);
  555. new(Debugger,Init(ExeFile));
  556. {$ifdef GDBWINDOW}
  557. InitGDBWindow;
  558. {$endif def GDBWINDOW}
  559. end;
  560. procedure DoneDebugger;
  561. begin
  562. if assigned(Debugger) then
  563. dispose(Debugger,Done);
  564. Debugger:=nil;
  565. {$ifdef DEBUG}
  566. If Use_gdb_file then
  567. Close(GDB_file);
  568. Use_gdb_file:=false;
  569. {$endif}
  570. {DoneGDBWindow;}
  571. end;
  572. procedure InitGDBWindow;
  573. var
  574. R : TRect;
  575. begin
  576. if GDBWindow=nil then
  577. begin
  578. DeskTop^.GetExtent(R);
  579. new(GDBWindow,init(R));
  580. DeskTop^.Insert(GDBWindow);
  581. end;
  582. end;
  583. procedure DoneGDBWindow;
  584. begin
  585. if assigned(GDBWindow) then
  586. begin
  587. DeskTop^.Delete(GDBWindow);
  588. GDBWindow:=nil;
  589. end;
  590. end;
  591. procedure InitBreakpoints;
  592. begin
  593. New(BreakpointCollection,init(10,10));
  594. end;
  595. procedure DoneBreakpoints;
  596. begin
  597. Dispose(BreakpointCollection,Done);
  598. BreakpointCollection:=nil;
  599. end;
  600. end.
  601. {
  602. $Log$
  603. Revision 1.14 1999-02-16 12:47:36 pierre
  604. * GDBWindow does not popup on F7 or F8 anymore
  605. Revision 1.13 1999/02/16 10:43:54 peter
  606. * use -dGDB for the compiler
  607. * only use gdb_file when -dDEBUG is used
  608. * profiler switch is now a toggle instead of radiobutton
  609. Revision 1.12 1999/02/11 19:07:20 pierre
  610. * GDBWindow redesigned :
  611. normal editor apart from
  612. that any kbEnter will send the line (for begin to cursor)
  613. to GDB command !
  614. GDBWindow opened in Debugger Menu
  615. still buggy :
  616. -echo should not be present if at end of text
  617. -GDBWindow becomes First after each step (I don't know why !)
  618. Revision 1.11 1999/02/11 13:10:03 pierre
  619. + GDBWindow only with -dGDBWindow for now : still buggy !!
  620. Revision 1.10 1999/02/10 09:55:07 pierre
  621. + added OldValue and CurrentValue field for watchpoints
  622. + InitBreakpoints and DoneBreakpoints
  623. + MessageBox if GDB stops bacause of a watchpoint !
  624. Revision 1.9 1999/02/08 17:43:43 pierre
  625. * RestDebugger or multiple running of debugged program now works
  626. + added DoContToCursor(F4)
  627. * Breakpoints are now inserted correctly (was mainlyy a problem
  628. of directories)
  629. Revision 1.8 1999/02/05 17:21:52 pierre
  630. Invalid_line renamed InvalidSourceLine
  631. Revision 1.7 1999/02/05 13:08:41 pierre
  632. + new breakpoint types added
  633. Revision 1.6 1999/02/05 12:11:53 pierre
  634. + SourceDir that stores directories for sources that the
  635. compiler should not know about
  636. Automatically asked for addition when a new file that
  637. needed filedialog to be found is in an unknown directory
  638. Stored and retrieved from INIFile
  639. + Breakpoints conditions added to INIFile
  640. * Breakpoints insterted and removed at debin and end of debug session
  641. Revision 1.5 1999/02/04 17:54:22 pierre
  642. + several commands added
  643. Revision 1.4 1999/02/04 13:32:02 pierre
  644. * Several things added (I cannot commit them independently !)
  645. + added TBreakpoint and TBreakpointCollection
  646. + added cmResetDebugger,cmGrep,CmToggleBreakpoint
  647. + Breakpoint list in INIFile
  648. * Select items now also depend of SwitchMode
  649. * Reading of option '-g' was not possible !
  650. + added search for -Fu args pathes in TryToOpen
  651. + added code for automatic opening of FileDialog
  652. if source not found
  653. Revision 1.3 1999/02/02 16:41:38 peter
  654. + automatic .pas/.pp adding by opening of file
  655. * better debuggerscreen changes
  656. Revision 1.2 1999/01/22 18:14:09 pierre
  657. * adaptd to changes in gdbint and gdbcon for to /
  658. Revision 1.1 1999/01/22 10:24:03 peter
  659. * first debugger things
  660. }