public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/11745] New: Command 'list main' does not work on AIX
@ 2010-06-23 15:11 rick dot stein at aciworldwide dot com
  2010-06-23 15:13 ` [Bug gdb/11745] " rick dot stein at aciworldwide dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: rick dot stein at aciworldwide dot com @ 2010-06-23 15:11 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <bug-11745-4717@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2022-02-24 14:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-23 15:11 [Bug gdb/11745] New: Command 'list main' does not work on AIX rick dot stein at aciworldwide dot com
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
     [not found] <bug-11745-4717@http.sourceware.org/bugzilla/>
2014-03-12 10:16 ` palves at redhat dot com
2022-02-24 14:32 ` tromey at sourceware dot org

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).