This is the mail archive of the gdb@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: Minor typo in frame.c debug printing


Hi guys,

There is a minor typo in frame_register_unwind line 549 -

--- frame.c 26 Jun 2003 02:15:22 -0000 1.1.1.2
+++ frame.c 2 Jul 2003 17:41:22 -0000
@@ -543,13 +543,13 @@
       fprintf_unfiltered (gdb_stdlog, " *bufferp=");
       if (bufferp == NULL)
  fprintf_unfiltered (gdb_stdlog, "<NULL>");
       else
  {
    int i;
-   const char *buf = bufferp;
+   const unsigned char *buf = bufferp;
    fprintf_unfiltered (gdb_stdlog, "[");
    for (i = 0; i < register_size (current_gdbarch, regnum); i++)
      fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
    fprintf_unfiltered (gdb_stdlog, "]");
  }
       fprintf_unfiltered (gdb_stdlog, " }\n");

Otherwise when the char gets promoted to an int it may get sign-extended
(depending on the host architecture).

Are your sources up-to-date? I thought I just fixed this.


Andrew



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