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] Fix Python probe breakpoints


>>>>> "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


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