Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] [gdb/python] Use PyConfig for python 3.9
@ 2025-10-17 13:36 Tom de Vries
  2025-10-17 14:13 ` Tom Tromey
  0 siblings, 1 reply; 18+ messages in thread
From: Tom de Vries @ 2025-10-17 13:36 UTC (permalink / raw)
  To: gdb-patches

On ppc64le-linux (AlmaLinux 9.6) with python 3.9 and test-case
gdb.python/py-failed-init.exp I run into:
...
builtin_spawn $gdb -nw -nx -q -iex set height 0 -iex set width 0 \
  -data-directory $build/gdb/data-directory -iex set interactive-mode on^M
Python path configuration:^M
  PYTHONHOME = 'foo'^M
  PYTHONPATH = (not set)^M
  program name = '/usr/bin/python'^M
  isolated = 0^M
  environment = 1^M
  user site = 1^M
  import site = 1^M
  sys._base_executable = '/usr/bin/python'^M
  sys.base_prefix = 'foo'^M
  sys.base_exec_prefix = 'foo'^M
  sys.platlibdir = 'lib64'^M
  sys.executable = '/usr/bin/python'^M
  sys.prefix = 'foo'^M
  sys.exec_prefix = 'foo'^M
  sys.path = [^M
    'foo/lib64/python39.zip',^M
    'foo/lib64/python3.9',^M
    'foo/lib64/python3.9/lib-dynload',^M
  ]^M
Fatal Python error: init_fs_encoding: failed to get the Python codec of the \
  filesystem encoding^M
Python runtime state: core initialized^M
ModuleNotFoundError: No module named 'encodings'^M
^M
Current thread 0x00007fffabe18480 (most recent call first):^M
<no Python frame>^M
ERROR: (eof) GDB never initialized.
Couldn't send python print (1) to GDB.
UNRESOLVED: gdb.python/py-failed-init.exp: gdb-command<python print (1)>
Couldn't send quit to GDB.
UNRESOLVED: gdb.python/py-failed-init.exp: quit
...

The test-case expects gdb to present a prompt, but instead gdb calls exit
with this back trace:
...
(gdb) bt
 #0  0x00007ffff6e4bfbc in exit () from /lib64/glibc-hwcaps/power10/libc.so.6
 #1  0x00007ffff7873fc4 in fatal_error.lto_priv () from /lib64/libpython3.9.so.1.0
 #2  0x00007ffff78aae60 in Py_ExitStatusException () from /lib64/libpython3.9.so.1.0
 #3  0x00007ffff78c0e58 in Py_InitializeEx () from /lib64/libpython3.9.so.1.0
 #4  0x0000000010b6cab4 in py_initialize_catch_abort () at gdb/python/python.c:2456
 #5  0x0000000010b6cfac in py_initialize () at gdb/python/python.c:2540
 #6  0x0000000010b6d104 in do_start_initialization () at gdb/python/python.c:2595
 #7  0x0000000010b6eaac in gdbpy_initialize (extlang=0x11b7baf0 <extension_language_python>)
     at gdb/python/python.c:2968
 #8  0x000000001069d508 in ext_lang_initialization () at gdb/extension.c:319
 #9  0x00000000108f9280 in captured_main_1 (context=0x7fffffffe870)
     at gdb/main.c:1100
 #10 0x00000000108fa3cc in captured_main (context=0x7fffffffe870)
     at gdb/main.c:1372
 #11 0x00000000108fa4d8 in gdb_main (args=0x7fffffffe870) at gdb/main.c:1401
 #12 0x000000001001d1d8 in main (argc=3, argv=0x7fffffffece8) at gdb/gdb.c:38
...

This may be a python issue [1].

The problem doesn't happen if we use the PyConfig approach instead of the
py_initialize_catch_abort approach.

Fix this by using the PyConfig approach starting 3.9 (previously, starting
3.10 to avoid Py_SetProgramName deprecation in 3.11).

It's possible that we have the same problem and need the same fix for 3.8, but
I don't have a setup to check that.  Add a todo in a comment.

Tested on ppc64le-linux.

[1] https://github.com/python/cpython/issues/107827
---
 gdb/python/python.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/gdb/python/python.c b/gdb/python/python.c
index 51e7a0aa165..9c30d99982a 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -2432,7 +2432,17 @@ gdbpy_gdb_exiting (int exit_code)
     gdbpy_print_stack ();
 }
 
-#if PY_VERSION_HEX < 0x030a0000
+/* Use PyConfig mechanisms for Python 3.9 and newer.
+
+   We used to do this for 3.10 and newer to avoid Py_SetProgramName
+   deprecation in 3.11.
+
+   With 3.9 and the py_initialize_catch_abort approach, we run into a problem
+   where exit is called instead of abort, making gdb exit (possibly
+   https://github.com/python/cpython/issues/107827).  Using the PyConfig
+   mechanism (available starting 3.8) fixes that.  Todo: see if we have the
+   same problem for 3.8, and if we can apply the same fix.  */
+#if PY_VERSION_HEX < 0x03090000
 /* Signal handler to convert a SIGABRT into an exception.  */
 
 static void
@@ -2484,7 +2494,8 @@ py_initialize ()
        ? AUTO_BOOLEAN_TRUE
        : AUTO_BOOLEAN_FALSE);
 
-#if PY_VERSION_HEX < 0x030a0000
+/* Use PyConfig mechanisms for Python 3.9 and newer.  */
+#if PY_VERSION_HEX < 0x03090000
   /* Python documentation indicates that the memory given
      to Py_SetProgramName cannot be freed.  However, it seems that
      at least Python 3.7.4 Py_SetProgramName takes a copy of the
@@ -2525,9 +2536,8 @@ py_initialize ()
   }
 #endif
 
-  /* Py_SetProgramName was deprecated in Python 3.11.  Use PyConfig
-     mechanisms for Python 3.10 and newer.  */
-#if PY_VERSION_HEX < 0x030a0000
+/* Use PyConfig mechanisms for Python 3.9 and newer.  */
+#if PY_VERSION_HEX < 0x03090000
   /* Note that Py_SetProgramName expects the string it is passed to
      remain alive for the duration of the program's execution, so
      it is not freed after this call.  */

base-commit: 0e4fd060ee7244d00c76f0d4815063dfcc9877f1
-- 
2.51.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-10-17 13:36 [PATCH] [gdb/python] Use PyConfig for python 3.9 Tom de Vries
@ 2025-10-17 14:13 ` Tom Tromey
  2025-10-17 15:11   ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2025-10-17 14:13 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> The problem doesn't happen if we use the PyConfig approach instead of the
