public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "James K. Lowden" <jklowden@schemamania.org>
To: gcc@gcc.gnu.org
Subject: Re: [GSOC] getting "gdb: unrecognized option '-dumpdir'' while trying to debug gcc using gdb
Date: Tue, 21 Mar 2023 10:23:52 -0400	[thread overview]
Message-ID: <20230321102352.8cc0391499d9af56f5e7766a@schemamania.org> (raw)
In-Reply-To: <01f48360dda6dba8bb10c0058fb802314a13ebd0.camel@redhat.com>

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	other threads:[~2023-03-21 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 17:06 Rishi Raj
2023-03-20 19:08 ` David Malcolm
2023-03-21 14:23   ` James K. Lowden [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230321102352.8cc0391499d9af56f5e7766a@schemamania.org \
    --to=jklowden@schemamania.org \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).