This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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/11385] cannot catch Ada exceptions


https://sourceware.org/bugzilla/show_bug.cgi?id=11385

--- Comment #7 from Simon Wright <simon at pushface dot org> ---
I still get this problem with GDB 7.7, GCC 4.9.0 on x86_64-apple-darwin13.

Using dwarfdump --debug-info, hi.o (see my comment #2) says

0x0000009b:     TAG_subprogram [2]
                 AT_external( 0x01 )
                 AT_name( "__gnat_debug_raise_exception" )
                 AT_decl_file( "/Users/simon/tmp/hi.c" )
                 AT_decl_line( 1 )
                 AT_prototyped( 0x01 )
                 AT_low_pc( 0x0000000000000000 )
                 AT_high_pc( 0x0000000000000001 )
                 AT_frame_base( rsp+8 )

whereas the RTS s-excdeb.o says

0x0000024b:     TAG_subprogram [9] *
                 AT_external( 0x01 )
                 AT_name( "system__exceptions_debug__debug_raise_exception" )
                 AT_decl_file(
"/Users/simon/tmp/gcc-4.9.0/gcc/ada/s-excdeb.adb" )
                 AT_decl_line( 40 )
                 AT_MIPS_linkage_name( "__gnat_debug_raise_exception" )
                 AT_prototyped( 0x01 )
                 AT_low_pc( 0x0000000000000000 )
                 AT_high_pc( 0x000000000000000c )
                 AT_frame_base( 0x00000000
                    0x0000000000000000 - 0x0000000000000001: rsp+8
                    0x0000000000000001 - 0x0000000000000004: rsp+16
                    0x0000000000000004 - 0x000000000000000b: rbp+16
                    0x000000000000000b - 0x000000000000000c: rsp+8 )
                 AT_sibling( {0x000002c2} )

and thereâs one obvious difference: in the C version, the AT_Name is the one
being looked for (__gnat_debug_raise_exception), whereas in the Ada version
itâs the AT_MIPS_linkage_name.

standard_lookup() (ada-lang.c:4259) says
  sym = lookup_symbol_in_language (name, block, domain, language_c, 0);

Could it be the âlanguage_câ thatâs the problem? .. will check further (I see
that standard_lookup() is called in several places, so maybe not).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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