Tom> py_initialize_catch_abort approach.

Tom> Fix this by using the PyConfig approach starting 3.9 (previously, starting
Tom> 3.10 to avoid Py_SetProgramName deprecation in 3.11).

Seems fine to me.

Tom> It's possible that we have the same problem and need the same fix for 3.8, but
Tom> I don't have a setup to check that.  Add a todo in a comment.

I wonder if anyone even uses that version.  It has been EOL'd.

Approved-By: Tom Tromey <tom@tromey.com>

Tom

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-10-17 14:13 ` Tom Tromey
@ 2025-10-17 15:11   ` Eli Zaretskii
  2025-10-17 16:33     ` Tom Tromey
  2025-10-17 16:51     ` Arsen Arsenović
  0 siblings, 2 replies; 18+ messages in thread
From: Eli Zaretskii @ 2025-10-17 15:11 UTC (permalink / raw)
  To: Tom Tromey; +Cc: tdevries, gdb-patches

> From: Tom Tromey <tom@tromey.com>
> Cc: gdb-patches@sourceware.org
> Date: Fri, 17 Oct 2025 08:13:14 -0600
> 
> >>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> The problem doesn't happen if we use the PyConfig approach instead of the
> Tom> py_initialize_catch_abort approach.
> 
> Tom> Fix this by using the PyConfig approach starting 3.9 (previously, starting
> Tom> 3.10 to avoid Py_SetProgramName deprecation in 3.11).
> 
> Seems fine to me.
> 
> Tom> It's possible that we have the same problem and need the same fix for 3.8, but
> Tom> I don't have a setup to check that.  Add a todo in a comment.
> 
> I wonder if anyone even uses that version.  It has been EOL'd.

