English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 16 November 2019, 19:49   #1
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,299
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?
jotd is online now  
Old 16 November 2019, 21:52   #2
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 429
Quote:
Originally Posted by jotd View Post
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?



python and python-devel are both on the list of prerequisites.


=> Install all the listed packages rinse and repeat.
bebbo is offline  
Old 17 November 2019, 01:06   #3
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,299
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 01:25.
jotd is online now  
Old 17 November 2019, 01:22   #4
pipper
Registered User

 
Join Date: Jul 2017
Location: San Jose
Posts: 148
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.
pipper is offline  
Old 17 November 2019, 01:28   #5
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,299
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
jotd is online now  
Old 17 November 2019, 11:04   #6
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 429
Quote:
Originally Posted by jotd View Post
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



Just a side note: https://franke.ms/download/setup-amiga-gcc.exe is not compiled using cygwin - it uses msys2...
bebbo is offline  
Old 17 November 2019, 12:29   #7
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,299
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
...
gdb failing to load symbols:

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)
jotd is online now  
Old 17 November 2019, 12:46   #8
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 429
Quote:
Originally Posted by jotd View Post
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
...
gdb failing to load symbols:

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)

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.
bebbo is offline  
Old 17 November 2019, 15:17   #9
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,299
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.
jotd is online now  
 


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++ 48 20 November 2019 22:33
m68k-amigaos-ld.exe bug ? FrenchShark Coders. General 2 30 November 2009 10:54
Wow... They still make the ENTIRE m68k lineup Madcrow support.Hardware 3 03 June 2008 19:17
Shorten ported to AmigaOS m68k and WarpOS Paul News 0 20 August 2006 13:05
A tool to make shortcut icons in AmigaOS 3.1? Tbird request.Apps 2 28 January 2003 00:20

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07032 seconds with 13 queries