On 08/16/2010 09:06 PM, Richard W.M. Jones wrote:
On Mon, Aug 16, 2010 at 07:21:12PM +0800, Jin Xin Zheng wrote:
> In fact when I saw this the first thing came up to my head was that our
> modified source for doing gcov -- we could collect the .gcda files in
> the build directory after libguestfs was invoked. But the guestfsd which
> runs inside the appliance produces the .gcda files in the temp ramfs.
>
I guess it writes it into / (ie. guestfsd's current directory which is
pretty much always root)?
Yes you are right. gcov does not care about the $pwd, it just outputs
.gcda files under the directory where I built the source, e.g.
/home/build/rpmbuild/BUILD/libguestfs-1.2.7/daemon
In order to download these files correctly, we have to use the debug
command to access the root filesystem, although building the source in a
directory under /sysroot may make things easier.
> We have made a pretty lot of effort in order to tar-out these
files
> before the subprocess was killed.
>
We have/had the same problem capturing core files too ...
Rich.
--
Regards.
Jinxin