|
From: Tom H. <to...@co...> - 2005-07-20 14:00:06
|
In message <423...@ds...>
C. Western <mf...@ds...> wrote:
> My knowledge of stabs is very limited, but with a bit of guess work
> and some help from a bugzilla report I was able to get valgrind
> working on my free pascal programs by applying the attached patch to
> rc4.
Thanks for the report.
> --- ./coregrind/vg_stabs.c.orig 2005-03-12 08:22:46.000000000 +0000
> +++ ./coregrind/vg_stabs.c 2005-03-19 19:25:21.813549592 +0000
> @@ -646,6 +646,7 @@
> case -27: type = VG_(st_mkint)(def, 1, True); break;
> case -28: type = VG_(st_mkint)(def, 2, True); break;
> case -29: type = VG_(st_mkint)(def, 4, True); break;
> + case -30: type = VG_(st_mkint)(def, 2, False); break;
> case -31: type = VG_(st_mkint)(def, 8, True); break;
> case -32: type = VG_(st_mkint)(def, 8, False); break;
> case -33: type = VG_(st_mkint)(def, 8, False); break;
I've committed this to the valgrind 3.0 SVN repository.
> --- ./coregrind/vg_stabs.c.orig 2005-03-19 21:33:03.000000000 +0000
> +++ ./coregrind/vg_stabs.c 2005-03-19 21:33:29.000000000 +0000
> @@ -1610,8 +1610,8 @@
> scope.nsyms = 0;
> }
>
> - vg_assert(scope.addr != 0);
> - VG_(addScopeInfo)(si, scope.addr, addr, scope.scope);
> + if (scope.addr != 0)
> + VG_(addScopeInfo)(si, scope.addr, addr, scope.scope);
>
> /* XXX LEAK: free scope if it or any of its inner scopes was
> never added to a scope range */
How did you manage to get a scope at address zero? why do you think
such a scope should be ignored rather than added - maybe your program
really does have code at address zero?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|