~ubuntu-branches/debian/sid/gdb/sid

« back to all changes in this revision

Viewing changes to gdb/testsuite/gdb.threads/corethreads.c

  • Committer: Package Import Robot
  • Author(s): Hector Oron
  • Date: 2012-01-28 00:41:20 UTC
  • mfrom: (1.4.9) (5.1.6 experimental)
  • Revision ID: package-import@ubuntu.com-20120128004120-bar1h77ark622noi
Tags: 7.4really-1
* New upstream release:
  - Many Python scripting improvements
  - Better support for ambiguous linespecs
  - Masked watchpoints
  - Tracepoint support improvements
  - Support for Texas Instruments TMS320C6x (tic6x-*-*)
  - A Renesas RL78 simulator (rl78-*-elf)
  - Some minor Remote protocol extensions and GDB/MI changes
* Temporarily disable gdb-multiarch and gdb-dbg.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright 2011-2012 Free Software Foundation, Inc.
 
2
 
 
3
   This file is part of GDB.
 
4
 
 
5
   This program is free software; you can redistribute it and/or modify
 
6
   it under the terms of the GNU General Public License as published by
 
7
   the Free Software Foundation; either version 3 of the License, or
 
8
   (at your option) any later version.
 
9
 
 
10
   This program is distributed in the hope that it will be useful,
 
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
   GNU General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU General Public License
 
16
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
17
 
 
18
#include <pthread.h>
 
19
#include <stdlib.h>
 
20
#include <assert.h>
 
21
 
 
22
pthread_t thread0;
 
23
pthread_t thread1;
 
24
 
 
25
static void *
 
26
start (void *arg)
 
27
{
 
28
  assert (pthread_self () == thread1);
 
29
 
 
30
  abort ();
 
31
}
 
32
 
 
33
int
 
34
main (void)
 
35
{
 
36
  int i;
 
37
 
 
38
  thread0 = pthread_self ();
 
39
 
 
40
  i = pthread_create (&thread1, NULL, start, NULL);
 
41
  assert (i == 0);
 
42
 
 
43
  i = pthread_join (thread1, NULL);
 
44
  assert (i == 0);
 
45
 
 
46
  return 0;
 
47
}