diff options
author | Joel Brobecker <brobecker@gnat.com> | 2012-10-19 19:55:56 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2012-10-19 19:55:56 +0000 |
commit | a5b1262727001de95f76936d2462e92fe183a8e7 (patch) | |
tree | e4ff501e83d2968e7d7dd308602bc893e93b9b22 /gdb/parser-defs.h | |
parent | 67d004eb5fb3d4b79dda53866b4a70983cd7ed06 (diff) | |
download | gdb-a5b1262727001de95f76936d2462e92fe183a8e7.zip gdb-a5b1262727001de95f76936d2462e92fe183a8e7.tar.gz gdb-a5b1262727001de95f76936d2462e92fe183a8e7.tar.bz2 |
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.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index 86f3bdf..c889d56 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 |