]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add gcc_target_options hook for nios2.
authorSandra Loosemore <sandra@codesourcery.com>
Wed, 19 Sep 2018 03:57:07 +0000 (20:57 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Wed, 19 Sep 2018 03:57:07 +0000 (20:57 -0700)
2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>

gdb/
* nios2-tdep.c (nios2_gcc_target_options): New.
(nios2_gdb_arch_init): Install new hook.

gdb/ChangeLog
gdb/nios2-tdep.c

index 004a2533118f52a6c7d96906046703cb7464a19d..40d9f0d87e2e6eef1ea9bf10f5557772ca1d0079 100644 (file)
@@ -1,3 +1,8 @@
+2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * nios2-tdep.c (nios2_gcc_target_options): New.
+       (nios2_gdb_arch_init): Install new hook.
+
 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
 
        * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
index eb5285a4a27e6dfe8b6dc98303e665b15f91c0a7..008b1d4b2224c562d760a68a68ac96f8d0bc76d3 100644 (file)
@@ -2239,6 +2239,14 @@ nios2_type_align (struct gdbarch *gdbarch, struct type *type)
   return std::min<ULONGEST> (4, TYPE_LENGTH (type));
 }
 
+/* Implement the gcc_target_options gdbarch method.  */
+static char *
+nios2_gcc_target_options (struct gdbarch *gdbarch)
+{
+  /* GCC doesn't know "-m32".  */
+  return NULL;
+}
+
 /* Initialize the Nios II gdbarch.  */
 
 static struct gdbarch *
@@ -2344,6 +2352,9 @@ nios2_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Single stepping.  */
   set_gdbarch_software_single_step (gdbarch, nios2_software_single_step);
 
+  /* Target options for compile.  */
+  set_gdbarch_gcc_target_options (gdbarch, nios2_gcc_target_options);
+
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);