Bug 6623

Summary: Cannot watch array slice
Product: frysk Reporter: Teresa Thomas <tthomas>
Component: generalAssignee: Teresa Thomas <tthomas>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1625, 6622    

Description Teresa Thomas 2008-06-11 15:30:02 UTC
(fhpd) print array      
{0,0,0,0}
(fhpd) print array[ 0:1] 
{0,0}
(fhpd) watch array[ 0:1]
Watchpoint set: array[ 0:1] (Uses 0 debug register(s))
Comment 1 Teresa Thomas 2008-06-11 18:56:33 UTC
The watch installer was getting the size of the expression from the type parser.
But the type parser has no information on the size of a sliced array. Get size
from Location instead.

Commit:
    Fixes bug# 6623. Use Location.length() for getting expression size.
   
    frysk-core/frysk/rt/ChangeLog:
    2008-06-11  Teresa Thomas  <tthomas@redhat.com>
    
    	* WatchObserverInstaller.java (install): Use Location.length()
    	instead of Type.getSize().

Demo (IA32):

(fhpd) watch array[ 0:1]
(fhpd) Watchpoint set: array[ 0:1] (Uses 2 debug register(s))