Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29062 Discussions

How do I debug 1 and 2 byte variables?

billsinclaol_com
Beginner
662 Views
I am supposed to be able to set a data breakpoint when a particular location has changed.

But there is a problem if the variable is not 4 bytes long. It alwaysthinks I want to
examine 4 bytes anyway.I don't see a way to make that any shorter.

For example:

Interger*1 ix(40)

If I set a data breakpoint for just ix(1) it wants to set breakpoints for 2,3, and 4.
So I get a lot of extra fooling around for locations I don't care about.

Doesn't the debugger know about anything shorter than 4 bytes? You get those
in C++ as well.
0 Kudos
3 Replies
WSinc
New Contributor I
662 Views
Never mind -

I figured out how to do this, but I am wondering why the debugger
can't make it automatic, rather than always setting the length to 4 bytes.

Then we won't have to go in and change it.
0 Kudos
garyrwaters5428
Beginner
662 Views

Hi,

It would be nice if you documented the solution here so others would not need to find the required setting.

-gary

0 Kudos
Steven_L_Intel1
Employee
662 Views

The data breakpoint setting doesn't know the type of variables - just the address. There's a field in that dialog to indicate the number of bytes to watch.

In other aspects of actual debugging, it does know the type.

0 Kudos
Reply