scons: add helpers to access GDB XML description files
authorCiro Santilli <ciro.santilli@arm.com>
Fri, 21 Dec 2018 14:22:30 +0000 (14:22 +0000)
committerCiro Santilli <ciro.santilli@arm.com>
Tue, 22 Jan 2019 11:35:12 +0000 (11:35 +0000)
Change-Id: Ic3b18887544b7710ed07a86d28dc62d8441b3476
Reviewed-on: https://gem5-review.googlesource.com/c/15255
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

SConstruct
src/SConscript [changed mode: 0755->0644]

index 659023bf0fcbb7a94a7152259e9a791eeb0e2391..5c8f64956482ff10a16f98cfa672d8f70205b0f6 100755 (executable)
@@ -1082,6 +1082,9 @@ for root, dirs, files in os.walk(ext_dir):
         main.SConscript(joinpath(root, 'SConscript'),
                         variant_dir=joinpath(build_root, build_dir))
 
+gdb_xml_dir = joinpath(ext_dir, 'gdb-xml')
+Export('gdb_xml_dir')
+
 main.Prepend(CPPPATH=Dir('ext/pybind11/include/'))
 
 ###################################################
old mode 100755 (executable)
new mode 100644 (file)
index 5f8a2d2..74adf3c
@@ -293,6 +293,9 @@ def Blob(blob_path, symbol):
                 MakeAction(embedBlob, Transform("EMBED BLOB")))
     Source(cpp_path)
 
+def GdbXml(xml_id, symbol):
+    Blob(joinpath(gdb_xml_dir, xml_id), symbol)
+
 class Source(SourceFile):
     ungrouped_tag = 'No link group'
     source_groups = set()
@@ -522,6 +525,7 @@ class Gem5(Executable):
 
 # Children should have access
 Export('Blob')
+Export('GdbXml')
 Export('Source')
 Export('PySource')
 Export('SimObject')