Bug 479912 - -g3 vs empty CU
Summary: -g3 vs empty CU
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-14 00:00 UTC by Roland McGrath
Modified: 2009-02-11 14:42 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-02-11 14:42:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Roland McGrath 2009-01-14 00:00:18 UTC
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 14:42:56 UTC
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.