Bug 500844
Summary: | GCC Generates debug symbols that map two sets of instructions to the closing line of the function. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Casey Dahlin <cdahlin> | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE <qe-baseos-auto> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 4.8 | CC: | jwest, tao, vanhoof | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | ia64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-06-14 19:48:47 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: |
|
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. |
Created attachment 343969 [details] Reproducer Description of problem: When stepping through a function compiled with gcc 3.4.6-10 on gdb 6.3.0.0-1.159.el4, coming to the end of the function yields odd behavior: when you arrive at the closing curly brace and step, instead of jumping back to the parent function, you are shown the closing curly brace again. I attribute this to bad debug symbols because compiling the test case on RHEL 5 and then debugging it on the same version of gdb on RHEL 4 causes the problem to go away (I'm doing this by linking with -static since the RHEL 5 binary will be incompatible with the RHEL 4 glibc). This has only been reproduced on ia64. x86_64 does not show this behavior. Version-Release number of selected component (if applicable): gcc 3.4.6-10 gdb 6.3.0.0-1.159.el4 How reproducible: 100% Steps to Reproduce: This problem can be reproduced by the attached "testpro.c". 1. Compile the reproducer: # gcc -g -o testpro testpro.c 2. Run gdb # gdb ./testpro 3. Set the Breakpoint (gdb) b sub_1 4. run 5. Executing the next or step sub command repeatedly (Please see the "Actual Results".) Actual Results: "}" is output two times. <step sub command> [root@localhost new]# gdb ./testpro ...snip... (gdb) b sub_1 Breakpoint 1 at 0x4000000000000730: file testpro.c, line 5. (gdb) run Starting program: /root/iza/repro/new/testpro Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0xa000000000000000 a = 0 Breakpoint 1, sub_1 (a=0x60000fffffffb910) at testpro.c:5 5 *a+=1; (gdb) step 6 } (gdb) step 6 } ... The "}" is output two times. (gdb) step main (argc=1, argv=0x60000fffffffbbb8) at testpro.c:14 14 sub_1(&a); (gdb)