We still support Python 3.4, because that's the only version available
on Windows XP.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-10-17 15:11   ` Eli Zaretskii
@ 2025-10-17 16:33     ` Tom Tromey
  2025-10-17 18:34       ` Eli Zaretskii
  2025-10-17 16:51     ` Arsen Arsenović
  1 sibling, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2025-10-17 16:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Tom Tromey, tdevries, gdb-patches

>> I wonder if anyone even uses that version.  It has been EOL'd.

Eli> We still support Python 3.4, because that's the only version available
Eli> on Windows XP.

Yeah, but does anyone use 3.8.

As for XP, I tend to think the few remaining people on that system
should just use an older gdb.  They could use gdb 17 for example and we
could move on.

Tom

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-10-17 15:11   ` Eli Zaretskii
  2025-10-17 16:33     ` Tom Tromey
@ 2025-10-17 16:51     ` Arsen Arsenović
  2025-10-17 18:35       ` Eli Zaretskii
  1 sibling, 1 reply; 18+ messages in thread
From: Arsen Arsenović @ 2025-10-17 16:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Tom Tromey, tdevries, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Tom Tromey <tom@tromey.com>
>> Cc: gdb-patches@sourceware.org
>> Date: Fri, 17 Oct 2025 08:13:14 -0600
>> 
>> >>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>> 
>> Tom> The problem doesn't happen if we use the PyConfig approach instead of the
>> Tom> py_initialize_catch_abort approach.
>> 
>> Tom> Fix this by using the PyConfig approach starting 3.9 (previously, starting
>> Tom> 3.10 to avoid Py_SetProgramName deprecation in 3.11).
>> 
>> Seems fine to me.
>> 
>> Tom> It's possible that we have the same problem and need the same fix for 3.8, but
>> Tom> I don't have a setup to check that.  Add a todo in a comment.
>> 
>> I wonder if anyone even uses that version.  It has been EOL'd.
>
> We still support Python 3.4, because that's the only version available
> on Windows XP.

