H8300 Patch - Fix GDB crash problem when object file of different H8 cpu is loaded

Andrew Cagney cagney@gnu.org
Mon Dec 1 17:26:00 GMT 2003


Basicly ok (and thanks),  can you just change these functions:

> +int
> +is_h8300smode (void)
> +{
> +  return gdbarch_bfd_arch_info (current_gdbarch)->mach == bfd_mach_h8300sx
> +	 || gdbarch_bfd_arch_info (current_gdbarch)->mach == bfd_mach_h8300sxn
> +	 || gdbarch_bfd_arch_info (current_gdbarch)->mach == bfd_mach_h8300s
> +	 || gdbarch_bfd_arch_info (current_gdbarch)->mach == bfd_mach_h8300sn;
> +}
> +

so that the "current_gdbarch" is passed explicitly as a parameter making 
the call:
     is_h8300smode (current_gdbarch)
That will save someone the effort of having to add the parameter later. 
  It still leaves the task of replacing current_gdbarch with something 
more local at the call site, but lets leave that as a later pass.

With that change it's ok to commit.

Can you also please, as a separate patch (don't forget changelog and to 
post it), add yourself to the write after approval list.

Andrew




More information about the Gdb-patches mailing list