SHA256 for all Ataris

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

mikro
Hardware Guru
Hardware Guru
Posts: 1827
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: SHA256 for all Ataris

Postby mikro » Fri Feb 01, 2019 6:52 am

Eero Tamminen wrote:Doesn't GDB work with GCC compiled binaries for source level debugging, at least under MiNT? (At least old GDB / GCC versions did.)

As Thorsten said, unfortunately the new gcc versions (>= 4.x) suffer from a bug which makes gdb hardly usable. It has something to do with so called 'stabs' format which had been used for a.out targets but as soon as Linux (and others) switched to 'DWARF', nobody has been really maintaining 'stabs' support.

If one has (MiNT) network connection, one might be able to run gdbserver on Atari and GDB GUI, such as DDD on PC:

Yes, that's possible (with the older gcc+gdb combo).

Btw. older GCC versions supported also the old DRI symbol format, which should work with most Atari debuggers. Getting that requires "-Wl,--traditional-format" GCC linker flag.

That still works in newer versions, too.

Btw I have m68k-atari-mint-gcc-2.95 cross compiler in the works (meaning buildable/usable on 64-bit systems) so one could make debug builds with this gcc (as its gdb friendly) and then do the final build with the latest gcc.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1868
Joined: Sun Jul 31, 2011 1:11 pm

Re: SHA256 for all Ataris

Postby Eero Tamminen » Fri Feb 01, 2019 8:36 pm

mikro wrote:
Eero Tamminen wrote:Doesn't GDB work with GCC compiled binaries for source level debugging, at least under MiNT? (At least old GDB / GCC versions did.)

As Thorsten said, unfortunately the new gcc versions (>= 4.x) suffer from a bug which makes gdb hardly usable. It has something to do with so called 'stabs' format which had been used for a.out targets but as soon as Linux (and others) switched to 'DWARF', nobody has been really maintaining 'stabs' support.
...
Btw I have m68k-atari-mint-gcc-2.95 cross compiler in the works (meaning buildable/usable on 64-bit systems) so one could make debug builds with this gcc (as its gdb friendly) and then do the final build with the latest gcc.


Why not the latest GCC version which output still works with GDB? (Based on your comment, 3.x should still work, as it broke in 4.x)


ThorstenOtto wrote:
Eero Tamminen wrote:For assembly level debugging of GCC compiled code, one can use Hatari debugger.


Good luck in trying to do this with gcc compiled code. Some functions you try debug won't even exist because they are inlined.


I've debugged some crashes on Linux from GCC optimized/generated x86 assembly which I understand much less than m68k assembly.

However, that assembly output listed closest preceding symbol name + offset for things like jumps & braches. That made it much easier to read, as one could see where e.g. printf() was called etc.

Such a feature would be nice also for Hatari disassembly output, but currently its debugger relies completely on the CPU core (or separate disassembler) for generating the assembly, and that doesn't currently know anything about symbols loaded by the debugger.


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 0 guests