From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23936 invoked by alias); 17 Jan 2012 06:18:55 -0000 Received: (qmail 23925 invoked by uid 22791); 17 Jan 2012 06:18:53 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,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; Tue, 17 Jan 2012 06:18:40 +0000 Received: by iadj38 with SMTP id j38so2711195iad.0 for ; Mon, 16 Jan 2012 22:18:39 -0800 (PST) Received: by 10.50.10.199 with SMTP id k7mr9583941igb.25.1326781119697; Mon, 16 Jan 2012 22:18:39 -0800 (PST) Received: from [222.205.42.7] ([222.205.42.7]) by mx.google.com with ESMTPS id g34sm73786033ibk.10.2012.01.16.22.18.36 (version=SSLv3 cipher=OTHER); Mon, 16 Jan 2012 22:18:38 -0800 (PST) Message-ID: <4F15111E.3060904@gmail.com> Date: Tue, 17 Jan 2012 06:48:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Doug Evans CC: Pierre Muller , Eli Zaretskii , Tom Tromey , gdb-patches@sourceware.org Subject: Re: Possible fix for mingw32 directory relocation problems References: <4f143c35.4fecd80a.473e.ffffbd75SMTPIN_ADDED@mx.google.com> <4F150434.3020102@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 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/msg00584.txt.bz2 On 2012-1-17 13:29, Doug Evans wrote: > On Mon, Jan 16, 2012 at 9:16 PM, asmwarrior wrote: >> On 2012-1-17 13:09, Doug Evans wrote: >> >> [- gdb-patches] >> >> On Mon, Jan 16, 2012 at 5:07 PM, asm warrior wrote: >> >> I'm not quite familiar with autoconf either. So, suppose we can put >> BINDIR in config.h, I think we still have some problem. >> Those values (DEBUGDIR, GDB_DATADIR, JIT_READER_DIR, BINDIR) were >> macro definition strings, so there are location are still fixed. >> >> But under Windows, I think there are many conditions that gdb.exe and >> other related gdb's share folder will be copied and pasted to many >> different paths. So, a true relocate scheme is still necessary. >> >> Beyond what GDB has already? >> >> [I get the feeling people just aren't listening to me ...] >> >> Dear Doug. >> >> Sorry, I may slip your messages. (My English is not quite good) or I may not >> fully understand your idea. >> I just review your posts under "Building GDB 7.3.92 with MinGW" thread, and >> you have said: >> >> *If* there is a bug here, and it's not pilot error, it feels like >> perhaps the bug is in relocate_gdb_directory. >> [Why don't all calls to relocate_gdb_directory require similar treatment? >> Thus this feels like the wrong way to go.] >> >> Maybe if you provide a sample session (and complete session please, no >> editing to trim it down), that will help. >> >> >> I don't fully understand the above sentences. Sorry. >> You mean we can change/improve the function body of >> "relocate_gdb_directory". > Let's put it this way. > If we move the definitions of BINDIR and TARGET_SYSTEM_ROOT to config.h, > what is still broken? > > [btw, I'm working on such a patch.] It looks like under Windows/MinGW, relocation GDB_DATADIR will internally call a function in libiberty char * make_relative_prefix (const char *progname, const char *bin_prefix, const char *prefix) Now, the arguments maybe looks like: progname = "e:/mymingw/bin/gdb.exe" (this is the folder you copy to) bin_prefix=BINDIR = "E:/msys/mingw32/msys/1.0/local/bin" prefix = "/usr/local/share/gdb" The return value should be a "relative path" to ""e:/mymingw/bin/" Right? asmwarrior PS: I have cc gdb-patches mail list.