|
From: Dennis L. <pla...@tz...> - 2004-12-23 15:05:36
|
Am Donnerstag, den 23.12.2004, 06:11 +0000 schrieb Nicholas Nethercote: > On Wed, 22 Dec 2004, Enno Bartels wrote: > > > I do not know if this is possible but it would be very good for faster > > determination of the error place, like it is done > > if the gnu compiler compiles a source file and says at an error > > something like that: "... parameter x of function is wrong" > > Gcc can produce better error messages because it works with source code, > whereas Valgrind only works with the program's exectuable code + debuggin > information. For this reason both the things you ask for are at least > difficult to provide, and may be impossible (I'm not sure, perhaps the > information could be extracted from the debugging information with some > effort.) > > So, in short, I think it's unlikely that these features will be able to be > implemented. I'd be happy to be proven wrong, though. Afaik gcc 4 uses some more debugging information which also makes local variable names available. gdb can with all the info embedded when using -g (does dwarf2 output on linux) reconstruct the function parameters, their names and values even without the source, if debug info is included. So I think it would be at least possible to include it within valgrind. But I personally wonder if its worth the work if you can simply attach the debugger in such a case, since most cases were valgrind supports something and you even have the source and attach gdb you easily see what went wrong. Of course thats only my experience from working now since valgrind 1.0 but I also think that including the parsing stuff that gdb does is quite a big piece of work... greets Dennis -- Dennis Lubert <pla...@tz...> |