Re: [RFC] Python Finish Breakpoints

Kevin Pouget
2011-10-24T14:27:08Z

On Mon, Oct 24, 2011 at 3:00 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Kevin Pouget <kevin.pouget@gmail.com>
>> Date: Mon, 24 Oct 2011 11:14:42 +0200
>> Cc: gdb-patches@sourceware.org
>>
>> I've updated the doc and testsuite accordingly, and as far as I've
>> seen, there is no regression on X86_64/Fedora
>> (I need still need to improve my test environment)
>
> Thanks.

thanks for your review, and sorry for the typos ...

>> +@subsubsection Finish Breakpoints
>> +
>> +@cindex python finish breakpoints
>> +@tindex gdb.FinishBreakpoint
>
> No @node?  Why not?

my original idea was to insert "Finish Breakpoints" inside the
Breakpoint page, because they address (almost) the same idea, but
that's obviously not the right way to do!
I can add something like
@menu
...
* Finish Breakpoints in Python:: Setting Breakpoints on function
return using Python
...
@node Finish Breakpoints in Python

but can you/Tom confirm that you're happy with a new page/entry menu
for Finish Breakpoints?
It doesn't compile without the menu entry.

> ...
>> +breakpoint to become invisible to the user.  @xref{Breakpoints In Python}
>> +for further details about this argument.
>
> You need a comma after the braces (didn't "make info" bitch at you?).

no, now I make sure it compiles and looks fine on the pdf before submitting!
the comma is outside of the braces, so I guess it's not taken into
consideration by the compiler.

I've fixed it

>> +In some circonstances (e.g.@: @code{longjmp}, C++ exceptions, @value{GDBN}
>           ^^^^^^^^^^^^^
> A typo.  Also, we use "C@{++}" throughout the document, it looks
> prettier in print.

just for the record, it's "C@t{++}" which works

> Okay with these changes.

Thanks

I've also prepared a NEWS entry (I'll merge it with the next code
update). I assume the order is not important and put it next to the
other breakpoint-related entry; let me know if it's not the right
place:

diff --git a/gdb/NEWS b/gdb/NEWS
index 80c59f6..655e013 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -50,6 +50,10 @@
** The "gdb.breakpoint" function has been deprecated in favor of
"gdb.breakpoints".

+ ** A new class "gdb.FinishBreakpoint" is provided to catch the return
+ of a function. This class is based on the "finish" command
+ available in the CLI.
+
** Type objects for struct and union types now allow access to
the fields using standard Python dictionary (mapping) methods.
For example, "some_type['myfield']" now works, as does