From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Debug Fortran 90 code in Emacs with arguments. Date: Tue, 05 Apr 2022 18:52:07 +0300 Message-ID: <831qybedeg.fsf@gnu.org> References: <83lewjeq2t.fsf@gnu.org> <838rsjekhe.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37998"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 05 17:52:26 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nblTm-0009lk-N9 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 05 Apr 2022 17:52:26 +0200 Original-Received: from localhost ([::1]:43584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nblTl-0003sb-Df for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 05 Apr 2022 11:52:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nblTP-0003sK-Gu for help-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:52:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nblTP-0007Hu-82 for help-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:52:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qDUbk0O8aebdfHOWm3NUGboEO3Px5n+GhF6O/z2X+Nk=; b=MoP9Keh0fRWl xzBnpaSyN3TYyi/HXHHVqb/EMe9vRrt8/+ZPAjqG9bT9bDkH7t9vBPmLTJwQyuMV135+0pKX2iU0c 99eRMcY2eKUKnXjihKTOrvUEQQ2I1ltQ4+3D02iHJe0NYIJ/1wt1lHrXBK/rFwSUUOXwV60tgdsMI gv15WwAHiTW7fclLzx2xtj83itMHYUlEseuV1kDcjXHuWRppJlY/KSLJc0PNh3/7DUmVsvgXkT0+5 SDjSZKpZY3z22BudCBgL1iJAH8In+URpQf6S7WuWfjngusAb2H5C7/tYXDo7TB+UmJ9wBNBRLSzR0 HQ0deW5q9urgJM6ymD2jWw==; Original-Received: from [87.69.77.57] (port=4210 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nblTO-0006ND-IY for help-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:52:03 -0400 In-Reply-To: (message from Hongyi Zhao on Tue, 5 Apr 2022 22:19:54 +0800) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136860 Archived-At: > From: Hongyi Zhao > Date: Tue, 5 Apr 2022 22:19:54 +0800 > Cc: help-gnu-emacs > > > > gdb -i=mi gfotran > > > > Is 'gfortran' the name of your program's executable file? If not, > > edit the command to replace "gfortran" with the name of your program's > > executable file. > > I tried as follows, but still failed: > > M-x gdb RET > # 1 2 are arguments passed to the program: > Run gdb (like this): gdb -i=mi ./bin/Debug/bilbao_read 1 2 > > Then I encounter the following rather messy information: You use a non-trivial tool for the first time, so you should at least study its --help screen. That's not how you pass command-line arguments to a program being debugged. You need to use --args: gdb -i=mi --args ./bin/Debug/bilbao_read 1 2