您在诊断C ++应用程序方面的经验? [英] Your experiences with diagnosing C++ applications?

查看:66
本文介绍了您在诊断C ++应用程序方面的经验?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在撰写一篇关于诊断错误和分析更大的本机C ++应用程序行为的文章。场景大致如下:





  • 应用程序在生产环境中运行稳定数小时或数天。
  • 软件由多个进程组成,主要是本机C ++。其中一些是高度多线程的。
  • 进程之间有不同的通信接口。
  • 测试在生产系统上执行(没有IDE等)。
  • 生产系统是一个Windows系统(不确定这个限制)
  • I am working on an article about diagnosing errors and analysing behavior of larger native C++ applications. The scenario would roughly look like this:


    • Application runs stable for hours or days in production-like environment.
    • Software consists of several processes, mostly native C++. Some of them are highly multi-threaded.
    • There are different communication interfaces between processes.
    • Tests are executed on production system (no IDE, etc.).
    • Production system is a Windows system (not sure about this restriction)


      • 崩溃时的应用程序转储
      • - 当您有权访问调试符号文件时分析转储

        - 如果没有它们怎么办调试符号?

      • 记录:程序流程,错误,意外事件
      • 性能监控
      • - 内存

        - 句柄

        - 响应时间长的进程间/ IO调用

      • 远程调试(如果可能)

      • Application dumps on crash
      • - Analyse dumps, when you have access to debug symbol files
        - What to do with them without debug symbols?
      • Logging: programm flow, errors, unexpected events
      • Performance monitoring
      • - Memory
        - Handles
        - Inter-process / IO calls with long response times
      • Remote debugging (if possible)

      推荐答案

      引用:

      您怎么看?您的经历是什么?我错过了一个重要的概念或方法吗?你有特殊的工具推荐(或厌恶^^)吗?

      What do you think, what are your experiences? Did I miss an important concept or approach? Do you have special tool recommendations (or aversions ^^)?

      我的经验是:

      当我处理C或C ++时,我在报价级别有一个特殊的行为。

      如果我被要求构建应用程序,我会正常报价并乘以2.

      如果我被要求调试另一个应用程序,我会正常报价并乘以3。 br />


      所有这一切都是因为C ++在内核分配方面存在微妙的手动和自动(以及介于其间的任何内容)混合的核心。

      My experience is:
      When I deal with C or C++, I have a special behavior at quotation level.
      If I am requested to build an app, I do normal quotation and multiply by 2.
      If I am requested to debug another one's app, I do normal quotation and multiply by 3.

      All this because C++ is flawed to the core with the subtle mix of manual and automatic (and anything in between) memory allocation.


      这篇关于您在诊断C ++应用程序方面的经验?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