I generate c source code and compile with `tcc -g -`. My generation code isn't 
sophisticated yet so there's a lot of unnamed temporary variables. Is there a 
reserved prefix that tcc will know not to create debug information for? So gdb 
won't show the variables?

If tcc has a way to mark a variable to be hidden that'd be very useful too. 
clang++ hides it when using c++ nodebug attribute. Here's a non tcc demo of 
what I'm trying to accomplish

int main() {
        int a [[gnu::nodebug]] = 1;
        int b = 2;
        int c = 3;
        return 0;
}

$ clang++ -g test.cpp 
$ gdb ./a.out -batch -ex 'br test.cpp:5' -ex 'r' -ex 'info locals'
Breakpoint 1 at 0x1140: file test.cpp, line 5.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Breakpoint 1, main () at test.cpp:5
5               return 0;
b = 2
c = 3


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to