Mail Archives: djgpp/1998/07/06/20:27:56
Leiming Qian wrote:
>
> Hi, I am using Djgpp 2.0 in Windows 95, there is this problem that's
> troubling me: it seems that programs like gdb still uses the UNIX / to
> denote directory instead of using \ according to Windows convention, for
> example:
>
> gdb H:\code\test.exe won't work, while
>
> gdb H:/code/test.exe would.
>
> The problem is I am using Codewright and UltraEdit (both are ``power''
> programming editors), they both provide one-click access, predefined menu
> command or button command to common tasks like compiling and debugging, but
> they all generate path information using \, thus gdb won't work correctly.
>
> Are there any options in Djgpp which can force those programs to recognize \
> notation?
I think that's a bug in GDB. As a workaround, you can write a simple
wrapper program which changes the slashes and calls `gdb', and use it
instead:
/* Untested */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
char *p;
if (argv[1])
for (p = argv[1]; *p; p++)
if (*p == '\\') *p = '/';
execlp("gdb", "gdb", argv[1], NULL);
/* If we get here, something's wrong */
perror("execlp");
return 1;
}
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -