From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10903 invoked by alias); 11 Jan 2012 04:30:40 -0000 Received: (qmail 10890 invoked by uid 22791); 11 Jan 2012 04:30:38 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_DB,TW_SM X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Jan 2012 04:30:25 +0000 Received: by mail-iy0-f169.google.com with SMTP id j26so560101iaf.0 for ; Tue, 10 Jan 2012 20:30:24 -0800 (PST) Received: by 10.43.124.130 with SMTP id go2mr15783266icc.20.1326256224875; Tue, 10 Jan 2012 20:30:24 -0800 (PST) Received: from [192.168.1.103] ([218.109.112.240]) by mx.google.com with ESMTPS id x18sm796121ibi.2.2012.01.10.20.30.22 (version=SSLv3 cipher=OTHER); Tue, 10 Jan 2012 20:30:24 -0800 (PST) Message-ID: <4F0D116F.9050009@gmail.com> Date: Wed, 11 Jan 2012 04:54:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: Building GDB 7.3.92 with MinGW References: <83hb03e9sx.fsf@gnu.org> <838vlfe0k9.fsf@gnu.org> <4F0CD948.8080909@gmail.com> <8362gievdu.fsf@gnu.org> In-Reply-To: <8362gievdu.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00341.txt.bz2 On 2012-1-11 12:05, Eli Zaretskii wrote: >> Date: Wed, 11 Jan 2012 08:35:20 +0800 >> From: asmwarrior >> >> On 2012-1-11 5:23, Doug Evans wrote: >>> For one, remembering to pass -data-directory is a pain. >> This parameter does not work correctly under MinGW in the case that I would like gdb to automatically run the python script when it startup. >> >> Normally, my gdb is put in MinGW/bin, and the gdb's own python script is under: >> MinGW\share\gdb\python\gdb\*.py >> >> I need to hard-code the code in gdb/main.c to set the data-directory value. (Because gdb is build from MSYS+MinGW, but it run normally on Windows shell without MSYS) > Can you explain why the original code doesn't work as intended? And > what is MSYS have to do with that? > > Thanks. Hi, I was originally open a discussion on the Codeblocks' forum http://forums.codeblocks.org/index.php/topic,15104.0.html The major problem is: gdb/main.c (setting the gdb's python folder) execute before we use data-directory to set the python path, so whether you set -data-directory, you always failed to find its own python script. You can check my patch and see what I adjust the path, so gdb can find and run its own python script correctly. This issue is that MSYS+autoconf system use different path scheme with normal mingw. But when you run gdb under normal mingw, you still have some internal variables which is MSYS style. asmwarrior ollydbg from codeblocks' forum