Subject: Re: my first mac68k asm program...
To: None <port-mac68k@netbsd.org>
From: Christian Groessler <cpg@aladdin.de>
List: port-mac68k
Date: 06/21/2002 12:27:04
Marco van de Voort wrote:
> You'll be able to return the favour, don't worry :-)
>
> I'll be trying to port our compiler (Free Pascal) to NetBSD/m(ac)68k, and
> only have some very basic m68k assembler skills:-)
I also only have very basic m68k skills. But if you have problems I'll
try to help.
> > But now I encounter another problem: gdb breakpoints don't work:
>
> Hmm, odd. Maybe it doesn't work for entry points.
Yes, this was it. With the following change the breakpoint works:
_start:
nop
break_adr:
pea mlen
But gdb crashes later :-(
mac68k:~/nethome/devel/asm/simple/m68k-nbsd$ gdb ./ahello1
GNU gdb 5.0nb1
Copyright 2000 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 "m68k--netbsdelf"...(no debugging symbols found)...
(gdb) break break_adr
Breakpoint 1 at 0x20ae
(gdb) r
Starting program: /net/sol/home/chris/devel/asm/simple/m68k-nbsd/./ahello1
Breakpoint 1, 0x20ae in break_adr ()
(gdb) inf reg
d0 0x0 0
d1 0x0 0
d2 0x0 0
d3 0x0 0
d4 0x0 0
d5 0x0 0
d6 0x0 0
d7 0x0 0
a0 0x0 0x0
a1 0x0 0x0
a2 0xffffcff0 0xffffcff0
a3 0x0 0x0
a4 0x0 0x0
a5 0x0 0x0
fp 0x0 0x0
sp 0xffffcb38 0xffffcb38
ps 0x0 0x0
pc 0x20ae 0x20ae
Segmentation fault (core dumped)
regards,
chris