objdiff-wasm 3.0.0-beta.8 → 3.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,46 @@
|
|
|
1
1
|
/** @module Interface objdiff:core/diff **/
|
|
2
|
-
export function runDiff(left: Object | undefined, right: Object | undefined, config: DiffConfig): DiffResult;
|
|
2
|
+
export function runDiff(left: Object | undefined, right: Object | undefined, config: DiffConfig, mapping: MappingConfig): DiffResult;
|
|
3
3
|
export interface MappingConfig {
|
|
4
4
|
mappings: Array<[string, string]>,
|
|
5
5
|
selectingLeft?: string,
|
|
6
6
|
selectingRight?: string,
|
|
7
7
|
}
|
|
8
|
+
export type SymbolRef = number;
|
|
9
|
+
/**
|
|
10
|
+
* # Variants
|
|
11
|
+
*
|
|
12
|
+
* ## `"unknown"`
|
|
13
|
+
*
|
|
14
|
+
* ## `"function"`
|
|
15
|
+
*
|
|
16
|
+
* ## `"object"`
|
|
17
|
+
*
|
|
18
|
+
* ## `"section"`
|
|
19
|
+
*/
|
|
20
|
+
export type SymbolKind = 'unknown' | 'function' | 'object' | 'section';
|
|
21
|
+
export interface SymbolFlags {
|
|
22
|
+
global?: boolean,
|
|
23
|
+
local?: boolean,
|
|
24
|
+
weak?: boolean,
|
|
25
|
+
common?: boolean,
|
|
26
|
+
hidden?: boolean,
|
|
27
|
+
hasExtra?: boolean,
|
|
28
|
+
sizeInferred?: boolean,
|
|
29
|
+
ignored?: boolean,
|
|
30
|
+
}
|
|
31
|
+
export interface SymbolInfo {
|
|
32
|
+
id: SymbolRef,
|
|
33
|
+
name: string,
|
|
34
|
+
demangledName?: string,
|
|
35
|
+
address: bigint,
|
|
36
|
+
size: bigint,
|
|
37
|
+
kind: SymbolKind,
|
|
38
|
+
section?: number,
|
|
39
|
+
sectionName?: string,
|
|
40
|
+
flags: SymbolFlags,
|
|
41
|
+
align?: number,
|
|
42
|
+
virtualAddress?: bigint,
|
|
43
|
+
}
|
|
8
44
|
export interface DiffResult {
|
|
9
45
|
left?: ObjectDiff,
|
|
10
46
|
right?: ObjectDiff,
|
|
@@ -30,5 +66,6 @@ export class ObjectDiff {
|
|
|
30
66
|
* This type does not have a public constructor.
|
|
31
67
|
*/
|
|
32
68
|
private constructor();
|
|
33
|
-
findSymbol(name: string, sectionName: string | undefined):
|
|
69
|
+
findSymbol(name: string, sectionName: string | undefined): SymbolInfo | undefined;
|
|
70
|
+
getSymbol(id: number): SymbolInfo | undefined;
|
|
34
71
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/** @module Interface objdiff:core/display **/
|
|
2
2
|
export function displaySections(diff: ObjectDiff, filter: SymbolFilter, config: DisplayConfig): Array<SectionDisplay>;
|
|
3
|
-
export function displaySymbol(diff: ObjectDiff, symbol:
|
|
4
|
-
export function displayInstructionRow(diff: ObjectDiff, symbol:
|
|
5
|
-
export function symbolContext(diff: ObjectDiff, symbol:
|
|
6
|
-
export function symbolHover(diff: ObjectDiff, symbol:
|
|
7
|
-
export function instructionContext(diff: ObjectDiff, symbol:
|
|
8
|
-
export function instructionHover(diff: ObjectDiff, symbol:
|
|
3
|
+
export function displaySymbol(diff: ObjectDiff, symbol: SymbolRef): SymbolDisplay;
|
|
4
|
+
export function displayInstructionRow(diff: ObjectDiff, symbol: SymbolRef, rowIndex: number, config: DiffConfig): InstructionDiffRow;
|
|
5
|
+
export function symbolContext(diff: ObjectDiff, symbol: SymbolRef): Array<ContextItem>;
|
|
6
|
+
export function symbolHover(diff: ObjectDiff, symbol: SymbolRef): Array<HoverItem>;
|
|
7
|
+
export function instructionContext(diff: ObjectDiff, symbol: SymbolRef, rowIndex: number, config: DiffConfig): Array<ContextItem>;
|
|
8
|
+
export function instructionHover(diff: ObjectDiff, symbol: SymbolRef, rowIndex: number, config: DiffConfig): Array<HoverItem>;
|
|
9
9
|
export type Object = import('./objdiff-core-diff.js').Object;
|
|
10
10
|
export type ObjectDiff = import('./objdiff-core-diff.js').ObjectDiff;
|
|
11
11
|
export type DiffConfig = import('./objdiff-core-diff.js').DiffConfig;
|
|
12
|
-
export type
|
|
12
|
+
export type SymbolInfo = import('./objdiff-core-diff.js').SymbolInfo;
|
|
13
|
+
export type SymbolRef = import('./objdiff-core-diff.js').SymbolRef;
|
|
13
14
|
export interface DisplayConfig {
|
|
14
15
|
showHiddenSymbols: boolean,
|
|
15
16
|
showMappedSymbols: boolean,
|
|
@@ -19,49 +20,15 @@ export interface SymbolFilter {
|
|
|
19
20
|
regex?: string,
|
|
20
21
|
mapping?: SymbolRef,
|
|
21
22
|
}
|
|
22
|
-
export interface SectionDisplaySymbol {
|
|
23
|
-
symbol: SymbolRef,
|
|
24
|
-
isMappingSymbol: boolean,
|
|
25
|
-
}
|
|
26
23
|
export interface SectionDisplay {
|
|
27
24
|
id: string,
|
|
28
25
|
name: string,
|
|
29
26
|
size: bigint,
|
|
30
27
|
matchPercent?: number,
|
|
31
|
-
symbols:
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* # Variants
|
|
35
|
-
*
|
|
36
|
-
* ## `"unknown"`
|
|
37
|
-
*
|
|
38
|
-
* ## `"function"`
|
|
39
|
-
*
|
|
40
|
-
* ## `"object"`
|
|
41
|
-
*
|
|
42
|
-
* ## `"section"`
|
|
43
|
-
*/
|
|
44
|
-
export type SymbolKind = 'unknown' | 'function' | 'object' | 'section';
|
|
45
|
-
export interface SymbolFlags {
|
|
46
|
-
global?: boolean,
|
|
47
|
-
local?: boolean,
|
|
48
|
-
weak?: boolean,
|
|
49
|
-
common?: boolean,
|
|
50
|
-
hidden?: boolean,
|
|
51
|
-
hasExtra?: boolean,
|
|
52
|
-
sizeInferred?: boolean,
|
|
53
|
-
ignored?: boolean,
|
|
28
|
+
symbols: Uint32Array,
|
|
54
29
|
}
|
|
55
30
|
export interface SymbolDisplay {
|
|
56
|
-
|
|
57
|
-
demangledName?: string,
|
|
58
|
-
address: bigint,
|
|
59
|
-
size: bigint,
|
|
60
|
-
kind: SymbolKind,
|
|
61
|
-
section?: number,
|
|
62
|
-
flags: SymbolFlags,
|
|
63
|
-
align?: number,
|
|
64
|
-
virtualAddress?: bigint,
|
|
31
|
+
info: SymbolInfo,
|
|
65
32
|
targetSymbol?: SymbolRef,
|
|
66
33
|
matchPercent?: number,
|
|
67
34
|
diffScore?: [bigint, bigint],
|
package/dist/objdiff.core.wasm
CHANGED
|
Binary file
|