public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Mihails Strasuns (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: gdb-patches@sourceware.org
Cc: Pedro Alves <palves@redhat.com>,
	Tom Tromey <tromey@sourceware.org>,
	Luis Machado <luis.machado@linaro.org>,
	Simon Marchi <simon.marchi@polymtl.ca>
Subject: [review v2] jit: remove bp locations when unregistering jit code
Date: Thu, 12 Dec 2019 09:05:00 -0000	[thread overview]
Message-ID: <20191212090458.9403420AF6@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1574686491000.Id9133540d67fa0c4619ac88324b0349b89e4b2b1@gnutoolchain-gerrit.osci.io>

Mihails Strasuns has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/704
......................................................................


Patch Set 2:

> Patch Set 2:
> Ok, so IIUC, you are using a special OpenCL runtime that happens to use the GDB JIT interface?

Yes. I think it uses LLVM JIT infrastructure internally which is the one responsible __jit_debug_register_code call.

It should be quite similar with the one I have linked though. Have just noticed that I had another old local patch to enable debug info for opencl:

diff --git a/gdb/testsuite/lib/opencl_hostapp.c b/gdb/testsuite/lib/opencl_hostapp.c
index 9d6ce0eacb..23da3ad1f6 100644
--- a/gdb/testsuite/lib/opencl_hostapp.c
+++ b/gdb/testsuite/lib/opencl_hostapp.c
@@ -86,7 +86,7 @@ main ()
   device_extensions = (char *) malloc (len);
   CHK (clGetDeviceInfo (device, CL_DEVICE_EXTENSIONS, len, device_extensions,
                        NULL));
-  strcpy (kernel_build_opts, "-Werror -cl-opt-disable");
+  strcpy (kernel_build_opts, "-Werror -g -cl-opt-disable");
   if (strstr (device_extensions, "cl_khr_fp64") != NULL)
     strcpy (kernel_build_opts + strlen (kernel_build_opts),
            " -D HAVE_cl_khr_fp64");

With this change you may be able to trigger a pending breakpoint on the kernel function.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id9133540d67fa0c4619ac88324b0349b89e4b2b1
Gerrit-Change-Number: 704
Gerrit-PatchSet: 2
Gerrit-Owner: Mihails Strasuns <mihails.strasuns@intel.com>
Gerrit-Reviewer: Mihails Strasuns <mihails.strasuns@intel.com>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Luis Machado <luis.machado@linaro.org>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Thu, 12 Dec 2019 09:04:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

  parent reply	other threads:[~2019-12-12  9:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 12:54 [review] " Mihails Strasuns (Code Review)
2019-11-25 12:58 ` Mihails Strasuns (Code Review)
2019-11-25 14:40 ` Simon Marchi (Code Review)
2019-11-26 11:02 ` Mihails Strasuns (Code Review)
2019-11-26 11:27 ` [review v2] " Mihails Strasuns (Code Review)
2019-11-26 11:29 ` Mihails Strasuns (Code Review)
2019-11-26 16:58 ` Simon Marchi (Code Review)
2019-11-26 17:07 ` Mihails Strasuns (Code Review)
2019-11-27  1:38 ` Luis Machado (Code Review)
2019-11-27  8:22 ` Mihails Strasuns (Code Review)
2019-11-27 12:44 ` Luis Machado (Code Review)
2019-11-27 12:59 ` Mihails Strasuns (Code Review)
2019-11-27 13:40 ` Luis Machado (Code Review)
2019-11-28  5:10 ` Simon Marchi (Code Review)
2019-12-10 15:22 ` Mihails Strasuns (Code Review)
2019-12-11  5:51 ` Simon Marchi (Code Review)
2019-12-11  9:24 ` Mihails Strasuns (Code Review)
2019-12-11 16:19 ` Simon Marchi (Code Review)
2019-12-12  9:05 ` Mihails Strasuns (Code Review) [this message]
2019-12-15  2:41 ` Simon Marchi (Code Review)
2019-12-18 16:37 ` Mihails Strasuns (Code Review)
2019-12-18 17:32 ` Simon Marchi (Code Review)
2019-12-19 10:28 ` [review v3] " Mihails Strasuns (Code Review)
2019-12-19 10:33 ` Mihails Strasuns (Code Review)
2020-01-13 10:00 ` Mihails Strasuns (Code Review)

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=20191212090458.9403420AF6@gnutoolchain-gerrit.osci.io \
    --to=gerrit@gnutoolchain-gerrit.osci.io \
    --cc=gdb-patches@sourceware.org \
    --cc=gnutoolchain-gerrit@osci.io \
    --cc=luis.machado@linaro.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).