anjiahao1 commented on PR #6129: URL: https://github.com/apache/incubator-nuttx/pull/6129#issuecomment-1106438080
> > @Ouss4 Hi ,I encountered a problem. In the architecture of xtensa, the highest bit of the A0 register is always set to 1. During debugging with gdb, the address accessed is` 0x800XXXXX`, but the actual address is` 0x400XXXXX`. I see that you are in openocd After doing related work, will openocd `BIT AND` the highest bit of the A0 register? Looking forward to your reply. > > Hi, That's normal behavior. A0 (the return address) also encodes the call increment in its most significant two bits (31 and 30), the address is the rest of the bits. The call increment is used by the `ret` instruction to determine the value to rotate the window with. > > > will openocd BIT AND the highest bit of the A0 register? > > yes, anytime we want the "true" return address from A0, we just ignore the highest two bits. Thanks for your reply, the A0 in the analysis register is easy to handle, but the A0 in the dump_stack is indistinguishable from the general local variables.How to distinguish A0 and local variables in stack? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
