Add symbol lookup cache.
[binutils-gdb.git] / gdb / ChangeLog
1 2015-01-10 Doug Evans <xdje42@gmail.com>
2
3 Add symbol lookup cache.
4 * NEWS: Document new options and commands.
5 * symtab.c (symbol_cache_key): New static global.
6 (DEFAULT_SYMBOL_CACHE_SIZE, MAX_SYMBOL_CACHE_SIZE): New macros.
7 (SYMBOL_LOOKUP_FAILED): New macro.
8 (symbol_cache_slot_state): New enum.
9 (block_symbol_cache): New struct.
10 (symbol_cache): New struct.
11 (new_symbol_cache_size, symbol_cache_size): New static globals.
12 (hash_symbol_entry, eq_symbol_entry): New functions.
13 (symbol_cache_byte_size, resize_symbol_cache): New functions.
14 (make_symbol_cache, free_symbol_cache): New functions.
15 (get_symbol_cache, symbol_cache_cleanup): New function.
16 (set_symbol_cache_size, set_symbol_cache_size_handler): New functions.
17 (symbol_cache_lookup, symbol_cache_clear_slot): New function.
18 (symbol_cache_mark_found, symbol_cache_mark_not_found): New functions.
19 (symbol_cache_flush, symbol_cache_dump): New functions.
20 (maintenance_print_symbol_cache): New function.
21 (maintenance_flush_symbol_cache): New function.
22 (symbol_cache_stats): New function.
23 (maintenance_print_symbol_cache_statistics): New function.
24 (symtab_new_objfile_observer): New function.
25 (symtab_free_objfile_observer): New function.
26 (lookup_static_symbol, lookup_global_symbol): Use symbol cache.
27 (_initialize_symtab): Init symbol_cache_key. New parameter
28 maint symbol-cache-size. New maint commands print symbol-cache,
29 print symbol-cache-statistics, flush-symbol-cache.
30 Install new_objfile, free_objfile observers.
31
32 2015-01-09 Patrick Palka <patrick@parcs.ath.cx>
33
34 * Makefile.in (.y.c): Don't munge yacc's #line
35 directives.
36
37 2015-01-09 Patrick Palka <patrick@parcs.ath.cx>
38
39 * utils.c (defaulted_query): Rewrite to use gdb_readline_wrapper
40 to prompt for input.
41 * tui/tui-hooks.c (tui_query_hook): Remove.
42 (tui_install_hooks): Don't set deprecated_query_hook.
43 * tui/tui-io.c (tui_redisplay_readline): Fix off-by-one error in
44 height calculation. Always update the command window's cur_line.
45
46 2015-01-09 Pedro Alves <palves@redhat.com>
47
48 * breakpoint.c (hardware_breakpoint_inserted_here_p): New
49 function.
50 * breakpoint.h (hardware_breakpoint_inserted_here_p): New
51 declaration.
52 * linux-nat.c (linux_nat_status_is_event): Move higher up in file.
53 (linux_resume_one_lwp): Store the thread's PC. Adjust to clear
54 stop_reason.
55 (check_stopped_by_watchpoint): New function.
56 (save_sigtrap): Reimplement.
57 (linux_nat_stopped_by_watchpoint): Adjust.
58 (linux_nat_lp_status_is_event): Delete.
59 (stop_wait_callback): Only call save_sigtrap after storing the
60 pending status.
61 (status_callback): If the thread had been stopped for a breakpoint
62 that has since been removed, discard the event and resume the LWP.
63 (count_events_callback, select_event_lwp_callback): Use
64 lwp_status_pending_p instead of linux_nat_lp_status_is_event.
65 (cancel_breakpoint): Rename to ...
66 (check_stopped_by_breakpoint): ... this. Record whether the LWP
67 stopped for a software breakpoint or hardware breakpoint.
68 (select_event_lwp): Only give preference to the stepping LWP in
69 all-stop mode. Adjust comments.
70 (stop_and_resume_callback): Remove references to new_pending_p.
71 (linux_nat_filter_event): Likewise. Leave exit events of the
72 leader thread pending here. Handle signal short circuiting here.
73 Only call save_sigtrap after storing the pending waitstatus.
74 (linux_nat_wait_1): Remove 'retry' label. Remove references to
75 new_pending. Don't handle leaving events the caller is not
76 interested in pending here, nor handle signal short-circuiting
77 here. Also give equal priority to all LWPs that have had events
78 in non-stop mode. If reporting a software breakpoint event,
79 unadjust the LWP's PC.
80 * linux-nat.h (enum lwp_stop_reason): New.
81 (struct lwp_info) <stop_pc>: New field.
82 (struct lwp_info) <stopped_by_watchpoint>: Delete field.
83 (struct lwp_info) <stop_reason>: New field.
84 * x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
85
86 2015-01-09 Pedro Alves <palves@redhat.com>
87
88 * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
89 Set the LWP's 'resumed' flag.
90
91 2015-01-09 Pedro Alves <palves@redhat.com>
92
93 * linux-nat.c (linux_resume_one_lwp): New function.
94 (resume_lwp): Use lwp_status_pending_p and linux_resume_one_lwp.
95 (linux_nat_resume): Use lwp_status_pending_p and
96 linux_resume_one_lwp.
97 (linux_handle_syscall_trap): Use linux_resume_one_lwp.
98 (linux_handle_extended_wait): Use linux_resume_one_lwp.
99 (status_callback, running_callback): Use lwp_status_pending_p.
100 (lwp_status_pending_p): New function.
101 (stop_and_resume_callback): Use lwp_status_pending_p.
102 (linux_nat_filter_event): Use linux_resume_one_lwp.
103 (linux_nat_wait_1): Always use status_callback to look for an LWP
104 with a pending status. Use linux_resume_one_lwp.
105 (resume_stopped_resumed_lwps): Use lwp_status_pending_p and
106 linux_resume_one_lwp.
107
108 2015-01-09 Pedro Alves <palves@redhat.com>
109
110 * breakpoint.c (bp_location_inserted_here_p): New function,
111 factored out from ...
112 (breakpoint_inserted_here_p): ... here. Use
113 ALL_BP_LOCATIONS_AT_ADDR.
114 (software_breakpoint_inserted_here_p): Use
115 bp_location_inserted_here_p and ALL_BP_LOCATIONS_AT_ADDR.
116
117 2014-01-09 Pedro Alves <palves@redhat.com>
118
119 Skip enabling event reporting if the kernel supports
120 PTRACE_EVENT_CLONE.
121 * linux-thread-db.c: Include "nat/linux-ptrace.h".
122 (thread_db_use_events): New function.
123 (try_thread_db_load_1): Check thread_db_use_events before enabling
124 event reporting.
125 (update_thread_state): New function.
126 (attach_thread): Use it. Check thread_db_use_events before
127 enabling event reporting.
128 (thread_db_detach): Check thread_db_use_events before disabling
129 event reporting.
130 (find_new_threads_callback): Check thread_db_use_events before
131 enabling event reporting. Update the thread's state if not using
132 libthread_db events.
133
134 2015-01-09 Pedro Alves <palves@redhat.com>
135
136 * linux-nat.c (lin_lwp_attach_lwp): Assert that the lwp id we're
137 about to wait for is > 0.
138 * linux-thread-db.c (find_new_threads_callback): Ignore thread if
139 the kernel thread ID is -1.
140
141 2015-01-09 Pedro Alves <palves@redhat.com>
142
143 * linux-nat.c (attach_proc_task_lwp_callback): New function.
144 (linux_nat_attach): Use linux_proc_attach_tgid_threads.
145 (wait_lwp, linux_nat_filter_event): If not set yet, set the lwp's
146 ptrace option flags.
147 * linux-nat.h (struct lwp_info) <must_set_ptrace_flags>: New
148 field.
149 * nat/linux-procfs.c: Include <dirent.h>.
150 (linux_proc_get_int): New parameter "warn". Handle it.
151 (linux_proc_get_tgid): Adjust.
152 (linux_proc_get_tracerpid): Rename to ...
153 (linux_proc_get_tracerpid_nowarn): ... this.
154 (linux_proc_pid_get_state): New function, factored out from
155 (linux_proc_pid_has_state): ... this. Add new parameter "warn"
156 and handle it.
157 (linux_proc_pid_is_gone): New function.
158 (linux_proc_pid_is_stopped): Adjust.
159 (linux_proc_pid_is_zombie_maybe_warn)
160 (linux_proc_pid_is_zombie_nowarn): New functions.
161 (linux_proc_pid_is_zombie): Use
162 linux_proc_pid_is_zombie_maybe_warn.
163 (linux_proc_attach_tgid_threads): New function.
164 * nat/linux-procfs.h (linux_proc_get_tgid): Update comment.
165 (linux_proc_get_tracerpid): Rename to ...
166 (linux_proc_get_tracerpid_nowarn): ... this, and update comment.
167 (linux_proc_pid_is_gone): New declaration.
168 (linux_proc_pid_is_zombie): Update comment.
169 (linux_proc_pid_is_zombie_nowarn): New declaration.
170 (linux_proc_attach_lwp_func): New typedef.
171 (linux_proc_attach_tgid_threads): New declaration.
172 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Adjust to
173 use nowarn functions.
174 (linux_ptrace_attach_fail_reason_string): Move here from
175 gdbserver/linux-low.c and rename.
176 (ptrace_supports_feature): If the current ptrace options are not
177 known yet, check them now, instead of asserting.
178 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason_string):
179 Declare.
180
181 2015-01-09 Pedro Alves <palves@redhat.com>
182
183 * linux-thread-db.c (thread_db_find_new_threads_silently)
184 (try_thread_db_load_1, try_thread_db_load, thread_db_load_search)
185 (find_new_threads_once): Print debug output on gdb_stdlog.
186
187 2015-01-09 Chen Gang <gang.chen.5i5j@gmail.com>
188 Pedro Alves <palves@redhat.com>
189
190 * compile/compile.c: Include "gdb_wait.h".
191 (do_rmdir): Check return value, and free 'zap'.
192
193 2015-01-08 Pedro Alves <palves@redhat.com>
194 Yao Qi <yao@codesourcery.com>
195
196 * dwarf2loc.c (indirect_pieced_value): Don't call
197 gdb_sign_extend. Call extract_signed_integer instead.
198 * utils.c (gdb_sign_extend): Remove.
199 * utils.h (gdb_sign_extend): Remove declaration.
200
201 2015-01-07 Pierre Muller <muller@sourceware.org>
202
203 PR symtab/17811
204 * stabsread.c (define_symbol): Set language for C++ special symbols.
205
206 2015-01-07 Patrick Palka <patrick@parcs.ath.cx>
207
208 * inflow.c (initial_gdb_ttystate): Tweak comment.
209
210 2015-01-07 Joel Brobecker <brobecker@adacore.com>
211
212 * inflow.c (set_initial_gdb_ttystate): Add empty line after
213 comment documenting function.
214
215 2015-01-07 Patrick Palka <patrick@parcs.ath.cx>
216
217 * terminal.h (set_initial_gdb_ttystate): Declare.
218 * inflow.c (initial_gdb_ttystate): New static variable.
219 (set_initial_gdb_ttystate): New setter.
220 (child_terminal_init_with_pgrp): Copy initial_gdb_ttystate
221 instead of our current terminal state.
222 * top.c (gdb_init): Call set_initial_gdb_ttystate.
223
224 2015-01-07 Joel Brobecker <brobecker@adacore.com>
225
226 * guile/scm-type.c (tyscm_array_1): Add comment.
227 * python/py-type.c (typy_array_1): Add comment.
228
229 2015-01-06 Joel Brobecker <brobecker@adacore.com>
230
231 * guile/scm-type.c (tyscm_array_1): Do not raise out-of-range
232 error if N2 is equal to N1 - 1.
233
234 2015-01-06 Joel Brobecker <brobecker@adacore.com>
235
236 * python/py-type.c (typy_array_1): Do not raise negative-length
237 exception if N2 is equal to N1 - 1.
238
239 2015-01-03 Doug Evans <xdje42@gmail.com>
240
241 * c-exp.y: Whitespace cleanup.
242 (classify_inner_name): Remove extra ;.
243
244 2015-01-02 Maciej W. Rozycki <macro@codesourcery.com>
245
246 * mips-tdep.c (mips32_scan_prologue): Keep the extracted stack
247 offset signed.
248
249 2015-01-02 Doug Evans <dje@google.com>
250
251 * dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
252
253 2015-01-02 Doug Evans <dje@google.com>
254
255 * symtab.h (struct symbol): Fix typo in comment.
256
257 2015-01-01 Joel Brobecker <brobecker@adacore.com>
258
259 Update year range in copyright notice of all files.
260
261 2015-01-01 Joel Brobecker <brobecker@adacore.com>
262
263 * top.c (print_gdb_version): Update copyright year to 2015.
264
265 2015-01-01 Joel Brobecker <brobecker@adacore.com>
266
267 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.
268
269 For older changes see ChangeLog-2014.
270 \f
271 Local Variables:
272 mode: change-log
273 left-margin: 8
274 fill-column: 74
275 version-control: never
276 coding: utf-8
277 End: