Re: [PATCH 3/3] Add a gdb.events.frame_change event registry

Tom Tromey
2013-04-29T20:29:27Z

>>>>> "Maxime" == Maxime Coste <frrrwww@gmail.com> writes:

Maxime> + /* Note that frame_to_frame_object returns a borrowed reference,
Maxime> + so we don't need a decref here. */
Maxime> + py_frame = frame ? frame_info_to_frame_object (frame) : Py_None;

I don't think that comment is true.
Also we recently agreed in gdb to do explicit checks against NULL, so
"frame != NULL" here.

Maxime> + if (!py_frame || evpy_add_attribute (frame_change_event,

Likewise for py_frame.

Maxime> +emit_frame_change_event (struct frame_info* frame)

Space before the "*", not after.

Maxime> +
Maxime> +static void
Maxime> +python_frame_changed (struct frame_info *frame)

Every new function needs an introductory comment.

Maxime> + struct gdbarch *arch = frame ? get_frame_arch(frame) : target_gdbarch();

Space before open paren.

This patch needs a documentation change for the new Python API.

Tom