Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Debugging syncNotification code

1 view
Skip to first unread message

Stuart D. Gathman

unread,
Sep 25, 2005, 10:37:00 PM9/25/05
to
I converted the Mail app from the SDK 4.0 to prc-tools, converting the
resources using both ptools to extract from the PRC and the open
source rsrc2rcp Perl tool (I would be happy to buy the commercial one,
except I don't have or ever want to have Windows).

It runs fine - EXCEPT, when it is responding to sysAppLaunchCmdSyncNotify.
Then it gets a Fatal Exception, requiring a soft reset. POSE says it is
trying to access globals (and that is not allowed from SyncNotify). I
have been over and over the source, but I am new to Palm programming, and
don't see where it is accessing any globals. Besides, I would have
thought it was working code. I must have made a boo boo when converting.
The only thing I did to the C code was add
__attribute__((section("lib"))) to the functions not in Mail.c so that
there aren't are reloc overflows.

How does one go about debugging the SyncNotify event? I can't seem to
figure out how to get control at the right time with gdb, and still have
proper memory map. I have no problem using gdb to debug
sysAppLaunchCmdNormalLaunch on POSE.

--
Stuart D. Gathman <stu...@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

Stuart D. Gathman

unread,
Jul 24, 2006, 11:51:51 PM7/24/06
to
On Sun, 25 Sep 2005 22:37:00 -0400, Stuart D. Gathman wrote:


> It runs fine - EXCEPT, when it is responding to sysAppLaunchCmdSyncNotify.

> Then it gets a Fatal Exception, responding to sysAppLaunchCmdSyncNotify.


> Then it gets a Fatal Exception, requiring a soft reset. POSE says it is
> trying to access globals (and that is not allowed from SyncNotify). I
> have been over and over the source, but I am new to Palm programming,
> and don't see where it is accessing any globals. Besides, I would have
> thought it was working code.

I just found out from another forum that in addition to no globals, code
at SyncNotify (and other special launch codes) must all reside in code
seg1. I moved some functions between segments to accomplish that, and
now it syncs without an exception. Yay.

> How does one go about debugging the SyncNotify event?

The hint I got elsewhere was to create a special tiny app with a single
big button that calls the app to be debugged with the sync notify launch
code.

0 new messages