This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] initial OpenCL C language support
- From: Ken Werner <ken at linux dot vnet dot ibm dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, Eli Zaretskii <eliz at gnu dot org>, gdb-patches at sourceware dot org
- Date: Thu, 4 Nov 2010 16:38:45 +0100
- Subject: Re: [patch] initial OpenCL C language support
- References: <201010221920.30046.ken@linux.vnet.ibm.com> <201011031402.40132.ken@linux.vnet.ibm.com> <20101103152723.GA2445@adacore.com>
On Wednesday, November 03, 2010 4:27:23 pm Joel Brobecker wrote:
> Patch looks good to me, at this point. It needs documentation
> (doc/gdb.texinfo) and a NEWS entry. Can you send a separate patch
> for this portion. Once the documentation is approved, you may commit
> this patch as well.
Ok, sounds good.
This was also brought up by Eli Zaretskii a few days ago:
http://sourceware.org/ml/gdb-patches/2010-10/msg00373.html
Attached is a patch that adds a few bits to the documentation and the NEWS
file.
Regards
Ken
ChangeLog:
2010-11-04 Ken Werner <ken.werner@de.ibm.com>
* NEWS: Mention OpenCL C language support.
doc/ChangeLog:
2010-11-04 Ken Werner <ken.werner@de.ibm.com>
* gdb.texinfo: (Summary) Add mention about OpenCL C language support.
(OpenCL C): New node.
Index: src/gdb/doc/gdb.texinfo
===================================================================
--- src.orig/gdb/doc/gdb.texinfo 2010-11-03 17:06:48.000000000 +0100
+++ src/gdb/doc/gdb.texinfo 2010-11-04 14:46:30.000000000 +0100
@@ -221,6 +221,9 @@ Support for D is partial. For informati
Support for Modula-2 is partial. For information on Modula-2, see
@ref{Modula-2,,Modula-2}.
+Support for OpenCL C is partial. For information on OpenCL C, see
+@ref{OpenCL C,,OpenCL C}.
+
@cindex Pascal
Debugging Pascal programs which use sets, subranges, file variables, or
nested functions does not currently work. @value{GDBN} does not support
@@ -11611,7 +11614,7 @@ being set automatically by @value{GDBN}.
@node Supported Languages
@section Supported Languages
-@value{GDBN} supports C, C@t{++}, D, Objective-C, Fortran, Java, Pascal,
+@value{GDBN} supports C, C@t{++}, D, Objective-C, Fortran, Java, OpenCL C, Pascal,
assembly, Modula-2, and Ada.
@c This is false ...
Some @value{GDBN} features may be used in expressions regardless of the
@@ -11632,6 +11635,7 @@ language reference or tutorial.
* C:: C and C@t{++}
* D:: D
* Objective-C:: Objective-C
+* OpenCL C:: OpenCL C
* Fortran:: Fortran
* Pascal:: Pascal
* Modula-2:: Modula-2
@@ -12278,6 +12282,42 @@ the description of an object. However,
with certain Objective-C libraries that have a particular hook
function, @code{_NSPrintForDebugger}, defined.
+@node OpenCL C
+@subsection OpenCL C
+
+@cindex OpenCL C
+This section provides information about @value{GDBN}s OpenCL C support.
+
+@menu
+* OpenCL C Datatypes::
+* OpenCL C Expressions::
+* OpenCL C Operators::
+@end menu
+
+@node OpenCL C Datatypes
+@subsubsection OpenCL C Datatypes
+
+@cindex OpenCL C Datatypes
+@value{GDBN} supports the builtin scalar and vector datatypes specified
+by OpenCL 1.1. In addition the half- and double-precision floating point
+data types of the cl_khr_fp16 and cl_khr_fp64 OpenCL extensions are also
+known to @value{GDBN}.
+
+@node OpenCL C Expressions
+@subsubsection OpenCL C Expressions
+
+@cindex OpenCL C Expressions
+@value{GDBN} supports accesses to vector components including the access as
+lvalue where possible. Since OpenCL C is based on C99 most C expressions
+supported by @value{GDBN} can be used as well.
+
+@node OpenCL C Operators
+@subsubsection OpenCL C Operators
+
+@cindex OpenCL C Operators
+@value{GDBN} supports the operators specified by OpenCL 1.1 for scalar and
+vector data types.
+
@node Fortran
@subsection Fortran
@cindex Fortran-specific support in @value{GDBN}
Index: src/gdb/NEWS
===================================================================
--- src.orig/gdb/NEWS 2010-11-04 14:14:25.000000000 +0100
+++ src/gdb/NEWS 2010-11-04 14:18:33.000000000 +0100
@@ -3,6 +3,9 @@
*** Changes since GDB 7.2
+* OpenCL C
+ Initial support for the OpenCL C language has been integrated into GDB.
+
* Python scripting
** GDB values in Python are now callable if the value represents a