Skip to content

Commit 6c9b428

Browse files
authored
Merge pull request #162 from vapniks/patch-1
Fix grammar & errors in sessions.rst
2 parents 3bb3220 + 741030b commit 6c9b428

File tree

1 file changed

+44
-47
lines changed

1 file changed

+44
-47
lines changed

doc/readthedocs/debugger/sessions.rst

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@ Basic Information when stopped inside Debugger
2626
Makefile: Makefile.in config.status
2727
remake<0>
2828
29-
The line immediately before the prompt ``remake<0>``, we show the the
29+
The line immediately before the prompt ``remake<0>``, shows the
3030
target name, ``Makefile`` and its dependencies: ``Makefile.in`` and
3131
``config.status``.
3232

3333
The line before that has position information
3434
``(/tmp/libcdio-paranoia/Makefile:428)``. But at the beginning of the
35-
line is and arrow made up of two characters, ``->``. This indicates that
36-
we have not done prerequisite checking for this target yet. Later we
35+
line is an arrow made up of two characters, ``->``. This indicates that
36+
we have not done the prerequisite checking for this target yet. Later we
3737
will come across other two-character icons like ``++``.
3838
See :ref:`icons <icons>` for a complete list.
3939

4040
The zero in the prompt ``remake<0>`` is the command history number. If GNU
41-
Readline history support has it increments as we enter commands,
41+
Readline history is supported then it increments the number as we enter commands,
4242
otherwise it stays zero.
4343

4444
For each recursive call to ``remake``, we'll add another pair of angle
4545
brackets ``<>`` around the number.
4646

47-
Some of the information is given in more verbose format using :ref:`info program <info_program>`:
47+
More verbose information can be obtained using :ref:`info program <info_program>`:
4848

4949
.. code:: console
5050
@@ -57,7 +57,7 @@ Some of the information is given in more verbose format using :ref:`info program
5757
Program stopped before rule-prequisite checking.
5858
remake<1>
5959
60-
Notice that the prompt has incremented to 1 after entering the a command.
60+
Notice that the prompt has incremented to 1 after entering the command.
6161

6262
Stepping
6363
++++++++
@@ -78,8 +78,8 @@ in the interpretation or execution of the makefile:
7878
I have elided the list of dependencies listed above and substituted ellipses (``...``).
7979

8080
There is a slight difference between what you will find in the
81-
Makefile and the target output seen above. Below I'll list the what is
82-
in the Makefile versus what is line as shown above.
81+
Makefile and the target output seen above. Below I'll compare what is
82+
in the Makefile (1st line displayed) with what is in the remake output (2nd line displayed).
8383

8484
For line 415:
8585

@@ -110,12 +110,12 @@ canonicalized. Therefore you see:
110110

111111
Let's recap where ``remake`` is in the process of running the Makefile.
112112
The first thing that seems to be done is that the ``Makefile``
113-
dependencies need to checked. A dependency of ``Makefile`` is
113+
dependencies need to be checked. A dependency of ``Makefile`` is
114114
``Makefile.in`` and that in turn depends on target ``aclocal.m4``. We have
115-
now stepped into and stopped at that target. At the ``remake<3>`` prompt then
116-
before checking for the dependencies of ``aclocal.m4``.
115+
now stepped into and stopped at that target. So, at the ``remake<3>`` prompt
116+
we have not yet checked the dependencies of ``aclocal.m4``.
117117

118-
You can see this dependency nesting that got us to this state using
118+
You can see the dependency nesting that got us to this state using
119119
the :ref:`backtrace <backtrace>` command:
120120

121121
.. code:: console
@@ -132,7 +132,7 @@ as is the case here. This Makefile was created via ``autotools``.
132132

133133
I had assumed that when I run ``make`` it looks for a default target and
134134
runs that. But as we see here, the first thing that goes on is to
135-
check to see if the Makefile is being used is itself out of date. If
135+
check to see if the Makefile being used is itself out of date. If
136136
that is the situation, then the Makefile will get recreated and you
137137
start again.
138138

@@ -141,7 +141,7 @@ tedious.
141141

142142
In the next section, we talk about :ref:`breakpoints <breakpoints>`
143143
which can get you to where you want to debug faster. To finish this
144-
session though use the :ref:`quit <quit>` command.
144+
session use the :ref:`quit <quit>` command.
145145

146146
.. code:: console
147147
@@ -191,9 +191,9 @@ Now when I issue a ``step``, I will step into the commands associated with the `
191191
remake<2>
192192
193193
Notice that the event icon above is ``++`` which means I am stepping shell commands, here those associated with the Make target ``dist``.
194-
Above the line with the event icon in between the two chevrons is the command that is *about* to be run.
194+
Above the line with the event icon in between the two lines of chevrons is the command that is *about* to be run.
195195

