Skip to content

Commit

Permalink
Remove more unnecessary newlines in :dm and :dmm
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Feb 1, 2024
1 parent a2308af commit b5d5924
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/agent/lib/debug/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function listMemoryRanges(): string {
.map((a: any) => [padPointer(a.base), '-', padPointer(a.base.add(a.size)), a.protection]
.concat((a.file !== undefined) ? [a.file.path] : [])
.join(' '))
.join('\n') + '\n';
.join('\n');
}

export function listMemoryRangesR2(): string {
Expand All @@ -19,7 +19,7 @@ export function listMemoryRangesR2(): string {
'f', 'map.' + padPointer(a.base) + '.' + a.protection.replace(/-/g, '_'), a.size, a.base,
'#', a.protection
].concat((a.file !== undefined) ? [a.file.path] : []).join(' '))
.join('\n') + '\n';
.join('\n');
}

export function listMemoryRangesJson(): RangeDetails[] {
Expand Down Expand Up @@ -58,7 +58,7 @@ export function listMemoryRangesHere(args: string[]): string {
range.protection
].concat((range.file !== undefined) ? [range.file.path] : [])
.join(' '))
.join('\n') + '\n';
.join('\n');
}

export function listMemoryMaps(): string {
Expand All @@ -67,7 +67,7 @@ export function listMemoryMaps(): string {
.map(({ base, size, protection, file }) => [padPointer(base), '-', padPointer(base.add(size)), protection]
.concat((file !== undefined) ? [(file as any).path] : [])
.join(' '))
.join('\n') + '\n';
.join('\n');
}

export function listMemoryMapsR2(): string {
Expand All @@ -80,8 +80,8 @@ export function listMemoryMapsR2(): string {
padPointer(base)
]
.join(' '))
.join('\n') + '\n';
return "fs+maps\n" + maps + "fs-\n";
.join('\n');
return "fs+maps\n" + maps + "fs-";
}

export function listMemoryMapsJson(): RangeDetails[] {
Expand All @@ -102,7 +102,7 @@ export function listMemoryMapsHere(args: string[]) {
(file as any).path
].join(' ');
})
.join('\n') + '\n';
.join('\n');
}

export function listMallocRangesJson(): RangeDetails[] {
Expand Down Expand Up @@ -138,7 +138,7 @@ export function listMallocMaps(args: string[]): string {
[padPointer(a.base), '-', padPointer(a.base.add(a.size)), a.protection]
.concat((a.file !== undefined) ? [a.file.path] : [])
.join(' '))
.join('\n') + '\n';
.join('\n');
}

export function allocSize(args: string[]): string {
Expand Down

0 comments on commit b5d5924

Please sign in to comment.