Announce: Interface to RTEMS symbol table + C expressions

Till Straumann strauman at SLAC.Stanford.EDU
Wed Jan 30 21:28:22 UTC 2002


Hi All.

I finally wrote this utility I always found missing in RTEMS
(hope I didn't reinvent the wheel).

It reads the symbol table from an ELF file and adds a
C-expression parser + lookup utilities (including regexp
pattern searching).

An example session (run on RTEMS target) looks like this:

I first search for the 'printf' and 'rtems_panic' routines
and then subsequently call them from a C-style expression.

I need to iron out a few wrinkles, then it'll become available.
Mostly, I have problems getting libreadline to work...

Cheers

-- Till

Eric, this could probably be integrated with IOCsh...

Cexpr>
Cexpr>
Cexpr>lkup("^print.*")

    001415c[1348] FUNC : print_filename
    008b0a0[  20] FUNC : printable
    0014104[  88] FUNC : printable_part
    008ffc4[ 172] FUNC : printf
    0030cb0[ 228] FUNC : printk
0000000 (0)
Cexpr>
Cexpr>lkup("panic$")

    002569c[  60] FUNC : BSP_panic
    005fa18[ 136] FUNC : rtems_panic
0000000 (0)
Cexpr>
Cexpr>(0xcafe && printf("\nprintk: %08x\n",printk)) || rtems_panic("no
panic")

printk: 00030cb0

0000001 (1)
Cexpr>





More information about the users mailing list