Bug 834276 - bt command should print function offset next to symbols found on stack
Summary: bt command should print function offset next to symbols found on stack
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: crash
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Dave Anderson
QA Contact: Guangze Bai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-21 12:03 UTC by Stanislav Kozina
Modified: 2015-02-08 21:38 UTC (History)
5 users (show)

Fixed In Version: crash-6.1.0-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:34:10 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0317 normal SHIPPED_LIVE crash bug fix and enhancement update 2013-02-20 20:54:59 UTC

Description Stanislav Kozina 2012-06-21 12:03:12 UTC
Description of problem:

The bt command correctly searches for symbols found on the stack.
However it just prints the symbol itself, not the offset from the symbol.
Therefore it's often necessary to get the offset with the next command.

Version-Release number of selected component (if applicable):

$ rpm -qf `which crash`
crash-5.1.8-1.el6.x86_64
megatron$ rpm -qf `which crash`
crash-6.0.5-0.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. bt
2.
3.
  
Actual results:

Heavily shortened:
crash> bt
PID: 26899  TASK: ffff81020b54e100  CPU: 2   COMMAND: "java"
 #5 [ffff8101f95ebc20] sock_sendmsg at ffffffff80054e87
 #6 [ffff8101f95ebdc0] sys_sendmsg at ffffffff8022f850
 #7 [ffff8101f95ebf80] system_call at ffffffff8005d116

Expected results:

crash> bt
PID: 26899  TASK: ffff81020b54e100  CPU: 2   COMMAND: "java"
 #5 [ffff8101f95ebc20] sock_sendmsg+0xf8 at ffffffff80054e87
 #6 [ffff8101f95ebdc0] sys_sendmsg+0x217 at ffffffff8022f850
 #7 [ffff8101f95ebf80] system_call+0x7e at ffffffff8005d116

Additional info:

I used the same output for symbol as the `sym' command gives.

Comment 1 Dave Anderson 2012-06-21 13:27:00 UTC
No, that's not going to change -- at least by default.  I would consider 
adding an option to the "bt" command that would show the function offset.

And then there's the issue of the displays for all of the supported
architectures, which goes through the crash utility's arch-maintainers
upstream.

In fact all of these BZ's should have been posted to the crash-utility
mailing list.  Please consider joining that list:

  https://www.redhat.com/mailman/listinfo/crash-utility

No changes that you have suggested would be put into place without
going upstream first.

Comment 2 Stanislav Kozina 2012-06-21 14:22:51 UTC
> No, that's not going to change -- at least by default.  I would consider 
> adding an option to the "bt" command that would show the function offset.

That's a pitty - sometimes it's good to see directly how far in the function the call was done.

> And then there's the issue of the displays for all of the supported
> architectures, which goes through the crash utility's arch-maintainers
> upstream.

Sure, proper change would need to be done correctly for all architectures.

> 
> In fact all of these BZ's should have been posted to the crash-utility
> mailing list.  Please consider joining that list:
> 
>   https://www.redhat.com/mailman/listinfo/crash-utility
> 
> No changes that you have suggested would be put into place without
> going upstream first.

Thank you for the mailing list - I was not aware of that.
Already sent you sign request.

Comment 3 Dave Anderson 2012-06-21 15:03:51 UTC
> That's a pitty - sometimes it's good to see directly how far in the
> function the call was done.

Right -- the idea is to take the function address, and cut-and-paste
it to "dis -rl <address>.

Comment 4 RHEL Product and Program Management 2012-07-10 08:52:04 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Product and Program Management 2012-07-10 23:10:48 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 6 Dave Anderson 2012-08-16 15:39:45 UTC
Addressed with new "bt -s" option in crash-6.0.8:

http://people.redhat.com/anderson/crash.changelog.html#6_0_8

    - Added new "bt -s [-xd]" options that will display symbol names plus
      their offset in each frame.  The default behavior is unchanged, where
      only the symbol name is displayed.  The symbol offset will be
      expressed in the default output format, which can be overridden with
      the -x or -d options.
      (anderson@redhat.com)

Comment 11 errata-xmlrpc 2013-02-21 08:34:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0317.html


Note You need to log in before you can comment on or make changes to this bug.