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

[binutils-gdb] i386-tdep.c (i386_gdbarch_init): Add comments.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ad9eb1fdda263cd91ee8fb36292fb29d546b0076

commit ad9eb1fdda263cd91ee8fb36292fb29d546b0076
Author: Doug Evans <dje@google.com>
Date:   Mon Nov 7 13:27:22 2016 -0800

    i386-tdep.c (i386_gdbarch_init): Add comments.
    
    gdb/ChangeLog:
    
    	* i386-tdep.c (i386_gdbarch_init): Add comments.

Diff:
---
 gdb/ChangeLog   | 4 ++++
 gdb/i386-tdep.c | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dd9f8cb..f4f6fd51 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2016-11-07  Doug Evans  <dje@google.com>
 
+	* i386-tdep.c (i386_gdbarch_init): Add comments.
+
+2016-11-07  Doug Evans  <dje@google.com>
+
 	* python/py-unwind.c (unwind_infopy_str): Fix use of VEC_iterate.
 
 2016-11-07  Doug Evans  <dje@google.com>
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index a67eca0..22fb54c 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -8316,6 +8316,8 @@ i386_validate_tdesc_p (struct gdbarch_tdep *tdep,
 }
 
 
+/* Note: This is called for both i386 and amd64.  */
+
 static struct gdbarch *
 i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
@@ -8333,7 +8335,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   if (arches != NULL)
     return arches->gdbarch;
 
-  /* Allocate space for the new architecture.  */
+  /* Allocate space for the new architecture.  Assume i386 for now.  */
   tdep = XCNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
@@ -8560,7 +8562,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_insn_is_ret (gdbarch, i386_insn_is_ret);
   set_gdbarch_insn_is_jump (gdbarch, i386_insn_is_jump);
 
-  /* Hook in ABI-specific overrides, if they have been registered.  */
+  /* Hook in ABI-specific overrides, if they have been registered.
+     Note: If INFO specifies a 64 bit arch, this is where we turn
+     a 32-bit i386 into a 64-bit amd64.  */
   info.tdep_info = tdesc_data;
   gdbarch_init_osabi (info, gdbarch);


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