gdbcon.pas 3.6 KB

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