This is the mail archive of the gdb-patches@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]

Re: gdb-patch mailing list


Joel Brobecker wrote:
Michael,

-2009-12-30  Stan Shebs  <stan@codesourcery.com>
-
-       * tracepoint.c (trace_status_command): Add some status output.
-

on the status word output, maybe he knows how to fix my diff?!

Is there anyone around you that has a bit of experience dealing with version-control systems, diff, patch, etc? I can help you, but doing so by email is taking a very large amount of time for both of us. I think that a verbal communication might help speed things along. Otherwise, first things first, get a fresh checkout of the GDB sources, do not touch the sources, just build GDB, and then get back to me.

I suppose that indeed something went wrong, don't know what exactly, here's the new patch :)

Michael.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 188347f..bc3337b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-02  Michael Baars  <development@codenamezero.org>
+
+	* i387-tdep.c: Maintenance update on 'info float'
+
 2010-01-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* cli/cli-script.c (process_next_line): Rename p1 as p_end and p2 as
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 3fb5b56..e5766d7 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -113,86 +113,106 @@ print_i387_ext (struct gdbarch *gdbarch,
     fputs_filtered (" Unsupported", file);
 }
 
-/* Print the status word STATUS.  */
-
+/* Print the status word. */
 static void
 print_i387_status_word (unsigned int status, struct ui_file *file)
 {
-  fprintf_filtered (file, "Status Word:         %s",
-		    hex_string_custom (status, 4));
-  fputs_filtered ("  ", file);
-  fprintf_filtered (file, " %s", (status & 0x0001) ? "IE" : "  ");
-  fprintf_filtered (file, " %s", (status & 0x0002) ? "DE" : "  ");
-  fprintf_filtered (file, " %s", (status & 0x0004) ? "ZE" : "  ");
-  fprintf_filtered (file, " %s", (status & 0x0008) ? "OE" : "  ");
-  fprintf_filtered (file, " %s", (status & 0x0010) ? "UE" : "  ");
-  fprintf_filtered (file, " %s", (status & 0x0020) ? "PE" : "  ");
-  fputs_filtered ("  ", file);
-  fprintf_filtered (file, " %s", (status & 0x0080) ? "ES" : "  ");
-  fputs_filtered ("  ", file);
-  fprintf_filtered (file, " %s", (status & 0x0040) ? "SF" : "  ");
-  fputs_filtered ("  ", file);
-  fprintf_filtered (file, " %s", (status & 0x0100) ? "C0" : "  ");
-  fprintf_filtered (file, " %s", (status & 0x0200) ? "C1" : "  ");
-  fprintf_filtered (file, " %s", (status & 0x0400) ? "C2" : "  ");
-  fprintf_filtered (file, " %s", (status & 0x4000) ? "C3" : "  ");
-
-  fputs_filtered ("\n", file);
-
-  fprintf_filtered (file,
-		    "                       TOP: %d\n", ((status >> 11) & 7));
+  fprintf_filtered (file, "status word              : %s\n",
+    hex_string_custom(status, 4));
+
+  fprintf_filtered (file, "  exception flags        : ");
+
+  /* Precision */
+  fprintf_filtered (file, "%s ", (status & 0x0020) ? "PE" : "  ");
+  /* Underflow */
+  fprintf_filtered (file, "%s ", (status & 0x0010) ? "UE" : "  ");
+  /* Overflow */
+  fprintf_filtered (file, "%s ", (status & 0x0008) ? "OE" : "  ");
+  /* Zero Devide */
+  fprintf_filtered (file, "%s ", (status & 0x0004) ? "ZE" : "  ");
+  /* Denormalized operand */
+  fprintf_filtered (file, "%s ", (status & 0x0002) ? "DE" : "  ");
+  /* Invalid operation */
+  fprintf_filtered (file, "%s ", (status & 0x0001) ? "IE" : "  ");
+
+  fprintf_filtered (file, "\n");
+
+  fprintf_filtered (file, "  stack fault            : %s\n",
+    (status & 0x0040) ? "SF" : "  ");
+  fprintf_filtered (file, "  error summary status   : %s\n",
+    (status & 0x0080) ? "ES" : "  ");
+
+  fprintf_filtered (file, "  condition code         : ");
+
+  fprintf_filtered (file, "%s ", (status & 0x4000) ? "C3" : "  ");
+  fprintf_filtered (file, "%s ", (status & 0x0400) ? "C2" : "  ");
+  fprintf_filtered (file, "%s ", (status & 0x0200) ? "C1" : "  ");
+  fprintf_filtered (file, "%s ", (status & 0x0100) ? "C0" : "  ");
+  fprintf_filtered (file, "\n");
+
+  fprintf_filtered (file, "  top of stack (TOP)     : %d\n",
+    ((status >> 11) & 7));
 }
 
