Skip to contentSkip to conversation

scripts/gdb/symbols: fix invalid escape sequence warning

PATCH Applied Andrew Ballance 1 participant 1 message Mar 4, 2024 GDB kernel debugging helper scripts

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/gdb/symbols: fix invalid escape sequence warning

With python 3.12, '\.' results in this warning
SyntaxWarning: invalid escape sequence '\.'

---
 scripts/gdb/linux/symbols.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/gdb/linux/symbols.py +1 -1
index c8047f4441e6..e8316beb17a7 100644
@@ -82,7 +82,7 @@ lx-symbols command."""
         self.module_files_updated = True
 
     def _get_module_file(self, module_name):
-        module_pattern = ".*/{0}\.ko(?:.debug)?$".format(
+        module_pattern = r".*/{0}\.ko(?:.debug)?$".format(
             module_name.replace("_", r"[_\-]"))
         for name in self.module_files:
             if re.match(module_pattern, name) and os.path.exists(name):
Signature · 1 line
2.44.0