[patch]: Replace stryoul call to fetch address
Corinna Vinschen
vinschen@redhat.com
Thu Feb 28 10:02:00 GMT 2013
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
More information about the Gdb-patches
mailing list