NO

Author Topic: Debugger breapoints  (Read 2338 times)

Jokaste

  • Guest
Debugger breapoints
« on: May 16, 2019, 08:43:26 PM »
I can't set breapoints in my program. I get the following message :


Quote
Unable to set breakpoint at line XXX.
(Probably no executable code associated with this source line)

In some parts of the program I can but in other not possible !
Code: [Select]
case IDOK : if(HIWORD(__wParam) == BN_CLICKED)
{
_iIndex = SendDlgItemMessage(__hWnd,IDC_COMBO_33,CB_GETCURSEL,0,0) ;
_lpTmpPassword = (LPPASSWORD) SendDlgItemMessage(__hWnd,IDC_COMBO_33,CB_GETITEMDATA,_iIndex,0) ;
_iIndex = SendDlgItemMessage(__hWnd,IDC_COMBO_34,CB_GETCURSEL,0,0) ;
_lpTmpHashSize = (LPHASHSIZE) SendDlgItemMessage(__hWnd,IDC_COMBO_34,CB_GETITEMDATA,_iIndex,0) ;
_iIndex = SendDlgItemMessage(__hWnd,IDC_COMBO_35,CB_GETCURSEL,0,0) ;
_lpDataBase = (LPDB_INFOS *) SendDlgItemMessage(__hWnd,IDC_COMBO_35,CB_GETITEMDATA,_iIndex,0) ;
_iIndex = SendDlgItemMessage(__hWnd,IDC_COMBO_36,CB_GETCURSEL,0,0) ;
_lpTmpAlphabet = (LPALPHABET *) SendDlgItemMessage(__hWnd,IDC_COMBO_36,CB_GETITEMDATA,_iIndex,0) ;
_iControl = IDC_COMBO_01 ;

for(_i = 0 ; _i < MAX_LEN_PASSWORD ; _i++)
{
_hCombo = GetDlgItem(__hWnd,_iControl) ;
_hComboTo = GetDlgItem(__hWnd,_iControl + MAX_LEN_PASSWORD) ;

_iIndex1 = SendMessage(_hCombo,CB_GETCURSEL,0,0) ;
_iLetter1 = SendMessage(_hCombo,CB_GETITEMDATA,_iIndex1,0) ;

_iIndex2 = SendMessage(_hComboTo,CB_GETCURSEL,0,0) ;
_iLetter2 = SendMessage(_hComboTo,CB_GETITEMDATA,_iIndex2,0) ;

if(_iLetter2 < _iLetter1)
{
SendMessage(_hCombo,CB_SETCURSEL,_iIndex2,0) ;
SendMessage(_hCombo,CB_SETTOPINDEX,_iIndex2,0) ;

SendMessage(_hComboTo,CB_SETCURSEL,_iIndex1,0) ;
SendMessage(_hComboTo,CB_SETTOPINDEX,_iIndex1,0) ;
}

_iControl++ ;
}

_lpDbGen = (LPDB_GEN) VirtualAlloc(NULL,sizeof(DB_GEN),MEM_COMMIT|MEM_RESERVE,PAGE_EXECUTE_READWRITE) ;
if(_lpDbGen)
{
memcpy(Compteur,_lpDbGen->Compteur,sizeof(Compteur)) ;

_lpDbGen->iPasswordLength = _lpTmpPassword->iPasswordLength ;
_lpDbGen->iAlphabet = (*_lpTmpAlphabet)->KeyCode ;
_lpDbGen->iAlphabetLength = (*_lpTmpAlphabet)->iAlphabetLength ;
_lpDbGen->iHashNumberOfBits = _lpTmpHashSize->iHashNumberOfBits ;
_lpDbGen->iHashNumberOfBytes = _lpDbGen->iHashNumberOfBits / 8 ;
_lpDbGen->iAlgorithme = (*_lpDataBase)->KeyCode ;

iCurrentTask = _lpDbGen->iPasswordLength - 1 ;
bStopTask[iCurrentTask] = FALSE ;

if(Db_Open(_lpDbGen,_lpDbGen->iPasswordLength,_lpDbGen->iHashNumberOfBits))
{
_iProgress = IDC_PROGRESS_01 ;
_iControl = IDC_COMBO_01 ;

for(_i = 0 ; _i < MAX_LEN_PASSWORD ; _i++)
{
_hCombo = GetDlgItem(__hWnd,_iControl) ;
_hComboTo = GetDlgItem(__hWnd,_iControl + MAX_LEN_PASSWORD) ;

_iIndex1 = SendMessage(_hCombo,CB_GETCURSEL,0,0) ;
_iLetter1 = SendMessage(_hCombo,CB_GETITEMDATA,_iIndex1,0) ;

_iIndex2 = SendMessage(_hComboTo,CB_GETCURSEL,0,0) ;
_iLetter2 = SendMessage(_hComboTo,CB_GETITEMDATA,_iIndex2,0) ;

SendDlgItemMessage(__hWnd,_iProgress,PBM_SETPOS,0,0) ;

_lpszTmp = _szTmp ;
_lpAlphabet = *_lpTmpAlphabet ;

lstrcpy(_lpDbGen->lpszAlphabet,_lpAlphabet->lpszAlphabet) ;
lstrcpy(_lpszTmp,_lpAlphabet->lpszAlphabet) ;
*(_lpszTmp + _iLetter2 + 1) = '\0' ;
lstrcpy(_lpDbGen->szAlphabets[_i],_lpszTmp + _iLetter1) ;
_lpDbGen->iAlphabetLengths[_i] = (_iLetter2 + 1) - _iLetter1 ;

_iControl++ ;
_iProgress++ ;
}

ShowWindow(GetDlgItem(__hWnd,IDOK),SW_HIDE) ;
ShowWindow(GetDlgItem(__hWnd,IDCANCEL),SW_HIDE) ;
ShowWindow(GetDlgItem(__hWnd,IDC_BUTTON_01),SW_SHOW) ;

DoManualPasswords(_lpDbGen) ;
}
}
}

break ;

If someone could help me I would appreciate.
« Last Edit: May 16, 2019, 08:51:59 PM by Jokaste »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Debugger breapoints
« Reply #1 on: May 17, 2019, 06:29:01 PM »
Just switch optimizations off while debugging.
May the source be with you

Jokaste

  • Guest
Re: Debugger breapoints
« Reply #2 on: May 19, 2019, 04:24:51 PM »
It's the first thing I did!