'link'에 해당되는 글 197건
- 2025.05.23 A lambda to a pointer to function
- 2022.09.02 NtCreateToken
- 2022.05.30 Getting a device ID
- 2021.12.31 LLDB
- 2021.11.23 How to change the foreground window
- 2021.09.15 App Container
- 2021.06.01 c++ User defined literals
- 2021.05.14 Remote Debugging
- 2021.05.13 VMware Fusion
- 2021.05.12 Sysmon
Recently, I changed the lambda code to capture a local variable, and then the code didn't compile.
What I found was that only a lambda without capture can be converted to a function pointer.
The closure type for a lambda-expression with no lambda-capture has a public non-virtual non-explicit const conversion function to pointer to function having the same parameter and return types as the closure type's function call operator. The value returned by this conversion function shall be the address of a function that, when invoked, has the same effect as invoking the closure type's function call operator. |
Return Codes
- STATUS_SUCCESS - Indicates the operation was successful.
- STATUS_INVALID_OWNER - Indicates the ID provided to be assigned
as the default owner of the token does not have an attribute
indicating it may be assigned as an owner. - STATUS_INVALID_PRIMARY_GROUP - Indicates the group ID provided
via the PrimaryGroup parameter was not among those assigned
to the token in the Groups parameter. - STATUS_BAD_IMPERSONATION_LEVEL - Indicates no impersonation level
was provided when attempting to create a token of type
TokenImpersonation.
- Remote Side(e.g. 192.168.129.2)
- Install Command Line Tools for Xcode
- Run debugserver(/Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources ver 12.5)
-
Usage:
debugserver host:port [program-name program-arg1 program-arg2 ...]
debugserver /path/file [program-name program-arg1 program-arg2 ...]
debugserver host:port --attach=<pid>
debugserver /path/file --attach=<pid>
debugserver host:port --attach=<process_name>
debugserver /path/file --attach=<process_name>host: Local Side
e.g.: debugserver 192.168.129.1:1600 --attach=1234
Attaching to process 2051...
Listening to port 1600 for a connection from 192.168.129.1...
- Local Side(e.g. 192.168.129.1)
- Run lldb
- Then enter this command: process connect connect://192.168.129.2:1600
- Set the entitlement
- The debugee should have 'com.apple.security.get-task-allow' entitlement in order to be attached by debuggers.
- In debug mode it is set, but in release mode it is stripped.
- Build Settings > Signing > Code Signing inject Base Entitlements > 'Yes'