Skip to content

Commit

Permalink
Bugcheck and Args are captured as variables (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
PipeItToDevNull authored Jan 26, 2025
1 parent cc06a01 commit 45f7d1e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion api/analyze.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,24 @@ const processResult = (rawContent) => {
const dmpInfo = dirtyDmpInfo1[0].trim();

// Pulling Bugcheck Analysis
const analysis = infos[1].split('\n').filter(line => !line.includes('*') && !line.includes("Debugging Details:")).join('\n').trim();
const analysisLines = infos[1].split('\n').filter(line => !line.includes('*') && !line.includes("Debugging Details:"));
const analysis = analysisLines.join('\n').trim();

// Extracting bugcheck and arguments
const bugcheckMatch = analysis.match(/\(([^)]+)\)/);
const bugcheck = bugcheckMatch ? bugcheckMatch[1] : null;

const argMatches = analysis.match(/Arg\d: ([0-9a-fA-Fx]+)/g);
const args = argMatches ? argMatches.map(arg => arg.split(': ')[1]) : [];
logger.info(`Bugcheck: ${bugcheck}`)
logger.info(`Args: ${args}`)

// Output object creation
const output = {
dmpInfo: dmpInfo,
analysis: analysis,
bugcheck: bugcheck,
args: args,
rawContent: rawContent
};

Expand Down

0 comments on commit 45f7d1e

Please sign in to comment.