Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Placing a SDK under vista or gant additional rights? Pin
Mark Salsbery7-Oct-08 4:15
Mark Salsbery7-Oct-08 4:15 
GeneralRe: Placing a SDK under vista or gant additional rights? Pin
jung-kreidler7-Oct-08 5:10
jung-kreidler7-Oct-08 5:10 
GeneralRe: Placing a SDK under vista or gant additional rights? Pin
jung-kreidler8-Oct-08 2:52
jung-kreidler8-Oct-08 2:52 
Questionsource code window is not displayed Pin
George_George5-Oct-08 21:36
George_George5-Oct-08 21:36 
AnswerRe: source code window is not displayed Pin
_AnsHUMAN_ 5-Oct-08 21:59
_AnsHUMAN_ 5-Oct-08 21:59 
GeneralRe: source code window is not displayed Pin
George_George5-Oct-08 23:02
George_George5-Oct-08 23:02 
GeneralRe: source code window is not displayed Pin
_AnsHUMAN_ 5-Oct-08 23:13
_AnsHUMAN_ 5-Oct-08 23:13 
GeneralRe: source code window is not displayed Pin
George_George5-Oct-08 23:29
George_George5-Oct-08 23:29 
Thanks AnShUmAn,


Here is my source code and related Windbg output after further experiment. My questions/comments,

1. I find if I execute command .effmach x86 at the beginning, also with correct symbol path and source path, source code window is showing when break point is hit in source code;
2. My further question is when should we execute command .effmach x86? As the 1st command to debug x86 binary under x64 machine/debugger as best practices or?
3. From my output, there is only one break point, but I do not know why it breaks twice, any ideas?

More details, I donot know why breaks here,

--------------------
(10e4.1f8): WOW64 breakpoint - code 4000001f (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
ntdll32!DbgBreakPoint:
00000000`7d61002d cc              int     3
0:000:x86> k
ChildEBP          RetAddr           
002dfb48 7d649b01 ntdll32!DbgBreakPoint
002dfcac 7d637010 ntdll32!LdrpInitializeProcess+0x111c
002dfd0c 7d61e99d ntdll32!_LdrpInitialize+0xd0
00000000 00000000 ntdll32!KiUserApcDispatcher+0x25
--------------------


Here is the whole output.

--------------------
ntdll!DbgBreakPoint:
00000000`77ef2aa0 cc              int     3
0:000> .effmach x86
Effective machine: x86 compatible (x86)
0:000:x86> bp main
0:000:x86> bl
 0 e x86 00000000`00411430     0001 (0001)  0:**** TestDebug1!main
0:000:x86> g
ModLoad: 00000000`77d40000 00000000`77eb3000   NOT_AN_IMAGE
ModLoad: 00000000`7d4c0000 00000000`7d5f0000   NOT_AN_IMAGE
ModLoad: 00000000`7d600000 00000000`7d6f0000   C:\WINDOWS\SysWOW64\ntdll32.dll
ModLoad: 00000000`77d40000 00000000`77eb3000   NOT_AN_IMAGE
ModLoad: 00000000`77c20000 00000000`77d2c000   NOT_AN_IMAGE
ModLoad: 00000000`7d4c0000 00000000`7d5f0000   C:\WINDOWS\syswow64\kernel32.dll
ModLoad: 00000000`10200000 00000000`10323000   C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_F863C71F\MSVCR90D.dll
(10e4.1f8): WOW64 breakpoint - code 4000001f (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
ntdll32!DbgBreakPoint:
00000000`7d61002d cc              int     3
0:000:x86> k
ChildEBP          RetAddr           
002dfb48 7d649b01 ntdll32!DbgBreakPoint
002dfcac 7d637010 ntdll32!LdrpInitializeProcess+0x111c
002dfd0c 7d61e99d ntdll32!_LdrpInitialize+0xd0
00000000 00000000 ntdll32!KiUserApcDispatcher+0x25
0:000:x86> g
Breakpoint 0 hit
TestDebug1!main:
00000000`00411430 55              push    ebp
0:000:x86> k
ChildEBP          RetAddr           
002dff68 00411a38 TestDebug1!main [d:\visual studio 2008\projects\testdebug1\testdebug1\main.cpp @ 20]
002dffb8 0041187f TestDebug1!__tmainCRTStartup+0x1a8
002dffc0 7d4e7d2a TestDebug1!mainCRTStartup+0xf
002dfff0 00000000 kernel32!BaseProcessStart+0x28

#include <iostream>
using namespace std;
int foo()
{
 int b = 300;
 return b;
}
int goo()
{
 int a = 400;
 return a;
}
int main()
{
 int a = 200;
 int* b = &a;
 foo();
 a = 400;
 goo();
 return 0;
}
--------------------



regards,
George
GeneralRe: source code window is not displayed Pin
_AnsHUMAN_ 5-Oct-08 23:59
_AnsHUMAN_ 5-Oct-08 23:59 
GeneralRe: source code window is not displayed Pin
George_George6-Oct-08 0:22
George_George6-Oct-08 0:22 
QuestionLoading DLLs more than once Pin
DSPCottage5-Oct-08 21:27
DSPCottage5-Oct-08 21:27 
QuestionRe: Loading DLLs more than once Pin
CPallini5-Oct-08 22:14
mveCPallini5-Oct-08 22:14 
AnswerRe: Loading DLLs more than once Pin
DSPCottage5-Oct-08 22:40
DSPCottage5-Oct-08 22:40 
GeneralRe: Loading DLLs more than once Pin
CPallini5-Oct-08 22:49
mveCPallini5-Oct-08 22:49 
QuestionSHFileOperation Pin
MsmVc5-Oct-08 21:02
MsmVc5-Oct-08 21:02 
QuestionRe: SHFileOperation Pin
CPallini5-Oct-08 22:16
mveCPallini5-Oct-08 22:16 
GeneralRe: SHFileOperation Pin
fantasy12155-Oct-08 22:20
fantasy12155-Oct-08 22:20 
QuestionRe: SHFileOperation [modified] Pin
CPallini5-Oct-08 22:28
mveCPallini5-Oct-08 22:28 
AnswerRe: SHFileOperation Pin
SandipG 5-Oct-08 22:34
SandipG 5-Oct-08 22:34 
GeneralRe: SHFileOperation Pin
Rajesh R Subramanian5-Oct-08 22:43
professionalRajesh R Subramanian5-Oct-08 22:43 
GeneralRe: SHFileOperation Pin
CPallini5-Oct-08 22:50
mveCPallini5-Oct-08 22:50 
GeneralRe: SHFileOperation Pin
SandipG 5-Oct-08 22:54
SandipG 5-Oct-08 22:54 
GeneralRe: SHFileOperation Pin
CPallini5-Oct-08 22:44
mveCPallini5-Oct-08 22:44 
QuestionON_EN_CHANGE() Notification problem of CEdit Box Pin
Dhiraj kumar Saini5-Oct-08 20:19
Dhiraj kumar Saini5-Oct-08 20:19 
AnswerRe: ON_EN_CHANGE() Notification problem of CEdit Box Pin
Chandrasekharan P5-Oct-08 20:24
Chandrasekharan P5-Oct-08 20:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.