Bug 5710

Summary: better variable unavailable error (it needs a message)
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: RESOLVED FIXED    
Severity: normal CC: swagiaal, tthomas
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2246    

Description Andrew Cagney 2008-02-01 22:03:27 UTC
consider:

    60   int main(){
    61     int some_int = 1;
->  62     first(some_int);
    63     return 0;
    64   }
(fhpd) print some_int 
Internal Error: frysk.debuginfo.ValueUavailableException
   at frysk.debuginfo.LocationExpression.decode(fhpd)
   at frysk.debuginfo.LocationExpression.decode(fhpd)
   at frysk.value.Variable.getValue(fhpd)
   at frysk.debuginfo.ObjectDeclarationSearchEngine.getValue(fhpd)
   at frysk.expr.CExprEvaluator.expr(fhpd)
   at frysk.expr.CExprEvaluator.expr(fhpd)
   at frysk.expr.Expression.getValue(fhpd)
   at frysk.hpd.EvalCommands$1.print(fhpd)
   at frysk.hpd.EvalCommands.eval(fhpd)
   at frysk.hpd.EvalCommands.access$0(fhpd)
   at frysk.hpd.EvalCommands$Print.interpret(fhpd)
   at frysk.hpd.ParameterizedCommand.interpret(fhpd)
   at frysk.hpd.MultiLevelCommand.interpret(fhpd)
   at frysk.hpd.CLI.execCommand(fhpd)
   at frysk.bindir.fhpd.main(fhpd)

the name of the variable would be ideal
Comment 1 Mark Wielaard 2008-02-01 22:54:07 UTC
(In reply to comment #0)
> Internal Error: frysk.debuginfo.ValueUavailableException

Also note that the exception name is misspelled (note the missing 'n').
Comment 2 Teresa Thomas 2008-02-04 19:47:26 UTC
Now:
(fhpd) print some_int 
Error: Value Unavailable - some_int  
-------------------------------------
Commit:
    Show error message on ValueUnavailableException. Fixes bug# 5710.
    
    frysk-core/frysk/debuginfo/ChangeLog
    2008-02-04  Teresa Thomas  <tthomas@redhat.com>
    
    	* ValueUavailableException.java: Renamed to...
    	* ValueUnavailableException.java: this.
    	* ValueUnavailableException.java (ValueUnavailableException): New.
    	* LocationExpression.java (decode): Update.