Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [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

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