Bug 3999 - On x86_64 Frysk uses the x86_64 version of libunwind to trace 32-bit programs
Summary: On x86_64 Frysk uses the x86_64 version of libunwind to trace 32-bit programs
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Nurdin Premji
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-07 21:44 UTC by Kyle Galloway
Modified: 2007-05-11 17:48 UTC (History)
0 users

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


Attachments
failed testDebug output of 32 bit. (2.73 KB, text/plain)
2007-02-07 21:46 UTC, Nurdin Premji
Details
successfull run of testDebug. (2.72 KB, text/plain)
2007-02-07 21:47 UTC, Nurdin Premji
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Galloway 2007-02-07 21:44:47 UTC
Because the x86 and x86_64 versions of libunwind use different sets of registers
for these architectures, the wrong values are passed to the accessreg callback.
 For example, when looking for the IP (RIP on 64, EIP on 32) it will still pass
16 to accessreg which corresponds to RIP on 64, but ST5 on 32.  For 32, since it
wants the IP, it should be passing 8, which corresponds to EIP.  Because of
this, it does not obtain the correct value for the IP, and the backtrace fails.
 To fix this, Frysk needs to check the elfclass of the binary and invoke the
proper version of libunwund (libunwund-x86 for 32, libuwind-x86_64 for 64).
Comment 1 Nurdin Premji 2007-02-07 21:46:40 UTC
Created attachment 1543 [details]
failed testDebug output of 32 bit.
Comment 2 Nurdin Premji 2007-02-07 21:47:13 UTC
Created attachment 1544 [details]
successfull run of testDebug.
Comment 3 Andrew Cagney 2007-02-08 18:13:12 UTC
Down stream RHEL bug: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224452
Comment 4 Nurdin Premji 2007-03-23 19:31:07 UTC
March 23, 2007
frysk-core/frysk/rt/CL
* StackAccessors.java (accessReg): Check that register sizes are the same.
	* StackFactory.java (createStackTrace): Use task's ISA to determine which
	Unwinder to create.
Comment 5 Nurdin Premji 2007-05-11 18:48:10 UTC
New bindings have been committed and activated.

2007-05-11
frysk-core/frysk/rt/CL
	* StackFactory.java: Switch to using RemoteFrame