SourcePoint Intel Help

Table of Contents

getnearestprogramsymbol

Return the nearest program symbol from a given address.

Syntax

[result =] getnearestprogramsymbol(addr, [proc])

Where:

addr

ย is the address to search.

proc

ย is the processor to use (default = current viewpoint).

result

specifies an nstring variable to which the function return value is assigned. If result is not specified, the return value is displayed on the next line of the screen.

Discussion

The getnearestprogramsymbol function searches each program loaded in the current context for the specified address. ย It returns the nearest symbol (either code or data) as a string in โ€symbol + hex_offsetโ€ format.

The optional processor parameter is only meaningful when target memory is configured as not SMP.

An empty string is returned when SP cannot find a symbol.

Example 1

To search the programs loaded on the current viewpoint processor for the symbol nearest to address 0x120:

Command input:

GetNearestProgramSymbol(0x120)

Result:

main+0x20

Example 2

To search the programs loaded on the current viewpoint processor for the symbol nearest to address 0x100:

Command input:

define nstring s

s = GetNearestProgramSymbol(0x100)

s

Result:

main

Related Topics: