Bug 6623 - Cannot watch array slice
Summary: Cannot watch array slice
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Teresa Thomas
URL:
Keywords:
Depends on:
Blocks: 1625 6622
  Show dependency treegraph
 
Reported: 2008-06-11 15:30 UTC by Teresa Thomas
Modified: 2008-06-11 18:56 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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))