This is the mail archive of the gdb@sources.redhat.com 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: -var-create on invalid expression causes seg. fault


 > Could you give the attached patch a try?  I encountered a similar
 > problem in mi-var-block.exp when using ARM RVDS, which emits location
 > lists even at -O0.  It frequently reports variables as "unavailable",
 > which is an error condition.
 > 
 > The patch sets the variable to an error in the -var-update
 > "unavailable" case; this never passes any error message on to the user,
 > but that seems to be the prior art for varobj.
 > 
 > You'll need to use catch_exceptions for your older sources; the patch
 > is for HEAD.
 > 
 > [I haven't finished testing any of these patches, that's why I haven't
 > submitted this to gdb-patches yet.]

This is what I get now:

-var-create - * *1 
^done,name="var1",numchild="0",type="int"
(gdb) 
-var-update *
~"varobj.c:1467: internal-error: my_value_equal: Assertion `!value_lazy (val1)' failed.\n"
~"A problem internal to GDB has been detected,\n"
~"further debugging may prove unreliable.\n"
~"Quit this debugging session? (y or n) "

but I would expect "-var-create - * *1" to return:

^error,msg="Cannot access memory at address 0x1"

I might be missing the point, since although I don't understand what you have
done, Ross Morley clearly does.


Nick


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