Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Debugging oddity

anthonyrichards
New Contributor III
1,091 Views

I'm using IVF 11.1.035 . The debug configuration has optimization disabled.

While debugging the following code, I found the following 'odd' behaviour with the highlighting:

With the breakpoint set at the line indicated, the program ran and stopped at the break point, which is first highlighted in yellow in the debugger (subsequently in red when stepped past it). Thefirst stepover caused the program to step to the next executable line, the first SendMessage function call. However, the next stepover caused the yellow highlight to jump to the THIRD Sendmessage (skipping executable lines), the next stepover returned the highlight to the FIRST SendMessage, the next stepoverset the highlight to the second Sendmessage, the next stepover set the highlight to the THIRD Sendmessage, jumping two executable lines of code, the next stepover sent the highlight back to the SECOND SendMessage, after which subsequent stepovers progressed normally line by line.

! define a font for the APPLY and EXIT buttons

LF = T_Logfont(-20,0,0,0,1000,1_1,0_1,0_1,0_1, &

0_1,0_1,0_1,0_1,"Arial"C)

[Breakpoint-->] hfont=CreateFontIndirect(LF)

!Set the font for the Apply button

lret=SendMessage( GetDlgItem(dlg%hWnd,IDM_APPLY),WM_SETFONT,hfont,MAKELPARAM(TRUE, 0))

!Set the font for the Exit button

lret=SendMessage( GetDlgItem(dlg%hWnd,IDM_EXIT),WM_SETFONT,hfont,MAKELPARAM(TRUE, 0))

! define a TAB font

LFTAB = T_Logfont(-15,0,0,0,1000,1_1,0_1,0_1,0_1, &

0_1,0_1,0_1,0_1,"Arial"C)

hfonttab=CreateFontIndirect(LFTAB)

!Set the font for the tab control

lret=SendMessage( GetDlgItem(dlg%hWnd,IDC_TAB),WM_SETFONT,hfonttab,MAKELPARAM(TRUE, 0))

What's happening?

0 Kudos
6 Replies
Lorri_M_Intel
Employee
1,091 Views

Because you compiled with optimizations disabled,this sort ofwild jumping around behavioris (usually)because we've missed someof linenumber information that's passed to the debugger.

Would you mind attaching a compilable piece of code, builtaround your snippet? Doesn't have to be executable, certainly doesn't need to do anything productive, but just have enough USE statements (or whatever) so that I can compile it with some of our magic tools to check the internal line number representations?

You're using 11.1 Update 1, correct? I don't see where we've had to do anything with the linenumber information in the 11.1 timeframe at all, so the usual advice of checking a current compiler may not help you. Of course, if you have access to a later compiler, it wouldn't hurt to try it.

thanks --

- Lorri

0 Kudos
anthonyrichards
New Contributor III
1,091 Views
Sure. I use IVF 11.1.035. Here are all the files that make up the project.
0 Kudos
Lorri_M_Intel
Employee
1,091 Views

Thank you, yes I can reproduce the bad line numbers. It's the WM_SETFONT that is being passed by value to the three different SendMessage calls. For some reason, we're assigning the same line number to all three instances. (In case it's not obvious, the line number is for the last instance.)

I'll create an internal problem report; how painful is this to you?

- Lorri

0 Kudos
anthonyrichards
New Contributor III
1,091 Views
Thanks. It's no big deal for me, so take your time!
0 Kudos
Lorri_M_Intel
Employee
1,091 Views

OK, the internal id is DPD200150374. I'm sure you'll hear when something interesting happens with it.

- Lorri

0 Kudos
Steven_L_Intel1
Employee
1,091 Views
This has been fixed in our sources - the fix will appear in a future update.
0 Kudos
Reply