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] PR/12691 Add the inferior to Python exited event


>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:

Kevin> Following Tom's advise
Kevin> (http://sourceware.org/ml/gdb/2011-04/msg00116.html), here is a patch
Kevin> which hooks the inferior to the `exited' event object
Kevin> let me know what you think about it

It looks pretty good, but I think it needs a couple small changes.

Kevin> +  if (evpy_add_attribute (exited_event,
Kevin> +                          "inferior",
Kevin> +                          inferior_to_inferior_object (inf)) < 0)
Kevin> +    goto fail;

This does not account for the possibility that
inferior_to_inferior_object could fail.  I think there has
to be a temporary object that is explicitly checked against NULL.

Kevin> +gdb_test "continue" ".*event type: continue.*
Kevin> +.*event type: exit.*
Kevin> +.*exit code: 12.*
Kevin> +.*exit inf: 2.*"

Pass a test name to gdb_test.

Tom


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