Fix PR threads/19422 - show which thread caused stop
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index 5dddf4e892d5c717c26efea0e6f8b12d6fd52444..8acf44131735c9702ee42a4998e7cee9d8bef96d 100644 (file)
@@ -1,6 +1,6 @@
 /* Print values for GNU debugger GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -346,7 +346,7 @@ float_type_from_length (struct type *type)
    supported at this level.  */
 
 void
-print_scalar_formatted (const void *valaddr, struct type *type,
+print_scalar_formatted (const gdb_byte *valaddr, struct type *type,
                        const struct value_print_options *options,
                        int size, struct ui_file *stream)
 {
@@ -1543,11 +1543,21 @@ display_command (char *arg, int from_tty)
   newobj->exp = expr;
   newobj->block = innermost_block;
   newobj->pspace = current_program_space;
-  newobj->next = display_chain;
   newobj->number = ++display_number;
   newobj->format = fmt;
   newobj->enabled_p = 1;
-  display_chain = newobj;
+  newobj->next = NULL;
+
+  if (display_chain == NULL)
+    display_chain = newobj;
+  else
+    {
+      struct display *last;
+
+      for (last = display_chain; last->next != NULL; last = last->next)
+       ;
+      last->next = newobj;
+    }
 
   if (from_tty)
     do_one_display (newobj);
This page took 0.024811 seconds and 4 git commands to generate.