This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/3] suppress notification


On 27.08.2012 13:45, Yao Qi wrote:
Hi,
This patch is to change the existing 'suppress mechanism' to avoid
adding endless command name comparisons to suppress corresponding MI
notification.  This patch adds a new field 'called' in 'struct
mi_cmd', so that each MI command has a 'suppressed' flag associated to
it, and we don't have to compare command name anymore.

Hi Yao,


I am not 100% sure this is ideal approach. Your comment say:

+  /* If non-null, the pointer to a flag indicates that this function is being
+     called.  */
+  int *called;

But in practice, this is pointer that points to notification that must be supressed when this command is running. So, at least the comment is misleading. And if some other code will want to check whether the current command is A, it would have to look at notification flags.

So, at the very least, this field should have a different name, I think.

Thanks,
Volodya


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]