gdb/
[deliverable/binutils-gdb.git] / gdb / tracepoint.c
index 2d2c3bdffb45c9aa8d6e62143d09c5d79a14bd5b..bb3e3e80033d8840e34d6ca0f05c9d2069637c31 100644 (file)
@@ -1,7 +1,7 @@
 /* Tracing functionality for remote targets in custom GDB protocol
 
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -38,6 +38,7 @@
 #include "dictionary.h"
 #include "observer.h"
 #include "user-regs.h"
+#include "valprint.h"
 
 #include "ax.h"
 #include "ax-gdb.h"
@@ -67,7 +68,6 @@
 extern void (*deprecated_readline_begin_hook) (char *, ...);
 extern char *(*deprecated_readline_hook) (char *);
 extern void (*deprecated_readline_end_hook) (void);
-extern int addressprint;       /* Print machine addresses? */
 
 /* GDB commands implemented in other modules:
  */  
@@ -434,9 +434,11 @@ trace_command (char *arg, int from_tty)
 static void
 trace_mention (struct tracepoint *tp)
 {
+  struct value_print_options opts;
   printf_filtered ("Tracepoint %d", tp->number);
 
-  if (addressprint || (tp->source_file == NULL))
+  get_user_print_options (&opts);
+  if (opts.addressprint || (tp->source_file == NULL))
     {
       printf_filtered (" at ");
       printf_filtered ("%s", paddress (tp->address));
@@ -467,12 +469,12 @@ tracepoints_info (char *tpnum_exp, int from_tty)
   ALL_TRACEPOINTS (t)
     if (tpnum == -1 || tpnum == t->number)
     {
-      extern int addressprint; /* Print machine addresses?  */
-
+      struct value_print_options opts;
+      get_user_print_options (&opts);
       if (!found_a_tracepoint++)
        {
          printf_filtered ("Num Enb ");
-         if (addressprint)
+         if (opts.addressprint)
            {
              if (gdbarch_addr_bit (current_gdbarch) <= 32)
                printf_filtered ("Address    ");
@@ -482,7 +484,7 @@ tracepoints_info (char *tpnum_exp, int from_tty)
          printf_filtered ("PassC StepC What\n");
        }
       strcpy (wrap_indent, "                           ");
-      if (addressprint)
+      if (opts.addressprint)
        {
          if (gdbarch_addr_bit (current_gdbarch) <= 32)
            strcat (wrap_indent, "           ");
@@ -492,7 +494,7 @@ tracepoints_info (char *tpnum_exp, int from_tty)
 
       printf_filtered ("%-3d %-3s ", t->number,
                       t->enabled_p ? "y" : "n");
-      if (addressprint)
+      if (opts.addressprint)
        {
          char *tmp;
 
This page took 0.023755 seconds and 4 git commands to generate.