gdbcon.pas 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. {
  2. $Id$
  3. Fake GDBCon unit (including base from GDBInt)
  4. **********************************************************************}
  5. unit GDBCon;
  6. interface
  7. uses
  8. GdbInt;
  9. type
  10. PGDBController=^TGDBController;
  11. TGDBController=object(TGDBInterface)
  12. progname : pchar;
  13. progargs : pchar;
  14. in_command,
  15. init_count : longint;
  16. constructor Init;
  17. destructor Done;
  18. procedure CommandBegin(const s:string);virtual;
  19. procedure Command(const s:string);
  20. procedure CommandEnd(const s:string);virtual;
  21. procedure Reset;virtual;
  22. procedure StartTrace;
  23. procedure Run;virtual;
  24. procedure TraceStep;virtual;
  25. procedure TraceNext;virtual;
  26. procedure TraceStepI;virtual;
  27. procedure TraceNextI;virtual;
  28. procedure Continue;virtual;
  29. { needed for dos because newlines are only #10 (PM) }
  30. procedure WriteErrorBuf;
  31. procedure WriteOutputBuf;
  32. function GetOutput : Pchar;
  33. function GetError : Pchar;
  34. function LoadFile(const fn:string):boolean;
  35. procedure SetArgs(const s : string);
  36. procedure ClearSymbols;
  37. end;
  38. { gdb does not allow \ in dir or filenames }
  39. procedure UnixDir(var s : string);
  40. implementation
  41. procedure UnixDir(var s : string);
  42. var i : longint;
  43. begin
  44. for i:=1 to length(s) do
  45. if s[i]='\' then s[i]:='/';
  46. end;
  47. constructor TGDBController.Init;
  48. begin
  49. inherited Init;
  50. end;
  51. destructor TGDBController.Done;
  52. begin
  53. inherited Done;
  54. end;
  55. procedure TGDBController.Command(const s:string);
  56. begin
  57. end;
  58. procedure TGDBController.CommandBegin(const s:string);
  59. begin
  60. end;
  61. procedure TGDBController.CommandEnd(const s:string);
  62. begin
  63. end;
  64. procedure TGDBController.Reset;
  65. begin
  66. end;
  67. function TGDBController.LoadFile(const fn:string):boolean;
  68. begin
  69. LoadFile:=true;
  70. end;
  71. procedure TGDBController.SetArgs(const s : string);
  72. begin
  73. end;
  74. procedure TGDBController.StartTrace;
  75. begin
  76. Run;
  77. end;
  78. procedure TGDBController.Run;
  79. begin
  80. end;
  81. procedure TGDBController.TraceStep;
  82. begin
  83. end;
  84. procedure TGDBController.TraceNext;
  85. begin
  86. end;
  87. procedure TGDBController.TraceStepI;
  88. begin
  89. end;
  90. procedure TGDBController.TraceNextI;
  91. begin
  92. end;
  93. procedure TGDBController.Continue;
  94. begin
  95. end;
  96. procedure TGDBController.ClearSymbols;
  97. begin
  98. end;
  99. procedure TGDBController.WriteErrorBuf;
  100. begin
  101. end;
  102. procedure TGDBController.WriteOutputBuf;
  103. begin
  104. end;
  105. function TGDBController.GetOutput : Pchar;
  106. begin
  107. GetOutput:=nil;
  108. end;
  109. function TGDBController.GetError : Pchar;
  110. begin
  111. GetError:=nil;
  112. end;
  113. end.
  114. {
  115. $Log$
  116. Revision 1.2 2001-04-25 22:38:38 peter
  117. * updates from fixes branch so fpcmake for Makefiles works
  118. Revision 1.1 2000/07/13 09:48:34 michael
  119. + Initial import
  120. Revision 1.11 1999/02/19 16:54:41 peter
  121. * removed step tests
  122. Revision 1.10 1999/02/16 10:44:14 peter
  123. * updated
  124. Revision 1.9 1999/02/11 13:03:28 pierre
  125. Problem with last commit
  126. + added virtuals CommandBegin and CommandEnd
  127. + added command_level for TGDBInterface
  128. Revision 1.7 1999/02/10 09:00:43 pierre
  129. * duplicate call_reset removed
  130. * frames allocation and freeing corrected
  131. + GetError and GetOutput pchar function added
  132. + stop_breakpoint_number to know why the program stopped
  133. (used for watches)
  134. Revision 1.6 1999/02/08 17:35:07 pierre
  135. + added Run made TraceStep TraceNext Continue virtual
  136. Revision 1.5 1999/02/08 13:59:58 pierre
  137. - removed second debugger_started in TGDBController
  138. + StartTrace and Reset made virtual to be able to
  139. change CmResetDebugger state in IDE
  140. Revision 1.4 1999/02/08 11:39:33 pierre
  141. * reflect added setArgs in gdbint
  142. Revision 1.3 1999/02/06 00:04:55 florian
  143. * faked gdb fixed
  144. Revision 1.2 1999/02/04 17:19:22 peter
  145. * linux fixes
  146. Revision 1.1 1999/02/02 16:38:05 peter
  147. * renamed for better tp7 usage
  148. Revision 1.1 1999/01/28 19:56:12 peter
  149. * moved to include compiler/gdb independent of each other
  150. Revision 1.1 1999/01/22 10:24:17 peter
  151. + gdbcon fake unit
  152. }