tsuru...@gmail.com
unread,Mar 21, 2013, 12:37:01 AM3/21/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
I am developing a C program for VxWorks6.4 in cross-compiling environment (WindRiver Workbench),and having a problem in symFindByName library function.
The below program should find the name "symbol_search" in the system symbol table but the function returns the errno meaning the name can't be found.
#include <stdio.h>
#include <symLib.h>
#include <sysSymTbl.h>
void symbol_search(void)
{
STATUS st;
char* name = "symbol_search";
char* value;
SYM_TYPE type;
st = symFindByName(sysSymTbl, name, &value, &type);
if (st == ERROR) {
printf("Can't find the symbol:%s\n", name);
printf("errno=%x\n", errno);
} else {
printf("Symbol:%s was found\n", name);
}
}
I loaded the program to the target and executed it from the shell on the target not on the host. Below is the screenshot of the target. As you see, the name CAN be found with lkup shell command but can't be found with the program. Any suggestions are great help.
VxWorks login: target
Password:
->
->
-> ld < /RAM/Sample/symbol_search.out
value = 1228675140 = 0x493c1844
->
->
-> symbol_search
Can't find the symbol:symbol_search
errno=1c0001
value = 13 = 0xd
->
->
-> lkup "symbol_search"
symbol_search 0x49ce6e30 text (symbol_search.out)
value = 0 = 0x0
->
Tom Tsuruta