196-
To see the entire build commands, there is the :ref:`list <list>` command. Here is that:
196+
To see the build commands for the current target you can use the :ref:`list <list>` command:
197197

198198
.. code:: console
199199
@@ -204,9 +204,9 @@ To see the entire build commands, there is the :ref:`list <list>` command. Here
204204
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
205205
$(am__post_remove_distdir)
206206
207-
A form of the :ref:`target <target>` command, `target @ command` does
208-
about the same thing. Note that in both cases variables are not
209-
expanded as the are in the trace output shown above between chevrons.
207+
Alternatively you can use a form of the :ref:`target <target>` command: `target @ command`.
208+
Note that in both cases variables are not expanded as they are in the trace output shown
209+
above between chevrons.
210210

211211
Debugging Make Variables
212212
-------------------------
@@ -216,7 +216,7 @@ while in the ``list`` and ``target`` commands variables were not
216216
expanded.
217217

218218
You can query any GNU Make variable that has been set in the program
219-
*without* variables inside expanded using the :ref:`print <print>`
219+
*without* performing expansion on its value by using the :ref:`print <print>`
220220
command.
221221

222222
.. code:: console
@@ -226,23 +226,23 @@ command.
226226
227227
The ``(origin default)`` means this is a built-in definition. Many
228228
variables that you will be interested in though, are set somewhere,
229-
and the variable is not a default it's location is also shown:
229+
and if the variable is not a default it's location is also shown:
230230

231231

232232
.. code:: console
233233
234234
remake<3> print DATA
235235
Makefile:168 (origin: makefile) DATA := libcdio_paranoia.pc libcdio_cdda.pc
236236
237-
The other kind of print which does full expansion of the variables is
237+
The other kind of print which does full expansion of the variables value is
238238
called ``expand`` or ``x``. Here is an example
239239

240240
.. code:: console
241241
242242
remake<4> expand MAKE
243243
(origin default) MAKE := remake
244244
245-
Note that in printing expanded values we use ``:=`` while non-expanded
245+
Note that when printing expanded values we use ``:=`` while for non-expanded
246246
values we use ``=`` This output matches the semantics of these
247247
assignment operators.
248248

@@ -262,34 +262,31 @@ about the variable you can leave that off.
262262
However for ``print`` you *never* add the dollar sign; printing only
263263
prints *variables* not strings.
264264

265-
You can change values too using either the :ref:`set <set>`, :ref:`set <setq>` or
266-
:ref:`setqx <setqx>` commands. Let's see the difference between ``set``
267-
and ``setq``:
265+
You can change values too using either the :ref:`setq <setq>` or
266+
:ref:`setqx <setqx>` commands. Let's see the difference between ``setq``
267+
and ``setqx``:
268268

269269
.. code:: console
270270
271-
remake<6> set MAKE $(MAKE_COMMAND)
272-
Variable MAKE now has value 'remake'
273-
remake<7> setq MAKE $(MAKE_COMMAND)
271+
remake<6> setq MAKE $(MAKE_COMMAND)
274272
Variable MAKE now has value '$(MAKE_COMMAND)'
273+
remake<7> setqx MAKE $(MAKE_COMMAND)
274+
Variable MAKE now has value 'remake'
275275
276-
So with ``set``, the value in the expression ``$(MAKE_COMMAND)`` is
276+
So with ``setqx``, the value in the expression ``$(MAKE_COMMAND)`` is
277277
expanded before the variable definition is assigned. With ``setq`` the
278278
internal variables are kept unexpanded. Which you use or want is up to
279279
you.
280280