Why does that matter?  We shouldn't hold back development of free
software for sake of a long-abandoned proprietary operating system.
-- 
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 418 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-10-17 16:33     ` Tom Tromey
@ 2025-10-17 18:34       ` Eli Zaretskii
  2025-10-31 18:15         ` Tom Tromey
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2025-10-17 18:34 UTC (permalink / raw)
  To: Tom Tromey; +Cc: tdevries, gdb-patches

> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>,  tdevries@suse.de,  gdb-patches@sourceware.org
> Date: Fri, 17 Oct 2025 10:33:03 -0600
> 
> >> I wonder if anyone even uses that version.  It has been EOL'd.
> 
> Eli> We still support Python 3.4, because that's the only version available
> Eli> on Windows XP.
> 
> Yeah, but does anyone use 3.8.

I don't know.

> As for XP, I tend to think the few remaining people on that system
> should just use an older gdb.  They could use gdb 17 for example and we
> could move on.

As long as the maintenance burden is not too heavy, I think we
shouldn't drop support of old versions.  It would be strange (for lack
of a better, but still polite, word) to drop support of XP just
because Python did.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-10-17 16:51     ` Arsen Arsenović
@ 2025-10-17 18:35       ` Eli Zaretskii
  0 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2025-10-17 18:35 UTC (permalink / raw)
  To: Arsen Arsenović; +Cc: tom, tdevries, gdb-patches

> From: Arsen Arsenović <arsen@aarsen.me>
> Cc: Tom Tromey <tom@tromey.com>,  tdevries@suse.de,  gdb-patches@sourceware.org
> Date: Fri, 17 Oct 2025 18:51:02 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Tom Tromey <tom@tromey.com>
> >> Cc: gdb-patches@sourceware.org
> >> Date: Fri, 17 Oct 2025 08:13:14 -0600
> >> 
> >> >>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> >> 
> >> Tom> The problem doesn't happen if we use the PyConfig approach instead of the
> >> Tom> py_initialize_catch_abort approach.
> >> 
> >> Tom> Fix this by using the PyConfig approach starting 3.9 (previously, starting
> >> Tom> 3.10 to avoid Py_SetProgramName deprecation in 3.11).
> >> 
> >> Seems fine to me.
> >> 
> >> Tom> It's possible that we have the same problem and need the same fix for 3.8, but
> >> Tom> I don't have a setup to check that.  Add a todo in a comment.
> >> 
> >> I wonder if anyone even uses that version.  It has been EOL'd.
> >
> > We still support Python 3.4, because that's the only version available
> > on Windows XP.
> 
> Why does that matter?  We shouldn't hold back development of free
> software for sake of a long-abandoned proprietary operating system.

We don't.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-10-17 18:34       ` Eli Zaretskii
@ 2025-10-31 18:15         ` Tom Tromey
  2025-11-01  7:00           ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2025-10-31 18:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Tom Tromey, tdevries, gdb-patches

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Eli> As long as the maintenance burden is not too heavy, I think we
Eli> shouldn't drop support of old versions.  It would be strange (for lack
Eli> of a better, but still polite, word) to drop support of XP just
Eli> because Python did.

It's not just Python though.  Microsoft also dropped support for it 10
years ago.  So we're talking about holding back GNU development for the
sake of an obsolete proprietary system.

I think it would be fine to declare GDB 17 as the last release that
supports XP.  Users who care about this -- and there cannot be many --
can just use that version in perpetuity.

Tom

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-10-31 18:15         ` Tom Tromey
@ 2025-11-01  7:00           ` Eli Zaretskii
  2025-11-03 17:09             ` Simon Marchi
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2025-11-01  7:00 UTC (permalink / raw)
  To: Tom Tromey; +Cc: tdevries, gdb-patches

> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>,  tdevries@suse.de,  gdb-patches@sourceware.org
> Date: Fri, 31 Oct 2025 12:15:51 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Eli> As long as the maintenance burden is not too heavy, I think we
> Eli> shouldn't drop support of old versions.  It would be strange (for lack
> Eli> of a better, but still polite, word) to drop support of XP just
> Eli> because Python did.
> 
> It's not just Python though.  Microsoft also dropped support for it 10
> years ago.  So we're talking about holding back GNU development for the
> sake of an obsolete proprietary system.
> 
> I think it would be fine to declare GDB 17 as the last release that
> supports XP.  Users who care about this -- and there cannot be many --
> can just use that version in perpetuity.

We can discuss the broader issue of whether we want to drop support
for XP, yes.  When we do, please explain how supporting it holds back
GNU development, as the basis for the discussion, and let's take it
from there.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-01  7:00           ` Eli Zaretskii
@ 2025-11-03 17:09             ` Simon Marchi
  2025-11-03 18:21               ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Simon Marchi @ 2025-11-03 17:09 UTC (permalink / raw)
  To: Eli Zaretskii, Tom Tromey; +Cc: tdevries, gdb-patches

