OLD | NEW |
---|---|
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import json | 6 import json |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import re | 9 import re |
10 import socket | 10 import socket |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 result = self.ParseDictMembers() | 172 result = self.ParseDictMembers() |
173 AssertEquals(self.pos, len(self.line)) | 173 AssertEquals(self.pos, len(self.line)) |
174 return (status_match.group(0), result) | 174 return (status_match.group(0), result) |
175 | 175 |
176 | 176 |
177 class Gdb(object): | 177 class Gdb(object): |
178 | 178 |
179 def __init__(self, options, name): | 179 def __init__(self, options, name): |
180 self._options = options | 180 self._options = options |
181 self._name = name | 181 self._name = name |
182 print options.gdb | |
Mark Seaborn
2013/01/15 17:13:20
I don't think you meant to leave this here. Pleas
halyavin
2013/01/15 18:32:42
Done. I forgot to clear working copy before making
| |
182 args = [options.gdb, '--interpreter=mi'] | 183 args = [options.gdb, '--interpreter=mi'] |
183 self._log = sys.stderr | 184 self._log = sys.stderr |
184 self._gdb = subprocess.Popen(args, | 185 self._gdb = subprocess.Popen(args, |
185 stdin=subprocess.PIPE, | 186 stdin=subprocess.PIPE, |
186 stdout=subprocess.PIPE) | 187 stdout=subprocess.PIPE) |
187 | 188 |
188 def __enter__(self): | 189 def __enter__(self): |
189 return self | 190 return self |
190 | 191 |
191 def __exit__(self, type, value, traceback): | 192 def __exit__(self, type, value, traceback): |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
276 parser.add_option('--nexe', help='Filename of main NaCl executable') | 277 parser.add_option('--nexe', help='Filename of main NaCl executable') |
277 options, sel_ldr_command = parser.parse_args() | 278 options, sel_ldr_command = parser.parse_args() |
278 | 279 |
279 sel_ldr = LaunchSelLdr(sel_ldr_command, options, test_name) | 280 sel_ldr = LaunchSelLdr(sel_ldr_command, options, test_name) |
280 try: | 281 try: |
281 with Gdb(options, test_name) as gdb: | 282 with Gdb(options, test_name) as gdb: |
282 gdb.Connect() | 283 gdb.Connect() |
283 test_func(gdb) | 284 test_func(gdb) |
284 finally: | 285 finally: |
285 KillProcess(sel_ldr) | 286 KillProcess(sel_ldr) |
OLD | NEW |