tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Support for sections describing frames.


From: Herman ten Brugge
Subject: Re: [Tinycc-devel] Support for sections describing frames.
Date: Sat, 9 Nov 2024 09:31:54 +0100
User-agent: Mozilla Thunderbird

On 10/7/24 23:16, Max Logaev wrote:
Hello!

I noticed that with debug options TCC does not generate ".debug_frame" (described by the DWARF 
standard) or similar extended ".eh_frame" + ".eh _framehdr" 
(https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html).

And the second one seems critical. I encountered this problem because of 
incorrect work of bactrace() from glibc 
(https://www.gnu.org/software/libc/manual/html_node/Backtraces.html).

The thing is that bactrace() uses unwinding functions from the libgcc library 
for backtracing. And the libgcc library uses .eh_frame.

I think that this debug information would be useful provided that TCC supports 
several architectures and unwinding for each architecture may differ.

Also, I do not quite understand how the "-bt" option works. It seems that this 
is something completely non-standard.

I would like to know if such functionality is needed or is it redundant? I just 
would like to tackle this task.
I added support for .eh_frame and .eh_framehdr.
backtrace() should now work on most targets.

    Herman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]