You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/22 12:03:09 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6129: tools:minidumpserver.py support xtensa

xiaoxiang781216 commented on PR #6129:
URL: https://github.com/apache/incubator-nuttx/pull/6129#issuecomment-1106446096

   > > @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. A value of `10` (as you are seeing it) means that the function was called using a `call8` instruction. `01` for `call4` and `11` for `call12`.
   > 
   > > 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.
   
   @Ouss4 could you point out which source code(OpenOCD or gdb) mask out the high 2bits? We want to simulate the same behavior in minidumpserver.py by learning it's algo.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org