浏览代码

- removed the response parsing code for extracting the watch value from
TWatch.Get_new_value as that is now done in PrintCommand for the libgdb.a
interface (and is unnecessary for the gdb/mi interface, where we get the value
only, without anything else)

git-svn-id: trunk@30058 -

nickysn 10 年之前
父节点
当前提交
08ed7778db
共有 1 个文件被更改,包括 3 次插入30 次删除
  1. 3 30
      ide/fpdebug.pas

+ 3 - 30
ide/fpdebug.pas

@@ -2857,11 +2857,9 @@ procedure TWatch.rename(s : string);
 
 procedure TWatch.Get_new_value;
 {$ifndef NODEBUG}
-  var p, q : pchar;
-      i, j, curframe, startframe : longint;
+  var i, j, curframe, startframe : longint;
       s,s2,orig_s_result : AnsiString;
       loop_higher, found : boolean;
-      last_removed : char;
 
     function GetValue(var s : AnsiString) : boolean;
       begin
@@ -2950,9 +2948,9 @@ procedure TWatch.Get_new_value;
            loop_higher:=false;
       end;
     if found then
-      p:=StrNew(PChar(s))
+      current_value:=StrNew(PChar(s))
     else
-      p:=StrNew(PChar(orig_s_result));
+      current_value:=StrNew(PChar(orig_s_result));
     Debugger^.got_error:=false;
     { We should try here to find the expr in parent
       procedure if there are
@@ -2964,31 +2962,6 @@ procedure TWatch.Get_new_value;
     if curframe<>startframe then
       Debugger^.set_current_frame(startframe);
 
-    q:=nil;
-    if assigned(p) and (p[0]='$') then
-      q:=StrPos(p,'=');
-    if not assigned(q) then
-      q:=p;
-    if assigned(q) then
-      i:=strlen(q)
-    else
-      i:=0;
-    if (i>0) and (q[i-1]=#10) then
-      begin
-        while (i>1) and ((q[i-2]=' ') or (q[i-2]=#9)) do
-          dec(i);
-        last_removed:=q[i-1];
-        q[i-1]:=#0;
-      end
-    else
-      last_removed:=#0;
-    if assigned(q) then
-      current_value:=strnew(q)
-    else
-      current_value:=strnew('');
-    if last_removed<>#0 then
-      q[i-1]:=last_removed;
-    strdispose(p);
     GDBRunCount:=Debugger^.RunCount;
   end;
 {$else NODEBUG}