gdb/gdb-reformat-missing-debug-py-file.patch
Tom de Vries 8aea3c9b98 - Update to fedora rawhide @ 08bfd0a.
- Patches dropped:
  * fixup-gdb-6.3-gstack-20050411.patch
  * fixup-skip-tests.patch
  * gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
  * gdb-6.6-buildid-locate-rpm.patch
- Patches added:
  * gdb-add-missing-debug-ext-lang-hook.patch
  * gdb-add-missing-debug-info-python-hook.patch
  * gdb-add-rpm-suggestion-script.patch
  * gdb-do-not-import-py-curses-ascii-module.patch
  * gdb-handle-no-python-gdb-module.patch
  * gdb-merge-debug-symbol-lookup.patch
  * gdb-python-avoid-depending-on-the-curses-library.patch
  * gdb-refactor-find-and-add-separate-symbol-file.patch
  * gdb-reformat-missing-debug-py-file.patch
  * gdb-remove-path-in-test-name.patch
  * gdb-remove-use-of-py-isascii
  * gdb-sync-coffread-with-elfread.patch
- Patches updated:
  * fixup-gdb-bz634108-solib_address.patch
  * gdb-6.3-gstack-20050411.patch
  * gdb-6.6-buildid-locate-rpm-suse.patch
  * gdb-6.6-buildid-locate-solib-missing-ids.patch
  * gdb-6.6-buildid-locate.patch
  * gdb-archer-next-over-throw-cxx-exec.patch
  * gdb-bz634108-solib_address.patch
  * gdb-fedora-libncursesw.patch
  * gdb-glibc-strstr-workaround.patch
  * gdb-rhbz1007614-memleak-infpy_read_memory-test.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=409
2025-01-23 14:31:06 +00:00

39 lines
1.1 KiB
Diff

From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Thu, 23 Nov 2023 07:37:19 +0100
Subject: gdb-reformat-missing-debug-py-file.patch
;; Backport upstream commit dd5516bf98f.
[gdb/python] Reformat missing_debug.py using black
Reformat gdb/python/lib/gdb/missing_debug.py with black after commit
e8c3dafa5f5 ("[gdb/python] Don't import curses.ascii module unless necessary").
diff --git a/gdb/python/lib/gdb/missing_debug.py b/gdb/python/lib/gdb/missing_debug.py
--- a/gdb/python/lib/gdb/missing_debug.py
+++ b/gdb/python/lib/gdb/missing_debug.py
@@ -19,18 +19,22 @@ MissingDebugHandler base class, and register_handler function.
import gdb
import sys
+
if sys.version_info >= (3, 7):
# Functions str.isascii() and str.isalnum are available starting Python
# 3.7.
def isascii(ch):
return ch.isascii()
+
def isalnum(ch):
return ch.isalnum()
+
else:
# Fall back to curses.ascii.isascii() and curses.ascii.isalnum() for
# earlier versions.
from curses.ascii import isascii, isalnum
+
def _validate_name(name):
"""Validate a missing debug handler name string.