Skip to content

Is v -g working yet? #17779

Mar 26, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

First, V doesn't create a.out files (unless you tell it to with -o a.out), so I don't know why you would be looking at that.

Debug info is there by default. In fact, you have to run the strip command to remove it.

$ v hello_world.v
$ file hello_world
hello_world: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 4.4.0, not stripped
$

(the not stripped at the end means there is debug info present)

Running objdump -W hello_world displays all the debug info (quite a bit of output).

As far as -g option, all it does is make it so you see V line numbers instead of C line numbers in error messages. You can also use -cg

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xiongmao86
Comment options

Answer selected by xiongmao86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants