regno_reg_rtx and related macros

Mark Mitchell mark@codesourcery.com
Fri Dec 31 23:54:00 GMT 1999


>>>>> "Richard" == Richard Kenner <kenner@vlsi1.ultra.nyu.edu> writes:

    Richard> How?  The debugger never sees the macros and it would be
    Richard> unrealistic to have it to macro expansions even if it
    Richard> did.

There are ways of representing macros in debugging information, and
there have been debuggers than expanded them just fine.  I fully
expect that this will happen in gdb when the cpplib code is finished.

    Richard> The issue is what "obfuscating" means.  I certainly agree
    Richard> the sources should be clean in this regard.  However,
    Richard> they were before this change!

Cleanliness is a matter of opinion.  In my opinion, they were not as
clean as they are now, when the information about a function is nicely
encapsulated in a single data structure, rather than littered about in
lots and lots of statics.

    Richard> downside to making such changes and needs to be
    Richard> considered when such changes are made.

I'm sure this impact *was* considered.

    Richard> prints the register info, but, as I said, that's yet one
    Richard> more nonobvious thing for someone learning GCC to have to
    Richard> figure out.

Yup.  And, the old way meant that working on the code required you to
know more: namely the variables and the places in various structs
where they were squirrelled away as we switched between functions.

I agree with Bernd; expanding the macros in the source is probably an
improvement.  Then you can cut-and-paste things again.  Of course, the
things will be longer.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com



More information about the Gcc mailing list