281-
Note the irregular syntax of ``set`` and ``setq``. Don't put an equal sign
282-
between the variable and the expression. That is, ``set MAKE = $(MAKE_COMMAND)`` gives:
281+
Note the irregular syntax of ``setq`` and ``setqx``. Don't put an equal sign
282+
between the variable and the expression. That is, ``setq MAKE = $(MAKE_COMMAND)`` gives:
283283

284284
.. code:: console
285285
286-
remake<8> set MAKE = $(MAKE_COMMAND)
286+
remake<8> setq MAKE = $(MAKE_COMMAND)
287287
Variable MAKE now has value '= remake'
288288
289-
which is probably not what you want. You can optionally put in the
290-
word "variable" when using ``set`` and "variable" is ignored. But
291-
it won't be if you use ``setq``.
292-
289+
which is probably not what you want.
293290

294291
Debugging POSIX Shell Commands
295292
------------------------------
@@ -305,7 +302,7 @@ Now consider the following sample Makefile ``test2.mk``:
305302
$(PACKAGE).txt: ../doc/remake.texi
306303
makeinfo --no-headers $< > $@
307304
308-
Running this entering the debugger initially:
305+
Running this with the debugger:
309306

310307
.. code:: console
311308
@@ -320,9 +317,9 @@ Running this entering the debugger initially:
320317
make.txt: ../doc/remake.texi
321318
322319
We could use the :ref:`target <target>` command to show information about
323-
the current target, but that returns lots if information. So let us instead
324-
narrow the information to just the automatic variables that get set. The
325-
following commands do this are all mean the same thing: `target make.txt variables`,
320+
the current target, but that returns lots of information. So let us instead
321+
narrow the information down to just the automatic variables that get set. The
322+
following commands will all do this: `target make.txt variables`,
326323
`target @ variables`, and `info locals`.
327324

328325
.. code::
@@ -370,7 +367,7 @@ command:
370367
remake<6> write
371368
File "/tmp/make.txt.sh" written.
372369
373-
We can issue a shell command ``cat -n /tmp/make.txt.sh`` to see what
370+
We can issue the shell command ``cat -n /tmp/make.txt.sh`` to see what
374371
was written. See :ref:`shell <shell>`.
375372

376373
.. code:: console
@@ -384,7 +381,7 @@ was written. See :ref:`shell <shell>`.
384381
385382
If you issue step commands, the debugger runs the each command and
386383
stops. In this way, you can inspect the result of running that
387-
particular shell command and decide to continue or not.
384+
particular shell command and decide whether to continue or not.
388385

389386
.. code:: console
390387
@@ -399,10 +396,10 @@ particular shell command and decide to continue or not.
399396
++ (/tmp/test2.mk:5)
400397
401398
Notice that we've shown the expansion automatically. One subtle
402-
difference in the above output, is that we only show the *single*
399+
difference in the above output, is that it only shows the *single*
403400
shell command that is about to be run when there are several
404401
commands. In our example though, there is only one command; so there is
405-
no a difference.
402+
no difference.
406403

407404
The ``++`` icon means that we are about to run that code.
408405

@@ -416,8 +413,8 @@ The ``++`` icon means that we are about to run that code.
416413
make.txt
417414
remake<10>
418415
419-
We ran the code, and are still at target ``make.txt``. The ``<-``
420-
icon means that have finished with this target and are about to return.
416+
We ran the code, and are still at the target ``make.txt``. The ``<-``
417+
icon means that we have finished with this target and are about to return.
421418

422419
If you are at a target and want to continue to the end of the target you
423420
can use the command ``finish`` which is the same as ``finish 0``.

0 commit comments

Comments
 (0)