5 Replies - 489 Views - Last Post: 10 February 2014 - 10:26 PM Rate Topic: -----

#1 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 214
  • Joined: 30-June 09

source information is missing from the debug information for this buil

Posted 09 February 2014 - 11:34 PM

Dear all,
when I'm stepping through a function, I got in a point where the function is called by AfxDlgProc
INT_PTR CALLBACK AfxDlgProc(HWND hWnd, UINT message, WPARAM, LPARAM)
{
	if (message == WM_INITDIALOG)
	{
		// special case for WM_INITDIALOG
		CDialog* pDlg = DYNAMIC_DOWNCAST(CDialog, CWnd::FromHandlePermanent(hWnd));
		if (pDlg != NULL)
			return pDlg->OnInitDialog();
		else
			return 1;
	}
	return 0;
}


But when I keep going stepping inside AfxDlgProc callback, at the end it gives me
source information is missing from the debug information for this build


error. So what is this? How can I fix this?

regards

Is This A Good Question/Topic? 0
  • +

Replies To: source information is missing from the debug information for this buil

#2 GWatt  Icon User is offline

  • member icon

Reputation: 264
  • View blog
  • Posts: 3,059
  • Joined: 01-December 05

Re: source information is missing from the debug information for this buil

Posted 09 February 2014 - 11:49 PM

Are you directly calling AfxDlgProc? If it's being called from code that you didn't write it's probable that debugging information doesn't exist for that code. Is the debugger actually erroring out and terminating the process, or does it just not show source code?
Was This Post Helpful? 0
  • +
  • -

#3 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3469
  • View blog
  • Posts: 10,698
  • Joined: 05-May 12

Re: source information is missing from the debug information for this buil

Posted 09 February 2014 - 11:54 PM

You are trying to step into code for which you don't have the debug symbols for. It's very likely that you don't have the debug symbols for Windows, and as you step out of the callback function, you'll be stepping into the Window code that called your callback function.

You could try to fix it by enabling Visual Studio to download symbols from Microsoft, but often the debug symbols from Microsoft are stripped such that you only have function names, but you won't have line number information or source code.

Another alternative is to install the debug version of Windows -- called checked builds. This may let you debug a bit further into Windows, but take my word for it, only do this as a last resort because Windows will be pathetically slow and you'll have to be dealing with asserts left, right, and center because not even native Windows applications are written such that they don't cause asserts in the Windows APIs.
Was This Post Helpful? 0
  • +
  • -

#4 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 214
  • Joined: 30-June 09

Re: source information is missing from the debug information for this buil

Posted 10 February 2014 - 04:10 AM

@Gwatt,
no, the procedure is called by a object that has CDialog as a parent. The debug session is still on, but it only shows "Source Not Available" screen.

@Skydiver,
I already enabled Symbol Download, but it doesn't fix the problem.
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3469
  • View blog
  • Posts: 10,698
  • Joined: 05-May 12

Re: source information is missing from the debug information for this buil

Posted 10 February 2014 - 06:28 AM

Show us the callstack right before you get the message. Are you trying to trace into the InitDialog(), or trace out of the return?

Did you install the ATL/MFC source code into your machine? Did Visual Studio give you an opportunity to browse for source?
Was This Post Helpful? 0
  • +
  • -

#6 ethereal1m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 214
  • Joined: 30-June 09

Re: source information is missing from the debug information for this buil

Posted 10 February 2014 - 10:26 PM

I guess, I just curious on how my code and windows create MessageBox (The code passes garbage characters, I need to know where they came from, but that's another issue. I figure out that the garbage characters are collected by g_SetDialogStrings_Ex). The first attachment shows the call stack before I got the message.

AfxDlgProc is calling:
BOOL CDemo_LockSDKDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	g_SetDialogStrings_Ex(this,IDD);
 
	char cbuf[20];
    
     CTime m_Date = CTime::GetCurrentTime() + CTimeSpan( 1, 0, 0, 0 );
	m_strCheckoutTime.Format(_T("%04d-%02d-%02d"),m_Date.GetYear(),m_Date.GetMonth(),m_Date.GetDay());
	m_strCheckoutTime +=" 12:00:00";
    _getLocalTimeStr(cbuf);
    m_strCheckinTime = cbuf; 	
	m_strRoomNo = _T("001.002.0028");
	UpdateData(FALSE);
	return TRUE;  // return TRUE  unless you set the focus to a control
}


And return to to AfxDlgProc after get executed (call stack is described in the second attachment).

Attached image(s)

  • Attached Image
  • Attached Image

This post has been edited by ethereal1m: 10 February 2014 - 10:28 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1