Bug 3791 - Frames without resolved symbol name display address 0x0
Summary: Frames without resolved symbol name display address 0x0
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: 3346 3702 3728 3691
  Show dependency treegraph
 
Reported: 2006-12-23 15:47 UTC by Jan Kratochvil
Modified: 2007-01-24 20:36 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Last reconfirmed:


Attachments
Fix on top of the current code; unfinished Java binding. (732 bytes, patch)
2007-01-12 11:19 UTC, Jan Kratochvil
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2006-12-23 15:47:27 UTC
Per discussion on #frysk@irc.gimp.net:

There is another bug - but definitely in the Java binding of libunwind only -
that fstack(1) never shows any address without associated symbol and it just
prints `null' instead.
the bug in `./cni/FrameCursor.cxx':`lib::unwind::FrameCursor::create_frame_cursor'.
unw_get_proc_name fails => unw_get_reg (cursor, UNW_REG_IP, &ip);
libunwind/tests/test-ptrace.c
Comment 1 Mike Cvet 2007-01-04 18:12:27 UTC
2007-01-04  Mike Cvet  <mcvet@redhat.com>

	* cni/FrameCursor.cxx (create_frame_cursor): Resolve frame address
	from unw_get_proc_info independently of function name. Fixes #3791.
Comment 2 Jan Kratochvil 2007-01-12 11:18:09 UTC
The fix contains code using uninitialized variable if symbol resolving was
unsuccessful.
Comment 3 Jan Kratochvil 2007-01-12 11:19:15 UTC
Created attachment 1491 [details]
Fix on top of the current code; unfinished Java binding.

Uninitialized value of `offset' was being retrieved.
The success return value of unw_get_reg() SHOULD be evaluated and acted upon;
it should not fail in any valid run (even if no symbols/debugging is
available).  I am just not aware of all those Java bindings so IMO it would be
appropriate to throw there Java exception, please fix it according to the `#if
0' code.
I would not write that assert() there myself but based on the mcvet's original
code it should not hurt.  Shouldn't it be more some Java assertion?  Unaware of
your crosslanguage style there.
Comment 4 Jan Kratochvil 2007-01-24 20:36:21 UTC
Committed:
2007-01-24  Jan Kratochvil <jan.kratochvil@redhat.com>
            Mike Cvet  <mcvet@redhat.com>

        * cni/FrameCursor.cxx (create_frame_cursor): Fix retrieved address.
        Temporarily remove assertion failing due to libunwind Bug 3917.