* win32-nat.c (child_attach): check args for NULL before passing
to strtoul. This fixes PR gdb/43.
+2001-03-17 Michael Chastain <chastain@redhat.com>
+
+ * win32-nat.c (child_attach): check args for NULL before passing
+ to strtoul. This fixes PR gdb/43.
+
2001-03-17 Mark Kettenis <kettenis@gnu.org>
* i387-nat.h: Doc Fix.
child_attach (char *args, int from_tty)
{
BOOL ok;
- DWORD pid = strtoul (args, 0, 0);
+ DWORD pid;
if (!args)
error_no_arg ("process-id to attach");
+ pid = strtoul (args, 0, 0);
ok = DebugActiveProcess (pid);
if (!ok)
child_attach (char *args, int from_tty)
{
BOOL ok;
- DWORD pid = strtoul (args, 0, 0);
+ DWORD pid;
if (!args)
error_no_arg ("process-id to attach");
+ pid = strtoul (args, 0, 0);
ok = DebugActiveProcess (pid);
if (!ok)