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

Re: [robert.melchers@drives.eurotherm.co.uk: set architecture sh2, causes core dump on latest build 20000305.]


This was sent to the insight mailing list.  Does it look correct?

cgf

----- Forwarded message from Robert <robert.melchers@drives.eurotherm.co.uk> -----

From: "Robert" <robert.melchers@drives.eurotherm.co.uk>
To: <insight@sourceware.cygnus.com>
Subject: set architecture sh2, causes core dump on latest build 20000305.
Date: Fri, 10 Mar 2000 10:09:12 -0000
Importance: Normal

With GNU gdb 20000305 "--host=i686-pc-cygwin --target=sh-coff" the command "set architecture sh2",
causes a core dump.

I believe it is because the sh_processor_type_table[] in sh-tdep.c does not include an entry for the
sh2. Adding an entry fixes the problem.

The sh1 and sh2 processors share the same register names.

The following snippet shows the necessary changes.

Robert.

*** sh-tdep.bak Thu Feb 24 03:31:45 2000
--- sh-tdep.c Thu Mar 09 17:10:05 2000
***************
*** 102,115 ****
--- 102,119 ----
  sh_processor_type_table[] =
  {
    {
      sh_reg_names, bfd_mach_sh
    }
    ,
    {
+     sh_reg_names, bfd_mach_sh2
+   }
+   ,
+   {
      sh3_reg_names, bfd_mach_sh3
    }
    ,
    {
      sh3e_reg_names, bfd_mach_sh3e
    }
    ,


----- End forwarded message -----

-- 
cgf@cygnus.com                        Cygnus Solutions, a Red Hat company
http://sourcware.cygnus.com/          http://www.redhat.com/

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