[fpc-devel] MacOS/dwarf: Was there any change to how/when relocation info is included.

Jonas Maebe jonas at freepascal.org
Fri Mar 25 20:25:47 CET 2022


On 24/03/2022 01:57, Martin Frb via fpc-devel wrote:
> It appears with 3.2.2  the address of a global var in dwarf already 
> contains the relocation.
> Since fpdebug, does not retrieve any relocation info from lldb, it does 
> not adjust any addresses.
> 
> But with 3.3.1 it seems different.
> 
> https://forum.lazarus.freepascal.org/index.php?topic=58822.new#new
> 
> The test app has 2 global vars.
> They can be inspected if compiled with 3.2.2.
> 
> But compile with 3.3.1 and fpdebug send the following to  lldb:
>    memory read --force --size 1 --format x --count 4 1008
>    memory read --force --size 1 --format x --count 4 1012
> Looks like the offset within the exe, without relocation.
> 
> Was there an intentional change to introduce this?

git diff -w tags/release_3_2_2..main compiler/dbgdwarf.pas doesn't 
really show any impactful changes between the two versions. 
tf_dwarf_relative_addresses is also still set in 
compiler/systems/i_darwin.pas


Jonas


More information about the fpc-devel mailing list