Changeset da79d0fd in mainline for src/debug/print.c


Ignore:
Timestamp:
2005-05-13T20:51:40Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
244f284
Parents:
f2ffad4
Message:

Add %P and %p formatters to printf for printing pointers in maximum bit width.
Add %Q and %q formatters to printf for printing 64-bit integers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/debug/print.c

    rf2ffad4 rda79d0fd  
    111111 *      and printed as a NULL terminated string.
    112112 * c    The next variant argument is treated as a single char.
     113 * p    The next variant argument is treated as a maximum
     114 *      bit-width integer with respect to architecture
     115 *      and printed in full hexadecimal width.
     116 * P    As with 'p', but '0x' is prefixed.
     117 * q    The next variant argument is treated as a 64b integer
     118 *      and printed in full hexadecimal width.
     119 * Q    As with 'q', but '0x' is prefixed.
    113120 * l    The next variant argument is treated as a 32b integer
    114121 *      and printed in full hexadecimal width.
     
    170177                                 * Hexadecimal conversions with fixed width.
    171178                                 */
     179                                case 'P':
     180                                        print_str("0x");
     181                                case 'p':
     182                                        print_fixed_hex(va_arg(ap, __native), sizeof(__native));
     183                                        goto loop;
     184
     185                                case 'Q':
     186                                        print_str("0x");
     187                                case 'q':
     188                                        print_fixed_hex(va_arg(ap, __native), INT64);
     189                                        goto loop;
     190
    172191                                case 'L':
    173192                                        print_str("0x");
Note: See TracChangeset for help on using the changeset viewer.