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] |
On Tue, Apr 26, 2011 at 10:22 AM, Kevin Pouget <kevin.pouget@gmail.com> wrote: > On Mon, Apr 25, 2011 at 2:19 PM, Tom Tromey <tromey@redhat.com> wrote: >> >> >>>>> "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. > > > done, it should only fail when the process runs out of space, so GDB > must handle it somewhere else > >> 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. > > right Hello, this patch was not explicitly accepted, could you please review this version updated against the last trunk? The doc was accepted, but I had to reshape the paragraph during the update, Eli, could you please tell me what you think about it? Cordially, Kevin 2011-04-21 Kevin Pouget <kevin.pouget@st.com> PR python/12691: Add the inferior to Python exited event * python/py-exitedevent.c (create_exited_event_object): Add inferior to exited_event. * python/py-event.h (emit_exited_event): Likewise * python/-inferior.c (python_inferior_exit): Likewise 2011-04-21 Kevin Pouget <kevin.pouget@st.com> PR python/12691: Add the inferior to Python exited event * gdb.python/py-events.exp: Test the inferior attribute of exited event with a fork. * gdb.python/py-events.py: Print inferior number on exit. * gdb.python/py-events.c: Fork the inferior. 2011-04-21 Kevin Pouget <kevin.pouget@st.com> PR python/12691: Add the inferior to Python exited event * gdb.texinfo (Events In Python): Describe exited inferior attribute.
Attachment:
0001-PR-12691-Add-the-inferior-to-Python-exited-event
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |