1. It seems logical to me that out-of-scope locals have a local name of zero. However, it’s strange to me that function arguments, while treated as locals, don’t have names (see both examples).
2. It’s also strange that the for-loop variable ‘i' doesn’t have a name. If I move the definition of ‘i’ ahead of the for loop, it does have a name.
3. The value of “debugger” from the first listing looks more like the value of orig_argv, which doesn’t appear elsewhere in the locals list. I also don’t seem to have a variable called “debugger” in my definition of “_main” (but there is a variable called “debugger” in the containing (master) object.
Am I doing something wrong in my use of these frames? I get similar strange behavior in the debugger itself, when the thread of the backtrace I’m examining is paused.