UVM Register Model Question

In reply to samerh:

add_hdl_path_slice and add_hdl_path are both used to set the hierarchy path of a register in the test bench. This XMR (cross module reference) path is used to do back door access to the register. My question is this: Is there a way to print this XMR path for a register in the log file when running the simulation by adding some code to the sequence that is trying to do a write and read to the register?
The reason I am asking this question is that I want to be able to find the register in the DUT by knowing its XMR.
Pls help!

uvm_hdl_path_concat paths[$];
register.get_full_hdl_path(.paths(paths));
foreach(paths[i]) begin
    `uvm_info(get_name(), $sformatf("HDL path: %s", paths[i]), UVM_MEDIUM)
end

Something like that.