TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Combining the power of gdb and valgrind

100 点作者 jlemoine大约 11 年前

4 条评论

gjulianm大约 11 年前
I just discovered a few days ago that gdb + valgrind integration. It&#x27;s awesome for debugging and finding weird memory errors. A neat thing that isn&#x27;t explained in the article is that valgrind automatically sends SIGTRAP to gdb whenever there are invalid write&#x2F;reads (even when those wouldn&#x27;t cause a segfault), so the program stops and you can inspect the state (get backtrace, jump to different frames with &quot;frame #&quot; and inspect variable values) to detect quickly what&#x27;s causing the error.<p>By the way, if you&#x27;re really interested in learning all things gdb, the GNU GDB Manual [1] is really great and detailed, including a PDF version.<p>[1] <a href="http://www.gnu.org/software/gdb/documentation/" rel="nofollow">http:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;gdb&#x2F;documentation&#x2F;</a>
jmspring大约 11 年前
Great article. I&#x27;ve recently had to walk some more junior engineers through these tools. I would through in Electric Fence as one to consider.
评论 #7500533 未加载
rramsden大约 11 年前
Wanted to look more into valgrind but their website is down :(
heinrich5991大约 11 年前
Kind of offtopic, but the background really distracts me, I think it has too much detail.
评论 #7498519 未加载