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]

[PATCH]: Fix m68hc11_register_name


Hi!

This patch fixes register_name on HC11 when it is first called before fetching any
register.  In that case, it could return null for soft registers but they were defined.
(the soft regs are found by looking at the symbol table.

Committed on 6_1 and main.

Stephane

2004-03-13 Stephane Carrez <stcarrez@nerim.fr>

* m68hc11-tdep.c (m68hc11_register_name): Get soft reg information.

Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.99
diff -u -p -r1.99 m68hc11-tdep.c
--- m68hc11-tdep.c	13 Feb 2004 06:09:36 -0000	1.99
+++ m68hc11-tdep.c	13 Mar 2004 14:47:18 -0000
@@ -385,6 +385,8 @@ m68hc11_register_name (int reg_nr)
   if (reg_nr >= M68HC11_ALL_REGS)
     return NULL;
 
+  m68hc11_initialize_register_info ();
+
   /* If we don't know the address of a soft register, pretend it
      does not exist.  */
   if (reg_nr > M68HC11_LAST_HARD_REG && soft_regs[reg_nr].name == 0)

Attachment: pgp00000.pgp
Description: PGP signature


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