summaryrefslogtreecommitdiffstats
path: root/kdbg/testprogs/locals.cpp
blob: ed2cf1e77395162e0a1180189936df1192c9e2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>


// a function that has args but no locals

static int nolocals(int argc, char** argv)
{
	printf("argc=%d, argv[0]=%s\n", argc, argv[0]);
}


// a function that has no args but locals

static int noargs()
{
	int c = 1;
	char* pgm[] = { "foo", 0 };
	nolocals(c, pgm);
}


int main(int argc, char** argv)
{
	noargs();
	nolocals(argc, argv);
}