Commit fdcd887c authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

1. 1st launch works 2. function and format show

parent 1222ee72
var CUT_STRING_LIMIT = 20;
var debugfs_data;
function init(){
......@@ -85,9 +87,17 @@ function init(){
checked = "";
}
if (r1[j].function.length>CUT_STRING_LIMIT) cut_function = "...";
else cut_function = "";
if (r1[j].format.length>CUT_STRING_LIMIT) cut_format = "...";
else cut_format = "";
l = "<tr>";
l += " <td style='text-align:center' title='"+ttl+"'>"+r1[j].lineno+"</td>";
l += " <td style='text-align:center'><input type='checkbox' class='tp debug' "+checked+" file='"+r1[j].file+"' line='"+r1[j].lineno+"' /></td>";
l += " <td>"+r1[j].function.substr(0,20)+"...</td>";
l += " <td>"+r1[j].format.substr(0,20)+"...</td>";
l += "</tr>";
content.find("table").append(l);
}
......
......@@ -33,12 +33,12 @@ function get_control($f){
$subarr['file'] = substr($line,0,$d1);
$subarr['lineno'] = substr($line,$d1+1,($d2-1)-$d1-1);
$subarr['module'] = substr($line,$d2+1,($d3-1)-$d2);
$subarr['function'] = substr($line,$d3+1,($d4-1)-$d3);
$subarr['function'] = substr($line,$d3+1,($d4-1)-$d3-1);
$subarr['flags'] = substr($line,$d4+1,1);
$subarr['format'] = substr($line,$d5+1,-1);
if ($subarr['file']!=$oldfile){
echo "processing ".$subarr['file']."\n";
//echo "processing ".$subarr['file']."\n";
if ($oldfile!="") array_push($res,$sub);
$oldfile = $subarr['file'];
$sub = Array(
......@@ -107,9 +107,10 @@ if (($cmd=="do_nothing")||($cmd=="restore")){
if (!is_file("debugfs.json")) {
$arr = get_control($file);
print_r($arr);
//print_r($arr);
update_config(json_encode($arr));
echo "debugfs.json was missing, refresh page\n";
echo json_encode($arr);
//echo "debugfs.json was missing, refresh page\n";
}else{
$json_data = file_get_contents("debugfs.json");
//print_r(json_decode($json_data));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment