From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch]: Replace stryoul call to fetch address
Date: Thu, 28 Feb 2013 10:02:00 -0000 [thread overview]
Message-ID: <20130228091853.GB30108@calimero.vinschen.de> (raw)
In-Reply-To: <512E7FBB.1080104@redhat.com>
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=<error reading variable: That operation is not available on integers of more than 8 bytes.>) at /home/corinna/src/gdb/src/gdb/exceptions.c:233
#1 0x00000001004f406e in throw_it (reason=RETURN_ERROR,
error=<optimized out>, fmt=<optimized out>, ap=<optimized out>)
at /home/corinna/src/gdb/src/gdb/exceptions.c:423
#2 0x00000001004f4287 in throw_error (error=4294096672,
error@entry=NOT_FOUND_ERROR, fmt=0x40000 <Address 0x40000 out of bounds>)
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=<optimized out>, default_symtab=<optimized out>,
default_line=<optimized out>, 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 <bkpt_breakpoint_ops>, 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=<optimized out>, 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=<optimized out>)
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=<optimized out>)
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 <captured_command_loop>,
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 <captured_main>,
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
next prev parent reply other threads:[~2013-02-28 9:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 16:44 Corinna Vinschen
2013-02-27 17:20 ` Pedro Alves
2013-02-27 18:47 ` Corinna Vinschen
2013-02-27 19:40 ` Pedro Alves
2013-02-27 19:53 ` Corinna Vinschen
2013-02-27 20:03 ` [patch] gdbserver/win32-low.c: Fix printf-like formatting (was Re: [patch]: Replace stryoul call to fetch address) Corinna Vinschen
2013-02-27 21:05 ` Eli Zaretskii
2013-02-27 21:25 ` Corinna Vinschen
2013-02-27 21:30 ` Eli Zaretskii
2013-02-28 9:19 ` Corinna Vinschen
2013-02-28 16:20 ` Eli Zaretskii
2013-02-27 21:50 ` Pedro Alves
2013-02-28 11:01 ` Corinna Vinschen
2013-02-28 0:44 ` [patch]: Replace stryoul call to fetch address Pedro Alves
2013-02-28 10:02 ` Corinna Vinschen [this message]
2013-02-28 16:33 ` Corinna Vinschen
2013-02-28 16:48 ` Corinna Vinschen
2013-02-28 17:04 ` Pedro Alves
2013-02-27 20:24 ` Christopher Faylor
2013-02-27 20:29 ` Christopher Faylor
2013-02-28 0:33 ` Pedro Alves
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=20130228091853.GB30108@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=gdb-patches@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: link
Be 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