On 11/1/25 3:00 AM, Eli Zaretskii wrote:
>> From: Tom Tromey <tom@tromey.com>
>> Cc: Tom Tromey <tom@tromey.com>,  tdevries@suse.de,  gdb-patches@sourceware.org
>> Date: Fri, 31 Oct 2025 12:15:51 -0600
>>
>>>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>>
>> Eli> As long as the maintenance burden is not too heavy, I think we
>> Eli> shouldn't drop support of old versions.  It would be strange (for lack
>> Eli> of a better, but still polite, word) to drop support of XP just
>> Eli> because Python did.
>>
>> It's not just Python though.  Microsoft also dropped support for it 10
>> years ago.  So we're talking about holding back GNU development for the
>> sake of an obsolete proprietary system.
>>
>> I think it would be fine to declare GDB 17 as the last release that
>> supports XP.  Users who care about this -- and there cannot be many --
>> can just use that version in perpetuity.
> 
> We can discuss the broader issue of whether we want to drop support
> for XP, yes.  When we do, please explain how supporting it holds back
> GNU development, as the basis for the discussion, and let's take it
> from there.

One possibility is to declare that it's no longer possible to compile
GDB with Python support, on Windows XP, because we want to make use of
Python features newer that the latest Python that works on XP.

Simon

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-03 17:09             ` Simon Marchi
@ 2025-11-03 18:21               ` Eli Zaretskii
  2025-11-12 16:52                 ` Richard Earnshaw (foss)
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2025-11-03 18:21 UTC (permalink / raw)
  To: Simon Marchi; +Cc: tom, tdevries, gdb-patches

> Date: Mon, 3 Nov 2025 12:09:05 -0500
> Cc: tdevries@suse.de, gdb-patches@sourceware.org
> From: Simon Marchi <simark@simark.ca>
> 
> > We can discuss the broader issue of whether we want to drop support
> > for XP, yes.  When we do, please explain how supporting it holds back
> > GNU development, as the basis for the discussion, and let's take it
> > from there.
> 
> One possibility is to declare that it's no longer possible to compile
> GDB with Python support, on Windows XP, because we want to make use of
> Python features newer that the latest Python that works on XP.

IMO, that's not a good idea, because Python support is nowadays
considered a de-facto integral part of GDB.  For example, the .gdbinit
file shipped with GNU Emacs uses Python without even testing that it's
available.

Btw, the problem is not the system where GDB is compiled, the problem
is the system on which it runs.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-03 18:21               ` Eli Zaretskii
@ 2025-11-12 16:52                 ` Richard Earnshaw (foss)
  2025-11-12 17:23                   ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Richard Earnshaw (foss) @ 2025-11-12 16:52 UTC (permalink / raw)
  To: Eli Zaretskii, Simon Marchi; +Cc: tom, tdevries, gdb-patches

On 03/11/2025 18:21, Eli Zaretskii wrote:
>> Date: Mon, 3 Nov 2025 12:09:05 -0500
>> Cc: tdevries@suse.de, gdb-patches@sourceware.org
>> From: Simon Marchi <simark@simark.ca>
>>
>>> We can discuss the broader issue of whether we want to drop support
>>> for XP, yes.  When we do, please explain how supporting it holds back
>>> GNU development, as the basis for the discussion, and let's take it
>>> from there.
>>
>> One possibility is to declare that it's no longer possible to compile
>> GDB with Python support, on Windows XP, because we want to make use of
>> Python features newer that the latest Python that works on XP.
> 
> IMO, that's not a good idea, because Python support is nowadays
> considered a de-facto integral part of GDB.  For example, the .gdbinit
> file shipped with GNU Emacs uses Python without even testing that it's
> available.
> 
> Btw, the problem is not the system where GDB is compiled, the problem
> is the system on which it runs.

So how long are we expected to support such an antiquated system?  It's already 11 years beyond it's final maintenance update and continuing to pretend we can support it is clearly holding up development of gdb.

If the runtime can't support critical improvements of gdb, then surely it's time to reconsider our priorities.  We're not stopping people from running older versions of gdb after all.

R.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-12 16:52                 ` Richard Earnshaw (foss)
@ 2025-11-12 17:23                   ` Eli Zaretskii
  2025-11-12 17:53                     ` Richard Earnshaw (foss)
  2025-11-12 18:03                     ` Arsen Arsenović
  0 siblings, 2 replies; 18+ messages in thread
From: Eli Zaretskii @ 2025-11-12 17:23 UTC (permalink / raw)
  To: Richard Earnshaw (foss); +Cc: simark, tom, tdevries, gdb-patches

> Date: Wed, 12 Nov 2025 16:52:13 +0000
> Cc: tom@tromey.com, tdevries@suse.de, gdb-patches@sourceware.org
> From: "Richard Earnshaw (foss)" <Richard.Earnshaw@arm.com>
> 
> > Btw, the problem is not the system where GDB is compiled, the problem
> > is the system on which it runs.
> 
> So how long are we expected to support such an antiquated system?

I think that depends on what is required to "support" them.  That's
what we should talk about, and in practical terms.  E.g., if all
that's required is not to delete compatibility code (and I'm not
saying that's all, I'm just giving an example), it is my opinion that
the effort is negligible.

> It's already 11 years beyond it's final maintenance update and continuing to pretend we can support it is clearly holding up development of gdb.

But does it hold development?  If it does, let's identify where it
does and talk about that, and maybe we will then decide that the
effort is too much.

> If the runtime can't support critical improvements of gdb, then surely it's time to reconsider our priorities.

Yes, "if".  The issue, once again, is whether this "if" indeed
materializes.  That's what I suggest to discuss.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-12 17:23                   ` Eli Zaretskii
@ 2025-11-12 17:53                     ` Richard Earnshaw (foss)
  2025-11-12 18:03                     ` Arsen Arsenović
  1 sibling, 0 replies; 18+ messages in thread
