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]

[review v2] jit: remove bp locations when unregistering jit code


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


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