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]

Possible "by inspection" bug?


I'm not sure about this one, but it looks odd enough to point out.
The two "To:" folks have been looking at this code recently, so they
may know what's up.

In infrun.c/default_print_registers_info, most of the file seems to
write to "file".  However, near the end (where it's handling vector
registers) it switches to gdb_stdout.  Here's the snippet from
current source where gdb_stdout is used (the only uses in the file).
(I suspect it's an error, if not, it deserves a comment.)

         /* Print the register in hex.  */
         val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
                    gdb_stdout, 'x', 1, 0, Val_pretty_default);
         /* If not a vector register, print it also according to its
            natural format.  */
         if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
           {
             printf_filtered ("\t");
             val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
                        gdb_stdout, 0, 1, 0, Val_pretty_default);
           }

Donn


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