|
From: Josef W. <Jos...@gm...> - 2003-01-27 17:48:32
|
Hi,
I finally had some time to simply port my calltree patch to a
skin for valgrind 1.9.x. You can get it from the KCachegrind site.
Can you have a short look at this?
Is this the correct way for a third-party valgrind skin source package?
Two remarks:
* Valgrind should install header files for compiling skins.
I had to add them to the skin sources :-(
* I install a "calltree" script which is almost a simple copy of the valg=
rind
loader script. Only difference: It defaults to a skin with name `basename=
$0`.
As the script is called "calltree", it defaults to skin "vgskin_calltree.=
so".
Is this change sensible for the valgrind script itself?
Problem: "calltree -h" gives help for the valgrind command, and not the=20
calltree script. Can we define a variable "VALGRIND_SCRIPT" with the scri=
pt=20
name? Thus, valgrind could put out the correct help text.
Valgrind 1.9.x should supply a "cachegrind" script, too.
If a user updates from 1.0.x to 1.9.x he will assume that executing=20
"cachegrind" is still valid (I already got a bug report regarding this!).
For the rewrite of the calltree skin, I want to add address mappings of E=
LF=20
objects to cachegrind.out (To allow usage of "nm" in KCachegrind for=20
assembler source annotations).
Can we add the following function to coregrind/vg_symtab2.c for this?
SegInfo* VG_(get_obj) ( Addr a )
{
SegInfo* si;
ensure_debug_info_inited();
for (si =3D segInfo; si !=3D NULL; si =3D si->next) {
if (si->start <=3D a && a < si->start+si->size)
return si;
}
return 0;
}
The SegInfo structure itself is not known to skins and is only to be used=
with=20
e.g. VG_(seg_start).
Josef
|