On Thursday, 4 June 2015 at 17:43:35 UTC, Adam D. Ruppe wrote:
If int 3 doesn't work for some reason btw, you could always just deliberately write to a null pointer and trigger a segfault in the overridden function, would have the same result in the debugger.

I feel like this onError thing is meant to be overridable by importing core.exception too, but I don't see that in the source. The linker-based override definately works today though!

So far I've tried the null pointer to get a segmentation fault. It failed. I'm trying to rebuild gdb because this error is what I got:

     Message: Process 61701 (gdb) of user 0 dumped core.

                Stack trace of thread 61701:
                #0  0x0000000000629bdf make_vector_type (gdb)
                #1  0x0000000000670a18 read_type_die (gdb)
                #2  0x000000000066ee87 lookup_die_type (gdb)
                #3  0x000000000067002a read_type_die (gdb)
                #4  0x000000000066ee87 lookup_die_type (gdb)
                #5  0x0000000000672aeb new_symbol_full (gdb)
                #6  0x0000000000674e1f process_die (gdb)
                #7  0x0000000000674a2b process_die (gdb)
                #8  0x0000000000675031 process_die (gdb)
#9 0x0000000000678e57 dw2_do_instantiate_symtab (gdb)
                #10 0x0000000000679f38 dwarf2_read_symtab (gdb)
                #11 0x00000000005e4451 psymtab_to_symtab (gdb)
#12 0x00000000005e54d3 find_pc_sect_symtab_from_partial (g
                #13 0x00000000005e0143 find_pc_sect_symtab (gdb)
#14 0x00000000005dc3dd blockvector_for_pc_sect (gdb)
                #15 0x00000000005dc57d block_for_pc (gdb)
                #16 0x00000000006e70bb inline_frame_sniffer (gdb)
#17 0x00000000006e52c6 frame_unwind_try_unwinder (gdb) #18 0x00000000006e567f frame_unwind_find_by_frame (gdb) #19 0x00000000006e1d2b get_prev_frame_if_no_cycle (gdb)
                #20 0x00000000006e4029 get_prev_frame_always (gdb)
                #21 0x00000000006e4761 get_prev_frame (gdb)
#22 0x00000000006e4a3c unwind_to_current_frame (gdb) #23 0x0000000000610b71 catch_exceptions_with_msg (gdb)
                #24 0x00000000006e1e40 get_current_frame (gdb)
#25 0x0000000000603909 handle_inferior_event.part.32 (gdb)
                #26 0x00000000006055ee fetch_inferior_event (gdb)
#27 0x000000000061c7f2 inferior_event_handler (gdb)
                #28 0x000000000061a7d1 process_event (gdb)
                #29 0x000000000061abca gdb_do_one_event (gdb)
                #30 0x000000000061ae3e start_event_loop (gdb)
                #31 0x0000000000613c13 captured_command_loop (gdb)
                #32 0x0000000000610d3a catch_errors (gdb)
                #33 0x0000000000615526 captured_main (gdb)
                #34 0x0000000000610d3a catch_errors (gdb)
                #35 0x000000000061568b gdb_main (gdb)
                #36 0x00000000004604a5 main (gdb)
#37 0x00007f3d3893ffe0 __libc_start_main (libc.so.6)
                #38 0x00000000004604e8 _start (gdb)

Reply via email to