69,381
社区成员
发帖
与我相关
我的任务
分享
$ cat -n hello.pc
1 #include <assert.h>
2 #include <stdio.h>
3
4 EXEC SQL INCLUDE sqlca;
5
6 int
7 main(int argc, char *argv[])
8 {
9 EXEC SQL BEGIN DECLARE SECTION;
10 char name[20];
11 char addr[80];
12 EXEC SQL END DECLARE SECTION;
13 assert(0);
14 return 0;
15 }
$ proc lines=yes ltype=none iname=hello.pc
Pro*C/C++: Release 9.2.0.1.0 - Production on Fri Jul 9 10:00:14 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
System default option values taken from: /home1/oracle9i/precomp/admin/pcscfg.cfg
$ cc -g -o hello hello.c
$ ./hello
Assertion failed: 0, file hello.pc, line 13
Abort(coredump)
$ gdb hello core
HP gdb 3.3 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 3.3 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `hello'.
Program terminated with signal 6, Aborted.
warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.
#0 0xc020c4b0 in kill+0x10 () from /usr/lib/libc.2
(gdb) where
#0 0xc020c4b0 in kill+0x10 () from /usr/lib/libc.2
#1 0xc01a6c74 in raise+0x24 () from /usr/lib/libc.2
#2 0xc01e70e0 in abort_C+0x160 () from /usr/lib/libc.2
#3 0xc01e713c in abort+0x1c () from /usr/lib/libc.2
#4 0xc01756c8 in _assert+0x178 () from /usr/lib/libc.2
#5 0x2a08 in main (argc=1, argv=0x7a000f7c) at hello.pc:13
(gdb) list
4 EXEC SQL INCLUDE sqlca;
5
6 int
7 main(int argc, char *argv[])
8 {
9 EXEC SQL BEGIN DECLARE SECTION;
10 char name[20];
11 char addr[80];
12 EXEC SQL END DECLARE SECTION;
13 assert(0);
(gdb) q
$