Author: jdevlieghere Date: Thu Jul 25 15:17:08 2019 New Revision: 367065 URL: http://llvm.org/viewvc/llvm-project?rev=367065&view=rev Log: [Tablegen] Fix issues caused by incorrect escaping.
The printEscapedString would escape newlines by their ASCII values instead of prefixing them with a `\`. Remove the escaping logic and escape the strings in the definition file. Modified: lldb/trunk/include/lldb/Core/Properties.td lldb/trunk/utils/TableGen/LLDBPropertyDefEmitter.cpp Modified: lldb/trunk/include/lldb/Core/Properties.td URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Properties.td?rev=367065&r1=367064&r2=367065&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Properties.td (original) +++ lldb/trunk/include/lldb/Core/Properties.td Thu Jul 25 15:17:08 2019 @@ -162,7 +162,7 @@ let Definition = "process" in { Desc<"Disable reading and caching of memory in fixed-size units.">; def ExtraStartCommand: Property<"extra-startup-command", "Array">, DefaultUnsignedValue<16>, - Desc<"A list containing extra commands understood by the particular process plugin used. For instance, to turn on debugserver logging set this to \"QSetLogging:bitmask=LOG_DEFAULT;\"">; + Desc<"A list containing extra commands understood by the particular process plugin used. For instance, to turn on debugserver logging set this to 'QSetLogging:bitmask=LOG_DEFAULT;">; def IgnoreBreakpointsInExpressions: Property<"ignore-breakpoints-in-expressions", "Boolean">, Global, DefaultTrue, @@ -251,11 +251,11 @@ let Definition = "debugger" in { Desc<"If true all confirmation prompts will receive their default reply.">; def DisassemblyFormat: Property<"disassembly-format", "FormatEntity">, Global, - DefaultStringValue<"{${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }${addr-file-or-load}{ <${function.concrete-only-addr-offset-no-padding}>}: ">, + DefaultStringValue<"{${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\\\\n}{${function.changed}\\\\n{${module.file.basename}`}{${function.name-without-args}}:\\\\n}{${current-pc-arrow} }${addr-file-or-load}{ <${function.concrete-only-addr-offset-no-padding}>}: ">, Desc<"The default disassembly format string to use when disassembling instruction sequences.">; def FrameFormat: Property<"frame-format", "FormatEntity">, Global, - DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\n">, + DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">, Desc<"The default frame format string to use when displaying stack frame information for threads.">; def NotiftVoid: Property<"notify-void", "Boolean">, Global, @@ -310,11 +310,11 @@ let Definition = "debugger" in { Desc<"The maximum number of columns to use for displaying text.">; def ThreadFormat: Property<"thread-format", "FormatEntity">, Global, - DefaultStringValue<"thread #${thread.index}: tid = ${thread.id%tid}{, ${frame.pc}}{ ${module.file.basename}{`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{, name = ${ansi.fg.green}'${thread.name}'${ansi.normal}}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\nReturn value: ${thread.return-value}}{\nCompleted expression: ${thread.completed-expression}}\n">, + DefaultStringValue<"thread #${thread.index}: tid = ${thread.id%tid}{, ${frame.pc}}{ ${module.file.basename}{`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{, name = ${ansi.fg.green}'${thread.name}'${ansi.normal}}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\\\\nReturn value: ${thread.return-value}}{\\\\nCompleted expression: ${thread.completed-expression}}\\\\n">, Desc<"The default thread format string to use when displaying thread information.">; def ThreadStopFormat: Property<"thread-stop-format", "FormatEntity">, Global, - DefaultStringValue<"thread #${thread.index}{, name = '${thread.name}'}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\nReturn value: ${thread.return-value}}{\nCompleted expression: ${thread.completed-expression}}\n">, + DefaultStringValue<"thread #${thread.index}{, name = '${thread.name}'}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\\\\nReturn value: ${thread.return-value}}{\\\\nCompleted expression: ${thread.completed-expression}}\\\\n">, Desc<"The default thread format string to use when displaying thread information as part of the stop display.">; def UseExternalEditor: Property<"use-external-editor", "Boolean">, Global, @@ -346,7 +346,7 @@ let Definition = "debugger" in { Desc<"If true, LLDB will automatically escape non-printable and escape characters when formatting strings.">; def FrameFormatUnique: Property<"frame-format-unique", "FormatEntity">, Global, - DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-without-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\n">, + DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-without-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">, Desc<"The default frame format string to use when displaying stack frameinformation for threads from thread backtrace unique.">; } Modified: lldb/trunk/utils/TableGen/LLDBPropertyDefEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/utils/TableGen/LLDBPropertyDefEmitter.cpp?rev=367065&r1=367064&r2=367065&view=diff ============================================================================== --- lldb/trunk/utils/TableGen/LLDBPropertyDefEmitter.cpp (original) +++ lldb/trunk/utils/TableGen/LLDBPropertyDefEmitter.cpp Thu Jul 25 15:17:08 2019 @@ -82,7 +82,7 @@ static void emitProperty(Record *Propert if (hasDefaultStringValue) { if (auto D = Property->getValue("DefaultStringValue")) { OS << "\""; - llvm::printEscapedString(D->getValue()->getAsUnquotedString(), OS); + OS << D->getValue()->getAsUnquotedString(); OS << "\""; } else { OS << "\"\""; @@ -102,7 +102,7 @@ static void emitProperty(Record *Propert // Emit the property description. if (auto D = Property->getValue("Description")) { OS << "\""; - llvm::printEscapedString(D->getValue()->getAsUnquotedString(), OS); + OS << D->getValue()->getAsUnquotedString(); OS << "\""; } else { OS << "\"\""; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits