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

Simon Marchi (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Sun Dec 15 02:41:00 GMT 2019


Simon Marchi has posted comments on this change.

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


Patch Set 2:

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

Hmm sorry, what did you link to?

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

No chance, I still see the breakpoint not getting resolved.  I suppose that this is very dependent on the opencl implemention one is using?


-- 
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: Sun, 15 Dec 2019 02:41:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list