Remove fall throughs in core_target::xfer_partial.
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 17 Mar 2022 16:37:24 +0000 (09:37 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 17 Mar 2022 16:37:59 +0000 (09:37 -0700)
The cases for TARGET_OBJECT_LIBRARIES and TARGET_OBJECT_LIBRARIES_AIX
can try to fetch different data objects (such as
TARGET_OBJECT_SIGNAL_INFO) if gdbarch methods for the requested data
aren't present.  Return with TARGET_XFER_E_IO if the gdbarch method
isn't present instead.

gdb/corelow.c

index 1579e6bc2b8b5cfa2232b99cc55a0add01976a22..001c4f147fc488af55e3532be431bd977be93f3c 100644 (file)
@@ -943,7 +943,7 @@ core_target::xfer_partial (enum target_object object, const char *annex,
                return TARGET_XFER_OK;
            }
        }
-      /* FALL THROUGH */
+      return TARGET_XFER_E_IO;
 
     case TARGET_OBJECT_LIBRARIES_AIX:
       if (m_core_gdbarch != nullptr
@@ -964,7 +964,7 @@ core_target::xfer_partial (enum target_object object, const char *annex,
                return TARGET_XFER_OK;
            }
        }
-      /* FALL THROUGH */
+      return TARGET_XFER_E_IO;
 
     case TARGET_OBJECT_SIGNAL_INFO:
       if (readbuf)