This is the mail archive of the gcc@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]

Re: RFC: C/C++ preprocessor macro support for GDB


On Sun, 17 Mar 2002, Daniel Berlin wrote:

> 
> On Sunday, March 17, 2002, at 01:23 AM, Jim Blandy wrote:
> 
> >
> > The following patch adds support for C/C++ preprocessor macros to GDB.
> > It's tentative:
> >
> > - There are no ChangeLog entries.
> > - It's not broken up into relatively independent changes.
> > - There's no documentation.
> > - There are no tests.
> > - There are some unimplemented features.
> >
> > I'll put it in proper form and re-post it soon, but I'm putting it out
> > now in hopes that folks will try it out and send me bug reports and
> > suggestions.
> >
> > The patch reads Dwarf 2 macro information, which GCC doesn't currently
> > generate.  (In fact, I don't know if any compiler generates it at the
> > moment.)

For the record, I can name plenty of compilers that generate it.
Along with other dwarf2 features that gdb doesn't support yet (Intel's C++ 
compiler for linux generates namespaces and other things, fer instance).

> 
> Umm, Actually, we've been generating it for quite a while.
> Try -gdwarf-2 -g3.
> I can't remember when exactly I added it, but it was certainly a while 
> ago.
> > So the debugger side of pre-processor macro support is pretty much
> > done.  I hope someone in GCC-land gets the itch and adds the
> > compiler-side support needed.

And Jim, in the future, if you are considering adding more support for 
various debug info features, it would probably be better for you if you 
asked if gcc had support before you started.

That way, you would save the time of having to make up your own test 
cases by hand in assembly, etc, during development.

In this case, the libcpp people probably would have been willing to work 
with you so you didn't have to write your own macro-expander.


--Dan


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