Bug 4215

Summary: print 0x1 - 0x2 ;; hpd does not do hex subtraction.
Product: frysk Reporter: Nurdin Premji <npremji>
Component: generalAssignee: Stan Cox <scox>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2246    

Description Nurdin Premji 2007-03-19 16:37:45 UTC
]$ fhpd 
(fhpd) print
(fhpd) print 0xbfd9b440 - 0xbfd9b3d4
java.lang.NumberFormatException: number overflow (pos=7) : bfd9b440
   at java.lang.Integer.parseInt(libgcj.so.7rh)
   at java.lang.Integer.parseInt(libgcj.so.7rh)
   at frysk.expr.CppTreeParser.expr(fhpd)
   at frysk.expr.CppTreeParser.expr(fhpd)
   at frysk.expr.CppTreeParser.expr(fhpd)
   at frysk.cli.hpd.SymTab.print(fhpd)
   at frysk.cli.hpd.CLI$PrintHandler.handle(fhpd)
   at frysk.cli.hpd.CLI.execCommand(fhpd)
   at fhpd.main(fhpd)
Internal debugger error:  number overflow (pos=7) : bfd9b440
Comment 1 Nurdin Premji 2007-06-26 17:27:04 UTC
hpd does hex subtraction but values are printed in binary.
I.e.

(fhpd) print 0xbfd9b440 - 0xbfd9b3d4
108
Comment 2 Stan Cox 2008-04-23 20:47:44 UTC
(fhpd) print 0x1 - 0x3
-2