This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Strings and arrays without malloc
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 10 Mar 2008 00:19:46 +0200
- Subject: Re: [RFC] Strings and arrays without malloc
- References: <20080309161335.GA26917@caradoc.them.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sun, 9 Mar 2008 12:13:35 -0400
> From: Daniel Jacobowitz <drow@false.org>
>
> Index: doc/gdb.texinfo
> ===================================================================
> RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
> retrieving revision 1.472
> diff -u -p -r1.472 gdb.texinfo
> --- doc/gdb.texinfo 3 Mar 2008 13:24:12 -0000 1.472
> +++ doc/gdb.texinfo 9 Mar 2008 15:47:34 -0000
> @@ -5567,8 +5567,10 @@ you compiled your program to include thi
> @cindex arrays in expressions
> @value{GDBN} supports array constants in expressions input by
> the user. The syntax is @{@var{element}, @var{element}@dots{}@}. For example,
> -you can use the command @code{print @{1, 2, 3@}} to build up an array in
> -memory that is @code{malloc}ed in the target program.
> +you can use the command @code{print @{1, 2, 3@}} to create an array
> +of three integers. If you pass an array to a function or assign it
> +to a program variable, @value{GDBN} copies the array to memory that
> +is @code{malloc}ed in the target program.
>
> Because C is so widespread, most of the expressions shown in examples in
> this manual are in C. @xref{Languages, , Using @value{GDBN} with Different
This part is approved. Thanks.