Skip to content

Commit fb9afc6

Browse files
author
Colin Robertson
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/cpp-docs-pr into cr-sourcelink
2 parents 211535b + a7e2f34 commit fb9afc6

File tree

5 files changed

+60
-4
lines changed

5 files changed

+60
-4
lines changed

docs/build/reference/TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
#### [/hotpatch (Create Hotpatchable Image)](hotpatch-create-hotpatchable-image.md)
7979
#### [/I (Additional Include Directories)](i-additional-include-directories.md)
8080
#### [/J (Default char Type Is unsigned)](j-default-char-type-is-unsigned.md)
81+
#### [/JMC (Just My Code debugging)](jmc.md)
8182
#### [/kernel (Create Kernel Mode Binary)](kernel-create-kernel-mode-binary.md)
8283
#### [/link (Pass Options to Linker)](link-pass-options-to-linker.md)
8384
#### [/LN (Create MSIL Module)](ln-create-msil-module.md)

docs/build/reference/compiler-options-listed-alphabetically.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Compiler Options Listed Alphabetically | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "02/22/2018"
4+
ms.date: "08/20/2018"
55
ms.technology: ["cpp-tools"]
66
ms.topic: "reference"
77
dev_langs: ["C++"]
@@ -79,6 +79,7 @@ The following is a comprehensive alphabetical list of compiler options. For a ca
7979
|[/hotpatch](hotpatch-create-hotpatchable-image.md)|Creates a hotpatchable image.|
8080
|[/I](i-additional-include-directories.md)|Searches a directory for include files.|
8181
|[/J](j-default-char-type-is-unsigned.md)|Changes the default `char` type.|
82+
|[/JMC](jmc.md)|Supports native C++ Just My Code debugging.|
8283
|[/kernel](kernel-create-kernel-mode-binary.md)|The compiler and linker will create a binary that can be executed in the Windows kernel.|
8384
|[/LD](md-mt-ld-use-run-time-library.md)|Creates a dynamic-link library.|
8485
|[/LDd](md-mt-ld-use-run-time-library.md)|Creates a debug dynamic-link library.|

docs/build/reference/compiler-options-listed-by-category.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Compiler Options Listed by Category | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "08/20/2018"
55
ms.technology: ["cpp-tools"]
66
ms.topic: "reference"
77
dev_langs: ["C++"]
@@ -159,6 +159,7 @@ This article contains a categorical list of compiler options. For an alphabetica
159159
|[/H](h-restrict-length-of-external-names.md)|Deprecated. Restricts the length of external (public) names.|
160160
|[/HELP](help-compiler-command-line-help.md)|Lists the compiler options.|
161161
|[/J](j-default-char-type-is-unsigned.md)|Changes the default `char` type.|
162+
|[/JMC](jmc.md)|Supports native C++ Just My Code debugging.|
162163
|[/kernel](kernel-create-kernel-mode-binary.md)|The compiler and linker will create a binary that can be executed in the Windows kernel.|
163164
|[/MP](mp-build-with-multiple-processes.md)|Builds multiple source files concurrently.|
164165
|[/nologo](nologo-suppress-startup-banner-c-cpp.md)|Suppresses display of sign-on banner.|

