I checked online and found some instructions on how the use GDB with nim. So, I'm using --debugger:native before starting nim-gdb and starting debugging. But then I'm here:
Temporary breakpoint 1, main (argc=3, args=0x7fffffffd1f8, env=0x7fffffffd218)
at /home/marko/.choosenim/toolchains/nim-2.0.2/lib/std/private/ospaths2.nim:217
217 break
(gdb) list
212
213 var sepPos = -1
214 for i in countdown(len(path)-1, stop):
215 if path[i] in {DirSep, AltSep}:
216 sepPos = i
217 break
218 if sepPos >= 0:
219 result.head = substr(path, 0,
220 when (NimMajor, NimMinor) <= (1, 0):
221 sepPos-1
I'm confused why I would end up at this location.Temporary breakpoint 1, main (argc=4, args=0x7fffffffd1c8, env=0x7fffffffd1f0) at /home/marko/.choosenim/toolchains/nim-2.0.2/lib/std/private/ospaths2.nim:217 217 break (gdb) backtrace #0 main (argc=4, args=0x7fffffffd1c8, env=0x7fffffffd1f0) at /home/marko/.choosenim/toolchains/nim-2.0.2/lib/std/private/ospaths2.nim:217
This looks to me like the symbol table is not right. When I look at line 217 in that file, there's no main function anywhere near...