Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: George Barrett <bob@bob131.so>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix Python probe breakpoints
Date: Tue, 21 Jan 2020 20:23:00 -0000	[thread overview]
Message-ID: <87k15k8syf.fsf@tromey.com> (raw)
In-Reply-To: <hy4twfjtf2_d77s.fqzjeskq9ahknu9c8nzpjrhd46pkcr32ys11@mail.bob131.so>	(George Barrett's message of "Sun, 8 Dec 2019 03:46:18 +1100")

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


      parent reply	other threads:[~2020-01-21 20:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-07 16:46 George Barrett
2019-12-08  2:35 ` Simon Marchi
2019-12-08  3:11   ` George Barrett
2019-12-08 15:44     ` Simon Marchi
2020-01-21 20:23 ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k15k8syf.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=bob@bob131.so \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox