summaryrefslogtreecommitdiff
path: root/gdb/parser-defs.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-10-19 19:55:55 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-10-19 19:55:55 +0000
commiteef622ee1e8b1c8d6c9fb102e4c8103aeb70cea5 (patch)
treec1959a8bbf7b5c4adc4a3f4b8cb0e19f85cb9579 /gdb/parser-defs.h
parent9488100b8787340925ca1e59164dde6d4d2cf436 (diff)
downloadgdb-eef622ee1e8b1c8d6c9fb102e4c8103aeb70cea5.tar.gz
Document exp_descriptor.op_name should never return NULL.
This documents a constaint that struct exp_descriptor's "op_name" method implementation should obey. This might not have been part of the initial design, but is currently true of all instantiations, and already assumed by the current users. gdb/ChangeLog: * parser-defs.h (struct exp_descriptor): Document constraint on return value for "op_name" callbacks.
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r--gdb/parser-defs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 86f3bdf1063..c889d56e0b0 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -335,7 +335,10 @@ struct exp_descriptor
void *data),
void *data);
- /* Name of this operator for dumping purposes. */
+ /* Name of this operator for dumping purposes.
+ The returned value should never be NULL, even if EXP_OPCODE is
+ an unknown opcode (a string containing an image of the numeric
+ value of the opcode can be returned, for instance). */
char *(*op_name) (enum exp_opcode);
/* Dump the rest of this (prefix) expression after the operator