From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.schemamania.org (rrcs-50-75-19-234.nys.biz.rr.com [50.75.19.234]) by sourceware.org (Postfix) with ESMTP id 00C233858C5F for ; Tue, 21 Mar 2023 19:03:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00C233858C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=schemamania.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=schemamania.org Received: from oak.schemamania.org (localhost [IPv6:::1]) by mail.schemamania.org (Postfix) with ESMTP id 84CDA256FAB6 for ; Tue, 21 Mar 2023 10:23:52 -0400 (EDT) Date: Tue, 21 Mar 2023 10:23:52 -0400 From: "James K. Lowden" To: gcc@gcc.gnu.org Subject: Re: [GSOC] getting "gdb: unrecognized option '-dumpdir'' while trying to debug gcc using gdb Message-Id: <20230321102352.8cc0391499d9af56f5e7766a@schemamania.org> In-Reply-To: <01f48360dda6dba8bb10c0058fb802314a13ebd0.camel@redhat.com> References: <01f48360dda6dba8bb10c0058fb802314a13ebd0.camel@redhat.com> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64--netbsd) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06,KAM_DMARC_STATUS,NICE_REPLY_A,PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 20 Mar 2023 15:08:41 -0400 David Malcolm via Gcc 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