16 Commits

Author SHA1 Message Date
Chris Johns
a970057f46 gdb: Add options to control the python version
The options are:
  --with-python2
  --with-python3
  --with-python-version

Closes #4973
2023-11-30 09:14:37 +11:00
Chris Johns
78913bcbba gdb-common: Fix the python-config library parsing
Closes #4894
2023-04-11 05:59:40 +00:00
Chris Johns
9919f1217c gdb: Use a virtual environment if present
- Detect and use a virtual environment if present

- Supports MacOS with python.org in a venv

Updates #4892
2023-04-05 10:09:21 +10:00
Sebastian Huber
949cf500b4 gdb: Use https for downloads 2022-11-10 15:11:42 +01:00
Chris Johns
70f302e08c gdb: Split python's version into major/minor and check for embed option
Closes #4631
2022-04-26 10:13:41 +10:00
Sebastian Huber
571a182d4a GDB: Prefer Python 3 over 2
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 (),
                    ^~~~~~~~~~~~~~~~~~~~~~~
2022-03-21 09:01:01 +01:00
Anders Montonen
d5ad66747c source-builder/config/gdb-common-1.cfg: Fix building with Python 3.8
Starting with Python 3.8, python3-config requires the "--embed" flag to
print the flags required for embedding Python in an application.

Fixes:
error: shell macro failed: /home/anders/work/rtems/rsb/source-builder/sb/rtems-build-dep -c gcc  -l : 2: error: no library (-l) provided

Signed-off-by: Anders Montonen <Anders.Montonen@iki.fi>
2020-04-28 08:49:56 +10:00
Chris Johns
599c4d7c87 freebsd: Fix GDB building on some 12 and higher versions 2020-01-21 14:46:16 +11:00
Chris Johns
8de6b678e8 sb/gdb: Add further getting source checks. 2019-10-27 10:35:30 +11:00
Chris Johns
3e22fc45d2 sb/get-source: Add a macro to indicate the get-source command is running.
- Fix GDB's library checks to ignore errors when getting the source.
2019-10-27 08:20:38 +11:00
Gedare Bloom
4f903fb57c Adjust gdb-python checks 2019-07-29 15:12:50 -06:00
Chris Johns
8922c8bbb0 sb/config: Fix GDB probes when using python-config.
- Fix the config file handling of shell calls where the shell
  command has nesting braces.
- Fix the bool check to support a '!' next to the check value.
2019-07-21 21:09:34 +10:00
Chris Johns
257c9267cf gdb/python: Use python-config for the configuration if found.
- Do not assume the installed paths for the header and library.
  Ask python-config if found.

Close #3537.
2018-12-25 10:15:55 +11:00
Chris Johns
96c414c8ff windows: Remove BuildRoot from all configs, add a short tmp path.
Closes #3562.
2018-11-05 15:46:42 +11:00
Chris Johns
13f4c37999 sb: Add support to search for a suitable version of python.
The command python has been removed from upstream python and python2
and python3 is now used. This patch wraps the commands in a shell
script that locates a suitable python to run.

Updates #3537
2018-10-21 09:49:02 +11:00
Chris Johns
c5715172d9 gdb: Add a gdb-common configuration and have gdb-7-1 include it.
Updates #3460
2018-06-20 09:28:10 +10:00