Skip to content

Commit a7870fc

Browse files
authored
Added support for Toybox to remote process picker (#11175)
* Added separate remote process command for ToyBox
1 parent d48fd43 commit a7870fc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Extension/src/Debugger/attachToProcess.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ export class RemoteAttachPicker {
132132
shPrefix = `/bin/`;
133133
}
134134

135-
return `${outerQuote}${shPrefix}sh -c ${innerQuote}uname && if [ ${parameterBegin}uname${parameterEnd} = ${escapedQuote}Linux${escapedQuote} ] ; ` +
136-
`then ${PsProcessParser.psLinuxCommand} ; elif [ ${parameterBegin}uname${parameterEnd} = ${escapedQuote}Darwin${escapedQuote} ] ; ` +
135+
return `${outerQuote}${shPrefix}sh -c ${innerQuote}uname && if [ ${parameterBegin}uname -o${parameterEnd} = ${escapedQuote}Toybox${escapedQuote} ] ; ` +
136+
`then ${PsProcessParser.psToyboxCommand} ; elif [ ${parameterBegin}uname${parameterEnd} = ${escapedQuote}Darwin${escapedQuote} ] ; ` +
137+
`then ${PsProcessParser.psLinuxCommand} ; elif [ ${parameterBegin}uname${parameterEnd} = ${escapedQuote}Linux${escapedQuote} ] ; ` +
137138
`then ${PsProcessParser.psDarwinCommand}; fi${innerQuote}${outerQuote}`;
138139
}
139140

Extension/src/Debugger/nativeAttach.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export class PsProcessParser {
119119
// Since 'args' contains the full path to the executable, even if truncated, searching will work as desired.
120120
public static get psLinuxCommand(): string { return `ps axww -o pid=,comm=${PsProcessParser.commColumnTitle},args=`; }
121121
public static get psDarwinCommand(): string { return `ps axww -o pid=,comm=${PsProcessParser.commColumnTitle},args= -c`; }
122+
public static get psToyboxCommand(): string { return `ps -A -o pid=,comm=${PsProcessParser.commColumnTitle},args=`; }
122123

123124
// Only public for tests.
124125
public static ParseProcessFromPs(processes: string): Process[] {

0 commit comments

Comments
 (0)