Thanks Matt,
In the meantime I've got it working a bit better. The trick was to add the
-g switch to the compilation faze too.
To make things a bit more stable, I also skipped the optimization (which is
generally a good idea when you want to debug and hav no good idea what the
optimization actualy does).
So where did that get me ? I now can work with POSE and debug fine, but I
now have a problem with the list function in the debugger, for instance when
I start up I get:
Program received signal SIGTRAP, Trace/breakpoint trap.
0x26df0 in DbgSrcBreak () at test.c:56
56 rd launchFlags)
(gdb) list 56
51 MaxChars+1];
52 Word StartYear;
53
54 /*************/
55 /* PilotMain */
56 /*************/
57 DWord PilotMain (Word cmd, Ptr cmdPBP, Word launchFlags)
58 {
59 /* distribute the launchcodes */
60 /*----------------------------*/
When I look at my actual source in an editor I get
47 Char YearFieldStr[YearFieldMaxChars+1];
48 Word StartYear;
49
50 /*************/
51 /* PilotMain */
52 /*************/
53 DWord PilotMain (Word cmd, Ptr cmdPBP, Word launchFlags)
54 {
55 /* distribute the launchcodes */
56 /*----------------------------*/
So I am left with some observations:
* the line indicated by the debugger seems to be one-off from where the
debugger stops.
* for some reason only the last part of the line where the debugger stops is
not displayed.
* the line numbering known by the debugger does not correspond with the
actual line numbering of the source (I have 469 LOC's, but the debugger
tells me that I have 486 (see below)).
(gdb) info source
Current source file is easter.c
Located in //D/Palm/Programming/Projects/Easter/easter.c
Contains 486 lines.
Source language is unknown.
I did another test listing through the whole source, and at times a line or
a part of a line is repeated, such as in:
(gdb) list 1
1 /*
2 FILENAME: Test.c
3 PURPOSE:
4 Start an application to calculate the Easter date for any given
year
5 VERSION: V1.02
(gdb) list
6 .02
7 HISTORY: V0.10 Alpha First version in development
8 V0.11 Alpha Added some finetuning:
9 The 'big' icon is made smaller to allow space for
the ic
on text.
10 When the program starts, the current year is already
sel
ected and calculated.
or
(gdb) list 0
1 /*
2 FILENAME: Test.c
3 PURPOSE:
4 Start an application to calculate the Easter date for any given
year
(gdb) list
5 ar
6 VERSION: V1.02
7 HISTORY: V0.10 Alpha First version in development
8 V0.11 Alpha Added some finetuning:
9 The 'big' icon is made smaller to allow space for
the ic
on text.
10 When the program starts, the current year is already
sel
ected and calculated.
As you can see, the behaviour is not always on the same line. (the next list
will not duplicate a part of the line, but eat up some characters and then
show the rest of the next lines.
Conclusion: I am now able to debug, but it is not very easy to find my way
around the source. Still, it is better than just doing black box testing.
> -----Original Message-----
> From: Matt West [mailto:[EMAIL PROTECTED]]
> Sent: donderdag 2 december 1999 21:55
> To: [EMAIL PROTECTED]
> Subject: Your gcc Palm problems
>
>
> Hi Jan
>
> I lurk on palm-dev-forum.
> I'm using gcc + pose and debugging fine.
>
> You said:
> m68k-palmos-coff-gcc -O1 -c -mdebug-labels test.c -o test.o
> m68k-palmos-coff-gcc -O1 -g test.o -o test
>
> I'm definately *not* an expert, but in the makefiles I'm using, they
> have -O0 (that's big letter O, zero). "-O" i think is
> optimisation level, 0
> = none. Then your "-g" will give you the symbol table. Maybe the
> optimisations you are letting it perform are messing up the
> symbol table.
>
> If it works, or it doesn't, would you tell me please? I'm too
> shy to send
> this to the list :)
>
> Matt West
> Cloak Software
> http://www.cloak.freeserve.co.uk
>
>