Forum > macOS / Mac OS X

IDE Leaks and Traces "Resolve" fails on Mac OSX (

<< < (3/3)

Martin_fr:
Another way to check what happens

Look for "procedure TDwarfCompilationUnit.BuildAddressMap;" in components/fpdebug.

If the files are loaded, this code will build a map of the addresses of all subroutines found.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---                if FAddressMap.HasId(Info.StartPC)                then DebugLn(FPDBG_DWARF_WARNINGS, ['WARNING duplicate start address: ', IntToHex(Info.StartPC, FAddressSize * 2)])                else FAddressMap.Add(Info.StartPC, Info); 
You want to add

writeln(Info.StartPc, ' # ', Info.Name);
or
writeln(DbgHex(Info.StartPc),'-',dbghex(info.EndPC), ' # ', Info.Name);

Then when you try to resolve (and when lazarus has a console to print to) you would see if it loaded any functions. You would also see, if any of them has an address that matches your unresolved addresses.

If none are listed, then the problem is in loading debug info.

If all the addresses are a complete mismatch, the issue is with relocation info (i.e. addresses are written relative to something, and need an offset when loaded)

kcandrews:
Martin,
" (and when lazarus has a console to print to) "
How do I accomplish providing a console for lazarus?
Thanks,
Keith

Martin_fr:
In short, open a terminal and run lazarus from there.

I don't recall the name, but a terminal is included on Mac. Then change to the Lazarus dir (where ever that is for you).


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---cd /home/user/lazarus./lazarus.app/MacOS/Content/lazarus 
Something like that.


To write info to a file

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---./lazarus.app/MacOS/Content/lazarus  --debug-log=file

To get all the build in debug info (use with or without the debug-log=)

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---./lazarus.app/MacOS/Content/lazarus  --debug-log=file   --debug-enable=DBG_VERBOSE,FPDBG_DWARF_ERRORS
and any amount of others.

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---grep -nri FindOrRegisterLogGroup  components/fpdebug components/lazdebuggers

dbannon:

--- Quote from: Martin_fr on January 28, 2024, 12:49:41 am ---
--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---./lazarus.app/MacOS/Content/lazarus  --debug-log=file   --debug-enable=DBG_VERBOSE,FPDBG_DWARF_ERRORS
--- End quote ---

Things are never as easy as you expect on a Mac !


--- Code: --- open ./lazarus.app/MacOS/Content/lazarus --args     "--debug-log=file"  "--debug-enable=DBG_VERBOSE,FPDBG_DWARF_ERRORS"
--- End code ---

Might work better.

kcandrews:
Thanks Martin & Davo!
I will follow up on your suggestions...but it will be a few days due to some urgent priorities :-)
Keith

Navigation

[0] Message Index

[*] Previous page

Go to full version