From a7870fc1b26f783ef0c7570ad2a7c84abe21bdb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20M=C4=85ka?= <62388446+michalmaka@users.noreply.github.com> Date: Thu, 27 Jul 2023 01:08:07 +0200 Subject: [PATCH 1/2] Added support for Toybox to remote process picker (#11175) * Added separate remote process command for ToyBox --- Extension/src/Debugger/attachToProcess.ts | 5 +++-- Extension/src/Debugger/nativeAttach.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Extension/src/Debugger/attachToProcess.ts b/Extension/src/Debugger/attachToProcess.ts index 6621033054..1a47131bb0 100644 --- a/Extension/src/Debugger/attachToProcess.ts +++ b/Extension/src/Debugger/attachToProcess.ts @@ -132,8 +132,9 @@ export class RemoteAttachPicker { shPrefix = `/bin/`; } - return `${outerQuote}${shPrefix}sh -c ${innerQuote}uname && if [ ${parameterBegin}uname${parameterEnd} = ${escapedQuote}Linux${escapedQuote} ] ; ` + - `then ${PsProcessParser.psLinuxCommand} ; elif [ ${parameterBegin}uname${parameterEnd} = ${escapedQuote}Darwin${escapedQuote} ] ; ` + + return `${outerQuote}${shPrefix}sh -c ${innerQuote}uname && if [ ${parameterBegin}uname -o${parameterEnd} = ${escapedQuote}Toybox${escapedQuote} ] ; ` + + `then ${PsProcessParser.psToyboxCommand} ; elif [ ${parameterBegin}uname${parameterEnd} = ${escapedQuote}Darwin${escapedQuote} ] ; ` + + `then ${PsProcessParser.psLinuxCommand} ; elif [ ${parameterBegin}uname${parameterEnd} = ${escapedQuote}Linux${escapedQuote} ] ; ` + `then ${PsProcessParser.psDarwinCommand}; fi${innerQuote}${outerQuote}`; } diff --git a/Extension/src/Debugger/nativeAttach.ts b/Extension/src/Debugger/nativeAttach.ts index 1beb193fba..26914a90eb 100644 --- a/Extension/src/Debugger/nativeAttach.ts +++ b/Extension/src/Debugger/nativeAttach.ts @@ -119,6 +119,7 @@ export class PsProcessParser { // Since 'args' contains the full path to the executable, even if truncated, searching will work as desired. public static get psLinuxCommand(): string { return `ps axww -o pid=,comm=${PsProcessParser.commColumnTitle},args=`; } public static get psDarwinCommand(): string { return `ps axww -o pid=,comm=${PsProcessParser.commColumnTitle},args= -c`; } + public static get psToyboxCommand(): string { return `ps -A -o pid=,comm=${PsProcessParser.commColumnTitle},args=`; } // Only public for tests. public static ParseProcessFromPs(processes: string): Process[] { From 4f805c42639308b365f9efa80a4c02f39f4f20bc Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Wed, 26 Jul 2023 16:26:40 -0700 Subject: [PATCH 2/2] Update changelog (again) for 1.17.0 (#11251) * Update changelog. --- Extension/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 65726f5dd4..204cc7736e 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -26,6 +26,7 @@ * [@gareth-rees (Gareth Rees)](https://github.com/gareth-rees): Always use `--simple-values` in newer versions of GDB. [PR MIEngine#1400](https://github.com/microsoft/MIEngine/pull/1400) * [@iAbadia (Iñaki)](https://github.com/iAbadia): Align use of 'sendInvalidate' request arguments. [PR MIEngine#1402](https://github.com/microsoft/MIEngine/pull/1402) * [@intel-rganesh (Rakesh Ganesh)](https://github.com/intel-rganesh): Introduce `--thread` and `--frame options`. [PR MIEngine#1401](https://github.com/microsoft/MIEngine/pull/1401) +* [@michalmaka (Michał Mąka)](https://github.com/michalmaka): Add support for Toybox to the remote process picker. [PR #11175](https://github.com/microsoft/vscode-cpptools/pull/11175) * [@sbobko (Sergey Bobko)](https://github.com/sbobko): Add 'sendInvalidate' request. [PR MIEngine#1367](https://github.com/microsoft/MIEngine/pull/1367) * [@yne (Rémy F.)](https://github.com/yne): Add wildcard support for `includePath`. [PR #10388](https://github.com/microsoft/vscode-cpptools/pull/10388)