This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/dwarf-2] Avoid unnecessary subrange_type (1/3)


Hello,

I was working on a problem that I found in GDB trying to print the upper
and/or lower bound of the long_long_integer type. After having analyzed
the problem, I found that it could be a bit or work to fix it properly.
However, I also noticed that we seem to be generating subrange_type DIEs
while they are not necessary. And fixing GCC to avoid generating then
also has the nice side-effect of avoiding the GDB problem in the usual
cases. I will explain everything in the final message, since the first
two patches are only cosmetic patches that don't change GCC's behavior.

This first patch is just a small mechanical rewrite that will help
make the final patch (the one that actually changes GCC's dwarf-2
output) much more readable.

2004-03-15  J. Brobecker  <brobecker@gnat.com>

        * dwarf2out.c (subrange_type_die): Define new variable "subtype"
        to hold the subtype tree instead of recomputing several time.

Tested on x86-linux by bootrapping and against the GCC & GDB testsuites.
OK to apply?

thanks,
-- 
Joel

Attachment: dw2-subtype.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]