1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-24 14:17:58 +03:00

Fixes for the generated "mallocs.tcl" and "leaks.tcl" scripts generated by running tcl tests with the --malloctrace=1 option.

FossilOrigin-Name: 449799e2d5902464540e8fda53ab429e0518278dab3b17c86911759114cddea0
This commit is contained in:
dan
2022-07-16 18:08:48 +00:00
parent 02cb3ff004
commit b496eef690
4 changed files with 12 additions and 12 deletions

View File

@@ -47,7 +47,7 @@ proc populate_text_widget {db} {
set line [$db one {SELECT line FROM frame WHERE frame = $frame}]
if {$line ne ""} {
foreach {file line} [split $line :] {}
regexp {^([^:]*):([0-9]*)} $line -> file line
set content [$db one "SELECT content FROM file WHERE name = '$file'"]
$::O(text) delete 0.0 end

View File

@@ -2171,13 +2171,13 @@ proc memdebug_log_sql {filename} {
}
set escaped "BEGIN; ${tbl}${tbl2}${tbl3}${sql} ; COMMIT;"
set escaped [string map [list "{" "\\{" "}" "\\}"] $escaped]
set escaped [string map [list "{" "\\{" "}" "\\}" "\\" "\\\\"] $escaped]
set fd [open $filename w]
puts $fd "set BUILTIN {"
puts $fd $escaped
puts $fd "}"
puts $fd {set BUILTIN [string map [list "\\{" "{" "\\}" "}"] $BUILTIN]}
puts $fd {set BUILTIN [string map [list "\\{" "{" "\\}" "}" "\\\\" "\\"] $BUILTIN]}
set mtv [open $::testdir/malloctraceviewer.tcl]
set txt [read $mtv]
close $mtv