Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Asmwarrior <asmwarrior@gmail.com>
Cc: Doug Evans <dje@google.com>,
	 Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>,
	Eli Zaretskii <eliz@gnu.org>, Tom Tromey <tromey@redhat.com>,
	 gdb-patches@sourceware.org
Subject: Re: Possible fix for mingw32 directory relocation problems
Date: Tue, 17 Jan 2012 07:00:00 -0000	[thread overview]
Message-ID: <4F151804.6040000@gmail.com> (raw)
In-Reply-To: <4F15111E.3060904@gmail.com>

On 2012-1-17 14:11, asmwarrior wrote:
> 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
Ok, the comments under:
\libiberty\make-relative-prefix.c line 217 clearly said it should work.
(it also give us an example about path handling)

/* Given three strings PROGNAME, BIN_PREFIX, PREFIX, return a string
that gets
   to PREFIX starting with the directory portion of PROGNAME and a relative
   pathname of the difference between BIN_PREFIX and PREFIX.

   For example, if BIN_PREFIX is /alpha/beta/gamma/gcc/delta, PREFIX is
   /alpha/beta/gamma/omega/, and PROGNAME is /red/green/blue/gcc, then this
   function will return /red/green/blue/../../omega/.

   If no relative prefix can be found, return NULL.  */

static char *
make_relative_prefix_1 (const char *progname, const char *bin_prefix,
			const char *prefix, const int resolve_links)

PS: make_relative_prefix() internally call make_relative_prefix_1().

asmwarrior
ollydbg from codeblocks forum


  reply	other threads:[~2012-01-17  6:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4f143c35.4fecd80a.473e.ffffbd75SMTPIN_ADDED@mx.google.com>
2012-01-17  2:49 ` asm warrior
     [not found]   ` <CADPb22SvBMEt9=EwMNZE6m+=_jfJZxTt1C2Pn-rH9OpHKUJCJQ@mail.gmail.com>
     [not found]     ` <4F150434.3020102@gmail.com>
     [not found]       ` <CADPb22TK7_csatjnORZoLeuRty9aXM+=hzBykYeWk6XzG-aPjQ@mail.gmail.com>
2012-01-17  6:48         ` asmwarrior
2012-01-17  7:00           ` Asmwarrior [this message]
     [not found] <4f143c53.ca3c440a.1d95.ffff9b71SMTPIN_ADDED@mx.google.com>
2012-01-17  9:56 ` Doug Evans
2012-01-17 13:40   ` asmwarrior
2012-01-17 14:15     ` asmwarrior
2012-01-17 15:03   ` Pierre Muller
     [not found]   ` <4f158a75.65ecd80a.69cb.7083SMTPIN_ADDED@mx.google.com>
2012-01-17 15:34     ` asmwarrior
     [not found]   ` <4f158a77.833ed80a.629b.7837SMTPIN_ADDED@mx.google.com>
2012-01-17 16:11     ` Doug Evans
2012-01-18 19:01     ` Doug Evans
2012-01-16 15:17 Pierre Muller

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=4F151804.6040000@gmail.com \
    --to=asmwarrior@gmail.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    --cc=tromey@redhat.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