Moving to plan9port
utilites I can't get used of src
utility for executables (for scripts it works fine). It refers to db(1)
to get a source file-name from executable in the following way:
% echo 'main?z' | db $1 | <some staff>
where $1
is an executable program name and main?z
a special instruction to db(1)
debugger to print the file-name with function main
.
But in my version of linux (Ubuntu) it doesn't works. db(1) do not produce a file-name, - it just prints the name of procedure: main()
and no sources info.
I've tried to compile with 9c -n
(I think -n
prevents compiler from stripping the code) with no luck.
DWARF-2 is the key: