From e7494419fce83350f784b70a49c0fa55d057c728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Tue, 28 May 2019 00:00:02 +0000 Subject: [PATCH] test-gdb userland --- common.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/common.py b/common.py index 635556c..290c309 100644 --- a/common.py +++ b/common.py @@ -944,8 +944,9 @@ Incompatible archs are skipped. env['image'] = self.resolve_baremetal_executable(env['baremetal']) source_path_noext = os.path.splitext(join( env['root_dir'], - os.path.relpath(env['image'], env['baremetal_build_dir']) + env['image'][len(env['baremetal_build_dir']) + 1:] ))[0] + env['source_path'] = None for ext in env['baremetal_build_in_exts']: source_path = source_path_noext + ext if os.path.exists(source_path): @@ -953,6 +954,16 @@ Incompatible archs are skipped. break elif env['userland'] is not None: env['image'] = self.resolve_userland_executable(env['userland']) + source_path_noext = os.path.splitext(join( + env['userland_source_dir'], + env['image'][len(env['userland_build_dir']) + 1:] + ))[0] + env['source_path'] = None + for ext in env['build_in_exts']: + source_path = source_path_noext + ext + if os.path.exists(source_path): + env['source_path'] = source_path + break else: if env['emulator'] == 'gem5': env['image'] = env['vmlinux']