16 November 2019, 18:49 | #1 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,233
|
trying to make m68k-amigaos-gdb on windows
Following step from https://franke.ms/amiga/gdb8.wiki I'm successfully using the cross compiler already, and installed the amiga side gdb server successfully.
But now I have a windows-side issue: m68k-amigaos-gdb cannot find "libpython27.dll". So I installed python for cygwin (because this library is in the python package for cygwin) But now one entrypoint (__chk_fail) is missing in my libpython27.dll version (from python 2.7.16). Anyone with a working gdb/python dll setup to share? |
16 November 2019, 20:52 | #2 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
python and python-devel are both on the list of prerequisites. => Install all the listed packages rinse and repeat. |
|
17 November 2019, 00:06 | #3 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,233
|
Thanks for replying in person (and also for your work, this is great for the amiga)
I didn't need cygwin to compile with the Amiga cross compiler until gdb asks for this cygwin only DLL. I've updated to the new gcc exe setup from your page and gdb runs from cygwin at least. I think it's possible to make it run natively from windows too sorry, the old 6.4 version I was stuck on wasn't working. Excellent work. Last edited by jotd; 17 November 2019 at 00:25. |
17 November 2019, 00:22 | #4 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 655
|
The other option is to compile gdb without python support in first place. I don’t know offhand what flag to pass, maybe Bebbo can help out.
|
17 November 2019, 00:28 | #5 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,233
|
thanks, I'd like to avoid compiling gdb on windows. I have edited my post after you replied. New version works from cygwin so that's a start
I wasn't aware that amiga gcc setup was built daily! Reminding the link which is lost in the 50 pages of the amiga gcc thread http://eab.abime.net/showthread.php?t=85474&page=52 |
17 November 2019, 10:04 | #6 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Just a side note: https://franke.ms/download/setup-amiga-gcc.exe is not compiled using cygwin - it uses msys2... |
|
17 November 2019, 11:29 | #7 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,233
|
yeah, it's very good that it uses msys2 because i can integrate it in my native toolchains & cmds. After another test, now I don't need cygwin anymore (debugger works without it too so good work)
Today I could connect the debugger to WinUAE with success. Only problem is that the debugger reports that no symbols are found. But there ARE symbols. I've used -g -O0 options and nm reports that there are symbols... Did I miss something? Code:
C:\DATA\jff\data\C++\games\Bagman>m68k-amigaos-nm bagman | more 000012ec D _DOSBase 00005264 D _GfxBase 0000526c D _IntuitionBase 000012f4 D _MathIeeeDoubBasBase 00005274 D _MathIeeeDoubTransBase 0000527c D _MathIeeeSingBasBase 000574de T _SDL_AddTimer 00056efe T _SDL_CreateRGBSurface 000572dc T _SDL_Delay 000571ee T _SDL_DisplayFormat 00057058 T _SDL_FillRect ... Code:
C:\DATA\jff\data\C++\games\Bagman>m68k-amigaos-gdb bagman GNU gdb (GDB) 8.3.50.191012-223043-git Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-pc-msys --target=m68k-amigaos". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from bagman... (No debugging symbols found in bagman) (gdb) |
17 November 2019, 11:46 | #8 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
there are symbols: function names and symbols: debug information despite the use of symbol for both it's different kind of information. So it seems you are creating object files containing debug infos, do you also link properly? That's either m68k-amigaos-gcc -g *.o -o exefile or m68k-amigaos-ld -amiga-debug-hunk ... -o exefile And a hint here: instead of copying the file to the Amiga use m68k-amigaos-strip exefile -o path/to/amiga/exefile since there is no use of loading the debug info into the Amiga's ram. |
|
17 November 2019, 14:17 | #9 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,233
|
no I didn't use -amiga-debug-hunk. nor -g to link. Adding -amiga-debug-hunk fixes the issue. I've started the program and stopped in main. Well done & thanks for the quick answer.
|
29 December 2020, 09:58 | #10 |
Registered User
Join Date: Jun 2020
Location: Australia
Posts: 18
|
Bumping an old thread
I've been trying to get gdb to work for a few days now to no avail. It seems to crash when I try listing the symbols, any ideas ? I used the package containing pre-compiled binaries for CentOS. I also tried recompiling from scratch and get the same fault in CentOS and Ubuntu. All the other binaries work fine except for gdb For reference here's a simple c program and error right at the end. #include <stdio.h> int main(int argc, char** argv) { for(int i=0;i<argc;i++) printf("Arg #%d -> "%s"\n",i,argv[i]); return 0; } [shoestring@amigadev ~]$ /home/shoestring/opt/amiga/bin/m68k-amigaos-gcc -g main.cpp -o main [shoestring@amigadev ~]$ /home/shoestring/opt/amiga/bin/m68k-amigaos-gdb main GNU gdb (GDB) 10.0.50.201222-135122-git Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-pc-linux-gnu --target=m68k-amigaos". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from main... (gdb) list Aborted (core dumped) |
29 December 2020, 22:37 | #11 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
1. your example does not compile fixed version is Code:
#include <stdio.h> int main(int argc, char** argv) { for(int i=0;i<argc;i++) printf("Arg #%d -> %s\n",i,argv[i]); return 0; } 2. use -noixemul (unless you are forced to use something different) 3. why .cpp for a C-source? never mind... ... ahhh - maybe that's the crash's cause!? for .c it's working I'll look into it, if I have time |
29 December 2020, 22:53 | #12 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
fix for this specific issue is queued - should be live soon
Code:
(gdb) list 1 #include <stdio.h> 2 3 int main(int argc, char** argv) 4 { 5 for(int i=0;i<argc;i++) 6 printf("Arg #%d -> %s\n",i,argv[i]); 7 return 0; 8 } 9 (gdb) |
30 December 2020, 06:09 | #13 | |
Registered User
Join Date: Jun 2020
Location: Australia
Posts: 18
|
Quote:
That was quick. Downloaded, cloned the source and built it this morning. I really appreciate your help. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
m68k-amigaos-gdb | bebbo | Coders. C/C++ | 94 | 06 May 2023 21:56 |
m68k-amigaos-ld.exe bug ? | FrenchShark | Coders. General | 2 | 30 November 2009 09:54 |
Wow... They still make the ENTIRE m68k lineup | Madcrow | support.Hardware | 3 | 03 June 2008 18:17 |
Shorten ported to AmigaOS m68k and WarpOS | Paul | News | 0 | 20 August 2006 12:05 |
A tool to make shortcut icons in AmigaOS 3.1? | Tbird | request.Apps | 2 | 27 January 2003 23:20 |
|
|