Author: pfg
Date: Fri May  6 20:28:28 2016
New Revision: 299194
URL: https://svnweb.freebsd.org/changeset/base/299194

Log:
  Revert r298938: Change x/a to work similar to gdb.
  
  This badly breaks x/ia: ddb and gdb syntax are quite different and it is
  unclear if they can be reconciled.

Modified:
  head/sys/ddb/db_examine.c

Modified: head/sys/ddb/db_examine.c
==============================================================================
--- head/sys/ddb/db_examine.c   Fri May  6 19:18:44 2016        (r299193)
+++ head/sys/ddb/db_examine.c   Fri May  6 20:28:28 2016        (r299194)
@@ -89,6 +89,15 @@ db_examine(db_addr_t addr, char *fmt, in
                    case 'g':
                        size = 8;
                        break;
+                   case 'a':   /* address */
+                       size = sizeof(void *);
+                       /* always forces a new line */
+                       if (db_print_position() != 0)
+                           db_printf("\n");
+                       db_prev = addr;
+                       db_printsym(addr, DB_STGY_ANY);
+                       db_printf(":\t");
+                       break;
                    default:
                        if (db_print_position() == 0) {
                            /* Print the address. */
@@ -99,18 +108,6 @@ db_examine(db_addr_t addr, char *fmt, in
 
                        width = size * 4;
                        switch (c) {
-                           case 'a':   /* address */
-                               size = sizeof(void *);
-                               value = db_get_value(addr, size, TRUE);
-                               addr += size;
-                               db_printsym(value, DB_STGY_ANY);
-                               break;
-                           case 'p':
-                               size = sizeof(void *);
-                               value = db_get_value(addr, size, TRUE);
-                               addr += size;
-                               db_printf("%p", (void *)value);
-                               break;
                            case 'r':   /* signed, current radix */
                                value = db_get_value(addr, size, true);
                                addr += size;
@@ -176,7 +173,7 @@ db_examine(db_addr_t addr, char *fmt, in
                            default:
                                break;
                        }
-                       if (db_print_position() != 0 || c == 'a' || c == 'p')
+                       if (db_print_position() != 0)
                            db_end_line(1);
                        break;
                }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to