Skip to content

Commit

Permalink
add prefix_map_gdbinit initCommands if reproducible build
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Feb 13, 2025
1 parent fbe6800 commit 31faa4a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/cdtDebugAdapter/debugConfProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { pathExists } from "fs-extra";
import { verifyAppBinary } from "../espIdf/debugAdapter/verifyApp";
import { OpenOCDManager } from "../espIdf/openOcd/openOcdManager";
import { Logger } from "../logger/logger";
import { getToolchainPath } from "../utils";
import { getConfigValueFromSDKConfig, getToolchainPath } from "../utils";
import { createNewIdfMonitor } from "../espIdf/monitor/command";
import { ESP } from "../config";

Expand Down Expand Up @@ -83,6 +83,14 @@ export class CDTDebugConfigurationProvider
"mon reset halt",
"maintenance flush register-cache",
];
const isAppReproducibleBuildEnabled = await getConfigValueFromSDKConfig(
"CONFIG_APP_REPRODUCIBLE_BUILD",
folder.uri
);
if (isAppReproducibleBuildEnabled === "y") {
const buildDirPath = readParameter("idf.buildPath", folder) as string;
config.initCommands.push(`source ${join(buildDirPath, "prefix_map_gdbinit")}`);
}
if (typeof config.initialBreakpoint === "undefined") {
config.initCommands.push(`thb app_main`);
} else if (config.initialBreakpoint) {
Expand Down

0 comments on commit 31faa4a

Please sign in to comment.