Get stack trace of a crash on Windows without installing Visual Studio? (C++)

I have an C++ application, that crashes on a computer of some person on the other end of the world. There's no way for me to simulate it or get the same computer. The person is no developer, so I cannot really ask him to install Visual Studio or something. I have pretty deep debug logs, but they didn't reveal anything usable. Is there a tool, that could generate the stack trace of th

在不安装Visual Studio的情况下获取Windows崩溃的堆栈跟踪? (C ++)

我有一个C ++应用程序,在世界另一端的某个人的计算机上崩溃。 我无法模拟它或获得同一台计算机。 这个人不是开发人员,所以我不能要求他安装Visual Studio或其他东西。 我有非常深的调试日志,但他们没有透露任何可用的东西。 有没有一种工具可以在崩溃时生成应用程序的堆栈跟踪? 这种东西在OSX内部可用,但似乎Windows没有它。 你可以使用procdump。 它可以设置为调试器来自动创建崩溃进程的转储。 Procdump是Sysi

Does instantiating a template instantiate its static data members?

关于显式实例化(当模板在头文件中声明并在cpp文件中定义时使用IIRC,否则链接器在其他位置使用时无法找到它),如果模板有静态成员变量,将显式实例化还实例化并创建静态成员变量? If you explicitly instantiate a class template, all non-template members will be instantiated, including static data members as long as they also have a definition. For example: template <typename T> struct foo { stat

实例化模板是否实例化其静态数据成员?

关于显式实例化(当模板在头文件中声明并在cpp文件中定义时使用IIRC,否则链接器在其他位置使用时无法找到它),如果模板有静态成员变量,将显式实例化还实例化并创建静态成员变量? 如果您明确实例化类模板,则所有非模板成员都将被实例化,包括static数据成员,只要它们也具有定义。 例如: template <typename T> struct foo { static int static_data; void non_template_member() {} template <typen

How to show all elements in dynamic stack and queue (c++)

i need to show all elements of a stack and queue, using static structures i used a recursive function, but with dynamic it doesnt works well at all. When i use the functions, it shows the elements correctly, but after that, whatever i do, the program crashes. Also, in order to do the print(), a requeriment is that it suppose that i can only have acces to the top, so if i show the top, i cant

如何显示动态堆栈和队列中的所有元素(c ++)

我需要显示堆栈和队列的所有元素,使用静态结构我使用了递归函数,但是动态的它根本不起作用。 当我使用函数时,它会正确显示元素,但在此之后,无论我做什么,程序都会崩溃。 此外,为了执行print(),一个请求是它假设我只能访问顶端,所以如果我显示顶端,我不能看到前一个节点,除非我弹出当前顶端,然后显示新的顶端。 这是动态堆栈的代码: class Person{ public: string nombre,weight; Perso

c++ Implementation of a combined queue/stack

For my latest homework assignment I'm supposed to implement a "quack" which is the combination of a circular queue and a stack. Right now, I'm trying to wrap my head around the first two functions, pushFront, and pushBack. Here's an example of how they work. pushFront(a) [a-----] pushFront(b) [a----b] Conversely, if pushBack is called first, it needs to place the ite

c ++实现组合队列/堆栈

对于我最近的家庭作业,我应该实现一个“嘎嘎”,它是循环队列和堆栈的组合。 现在,我试图围绕前两个函数,pushFront和pushBack。 这是他们如何工作的一个例子。 pushFront(a)[a -----] pushFront(b)[a ---- b] 相反,如果首先调用pushBack,则需要将该项目放置在数组的第一个元素中,然后再移回。 pushBack(a)[a -----] pushBack(b)[ab ----] 这是我困惑的地方: 1.)使用模算术将项目[0]的前端包装到项

Queues and Stacks and References

I'm getting a segfault on an issue having to do with getting references to the top elements in queues and stacks. I'll focus on the stack here. I want to determine if the segfault occurs because of improper syntax or due to some other reason in the code. When i pop the top element of stack (order) of type path, i set a pointer to it. *square=order.top();//I want square to point to th

队列和堆栈和引用

我遇到了一个关于获取队列和堆栈中顶层元素的引用的问题。 我将着重讨论这里的堆栈。 我想确定是因为语法不正确还是由于代码中的其他原因而发生段错误。 当我弹出类型路径的堆栈(顺序)的顶部元素时,我设置了一个指向它的指针。 *square=order.top();//I want square to point to the path element so I can access it's details 请记住,* square在此之前指向另一个类型路径变量。 然后我通常最终将它弹出堆栈,但如

Convert a queue to the stack?

I have a queue with n elements in it and the front is at 0 . I need to create a stack of these numbers with 0 at the top. It can only be done with EnQueue, DeQueue, Push, and Pop, and constant storage. I dont need an answer so much as an idea of how I could approach this problem. Please don't answer this for me, but just try to understand I'm new at programming and could just use an

将队列转换为堆栈?

我有一个队列中有n个元素,前面是0 。 我需要在顶部创建一个0的堆栈。 它只能通过EnQueue,DeQueue,Push和Pop以及常量存储来完成。 我不需要一个答案,就像我可以如何解决这个问题一样。 请不要为我回答这个问题,但是试着去了解我在编程方面的新知识,并且可以仅仅用一个想法来说明这可以做什么。 这是一种类似河内的方法吗? 这是否只使用恒定的存储空间? 这不是作业,我只需要一些关于如何进行的建议。 我的第

Why can't we allocate dynamic memory on the stack?

Allocating stuff on the stack is awesome because than we have RAII and don't have to worry about memory leaks and such. However sometimes we must allocate on the heap: If the data is really big (recommended) - because the stack is small. If the size of the data to be allocated is only known at runtime (dynamic allocation). Two questions: Why can't we allocate dynamic memory (ie m

为什么我们不能在堆栈上分配动态内存?

在堆栈上分配内容非常棒,因为我们拥有RAII,而且不必担心内存泄漏等问题。 但有时我们必须在堆上分配: 如果数据真的很大(推荐) - 因为堆栈很小。 如果要分配的数据大小只在运行时知道(动态分配)。 两个问题: 为什么我们不能在堆栈上分配动态内存(即仅在运行时才知道的内存大小)? 为什么我们只能通过指针指向堆上的内存,而堆栈中的内存可以通过一个普通变量来引用? 即Thing t; 。 编辑:我知道一些编

Programmatically retrieve peak virtual memory of a process

I'm trying to find out the peak virtual memory of my running process on Linux, macOS and FreeBSD. I'm focusing on peak virtual memory as this is a relevant measure of the peak memory usage of my process at any given point, beyond the limits of physical RAM (what peak RSS would provide). In the spirit of How to determine CPU and memory consumption from inside a process? I'm planni

以编程方式检索进程的峰值虚拟内存

我试图在Linux,macOS和FreeBSD上找到我正在运行的进程的最高虚拟内存。 我关注的是峰值虚拟内存,因为这是在任何给定点超出物理内存限制(RSS可提供什么高峰)的过程中,我的进程的峰值内存使用情况的相关度量。 本着如何从进程内部确定CPU和内存消耗的精神? 我打算使用这篇文章为这三个平台编译解决方案(如果您有工作代码提供,我很乐意将它扩展到更多的平台)。 视窗 在Windows上,以下内容似乎会返回与Process Ex

How to determine the hardware (CPU and RAM) on a machine?

I'm working on a cross platform profiling suite, and would like to add information about the machine's CPU (architecture/clock speed/cores) and RAM(total) to the report of each run. Currently I need to target Windows and Unix, so I need methods to obtain this information from both platforms, any clues? Edit: Thanks for the great answers, Now I got CPU architecture, CPU number of cores

如何确定机器上的硬件(CPU和RAM)?

我正在研究跨平台性能分析套件,并希望将有关机器CPU(体系结构/时钟速度/内核)和RAM(总计)的信息添加到每次运行的报告中。 目前我需要针对Windows和Unix,所以我需要从两个平台获取这些信息的方法,任何线索? 编辑:感谢伟大的答案,现在我得到了CPU架构,CPU核心数量和总内存,但我仍然缺乏CPU的时钟速度任何想法的那个? 在Windows上,您可以使用GlobalMemoryStatusEx来获取实际RAM的数量。 处理器信息可以通过Get

Retrieve system information on MacOS X?

Using C++ is there anyway I could get basic information about the computer? For example is there a way I could check how much memory is being used (by the whole computer not just my computer), the total memory available, virtual memory usage, CPU usage, networks stats and so on? I am using Mac OS X Snow Leopard but I would prefer a solution that could be implemented for all Mac OSs (ie Lion)

在MacOS X上检索系统信息?

无论如何,使用C ++可以获得有关计算机的基本信息? 例如,有没有一种方法可以检查有多少内存正在被使用(整个计算机不只是我的电脑),可用的总内存,虚拟内存使用情况,CPU使用情况,网络状态等等? 我使用的是Mac OS X Snow Leopard,但我更喜欢可以在所有Mac OS上实现的解决方案(即Lion) 对于MacOS / X下的全系统内存使用信息,请打开并读取文件/ usr / bin / vm_stat,如下所示: static double ParseMemValue(const