Skip to content

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

Description

@jdelsign

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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions