This is the mail archive of the gdb-patches@sourceware.org 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]

Re: [PATCH RESEND] gdb: xtensa: fix register counters for xtensa-linux


On Sun, Jan 13, 2019 at 8:32 AM Simon Marchi <simon.marchi@polymtl.ca> wrote:
>
> On 2019-01-13 03:36, Max Filippov wrote:
> > In the original code (prior to 37d9e0623102) num_regs was the smallest
> > of
> > the number of the first pseudo register or the first privileged
> > register, and
> > num_pseudo_regs was the total number of registers minus num_regs.
> > The register table is constructed so that pseudo registers are always
> > at the
> > end of it, so num_regs was always equal to num_nonpriv_regs.
> > I'd like to restore this in xtensa-linux gdb, and what I do is I
> > increase
> > num_pseudo_regs by the difference of num_regs and num_nonpriv regs
> > and set num_regs equal to num_nonpriv_regs to maintain the above
> > equations.
>
> "num_regs == num_nonpriv_regs": is this only true for Linux, because we
> don't have access to privileged registers (and therefore there are 0
> nonpriv registers)?

Correct.

>  For bare-metal, num_regs would be greater than num_nonpriv_regs?

Correct.

-- 
Thanks.
-- Max


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]