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]

Re: H8300 Patch - Fix GDB crash problem when object file of differentH8 cpu is loaded


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



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