aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbsupport
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2019-10-11 11:28:35 -0700
committerJim Wilson <jimw@sifive.com>2019-10-11 11:28:35 -0700
commit5f93c5a6d5072d0bb2e4e734a6fe3336ce86ced9 (patch)
tree8a25223d23dcd275ff275c11787b851ab5ab3fc9 /gdb/gdbsupport
parenta83d4ef693d2bda527c6b73c2580a6fcaf63462c (diff)
downloadgdb-5f93c5a6d5072d0bb2e4e734a6fe3336ce86ced9.zip
gdb-5f93c5a6d5072d0bb2e4e734a6fe3336ce86ced9.tar.gz
gdb-5f93c5a6d5072d0bb2e4e734a6fe3336ce86ced9.tar.bz2
Improve comments in print-utils.h.
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.
Diffstat (limited to 'gdb/gdbsupport')
-rw-r--r--gdb/gdbsupport/print-utils.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/gdbsupport/print-utils.h b/gdb/gdbsupport/print-utils.h
index 815b14c..d52bcf8 100644
--- a/gdb/gdbsupport/print-utils.h
+++ b/gdb/gdbsupport/print-utils.h
@@ -24,20 +24,23 @@
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);