From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9215 invoked by alias); 28 Feb 2013 09:19:16 -0000 Received: (qmail 9181 invoked by uid 22791); 28 Feb 2013 09:19:04 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Thu, 28 Feb 2013 09:18:56 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id AF3AA520243; Thu, 28 Feb 2013 10:18:53 +0100 (CET) Date: Thu, 28 Feb 2013 10:02:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [patch]: Replace stryoul call to fetch address Message-ID: <20130228091853.GB30108@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <20130227164419.GA16975@calimero.vinschen.de> <512E404E.6070504@redhat.com> <20130227183805.GA30418@calimero.vinschen.de> <512E5B26.7050104@redhat.com> <20130227194235.GB30418@calimero.vinschen.de> <512E7FBB.1080104@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <512E7FBB.1080104@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00730.txt.bz2 On Feb 27 21:50, Pedro Alves wrote: > On 02/27/2013 07:42 PM, Corinna Vinschen wrote: > > > The SEGV occurs in exception.c, function throw_exception, though. > > The `*current_catcher->exception = exception;' assignment crashes > > because current_catcher->exception is NULL. I don't understand yet > > why it's NULL, and why the throw_exception function doesn't test > > this before trying to write *current_catcher->exception. > > What's the backtrace like? > > There's always a top level catcher installed (gdb_main -> catch_errors) > Unless, hmm, waitaminut. What's the backtrace like? I just realized > a very early exception in captured_main can result in bad > things like that. I didn't really debug this in depth yet. Keep in mind that 64 bit Cygwin is still in development so there are heinous bugs to be expected. This crash is probably a result of an underlying Cygwin bug. Nevertheless, here's a backtrace of the crashing `br dll_crt0_0' command, as catched by Mingw GDB. At this point in time, before starting the executable, the dll_crt0_0 entry point is not known, since it's in the not yet loaded Cygwin DLL. #0 throw_exception ( exception=) at /home/corinna/src/gdb/src/gdb/exceptions.c:233 #1 0x00000001004f406e in throw_it (reason=RETURN_ERROR, error=, fmt=, ap=) at /home/corinna/src/gdb/src/gdb/exceptions.c:423 #2 0x00000001004f4287 in throw_error (error=4294096672, error@entry=NOT_FOUND_ERROR, fmt=0x40000
) at /home/corinna/src/gdb/src/gdb/exceptions.c:444 #3 0x00000001004d56e5 in symbol_not_found_error (filename=0x0, symbol=0x6ffffeeb370 "\210_.\200\001") at /home/corinna/src/gdb/src/gdb/linespec.c:1410 #4 parse_linespec (parser=parser@entry=0xc2a110, argptr=argptr@entry=0xc2a488) at /home/corinna/src/gdb/src/gdb/linespec.c:2190 #5 0x00000001004d5972 in decode_line_full (argptr=0xc2a488, flags=, default_symtab=, default_line=, canonical=0xc2a410, select_mode=0x0, filter=0x0) at /home/corinna/src/gdb/src/gdb/linespec.c:2314 #6 0x0000000100489b42 in parse_breakpoint_sals (address=0xc2a488, canonical=0xc2a410) at /home/corinna/src/gdb/src/gdb/breakpoint.c:9304 #7 0x000000010048f32e in create_breakpoint (gdbarch=0x6fffff3bd20, arg=0x6fffffebb9d "", cond_string=0x0, thread=0, extra_string=0x0, parse_condition_and_thread=1, tempflag=0, type_wanted=bp_breakpoint, ignore_count=0, pending_break_support=AUTO_BOOLEAN_AUTO, ops=0x10085fd40 , from_tty=1, enabled=1, internal=0, flags=0) at /home/corinna/src/gdb/src/gdb/breakpoint.c:9535 #8 0x000000010048fbd9 in break_command_1 (arg=0x6fffffebb93 "dll_crt0_0", flag=, from_tty=1) at /home/corinna/src/gdb/src/gdb/breakpoint.c:9753 #9 0x00000001005ae77b in execute_command (p=0x6fffffebb9c "0", p@entry=0x6fffffebb90 "br dll_crt0_0", from_tty=1) at /home/corinna/src/gdb/src/gdb/top.c:484 #10 0x00000001004fcd47 in command_handler ( command=0x6fffffebb90 "br dll_crt0_0") at /home/corinna/src/gdb/src/gdb/event-top.c:431 #11 0x00000001004fd0fc in command_line_handler (rl=) at /home/corinna/src/gdb/src/gdb/event-top.c:629 #12 0x00000001005e1120 in rl_callback_read_char () at /home/corinna/src/gdb/src/readline/callback.c:220 #13 0x00000001004fcdb9 in rl_callback_read_char_wrapper ( client_data=) at /home/corinna/src/gdb/src/gdb/event-top.c:163 #14 0x00000001004fb954 in process_event () at /home/corinna/src/gdb/src/gdb/event-loop.c:342 #15 0x00000001004fbcd7 in gdb_do_one_event () at /home/corinna/src/gdb/src/gdb/event-loop.c:406 #16 0x00000001004fbf2e in start_event_loop () at /home/corinna/src/gdb/src/gdb/event-loop.c:431 #17 0x00000001004f5863 in captured_command_loop (data=data@entry=0x0) at /home/corinna/src/gdb/src/gdb/main.c:256 #18 0x00000001004f451a in catch_errors ( func=func@entry=0x1004f5850 , func_args=func_args@entry=0x0, errstring=errstring@entry=0x10070c771 <__PRETTY_FUNCTION__.12619+219> "", mask=mask@entry=6) at /home/corinna/src/gdb/src/gdb/exceptions.c:546 #19 0x00000001004f65bb in captured_main (data=data@entry=0xc2aaa0) at /home/corinna/src/gdb/src/gdb/main.c:1033 #20 0x00000001004f451a in catch_errors ( func=func@entry=0x1004f5b40 , func_args=func_args@entry=0xc2aaa0, errstring=errstring@entry=0x10070c771 <__PRETTY_FUNCTION__.12619+219> "", mask=mask@entry=6) at /home/corinna/src/gdb/src/gdb/exceptions.c:546 #21 0x00000001004f6b79 in gdb_main (args=args@entry=0xc2aaa0) at /home/corinna/src/gdb/src/gdb/main.c:1042 #22 0x00000001006a7131 in main (argc=2, argv=0xc2ab00) at /home/corinna/src/gdb/src/gdb/gdb.c:34 Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat