public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "rick dot stein at aciworldwide dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/11745] New: Command 'list main' does not work on AIX Date: Wed, 23 Jun 2010 15:11:00 -0000 [thread overview] Message-ID: <20100623151139.11745.rick.stein@aciworldwide.com> (raw) The 'list' command for gdb-6.8 compiled for AIX can't find the 'main' function of a program. It reports "No line number known for main" --- Test Source --- ~/gdb/test imts1-AIX(1):steinr> cat take5.c #define ONE_MINUTE 60 main() { int minutes = 5; while(minutes--) sleep(ONE_MINUTE); } --- Test results for gdb-6.8 --- ~/gdb/test imts1-AIX(1):steinr> ~/gdb/gdb-6.8/gdb/gdb take5 GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "powerpc-ibm-aix5.2.0.0"... (gdb) list main No line number known for main. (gdb) --- Test results for gdb-6.5 --- However, this works fine for gdb-6.5 ~/gdb/test imts1-AIX(1):steinr> ~/gdb/gdb-6.5/gdb/gdb take5 GNU gdb 6.5 Copyright (C) 2006 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 "powerpc-ibm-aix5.3.0.0"... (gdb) list main 1 #define ONE_MINUTE 60 2 main() 3 { 4 int minutes = 5; 5 6 while(minutes--) 7 sleep(ONE_MINUTE); 8 } (gdb) The above happens on AIX 5.2 and AIX 5.3 I have ported support for COBOL from gdb-5.3 to gdb-6.8. This port does not work on gdb-7.1, so I need the above to work on gdb-6.8. The above tests were run with an unmodified, freshly compiled gdb. My primary issue is that when I use gdb against a COBOL program, I need to be able to list by the COBOL module: --- COBOL Test Source --- ~/gdb/test imts1-AIX(1):steinr> cat bank.cbl IDENTIFICATION DIVISION. PROGRAM-ID. "MYBANK". DATA DIVISION. WORKING-STORAGE SECTION. 1 ABC GLOBAL EXTERNAL. 2 FOO PIC X(4). 1 UVW GLOBAL EXTERNAL. 2 BAR PIC X(5). 1 XYZ GLOBAL EXTERNAL. 2 BAZ PIC X(6). Procedure division. main. move "FOO?" to foo. move "BAR??" to bar. move "BAZ???" to baz. display foo. display bar. display baz. stop run. ~/gdb/test imts1-AIX(1):steinr> cat makebank #!/usr/local/bin/bash cob2 -g '-qLIB,PGMNAME(MIXED),NOSEPOBJ,NOSEQ,SIZE(12000k),FLAG(I,I),LINECOUNT (0)' bank.cbl -o bank --- Test results for gdb-6.8 with a COBOL program --- ~/gdb/test imts1-AIX(1):steinr> ~/gdb/gdb-6.8/gdb/gdb bank GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "powerpc-ibm-aix5.2.0.0"... (gdb) list MYBANK No line number known for MYBANK. (gdb) --- Test results for gdb-6.5 with a COBOL program --- ~/gdb/test imts1-AIX(1):steinr> ~/gdb/gdb-6.5/gdb/gdb bank GNU gdb 6.5 Copyright (C) 2006 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 "powerpc-ibm-aix5.3.0.0"... (gdb) list MYBANK 1 IDENTIFICATION DIVISION. 2 PROGRAM-ID. "MYBANK". 3 DATA DIVISION. 4 WORKING-STORAGE SECTION. 5 1 ABC GLOBAL EXTERNAL. 6 2 FOO PIC X(4). 7 1 UVW GLOBAL EXTERNAL. 8 2 BAR PIC X(5). 9 1 XYZ GLOBAL EXTERNAL. 10 2 BAZ PIC X(6). (gdb) Again the above is for an unmodified, freshly compiled gdb. The COBOL support changes provide the ability to print and display COBOL variables. -- Summary: Command 'list main' does not work on AIX Product: gdb Version: 6.8 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned at sourceware dot org ReportedBy: rick dot stein at aciworldwide dot com CC: gdb-prs at sourceware dot org,rick dot stein at aciworldwide dot com http://sourceware.org/bugzilla/show_bug.cgi?id=11745 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next reply other threads:[~2010-06-23 15:11 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-06-23 15:11 rick dot stein at aciworldwide dot com [this message] 2010-06-23 15:13 ` [Bug gdb/11745] " rick dot stein at aciworldwide dot com 2010-08-27 20:54 ` rick dot stein at aciworldwide dot com 2010-08-27 20:58 ` rick dot stein at aciworldwide dot com 2010-08-28 9:30 ` pedro at codesourcery dot com 2010-09-01 14:59 ` rick dot stein at aciworldwide dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100623151139.11745.rick.stein@aciworldwide.com \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).