* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / remote-udi.c
index e04225aa49a1b39eec29bb0b95cbfe4ea90715dd..27023265fb61dabd0bca45294ac3ce719f7dbc92 100644 (file)
@@ -180,8 +180,14 @@ udi_create_inferior (execfile, args, env)
 static void
 udi_mourn()
 {
-        pop_target ();                /* Pop back to no-child state */
-        generic_mourn_inferior ();
+#if 0
+  /* Requiring "target udi" each time you run is a major pain.  I suspect
+     this was just blindy copied from remote.c, in which "target" and
+     "run" are combined.  Having a udi target without an inferior seems
+     to work between "target udi" and "run", so why not now?  */
+  pop_target ();                /* Pop back to no-child state */
+#endif
+  generic_mourn_inferior ();
 }
 
 /******************************************************************** UDI_OPEN
@@ -1058,6 +1064,11 @@ download(load_arg_string, from_tty)
          section_size = bfd_section_size (pbfd, section);
          section_end = To.Offset + section_size;
 
+         if (section_size == 0)
+           /* This is needed at least in the BSS case, where the code
+              below starts writing before it even checks the size.  */
+           continue;
+
          printf("[Loading section %s at %x (%d bytes)]\n",
                 section_name,
                 To.Offset,
@@ -1119,6 +1130,8 @@ download(load_arg_string, from_tty)
              unsigned long zero = 0;
 
              /* Write a zero byte at the vma */
+             /* FIXME: Broken for sections of 1-3 bytes (we test for
+                zero above).  */
              err = UDIWrite ((UDIHostMemPtr)&zero,     /* From */
                              To,                       /* To */
                              (UDICount)1,              /* Count */
This page took 0.022862 seconds and 4 git commands to generate.