Hello all.

(Before I begin may I remark to the admins that I searched for "Emuk68KMain.c" 
and no results came up, even though I saw a message with that topic.)

I am trying to set up a development environment for a project that was written 
with Palm OS SDK 3.5, using PRC-Tools.
I'm going completely open-source, and using SlickEdit to edit my code (if you 
don't know it - it's highly recommended).

I worked pretty hard for the last two days trying to compile, link, and set up 
debugging using GDB (I must say that PRC-Tools's documentation is pretty good).

Here are the steps I took before getting the error in the subject:
1) I compiled my resource file (.rcp) using pilrc
2) I compiled all my code files (.c) using m68k-palmos-gcc
3) I generated the sections file (.s) using multigen
4) I compiled the sections file (.s) using m68k-palmos-gcc
5) I linked all my object files (.o) and the sections ld file (.ld) with 
m68k-palmos-gcc, and got a final object file.
6) I built the prc using build-prc

All is good, everything compiled neatly (I had to remove some code parts that 
used a Handspring SDK that I didn't have, but no matter).

I uploaded the prc to the device, executed and - crash. I get the message in 
the subject.
The address of the illegal instruction seems to be OK - it's not like it's 
"0000001" or something, that might indicate a memory corruption.

So, after uploading gdbpanel.prc (enables debugging on the device side) to the 
device, I fire up tcpusb.exe (used as a bridge between the GDB debugger and the 
device) and m68k-palmos-gdb (the debugger itself).

I hit "Debug" on the device's gdbpanel, and the device connected to tcpusb.exe.
Then I connect GDB to tcpusb.exe using the command "target palmos":

(gdb) target palmos
Remote debugging under PalmOS using localhost:2000
Waiting... (Press Ctrl-C to connect to halted machine)

Then I set a breakpoint in GDB using the "break" command:

(gdb) break PilotMain

Then I continue execution...

(gdb) continue
Continuing.

In the device I go to my application and start it.
The device screen goes blank (since the debug breakpoint was hit).
In GDB, I receive these exact lines:

Emul68KMain.c, Line:403, illegal instruction 00DE at address 007C1CD8
Program received signal SIGEMT, Emulation trap.
0x007c1cda in ?? ()

I believe that the question marks ("??") indicate that the error occured even 
before entering PilotMain. Am I wrong?

To find out more, I type in the command to show the stack trace:

(gdb) where
#0  0x007c1cda in ?? ()
#1  0x0074f176 in ?? ()
#2  0x0074ef84 in ?? ()
#3  0x0074e9e6 in ?? ()

This, of course, tells me nothing :)

Can anyone nudge me in the right direction?
I fought so hard to get the project to compile and link, it seems such a small 
matter to get it to actually run!

Any help will be greatly appreciated.

Jonathan

P.S. Attached is the GDB log of the session.

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/
$ m68k-palmos-gdb Sivan
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=m68k-palmos"...
(gdb) target palmos
Remote debugging under PalmOS using localhost:2000
Waiting... (Press Ctrl-C to connect to halted machine)
0x0074c89c in ?? ()
(gdb) break PilotMain
Breakpoint 1 at 0x552: file Sivan.c, line 1391.
(gdb) continue
Continuing.
Emul68KMain.c, Line:403, illegal instruction 00DE at address 007C1CD8

Program received signal SIGEMT, Emulation trap.
0x007c1cda in ?? ()
(gdb) where
#0  0x007c1cda in ?? ()
#1  0x0074f176 in ?? ()
#2  0x0074ef84 in ?? ()
#3  0x0074e9e6 in ?? ()
(gdb)

Reply via email to