understanding CAV/IAV invokation during debugging

understanding CAV/IAV invokation during debugging

Bild des Benutzers forall

Especially given the presence of John R on this forum, I have a somewhat technical question - mainly for my own understanding but hopefully it would be useful in practice as well.

In order for CAV and IAV to function from the toolbar during debugging, it is (presumably) necessary for CVF/IVF to have the "inquiry" capability to get the address of a highlighted array in the debugger, and (probably) its type and dimensions. Then it can be sent to the CAV/IAV engines, etc.

Is this "inquiry" functionality supported by VS itself, or was it something that Compaq/Intel had to develop as part of a plugin?

As well as curiosity-driven, I am developing some auxiliary debugging tools (I am currently doing some fairly heavy numerical work and got tired of copy/pasting or write/reading many large matrices to inspect their properties). These tools are almost done now, but I would like to go one step further and be able to invoke them via toolbar macros, etc. For this I would need to get things like address (and maybe dimensions) from a macro-like script.

I did get a "not possible" from Steve in an earlier related post, but would at least like to understand (broadly) why not, and (also broadly) how was a similar functionality achieved for CAV/IAV.

There was also a promising suggestion by Lorry M to use "out-of-line" calls (which would have done the job perfectly) but unfortunately it was only for C/C++ and not for Fortran.. But what I am asking here is (maybe) easier than out-of-line calls - I dont want to call any user-supplied procedures, just get some (existing) information.

thanks in advance for any insights, even if they may not change the final verdict..

PS: Jim Dempsey's suggestion (http://software.intel.com/en-us/forums/showthread.php?t=67398) regarding using IAV to monitor arrays during program execution is excellent, and I am starting to adopt it for dynamic visualization of output and internal variables. It is indeed very powerful for that purpose.

But in my debugging context its not quite as convenient (unless I mis-understood something) because it would require to compute all potential properties of interest. This is certainly possible but expensive and a bit inflexible. Ideally I would like the capability to pick the specific array (and the specific property to compute) during the debug and analyse it separately. Evidently this requires some similar inquiry functionality to what CAV and IAV need and were able to achieve, hence my post..

8 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers abhimodak

This no way gives an answer to what you are looking for but may be, I hope, of some help. ( I did follow your post on the compiler forum.)

