Bug 3258 - Backtraces do not work on anything except x86
Summary: Backtraces do not work on anything except x86
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mike Cvet
URL:
Keywords:
Depends on:
Blocks: 2936
  Show dependency treegraph
 
Reported: 2006-09-25 20:03 UTC by Mike Cvet
Modified: 2006-09-28 18:14 UTC (History)
3 users (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 Mike Cvet 2006-09-25 20:03:20 UTC
------- Additional Comment #1 From Mark Wielaard 2006-09-11 09:25 [reply] 

When running the frysk.rt.tests.TestStackBacktrace test on something that is not
x86 you get:

1) testBacktrace(frysk.rt.tests.TestStackBacktrace)java.lang.NullPointerException
   at frysk.rt.StackCallbacks.accessReg(TestRunner)
   at lib.unwind.StackTraceCreator.unwind_setup(TestRunner)
   at lib.unwind.StackTraceCreator.createStackTrace(TestRunner)
   at frysk.rt.StackFactory.createStackFrame(TestRunner)
   at frysk.rt.tests.TestStackBacktrace.testBacktrace(TestRunner)
   at frysk.junit.Runner.<init>(TestRunner)
   at TestRunner.main(TestRunner)

Currently the callbacks are setup through the RegisterX86 class which only
hardcodes x86 registers.
Comment 1 Wu Zhou 2006-09-28 15:18:13 UTC
Is this true?  I had thought that Alex's patches work for x86_64 too. Maybe I am
wrong.
Comment 2 Mike Cvet 2006-09-28 15:34:06 UTC
Correct, the backtraces work on AMD64 properly; waiting to check on EM64T.
Comment 3 Mike Cvet 2006-09-28 15:48:35 UTC
Confirmed, they do.

Changes by:     aoliva@sourceware.org   2006-09-25 05:23:57

Modified files:
        lib/unwind     : ChangeLog 
        frysk/proc     : ChangeLog Isa.java IsaEMT64.java IsaIA32.java 
                         IsaPPC.java IsaPPC64.java 
        frysk/rt       : ChangeLog StackCallbacks.java 

Log message:
        frysk-imports/lib/unwind/ChangeLog:
        * RegisterAMD64.java: New class.
        frysk-core/frysk/proc/ChangeLog:
        * Isa.java (getRegisterNameByUnwindRegnum): New.
        * IsaEMT64.java (getRegisterNameByUnwindRegnum): Implement.
        * IsaIA32.java (getRegisterNameByUnwindRegnum): Implement.
        * IsaPPC.java (getRegisterNameByUnwindRegnum): Add stub.
        * IsaPPC64.java (getRegisterNameByUnwindRegnum): Add stub.
        frysk-core/frysk/rt/ChangeLog:
        * StackCallbacks.java: Do not import lib.unwind.RegisterX86.
        (accessMem): Implement according to Isa-specified word size.
        (accessReg, writeReg, accessFpreg, writeFpreg): Do not use
        RegisterX86 directly.
Comment 4 Mike Cvet 2006-09-28 18:14:03 UTC
^^^