Skip to content

Commit

Permalink
Added support for .NET Core 3.x+ core dump generation that results in… (
Browse files Browse the repository at this point in the history
#67)

* Added support for .NET Core 3.x+ core dump generation that results in more manageable core dump sizes

* Fixed Valgrind error - uninitialized memory block

* Fixed Valgrind - memory leak

* Fixed review feedback

* Fixed PR feedback
  • Loading branch information
MarioHewardt authored and jahabibi committed Dec 3, 2019
1 parent 0a151d1 commit aff9caf
Show file tree
Hide file tree
Showing 2 changed files with 423 additions and 67 deletions.
30 changes: 30 additions & 0 deletions include/CoreDumpWriter.h
Expand Up @@ -16,6 +16,9 @@
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdint.h>

#include "Handle.h"
#include "ProcDumpConfiguration.h"
Expand All @@ -24,6 +27,33 @@
#define MAX_LINES 15
#define BUFFER_LENGTH 1024

#define CORECLR_DUMPTYPE_FULL 4
#define CORECLR_DUMPLOGGING_OFF 0
#define CORECLR_DIAG_IPCHEADER_SIZE 24

// Magic version for the IpcHeader struct
struct MagicVersion
{
uint8_t Magic[14];
};

// The header to be associated with every command and response
// to/from the diagnostics server
struct IpcHeader
{
union
{
struct MagicVersion _magic;
uint8_t Magic[14]; // Magic Version number
};

uint16_t Size; // The size of the incoming packet, size = header + payload size
uint8_t CommandSet; // The scope of the Command.
uint8_t CommandId; // The command being sent
uint16_t Reserved; // reserved for future use
};


enum ECoreDumpType {
COMMIT,
CPU,
Expand Down

0 comments on commit aff9caf

Please sign in to comment.