|
From: Paul F. <pj...@wa...> - 2023-03-12 12:01:02
|
On 06-03-23 12:03, Nicholas Nethercote wrote: > Hi, > > Perl was a reasonable choice for `cg_annotate` when I first wrote it 20+ > years ago. But it's unfortunate now, with Perl being (a) a pretty weird > and horrible language, and (b) moribund. > > I'd like to rewrite it (and `cg_diff`) in Python, which will make > maintenance easier. I see that we already have some Python in Valgrind: > `coregrind/m_gdbserver/valgrind-monitor.py` and > `coregrind/m_gdbserver/valgrind-monitor-def.py`. Therefore I don't think > this should be controversial. > > But I might as well ask, just in case: any objections or advice? Because > these are single file scripts, we avoid all the usual problems of Python > packaging, and just use `cp` as the package manager :) > > On a related note, the `cg_annotate.in > <http://cg_annotate.in>`/`cg_annotate` split is annoying. The only > reason for it now is to auto-embed the version number into the script, > via the configure `@VERSION@` variable, for `cg_annotate --version` > output. Does anyone know of a way to achieve that without requiring > configure? Hi Nick Scripting languages aren't my strong point, but I'd say for me Python is the least worst choice. The only think I can think of to get the version is to use something like pkg-config --modversion valgrind Cheers Paul |