objdiff-wasm 3.0.0-alpha.2 → 3.0.0-beta.10
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.
package/dist/config-schema.json
CHANGED
|
@@ -25,6 +25,20 @@
|
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
|
+
{
|
|
29
|
+
"id": "analyzeDataFlow",
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"default": false,
|
|
32
|
+
"name": "(Experimental) Perform data flow analysis",
|
|
33
|
+
"description": "Use data flow analysis to display known information about register contents where possible"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "showDataFlow",
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"default": true,
|
|
39
|
+
"name": "Show data flow",
|
|
40
|
+
"description": "Show data flow analysis results in place of register name where present"
|
|
41
|
+
},
|
|
28
42
|
{
|
|
29
43
|
"id": "spaceBetweenArgs",
|
|
30
44
|
"type": "boolean",
|
|
@@ -194,6 +208,13 @@
|
|
|
194
208
|
"name": "Register '$' prefix",
|
|
195
209
|
"description": "Display MIPS register names with a '$' prefix."
|
|
196
210
|
},
|
|
211
|
+
{
|
|
212
|
+
"id": "ppc.calculatePoolRelocations",
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"default": true,
|
|
215
|
+
"name": "Calculate pooled data references",
|
|
216
|
+
"description": "Display pooled data references in functions as fake relocations."
|
|
217
|
+
},
|
|
197
218
|
{
|
|
198
219
|
"id": "x86.formatter",
|
|
199
220
|
"type": "choice",
|
|
@@ -253,6 +274,14 @@
|
|
|
253
274
|
"mips.registerPrefix"
|
|
254
275
|
]
|
|
255
276
|
},
|
|
277
|
+
{
|
|
278
|
+
"id": "ppc",
|
|
279
|
+
"name": "PowerPC",
|
|
280
|
+
"properties": [
|
|
281
|
+
"ppc.calculatePoolRelocations",
|
|
282
|
+
"analyzeDataFlow"
|
|
283
|
+
]
|
|
284
|
+
},
|
|
256
285
|
{
|
|
257
286
|
"id": "x86",
|
|
258
287
|
"name": "x86",
|
|
@@ -261,4 +290,4 @@
|
|
|
261
290
|
]
|
|
262
291
|
}
|
|
263
292
|
]
|
|
264
|
-
}
|
|
293
|
+
}
|
|
@@ -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,
|
|
@@ -22,6 +58,7 @@ export class Object {
|
|
|
22
58
|
*/
|
|
23
59
|
private constructor();
|
|
24
60
|
static parse(data: Uint8Array, config: DiffConfig): Object;
|
|
61
|
+
hash(): bigint;
|
|
25
62
|
}
|
|
26
63
|
|
|
27
64
|
export class ObjectDiff {
|
|
@@ -29,5 +66,6 @@ export class ObjectDiff {
|
|
|
29
66
|
* This type does not have a public constructor.
|
|
30
67
|
*/
|
|
31
68
|
private constructor();
|
|
32
|
-
findSymbol(name: string, sectionName: string | undefined):
|
|
69
|
+
findSymbol(name: string, sectionName: string | undefined): SymbolInfo | undefined;
|
|
70
|
+
getSymbol(id: number): SymbolInfo | undefined;
|
|
33
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,48 +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,
|
|
28
|
+
symbols: Uint32Array,
|
|
53
29
|
}
|
|
54
30
|
export interface SymbolDisplay {
|
|
55
|
-
|
|
56
|
-
demangledName?: string,
|
|
57
|
-
address: bigint,
|
|
58
|
-
size: bigint,
|
|
59
|
-
kind: SymbolKind,
|
|
60
|
-
section?: number,
|
|
61
|
-
flags: SymbolFlags,
|
|
62
|
-
align?: number,
|
|
63
|
-
virtualAddress?: bigint,
|
|
31
|
+
info: SymbolInfo,
|
|
64
32
|
targetSymbol?: SymbolRef,
|
|
65
33
|
matchPercent?: number,
|
|
66
34
|
diffScore?: [bigint, bigint],
|
|
@@ -103,8 +71,12 @@ export interface ContextItemSeparator {
|
|
|
103
71
|
* ## `"emphasized"`
|
|
104
72
|
*
|
|
105
73
|
* ## `"special"`
|
|
74
|
+
*
|
|
75
|
+
* ## `"delete"`
|
|
76
|
+
*
|
|
77
|
+
* ## `"insert"`
|
|
106
78
|
*/
|
|
107
|
-
export type HoverItemColor = 'normal' | 'emphasized' | 'special';
|
|
79
|
+
export type HoverItemColor = 'normal' | 'emphasized' | 'special' | 'delete' | 'insert';
|
|
108
80
|
export interface HoverItemText {
|
|
109
81
|
label: string,
|
|
110
82
|
value: string,
|
|
@@ -174,7 +146,7 @@ export interface DiffTextSpacing {
|
|
|
174
146
|
export interface DiffTextEol {
|
|
175
147
|
tag: 'eol',
|
|
176
148
|
}
|
|
177
|
-
export type DiffTextColor = DiffTextColorNormal | DiffTextColorDim | DiffTextColorBright | DiffTextColorReplace | DiffTextColorDelete | DiffTextColorInsert | DiffTextColorRotating;
|
|
149
|
+
export type DiffTextColor = DiffTextColorNormal | DiffTextColorDim | DiffTextColorBright | DiffTextColorReplace | DiffTextColorDataFlow | DiffTextColorDelete | DiffTextColorInsert | DiffTextColorRotating;
|
|
178
150
|
export interface DiffTextColorNormal {
|
|
179
151
|
tag: 'normal',
|
|
180
152
|
}
|
|
@@ -187,6 +159,9 @@ export interface DiffTextColorBright {
|
|
|
187
159
|
export interface DiffTextColorReplace {
|
|
188
160
|
tag: 'replace',
|
|
189
161
|
}
|
|
162
|
+
export interface DiffTextColorDataFlow {
|
|
163
|
+
tag: 'data-flow',
|
|
164
|
+
}
|
|
190
165
|
export interface DiffTextColorDelete {
|
|
191
166
|
tag: 'delete',
|
|
192
167
|
}
|
package/dist/objdiff.core.wasm
CHANGED
|
Binary file
|