From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13970 invoked by alias); 14 May 2011 10:10:22 -0000 Received: (qmail 13959 invoked by uid 22791); 14 May 2011 10:10:19 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qy0-f169.google.com (HELO mail-qy0-f169.google.com) (209.85.216.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 14 May 2011 10:10:04 +0000 Received: by qyk2 with SMTP id 2so877831qyk.0 for ; Sat, 14 May 2011 03:10:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.68.98 with SMTP id u34mr1753009qci.200.1305367803795; Sat, 14 May 2011 03:10:03 -0700 (PDT) Received: by 10.229.250.66 with HTTP; Sat, 14 May 2011 03:10:03 -0700 (PDT) Reply-To: vanboxem.ruben@gmail.com In-Reply-To: <83ei41fx4a.fsf@gnu.org> References: <83ei41fx4a.fsf@gnu.org> Date: Sat, 14 May 2011 10:10:00 -0000 Message-ID: Subject: Re: Python enabled gdb on Windows and relocation From: Ruben Van Boxem To: Eli Zaretskii Cc: dje@google.com, gdb@sourceware.org, python-list@python.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00060.txt.bz2 2011/5/14 Eli Zaretskii : >> Date: Sat, 14 May 2011 11:09:13 +0200 >> From: Ruben Van Boxem >> Cc: gdb@sourceware.org, python-list@python.org >> >> 1. Check hardcoded path; my suggestion would be "/../lib= /python27" >> 2. If this fails to find the necessary files/scripts, find it like you >> described above in Linux, without PYTHONPATH set. >> 3. Check PYTHONPATH. >> >> I would think only number one would change, and perhaps be only >> enabled with a special configure option. Nothing else would have to >> change, and Windows users would rejoice :) > > The problem, I think, is that it's not so easy on Unix to get the > place where the GDB executable leaves. =C2=A0There isn't a system call to > do that (similar to what Windows gives you). > > So I think on Posix platforms, number 2 would be used most of the > time. > I understand. So better/feasible would be: Windows: Check /../lib/python27 or any configure-time specified relative path to gdb executable? If that fails, revert to current behavoir. POSIX (so pretty much everythin else): Keep current behavior. Which would come down to a configure option+ a small block of #if _WIN32 code in the Python part of the code. Thanks, Ruben