English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. Language (http://eab.abime.net/forumdisplay.php?f=114)
-   -   GCC and GCCFindHit (http://eab.abime.net/showthread.php?t=63131)

tygre 13 February 2012 05:07

GCC and GCCFindHit
Dear all!

Has anyone of you used GCCFindHit to debug a program cross-compiled with Windows/CygWin/GCC for AmigaOS v3.1?

When compiling thttp, I use the options -g -O2. When running thttpd, Enforcer reports some hits. I would like to use the data from Enforcer to locate the sources of the hits:


----> 680B907C - "LIBS:locale.library"  Hunk 0000 Offset 00001AF4
but GCCFindHit thttpd 00001AF4 returns nothing (nothing is printed in the console). What am I doing wrong? Should I use -gstabs? Any suggestions/comments are welcome :)


PS. I just found a page dedicated to AmigaOS 4, that uses -gstabs and addr2line to get the line number causing a hit, however I can't seem to find addr2line for AmigaOS 3.

matthey 14 February 2012 04:22

It's been a while since I used Enforcer (I use MuForce) so I'm not sure of the output but I believe thttp has called (jumped into) a function in locale.library where the hit occurs. This is usually caused by incorrect data being passed to an AmigaOS function (probably in locale.library). GCCFindHit thttpd 00001AF4 looks for the offset in thttpd but the hit looks to me like it occurs in the locale.library (different hunk). If GCCFindHit was possible with locale.library, it would probably give you the locale.library function being passed the bad function data. There are ways to find out the locale.library function with a disassembler or Scout. There is the possibility that another program than thttpd jumped into the locale.library and caused this hit as the task is not given. MuForce can give more information like the task.

tygre 20 February 2012 17:45

Hi Matthey!

Thanks a lot for the explanations, I (think that I) understand better now... I will look into Scout and keep you posted!


All times are GMT +2. The time now is 06:55.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.05695 seconds with 11 queries