From patchwork Thu Dec 12 09:04:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36774 Received: (qmail 39878 invoked by alias); 12 Dec 2019 09:05:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 39865 invoked by uid 89); 12 Dec 2019 09:05:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Dec 2019 09:05:03 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 667A0203C1; Thu, 12 Dec 2019 04:05:01 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id BF3F02012A; Thu, 12 Dec 2019 04:04:58 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 9403420AF6; Thu, 12 Dec 2019 04:04:58 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Thu, 12 Dec 2019 04:04:58 -0500 From: "Mihails Strasuns (Code Review)" To: gdb-patches@sourceware.org Cc: Pedro Alves , Tom Tromey , Luis Machado , Simon Marchi Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v2] jit: remove bp locations when unregistering jit code X-Gerrit-Change-Id: Id9133540d67fa0c4619ac88324b0349b89e4b2b1 X-Gerrit-Change-Number: 704 X-Gerrit-ChangeURL: X-Gerrit-Commit: 232c479ef55b074173b1547b2072916bba6904c2 In-Reply-To: References: X-Gerrit-Comment-Date: Thu, 12 Dec 2019 04:04:58 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191212090458.9403420AF6@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: With this change you may be able to trigger a pending breakpoint on the kernel function. 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");