This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix typo in gdb "explore" documentation
- From: Pedro Alves <palves at redhat dot com>
- To: Mike Percy <mpercy at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 19 Jan 2017 11:41:05 +0000
- Subject: Re: [PATCH] Fix typo in gdb "explore" documentation
- Authentication-results: sourceware.org; auth=none
- References: <CAPEe5NU5qAbMXiTeaqcM8ycYGFyXq3SDbTgMajX4No419+Zraw@mail.gmail.com>
Hi Mike,
On 01/13/2017 02:58 AM, Mike Percy wrote:
> * gdb.texinfo (Contributors): Add SRI International and University
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index 2b6b654..b60643d 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -8687,7 +8687,7 @@ Enter the index of the element you want to
> explore in `cs.arr': 5
>
> `(cs.arr)[5]' is a scalar value of type `int'.
>
> -(cs.arr)[5] = 4
> +(cs.arr)[5] = 5
I agree there's a typo here. Though, I think the example
would read a little bit better if we make the array's value at
index 5 be != from "5". Otherwise, it's a "wall of 5"s, and it
may be a bit confusing.
So I would suggest to instead change the arrays values
to keep that property. E.g.,:
- struct ComplexStruct cs = { &ss, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } };
+ struct ComplexStruct cs = { &ss, { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 } };
> -(cs.arr)[5] = 4
> +(cs.arr)[5] = 10
WDYT?
Thanks,
Pedro Alves