<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,<br>
</p>
<div class="moz-cite-prefix">Στις 10/2/2021 11:12 μ.μ., ο/η Christo
Crause έγραψε:<br>
</div>
<blockquote type="cite"
cite="mid:CAGOmfbGYU-h8bJzPnmrihbAtDnK27Jqyy6NgYB3J-gs=ZjPPXw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Feb 10, 2021 at 3:16
PM Dimitrios Chr. Ioannidis via fpc-devel <<a
href="mailto:fpc-devel@lists.freepascal.org"
target="_blank" moz-do-not-send="true">fpc-devel@lists.freepascal.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi,<br>
</p>
<div>Στις 10/2/2021 2:25 μ.μ., ο/η Christo Crause έγραψε:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">On Wed, Feb 10, 2021 at 12:47 PM
Dimitrios Chr. Ioannidis via fpc-devel <<a
href="mailto:fpc-devel@lists.freepascal.org"
target="_blank" moz-do-not-send="true">fpc-devel@lists.freepascal.org</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px
0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I read at compiler/systems/i_embed.pas the AVR
systeminfo, is the <br>
only one that, has as default "dbg : dbg_dwarf3".
The other embed <br>
systems that uses dwarf ( ARM, MIPSEL, i8086,
m68k, RISCV32/64, XTENSA, <br>
Z80 ), all have as default "dbg : dbg_dwarf2".<br>
<br>
The AVR has problems with dbg_dwarf2 ? If not,
could you please <br>
change the AVR systeminfo to dwarf2 also for
consistency ?<br>
</blockquote>
<div><br>
</div>
<div>That was a fix for compiling controller units
with lots of symbols, refer to this discussion
thread: <a
href="https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg35416.html"
target="_blank" moz-do-not-send="true">https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg35416.html</a></div>
<div>Dwarf2 is fine in general, unless the address
(I think address in dwarf debug section, the
details are a bit hazy in my memory) of symbols
exceed 65535. Dwarf3 offers a larger data type for
this scenario.</div>
</div>
</div>
</blockquote>
<p> I'm using ppcrossavr with systeminfo default "dbg :
dbg_dwarf2" with no problems. If I remember correctly,
IMHO, fixing the issue 33914 ( <a
href="https://bugs.freepascal.org/view.php?id=33914"
target="_blank" moz-do-not-send="true">https://bugs.freepascal.org/view.php?id=33914</a>
) had the collateral effect to fixing also the above.</p>
<p> For test, I just debugged a physical atmega32u2 mcu
with Lazarus with no problems at all. Also for test, I
builded an avr35 subarch ppcrossavr and also debugged a
physical atmega32u2 mcu with no problems.</p>
</div>
</blockquote>
<div><br>
</div>
<div>You are probably right, I never checked if the pointer
change of #33914 also fixed the original issue in the
mailing list so the default dwarf version for AVR could be
changed back to 2. But then Florian does have a point, why
not make the default for all targets dwarf 3?<br>
</div>
</div>
</div>
</blockquote>
<p>I really don't know enough to have an opinion on this. As Florian
wrote, Martin can answer this.</p>
<p>But if dwarf 3 is the default for avr, then IMHO, in avr link
script generation are missing the following :</p>
<p>===================================================================<br>
--- t_embed.pas (revision 48516)<br>
+++ t_embed.pas (working copy)<br>
@@ -1074,6 +1074,11 @@<br>
Add(' .debug_str 0 : { *(.debug_str) }');<br>
Add(' .debug_loc 0 : { *(.debug_loc) }');<br>
Add(' .debug_macinfo 0 : { *(.debug_macinfo) }');<br>
+ Add(' /* DWARF 3 */');<br>
+ Add(' .debug_pubtypes 0 : { *(.debug_pubtypes) }');<br>
+ Add(' .debug_ranges 0 : { *(.debug_ranges) }');<br>
+ Add(' /* DWARF Extension. */');<br>
+ Add(' .debug_macro 0 : { *(.debug_macro) }');<br>
Add('}');<br>
end;<br>
{$endif AVR}<br>
</p>
<p>regards,</p>
<p>-- <br>
</p>
<p>Dimitrios Chr. Ioannidis<br>
</p>
</body>
</html>