发文章
发文工具
撰写
网文摘手
文档
视频
思维导图
随笔
相册
原创同步助手
其他工具
图片转文字
文件清理
AI助手
留言交流
问题现象
直接执行程序一切正常,但使用gdb启动程序时,即使没有任何断点,发现tcp connect 总是失败,原因是(interrupted system call)。抓包发现主机会发送FIN或者RST断开这条连接。
程序是一个多线程程序,而且connect的线程不是主线程。
问题解决
设置gdb 为non-stop 模式,如此可以完美解决
set target-async 1set pagination offset non-stop on
来自: 浪子小新 > 《linux》
0条评论
发表
请遵守用户 评论公约
Debugging with GDB学习记录(三)
9、info breakpoints [n ...] info break [n ...]打印所有现存的breakpoints、watchpoints和catchpoints表,参数n指明仅打印某个的信息Type : breakpoint、watchpoint或catchpointDispositio...
终止线程的三种方法
终止线程的三种方法。3. 使用interrupt方法中断线程。// 延迟50秒 } catch (InterruptedException e) { System.out.println(e.getMessage()); } } public static void main(String[] args) throws Exc...
GDB调试方法:查看变量
GDB调试方法:查看变量基本的命令: p.使用这个命令,还可以查看结构体的各元素值。例:p *pstData;复杂的命令。使用 dislpaly 命令,自动显示变量的值。使用 command 命令,执行更复杂的操作,可以执行...
线程中断以及线程中断引发的那些问题,你值得了解
线程中断以及线程中断引发的那些问题,你值得了解。Thread.isInterrupted()返回true,对于可取消的阻塞状态中的线程,例如等待在这些函...
双网卡错误 Connection activation failed Device not managed by
Add Default Net Managerchkconfig network onStop NetworkManager firstservice NetworkManager stopand then start Default Managerservice network restartor you can change it easy:system-config...
jetty虚拟目录
Java 中调用oracle 的过程
import java.sql.*;// You need to import the java.sql package to use JDBCimport java.sql.*;public static void main(String args[]) throws SQLException, IOException { // Load...
多线程调试
(gdb) info threads 4 Thread 0x7ffff5c87910 (LWP 2764) op::operator() (this=0x605618) at nonstop.cpp:14 2 Thread 0x7ffff6c89910 (LWP 2762) op::operator() (this=0x605118) at nonstop.cpp...
Linux内核调试方法总结之coredump
分析core dump是Linux应用程序调试的一种有效方式,像内核调试抓取ram dump一样,core dump主要是获取应用程序崩溃时的现场信息,如程序...
微信扫码,在手机上查看选中内容