OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.base/] [relativedebug.exp] - Blame information for rev 157

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# Copyright 2007, 2008 Free Software Foundation, Inc.
2
 
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 3 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program.  If not, see .
15
 
16
if [target_info exists gdb,nosignals] {
17
    verbose "Skipping relativedebug.exp because of nosignals."
18
    continue
19
}
20
 
21
if $tracelevel then {
22
    strace $tracelevel
23
}
24
 
25
set testfile relativedebug
26
set srcfile ${testfile}.c
27
set binfile ${objdir}/${subdir}/${testfile}
28
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
29
    untested "Couldn't compile test program"
30
    return -1
31
}
32
 
33
# Get things started.
34
 
35
gdb_exit
36
gdb_start
37
gdb_reinitialize_dir $srcdir/$subdir
38
gdb_load ${binfile}
39
 
40
runto_main
41
 
42
# pause () -> SIGALRM -> handler () -> abort ()
43
gdb_test "continue" "Program received signal SIGABRT.*"
44
 
45
# Backtracing through pause broke if glibc has been prelinked,
46
# because the separate debug files in /usr/lib/debug had different
47
# base addresses.
48
 
49
# incorrect (#6):
50
# (gdb) bt
51
# #0  0x00325402 in __kernel_vsyscall ()
52
# #1  0x00718f20 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
53
# #2  0x0071a801 in *__GI_abort () at abort.c:88
54
# #3  0x0804841f in handler (signo=14) at ./gdb.base/relativedebug.c:27
55
# #4  
56
# #5  0x00325402 in __kernel_vsyscall ()
57
# #6  0x0077ebc6 in ?? () from /lib/i686/nosegneg/libc.so.6
58
# #7  0x08048455 in main () at ./gdb.base/relativedebug.c:34
59
# (gdb)
60
 
61
# correct (#6):
62
# (gdb) bt
63
# #0  0x00b33402 in __kernel_vsyscall ()
64
# #1  0x00718f20 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
65
# #2  0x0071a801 in *__GI_abort () at abort.c:88
66
# #3  0x0804841f in handler (signo=14) at ./gdb.base/relativedebug.c:27
67
# #4  
68
# #5  0x00b33402 in __kernel_vsyscall ()
69
# #6  0x0077ebc6 in __pause_nocancel () from /lib/i686/nosegneg/libc.so.6
70
# #7  0x08048455 in main () at ./gdb.base/relativedebug.c:34
71
# (gdb)
72
 
73
gdb_test "bt" \
74
         ".*\[^a-zA-Z\]pause\[^a-zA-Z\].*" \
75
         "pause found in backtrace"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.