tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Bug using -g with line directive


From: Levo D
Subject: Re: [Tinycc-devel] Bug using -g with line directive
Date: Tue, 17 Jan 2023 04:00:05 +0000 (UTC)

Herman thank you very much. I'm amazed you made these fixes so quickly.

On linux things seem to look good. Adding "miDebuggerArgs": "--readnow"` to 
vscode launch.json solves my problem. I don't develop on mac much. I'm satified 
with the latest patch. I can confirm that I am able to set break points, print 
variables, move around the stack and print the local variables. vscode is 
unusable but there's probably 0 people using my compiler who uses mac. I'm 
perfectly content with the present state, I can debug with it without a problem 
(or at least I believe I can, I have no mac specific code I'd like to debug).

I noticed when a breakpoint hits (on mac) it doesn't show the source while 
clang build does. I just thought I'd report it, I'm perfectly content.

tcc -g a.c

bash-3.2# lldb a.out
(lldb) target create "a.out"
Current executable set to '/private/tmp/t/a.out' (arm64).
(lldb) b a.bolin:5
Breakpoint 1: where = a.out`test0 + 32 at a.bolin:5, address = 
0x0000000100001020
(lldb) r
Process 1178 launched: '/private/tmp/t/a.out' (arm64)
Process 1178 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100001020 a.out`test0 at a.bolin:5
Target 0: (a.out) stopped.
(lldb) 

------------------------------------------------------------

gcc -g a.c -o b.out

bash-3.2# lldb b.out
(lldb) target create "b.out"
Current executable set to '/private/tmp/t/b.out' (arm64).
(lldb) b a.bolin:5
Breakpoint 1: where = b.out`test0 + 16 at a.bolin:5:17, address = 
0x0000000100003f08
(lldb) r
Process 1183 launched: '/private/tmp/t/b.out' (arm64)
Process 1183 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100003f08 b.out`test0 at a.bolin:5:17
   2            array := $s32[10]
   3            array[0] = 0
   4            array[1] = 3
-> 5            array[2] = 6
   6            array[3] = 9
   7            array[4] = 12
   8            array[5] = 15
Target 0: (b.out) stopped.
(lldb) 





reply via email to

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