* gdb/mi: fixed inserting and stopping on access and read watchpoints

git-svn-id: trunk@29786 -
This commit is contained in:
nickysn 2015-02-22 01:00:36 +00:00
parent cb983ab42d
commit c5b9465255
2 changed files with 14 additions and 1 deletions

View File

@ -196,7 +196,14 @@ begin
Command('-break-watch -r ' + location);
end;
if GDB.ResultRecord.Success then
WatchpointInsert := GDB.ResultRecord.Parameters['wpt'].AsTuple['number'].AsLongInt
case WatchpointType of
wtWrite:
WatchpointInsert := GDB.ResultRecord.Parameters['wpt'].AsTuple['number'].AsLongInt;
wtReadWrite:
WatchpointInsert := GDB.ResultRecord.Parameters['hw-awpt'].AsTuple['number'].AsLongInt;
wtRead:
WatchpointInsert := GDB.ResultRecord.Parameters['hw-rwpt'].AsTuple['number'].AsLongInt;
end
else
WatchpointInsert := 0;
end;

View File

@ -332,6 +332,8 @@ Ignore:
end;
'breakpoint-hit',
'watchpoint-trigger',
'access-watchpoint-trigger',
'read-watchpoint-trigger',
'end-stepping-range',
'function-finished':
begin
@ -343,6 +345,10 @@ Ignore:
stop_breakpoint_number := GDB.ExecAsyncOutput.Parameters['bkptno'].AsLongInt;
if StopReason = 'watchpoint-trigger' then
stop_breakpoint_number := GDB.ExecAsyncOutput.Parameters['wpt'].AsTuple['number'].AsLongInt;
if StopReason = 'access-watchpoint-trigger' then
stop_breakpoint_number := GDB.ExecAsyncOutput.Parameters['hw-awpt'].AsTuple['number'].AsLongInt;
if StopReason = 'read-watchpoint-trigger' then
stop_breakpoint_number := GDB.ExecAsyncOutput.Parameters['hw-rwpt'].AsTuple['number'].AsLongInt;
Debuggee_started := True;
current_pc := GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['addr'].AsPtrInt;