unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Debug Fortran 90 code in Emacs with arguments.
Date: Wed, 6 Apr 2022 10:26:11 +0800	[thread overview]
Message-ID: <CAGP6POKSH7-wPEZ_M8dUPy-14rz=WiKhCX9TVY5M_tO4p3aDiA@mail.gmail.com> (raw)
In-Reply-To: <831qybedeg.fsf@gnu.org>

On Tue, Apr 5, 2022 at 11:52 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Tue, 5 Apr 2022 22:19:54 +0800
> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> >
> > > > 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

I have understood by and large the usage of GDB within Emacs, based on
a brief introduction here [1].

BTW, the above introduction says the following:

```
Set a breakpoint by going to the source line of the program you're
debugging, and typing:

C-x [space]

(That's the space bar.) GDB will tell you that you've just set a breakpoint.
```

But I noticed the following key binding by running `C-h k C-x [space]
RET` on my machine:

```
rectangle-mark-mode is an autoloaded, interactive and compiled
function defined in rect.el.gz.

Signature
(rectangle-mark-mode &optional ARG)

Documentation
Toggle the region as rectangular.

This is a minor mode.  If called interactively, toggle the
Rectangle-Mark mode mode.  If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle.  Enable the
mode if ARG is nil, omitted, or is a positive number.  Disable the
mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer,
evaluate rectangle-mark-mode.

The mode's hook is called both when the mode is enabled and when it is
disabled.

Activates the region if needed.  Only lasts until the region is deactivated.

View in manual

Key Bindings
ctl-x-map SPC
global-map C-x SPC
```

[1] https://courses.cs.washington.edu/courses/cse378/97au/help/gdb-emacs.html

Regards,
Hongyi



  parent reply	other threads:[~2022-04-06  2:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05  2:27 Debug Fortran 90 code in Emacs with arguments Hongyi Zhao
2022-04-05 11:18 ` Eli Zaretskii
2022-04-05 12:57   ` Hongyi Zhao
2022-04-05 13:00     ` Hongyi Zhao
2022-04-05 13:19       ` Eli Zaretskii
2022-04-05 13:23         ` Eli Zaretskii
2022-04-05 13:52           ` Hongyi Zhao
2022-04-05 14:02             ` Eli Zaretskii
2022-04-05 14:14               ` Hongyi Zhao
2022-04-05 14:19         ` Hongyi Zhao
2022-04-05 15:52           ` Eli Zaretskii
2022-04-06  1:46             ` Hongyi Zhao
2022-04-06  2:32               ` Eli Zaretskii
2022-04-06  3:02                 ` Hongyi Zhao
2022-04-06  2:26             ` Hongyi Zhao [this message]
2022-04-06 10:50               ` Eli Zaretskii
2022-04-06 13:05                 ` Hongyi Zhao
2022-04-06 14:12                   ` Eli Zaretskii
2022-04-06 14:42                     ` Hongyi Zhao
2022-04-06 15:42                       ` Eli Zaretskii
2022-04-07  2:02                         ` Hongyi Zhao

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAGP6POKSH7-wPEZ_M8dUPy-14rz=WiKhCX9TVY5M_tO4p3aDiA@mail.gmail.com' \
    --to=hongyi.zhao@gmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@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).