| Command | WinDbg | LLDB |
|---|---|---|
| Start | windbg {executable} [{args}] |
lldb {executable} [--args] |
| Attach | windbg -p {pid} |
lldb --attach-pid {pid} |
| Command | WinDbg | LLDB |
|---|---|---|
| (Re)load symbols | lb {module-name} |
target symbols add {symbol-file-path} |
| using System.Runtime.CompilerServices; | |
| using static ParsingExtensions; | |
| string input = "Name: Andrew; Age: 31"; | |
| string? name = null; | |
| int age = 0; | |
| if (input.TryParse($"Name: {Placeholder(ref name)}; Age: {Placeholder(ref age)}")) | |
| { |
| /* | |
| * Pretty thread logger | |
| * | |
| * Copyright (C) 2020 Anatoly Shirokov. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| using System; | |
| using System.Linq; | |
| using System.Runtime.Intrinsics; | |
| using System.Runtime.Intrinsics.X86; | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| namespace ConsoleApp29 | |
| { | |
| public class Program |
I find it useful to have assert statements in my code. It has several benefits:
In a dream world all this can be addressed by sophisticated type system but we all know it’s not going to happen any time soon.
| diff --git a/nativelib/src/main/resources/unwind.c b/nativelib/src/main/resources/unwind.c | |
| index b87e730..f66f836 100644 | |
| --- a/nativelib/src/main/resources/unwind.c | |
| +++ b/nativelib/src/main/resources/unwind.c | |
| @@ -1,19 +1,20 @@ | |
| -#include <libunwind.h> | |
| +//#include <libunwind.h> | |
| +#include <stddef.h> | |
| int scalanative_unwind_get_context(void *context) { |
| git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "" ]; then GIT_AUTHOR_EMAIL=; GIT_AUTHOR_NAME=""; GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL; GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all |
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| // ReSharper disable InconsistentNaming | |
| namespace RestartManager |
| namespace Analogy | |
| { | |
| /// <summary> | |
| /// This example shows that a library that needs access to target .NET Standard 1.3 | |
| /// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET | |
| /// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library. | |
| /// </summary>INetCoreApp10 | |
| class Example1 | |
| { | |
| public void Net45Application(INetFramework45 platform) |