This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Testsuite for varobj updation after symbol removal
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 17 Apr 2015 18:18:14 +0300
- Subject: Re: [PATCH 2/2] Testsuite for varobj updation after symbol removal
- Authentication-results: sourceware.org; auth=none
- References: <1429155160-4816-1-git-send-email-tmirza at codesourcery dot com> <1429155160-4816-3-git-send-email-tmirza at codesourcery dot com>
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
http://vladimirprus.com