* ldmain.c (main): Error if --gc-sections and
[deliverable/binutils-gdb.git] / gdb / ocd.c
index 268d7bbf9b4366f33173e782d11f08673cae6333..a6b385a5e21a09fcded05372a57c73ea5eb5b673 100644 (file)
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -332,7 +332,10 @@ device the OCD device is attached to (e.g. /dev/ttya).");
   if (!catch_errors (ocd_start_remote, (char *)target_type,
                     "Couldn't establish connection to remote target\n",
                     RETURN_MASK_ALL))
-    pop_target();
+    {
+      pop_target();
+      error ("Failed to connect to OCD.");
+    }
 }
 
 /* This takes a program previously attached to and detaches it.  After
This page took 0.023722 seconds and 4 git commands to generate.