- 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
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
From: Andrew Burgess <aburgess@redhat.com>
|
|
Date: Thu, 16 Nov 2023 10:53:34 +0000
|
|
Subject: gdb-remove-use-of-py-isascii
|
|
|
|
;; Backport upstream commit 7db795bc67a.
|
|
|
|
gdb/python: remove use of str.isascii()
|
|
|
|
This commit:
|
|
|
|
commit 8f6c452b5a4e50fbb55ff1d13328b392ad1fd416
|
|
Date: Sun Oct 15 22:48:42 2023 +0100
|
|
|
|
gdb: implement missing debug handler hook for Python
|
|
|
|
introduced a use of str.isascii(), which was only added in Python 3.7.
|
|
|
|
This commit switches to use curses.ascii.isascii(), as this was
|
|
available in 3.6.
|
|
|
|
The same is true for str.isalnum(), which is replaced with
|
|
curses.ascii.isalnum().
|
|
|
|
There should be no user visible changes after this commit.
|
|
|
|
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
|
|
@@ -18,6 +18,7 @@ MissingDebugHandler base class, and register_handler function.
|
|
"""
|
|
|
|
import gdb
|
|
+from curses.ascii import isascii, isalnum
|
|
|
|
|
|
def _validate_name(name):
|
|
@@ -38,7 +39,7 @@ def _validate_name(name):
|
|
name.
|
|
"""
|
|
for ch in name:
|
|
- if not ch.isascii() or not (ch.isalnum() or ch in "_-"):
|
|
+ if not isascii(ch) or not (isalnum(ch) or ch in "_-"):
|
|
raise ValueError("invalid character '%s' in handler name: %s" % (ch, name))
|
|
|
|
|