[Top][All Lists]

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

Re: [Tinycc-devel] standalone backtraces

From: Christian Jullien
Subject: Re: [Tinycc-devel] standalone backtraces
Date: Sat, 18 Jan 2020 08:32:16 +0100

Hi Grischka,

Thank you for this very useful contribution. I have however a concern on the 
way you load the different new files:
+    if (s1->do_backtrace) {
+        if (s1->do_bounds_check && s1->output_type != TCC_OUTPUT_DLL)
+            tcc_add_support(s1, "bcheck.o");
+        if (s1->output_type == TCC_OUTPUT_EXE)
+            tcc_add_support(s1, "bt-exe.o");
+        if (s1->output_type == TCC_OUTPUT_DLL)
+            tcc_add_support(s1, "bt-dll.o");
+        if (s1->output_type != TCC_OUTPUT_DLL)
+            tcc_add_support(s1, "bt-log.o");
+        if (s1->output_type != TCC_OUTPUT_MEMORY)
+            tcc_add_btstub(s1);
+    }

It supposes that there is only one memory model (either 32 or 64). More 
specifically, it prevents tcc to support multi-archive using -m32/-m64.
IMHO, it would be better to build libbcheck.a (or whatever name you like) which 
contains all material to support bound checking and bt.
Multi-archive will internally use libbcheck-32.a and libbcheck-64.a



-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On 
Behalf Of grischka
Sent: Friday, January 17, 2020 23:22
To: address@hidden
Subject: [Tinycc-devel] standalone backtraces

Hi folks,

Thought the entire bcheck stuff is pretty much completely useless
if it doesn't give you any hint where in the your code the problem
actually happens.  So I added some patch of mine that allows tcc to
include the backtrace features for -run into standalone executables.

It should work with DLLs/SOs too (i.e. multiple instances of stab
debug infos).  See


--- grischka

Tinycc-devel mailing list

reply via email to

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