Re: [PATCH 2/2] Testsuite for varobj updation after symbol removal

Vladimir Prus
2015-04-17T15:18:36Z

On 04/16/2015 06:32 AM, Taimoor Mirza wrote:
> This patch provides testcases for variable object updation after removing
> symbols. Test programs are same as used for testing remove-symbol-file
> command in gdb.base. sym-file-main.c is modified to just add a global
> variable for which varible object is created in testsuite.
>

Taimoor,

thanks for the patch, and testsuite change. Looking at it, it appears that 'count' is
a global variable, and it's modified in one place, in the main function, and after that
you do 'remove-symbol-files' and verify that var-update reports reports 'count' as
changed. But what does it test exactly? Since count is explicitly modified in the
test, I'd imagine that -var-update will report it as changed even without
'remove-symbol-file'. In other words, does this testcase fail if the code patch is not
applied?

Even if so, does it test exactly what is your real case? It's easy to see why 'remove-symbol-files'
can make some global variables no longer present. But how it can change value of some expression?

Thanks,
Volodya

--
Vladimir Prus
CodeSourcery / Mentor Embedded