Bug 5416

Summary: <<fhpd) print argv[1]>> gets an error
Product: frysk Reporter: Andrew Cagney <cagney>
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: 2246, 5421    

Description Andrew Cagney 2007-11-27 19:48:58 UTC
When printing a <<char*>> (such as argv[1]) that is null, the output looks like:
   (char*) 0x1234 "Error: ...
the string should only be printed when the memory is accessable (at least the
first character).
Comment 1 Teresa Thomas 2007-11-30 18:25:35 UTC
    Catch exceptions on memory errors while printing pointers.
    
    frysk-core/frysk/value/ChangeLog
    2007-11-29  Teresa Thomas  <tthomas@redhat.com>
    
    	* PointerType.java (toPrint): Catch exception
    	on memory error.
Comment 2 Mark Wielaard 2007-12-05 16:11:46 UTC
What should happen given:

  (fhpd) print *(int*)1

The suggestion is to introduce an frysk.MemoryException.MemoryException(long
address, <other information>, possible underlying RuntimeException) extends
RuntimeException (or FryskException extends RUntimeException -- later).

and "encourage" memory code in the core to catch and re-throw that.


Comment 3 Teresa Thomas 2008-03-07 15:46:07 UTC
(fhpd) print argv[2]
(char *) 0x0 " < Memory Error > "