+2009-08-27 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * varobj.c (varobj_create): Error if the specified frame was not found
+ and it is needed.
+
2009-08-26 Michael Snyder <msnyder@vmware.com>
* i386-tdep.c (i386_process_record): Break out of prefix loop
+2009-08-27 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.mi/mi2-var-cmd.exp (create variable with invalid FRAME-ADDR): New.
+
2009-08-26 Michael Snyder <msnyder@vmware.com>
* gdb.base/i386-reverse.c: New file.
"&\"Attempt to use a type name as an expression.\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create int"
+# The number 0 must be an invalid frame address and linteger a local variable.
+mi_gdb_test "-var-create invalidframe 0 linteger" \
+ "\\^error,msg=\"Failed to find the specified frame\"" \
+ "create variable with invalid FRAME-ADDR"
+
##### #####
# #
we must select the appropriate frame before parsing
the expression, otherwise the value will not be current.
Since select_frame is so benign, just call it for all cases. */
- if (innermost_block && fi != NULL)
+ if (innermost_block)
{
+ /* User could specify explicit FRAME-ADDR which was not found but
+ EXPRESSION is frame specific and we would not be able to evaluate
+ it correctly next time. With VALID_BLOCK set we must also set
+ FRAME and THREAD_ID. */
+ if (fi == NULL)
+ error (_("Failed to find the specified frame"));
+
var->root->frame = get_frame_id (fi);
var->root->thread_id = pid_to_thread_id (inferior_ptid);
old_fi = get_selected_frame (NULL);