This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]