toyvm.c: use correct path in debuginfo
commitaf6bf5742be7c7abb72d4f516c5ee18e4b0fffd8
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Dec 2014 20:55:18 +0000 (9 20:55 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Dec 2014 20:55:18 +0000 (9 20:55 +0000)
treeda0a5d00b117545c9e3673817305f20991db84bc
parent4c87b50c790029271d24922011793f5e219ecef7
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 *.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218540 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/jit/ChangeLog
gcc/jit/docs/examples/tut04-toyvm/toyvm.c