aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorMichael Chastain <mec@google.com>2001-03-18 21:35:58 +0000
committerMichael Chastain <mec@google.com>2001-03-18 21:35:58 +0000
commit559e75c07a4bd1d17dd4d7aa05774773ac0c03cc (patch)
treef3d8dd41df93fc7dbc8511e2f20cf6bc595da615 /gdb/windows-nat.c
parent64cbbfaefea283f88a18a419fa162a31e637182f (diff)
downloadgdb-559e75c07a4bd1d17dd4d7aa05774773ac0c03cc.zip
gdb-559e75c07a4bd1d17dd4d7aa05774773ac0c03cc.tar.gz
gdb-559e75c07a4bd1d17dd4d7aa05774773ac0c03cc.tar.bz2
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.
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index f0d97fa..277b473 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1015,11 +1015,12 @@ static void
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)