From: Richard Earnshaw (foss) @ 2025-11-12 17:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: simark, tom, tdevries, gdb-patches

On 12/11/2025 17:23, Eli Zaretskii wrote:
>> Date: Wed, 12 Nov 2025 16:52:13 +0000
>> Cc: tom@tromey.com, tdevries@suse.de, gdb-patches@sourceware.org
>> From: "Richard Earnshaw (foss)" <Richard.Earnshaw@arm.com>
>>
>>> Btw, the problem is not the system where GDB is compiled, the problem
>>> is the system on which it runs.
>>
>> So how long are we expected to support such an antiquated system?
> 
> I think that depends on what is required to "support" them.  That's
> what we should talk about, and in practical terms.  E.g., if all
> that's required is not to delete compatibility code (and I'm not
> saying that's all, I'm just giving an example), it is my opinion that
> the effort is negligible.
> 
>> It's already 11 years beyond it's final maintenance update and continuing to pretend we can support it is clearly holding up development of gdb.
> 
> But does it hold development?  If it does, let's identify where it
> does and talk about that, and maybe we will then decide that the
> effort is too much.
> 

Well if it hinders developments like:
- switching to the python limited API
- removing the need to test against multiple python run-times
- removing the need for users to install a specific version of python rather than reuse the version they already have installed

then yes it does.

