Source information for systemlib.php for use in debugging.
The debugger can only hit breakpoints and list source lines for code lines that have an entry in the byte code repository. In order to make systemlib.php debuggable, it needs an entry. A customized routine has been created for doing this since there is no actual source file available. Also, special case logic is needed to list the source file during debugging.
Esse commit está contido em:
@@ -112,9 +112,6 @@ void ProcessInit() {
|
||||
RuntimeOption::EvalAllowHhas = true;
|
||||
|
||||
Transl::TargetCache::requestInit();
|
||||
|
||||
String currentDir = g_vmContext->getCwd();
|
||||
|
||||
string hhas;
|
||||
string slib = get_systemlib(&hhas);
|
||||
|
||||
|
||||
@@ -349,6 +349,9 @@ bool CmdList::onServer(DebuggerProxy &proxy) {
|
||||
}
|
||||
}
|
||||
RuntimeOption::WarningFrequency = savedWarningFrequency;
|
||||
if (!m_code && m_file == "systemlib.php") {
|
||||
m_code = get_systemlib();
|
||||
}
|
||||
return proxy.sendToClient((DebuggerCommand*)this);
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ Unit* compile_string(const char* s, size_t sz, const char* fname) {
|
||||
int out_len;
|
||||
md5 = MD5(string_md5(s, sz, false, out_len));
|
||||
|
||||
Unit* u = Repo::get().loadUnit("", md5);
|
||||
Unit* u = Repo::get().loadUnit(fname ? fname : "", md5);
|
||||
if (u != nullptr) {
|
||||
return u;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
$h = new SplMaxHeap();
|
||||
@@ -0,0 +1,14 @@
|
||||
Program %s/list.php loaded. Type '[r]un' or '[c]ontinue' to go.
|
||||
step
|
||||
Break on line 2 of %s/list.php
|
||||
1 <?php
|
||||
2 $h = new SplMaxHeap();
|
||||
3 (END)
|
||||
|
||||
step
|
||||
Break at SplHeap::__construct() on line %d of systemlib.php
|
||||
%d */
|
||||
%d public function __construct() {}
|
||||
%d
|
||||
|
||||
quit
|
||||
@@ -0,0 +1,3 @@
|
||||
step
|
||||
step
|
||||
quit
|
||||
Referência em uma Nova Issue
Bloquear um usuário