Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge (again) for 1.17.0 #11253

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* [@gareth-rees (Gareth Rees)](https:/gareth-rees): Always use `--simple-values` in newer versions of GDB. [PR MIEngine#1400](https:/microsoft/MIEngine/pull/1400)
* [@iAbadia (Iñaki)](https:/iAbadia): Align use of 'sendInvalidate' request arguments. [PR MIEngine#1402](https:/microsoft/MIEngine/pull/1402)
* [@intel-rganesh (Rakesh Ganesh)](https:/intel-rganesh): Introduce `--thread` and `--frame options`. [PR MIEngine#1401](https:/microsoft/MIEngine/pull/1401)
* [@michalmaka (Michał Mąka)](https:/michalmaka): Add support for Toybox to the remote process picker. [PR #11175](https:/microsoft/vscode-cpptools/pull/11175)
* [@sbobko (Sergey Bobko)](https:/sbobko): Add 'sendInvalidate' request. [PR MIEngine#1367](https:/microsoft/MIEngine/pull/1367)
* [@yne (Rémy F.)](https:/yne): Add wildcard support for `includePath`. [PR #10388](https:/microsoft/vscode-cpptools/pull/10388)

Expand Down
5 changes: 3 additions & 2 deletions Extension/src/Debugger/attachToProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}

Expand Down
1 change: 1 addition & 0 deletions Extension/src/Debugger/nativeAttach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] {
Expand Down
Loading