Linux调试方法
property c/c build settings buildsteps command cp ./xxxxx /xxxx 改可执行文件位置property c/cgeneral codeanalysis pathandsymbols include和sourcelocation sourcelocation里要添加链接否则不识别不能直接加文件夹必须这么添加文件夹放mylib等函数文件property c/c build settings toolsettings Intelclinker libraries 上面放文件名下面放路径库的包括中断库。这个放在程序工作路径下否则收不到 debugas选择生成debug文件的路径cat /proc/interrupts | grep Lpc 看中断ifconfig ens4f2:0 192.168.66.122 netmask 255.255.255.0 在ens4f2板卡增加一个一个ipfile import general existingptojectsintoworkspace 把文件引入eclipsegdb 可执行文件 core文件bt看段错误htop f5排序etc rc.d rc.local 防火墙关闭systemctl stop firewalldsystemctl disable firewalld加入组播 route add -net 239.10.10.11 netmask 255.255.255.255 dev enp9s0f3etc sysctl.confnet.ipv4.conf.all.rp_filter0 net.ipv4.conf.enp9s0f3.rp_filter0ps aux|grep 名字 看htop里面程序起没起 config_time.txt报错位置不对收不到中断拷贝整个文件夹不是单独这个TXT文件ifconfig enp9s0f2 inet 192.168.11.9 netmask 225.225.225.0 broadcast 192.168.11.255 改ipchmod 777 可执行文件名字增加权限 xshell中输入ifconfig查看网卡 opt pet vpx_net.sh文件改网段号 右下角图标右键选编辑连接选择需要更改的网卡ipv4设置修改为需要更改的网段 EXE执行权限不够 右键命令行窗口输入 chmod 777 man可执行程序名字取消板子写日志 在命令行里输入一下两条命令 systemctl disable rsyslog.servicesystemctl disable kdump.serviceroot下vnc文件夹有垃圾要删除 locate 文件名看所有名字含文件名的文件位置 string不能用加using namespace std .vncserver -list看当前端口号vncserver -kill :端口号chmod 777 可执行文件名while里scanf在自启动时没有命令行不生效会空跑while需要有sleep段错误为内存泄露原因 运用gdb运行程序r bt显示错误行 退出qy 可以显示程序卡死错误行数 在退出gdb后才能Killall线程 重启vnc服务systemctl restart vncserver:2.servicescp -r 文件名 root192.168.6.60:/home /var/log/messages 删除日志文件ps -ef| grep 名字chkconfig --level 2345 sshd off ssh 用户名ip 密码 远程访问 unsigned char buff 收 sudo ./可执行文件 matlab ctrl r t注释反注释 调试调试窗口内存 floorx0.5四舍五入