This is the mail archive of the gdb-patches@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: patch for info threads problem with target arm-elf (PR 1199).


-  /* Avoid coredumps which would happen if we tried to access a NULL
-     deprecated_selected_frame.  */
-  if (!target_has_stack)
-    error ("No stack.");
+  /* Check that there really is a frame.  This happens when a simulator
+     is connected but not loaded or running, for instance.  */
+  if (saved_frame_level < 0)
+    error ("No frame.");

This would only happen to old architectures (legacy_get_prev_frame). With new architectures (get_prev_frame), frame creation is so lazy that an inner most frame is (hopefully?) always created. Can you make this check conditional on legacy_frame_p?


Andrew



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