This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: fix `gdb -write' case


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]