Bug 5831

Summary: create a first-class frysk.sysroot.SysRoot Object
Product: frysk Reporter: Andrew Cagney <cagney>
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: 5624, 5829    

Description Andrew Cagney 2008-03-03 20:43:48 UTC
And perhaps a "SysFile" object?  (frysk.chroot and ChangeRoot?)  These would
provide the primitaves for converting from relative and relatively absolute
paths to canonical and absolute paths.  For instance:

     sysroot   input      rooted    canonical
       /      /bin/ls    /bin/ls     /bin/ls
      /tmp    /bin/ls    /bin/ls     /tmp/bin/ls
      /tmp       ls      /bin/ls     /tmp/bin/ls

(the last case assumes that the sysroot contains a /bin/ls file and PATH=/bin)
(better names for rooted and canonical?)

The sysroot class can then directly handle these transformations.
Comment 1 Andrew Cagney 2008-03-03 20:44:41 UTC
The SysRoot object transforms the location of three things:

-> debuginfo
-> source
-> executable and shared libraries
Comment 2 Stan Cox 2008-03-17 20:29:37 UTC
Move SysRoot handling to SysRoot.java
    
* SysRootFile.java: New.
* SysRoot.java: Renamed from Sysroot.java.  Changed to use SysRootFile.
* TestSysRoot.java: Renamed from TestSysroot.java.  Changed to use SysRootFile.
* SysRootCache.java: Renamed from SysrootCache.java. Change all callers.
* LinuxExeFactory.java (findExe): Move to SysRoot.findExe.
(createProc): Use it.
* DebugInfoFrame.java (getLine): Use SysRoot.
* ListCommand.java (interpret): Use SysRoot.
* TestFstack.java (getCanonicalAbsRootSrcDir): New. Use instead of
Config.getRootSrcDir.
* CommandlineParser.java (parseSysRoot): Make private.