Closed cahirwpz closed 2 years ago
to be visible in gdb, you need to add debug infos via .stabs and .stabstr.
You're right! It was enough to add following STABS to assembly file:
#include <stab.h>
.stabs "syscall.S",N_SO,0,0,0
.stabs "int:t1=r1;0020000000000;0017777777777;",N_LSYM,0,0,0
...
.stabs "_frameCount", N_ABS|N_EXT, 0, 0, 0x3fc
.stabs "frameCount:G1", N_GSYM, 0, 1, 0
To make gdb
understand what frameCount
is and where is it placed in memory.
Thanks for the hint! You may close the issue if you wish to do so.
When I assemble
syscall.S
file containing following line:I get a relocatable file
syscall.o
and when I investigate exposed symbols I get following:... which is expected.
However the absolute symbols are not carried to the executable file, which I verified with
m68k-amigaos-nm system/system.exe.dbg | grep _frameCount
andm68k-amigaos-strings system/system.exe.dbg | grep frameCount
(both give me nothing). Thus I cannot displayframeCount
variable defined asextern int frameCount
using gdb'sprint
command.