From: Doug Evans <dje@google.com>
To: vanboxem.ruben@gmail.com
Cc: gdb@sourceware.org, python-list@python.org
Subject: Re: Python enabled gdb on Windows and relocation
Date: Sat, 14 May 2011 06:39:00 -0000 [thread overview]
Message-ID: <BANLkTi=2xwRJmHfDBULRHidJUecMi0ix+w@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimshMHOAnc2xtO=Vjvxg_oEZ0EUJA@mail.gmail.com>
On Thu, May 12, 2011 at 9:19 AM, Ruben Van Boxem
<vanboxem.ruben@gmail.com> wrote:
> (now in plain-text as required by gdb mailing list)
>
> Hi,
>
> I am currently trying to integrate Python support into my toolchain
> build (including GDB of course). It is a sysrooted
> binutils+GCC+GDB+mingw-w64 toolchain.
>
> I currently have the basic setup working: I can link gdb with my
> manually generated import lib to the python dll from the official
> Windows install. If there is anything I am missing or a very easy
> solution to the problems decsribed below, please just say so. I am
> only suggesting what I would like to happen.
>
> Now on to the problems I'd like to discuss:
>
> 1. gdb.exe won't start without me having set PYTHONPATH manually.
In a properly configured/built gdb on linux this isn't necessary, even
if python is installed in some random place.
I'm not sure about windows though.
Did you specify --with-python when you configured gdb, and if so did
you specify a value?
e.g., --with-python=SOME_VALUE
> I understand the need for this, but as gdb requires Python 2, and users
> of my toolchain may have installed Python 3 or a 32-bit version python
> they want to use from the same environment (without changing their own
> PYTHONPATH), there is no way to run python-enabled gdb.
> [...]
Yeah.
There is a proposal to add GDB_PYTHONPATH (or some such IIRC) and have
gdb use that instead of PYTHONPATH if it exists, but there's been
resistance to it.
I think(!) what would happen is that gdb would set $PYTHONPATH to the
value of $GDB_PYTHONPATH.
[Inferiors started by gdb should still get the original value of
PYTHONPATH though.]
> 2. With PYTHONPATH set as a temporary workaround, gdb starts, but
> spits out a traceback:
> Traceback (most recent call last):
> File "<string>", line 35, in <module>
> File "m:\development\mingw64\share\gdb/python/gdb/__init__.py", line
> 18, in <module>
> gdb.command.pretty_printers.register_pretty_printer_commands()
> File "m:\development\mingw64\share\gdb/python/gdb\command\pretty_printers.py",
> line 368, in register_pretty_printer_commands
> InfoPrettyPrinter()
> File "m:\development\mingw64\share\gdb/python/gdb\command\pretty_printers.py",
> line 100, in __init__
> gdb.COMMAND_DATA)
> RuntimeError: Could not find command prefix info.
>
> This is a minor problem I think, as "python import time" "python print
> time.clock()" works as expected. What is wrong?
I'm not sure.
The error message is complaining that the "info" command prefix doesn't exist.
I don't see how that can happen as python is initialized long after
the info command is created.
next prev parent reply other threads:[~2011-05-14 6:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BANLkTikrK8DJOEpACA_uUVdZx25P5pc1tA@mail.gmail.com>
2011-05-12 16:20 ` Ruben Van Boxem
2011-05-14 6:39 ` Doug Evans [this message]
2011-05-14 9:09 ` Ruben Van Boxem
2011-05-14 9:30 ` Eli Zaretskii
2011-05-14 10:10 ` Ruben Van Boxem
2011-05-14 18:38 ` Doug Evans
2011-05-14 18:31 ` Doug Evans
2011-05-14 18:40 ` Doug Evans
2011-05-15 12:30 ` Ruben Van Boxem
2011-05-15 13:27 ` Ruben Van Boxem
2011-05-15 16:12 ` Ruben Van Boxem
2011-05-17 16:32 ` Ruben Van Boxem
2011-05-17 20:52 ` Doug Evans
2011-06-09 2:04 ` Asm warrior
[not found] ` <BANLkTimfNgaKWbZdN-YVz9Vs2UW6vKsfiQ@mail.gmail.com>
2011-06-09 12:09 ` Ruben Van Boxem
2011-05-17 20:36 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=2xwRJmHfDBULRHidJUecMi0ix+w@mail.gmail.com' \
--to=dje@google.com \
--cc=gdb@sourceware.org \
--cc=python-list@python.org \
--cc=vanboxem.ruben@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox