Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

gdb on OpenBSD 3.2 sparc64

From: Peter Haag <haag(at)switch.ch>
Date: Thu Feb 27 2003 - 02:54:56 EST


Hello,
I have OpenBSD 3.2 sparc64 installed on a Ultra I. While debugging a program, I noticed, that gdb does not show the correct value for any variable. It can easyly reproduced with any simple programm ( see below ). Gdb on Intel x86 arch with the same sample programm works as expected.
Any ideas?

  • Peter

sample programm:
#include <stdio.h>

main () {

char   a;
int    i;
long   l;
double d;

        a = 'K';
        i = 10;
        l = 3;
        d = 3.14;

        printf("a: %c, i: %i, l: %li, d: %f\n", a, i, l, d);

}

compiled: gcc -g -o sample sample.c

gdb session:
(gdb) b main

Breakpoint 1 at 0x1005e8: file sample.c, line 8.
(gdb) r

Starting program: /root/./sample

Breakpoint 1, main () at sample.c:8
8 a = 'K';
(gdb) n

9 i = 10;
(gdb)

10 l = 3;
(gdb)

11 d = 3.14;
(gdb)

13 printf("a: %c, i: %i, l: %li, d: %f\n", a, i, l, d);
(gdb) p a

$1 = 69 'E'
(gdb) p i

$2 = 778266624
(gdb) p d

$3 = 1.3660598928104174e+74
(gdb) n

a: K, i: 10, l: 3, d: 3.140000
(gdb)

--
_______ SWITCH - The Swiss Education & Research Network ______
Peter Haag,  Security Engineer,  Member of SWITCH CERT
PGP fingerprint: D9 31 D5 83 03 95 68 BA  FB 84 CA 94 AB FC 5D D7
SWITCH,  Neumuehlequai 6,  CH-8001 Zurich,  Switzerland
E-mail: 
haag(at)switch.ch Web: 
http://www.switch.ch/
Received on Thu Feb 27 02:58:50 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:30 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library