This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GDB & GCC 3.4


when I compile GDB (mainline CVS) with the GCC 3.4 compiler I get the
following problem. But with gcc version 3.3.3 (SuSE Linux) it does not
happen. I have attached the testcase. To recreate the bug.
- cc -m64 -o tbug64 tbug.c -lpthread
- src/gdb/gdb tbug64
- (gdb) run

Anyone seen this problems before? any known solutions?


Kernel: 2.6.7-1.451.2.3
OS: Redhat
GCC: gcc version 3.4.1 20040702 (Red Hat Linux 3.4.1-2)

[root@ppc64hlp3 src]# ./gdb/gdb /tmp/gdb64
GNU gdb 2004-08-27-cvs
Copyright 2004 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 "powerpc64-unknown-linux-gnu".../tmp/gdb64: No
such file or directory.

(gdb) run
Starting program:
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) file /tmp/tbug64
Reading symbols from /tmp/tbug64...done.
Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) run
Starting program: /tmp/tbug64
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
reading register fpscr (#70): Input/output error.
Killed
[root@ppc64hlp3 src]#


Any thoughts?

Thanks
-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum                                                          +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
* Copyright (C) 2004 Free Software Foundation, Inc.

* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

* Please email any bugs, comments, and/or additions to this file to:
* bug-gdb@prep.ai.mit.edu

* This file was written by Steve Munroe. (sjmunroe@us.ibm.com)
* Test break points and single step on thread functions.
*/

#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>

#define N       2

static void *
tf (void *arg)
{
    int n = (int) (long int) arg;
    char number[160];
    sprintf(number, "tf(%ld): begin", (long)arg);
    puts (number);

    sleep (100);
    sprintf(number, "tf(%ld): end", (long)arg);
    puts (number);
    return NULL;
}

int main (int argc, char *argv[])
{
    int n;
    pthread_t th[N];

    for (n = 0; n < N; ++n)
    if (pthread_create (&th[n], NULL, tf, (void *) (long int) n) != 0)
    {
        sleep(2);
        puts ("create failed");
        exit (1);
    }

    puts("after create");

    for (n = 0; n < N; ++n)
    if (pthread_join (th[n], NULL) != 0)
    {
        puts ("join failed");
        exit (1);
    }

    puts("after join");
              return 0;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]