This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Cross compilng GDB that can use Python
- From: Doug Evans <dje at google dot com>
- To: Avi Gozlan <avi at checkpoint dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Mon, 6 Jan 2014 16:11:29 -0800
- Subject: Re: Cross compilng GDB that can use Python
- Authentication-results: sourceware.org; auth=none
- References: <71C49BB0B847984EAADFE43F93C6BF08153124CD at IL-EX10 dot ad dot checkpoint dot com>
On Sun, Jan 5, 2014 at 6:56 AM, Avi Gozlan <avi@checkpoint.com> wrote:
> Hi,
>
> I'm cross compiling GDB for a target machine. For this (and supporting Python scripting for pretty printing), I previously have to cross compile ncurses and Python.
>
> When configuring GDB, I run:
>
> Configure ..... --with-python=<my crossed compiled python> ...
>
> This setting looks crucial, otherwise Python stuff is taken from /usr of the compiling machine, which might be inappropriate for the target.
> However, this way, when installed in the target, GDB looks for python modules (e.g. traceback) according to <my crossed compiled python> as in the compiling machine, rather than '/usr/'.
>
> Is there a way to configure GDB compilation so that it takes python dependencies (include files, static library) from the crossed compiled stuff location (that cannot be copied to /usr in the compiling machine), yet look for Python modules in /usr in the target?
>
> Thanks,
>
> Avi
Hi.
This wiki page may help.
https://sourceware.org/gdb/wiki/CrossCompilingWithPythonSupport
And if it doesn't, it would be good to know what's missing (so that we
can improve the page).
Besides having the shell script referred to in the above wiki page
provide the values needed to compile gdb with python, it also needs to
provide python's "exec-prefix" that gdb will later use to tell python
where it is installed at runtime.