* [PATCH/RFA] builtin-regs buglet
@ 2002-05-13 9:04 Richard Earnshaw
2002-05-13 9:22 ` Andrew Cagney
0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2002-05-13 9:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Richard.Earnshaw
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
I think this probably come under obvious, but lets see what others think.
With my new ARM pseudo-registers code, I'm getting an internal error if I
type
(gdb) p $fp
Why? Well there's some missing brackets...
* builtin-regs.c (value_of_builtin_reg): Correctly calculate the
builtin reg number.
[-- Attachment #2: gdb-builtin.patch --]
[-- Type: text/x-patch , Size: 839 bytes --]
Index: builtin-regs.c
===================================================================
RCS file: /cvs/src/src/gdb/builtin-regs.c,v
retrieving revision 1.1
diff -p -r1.1 builtin-regs.c
*** builtin-regs.c 9 Apr 2002 03:06:13 -0000 1.1
--- builtin-regs.c 13 May 2002 15:59:50 -0000
*************** builtin_reg_map_name_to_regnum (const ch
*** 71,77 ****
struct value *
value_of_builtin_reg (int regnum, struct frame_info *frame)
{
! int reg = regnum - NUM_REGS + NUM_PSEUDO_REGS;
gdb_assert (reg >= 0 && reg < nr_builtin_regs);
return builtin_regs[reg].value (frame);
}
--- 71,77 ----
struct value *
value_of_builtin_reg (int regnum, struct frame_info *frame)
{
! int reg = regnum - (NUM_REGS + NUM_PSEUDO_REGS);
gdb_assert (reg >= 0 && reg < nr_builtin_regs);
return builtin_regs[reg].value (frame);
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFA] builtin-regs buglet
2002-05-13 9:04 [PATCH/RFA] builtin-regs buglet Richard Earnshaw
@ 2002-05-13 9:22 ` Andrew Cagney
2002-05-13 9:27 ` Richard Earnshaw
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2002-05-13 9:22 UTC (permalink / raw)
To: Richard.Earnshaw; +Cc: gdb-patches
> * builtin-regs.c (value_of_builtin_reg): Correctly calculate the
> builtin reg number.
Oops! Yes.
Want to live dangerously? Try setting fp_regnum to -1. It should
[finally] fix the $fp (regname) vs $fp (info registers) problem.
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFA] builtin-regs buglet
2002-05-13 9:22 ` Andrew Cagney
@ 2002-05-13 9:27 ` Richard Earnshaw
2002-05-14 17:34 ` Andrew Cagney
0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2002-05-13 9:27 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Richard.Earnshaw, gdb-patches
> > * builtin-regs.c (value_of_builtin_reg): Correctly calculate the
> > builtin reg number.
>
> Oops! Yes.
Installed.
>
> Want to live dangerously? Try setting fp_regnum to -1. It should
> [finally] fix the $fp (regname) vs $fp (info registers) problem.
Hmm, one step at a time... My current patch to for the arm is already
looking somewhat jumbo like. Unfortunately, I don't really see how I can
break it down, since the changes are all fairly fundamental.
R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFA] builtin-regs buglet
2002-05-13 9:27 ` Richard Earnshaw
@ 2002-05-14 17:34 ` Andrew Cagney
2002-05-15 1:52 ` Richard Earnshaw
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2002-05-14 17:34 UTC (permalink / raw)
To: Richard.Earnshaw; +Cc: gdb-patches
> * builtin-regs.c (value_of_builtin_reg): Correctly calculate the
>> > builtin reg number.
>
>>
>> Oops! Yes.
>
>
> Installed.
>
>
>>
>> Want to live dangerously? Try setting fp_regnum to -1. It should
>> [finally] fix the $fp (regname) vs $fp (info registers) problem.
>
>
> Hmm, one step at a time... My current patch to for the arm is already
> looking somewhat jumbo like. Unfortunately, I don't really see how I can
> break it down, since the changes are all fairly fundamental.
Try cherry [mango] picking a little. Stuff like the above, also no
longer defining register_{raw,virtual}_size.
However, yes you're heading for something of a rewrite.
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFA] builtin-regs buglet
2002-05-14 17:34 ` Andrew Cagney
@ 2002-05-15 1:52 ` Richard Earnshaw
2002-05-18 14:24 ` Andrew Cagney
0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2002-05-15 1:52 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Richard.Earnshaw, gdb-patches
ac131313@cygnus.com said:
> However, yes you're heading for something of a rewrite.
You said it...
The size of this, plus some of the attendant changes elsewhere, makes me
wonder whether we should create a separate branch -- this could be quite
destabilizing, particularly for some of the target connections that use
the revised ARM code.
Thoughts?
R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFA] builtin-regs buglet
2002-05-15 1:52 ` Richard Earnshaw
@ 2002-05-18 14:24 ` Andrew Cagney
2002-05-19 7:50 ` Richard Earnshaw
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2002-05-18 14:24 UTC (permalink / raw)
To: Richard.Earnshaw; +Cc: gdb-patches
>
> You said it...
>
> The size of this, plus some of the attendant changes elsewhere, makes me
> wonder whether we should create a separate branch -- this could be quite
> destabilizing, particularly for some of the target connections that use
> the revised ARM code.
Yes. Could use the regbuf branch or create your own. I can test
against arm-sim and I could do with an extra target to test against.
As for the change, I suspect there are two steps: make everything a
pseudo (probably the bit to have on the branch?); then add lots more to
the raw/pseudo registers.
thoughts?
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFA] builtin-regs buglet
2002-05-18 14:24 ` Andrew Cagney
@ 2002-05-19 7:50 ` Richard Earnshaw
0 siblings, 0 replies; 7+ messages in thread
From: Richard Earnshaw @ 2002-05-19 7:50 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Richard.Earnshaw, gdb-patches
> >
> > You said it...
> >
> > The size of this, plus some of the attendant changes elsewhere, makes me
> > wonder whether we should create a separate branch -- this could be quite
> > destabilizing, particularly for some of the target connections that use
> > the revised ARM code.
>
> Yes. Could use the regbuf branch or create your own. I can test
> against arm-sim and I could do with an extra target to test against.
>
> As for the change, I suspect there are two steps: make everything a
> pseudo (probably the bit to have on the branch?); then add lots more to
> the raw/pseudo registers.
Putting it in the regbuf branch might be best, but it'll need the
REGISTER_SIM_REGNO patch if I'm to get the sim target working.
R.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-05-19 14:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-13 9:04 [PATCH/RFA] builtin-regs buglet Richard Earnshaw
2002-05-13 9:22 ` Andrew Cagney
2002-05-13 9:27 ` Richard Earnshaw
2002-05-14 17:34 ` Andrew Cagney
2002-05-15 1:52 ` Richard Earnshaw
2002-05-18 14:24 ` Andrew Cagney
2002-05-19 7:50 ` Richard Earnshaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox