* valprint.c (val_print): Extend comment.
authorPedro Alves <palves@redhat.com>
Mon, 7 Feb 2011 17:49:32 +0000 (17:49 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 7 Feb 2011 17:49:32 +0000 (17:49 +0000)
* ada-valprint.c (ada_valprint): Rewrite comment deferring
interface explanation to val_print.
(ada_val_print_array): Adjust comment to current interface.
(print_field_values): Adjust comment to current interface.
* c-valprint.c (c_val_print): Rewrite comment deferring interface
explanation to val_print.
* f-valprint.c (f_val_print): Ditto.
* jv-valprint.c (java_val_print): Ditto.
* m2-valprint.c (m2_val_print): Ditto.
* p-valprint.c (pascal_val_print): Ditto.

gdb/ChangeLog
gdb/ada-valprint.c
gdb/c-valprint.c
gdb/f-valprint.c
gdb/jv-valprint.c
gdb/m2-valprint.c
gdb/p-valprint.c
gdb/valprint.c

index 37531225bff1018a4eedea23b63cd75fe9971573..641f22563d9fe540bb446f7983ced364c947e624 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Pedro Alves  <pedro@codesourcery.com>
+
+       * valprint.c (val_print): Extend comment.
+       * ada-valprint.c (ada_valprint): Rewrite comment deferring
+       interface explanation to val_print.
+       (ada_val_print_array): Adjust comment to current interface.
+       (print_field_values): Adjust comment to current interface.
+       * c-valprint.c (c_val_print): Rewrite comment deferring interface
+       explanation to val_print.
+       * f-valprint.c (f_val_print): Ditto.
+       * jv-valprint.c (java_val_print): Ditto.
+       * m2-valprint.c (m2_val_print): Ditto.
+       * p-valprint.c (pascal_val_print): Ditto.
+
 2011-02-07  Thiago Jung Bauermann  <bauerman@br.ibm.com>
 
        * breakpoint.c (parse_breakpoint_sals): Fix description.
index bd297c6c1f03929347914cf3f54ab19b499901e9..bc3ea2678b4cdcbc030e852d3001bd664af270fc 100644 (file)
@@ -564,15 +564,9 @@ ada_printstr (struct ui_file *stream, struct type *type,
 }
 
 
-/* Print data of type TYPE located at VALADDR (within GDB), which came from
-   the inferior at address ADDRESS, onto stdio stream STREAM according to
-   OPTIONS.  The data at VALADDR is in target byte order.
-
-   If the data is printed as a string, returns the number of string characters
-   printed.
-
-   RECURSE indicates the amount of indentation to supply before
-   continuation lines; this amount is roughly twice the value of RECURSE.  */
+/* See val_print for a description of the various parameters of this
+   function; they are identical.  The semantics of the return value is
+   also identical to val_print.  */
 
 int
 ada_val_print (struct type *type, const gdb_byte *valaddr,
@@ -598,7 +592,7 @@ ada_val_print (struct type *type, const gdb_byte *valaddr,
 }
 
 /* Assuming TYPE is a simple array, print the value of this array located
-   at VALADDR.  See ada_val_print for a description of the various
+   at VALADDR + OFFSET.  See ada_val_print for a description of the various
    parameters of this function; they are identical.  The semantics
    of the return value is also identical to ada_val_print.  */
 
@@ -1026,13 +1020,14 @@ print_record (struct type *type, const gdb_byte *valaddr,
   fprintf_filtered (stream, ")");
 }
 
-/* Print out fields of value at VALADDR having structure type TYPE.
+/* Print out fields of value at VALADDR + OFFSET having structure type TYPE.
 
-   TYPE, VALADDR, STREAM, RECURSE, and OPTIONS have the
-   same meanings as in ada_print_value and ada_val_print.
+   TYPE, VALADDR, OFFSET, STREAM, RECURSE, and OPTIONS have the same
+   meanings as in ada_print_value and ada_val_print.
 
-   OUTER_TYPE and OUTER_VALADDR give type and address of enclosing record
-   (used to get discriminant values when printing variant parts).
+   OUTER_TYPE and OUTER_OFFSET give type and address of enclosing
+   record (used to get discriminant values when printing variant
+   parts).
 
    COMMA_NEEDED is 1 if fields have been printed at the current recursion
    level, so that a comma is needed before any field printed by this
index 287dc0ba2a7f259ebc3338a0bd7d82698acf41be..baad597cf023a4977af6763ca6b90ae2a02e699b 100644 (file)
@@ -142,13 +142,9 @@ c_textual_element_type (struct type *type, char format)
   return 0;
 }
 
-
-/* Print data of type TYPE located at VALADDR (within GDB), which came
-   from the inferior at address ADDRESS, onto stdio stream STREAM
-   according to OPTIONS.  The data at VALADDR is in target byte order.
-
-   If the data are a string pointer, returns the number of string
-   characters printed.  */
+/* See val_print for a description of the various parameters of this
+   function; they are identical.  The semantics of the return value is
+   also identical to val_print.  */
 
 int
 c_val_print (struct type *type, const gdb_byte *valaddr,
index a15e777192ebe4c4b2ecb7b9e5a7e64b305f4f7c..3280ddcb5d98ff890be0f09184f1c1a370efd311 100644 (file)
@@ -242,12 +242,9 @@ Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"),
 }
 \f
 
-/* Print data of type TYPE located at VALADDR (within GDB), which came from
-   the inferior at address ADDRESS, onto stdio stream STREAM according to
-   OPTIONS.  The data at VALADDR is in target byte order.
-
-   If the data are a string pointer, returns the number of string characters
-   printed.  */
+/* See val_print for a description of the various parameters of this
+   function; they are identical.  The semantics of the return value is
+   also identical to val_print.  */
 
 int
 f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
index b282da89655fa50c8a10f7540f6a1289caf4ff68..0e5b97f10ccda85a67179a85cf1757caa3675d12 100644 (file)
@@ -474,12 +474,9 @@ java_print_value_fields (struct type *type, const gdb_byte *valaddr,
   fprintf_filtered (stream, "}");
 }
 
-/* Print data of type TYPE located at VALADDR (within GDB), which came from
-   the inferior at address ADDRESS, onto stdio stream STREAM according to
-   OPTIONS.  The data at VALADDR is in target byte order.
-
-   If the data are a string pointer, returns the number of string characters
-   printed.  */
+/* See val_print for a description of the various parameters of this
+   function; they are identical.  The semantics of the return value is
+   also identical to val_print.  */
 
 int
 java_val_print (struct type *type, const gdb_byte *valaddr,
index f22ee2fb8a44ecebf1c7e3ead370ea0dc198a614..ed997b16b60d701d52610242a7b81e1fa8dd8902 100644 (file)
@@ -310,12 +310,9 @@ m2_print_array_contents (struct type *type, const gdb_byte *valaddr,
 }
 
 
-/* Print data of type TYPE located at VALADDR (within GDB), which came from
-   the inferior at address ADDRESS, onto stdio stream STREAM according to
-   OPTIONS.  The data at VALADDR is in target byte order.
-
-   If the data are a string pointer, returns the number of string characters
-   printed.  */
+/* See val_print for a description of the various parameters of this
+   function; they are identical.  The semantics of the return value is
+   also identical to val_print.  */
 
 int
 m2_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
index ca7606a72e82337df4656593312fa5bfb77470b6..8e7907022494881a1ea2545cb182dc51a9b9461f 100644 (file)
 #include "cp-support.h"
 \f
 
-
-
-/* Print data of type TYPE located at VALADDR (within GDB), which came from
-   the inferior at address ADDRESS, onto stdio stream STREAM according to
-   OPTIONS.  The data at VALADDR is in target byte order.
-
-   If the data are a string pointer, returns the number of string characters
-   printed.  */
-
+/* See val_print for a description of the various parameters of this
+   function; they are identical.  The semantics of the return value is
+   also identical to val_print.  */
 
 int
 pascal_val_print (struct type *type, const gdb_byte *valaddr,
index b6b96d4ec4f239be11372c4d1df795529cb683c3..b32d6fca5e57f6ababcc9847fcdbcaca14890062 100644 (file)
@@ -293,20 +293,28 @@ val_print_optimized_out (struct ui_file *stream)
   fprintf_filtered (stream, _("<optimized out>"));
 }
 
-/* Print using the given LANGUAGE the data of type TYPE located at VALADDR
-   (within GDB), which came from the inferior at address ADDRESS, onto
-   stdio stream STREAM according to OPTIONS.
-
-   If the data are a string pointer, returns the number of string characters
-   printed.
-
-   FIXME:  The data at VALADDR is in target byte order.  If gdb is ever
-   enhanced to be able to debug more than the single target it was compiled
-   for (specific CPU type and thus specific target byte ordering), then
-   either the print routines are going to have to take this into account,
-   or the data is going to have to be passed into here already converted
-   to the host byte ordering, whichever is more convenient.  */
-
+/* Print using the given LANGUAGE the data of type TYPE located at
+   VALADDR + EMBEDDED_OFFSET (within GDB), which came from the
+   inferior at address ADDRESS + EMBEDDED_OFFSET, onto stdio stream
+   STREAM according to OPTIONS.  VAL is the whole object that came
+   from ADDRESS.  VALADDR must point to the head of VAL's contents
+   buffer.
+
+   The language printers will pass down an adjusted EMBEDDED_OFFSET to
+   further helper subroutines as subfields of TYPE are printed.  In
+   such cases, VALADDR is passed down unadjusted, as well as VAL, so
+   that VAL can be queried for metadata about the contents data being
+   printed, using EMBEDDED_OFFSET as an offset into VAL's contents
+   buffer.  For example: "has this field been optimized out", or "I'm
+   printing an object while inspecting a traceframe; has this
+   particular piece of data been collected?".
+
+   RECURSE indicates the amount of indentation to supply before
+   continuation lines; this amount is roughly twice the value of
+   RECURSE.
+
+   If the data is printed as a string, returns the number of string
+   characters printed.  */
 
 int
 val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
This page took 0.035215 seconds and 4 git commands to generate.