0

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?

user2736738
  • 30,591
  • 5
  • 42
  • 56
Kevin Gardenhire
  • 626
  • 8
  • 22

1 Answers1

0

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.

j6t
  • 9,150
  • 1
  • 15
  • 35