1

Why does MS Visual Studio Enterprise 2015 skip breakpoint in simple assembler x64 code? I am setting breakpoint, tryin' to debug and the window is just flashing. What can cause this problem?

extern _write : PROC
extern ExitProcess : PROC
public main
.data
tekst db 20, 'My name is John Cena' , 20

.code
 main:
    mov rcx, 1 
    mov rdx, OFFSET tekst 
    mov r8, 20  
    sub rsp, 40
    call _write
    add rsp, 40
    sub rsp, 8
    mov rcx, 0
 call ExitProcess
END 

Debugger output:

'assembler.exe' (Win32): Loaded 'D:\Projekty\Assembler\assembler1\assembler\x64\Debug\assembler.exe'. Symbols loaded. 'assembler.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. 'assembler.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file. 'assembler.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file. The thread 0x2bc has exited with code 0 (0x0). The program '[4724] assembler.exe' has exited with code 0 (0x0).

Mate
  • 192
  • 2
  • 18
  • It's trying to tell you something that is described in the manual? – Weather Vane Oct 12 '16 at 21:03
  • The debugger does not hit the breakpoint. While window flashes the red dot (from breakpoint) turns into white with a little triangle on it. It is probably "The breakpoint will not currently be hit. Incorrect pointer." – Mate Oct 12 '16 at 21:11
  • I have added more informations. In line mov r8, 20, but it doesn't matter in which line i set breakpoint. – Mate Oct 12 '16 at 21:17
  • 1
    Any chance this is related: http://stackoverflow.com/a/27483644/3857942 ? – Michael Petch Oct 12 '16 at 21:21
  • Try "Tools | Options | Debugging". – Jose Manuel Abarca Rodríguez Oct 12 '16 at 21:25
  • No, it doesn't work. I have tried these options. And what am I looking for there? – Mate Oct 12 '16 at 21:27
  • @Ravo, So you have enabled the Microsoft Symbols Server under TOOLS->Option->Debugging->Symbols. Am I right? Based on the output messages, it seems that it is related to the assembly loaded, Which kind of app did you debug? Could you load the assembly manually from the Modules window? – Jack Zhai Oct 13 '16 at 02:32
  • Another possible path I can think of is that please make sure that you turn off the optimization for your app in debug mode. – Jack Zhai Oct 13 '16 at 02:43
  • Reproduced perfectly on a clean example. Smells like a bug in Visual Studio - debug symbols are not coming out of ML64. Consider reporting at https://connect.microsoft.com/VisualStudio/Feedback – Seva Alekseyev Oct 13 '16 at 02:50
  • Replace `main:` with `main PROC` and then after `call exitprocess` add the line `main ENDP` – Michael Petch Oct 13 '16 at 03:24
  • I've found an answer. In debug->options->debuggin->general and i ticked "Use managed Compaility Mode". But now i have another poblem. In dissasembly window I can also see unused memory cell. How can I turn it off? It looks like this:[screenshot](http://i.imgur.com/k8B6Qof.png) – Mate Oct 13 '16 at 09:23
  • @Rave, thanks for sharing your solution here. If possible, you could add your comment as the answer. So it would be helpful for other members who met the same assembly loaded issue. For the memory cell issue, if possible, you could open a new case for the new question with a detailed description for it(like your screen shot or mark ), so discussion here will not deviate too much from the original issue. This will make answer searching in the forum easier and be beneficial to other community members as well:) – Jack Zhai Oct 13 '16 at 11:16
  • Ravo : Did you actually try my solution by using PROC and ENDP ? I was actually able to reproduce your problem until I made those changes. – Michael Petch Oct 13 '16 at 13:40

0 Answers0