www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/20/01:56:43

Date: Sun, 20 Aug 2000 08:58:42 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: jgfw AT iname DOT com
Message-Id: <2110-Sun20Aug2000085842+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b
CC: djgpp AT delorie DOT com
In-reply-to: <003301c00a22$0dc739e0$d5616acb@tm.net.my> (jgfw@iname.com)
Subject: Re: DJGPP on Windows ME
References: <001901c009c8$d8fde140$0439bcca AT tm DOT net DOT my> <9743-Sat19Aug2000213143+0300-eliz AT is DOT elta DOT co DOT il> <003301c00a22$0dc739e0$d5616acb AT tm DOT net DOT my>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Reply-To: "ObiGuan Kenobi" <jgfw AT iname DOT com>
> From: "ObiGuan Kenobi" <jgfw AT iname DOT com>
> >
> > Unfortunately, I don't have access to Windows/ME to debug this.
> > Please consider running the program stubify.exe (that's where the
> > message comes from) under a debugger and stepping into `rename' to see
> > what exactly fails there.
> 
> Could you please tell me on the steps how to do this. I am not that
> familiar with debuggers. Tried to use GDB, but I have no idea how to specify
> to stop at rename.

The way to tell GDB to stop at rename is "break rename".  (I suggest a
quick glance at the GDB manual, and also the built-in "help" command
could help ;-).

However, to debug this efficiently, you will need to rebuild
stubify.exe so that it has the debugging code for the library
functions as well.  To this end, you should do the following:

  - Download v2/djlsr203.zip and extract the following files from it:

	     src/stub/stubify.c
	     src/libc/ansi/stdio/rename.c
	     src/libc/ansi/stdio/_rename.c
	     src/libc/ansi/stdio/remove.c

  - Put all those files together on a single file and call that file
    stubify.c.

  - Compile that file like this:

	    gcc -Wall -O -g -o stubify.exe stubify.c

  - Run this debugging version of stubify.exe under GDB, like this:

	    gdb stubify.exe
	    break rename
	    run foo

    where `foo' is the name of the program you tried to link when you
    saw the original error message which started this thread.

    PLEASE NOTE: `foo' must be a raw COFF image, not a .exe program!
    It should be a file without an extension, and you should be able
    to find it in the directory where you were linking that program.

    I suggest to copy `foo' into the same directory where you have the
    debugging version of stubify.exe with stubify.c and all the other
    source files, and run GDB from there.

  - Once stubify.exe stops at entry to `rename', you can single-step
    it by typing "next" (or "n" for short), and see what source line
    causes the problem.  You can examine variables with a command like
    this:
		print varname

    where "varname" is the name of a variable (acually, it can be any
    valid C expression that includes variable names, operators, and
    even function calls).

    To step into a function call, use "step" instead of "next".

Good luck, and thanks for working on this!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019