<p>As the topic states I would like to be have a dump of the process for the following scenarios:</p>
<ol>
<li>when a crash happens</li>
<li>when a fatal error is reported</li>
<li>when <code>os.Exit</code> is called with a non-zero value</li>
</ol>
<p>These scenarios are the hardest to make sense of if they happen e.g. in production. I would like to get the time for analysis down. So in the end I want to be able to feed the dump to <em>dwelve</em> or <em>gdb</em>.</p>
<p>The cases 2 and 3 I could easily catch by a, implementing my own fatal error reporting and b, wrapping os.Exit with some more logic. If push comes to shove I would have to call <code>gcore</code> myself.</p>
<p>Now I am wondering whether there is a already working solution similar to breakpad and crashpad for Go. Especially whether there is something which would integrate already with <em>dwelve</em>.</p>
<hr/>**评论:**<br/><br/>wheey: <pre><p>Are you maybe looking for this: <a href="https://github.com/golang/go/wiki/CoreDumpDebugging" rel="nofollow">https://github.com/golang/go/wiki/CoreDumpDebugging</a></p></pre>hell_0n_wheel: <pre><blockquote>
<p>I would like to get the time for analysis down.</p>
</blockquote>
<p>I'm being serious here: if your application doesn't crash, you spend less time analyzing it.</p>
<p>Planning for failure is a good thing, but this reads more like you're designing for failure. That's... not the best design IMO.</p>
<p>Yes, applications will do weird things, and you should program defensively and log verbosely when "weird happens"... but you shouldn't be crashing so much that you need such an elaborate design for debugging.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传