This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [SCM] master: Add -sysroot option to fhpd.


Hi Stan,

On Mon, 2008-01-14 at 05:15 +0000, scox@sourceware.org wrote:
> commit c02d1bd3109ef0406be508fc08426e75b1b6fe07
> Author: Stan Cox <scox@redhat.com>
> Date:   Mon Jan 14 00:12:57 2008 -0500
> 
>     Add -sysroot option to fhpd.
>     
>     * fhpd.java (main): Add sysroot option.
>     * Makefile.am (frysk/pkglibdir/funit-addresses-stripped): New
>     * DwflCache.java (getSysRoot): New
>     * DbgVariables.java (DbgVariables): Make public.
>     (vars): Make static final.  Add SYSROOT.
>     (getStringValue): Make static.  Return String.
>     * ListCommand.java (interpret): Consider SYSROOT.
>     * TestSysRoot.java: New file.
>     * Dwfl.java (Dwfl): Add sysroot parameter.  Change all callers.
> [...]
> +    public void testHaveSysRoot() {
> +	File testPath = Config.getPkgLibFile("funit-addresses");
> +	System.out.println(Config.getBinFile("fhpd").getAbsolutePath() +
> +		" -sysroot " + testPath.getParent() + "/test-sysroot/ " +
> +	        testPath.getParent() + "/test-sysroot/"
> +			   + testPath.getAbsolutePath());
> +	child = new Expect(new String[] {
> +		Config.getBinFile("fhpd").getAbsolutePath(),
> +		"-sysroot", testPath.getParent() + "/test-sysroot/",
> +	        testPath.getParent() + "/test-sysroot/"
> +		+ testPath.getAbsolutePath()
> +	    });

This test doesn't work for me (and note the System.out.println which
probably shouldn't be there). It gives the following output:

$ ./TestRunner frysk.hpd.TestSysRoot
Running testHaveSysRoot(frysk.hpd.TestSysRoot) .../home/mark/src/frysk-obj/frysk-core/frysk/bindir/fhpd -sysroot /home/mark/src/frysk-obj/frysk-core/frysk/pkglibdir/test-sysroot/ /home/mark/src/frysk-obj/frysk-core/frysk/pkglibdir/test-sysroot//home/mark/src/frysk-obj/frysk-core/frysk/pkglibdir/funit-addresses
ERROR
  frysk.expunit.EndOfFileException: end-of-file; expecting:  <<\(fhpd\) >>; buffer <<Usage: fhpd <PID> || fhpd <EXEFILE> || fhpd <COREFILE> [<EXEFILE>]

      -console <LOG=LEVEL,...>    Set the log LOG to level LEVEL. Can set 
                                    multiple logs. The LEVEL can be [ OFF | 
                                    SEVERE | WARNING | INFO | CONFIG | FINE | 
                                    FINER | FINEST | ALL]. Example: -console 
                                    frysk=FINEST
      -log <LOG=LEVEL,...>        Set the log LOG to level LEVEL. Can set 
                                    multiple logs. The LEVEL can be [ OFF | 
                                    SEVERE | WARNING | INFO | CONFIG | FINE | 
                                    FINER | FINEST | ALL]. Example -log 
                                    frysk=FINE
      -verbose                    output verbose logging messages
      -trace <LOG=LEVEL,...>      Set the logger LOG to level LEVEL.
                                    The LEVEL can be [ NONE | FINE | FINEST ].
                                    Example -trace frysk=FINE
      -noexe                      Do not attempt to read an executable for a 
                                    corefile 
  -s, -sysroot SysRoot-Path       Assume the executable is from a sysroot 
                                    build 

Standard options:
  -help       print this help, then exit
  -version    print version number, then exit

Exception in thread "main" java.lang.RuntimeException: command not readable: /home/mark/src/frysk-obj/frysk-core/frysk/pkglibdir/test-sysroot//home/mark/src/frysk-obj/frysk-core/frysk/pkglibdir/funit-addresses
   at frysk.bindir.fhpd$1.parseCommand(fhpd)
   at frysk.util.CommandlineParser.doParse(fhpd)
   at frysk.util.CommandlineParser.parse(fhpd)
   at frysk.bindir.fhpd.main(fhpd)
>>

I assume you have something in your tree that generates
the /home/mark/src/frysk-obj/frysk-core/frysk/pkglibdir/test-sysroot/
directory. But I couldn't figure out how to properly do that.

Could you take a look? And maybe add some documentation on how a sysroot
dir should look like, how to generate one by hand?

Thanks,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]