Re: po $rdi ==> "Couldn't materialize"
Re: po $rdi ==> "Couldn't materialize"
- Subject: Re: po $rdi ==> "Couldn't materialize"
- From: email@hidden
- Date: Tue, 22 Jul 2014 11:47:17 -0700
"frame 0" is the currently executing function. It is the lowest or youngest frame on the stack (I like using "older" & "younger" since then you don't have to figure out whether the stack grows up or down...)
Anyway, there are two things going on here.
First off, when execution enters a function, all these volatile registers have interesting values (usually the arguments to a function) but by the time that function does anything real, it has generally reused those registers, so while they may have interesting values, they are unlikely to be the arguments to the function you are in. So if you want to stop in some code you don't have debug info for, and look at the registers to get the arguments, make sure you stop at the first instruction of the function, which you can either do globally in lldb by setting:
settings set target.skip-prologue false
or when setting individual breakpoint, use the -K false option.
Secondly, if you are looking a function which is not the currently executing function (i.e. something higher up on the stack) then the process of calling the function which is the currently executing function (or calling its caller, or its caller's caller, etc depending on how high up on the stack you are) will have reused the volatile registers. So there's no way for the debugger to know what their values were at the time the functions higher up on the stack called their callee's.
Jim
> On Jul 22, 2014, at 11:33 AM, Jerry Krinock <email@hidden> wrote:
>
>
> On 2014 Jul 22, at 11:12, email@hidden wrote:
>
>> If you issue the "register read" command, it will show you only the registers it can reconstruct, if you want to verify this.
>
> Thank you, Jim. It verifies as you said. All of the interesting registers are unavailable :(
>
>> OTOH, if you ARE looking at the values of these registers at frame 0, then something weird is going on, and please file a bug about that.
>
> I’m not sure what you mean by “frame 0” (only an electrical engineer here). In case you mean “at the first instruction, before the method begins executing”, I’m going to try putting some breakpoints at the beginnings of methods.
>
> But this sure seems like a new phenomena. Until a few months ago, po $rdi “just worked” 95% of the time. Recently, it never works.
>
> I’ll be back.
>
> Jerry
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden