Browse Source

* fixed the passing of the breakpoint number to the DoSelectSourceLine method,
in the gdb/mi interface, which fixes various features, such as showing a
popup window with the old and new value of the variable, when stopping on a
watch, etc.

git-svn-id: trunk@29749 -

nickysn 10 years ago
parent
commit
c754fa35d2
1 changed files with 5 additions and 1 deletions
  1. 5 1
      ide/gdbmiint.pas

+ 5 - 1
ide/gdbmiint.pas

@@ -301,11 +301,15 @@ begin
     'end-stepping-range',
     'end-stepping-range',
     'function-finished':
     'function-finished':
       begin
       begin
+        { this resets stop_breakpoint_number to zero, so it's important to set it *afterwards* }
+        DebuggerScreen;
+
+        { now, set stop_breakpoint_number (if applicable) }
         if StopReason = 'breakpoint-hit' then
         if StopReason = 'breakpoint-hit' then
           stop_breakpoint_number := GDB.ExecAsyncOutput.Parameters['bkptno'].AsLongInt;
           stop_breakpoint_number := GDB.ExecAsyncOutput.Parameters['bkptno'].AsLongInt;
         if StopReason = 'watchpoint-trigger' then
         if StopReason = 'watchpoint-trigger' then
           stop_breakpoint_number := GDB.ExecAsyncOutput.Parameters['wpt'].AsTuple['number'].AsLongInt;
           stop_breakpoint_number := GDB.ExecAsyncOutput.Parameters['wpt'].AsTuple['number'].AsLongInt;
-        DebuggerScreen;
+
         Debuggee_started := True;
         Debuggee_started := True;
         current_pc := GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['addr'].AsPtrInt;
         current_pc := GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['addr'].AsPtrInt;
         if Assigned(GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['fullname']) then
         if Assigned(GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['fullname']) then