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][03/37] Eliminate builtin_type_ macros: Extract bitstring subscript handling


Joel Brobecker wrote:
> > 	* valarith.h (value_bitstring_subscript): New function.
> > 	(value_subscript): No longer handle TYPE_CODE_BITSTRING.
> 
> Perhaps it would be worth mentioning in the function description
> that it no longer handle bitstrings?

Makes sense.  I've added the following text:

@@ -171,6 +171,11 @@ an integer nor a pointer of the same typ
 }

 /* Return the value of ARRAY[IDX].
+
+   ARRAY may be of type TYPE_CODE_ARRAY or TYPE_CODE_STRING.  If the
+   current language supports C-style arrays, it may also be TYPE_CODE_PTR.
+   To access TYPE_CODE_BITSTRING values, use value_bitstring_subscript.
+
    See comments in value_coerce_array() for rationale for reason for
    doing lower bounds adjustment here rather than there.
    FIXME:  Perhaps we should validate that the index is valid and if

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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