Bug 90402
| Summary: | backtrace() is broken | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 2.1 | Reporter: | Johan Walles <johan.walles> | ||||
| Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 2.1 | CC: | fweimer | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | ia64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2003-11-14 15:14:00 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 91534 [details]
backtrace() example program from the info documentation
I modified the program slightly to print the address of each function in
addition to the function itself.
Works for me just fine: $ gcc -g -o test test.c $ ./test Obtained 5 stack frames. 0x8048534: ./test(backtrace_symbols+0x124) [0x8048534] 0x80485cb: ./test(backtrace_symbols+0x1bb) [0x80485cb] 0x80485db: ./test(backtrace_symbols+0x1cb) [0x80485db] 0xb74b5687: /lib/i686/libc.so.6(__libc_start_main+0x93) [0xb74b5687] 0x8048441: ./test(backtrace_symbols+0x31) [0x8048441] $ ./test $ rpm -q glibc glibc-2.2.4-32.8 $ gcc -g -o test test.c -Wl,--export-dynamic $ ./test Obtained 5 stack frames. 0x8048734: ./test(print_trace+0x14) [0x8048734] 0x80487cb: ./test(dummy_function+0xb) [0x80487cb] 0x80487db: ./test(main+0xb) [0x80487db] 0xb74b5687: /lib/i686/libc.so.6(__libc_start_main+0x93) [0xb74b5687] 0x8048641: ./test(backtrace_symbols+0x3d) [0x8048641] (you need --export-dynamic if you want to see the symbols in the binary). This was filed on ia64. Your example shows 32-bit addresses. Could you try this on ia64? Oops, sorry, missed that. http://sources.redhat.com/ml/libc-hacker/2003-10/msg00003.html (not AS2.1 material though, needs GCC 3.2.3-rh or 3.3.1 and later). An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2003-334.html |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210 Description of problem: Building and compiling the example program from the info documentation doesn'd produce any backtrace. Version-Release number of selected component (if applicable): glibc-2.2.4-29.2 How reproducible: Always Steps to Reproduce: 1. Build the backtrace() example program from the info documentation 2. Run it Actual Results: (nil): [(nil)] Expected Results: I should have gotten a non-nil backtrace of the example program. Additional info: Will attach a copy of the example program.