https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118587

            Bug ID: 118587
           Summary: libgccjit should give access to gcc_jit_location file
                    path, line, column information
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: jit
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: basile at starynkevitch dot net
                CC: antoyo at gcc dot gnu.org
  Target Milestone: ---

https://gcc.gnu.org/pipermail/gcc-help/2025-January/143958.html

When using libgccjit there should be a documented public function (in
libgccjit.h) extracting, from a non-null gcc_jit_location pointer:

1. the C string for the file path (probably strdup-ed).
2. the integer line number.
3. the integer column number.


A possible interface could be

/* given a jit location loc -which could be NULL- extract the source path (by
strdup-ing to *path), the line number, the column number. If extraction is
successful, returns true; otherwise return false */
bool gccjit_extract_src_location(gcc_jit_location*loc, char**ppath, int*linep,
int*colp);

--
Basile STARYNKEVITCH           <bas...@starynkevitch.net>
8 rue de la Faïencerie
92340 Bourg-la-Reine,          France

Reply via email to