docs/build/reference/exports.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "EXPORTS | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "07/11/2018"
4+
ms.date: "08/20/2018"
55
ms.technology: ["cpp-tools"]
66
ms.topic: "reference"
77
f1_keywords: ["EXPORTS"]
@@ -38,13 +38,20 @@ EXPORTS
3838
func2=func1
3939
```
4040

41-
If the name that you export is from other module, specify the export's name in the DLL by using *other_module.exported_name*. For example, if your DLL exports a function `other_module.func1` and you want callers to use it as `func2`, you would specify:
41+
If the name that you export is from some other module, specify the export's name in the DLL by using *other_module.exported_name*. For example, if your DLL exports a function `other_module.func1` and you want callers to use it as `func2`, you would specify:
4242

4343
```DEF
4444
EXPORTS
4545
func2=other_module.func1
4646
```
4747

48+
If the name that you export is from another module that exports by ordinal, specify the export's ordinal in the DLL by using *other_module.#ordinal_number*. For example, if your DLL exports a function from the other module where it is ordinal 42, and you want callers to use it as `func2`, you would specify:
49+
50+
```DEF
51+
EXPORTS
52+
func2=other_module.#42
53+
```
54+
4855
Because the Visual C++ compiler uses name decoration for C++ functions, you must either use the decorated name internal_name or define the exported functions by using extern "C" in the source code. The compiler also decorates C functions that use the [__stdcall](../../cpp/stdcall.md) calling convention with an underscore (_) prefix and a suffix composed of the at sign (@) followed by the number of bytes (in decimal) in the argument list.
4956

5057
To find the decorated names produced by the compiler, use the [DUMPBIN](../../build/reference/dumpbin-reference.md) tool or the linker [/MAP](../../build/reference/map-generate-mapfile.md) option. The decorated names are compiler-specific. If you export the decorated names in the .DEF file, executables that link to the DLL must also be built by using the same version of the compiler. This ensures that the decorated names in the caller match the exported names in the .DEF file.

docs/build/reference/jmc.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "/JMC (Just My Code debugging) | Microsoft Docs"
3+
ms.custom: "08/20/2018"
4+
ms.technology: ["cpp-tools"]
5+
ms.topic: "reference"
6+
f1_keywords: ["/JMC"]
7+
dev_langs: ["C++"]
8+
helpviewer_keywords: ["/JMC compiler option [C++]", "Just my code [C++]", "-JMC compiler option [C++]", "User code, debugging", "JMC compiler option [C++]"]
9+
author: "corob-msft"
10+
ms.author: "corob"
11+
ms.workload: ["cplusplus"]
12+
---
13+
# /JMC (Just My Code debugging)
14+
15+
Specifies compiler support for native *Just My Code* debugging in the Visual Studio debugger. This option allows Visual Studio to automatically step over system, framework, library, and other non-user calls, and to collapse those calls in the call stack window. The **/JMC** compiler option is available starting in Visual Studio 2017 version 15.8.
16+
17+
## Syntax
18+
19+
> **/JMC**\[**-**]
20+
21+
## Remarks
22+
23+
The Visual Studio [Just My Code](/visualstudio/debugger/just-my-code) option allows the Visual Studio debugger to step over system, framework, library, and other non-user calls. The **/JMC** compiler option enables support for Just My Code debugging in your native C++ code. When **/JMC** is enabled, the compiler inserts calls to a helper function, `__CheckForDebuggerJustMyCode`, in the function prolog. The Visual Studio debugger uses this information to check whether the debugger step operation should skip this function call. To enable Just My Code in the Visual Studio debugger, on the menu bar, choose **Tools** > **Options**, and then set the option in **Debugging** > **General** > **Enable Just My Code**.
24+
25+
The Just My Code feature requires that your code links to the Universal C Runtime Library (CRT) by use of the [/MT, /MTd, /MD, or /MDd](md-mt-ld-use-run-time-library.md) compiler option, or the [/DEFAULTLIB](defaultlib-specify-default-library.md) linker option. If you project does not link to the CRT, you may see linker error **LNK2019: unresolved external symbol __CheckForDebuggerJustMyCode**. To resolve this error, either link to the CRT, or disable the **/JMC** option.
26+
27+
By default, the **/JMC** compiler option is off. However, starting in Visual Studio 2017 version 15.8 this option is enabled in most Visual Studio project templates. To explicitly disable this option, use the **/JMC-** option on the command line. In Visual Studio, open the project Property Pages dialog box, and change the **Support Just My Code Debugging** property in the **Configuration Properties** > **C/C++** > **General** property page to **No**.
28+
29+
For more information, see [C++ Just My Code](/visualstudio/debugger/just-my-code#BKMK_C___Just_My_Code) in [Specify whether to debug only user code using Just My Code in Visual Studio](/visualstudio/debugger/just-my-code), and the Visual C++ Team Blog post [Announcing C++ Just My Code Stepping in Visual Studio](https://blogs.msdn.microsoft.com/vcblog/2018/06/29/announcing-jmc-stepping-in-visual-studio/).
30+
31+
### To set this compiler option in the Visual Studio development environment
32+
33+
1. Open the project's **Property Pages** dialog box. For details, see [Working with Project Properties](../../ide/working-with-project-properties.md).
34+
35+
1. Select the **Configuration Properties** > **C/C++** > **General** property page.
36+
37+
1. Modify the **Support Just My Code Debugging** property.
38+
39+
### To set this compiler option programmatically
40+
41+
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.
42+
43+
## See Also
44+
45+
[Compiler Options](../../build/reference/compiler-options.md)<br/>
46+
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)<br/>

0 commit comments

Comments
 (0)