totalview

Totalview get the value of QString

落爺英雄遲暮 提交于 2020-01-02 10:34:04
问题 When I double clicked on QString object in totalview debugger this window appears. How can I get the exact value of it. I have tried command.toUtf8().constData() but it prints Cannot find name "toUtf8" . 回答1: ::TV::TTF::RTF::build_struct_transform { name {^struct QString$} members { { ascii { $wstring_u16 cast { * { d -> unicode } } } } } } ::TV::TTF::RTF::build_struct_transform { name {^struct QString$} members { { ascii { $wstring_u16 cast {* {d -> data} } } } } } Add this to $HOME/.tvdrc

Totalview get the value of QString

◇◆丶佛笑我妖孽 提交于 2020-01-02 10:33:58
问题 When I double clicked on QString object in totalview debugger this window appears. How can I get the exact value of it. I have tried command.toUtf8().constData() but it prints Cannot find name "toUtf8" . 回答1: ::TV::TTF::RTF::build_struct_transform { name {^struct QString$} members { { ascii { $wstring_u16 cast { * { d -> unicode } } } } } } ::TV::TTF::RTF::build_struct_transform { name {^struct QString$} members { { ascii { $wstring_u16 cast {* {d -> data} } } } } } Add this to $HOME/.tvdrc

How big can a malloc be in C?

回眸只為那壹抹淺笑 提交于 2019-12-28 01:55:33
问题 I have a malloc in C that is 26901^2*sizeof(double) This got me thinking what the largest value can be here? Also, would I have any problems defining a macro to access this 2D array? #define DN(i,j) ((int)i * ny + (int)j) Because this seems to not be working for me - or I am at least unsure it is. I can't figure out how to make totalview dive on a macro to tell me what A[DN(indx,jndx)] is actually looking at. 回答1: Observations Assuming a typical allocator, such as the one glibc uses, there

How do you stop in TotalView after an MPI Error?

天涯浪子 提交于 2019-12-25 08:48:23
问题 I am using TotalView and am getting an MPI_Error. However, Totalview does not stop on this error and I can't find where it is occurring. I believe this also applies to GDB. 回答1: Define an MPI_ErrHandler. It gets called in place of the default MPI handler and you can set a breakpoint there. Suggestions welcome on how to get it to print the same thing as the MPI error, or better yet, more information. MPIErrorHander.hpp: #define MPIERRORHANDLER_HPP #ifdef mpi #include <stdexcept> #include

how to represent int * as array in totalview?

*爱你&永不变心* 提交于 2019-12-10 18:44:57
问题 How do I 'dive' an int * which points to a dynamically allocated array of integers and represent it as a fixed int[] array? Put otherwise, if I dive an int * it shows the address and the int pointed to, but instead I would like to see the array of all of the integers. 回答1: I noticed the TotalView tag on this question. Are you asking how to see the values in your array in totalview? If so then the answer is pretty easy. Lets say you have a pointer p which is of type int * and you have it

How do you set the current directory of a debugged process?

萝らか妹 提交于 2019-12-10 13:24:09
问题 I have an application that is sensitive to the directory it gets invoked from — it loads some files using relative paths. When I start the program through a debugger, how can I control what the initial current directory will be? I'd prefer to avoid adding special code to the debugged program to make it call chdir ; my instinct is that the debugger should provide some way to specify that externally, since it's inherently an external setting anyway. The debugger I'm using is TotalView, but I'm

Totalview get the value of QString

醉酒当歌 提交于 2019-12-06 12:57:13
When I double clicked on QString object in totalview debugger this window appears. How can I get the exact value of it. I have tried command.toUtf8().constData() but it prints Cannot find name "toUtf8" . ::TV::TTF::RTF::build_struct_transform { name {^struct QString$} members { { ascii { $wstring_u16 cast { * { d -> unicode } } } } } } ::TV::TTF::RTF::build_struct_transform { name {^struct QString$} members { { ascii { $wstring_u16 cast {* {d -> data} } } } } } Add this to $HOME/.tvdrc flie. First is for Qt3 and second for Qt4 . For QT5 please add the following to the file $HOME/.tvdrc ::TV:

How big can a malloc be in C?

醉酒当歌 提交于 2019-11-27 03:50:33
I have a malloc in C that is 26901^2*sizeof(double) This got me thinking what the largest value can be here? Also, would I have any problems defining a macro to access this 2D array? #define DN(i,j) ((int)i * ny + (int)j) Because this seems to not be working for me - or I am at least unsure it is. I can't figure out how to make totalview dive on a macro to tell me what A[DN(indx,jndx)] is actually looking at. Observations Assuming a typical allocator, such as the one glibc uses, there are some observations: Whether or not the memory is actually used, the region must be reserved contiguously in