The DAP 'module' event may include a 'path' component.  I noticed that
this is supplied even when the module in question does not come from a
file.
This patch only emits this field when the objfile corresponds to a
real file.
No test case, because I wasn't sure how to write a portable one.
However, it's clear from gdb.log on Linux:
{"type": "event", "event": "module", "body": {"reason": "new", "module": {"id": "system-supplied DSO at 0x7ffff7fc4000", "name": "system-supplied DSO at 0x7ffff7fc4000"}}, "seq": 21}
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30676
     """Return a Module representing the objfile OBJF.
 
     The objfile must pass the 'is_module' test."""
-    return {
+    result = {
         "id": module_id(objf),
         "name": objf.username,
-        "path": objf.filename,
     }
+    if objf.is_file:
+        result["path"] = objf.filename
+    return result
 
 
 @in_gdb_thread