This is the mail archive of the gdb-patches@sources.redhat.com 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: [commit] Deprecate remaining STREQ uses



It sounds like you missed the documentation of c-macro-expand, which
says:

    c-macro-expand is an interactive autoloaded Lisp function in `cmacexp'.
    (c-macro-expand START END SUBST)

    Expand C macros in the region, using the C preprocessor.
    Normally display output in temp buffer, but
    prefix arg means replace the region with it.

Note the last sentence: it means that "C-u M-x c-macro-expand RET"
will replace the marked region with the results of the expansion.

I found the documentation (needed it to set the variable that makes it prompt for the command arguments, and set the CPP to run :-) but could make neither head nor tails out of "prefix arg".


PS: Steps will likely be:

- change streq[n] to sane equivalents
- re-indent rougly half of GDB
the output of cpp is messy, I'm going to need to re-indent it, which means I'm going to need to re-indent befor the event
- this to-be-determined step


For reindenting, just mark the region and then type "C-M-\".

It's the spaces between the paren that's the problem. CPP turns:


	#define A(B,C) ((B) + (C))
	A(b,c)

into

( ( b ) + ( c ) )

I'm hoping that indent will eat a few of the unnecessary spaces (the paren are a lost cause).

Andrew



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