Commit 21ba9e3
authored
add support for the vRun GDB packet
## Purpose
Add support for GDB's `vRun` packet to ds2 debug sessions. Fixes issue
#150.
## Overview
* Override `SessionDelegate::onRunAttach` in `DebugSession`. Use
existing `spawnProcess` method to actually launch the process.
* Preserve environment variables set on `_spawner` by previous calls to
`onSetEnvironmentVariable`.
* Preserve previous executable and arguments set on `_spawner` from
previous calls to `onRunAttach`.
* Update `spawnProcess` to use memoized executable, arguments, and
environment when new ones are not provided.
* Fix missing `index++` in `Session::Handle_vRun.
## Problem Details
The following test cases rely on the `vRun` packet to work properly in
the debug session:
```
GdbRemoteLaunchTestCase.test_QEnvironmentHexEncoded_llgs
GdbRemoteLaunchTestCase.test_QEnvironment_llgs
GdbRemoteLaunchTestCase.test_launch_via_vRun_llgs
GdbRemoteLaunchTestCase.test_launch_via_vRun_no_args_llgs
```
## Validation
Combined with PR #143, this change gets all of the
`GdbRemoteLaunchTestCase` test cases passing against ds2 running on
Linux x86_64.1 parent 443bb5d commit 21ba9e3
File tree
5 files changed
+44
-17
lines changed- Headers/DebugServer2
- GDBRemote
- Host
- POSIX
- Windows
- Sources/GDBRemote
5 files changed
+44
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
848 | 865 | | |
849 | 866 | | |
850 | 867 | | |
| |||
1134 | 1151 | | |
1135 | 1152 | | |
1136 | 1153 | | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
| 1154 | + | |
| 1155 | + | |
1144 | 1156 | | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
1151 | | - | |
1152 | | - | |
| 1157 | + | |
| 1158 | + | |
1153 | 1159 | | |
| 1160 | + | |
1154 | 1161 | | |
1155 | | - | |
1156 | 1162 | | |
1157 | 1163 | | |
1158 | 1164 | | |
| |||
1162 | 1168 | | |
1163 | 1169 | | |
1164 | 1170 | | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1165 | 1183 | | |
1166 | 1184 | | |
1167 | 1185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3233 | 3233 | | |
3234 | 3234 | | |
3235 | 3235 | | |
3236 | | - | |
| 3236 | + | |
3237 | 3237 | | |
3238 | 3238 | | |
3239 | 3239 | | |
| |||
0 commit comments