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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Debugging a Debugger

48 点作者 id_ris超过 9 年前

2 条评论

userbinator超过 9 年前
<i>It&#x27;s a really powerful way to debug as you can automate much of the debugging process and do things that aren&#x27;t practical without scripting.</i><p>IMHO when debugging software needs to be automated to the point that a library needs to be written (and itself debugged), there&#x27;s an underlying problem which can&#x27;t be solved with adding more layers of complexity - as that will only introduce <i>more</i> bugs. When these bugs are in the software you&#x27;re using to debug, things can quickly take a turn for the worse.<p>Is that code really taking the user&#x27;s input (a string), getting object addresses and offsets (numbers) from that, then converting those into strings to build a command string, which then gets parsed back into numbers for the debugger to ultimately use to create a watchpoint? I think that is itself a good example of how the &quot;more code, more bugs&quot; principle can apply: all this superfluous conversion code has introduced a bug.<p>Here&#x27;s a good article about that, although it doesn&#x27;t mention the situation where the bugs you introduce end up being in the software you need to use to remove bugs...<p><a href="http:&#x2F;&#x2F;blog.codinghorror.com&#x2F;the-best-code-is-no-code-at-all&#x2F;" rel="nofollow">http:&#x2F;&#x2F;blog.codinghorror.com&#x2F;the-best-code-is-no-code-at-all...</a>
评论 #10447623 未加载
评论 #10447446 未加载
erydo超过 9 年前
He identified a bug in the function `evaluateIntegerExpression` which parses an integer literal from LLDB, erroneously always parsing in base-16.<p>But the pull request he created (<a href="https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;chisel&#x2F;pull&#x2F;117" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;chisel&#x2F;pull&#x2F;117</a>) didn&#x27;t fix that; instead it just replaced that function call with manually parsing the literal in the one specific place he was having problems with.<p>Did I miss something there? That seems like a really weird &quot;solution&quot;. Why not just fix the original function?
评论 #10447574 未加载