This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/35880] GNAT (GCC) Ada does not generate symbolic debug for shared memory



------- Comment #6 from knoxj at att dot net  2008-04-09 16:19 -------
Thank you for your comments. This is my first free software bug report, so I'm
still learning the ropes. I have been submitting commercial vendor bug reports
for several decades, and old habits die hard.

README file contents :

The files listed below demonstrate the GNAT Ada compiler not generating 'gdb'
debug information correctly for shared memory. 

'gdb' says
"No definition of "pacs_cp" in current context."

NightView says
"Identifier "pacs_cp" is not visible in the given context."

Problem first found on 2.6.18.8-RedHawk-4.2.2-trace
                       gdb Concurrent RedHawk Linux (6.3.0.0-1.63rh)
                       gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)

Problem verified on    2.6.15.4-RedHawk-4.1-debug
                       gdb Concurrent RedHawk Linux (6.3.0.0-1.63rh)
                       gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)

Problem verified on    2.6.9-RedHawk-2.3.5-debug
                       gdb 6.0
                       gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-49)

Problem verified on    2.6.9-42.0.3.EL (Red Hat EL WS 4 update 4)               
                       gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)
                       gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)

Problem verified on    2.6.23.1-42.fc8
                       gdb Fedora (6.8-1.fc9)
                       gcc version 4.3.0 20080326 (Red Hat 4.3.0-5) (GCC)

===============================================================================

makefile - build rules

ada_proclock.ads - Ada interface
proclock.h       - C interface
proclock.c       - C implementation

f15_shm.ld       - 'ld' commands for shared memory layout
f15_shm.h        - C interface
f15_shm.c        - C implementation
f15_shm_tables.c - shared memory data tables

nh_base_types.ads        - hardware representation
test_pacs_cp_package.ads - Ada data description
testshm.adb              - Ada test program

pacs_cp.h  - C data description
testshmc.c - C test program

===============================================================================

Follow the steps below to reproduce the problem :

1. make clean

2. make

3. gdb testshma
    'tb main'
    'r'
    'n' 7 times to get to "Ada_Main_Program"
    's'
    'n' 4 times
    'ptype pacs_cp' to get "No definition of "pacs_cp" in current context."

4. gdb testshmc
    'tb main'
    'r'
    'n' 4 times
    'ptype pacs_cp' to get type = volatile struct PACS_CP {
                               short int word[8192];
                           }

5. edit test_pacs_cp_package.ads
    comment "pragma IMPORT" line

6. make

7. gdb testshma
    'tb main'
    'r'
    'n' 7 times to get to "Ada_Main_Program"
    's'
    'n' 4 times
    'ptype pacs_cp' to get type = record
                               word: array (1 .. 8192) of 
                                           nh_base_types.signed_half_word_type;
                           end record


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35880


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]