[PATCH] GDB: Prefer Python 3 over 2

Sebastian Huber sebastian.huber at embedded-brains.de
Sat Mar 19 09:33:22 UTC 2022



On 18/03/2022 22:56, Chris Johns wrote:
> 
>> On 19 Mar 2022, at 2:40 am, Sebastian Huber <sebastian.huber at embedded-brains.de> wrote:
>>
>> On 17/03/2022 12:51, Sebastian Huber wrote:
>>> This fixes the build of a recent GDB version:
>>> gdb/python/py-micmd.c: In function 'int micmdpy_uninstall_command(micmdpy_object*)':
>>> gdb/python/py-micmd.c:430:20: error: 'PyDict_GetItemWithError' was not declared in this scope
>>>     PyObject *curr = PyDict_GetItemWithError (mi_cmd_dict.get (),
>>>                      ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Has a bug report been raised with gdb?

The Python 2 EOL was January 1, 2020. This code was added by:

commit 740b42ceb7c7ae7b5343183782973576a93bc7b3
Author: Andrew Burgess <aburgess at redhat.com>
Date:   Tue Jun 23 14:45:38 2020 +0100

     gdb/python/mi: create MI commands using python

It is not a bug from my point of view.

> 
>> I was able to build the latest GDB with this patch. Otherwise all architectures failed with the above error.
> 
> Has gdb dropped Python 2 support?

It seems so.

> 
> What happens on a host without python3 installed? Does the error appear? Does this in effect force RTEMS to drop the Python2 requirement for rtems6?

I guess if we want to use the next GDB release, then Python 3 is required.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list