Kevin Gardenhire
Kevin Gardenhire

Reputation: 656

KDBG watch all arg variables

I need to be able to add the argv array to the watched variable list in KDBG for a C program I am running. I can add argv[0],argv[1],argv[2] etc but is there a way to add one variable that will allow me to watch the entire array regardless of how many variables there are?

Upvotes: 0

Views: 211

Answers (1)

j6t
j6t

Reputation: 13387

Use GDB's @ notation to print an array. Specify this expression

*argv@argc

to see all arguments, or

*argv@(argc+1)

to also see the trailing NULL pointer.

Upvotes: 0

Related Questions