speeding up time to hit first breakpoint

Noel Grandin noelgrandin@gmail.com
Mon Oct 3 10:04:00 GMT 2016


Hi

I'm debugging LibreOffice, which can be a bit of a GDB stress test :-)

And it can take 30 seconds or so between me hitting the key stroke that triggers a breakpoint and getting to the GDB 
command line console.

I took a trace with 'perf record -g', which I'm enclosing. It looks like the bulk of the time is spent in xrealloc.
Perhaps there is something that can be sized more appropriately up front to prevent the reallocating?

Anyway, thanks for the powerful tool :-)

Cheers, Noel grandin

     Children  Self    Command  Shared Object         Symbol
-   99.18%    98.83%  gdb      libc-2.23.so          [.] __memset_sse2
    - __memset_sse2
       - 99.08% _int_free
            _int_realloc
            realloc_check
            realloc
          - xrealloc
             - 99.05% decode_frame_entry
                  dwarf2_build_frame_info
                  dwarf2_frame_find_fde
                  dwarf2_frame_sniffer
                  frame_unwind_try_unwinder
                  frame_unwind_find_by_frame
                  get_prev_frame_if_no_cycle
                  get_prev_frame_always
                  get_prev_frame
                  unwind_to_current_frame
                  catch_exceptions_with_msg
                  get_current_frame
                  handle_inferior_event
                  fetch_inferior_event
                  inferior_event_handler
                  gdb_wait_for_event
                  gdb_do_one_event
                  start_event_loop
                  captured_command_loop
                  catch_errors
                  captured_main
                  catch_errors
                  gdb_main
                  main
                  __libc_start_main
                  _start



More information about the Gdb mailing list