public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* set architecture sh2, causes core dump on latest build 20000305.
@ 2000-03-10  2:17 Robert
  2000-03-19 23:12 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Robert @ 2000-03-10  2:17 UTC (permalink / raw)
  To: insight

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

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     }     
,

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: set architecture sh2, causes core dump on latest build 20000305.
  2000-03-10  2:17 set architecture sh2, causes core dump on latest build 20000305 Robert
@ 2000-03-19 23:12 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2000-03-19 23:12 UTC (permalink / raw)
  To: Robert; +Cc: insight

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

A core dump or an internal_error ?

Anyway, I've applied the patch.  Thanks!

	Andrew

> 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
>     }
>     ,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-03-19 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-10  2:17 set architecture sh2, causes core dump on latest build 20000305 Robert
2000-03-19 23:12 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).