>> If the runtime can't support critical improvements of gdb, then surely it's time to reconsider our priorities.
> 
> Yes, "if".  The issue, once again, is whether this "if" indeed
> materializes.  That's what I suggest to discuss.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-12 17:23                   ` Eli Zaretskii
  2025-11-12 17:53                     ` Richard Earnshaw (foss)
@ 2025-11-12 18:03                     ` Arsen Arsenović
  2025-11-12 18:20                       ` Eli Zaretskii
  1 sibling, 1 reply; 18+ messages in thread
From: Arsen Arsenović @ 2025-11-12 18:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Richard Earnshaw (foss), simark, tom, tdevries, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Wed, 12 Nov 2025 16:52:13 +0000
>> Cc: tom@tromey.com, tdevries@suse.de, gdb-patches@sourceware.org
>> From: "Richard Earnshaw (foss)" <Richard.Earnshaw@arm.com>
>> 
>> > Btw, the problem is not the system where GDB is compiled, the problem
>> > is the system on which it runs.
>> 
>> So how long are we expected to support such an antiquated system?
>
> I think that depends on what is required to "support" them.  That's
> what we should talk about, and in practical terms.  E.g., if all
> that's required is not to delete compatibility code (and I'm not
> saying that's all, I'm just giving an example), it is my opinion that
> the effort is negligible.

I think that, for Windows XP, the repetition of this conversation any
time someone wants to use something that doesn't work on XP is reason
enough to remove it.

It's a proprietary OS even its vendor abandoned 11 years ago.  The
milliwatts spent composing this email are enough to justify ignoring it
further.  The remaining users are likely computers not used
interactively, and near-certainly not ones used for development, ergo a
debugger is redundant.

Frankly, a Windows XP machine that has enough networking hardware to
download the next release of GDB is likely a massive liability in the
first place.  Hopefully none are still connected to the internet.
-- 
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 418 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-12 18:03                     ` Arsen Arsenović
@ 2025-11-12 18:20                       ` Eli Zaretskii
  2025-11-12 19:24                         ` Arsen Arsenović
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2025-11-12 18:20 UTC (permalink / raw)
  To: Arsen Arsenović; +Cc: Richard.Earnshaw, simark, tom, tdevries, gdb-patches

> From: Arsen Arsenović <arsen@aarsen.me>
> Cc: "Richard Earnshaw (foss)" <Richard.Earnshaw@arm.com>,  simark@simark.ca,
>   tom@tromey.com,  tdevries@suse.de,  gdb-patches@sourceware.org
> Date: Wed, 12 Nov 2025 19:03:01 +0100
> 
> I think that, for Windows XP, the repetition of this conversation any
> time someone wants to use something that doesn't work on XP is reason
> enough to remove it.
> 
> It's a proprietary OS even its vendor abandoned 11 years ago.  The
> milliwatts spent composing this email are enough to justify ignoring it
> further.

If we are going that low in our discussion level, then I submit that
you could have easily avoided the waste of those milliwatts by not
writing that email.

Seriously, do you really believe this level of discussion, with the
implied quite apparent hostility, is something that should have place
here?  It's unbecoming.

> Frankly, a Windows XP machine that has enough networking hardware to
> download the next release of GDB is likely a massive liability in the
> first place.  Hopefully none are still connected to the internet.

There are still a lot of systems running XP in the world.  So not
dropping support of XP has some advantages for our users, not just
disadvantages.  The GNU Project, being a Free Software project, has
the advantage of not following the lead of the likes of Microsoft in
our decisions whether or not we want to help people who use those
systems.  I thought it was evident, perhaps even perceived as a
virtue, but maybe not.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-12 18:20                       ` Eli Zaretskii
@ 2025-11-12 19:24                         ` Arsen Arsenović
  2025-11-13  5:45                           ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Arsen Arsenović @ 2025-11-12 19:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Richard.Earnshaw, simark, tom, tdevries, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 2231 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

> If we are going that low in our discussion level, then I submit that
> you could have easily avoided the waste of those milliwatts by not
> writing that email.

Yes, that is true.

>> Frankly, a Windows XP machine that has enough networking hardware to
>> download the next release of GDB is likely a massive liability in the
>> first place.  Hopefully none are still connected to the internet.
>
> There are still a lot of systems running XP in the world.  So not
> dropping support of XP has some advantages for our users, not just
> disadvantages.

Yes, I'm aware.  I mentioned this in the previous post.

I highly doubt that a non-margin-of-error number of GDB users are on XP.

As I said, I suspect nearly all active XP machines aren't used
interactively (think XP Embedded, "smart" signs, ATM machines, ...).
Those that are, IME (in underfunded public education, for instance) tend
to not be connected to networks.  Of those, only a fraction is used for
development, and usually provides era-appropriate tools (which tend not
to be GNU).