Motivated by the current lack of integration of Array viewer on XP64, I have been "looking around" for a similar tool. I found one that works for C/C++ -- called ArrayDebugView (http://arraydebugview.sourceforge.net/) made by Joachim Eibl.

Since the source code is available, I was trying to understand a few basics. As I understand the Fortran Expression Evaluator should be "visible" in VB macro. I don't think that is possible through the macro since the debbuger's properties don't have it. Thus, probably one needs Idebug** interfaces from the Visual Studio SDK.

I am quite a rookie at these things so if this is not helpful, please accept my sincere apologies.

Abhi

Bild des Benutzers forall
Quoting - abhimodak This no way gives an answer to what you are looking for but may be, I hope, of some help. ( I did follow your post on the compiler forum.)

Motivated by the current lack of integration of Array viewer on XP64, I have been "looking around" for a similar tool. I found one that works for C/C++ -- called ArrayDebugView (http://arraydebugview.sourceforge.net/) made by Joachim Eibl.

Since the source code is available, I was trying to understand a few basics. As I understand the Fortran Expression Evaluator should be "visible" in VB macro. I don't think that is possible through the macro since the debbuger's properties don't have it. Thus, probably one needs Idebug** interfaces from the Visual Studio SDK.

I am quite a rookie at these things so if this is not helpful, please accept my sincere apologies.

Abhi

thanks Abhi - help is always appreciated. I will have a look at what arraydebugview does - i am also a total rookie with quite a few things still to learn.

Bild des Benutzers johnreadey

Hi forall,

That's an interesting link about the ArrayDebuger project. I've had people asking me about getting AV debug support in Visual C++ in the past, but never got a chance to work on it. Actually this is something where things are a bit easier in Fortran than C... Fortran arrays are pre-pended in memory with an array descriptor block that describes the rank and dimensions of the array. With C, you just have a pointer (usually), and you'll need some additional context to determine what the shape of the array is. Steve did a nice article on array descriptors:http://software.intel.com/en-us/forums/showpost.php?p=12915. Bear in mind that the descriptor format varies between compilers and possibly between different versions of the same compiler. We relied on it for AV, but then the compiler engineers were always nice enough to let me know when the format was about to change! John
Bild des Benutzers forall
Quoting - johnreadey Hi forall, That's an interesting link about the ArrayDebuger project. I've had people asking me about getting AV debug support in Visual C++ in the past, but never got a chance to work on it. Actually this is something where things are a bit easier in Fortran than C... Fortran arrays are pre-pended in memory with an array descriptor block that describes the rank and dimensions of the array. With C, you just have a pointer (usually), and you'll need some additional context to determine what the shape of the array is. Steve did a nice article on array descriptors:http://software.intel.com/en-us/forums/showpost.php?p=12915. Bear in mind that the descriptor format varies between compilers and possibly between different versions of the same compiler. We relied on it for AV, but then the compiler engineers were always nice enough to let me know when the format was about to change! John

Hi John,

Thank you for your reply. It is great to have you on this forum. CAV and (unfortunately to a somewhat lesser extent due to incomplete implementation) IAV are excellent tools that I use all the time. I really havent come across anything that would rival CAV for the type of visualization that I need (matrices and surfaces), certainly not given the simplicity of its use in both debug and API contexts. Its impressive that is dates back 10 years!

I did realize (by examining the AV interface files) that you rely on the array descriptors to pass most (all?) of the information.

What puzzles me is that the type (real, integer) is also somehow passed, even though the CVF descriptors do not contains this info (my understanding is DEC descriptors did have a datatype field, CVF/IVF dont).

I must also admit to be *very* curious how (very broadly speaking, of course) was done the hooking of CAV into Visual Studio 6 (and of IAV into VS2008). It must have been able to programatically get the baseaddress, shape and datatype of a highlighted variable. The ArrayDebugger, and other tools I've seen do not seem to do this, they require manually inputting this info, which is of course much less convenient than the 2-click-and-display CAV. Evidently the hooks must still exist in VS2008 because IAV is able to function in more or less the same way as CAV.

thank you in advance for any insights you may be willing to provide!
dmitri

Bild des Benutzers Steve Lionel (Intel)

One of the Fortran VS integration DLLs is vfavwin.dll - this is the "hook" between the debugger and AV. It operates based on debug information, which knows the name, type, shape, etc. of all variables and doesn't depend on data layout in memory.

This DLL uses interfaces to VS that are licensed to us from Microsoft.

Steve
Bild des Benutzers jimdempseyatthecove

>>PS: Jim Dempsey's suggestion (http://software.intel.com/en-us/forums/showthread.php?t=67398) regarding using IAV to monitor arrays during program execution is excellent, and I am starting to adopt it for dynamic visualization of output and internal variables. It is indeed very powerful for that purpose.

Thanks for rementioning this post.

Unfortunately, Intel never saw the potential for use of AV in the above manner (or at least never documented it for such use). The above technique, enables the programmer with relative ease, and very low overhead, a means to "scab" on to their application a separate process for dynamic visualization of what is going on inside their application while it is running. (separate process == no/little impact on memory footprint .AND. == seperate thread for visualization). This is something you really have to see and use but once to be fully convinced it is a must have feature. The unfortunate part is, this capability is going to die when Intel yanks IAV from the archives.

John (and I assume others)did an excellent job at laying out the design of IAV. I would guess about 95% was completed (for IVF)before support got terminated. The finished version, had they finished it, could have been a saleable product. Well, let's say the integration into IVF could have been a saleable product since much of AV was prepared under Open Source. Note, (now) Intel Threading Building Blocks (TBB) has a saleable component from Intel as well as Open Source components. I think with little effort, Intel could structure IAV in a similar manner.

Jim Dempsey

www.quickthreadprogramming.com
Bild des Benutzers abhimodak

I just getting a bit more desparate to have AV work on 64 bit...I found the ArrayDebugView only because there is an integration problem of IAV on XP64.

Yes Steve, I know, you cannot say if/when it will happen. I am just making "noise" here.

I am back to learning how AV and ArrayDebugView do the job.

Abhi

Melden Sie sich an, um einen Kommentar zu hinterlassen.