-/* Print the control word CONTROL.  */
-
+/* Print the control word. */
 static void
 print_i387_control_word (unsigned int control, struct ui_file *file)
 {
-  fprintf_filtered (file, "Control Word:        %s",
-		    hex_string_custom (control, 4));
-  fputs_filtered ("  ", file);
-  fprintf_filtered (file, " %s", (control & 0x0001) ? "IM" : "  ");
-  fprintf_filtered (file, " %s", (control & 0x0002) ? "DM" : "  ");
-  fprintf_filtered (file, " %s", (control & 0x0004) ? "ZM" : "  ");
-  fprintf_filtered (file, " %s", (control & 0x0008) ? "OM" : "  ");
-  fprintf_filtered (file, " %s", (control & 0x0010) ? "UM" : "  ");
-  fprintf_filtered (file, " %s", (control & 0x0020) ? "PM" : "  ");
+  fprintf_filtered(file, "control word             : %s\n",
+    hex_string_custom(control, 4));
 
-  fputs_filtered ("\n", file);
+  fprintf_filtered(file, "  exception masks        : ");
+
+  /* Precision */
+  fprintf_filtered (file, "%s ", (control & 0x0020) ? "PM" : "  ");
+  /* Underflow */
+  fprintf_filtered (file, "%s ", (control & 0x0010) ? "UM" : "  ");
+  /* Overflow */
+  fprintf_filtered (file, "%s ", (control & 0x0008) ? "OM" : "  ");
+  /* Zero devide */
+  fprintf_filtered (file, "%s ", (control & 0x0004) ? "ZM" : "  ");
+  /* Denormalized operand */
+  fprintf_filtered (file, "%s ", (control & 0x0002) ? "DM" : "  ");
+  /* Invalid operation */
+  fprintf_filtered (file, "%s ", (control & 0x0001) ? "IM" : "  ");
+
+  fprintf_filtered (file, "\n");
+
+  fprintf_filtered (file, "  precision control (PC) : ");
 
-  fputs_filtered ("                       PC: ", file);
   switch ((control >> 8) & 3)
-    {
+  {
     case 0:
-      fputs_filtered ("Single Precision (24-bits)\n", file);
+      fprintf_filtered (file, "24-bits (single precision)\n");
       break;
     case 1:
-      fputs_filtered ("Reserved\n", file);
+      fprintf_filtered (file, "(reserved)\n");
       break;
     case 2:
-      fputs_filtered ("Double Precision (53-bits)\n", file);
+      fprintf_filtered (file, "53-bits (double precision)\n");
       break;
     case 3:
-      fputs_filtered ("Extended Precision (64-bits)\n", file);
+      fprintf_filtered (file, "64-bits (extended precision)\n");
       break;
-    }
-      
-  fputs_filtered ("                       RC: ", file);
+  }
+
+  fprintf_filtered (file, "  rounding control (RC)  : ");
+
   switch ((control >> 10) & 3)
-    {
+  {
     case 0:
-      fputs_filtered ("Round to nearest\n", file);
+      fprintf_filtered (file, "round to nearest or even\n");
       break;
     case 1:
-      fputs_filtered ("Round down\n", file);
+      fprintf_filtered (file, "round down (towards -inf)\n");
       break;
     case 2:
-      fputs_filtered ("Round up\n", file);
+      fprintf_filtered (file, "round up (toward +inf)\n");
       break;
     case 3:
-      fputs_filtered ("Round toward zero\n", file);
+      fprintf_filtered (file, "chop (truncate toward zero)\n");
       break;
-    }
+  }
 }
 
 /* Print out the i387 floating point state.  Note that we ignore FRAME

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