On Mon, 20 Mar 2023 15:08:41 -0400
David Malcolm via Gcc <gcc@gcc.gnu.org> wrote:

> Another way to invoke cc1 under the debugger is to add "-v" to the gcc
> invocation to get verbose output, and then see what command-line it
> uses to invoke cc1, and then run:
> 
>   gdb --args ARGS_OF_CC1_INVOCATION

I find it easiest just to invoke the compiler proper.  

        $ echo $cobol1
        [...]/build/gcc/cobol1

        $ gdb --args $cobol1 -oo  foo.cbl

That sets the compiler driver aside, and lets me work directly on the
compiler.  

Of course, I'm concerned with just one language, and just one
compiler.  If your concern crosses languages, I'd imagine the -wrapper
technique would be easier.  

--jkl

Reply via email to