Bug 479912 - -g3 vs empty CU
-g3 vs empty CU
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-13 19:00 EST by Roland McGrath
Modified: 2009-02-11 09:42 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-11 09:42:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Roland McGrath 2009-01-13 19:00:18 EST
Description of problem:

-g3 compilation of a file with no defns (but with some macros) produces a nonempty .debug_macinfo section but an empty .debug_info section.


Version-Release number of selected component (if applicable):
gcc-4.3.2-7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. echo '#define foo bar' > g3.c
2. gcc -c -g3 g3.c
3. readelf --debug-dump={info,macro} g3.o
  
Actual results:

Empty .debug_info section.

Expected results:

.debug_info should get a compile_unit that has the basic attrs (producer, comp_dir, name) and the line and macro table pointers.  .debug_line should contain a file table even with no line entries, both for the include dirs info and for the macro table to point at.

Additional info:

It's fine to fix this only in 4.4, I think.
Comment 1 Jakub Jelinek 2009-02-11 09:42:56 EST
Should be fixed in gcc-4.4.0-0.17.

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