Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OMPD] The LLVM OMPD library does not call the symbol address lookup callback function correctly #62

Open
jdelsign opened this issue Feb 27, 2019 · 0 comments

Comments

@jdelsign
Copy link

The LLVM OMPD library does not call the symbol address lookup callback function correctly. Specifically, it fails to pass in a value for the file_name parameter. For example:

    TValue::TValue(ompd_address_space_context_t *_context,
		   ompd_thread_context_t *_tcontext, const char *_valueName,
		   ompd_addr_t segment)
	: errorState(ompd_rc_ok), type(&nullType), pointerLevel(0),
	  /*valueName(_valueName),*/ context(_context), tcontext(_tcontext),
	  fieldSize(0) {
      errorState.errorCode =
	  callbacks->symbol_addr_lookup(context, tcontext, _valueName, &symbolAddr);
      symbolAddr.segment = segment;
      //  assert((ret==ompd_rc_ok) && "Callback call failed");
    }

The call "callbacks->symbol_addr_lookup()" is incorrect because there should be a fifth argument, which is the file name or a null (0) pointer.

The OMPD v5.0 spec signature for that function is:

    typedef ompd_rc_t (*ompd_callback_symbol_addr_fn_t)(
	ompd_address_space_context_t *address_space_context,
	ompd_thread_context_t *thread_context, const char *symbol_name,
	ompd_address_t *symbol_addr, const char *file_name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants