This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] new memory-changed MI notification.
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Mon, 15 Oct 2012 13:02:52 -0600
- Subject: Re: [PATCH 1/2] new memory-changed MI notification.
- References: <1348793347-12556-1-git-send-email-yao@codesourcery.com> <1348793347-12556-2-git-send-email-yao@codesourcery.com> <87obkqt6ck.fsf@fleche.redhat.com> <5073D5B5.2060208@codesourcery.com>
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Tom> Usually I think it would be preferable to have a flag correspond to a
Tom> notification and not a command; but this would not work so well if a
Tom> command needed to suppress two different messages. (Though if that
Tom> happens then maybe we should have a slightly different approach based on
Tom> bitmasks.)
Yao> I agree with you that one flag should correspond to a notification. I
Yao> revised my patch a little bit to get rid of suppression flag
Yao> 'var_assign'.
Funny -- your previous message got me to agree that the bitmask approach
is overkill :)
Yao> 2012-10-09 Yao Qi <yao@codesourcery.com>
Yao> * breakpoint.c (invalidate_bp_value_on_memory_change): Add one
Yao> more parameter 'inferior'.
Yao> * corefile.c (write_memory_with_notification): Caller update.
Yao> * mi/mi-cmd-var.c: Include "mi-main.h".
Yao> (mi_cmd_var_assign): Set mi_suppress_notification.data_write_memory
Yao> to 1 and restore it later.
Yao> * mi/mi-cmds.c (mi_cmd mi_cmds): Update for "data-write-memory"
Yao> and "data-write-memory-bytes.
Yao> * mi/mi-interp.c: Include objfiles.h.
Yao> (mi_interpreter_init): Call observer_attach_memory_changed.
Yao> (mi_memory_changed): New.
Yao> * mi/mi-main.h (struct mi_suppress_notification) <memory>:
Yao> New field.
Either version of the patch is ok. Check in whichever one you prefer.
Tom