This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix `gdb -write' case
- From: Yao Qi <yao at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 09 May 2011 11:10:41 +0800
- Subject: Re: RFC: fix `gdb -write' case
- References: <m3k4e3wy6w.fsf@fleche.redhat.com>
On 05/07/2011 01:12 AM, Tom Tromey wrote:
> I'd appreciate comments on this. In the absence of comments I will
> check it in. I plan to put it on the 7.3 branch as well.
>
> This comes from:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=696148
>
FYI, I can't access this bug. I am told "You are not authorized to
access bug #696148."
> +
> + result = allocate_value (expect_type);
> + memcpy (value_contents_raw (result), obstack_base (&output),
> + obstack_object_size (&output));
Compared with value_cstring, the difference is that expect_type is used
here, while type used in value_cstring is got from lookup_array_range_type.
struct type *stringtype
= lookup_array_range_type (char_type, lowbound, highbound + lowbound
- 1);
Any difference on these two type variables (expect_type vs. stringtype)?
> + }
> + else
> + result = value_cstring (obstack_base (&output),
> + obstack_object_size (&output),
> + type);
> }
> do_cleanups (cleanup);
> return result;
--
Yao (éå)