This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix Python probe breakpoints
- From: Tom Tromey <tom at tromey dot com>
- To: George Barrett <bob at bob131 dot so>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 21 Jan 2020 13:17:44 -0700
- Subject: Re: [PATCH] Fix Python probe breakpoints
- References: <hy4twfjtf2_d77s.fqzjeskq9ahknu9c8nzpjrhd46pkcr32ys11@mail.bob131.so>
>>>>> "George" == George Barrett <bob@bob131.so> writes:
George> The documentation for the `spec' variant of the gdb.Breakpoint
George> constructor states that the accepted format is the same as the break
George> command. However, using the -probe qualifier at the beginning of the
George> breakpoint specifier causes a GDB internal error as it attempts to
George> decode a probe location in the wrong code path. Without this
George> functionality, there doesn't appear to be another way to set breakpoints
George> on probe points from Python scripts.
Thank you for the patch.
George> gdb/ChangeLog:
George> 2019-12-08 George Barrett <bob@bob131.so>
George> Fix Python probe breakpoints.
George> * breakpoint.c: Make bkpt_probe_breakpoint_ops non-static.
George> * breakpoint.h: Add declaration for bkpt_probe_breakpoint_ops.
George> * python/py-breakpoint.c: Use probe ops if the specifier is a
George> probe specifier.
George> gdb/testsuite/ChangeLog:
George> 2019-12-08 George Barrett <bob@bob131.so>
George> Test Python probe breakpoints.
George> * gdb.python/py-breakpoint.c: Add probe point.
George> * gdb.python/py-breakpoint.exp: Add probe specifier test.
I wasn't sure about this approach, but after some reflection, I guess I
can accept it. Mostly I was concerned that the Python API here would be
sort of ugly. But, maybe it's not so bad.
So, this is ok.
Tom