MCPcopy Index your code
hub / github.com/Marus/cortex-debug / hexFormat

Function hexFormat

src/frontend/utils.ts:1–5  ·  view source on GitHub ↗
(value: number, padding: number = 8, includePrefix: boolean = true)

Source from the content-addressed store, hash-verified

1export function hexFormat(value: number, padding: number = 8, includePrefix: boolean = true): string {
2 let base = (value >>> 0).toString(16);
3 base = base.padStart(padding, '0');
4 return includePrefix ? '0x' + base : base;
5}
6
7export function binaryFormat(value: number, padding: number = 0, includePrefix: boolean = true, group: boolean = false): string {
8 let base = (value >>> 0).toString(2);

Callers 15

loadSymbolsMethod · 0.90
startGdbMethod · 0.90
readMemoryRequestMethod · 0.90
writeMemoryRequestMethod · 0.90
getThreadInfoMethod · 0.90
getStackInfoMethod · 0.90
getThreadInfoMethod · 0.90
getStackInfoMethod · 0.90
getThreadInfoMethod · 0.90
getStackInfoMethod · 0.90

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected