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]

[commit] Use NUM_REGS in reggroups.c


Hello,

The attached uses NUM_REGS, instead of gdbarch_num_regs(), when deciding if a register is raw. HP/UX still isn't multi-arch which leads to gdbarch_num_regs() returning 0. This trickles through various logic eventually resulting in:

	(gdb) print "string"
	No memory available to program: call to malloc failed

I guess in a month or so, it will be reverted.

Andrew
2003-04-13  Andrew Cagney  <cagney at redhat dot com>

	* reggroups.c (default_register_reggroup_p): Use NUM_REGS instead
	of gdbarch_num_regs.

Index: reggroups.c
===================================================================
RCS file: /cvs/src/src/gdb/reggroups.c,v
retrieving revision 1.2
diff -u -r1.2 reggroups.c
--- reggroups.c	2 Nov 2002 15:13:34 -0000	1.2
+++ reggroups.c	13 Apr 2003 22:33:28 -0000
@@ -149,7 +149,9 @@
     return 1;
   vector_p = TYPE_VECTOR (register_type (gdbarch, regnum));
   float_p = TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT;
-  raw_p = regnum < gdbarch_num_regs (gdbarch);
+  /* FIXME: cagney/2003-04-13: Can't yet use gdbarch_num_regs
+     (gdbarch), as not all architectures are multi-arch.  */
+  raw_p = regnum < NUM_REGS;
   if (group == float_reggroup)
     return float_p;
   if (group == vector_reggroup)

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