All pastes #901218 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-12 14:42 UTC
rendered paste body
Note this output:

Testing error no with dwfl pointer 0x107b880 address 0x38cba9ac30
Method name is: __nanosleep_nocancel
Returning
Testing error no with dwfl pointer 0x107b500 address 0x402f1a
Exception in thread "main" java.lang.NullPointerException
   at lib.dwfl.DwflModule.getSymbol(DwflModule.cxx:126)
   at frysk.symtab.SymbolFactory.getSymbol(SymbolFactory.java:86)

From this code:

void
lib::dwfl::DwflModule::getSymbol(jlong address, lib::dwfl::SymbolBuilder* symbolBuilder)
{
	Dwarf_Addr addr = (Dwarf_Addr) address;
	GElf_Sym closest_sym;

	printf("Testing error no with dwfl pointer 0x%lx address 0x%lx\n",(long) DWFL_MODULE_POINTER, (long) address);
	const char* methName = dwfl_module_addrsym(DWFL_MODULE_POINTER, addr, 
                                                   &closest_sym, NULL);
	if (errno != 0)
	  printf("Erro no is %d.  Message: %s\n", errno, strerror(errno));
	else
	  printf("Method name is: %s\n", methName);