This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: Rename "info definitions"?


On Thursday 29 September 2011 14:42:42, Matt Rice wrote:
> On Thu, Sep 29, 2011 at 6:28 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> > On Thursday 29 September 2011 14:26:19, Pedro Alves wrote:
> >> We could just add it back if we ever find a need though.
> >> If a language needing it for macros would require adding more
> >> such switches to other commands.
> >
> > Err, I meant, "I suspect a language needing it for macros would
> > require adding more such switches to other commands."
> 
> None of the other macro commands accept options, they just interpret
> the entire string as a
> name currently, so this is a new form of c-ism
> 
> I think all that would be required is just turning the macro printing
> formatters into language based callbacks, and the macro expansion
> parser into language based callbacks.

Still, I'm really not sure doing just that would be a good idea.  You
can always run a C preprocessor on some non-C sources.  If it's a
compiled language, the compiler should be able to output c preprocessor
macro debug info in that case too.  I think that "info macros" and friends
(possibly renamed to c-macros?) should would still operate on the C
preprocessor macros / text expansion level in that case, instead of on
whatever the target language calls macros, and a new command specific
for the language's macros would be added.

> but who knows what you would run into if you actually tried.

Exactly.  :-)

-- 
Pedro Alves


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