Search code examples
trace32lauterbach

Query function symbol for existence


I can use sYmbol.Browse.Function to browse through function symbols loaded to the internal TRACE32 symbol database; quoting the General Reference [S]:

sYmbol.Browse.Function

Lets you browse through the list of functions that have been loaded to the internal TRACE32 symbol database with Data.LOAD.

I'm writing a util that reads user input (function symbol name), and it would be helpful to block user for going forward in case of entering an invalid function symbol. I'm currently using Trace.Find ADDress <name_of_function> followed by querying FOUND().

Question:

  • What would be the idiomatic way to query a specific function symbol name for its existence?

Solution

  • Use sYmbol.EXIST(<symbol>). Citing the General Reference [S]:

    sYmbol.EXIST(<symbol>)

    Boolean function. Returns true when the symbol exists.

    IF sYmbol.EXIST(main)
        GO.direct main