DavidSpickett wrote: There is also `lldb/test/API/functionalities/json/symbol-file/TestSymbolFileJSON.py` which is almost what we want.
I got this to work: ``` { "triple": "aarch64--linux", "uuid": "A2180C69-2DC0-DE61-3689-5CDC84D0AB63-A898EE40", "sections": [ { "name": "globals", "type": "data", "address": 1297224342667202580, "size": 16 } ], "symbols": [ { "name": "a_global_tagged", "size": 8, "type": "data", "address": 1297224342667202580 } ] } ``` We can get all this info from the running program to build the file during the test. ``` (lldb) target symbol add ~/symbol.json symbol file '/home/david.spickett/symbol.json' has been added to '/tmp/test.o' (lldb) p &a_global (void **) 0x0000aaaaaaab1014 (lldb) p &a_global_tagged (void **) 0x1200aaaaaaab1014 (lldb) p (void*)return_ptr(&a_global) (void *) 0x0000aaaaaaab1014 (lldb) p (void*)return_ptr(&a_global_tagged) (void *) 0x1200aaaaaaab1014 ``` I'm passing the address here otherwise we have no way to know the bits were or were not stripped. I think that's not enough though right? We need some `function(variable_name)` where loading `variable_name` via an untagged pointer fails. Or via a tagged pointer? Anyway you see the idea here. Tell me if that could be made to work. https://github.com/llvm/llvm-project/pull/153585 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits