summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Set GDB version number to str 7.9.gdb-7.9-releaseJoel Brobecker2015-02-192-1/+5
| | | | | | gdb/ChangeLog: * version.in: Set GDB version number to str 7.9.
* gdb/NEWS: "Changes since GDB 7.8" -> "Changes in GDB 7.9".Joel Brobecker2015-02-192-1/+5
| | | | | | gdb/ChangeLog: * NEWS: Rewrite "Changes since GDB 7.8" into "Changes in GDB 7.9".
* Automatic date update in version.inGDB Administrator2015-02-191-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-181-1/+1
|
* Simplify event-loop core, remove two-step event processingPedro Alves2015-02-174-243/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even with the previous patch installed, we'll still see sigall-reverse.exp occasionally fail. The problem is that the event loop's event handling processing is done in two steps: #1 - poll all event sources, and push new event objects to the event queue, until all event sources are drained. #2 - go through the event queue, processing each event object at a time. For each event, call the associated callback, and deletes the event object from the queue. and then bad things happen if between #1 and #2 something decides that events from an event source that has already queued events shouldn't be processed yet. To do that, we either remove the event source from the list of event sources, or clear its "have events" flag. However, if an event for that source has meanwhile already been pushed in the event queue, #2 will still process it and call the associated callback... One way to fix it that I considered was to do something to the event objects already in the event queue when an event source is no longer interesting. But then I couldn't find any good reason for the two-step process in the first place. It's much simpler (and less code) to call the event source callbacks as we poll the sources and find events. Tested on x86-64 Fedora 20, native and gdbserver. gdb/ 2015-02-17 Pedro Alves <palves@redhat.com> * event-loop.c: Don't declare nor define a queue type for gdb_event_p. (event_queue): Delete. (create_event, create_file_event, gdb_event_xfree) (initialize_event_loop, process_event): Delete. (gdb_do_one_event): Return as soon as one event is handled. (handle_file_event): Change prototype. Used the passed in file_handler pointer and ready_mask instead of looping over all file handlers. (gdb_wait_for_event): Update the poll/select timeouts before blocking. Run event handlers directly instead of queueing events. Return as soon as one event is handled. (struct async_event_handler_data): Delete. (invoke_async_event_handler): Delete. (check_async_event_handlers): Change return type to int. Run event handlers directly instead of queueing events. Return as soon as one event is handled. (handle_timer_event): Delete. (update_wait_timeout): New function, factored out from poll_timers. (poll_timers): Reimplement. * event-loop.h (initialize_event_loop): Delete declaration. * top.c (gdb_init): Don't call initialize_event_loop.
* When disabling target async, remove all target event sources from the event loopPedro Alves2015-02-176-13/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sigall-reverse.exp test occasionally fails with something like this: (gdb) PASS: gdb.reverse/sigall-reverse.exp: send signal TERM continue Continuing. The next instruction is syscall exit_group. It will make the program exit. Do you want to stop the program?([y] or n) FAIL: gdb.reverse/sigall-reverse.exp: continue to signal exit (timeout) FAIL: gdb.reverse/sigall-reverse.exp: reverse to handler of TERM (timeout) FAIL: gdb.reverse/sigall-reverse.exp: reverse to gen_TERM (timeout) This is another event-loop/async related problem exposed by the patch that made 'query' use gdb_readline_wrapper (588dcc3edbde19f9). The problem is that even though gdb_readline_wrapper disables target-async while the secondary prompt is in progress, the record target's async event source is left marked. So when gdb_readline_wrapper nests an event loop to process input, it may happen that that event loop ends up processing a target event while GDB is not really ready for it. Here's the relevant part of the backtrace showing the root issue in action: ... #14 0x000000000061cb48 in fetch_inferior_event (client_data=0x0) at src/gdb/infrun.c:4158 #15 0x0000000000642917 in inferior_event_handler (event_type=INF_REG_EVENT, client_data=0x0) at src/gdb/inf-loop.c:57 #16 0x000000000077ca5c in record_full_async_inferior_event_handler (data=0x0) at src/gdb/record-full.c:791 #17 0x0000000000640fdf in invoke_async_event_handler (data=...) at src/gdb/event-loop.c:1067 #18 0x000000000063fb01 in process_event () at src/gdb/event-loop.c:339 #19 0x000000000063fb2a in gdb_do_one_event () at src/gdb/event-loop.c:360 #20 0x000000000074d607 in gdb_readline_wrapper (prompt=0x3588f40 "The next instruction is syscall exit_group. It will make the program exit. Do you want to stop the program?([y] or n) ") at src/gdb/top.c:842 #21 0x0000000000750bd9 in defaulted_query (ctlstr=0x8c6588 "The next instruction is syscall exit_group. It will make the program exit. Do you want to stop the program?", defchar=121 'y', args=0x7fff70524410) at src/gdb/utils.c:1279 #22 0x0000000000750e4c in yquery (ctlstr=0x8c6588 "The next instruction is syscall exit_group. It will make the program exit. Do you want to stop the program?") at src/gdb/utils.c:1358 #23 0x00000000004b020e in record_linux_system_call (syscall=gdb_sys_exit_group, regcache=0x3529450, tdep=0xd6c840 <amd64_linux_record_tdep>) at src/gdb/linux-record.c:1933 With my all-stop-on-top-of-non-stop series, I'm also seeing gdb.server/ext-attach.exp fail occasionally due to the same issue. The first part of the fix is for target_async implementations to make sure to remove/unmark all target-related event sources from the event loop. Tested on x86_64 Fedora 20, native and gdbserver. gdb/ 2015-02-17 Pedro Alves <palves@redhat.com> * event-loop.c (clear_async_event_handler): New function. * event-loop.h (clear_async_event_handler): New declaration. * record-btrace.c (record_btrace_async): New function. (init_record_btrace_ops): Install record_btrace_async. * record-full.c (record_full_async): New function. (record_full_resume): Don't mark the async event source here. (init_record_full_ops): Install record_full_async. (record_full_core_resume): Don't mark the async event source here. (init_record_full_core_ops): Install record_full_async. * remote.c (remote_async): Mark and clear the async stop reply queue event-loop token as appropriate.
* Fix up some target is-async vs can-async confusionsPedro Alves2015-02-173-13/+18
| | | | | | | | | | | | | | | | | | | In all these cases we're interested in whether the target is currently async, with its event sources installed in the event loop, not whether it can async if needed. Also, I'm not seeing the point of the target_async call from within linux_nat_wait. That's normally done on resume instead, which this target already does. Tested on x86_64 Fedora 20, native and gdbserver. gdb/ 2015-02-17 Pedro Alves <palves@redhat.com> * linux-nat.c (linux_child_follow_fork, linux_nat_wait_1): Use target_is_async_p instead of target_can_async. (linux_nat_wait): Use target_is_async_p instead of target_can_async. Don't enable async here. * remote.c (interrupt_query, remote_wait, putpkt_binary): Use target_is_async_p instead of target_can_async.
* Automatic date update in version.inGDB Administrator2015-02-171-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-161-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-151-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-141-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-131-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-121-1/+1
|
* framefilter quit: New testJan Kratochvil2015-02-112-0/+17
| | | | | | | | | | It definitely does not test all the RETURN_MASK_ERROR cases. But it tests at least two of them. gdb/testsuite/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.python/py-framefilter.exp (pagination quit - *): New tests.
* framefilter quit: Use RETURN_MASK_ERRORJan Kratochvil2015-02-112-13/+18
| | | | | | | | | | | Now when the code is exception safe we can let RETURN_QUIT to pass through as all the installed cleanups with handle that. gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_single_arg, enumerate_locals) (py_print_frame): Use RETURN_MASK_ERROR.
* framefilter quit: Make it exception safeJan Kratochvil2015-02-112-33/+35
| | | | | | | | | | gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Mention RETURN_QUIT in function comment. Wrap all function that can throw in cleanups. (gdbpy_apply_frame_filter): Wrap all function that can throw in cleanups.
* framefilter quit: Code cleanup: Avoid gotosJan Kratochvil2015-02-112-29/+79
| | | | | | | | | | | | | | | | | | | | | | | | goto error patters are sometimes AFAIK used in C for the cases like: int retval=-1; if (!(a=malloc())) goto error; if (!(b=malloc())) goto error_a; if (!(c=malloc())) goto error_b; retval=0; error_c: free(c); error_b: free(b); error_a: free(a); error: return retval; But here there is single error label with one do_cleanups() which I do not find it worth the goto complication. Without goto one can then furher merge code in the exit paths in the next patches and ... after all it is all the same, just without a goto. gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Substitute goto error. Remove the error label.
* framefilter quit: Code cleanup: ReindentationJan Kratochvil2015-02-112-133/+132
| | | | | | | | | | | Nothing significant but I find code more clear with less deep indentation. gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Put conditional code paths with goto first, indent the former else codepath left. Put variable 'elided' to a new inner block.
* framefilter quit: Obvious whitespacing fixesJan Kratochvil2015-02-112-15/+17
| | | | | | | gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Whitespacing fixes.
* Automatic date update in version.inGDB Administrator2015-02-111-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-101-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-091-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-081-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-071-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-061-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-051-1/+1
|
* Speed up GDB's TUI outputDoug Evans2015-02-045-6/+51
| | | | | | | | | | | | | | | | | | | | | | In the TUI mode, we call wrefresh after outputting every single character. This results in the I/O becoming very slow. Fix this by delaying refreshing the console window until an explicit flush of gdb_stdout is requested, a write to any other (unbuffered) file is done. 2015-02-04 Doug Evans <dje@google.com> Pedro Alves <palves@redhat.com> Eli Zaretskii <eliz@gnu.org> PR tui/17810 * tui/tui-command.c (tui_refresh_cmd_win): New function. * tui/tui-command.c (tui_refresh_cmd_win): Declare. * tui/tui-file.c: #include tui/tui-command.h. (tui_file_fputs): Refresh command window if stream is not gdb_stdout. (tui_file_flush): Refresh command window if stream is gdb_stdout. * tui/tui-io.c (tui_puts): Remove calls to wrefresh, fflush. (tui_readline_output): Call tui_refresh_cmd_win. (print_filename): Likewise. (tui_rl_display_match_list): Likewise.
* Automatic date update in version.inGDB Administrator2015-02-041-1/+1
|
* compile: Filter out -fpreprocessedJan Kratochvil2015-02-032-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | With global system gcc-5.0 if one also installs ccache (needing a different patch https://bugzilla.samba.org/show_bug.cgi?id=11060 for -fplugin=libcc1plugin) it breaks as GDB will read from inferior DW_AT_producer containing -fpreprocessed (due to ccache used to compile the inferior). <c> DW_AT_producer : (indirect string, offset: 0x52): GNU C11 5.0.0 20150114 (Red Hat 5.0.0-0.1) -fpreprocessed -mtune=generic - march=x86-64 -g It is wrong that gcc puts -fpreprocessed into DW_AT_producer - fixed it in trunk GCCs: https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01495.html But even with that fix there are already built inferiors out there which GDB could be compatible (for the 'compile' mode) with. gdb/ChangeLog 2015-02-03 Jan Kratochvil <jan.kratochvil@redhat.com> Filter out inferior gcc option -fpreprocessed. * compile/compile.c (filter_args): New function. (get_args): Use it.
* Automatic date update in version.inGDB Administrator2015-02-031-1/+1
|
* [Ada] Do not re-cache symbol-lookup result found from cache lookup.Joel Brobecker2015-02-022-6/+11
| | | | | | | | | | | | | | When ada-lang.c:ada_lookup_symbol_list_worker finds a match in the symbol cache, it caches the result again, which is unecessary. This patch fixes the code to avoid that. gdb/ChangeLog: PR gdb/17856: * ada-lang.c (ada_lookup_symbol_list_worker): Do not re-cache results found in the cache. Tested on x86_64-linux, no regression.
* [Ada] pspace_data->sym_cache is always NULLJoel Brobecker2015-02-022-5/+10
| | | | | | | | | | | | | | | | | | | | | | | The Ada symbol cache has been designed to have one instance of that of that cache per program space, and for each instance to be created on-demand. ada_get_symbol_cache is the function responsible for both lookup and creation on demand. Unfortunately, ada_get_symbol_cache forgot to store the reference to newly created caches, thus causing it to: - Leak old caches; - Allocate a new cache each time the cache is being searched or a new entry is to be inserted. This patch fixes the issue by avoiding the use of the local variable, which indirectly allowed the bug to happen. We manipulate the reference in the program-space data instead. gdb/ChangeLog: PR gdb/17854: * ada-lang.c (ada_get_symbol_cache): Set pspace_data->sym_cache when allocating a new one.
* Automatic date update in version.inGDB Administrator2015-02-021-1/+1
|
* Automatic date update in version.inGDB Administrator2015-02-011-1/+1
|
* PR symtab/17855Joel Brobecker2015-01-312-2/+10
| | | | | | | | gdb/ChangeLog: PR symtab/17855 * symfile.c (clear_symtab_users): Move call to breakpoint_re_set to end.
* Make sure TABs are expanded in TUI windows on MS-Windows.Eli Zaretskii2015-01-314-2/+94
| | | | | | | | | | | | | | | gdb/ 2015-01-31 Eli Zaretskii <eliz@gnu.org> * tui/tui-io.c (tui_expand_tabs): New function. (tui_puts, tui_redisplay_readline): Expand TABs into the appropriate number of spaces. * tui/tui-regs.c: Include tui-io.h. (tui_register_format): Call tui_expand_tabs to expand TABs into the appropriate number of spaces. * tui/tui-io.h: Add prototype for tui_expand_tabs. (cherry picked from commit 312809f8838911dabff84d7ad3ccf341307d2b19)
* Automatic date update in version.inGDB Administrator2015-01-311-1/+1
|
* Automatic date update in version.inGDB Administrator2015-01-301-1/+1
|
* PR symtab/17890Doug Evans2015-01-292-0/+15
| | | | | | | gdb/ChangeLog: PR symtab/17890 * dwarf2read.c (dwarf_decode_line_header): Punt if version > 4.
* Automatic date update in version.inGDB Administrator2015-01-291-1/+1
|
* Automatic date update in version.inGDB Administrator2015-01-281-1/+1
|
* Automatic date update in version.inGDB Administrator2015-01-271-1/+1
|
* Add missing comments in rs6000-tdep.c, ppc64-tdep.c and ppc-linux-tdep.c.Wei-cheng Wang2015-01-274-13/+72
| | | | | | | | | | | | | | | | | gdb/ChangeLog Backport from mainline: * ppc-linux-tdep.c (ppc_skip_trampoline_code, ppc_canonicalize_syscall, ppc_linux_syscall_record, ppc_linux_record_signal, ppc_init_linux_record_tdep): Add comments. * ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise. * rs6000-tdep.c (rs6000_epilogue_frame_cache, rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register, rs6000_epilogue_frame_sniffer, ppc_record_vsr, ppc_process_record_op4, ppc_process_record_op19, ppc_process_record_op31, ppc_process_record_op59, ppc_process_record_op60, ppc_process_record_op63): Likewise.
* Fix format warning in rs6000t-dep.cWei-cheng Wang2015-01-272-17/+27
| | | | | | | | | | | | | gdb/ChangeLog Backport from mainline: * rs6000-tdep.c (ppc_process_record_op4, ppc_process_record_op19, ppc_process_record_op31, ppc_process_record_op59, ppc_process_record_op60, ppc_process_record_op63, ppc_process_record): Fix -Wformat warning. * rs6000-tdep.c (rs6000_epilogue_frame_cache, ppc_process_record_op60): Remove unused variables.
* Skip-trampoline for PowerPC reverse-stepping.Wei-cheng Wang2015-01-273-47/+107
| | | | | | | | | | gdb/ChangeLog Backport from mainline: * ppc-linux-tdep.c (ppc_skip_trampoline_code): Scan PLT stub backward for reverse debugging. * ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
* Reverse debugging for PowerPC.Wei-cheng Wang2015-01-277-3/+2115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb/ChangeLog Backport from mainline: * configure.tgt (powerpc*-*-linux): Add linux-record.o to gdb_target_obs. (ppc_linux_record_tdep, ppc64_linux_record_tdep): New for linux syscall record. (ppc_canonicalize_syscall, ppc_linux_syscall_record, ppc_linux_record_signal, ppc_init_linux_record_tdep): New functions. (ppc_linux_init_abi): Set process_record, process_record_signal. * ppc-tdep.h (struct gdbarch_tdep): Add ppc_syscall_record and ppc_linux_record_tdep to gdbarch_tdep. (ppc_process_record): New declaration. * rs6000-tdep.c (ppc_record_vsr, ppc_process_record_op4, ppc_process_record_op19, ppc_process_record_op31, ppc_process_record_op59, ppc_process_record_op60, ppc_process_record_op63, ppc_process_record): New functions. gdb/testsuite/ChangeLog Backport from mainline: * lib/gdb.exp (supports_process_record): Return true for powerpc*-*-linux*. (supports_reverse): Likewise.
* Epilogue unwinder for PowerPC.Wei-cheng Wang2015-01-262-4/+109
| | | | | | | | | | | | | | | gdb/ChangeLog Backport from mainline: * rs6000-tdep.c (rs6000_in_function_epilogue_p): Rename to rs6000_in_function_epilogue_frame_p and add an argument for frame_info. (rs6000_epilogue_frame_cache, rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register, rs6000_epilogue_frame_sniffer): New functions. (rs6000_epilogue_frame_unwind): New. (rs6000_gdbarch_init): Append epilogue unwinder.
* Automatic date update in version.inGDB Administrator2015-01-261-1/+1
|
* Fix 100x slowdown regression on DWZ filesJan Kratochvil2015-01-252-13/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Fedora started to use DWZ DWARF compressor: http://fedoraproject.org/wiki/Features/DwarfCompressor GDB has slowed down a lot. To make it clear - DWZ is DWARF structure rearrangement, "compressor" does not mean any zlib style data compression. This patch reduces LibreOffice backtrace from 5 minutes to 3 seconds (100x) and it also reduces memory consumption 20x. [ benchmark is at the bottom of this mail ] Example of DWZ output: ------------------------------------------------------------------------------ Compilation Unit @ offset 0xc4: <0><cf>: Abbrev Number: 17 (DW_TAG_partial_unit) <d0> DW_AT_stmt_list : 0x0 <d4> DW_AT_comp_dir : (indirect string, offset: 0x6f): /usr/src/debug/gdb-7.7.1/build-x86_64-redhat-linux-gnu/gdb <1><d8>: Abbrev Number: 9 (DW_TAG_typedef) <d9> DW_AT_name : (indirect string, offset: 0x827dc): size_t <dd> DW_AT_decl_file : 4 <de> DW_AT_decl_line : 212 <df> DW_AT_type : <0xae> Compilation Unit @ offset 0xe4: <0><ef>: Abbrev Number: 13 (DW_TAG_partial_unit) <f0> DW_AT_stmt_list : 0x0 <f4> DW_AT_comp_dir : (indirect string, offset: 0x6f): /usr/src/debug/gdb-7.7.1/build-x86_64-redhat-linux-gnu/gdb <1><f8>: Abbrev Number: 45 (DW_TAG_typedef) <f9> DW_AT_name : (indirect string, offset: 0x251): __off_t <fd> DW_AT_decl_file : 3 <fe> DW_AT_decl_line : 131 <ff> DW_AT_type : <0x68> Compilation Unit @ offset 0x62d9f9: <0><62da04>: Abbrev Number: 20 (DW_TAG_compile_unit) [...] <62da12> DW_AT_low_pc : 0x807e10 <62da1a> DW_AT_high_pc : 134 <62da1c> DW_AT_stmt_list : 0xf557e <1><62da20>: Abbrev Number: 7 (DW_TAG_imported_unit) <62da21> DW_AT_import : <0xcf> [Abbrev Number: 17] ------------------------------------------------------------------------------ One can see all DW_TAG_partial_unit have DW_AT_stmt_list 0x0 which causes repeated decoding of that .debug_line unit on each DW_TAG_imported_unit. This was OK before as each DW_TAG_compile_unit has its own .debug_line unit. But since the introduction of DW_TAG_partial_unit by DWZ one should cache read-in DW_AT_stmt_list .debug_line units. Fortunately one does not need to cache whole struct linetable *symtab->linetable and other data from .debug_line mapping PC<->lines ------------------------------------------------------------------------------ Line Number Statements: Extended opcode 2: set Address to 0x45c880 Advance Line by 25 to 26 Copy ------------------------------------------------------------------------------ as the only part of .debug_line which GDB needs for DW_TAG_partial_unit is: ------------------------------------------------------------------------------ The Directory Table: ../../gdb /usr/include/bits [...] The File Name Table: Entry Dir Time Size Name 1 1 0 0 gdb.c 2 2 0 0 string3.h [...] ------------------------------------------------------------------------------ specifically referenced in GDB for DW_AT_decl_file at a single place: ------------------------------------------------------------------------------ fe = &cu->line_header->file_names[file_index - 1]; SYMBOL_SYMTAB (sym) = fe->symtab; ------------------------------------------------------------------------------ This is because for some reason DW_TAG_partial_unit never contains PC-related DWARF information. I do not know exactly why, the compression ratio is a bit lower due to it but thanksfully currently it is that way: dwz.c: ------------------------------------------------------------------------------ /* These attributes reference code, prevent moving DIEs with them. */ case DW_AT_low_pc: case DW_AT_high_pc: case DW_AT_entry_pc: case DW_AT_ranges: die->die_ck_state = CK_BAD; + /* State of checksum computation. Not computed yet, computed and suitable for moving into partial units, currently being computed and finally determined unsuitable for moving into partial units. */ enum { CK_UNKNOWN, CK_KNOWN, CK_BEING_COMPUTED, CK_BAD } die_ck_state : 2; ------------------------------------------------------------------------------ I have also verified also real-world Fedora debuginfo files really comply with that assumption with dwgrep https://github.com/pmachata/dwgrep using: ------------------------------------------------------------------------------ dwgrep -e 'entry ?DW_TAG_partial_unit child* ( ?DW_AT_low_pc , ?DW_AT_high_pc , ?DW_AT_ranges )' /usr/lib/debug/** ------------------------------------------------------------------------------ BTW I think GDB already does not support the whole DW_TAG_imported_unit and DW_TAG_partial_unit usage possibilities as specified by the DWARF standard. I think GDB would not work if DW_TAG_imported_unit was used in some inner level and not at the CU level (readelf -wi level <1>) - this is how DWZ is using DW_TAG_imported_unit. Therefore I do not think further assumptions about DW_TAG_imported_unit and DW_TAG_partial_unit usage by DWZ are a problem for GDB. One could save the whole .debug_line decoded PC<->lines mapping (and not just the DW_AT_decl_file table) but: * there are some problematic corner cases so one could do it incorrectly * there are no real world data to really test such patch extension * such extension could be done perfectly incrementally on top of this patch ------------------------------------------------------------------------------ benchmark - on Fedora 20 x86_64 and FSF GDB HEAD: echo -e 'thread apply all bt\nset confirm no\nq'|./gdb -p `pidof soffice.bin` -ex 'set pagination off' -ex 'maintenance set per-command space' -ex 'maintenance set per-command symtab' -ex 'maintenance set per-command time' FSF GDB HEAD ("thread apply all bt"): Command execution time: 333.693000 (cpu), 335.587539 (wall) ---sec Space used: 1736404992 (+1477189632 for this command) ----MB vs. THIS PATCH ("thread apply all bt"): Command execution time: 2.595000 (cpu), 2.607573 (wall) -sec Space used: 340058112 (+85917696 for this command) --MB FSF GDB HEAD ("thread apply all bt full"): Command execution time: 466.751000 (cpu), 468.345837 (wall) ---sec Space used: 2330132480 (+2070974464 for this command) ----MB vs. THIS PATCH ("thread apply all bt full"): Command execution time: 18.907000 (cpu), 18.964125 (wall) --sec Space used: 364462080 (+110325760 for this command) ---MB ------------------------------------------------------------------------------ gdb/ChangeLog 2015-01-25 Jan Kratochvil <jan.kratochvil@redhat.com> Fix 100x slowdown regression on DWZ files. * dwarf2read.c (struct dwarf2_per_objfile): Add line_header_hash. (struct line_header): Add offset and offset_in_dwz. (dwarf_decode_lines): Add parameter decode_mapping to the declaration. (free_line_header_voidp): New declaration. (line_header_hash, line_header_hash_voidp, line_header_eq_voidp): New functions. (dwarf2_build_include_psymtabs): Update dwarf_decode_lines caller. (handle_DW_AT_stmt_list): Use line_header_hash. (free_line_header_voidp): New function. (dwarf_decode_line_header): Initialize offset and offset_in_dwz. (dwarf_decode_lines): New parameter decode_mapping, use it. (dwarf2_free_objfile): Free line_header_hash.
* Automatic date update in version.inGDB Administrator2015-01-251-1/+1
|