Re: Support of gdb for Windows 64 native systems

Pedro Alves
2007-10-15T23:31:49Z

Christopher Faylor wrote:
>
> You took a 'flags = ' out of the first part of an if/else block and put
> it before the if block. Doesn't that seem wrong?

Shame on me. I should sleep more often :(

I stared at it for long, but still somehow missed the
fact that the first branch of the 'if' is negated ...

This is what I should have written:

#ifdef __CYGWIN__
if (!useshell)
{
cygwin_conv_to_win32_path (exec_file, real_path);
toexec = real_path;
flags = DEBUG_ONLY_THIS_PROCESS;
}
else
{
char *newallargs;
sh = getenv ("SHELL");
if (!sh)
sh = "/bin/sh";
cygwin_conv_to_win32_path (sh, shell);
newallargs = alloca (sizeof (" -c 'exec '") + strlen (exec_file)
+ strlen (allargs) + 2);
sprintf (newallargs, " -c 'exec %s %s'", exec_file, allargs);
allargs = newallargs;
toexec = shell;
flags = DEBUG_PROCESS;
}
#else
toexec = exec_file;
flags = DEBUG_ONLY_THIS_PROCESS;
#endif

Thanks for your patience.

Cheers,
Pedro Alves