]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/jit/docs/examples/tut04-toyvm/toyvm.c
toyvm.c: use correct path in debuginfo
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 9 Dec 2014 20:55:18 +0000 (20:55 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 9 Dec 2014 20:55:18 +0000 (20:55 +0000)
commit5cd614ceccbeba752d4d480789175ffb88a818e5
treeda0a5d00b117545c9e3673817305f20991db84bc
parentdd9133238205adddf820bff279575c2348f8c13a
toyvm.c: use correct path in debuginfo

gcc/jit/ChangeLog:
* docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
logic for determine "funcname" to new function...
(get_function_name): ...here, adding logic to skip any leading
path from the filename.
(toyvm_function_parse): Use the filename for fn_filename, rather
than "name", so that the debugger can locate the source .toy
file.
(toyvm_function_parse): Don't fclose a NULL FILE *.

From-SVN: r218540
gcc/jit/ChangeLog
gcc/jit/docs/examples/tut04-toyvm/toyvm.c