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]

set prompt-escape-character


More -Wformat-nonliteral suprizes. In trying to understand the "top.c" warnings from:

     /* FIXME: how to protect GDB from crashing
        from bad user-supplied format string? */
     sprintf (outp, fmt[0] == 0 ? default_fmt : fmt,
              tmp);

I discovered a new feature:

(top-gdb) set prompt-escape-char 0x25
(top-gdb) set prompt PC=0x%0x%$pc
PC=0x1802f68

Perhaps it could be change do use the printf code vis:
	set prompt "0x%x ", $pc

Anyway, Michael, was there any doco on this? I can't find anything.

Andrew


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