Bug 5953 - testHaveSysRoot(frysk.hpd.TestSysRoot)frysk.expunit.TimeoutException
Summary: testHaveSysRoot(frysk.hpd.TestSysRoot)frysk.expunit.TimeoutException
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Stan Cox
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-17 18:57 UTC by Andrew Cagney
Modified: 2008-03-24 20:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2008-03-17 18:57:11 UTC
I'm guessing that the debug-info isn't being accepted.

 testHaveSysRoot(frysk.hpd.TestSysRoot)frysk.expunit.TimeoutException: timeout
of 5000 milliseconds expired; expecting:  <<go.*\n\(fhpd\) Breakpoint>>; buffer <<go
Running process 5213
(fhpd) Task 5213 is terminating from signal SIGSEGV(11)
>>
   at frysk.expunit.Child.expectMilliseconds(TestRunner)
   at frysk.expunit.Expect.expect(TestRunner)
   at frysk.expunit.Expect.expect(TestRunner)
   at frysk.expunit.Expect.expect(TestRunner)
   at frysk.hpd.TestSysRoot.testHaveSysRoot(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)
Comment 1 Andrew Cagney 2008-03-17 19:00:29 UTC
This is standalone:

$ ./frysk/bindir/fhpd 
(fhpd) load /usr/bin/funit-addresses -sysroot
/home/cagney/frysk/git/native/frysk-core/frysk/pkglibdir/test-sysroot
[0.0] Loaded executable file:
/home/cagney/frysk/git/native/frysk-core/frysk/pkglibdir/test-sysroot/usr/bin/funit-addresses
(fhpd) b main
breakpoint 0 deferred
(fhpd) run
Attached to process 5244
starting/running with this command: /usr/bin/funit-addresses
Running process 5244
(fhpd) Task 5244 is terminating from signal SIGSEGV(11)
Comment 2 Andrew Cagney 2008-03-17 19:02:28 UTC
Tracing the test shows it sending this:

00:00:00.193 5246.5246 [/dev/pts/5]: send "load
/home/cagney/frysk/git/native/frysk-core/frysk/pkglibdir/test-sysroot/usr/bin/funit-addresses
-sysroot /home/cagney/frysk/git/native/frysk-core/frysk/pkglibdir/test-sysroot"
00:00:00.194 5246.5246 [/dev/pts/5]: send "\n"

notice how it specified the Host's path to the executable; it should have just
specified the path within the sysroot.  However, fixing that doesn't appear to
fix the problem.
Comment 3 Stan Cox 2008-03-18 14:42:25 UTC
With elfutils
0.133 the test hits the case SHT_DYNSYM and ends up returning
DWFL_E_NOERROR.  With elfutils  0.129 DWFL_E_NO_SYMTAB would be returned
resulting in find_debuginfo being called to find the debuginfo.  This "patch"
fixes it.

diff --git a/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c
b/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c
index 7dd9b53..ac13571 100644
--- a/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c
+++ b/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c
@@ -253,6 +253,7 @@ load_symtab (struct dwfl_file *file, struct
dwfl_file **symfile,
          }
     }
 
+#if 0
   if (*symscn != NULL)
     /* We found one, though no SHT_SYMTAB_SHNDX to go with it.  */
     return DWFL_E_NOERROR;
@@ -260,6 +261,7 @@ load_symtab (struct dwfl_file *file, struct
dwfl_file **symfile,
   /* We found no SHT_SYMTAB, so any SHT_SYMTAB_SHNDX was bogus.
      We might have found an SHT_DYNSYM and set *SYMSCN et al though.
*/
   *xndxscn = NULL;
+#endif
   return DWFL_E_NO_SYMTAB;
 }
Comment 4 Stan Cox 2008-03-24 20:54:08 UTC
    * TestSysRoot.java (testHaveSysRoot()): Reactivate.
    * dwfl_module_getdwarf.c (load_symtab): Keep looking for an external
    symbol table even if we have a .dynsym.  Should be fixed post 0.133.