Obviously, this is an anecdote, but it serves as an example.

Unfortunately, as we don't collect telemetry (note: not saying that this
is a bad thing), we can't provide a statistical judgement here, and so
anecdotes are the best we have.

Are you aware of any users of Windows XP?  Do you know why they still
use it?  Do you know if they do software updates, and whether their
machines are networked (and, if so, please advise them to airgap or
update them)?

Also, other development tools already don't work on XP, Python being a
good example from this very thread.

> The GNU Project, being a Free Software project, has the advantage of
> not following the lead of the likes of Microsoft in our decisions
> whether or not we want to help people who use those systems.  I
> thought it was evident, perhaps even perceived as a virtue, but maybe
> not.

This does not contradict my thesis, which is that there are no (or
exceedingly few) users being helped, only developers impeded.

I'd not be surprised if more patches have been impeded on this basis
than users helped.
-- 
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 418 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] [gdb/python] Use PyConfig for python 3.9
  2025-11-12 19:24                         ` Arsen Arsenović
@ 2025-11-13  5:45                           ` Eli Zaretskii
  0 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2025-11-13  5:45 UTC (permalink / raw)
  To: Arsen Arsenović; +Cc: Richard.Earnshaw, simark, tom, tdevries, gdb-patches

> From: Arsen Arsenović <arsen@aarsen.me>
> Cc: Richard.Earnshaw@arm.com,  simark@simark.ca,  tom@tromey.com,
>   tdevries@suse.de,  gdb-patches@sourceware.org
> Date: Wed, 12 Nov 2025 20:24:11 +0100
> 
> Are you aware of any users of Windows XP?

I was such a user until a year and a half ago, when the metal has died
of old age (it worked for 12 years, day in and day out) and I needed
to move on.  I still have that same XP system in a VM on my new
machine, although it now serves mainly for testing.

> Do you know why they still use it?

Until a year and a half ago, I was using it because the system was
rock-solid and stable, and since regular updates ceased a long time
ago, I could have the system up and running (and Emacs running on it)
for months on end without rebooting.

> Do you know if they do software updates, and whether their
> machines are networked (and, if so, please advise them to airgap or
> update them)?

Of course, it was connected to the Internet!  How do you think I could
do all the reviews of GDB documentation patches if it didn't?

> Also, other development tools already don't work on XP, Python being a
> good example from this very thread.

Python 3.4.4 still works.  As does mingw.org's MinGW, which has GCC
and Binutils.  To say nothing about Emacs.  Last significant GNU
packages I built natively on Windows XP (with 32-bit MinGW) before the
XP machine died were Binutils v2.41, GDB 14.1 (with Python and Guile),
Texinfo 7.1, Gawk 5.3.0, Make 4.4.1 and Emacs 28.2.  (They are all
available from my ezwinports site, btw.)

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-11-13  5:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-17 13:36 [PATCH] [gdb/python] Use PyConfig for python 3.9 Tom de Vries
2025-10-17 14:13 ` Tom Tromey
2025-10-17 15:11   ` Eli Zaretskii
2025-10-17 16:33     ` Tom Tromey
2025-10-17 18:34       ` Eli Zaretskii
2025-10-31 18:15         ` Tom Tromey
2025-11-01  7:00           ` Eli Zaretskii
2025-11-03 17:09             ` Simon Marchi
2025-11-03 18:21               ` Eli Zaretskii
2025-11-12 16:52                 ` Richard Earnshaw (foss)
2025-11-12 17:23                   ` Eli Zaretskii
2025-11-12 17:53                     ` Richard Earnshaw (foss)
2025-11-12 18:03                     ` Arsen Arsenović
2025-11-12 18:20                       ` Eli Zaretskii
2025-11-12 19:24                         ` Arsen Arsenović
2025-11-13  5:45                           ` Eli Zaretskii
2025-10-17 16:51     ` Arsen Arsenović
2025-10-17 18:35       ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox