Bug 6623

Summary: Cannot watch array slice
Product: frysk Reporter: Teresa Thomas <tthomas>
Component: generalAssignee: Teresa Thomas <tthomas>
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      
(fhpd) print array[ 0:1] 
(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.

    Fixes bug# 6623. Use Location.length() for getting expression size.
    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))