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] |
Hello, On Thu, May 19, 2011 at 2:34 PM, Tom Tromey <tromey@redhat.com> wrote: >>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes: > > Kevin> following the discussion on > Kevin> http://sourceware.org/ml/gdb/2011-04/msg00131.html, here is a patch > Kevin> which allows Python scripts to know that several breakpoints (with the > Kevin> same PC) where hit during the "stop" event callback. > Kevin> What do you think about it ? > > It seems like a reasonable idea. > > I think we can't just replace the "breakpoint" attribute with > "breakpoints", since this is going to ship in 7.3, and we don't want to > break backward compatibility. I put back the breakpoint attribute in addition to the "breakpoints" sequence and added in the documentation that it was "legacy support", is it okay for you? > > This still needs a doc review. > > Kevin> +@defivar BreakpointEvent breakpoints > Kevin> +A tuple containing references to the breakpoints (type > > Not technically a tuple, the code makes a list. ?Saying "sequence" would > be ok. fixed > Kevin> +? /*Add any breakpoint set at this location to the list.? */ > > Space after the first "*". fixed > Kevin> +????????? if (list == NULL) > Kevin> +??????????? list = PyList_New (0); > > You must check for failure here. fixed > Kevin> +????????? if (PyList_Append (list, (PyObject *) > current_bs-> breakpoint_at->py_bp_object)) > Kevin> +??????????? goto fail; > > In the fail case, nothing frees 'list'. fixed I hope this patch will address all your concerns, cordially, Kevin -- 2011-04-22 Kevin Pouget <kevin.pouget@st.com> Handle multiple breakpoint hits in Python interface: * gdb.texinfo (Events In Python): Indicate that multiple breakpoint may have been hit and rename the variable to breakpoints. 2011-04-22 Kevin Pouget <kevin.pouget@st.com> Handle multiple breakpoint hits in Python interface: * python/py-bpevent.c (create_breakpoint_event_object): Rename C/Python variable to breakpoints. * python/py-stopevent.c (emit_stop_event): Return a Python tuple of bps instead of single breakpoint. Fix some space typos. * python/py-stopevent.c (create_breakpoint_event_object): Rename variable to breakpoints. 2011-04-22 Kevin Pouget <kevin.pouget@st.com> Handle multiple breakpoint hits in Python interface: * gdb.python/py-events.exp: Set a duplicate breakpoint and check its presence. * gdb.python/py-events.py (breakpoint_stop_handler): Browse all the breakpoint hits.
Attachment:
multiple-bps.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |