1. modify asotr_csv parser: ASOTR csv files are being supplemented if new data appears. 2. Fix bug in MUP command data parser - now all commands in MUP are decoded.
This commit is contained in:
143
asotr_csv/.vimspector.json
Normal file
143
asotr_csv/.vimspector.json
Normal file
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"adapters": {
|
||||
"custom-codelldb": {
|
||||
"extends": "CodeLLDB",
|
||||
"command": [
|
||||
"$HOME/Development/vimspector/CodeLLDB/build/adapter/codelldb",
|
||||
"--port", "${unusedLocalPort}"
|
||||
]
|
||||
},
|
||||
"CodeLLDB - StopOnEntry": {
|
||||
"extends": "custom-codelldb",
|
||||
"name": "CoHostingLLDB"
|
||||
},
|
||||
"custom-cpptools": {
|
||||
"extends": "vscode-cpptools",
|
||||
"command": [
|
||||
"$HOME/Development/vimspector/MIEngine/bin/Debug/vscode/OpenDebugAD7"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"Rust debug (gdb)": {
|
||||
"adapter": "vscode-cpptools",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/target/debug/${workspaceRootBasename}",
|
||||
"args": ["-d", "/home/danila/Danila/work/MVN/flight/data/"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "rust-gdb",
|
||||
"preLaunchTask": {
|
||||
"type": "shell",
|
||||
"command": "cargo build"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CodeLLDB-custom": {
|
||||
"adapter": "custom-codelldb",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/test"
|
||||
}
|
||||
},
|
||||
"CodeLLDB": {
|
||||
"adapter": "CodeLLDB",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"expressions": "native",
|
||||
"program": "${workspaceRoot}/test"
|
||||
}
|
||||
},
|
||||
"CodeLLDB-StopOnEntryFalse": {
|
||||
"extends": "CodeLLDB",
|
||||
"adapter": "CodeLLDB - StopOnEntry",
|
||||
"configuration": {
|
||||
"stopOnEntry": false
|
||||
}
|
||||
},
|
||||
"CodeLLDB-StopOnEntryTrue": {
|
||||
"extends": "CodeLLDB-StopOnEntryFalse",
|
||||
"configuration": {
|
||||
"stopOnEntry": true
|
||||
}
|
||||
},
|
||||
"lldb-vscode": {
|
||||
"adapter": "lldb-vscode",
|
||||
"variables": {
|
||||
"BUILDME": {
|
||||
"shell": "g++ -o ${workspaceRoot}/test -g -std=c++17 ${workspaceRoot}/test_c.cpp"
|
||||
}
|
||||
},
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/test",
|
||||
"stopAtEntry": true
|
||||
}
|
||||
},
|
||||
"cpptools (lldb)": {
|
||||
"adapter": "vscode-cpptools",
|
||||
"variables": {
|
||||
"BUILDME": {
|
||||
"shell": "g++ -o ${workspaceRoot}/test -g -std=c++17 ${workspaceRoot}/test_c.cpp"
|
||||
},
|
||||
"arch": {
|
||||
"shell": "uname -m"
|
||||
}
|
||||
},
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/test",
|
||||
"stopAtEntry": true,
|
||||
"MIMode": "lldb",
|
||||
"MIDebuggerPath": "$HOME/.vim/vimspector-conf/gadgets/macos/vscode-cpptools/debugAdapters/lldb-mi/bin/lldb-mi",
|
||||
"logging": {
|
||||
"engineLogging": true
|
||||
},
|
||||
"targetArchitecture": "${arch}"
|
||||
}
|
||||
},
|
||||
"cpptools (gdb)": {
|
||||
"adapter": "vscode-cpptools",
|
||||
"variables": {
|
||||
"BUILDME": {
|
||||
"shell": "echo ${workspaceRoot}/make all"
|
||||
}
|
||||
},
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/bin/main_debug",
|
||||
"stopAtEntry": true,
|
||||
"MIMode": "gdb"
|
||||
}
|
||||
},
|
||||
"cpptools-attach": {
|
||||
"extends": "cpptools (lldb)",
|
||||
"configuration": {
|
||||
"request": "attach"
|
||||
},
|
||||
"breakpoints": {
|
||||
"exception": {
|
||||
"cpp_throw": "",
|
||||
"cpp_catch": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"CodeLLDB-attach": {
|
||||
"extends": "CodeLLDB",
|
||||
"configuration": {
|
||||
"request": "attach",
|
||||
"pid": "${PickProcess(\"test\")}"
|
||||
},
|
||||
"breakpoints": {
|
||||
"exception": {
|
||||
"cpp_throw": "",
|
||||
"cpp_catch": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
use clap::{Parser};
|
||||
|
||||
pub mod asotr_data {
|
||||
use std::{fs::File, io::Read};
|
||||
use std::{fs::File, fs::read_to_string, io::Read};
|
||||
use byteorder::{LittleEndian, ReadBytesExt};
|
||||
use chrono::{DateTime, Utc};
|
||||
use std::time::{SystemTime, UNIX_EPOCH, Duration};
|
||||
@@ -57,7 +57,6 @@ pub mod asotr_data {
|
||||
date: String,
|
||||
time: String,
|
||||
data_type: AsotrDataType,
|
||||
// kit: u8,
|
||||
}
|
||||
|
||||
impl AsotrDataDesc {
|
||||
@@ -113,13 +112,30 @@ pub mod asotr_data {
|
||||
return Ok(out);
|
||||
}
|
||||
|
||||
|
||||
pub fn read_csv_data_(fname: &str) -> Result<Vec<String>, String> {
|
||||
match read_to_string(fname) {
|
||||
Ok(content) => {
|
||||
let mut result = Vec::new();
|
||||
for line in content.lines().skip(1) {
|
||||
result.push(line.to_string())
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
Err(err) => Err(err.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_data_dir(dir: &str, disp: bool) -> Result<(), String> {
|
||||
let mut data: Vec<String> = Vec::new();
|
||||
|
||||
println!("parse data from directory: {}", dir);
|
||||
for (i, (pattern, fname)) in patterns_fnames_csv_data.iter().enumerate() {
|
||||
let mut data1 = read_csv_data_(fname)?;
|
||||
let files = find_files_regex(dir, pattern)?;
|
||||
|
||||
data.append(&mut data1);
|
||||
|
||||
for elem in files {
|
||||
data.push(read_data(elem)?);
|
||||
}
|
||||
@@ -213,13 +229,6 @@ pub mod asotr_data {
|
||||
msg_prev))
|
||||
};
|
||||
|
||||
// let _kit = filename[30..32].parse::<u8>();
|
||||
// let kit = match &_kit {
|
||||
// Ok(data) => data,
|
||||
// Err(msg) => { return Err(format!("{}: expected digits in asotr kit part ({})",
|
||||
// msg_prev, msg)); }
|
||||
// };
|
||||
|
||||
let _time_str_mks = fname[11..14].parse::<u32>();
|
||||
let time_mks = match &_time_str_mks {
|
||||
Ok(data) => data,
|
||||
@@ -300,6 +309,8 @@ pub mod asotr_data {
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"rustc_fingerprint":14808889899039181664,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\danil\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.87.0 (17067e9ac 2025-05-09)\nbinary: rustc\ncommit-hash: 17067e9ac6d7ecb70e50f92c1944e545188d2359\ncommit-date: 2025-05-09\nhost: x86_64-pc-windows-msvc\nrelease: 1.87.0\nLLVM version: 20.1.1\n","stderr":""}},"successes":{}}
|
||||
{"rustc_fingerprint":2742313010855374649,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.83.0 (90b35a623 2024-11-26)\nbinary: rustc\ncommit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\ncommit-date: 2024-11-26\nhost: x86_64-unknown-linux-gnu\nrelease: 1.83.0\nLLVM version: 19.1.1\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/danila/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
|
||||
Reference in New Issue
Block a user