This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
For example, if the user writes a 32-bit value into the PC, the CPSR state> probably shouldn't be changed (even if the bottom bit is altered) -- this > is how ARM's debuggers behave. However, if the user 'calls' a function > that is in the 'other state', then the CPSR should be updated (and > presumably restored afterwards).
> > I'm not sure if GDB has a way of separating these two cases. It's an > interesting problem.
I believe that this will work at present, because setting $pc will not go through write_pc. There's some blind luck involved in this, though.
In the past we've tried to distinguish R15 from PC. This was especially useful in the legacy 26-bit mode where the CPSR bits *were* in R15.
This would probably all have been much simpler if I'd been able to complete my code for handling the banked register; sadly I never got far enough, and I think the code is probably too bit-rotten to be worth trying to resurrect directly at this point.
(gdb) set $r15 = 0x123 - target sees: $r15=0x123 (gdb) call foo() OR (gdb) jump foo - target, via "set_resume_address", sees: $r15=&foo $ps&|=<magic-bits>
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |