[PATCH 2/2] gdb/testsuite: Accept PIE/noPIE programs in gdb.mi/mi-var-invalidate-shlib.exp

Six, Lancelot Lancelot.Six@amd.com
Wed Aug 3 09:35:16 GMT 2022


[AMD Official Use Only - General]

> Hi,
> 
> thanks for the analysis.
> 
> After looking into this a bit, I wonder if the root cause is really
> looking at the values in the old process.
> 
> Maybe we should either:
> - not try to sample the values when recreating, or
> - move the recreation to a later point when we have access to the memory
>    of the new process.
> 
> At least we would have consistency between PIE and no-PIE with either
> solution.
> 
> Thanks,
> - Tom 

Hi,

I do agree that it is strange to look for a value for the new objfile in the old process.  I wonder if there are legitimate usecases where one would want to still use "file ..." to load new symbols but keep the same process running while keeping a global varobj around.  If we delay the recreation of the varobj, we would break such usecase.

One way could be to be just invalidate the varobj when the objfile it relies on goes away and give the user a "-var-reinflate" command (or "-var-update -reinflate") so he can try to revive an invalidated varobj at his convenience.  This would break existing behavior but could avoid.

Lancelot.


More information about the Gdb-patches mailing list