Topic
  • 1 reply
  • Latest Post - ‏2012-10-19T14:52:19Z by SystemAdmin
MichaelMaxie
MichaelMaxie
1 Post

Pinned topic local_symbol is not returning to my plugin code.

‏2010-06-14T23:08:34Z |
I'm trying to create a DBX plug-in and locate_symbol is misbehaving.
Here is a snippet of my plug-in.
------------------8<--------------------
dbx_plugin_syminfo_t sym = { symbol, 1, -1 } ;
res = (*(dbx.locate_symbol))(sid, &sym, sizeof(sym), 1); // <--------------------------------- Doesn't return to my code.
if(res != DBX_PLUGIN_SUCCESS) {
cout << __FUNCTION__ << ":" << __LINE__ << " Symbol not found " << endl;
printf("Symbol not found!!! return code: 0x%x\n", res);
return;
}
------------------8<--------------------
DBX output
------------------8<--------------------
DBX-> pluginload /CMSynergy/mmaxie/ccm_wa/sitatexdb/STX-MSW~mmaxie_3.5.1/STX-MSW/src/tools/dbx/libdbx_stx.so
plug-in "/CMSynergy/mmaxie/ccm_wa/sitatexdb/STX-MSW~mmaxie_3.5.1/STX-MSW/src/tools/dbx/libdbx_stx.so" loaded
DBX-> set edit emacs
DBX-> stop at "bi_input.cc":184
[1] stop at "bi_input.cc":184
DBX-> cont
[1] stopped in input_message_processing(BX_RqTypeB*) at line 184 in file "/CMSynergy/mmaxie/ccm_wa/sitatexdb/STX-MSW~mmaxie_3.5.1/STX-MSW/src/typeb/binput/bi_input.cc" ($t1)
184 if (Active != state_a && msg->GetInputConnection()->GetConnectionNumber() != reject_cnx->GetConnectionNumber())
DBX-> whatis msg
class CM_Ptr<BX_TypeBMsg> msg;
DBX-> stx_BX_TypeBMsg msg
"msg" is not currently defined
DBX-> detach
------------------8<--------------------
I would expect my cout to print if the symbol didn't exist.

Anyone have any suggestions?

Thanks in advance.
Updated on 2012-10-19T14:52:19Z at 2012-10-19T14:52:19Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    549 Posts

    Re: local_symbol is not returning to my plugin code.

    ‏2012-10-19T14:52:19Z  
    I have the issue. First of all, check the program you are debugging was build using "-g" that is it has the symbol table included.
    Second, even if the function returs success, test for sym.addr to be nonzero