Improve comments in print-utils.h.
authorJim Wilson <jimw@sifive.com>
Fri, 11 Oct 2019 18:28:35 +0000 (11:28 -0700)
committerJim Wilson <jimw@sifive.com>
Fri, 11 Oct 2019 18:28:35 +0000 (11:28 -0700)
Since I had to look at these function comments to fix the RISC-V ARI warnings,
I noticed that they make no sense.  The pulongest and plongest comments are
swapped.  phex is missing a comment.  And phex_nz doesn't mention how it is
different from phex.

* gdbsupport/print-utils.h (pulongest): Fix comment.
(plongest): Likewise.
(phex): Add missing comment, mention leading zeros.
(phex_nz): Add mention of no leading zeros to comment.

gdb/ChangeLog
gdb/gdbsupport/print-utils.h

index 3c1f87b32d2ca4842595b185b145909223ffd1c8..b898bf77f985f5b415dc7004b3d5fbaa093e82d3 100644 (file)
@@ -1,5 +1,10 @@
 2019-10-11  Jim Wilson  <jimw@sifive.com>
 
+       * gdbsupport/print-utils.h (pulongest): Fix comment.
+       (plongest): Likewise.
+       (phex): Add missing comment, mention leading zeros.
+       (phex_nz): Add mention of no leading zeros to comment.
+
        * riscv-tdep.c (riscv_push_dummy_code): Change %lld to %s and use
        plongest instead of unsigned long long cast.
 
index 815b14cbed304577f616f922007ad5283b03c108..d52bcf8f6111e17748452f4866720f3110a02e5d 100644 (file)
    cell.  */
 #define PRINT_CELL_SIZE 50
 
-/* %d for LONGEST.  The result is stored in a circular static buffer,
+/* %u for ULONGEST.  The result is stored in a circular static buffer,
    NUMCELLS deep.  */
 
 extern char *pulongest (ULONGEST u);
 
-/* %u for ULONGEST.  The result is stored in a circular static buffer,
+/* %d for LONGEST.  The result is stored in a circular static buffer,
    NUMCELLS deep.  */
 
 extern char *plongest (LONGEST l);
 
+/* Convert a ULONGEST into a HEX string, like %lx, with leading zeros.
+   The result is stored in a circular static buffer, NUMCELLS deep.  */
+
 extern char *phex (ULONGEST l, int sizeof_l);
 
-/* Convert a ULONGEST into a HEX string, like %lx.  The result is
-   stored in a circular static buffer, NUMCELLS deep.  */
+/* Convert a ULONGEST into a HEX string, like %lx, without leading zeros.
+   The result is  stored in a circular static buffer, NUMCELLS deep.  */
 
 extern char *phex_nz (ULONGEST l, int sizeof_l);
 
This page took 0.029902 seconds and 4 git commands to generate.