help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debug Fortran 90 code in Emacs with arguments.


From: Hongyi Zhao
Subject: Re: Debug Fortran 90 code in Emacs with arguments.
Date: Wed, 6 Apr 2022 10:26:11 +0800

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]