Subject: re: development
To: Michael McCormack <jne@iinet.net.au>
From: Torsten Harenberg <harenberg@physik.uni-wuppertal.de>
List: port-hpcsh
Date: 02/12/2005 15:35:15
On Sat, 12 Feb 2005, Michael McCormack wrote:

> This code compiles and runs on NetBSD/hpcsh, but segfaults at the point where 
> it should print the hex value to stdout. Same code compiles and runs clean on 
> my FreeBSD/i386 desktop.

Works here (both on i386 and hpcsh):

[15:29] harenber@jornada:~ $  g++ -o st st.C
[15:31] harenber@jornada:~ $  ls -l
total 26
-rw-------  1 harenber  users  2529 Feb 10 20:56 dead.letter
-rwxr-xr-x  1 harenber  users  8641 Feb 12 15:31 st
-rw-r--r--  1 harenber  users   228 Feb 10 23:43 st.C
[15:32] harenber@jornada:~ $  file st
st: ELF 32-bit LSB executable, Hitachi SH, version 1 (SYSV), for NetBSD 
2.0, dynamically linked (uses shared libs), not stripped
[15:32] harenber@jornada:~ $  ./st
Enter decimal number to convert: 45
0x2d hex.
[15:32] harenber@jornada:~ $  uname -a
NetBSD jornada 2.0 NetBSD 2.0 (GENERIC) #0: Sat Jan 15 23:05:47 CET 2005 
root@:/usr/hpcshobj/sys/arch/hpcsh/compile/GENERIC hpcsh
[15:32] harenber@jornada:~ $

Can you run it under gdb to see where the problem is?

Best regards,

    Torsten

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<>                                                              <>
<> Torsten Harenberg         harenberg@physik.uni-wuppertal.de  <>
<> Bergische Universitaet                                       <>
<> FB C - Physik             Tel.: +49 (0)202 439-3521          <>
<> Gaussstr. 20              Fax : +49 (0)202 439-2811          <>
<> 42097 Wuppertal                                              <>
<>                                                              <>
<><><><><><><>< Of course it runs NetBSD http://www.netbsd.org ><>