gdbserver: Use std::list for all_processes
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
4 * inferiors.h: Include <list>.
5 (struct process_info) <entry>: Remove field.
6 <pid>: New field.
7 (pid_of): Change macro to function.
8 (ptid_of, lwpid_of): Remove macro.
9 (all_processes): Change type to std::list<process_info *>.
10 (ALL_PROCESSES): Remove macro.
11 (for_each_process, find_process): New function.
12 * inferiors.c (all_processes): Change type to
13 std::list<process_info *>.
14 (find_thread_process): Adjust.
15 (add_process): Likewise.
16 (remove_process): Likewise.
17 (find_process_pid): Likewise.
18 (get_first_process): Likewise.
19 (started_inferior_callback): Remove.
20 (have_started_inferiors_p): Adjust.
21 (attached_inferior_callback): Remove.
22 (have_attached_inferiors_p): Adjust.
23 * linux-low.c (check_zombie_leaders): Likewise.
24 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
25 (x86_linux_update_xmltarget): Adjust.
26 * server.c (handle_query): Likewise.
27 (gdb_reattached_process): Remove.
28 (handle_status): Adjust.
29 (kill_inferior_callback): Likewise.
30 (detach_or_kill_inferior): Remove.
31 (print_started_pid): Likewise.
32 (print_attached_pid): Likewise.
33 (detach_or_kill_for_exit): Update.
34 (process_serial_event): Likewise.
35 * linux-arm-low.c (arm_new_fork): Likewise.
36
37 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
38
39 * dll.h: Include <list>.
40 (struct dll_info): Add constructor.
41 <entry>: Remove field.
42 (all_dlls): Change type to std::list<dll_info>.
43 * dll.c: Include <algorithm>.
44 (get_dll): Remove macro.
45 (all_dlls): Change type to std::list<dll_info *>.
46 (free_one_dll): Remove.
47 (match_dll): Likewise.
48 (loaded_dll): Adjust.
49 (unloaded_dll): Adjust to all_dlls type change, use
50 std::find_if. Inline code from match_dll.
51 (clear_dlls): Adjust to all_dlls type change.
52 * server.c (emit_dll_description): Remove.
53 (handle_qxfer_libraries): Adjust to all_dlls type change,
54 integrate emit_dll_description's functionality.
55
56 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
57
58 * linux-low.h (struct linux_target_ops) <delete_process>: New
59 field.
60 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
61 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
62 (struct linux_target_ops): Add delete_process callback.
63 * linux-arm-low.c (arm_delete_process): New.
64 (struct linux_target_ops): Add delete_process callback.
65 * linux-bfin-low.c (struct linux_target_ops): Likewise.
66 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
67 * linux-m32r-low.c (struct linux_target_ops): Likewise.
68 * linux-mips-low.c (mips_linux_delete_process): New.
69 (struct linux_target_ops): Add delete_process callback.
70 * linux-ppc-low.c (struct linux_target_ops): Likewise.
71 * linux-s390-low.c (struct linux_target_ops): Likewise.
72 * linux-sh-low.c (struct linux_target_ops): Likewise.
73 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
74 * linux-tile-low.c (struct linux_target_ops): Likewise.
75 * linux-x86-low.c (x86_linux_delete_process): New.
76 (struct linux_target_ops): Add delete_process callback.
77 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
78
79 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
80
81 * linux-aarch64-low.c (the_low_target): Add thread delete
82 callback.
83 * linux-arm-low.c (arm_delete_thread): New function.
84 (the_low_target): Add thread delete callback.
85 * linux-bfin-low.c (the_low_target): Likewise.
86 * linux-crisv32-low.c (the_low_target): Likewise.
87 * linux-low.c (delete_lwp): Invoke delete_thread callback if
88 set.
89 * linux-low.h (struct linux_target_ops) <delete_thread>: New
90 field.
91 * linux-m32r-low.c (the_low_target): Add thread delete callback.
92 * linux-mips-low.c (mips_linux_delete_thread): New function.
93 (the_low_target): Add thread delete callback.
94 * linux-ppc-low.c (the_low_target): Likewise.
95 * linux-s390-low.c (the_low_target): Likewise.
96 * linux-sh-low.c (the_low_target): Likewise.
97 * linux-tic6x-low.c (the_low_target): Likewise.
98 * linux-tile-low.c (the_low_target): Likewise.
99 * linux-x86-low.c (the_low_target): Likewise.
100 * linux-xtensa-low.c (the_low_target): Likewise.
101
102 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
103
104 * win32-low.c: Include "common-inferior.h".
105
106 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
107
108 * inferiors.c (set_inferior_cwd): New function.
109 * server.c (handle_general_set): Handle QSetWorkingDir packet.
110 (handle_query): Inform that QSetWorkingDir is supported.
111 * win32-low.c (create_process): Pass the inferior's cwd to
112 CreateProcess.
113
114 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
115
116 * inferiors.c (current_inferior_cwd): New global variable.
117 (get_inferior_cwd): New function.
118 * inferiors.h (struct process_info) <cwd>: New field.
119
120 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
121
122 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
123 (OBS): Add gdb_tilde_expand.o.
124
125 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
126
127 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
128 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
129
130 2017-09-29 Pedro Alves <palves@redhat.com>
131
132 * ax.c (gdb_parse_agent_expr): Constify.
133 * ax.h (gdb_parse_agent_expr): Constify.
134 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
135 Constify.
136 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
137 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
138 * remote-utils.h (read_ptid): Constify.
139 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
140 (process_point_options, process_serial_event): Constify.
141 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
142 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
143 (cmd_qtbuffer): Constify.
144
145 2017-09-29 Pedro Alves <palves@redhat.com>
146
147 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
148 fails.
149
150 2017-09-29 Pedro Alves <palves@redhat.com>
151
152 * linux-low.c (handle_extended_wait): Pass parent thread instead
153 of process to thread_db_notice_clone.
154 * linux-low.h (thread_db_notice_clone): Replace parent process
155 parameter with parent thread parameter.
156 * thread-db.c (find_one_thread): Add comment.
157 (thread_db_notice_clone): Replace parent process parameter with
158 parent thread parameter. Temporarily switch to the parent thread.
159
160 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
161
162 * gdbthread.h: Include "common-gdbthread.h".
163 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
164 "if" when validating the ptid.
165 * remote-utils.c: Include "gdbthread.h".
166 (prepare_resume_reply): Use "switch_to_thread".
167 * target.c (done_accessing_memory): Likewise.
168
169 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
170
171 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
172 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
173 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
174 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
175 s390x-gs-linux64-ipa.o to ipa_obj.
176 * linux-s390-low.c (HWCAP_S390_GS): New define.
177 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
178 New functions.
179 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
180 (s390_arch_setup): Check for guarded-storage support and choose
181 appropriate tdesc.
182 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
183 init_registers_s390x_gs_linux64.
184 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
185 enum value.
186 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
187 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
188
189 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
190
191 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
192
193 2017-09-21 Kevin Buettner <kevinb@redhat.com>
194
195 * linux-low.h (struct lwp_info): Add new field, thread_handle.
196 (thread_db_thread_handle): Declare.
197 * linux-low.c (linux_target_ops): Initialize thread_handle.
198 * server.c (handle_qxfer_threads_worker): Add support for
199 "handle" attribute.
200 * target.h (struct target_ops): Add new function pointer,
201 thread_handle.
202 (target_thread_handle): Define.
203 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
204 field in lwp.
205 (thread_db_thread_handle): New function.
206
207 2017-09-21 Kevin Buettner <kevinb@redhat.com>
208
209 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
210 * linux-low.h (thread_db_notice_clone): Declare.
211 * thread-db.c (thread_db_notice_clone): New function.
212
213 2017-09-21 Pedro Alves <palves@redhat.com>
214
215 * server.c (gdb_read_memory, handle_status, process_serial_event)
216 (handle_serial_event, handle_target_event): Adjust to
217 set_desired_thread prototype change.
218 * target.c (set_desired_thread): Remove 'use_general' parameter
219 and adjust.
220 * target.h (set_desired_thread): Remove 'use_general' parameter.
221
222 2017-09-20 Tom Tromey <tom@tromey.com>
223
224 * target.c (target_terminal::terminal_state): Define.
225 (target_terminal::init): Rename from target_terminal_init.
226 (target_terminal::inferior): Rename from
227 target_terminal_inferior.
228 (target_terminal::ours): Rename from target_terminal_ours.
229 (target_terminal::ours_for_output, target_terminal::info): New.
230
231 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
232
233 * server.c (accumulate_file_name_length): Remove.
234 (emit_dll_description): Adjust to std::string change.
235 (handle_qxfer_libraries): Use std::string to hold document.
236
237 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
238
239 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
240 return type of xml_escape_text.
241 * server.c (emit_dll_description): Likewise.
242
243 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
244
245 * server.c (captured_main): Accept argument for --selftest.
246 Update run_tests call.
247 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
248 when registering selftests.
249
250 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
251
252 * regcache.c (get_thread_regcache): Update code to use "std::vector"
253 instead of "VEC" for "target_desc.reg_defs".
254 (regcache_cpy): Likewise.
255 (registers_to_string): Likewise.
256 (registers_from_string): Likewise.
257 (find_regno): Likewise.
258 (supply_regblock): Likewise.
259 (regcache_raw_read_unsigned): Likewise.
260 * tdesc.c (init_target_desc): Likewise.
261 (tdesc_create_reg): Likewise.
262 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
263 (struct target_desc) <reg_defs>: Convert to "std::vector".
264 (target_desc): Do not initialize "reg_defs".
265 (~target_desc): Update code to use "std::vector" instead of "VEC"
266 for "target_desc.reg_defs".
267 (operator==): Likewise.
268
269 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
270
271 * inferiors.h (thread_to_gdb_id): Remove.
272 * inferiors.c (thread_to_gdb_id): Remove.
273 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
274 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
275 lynx_store_registers, lynx_read_memory, lynx_write_memory):
276 Likewise.
277 * nto-low.c (nto_fetch_registers, nto_store_registers,
278 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
279
280 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
281
282 * inferiors.h (gdb_id_to_thread_id): Remove.
283 * inferiors.c (gdb_id_to_thread_id): Remove.
284 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
285 removal. Move pid declaration closer to where it's used.
286
287 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
288
289 * server.c (handle_detach): New function.
290 (process_serial_event): Move code out, call handle_detach.
291
292 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
293
294 * server.c (require_running): Rename to ...
295 (require_running_or_return): ... this ...
296 (require_running_or_break): ... and this.
297 (handle_query, process_serial_event): Adjust.
298
299 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
300
301 * linux-low.c (linux_set_resume_request): Remove unused
302 variables.
303
304 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
305
306 * server.c (first_thread_of): Remove.
307 (process_serial_event): Replace usage of first_thread_of with
308 find_any_thread_of_pid.
309 * tracepoint.c (same_process_p): Remove.
310 (gdb_agent_about_to_close): Replace usage of same_process_p with
311 find_any_thread_of_pid.
312 * linux-x86-low.c (same_process_callback): Remove.
313 (x86_arch_setup_process_callback): Replace usage of
314 same_process_callback with find_any_thread_of_pid.
315 * thread-db.c (any_thread_of): Remove.
316 (switch_to_process): Replace usage of any_thread_of with
317 find_any_thread_of_pid.
318 * inferiors.c (thread_pid_matches_callback): Remove.
319 (find_thread_process): Adjust to use find_any_thread_of_pid.
320
321 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
322
323 * regcache.c (get_thread_regcache): Guard calls to "memset"
324 with "!VEC_empty".
325
326 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
327
328 * linux-low.c (handle_extended_wait): Use
329 "allocate_target_description" instead of "XNEW".
330 * linux-x86-low.c (initialize_low_arch): Likewise.
331
332 2017-09-05 Yao Qi <yao.qi@linaro.org>
333
334 * configure.srv (srv_i386_regobj): Remove.
335 (srv_amd64_regobj): Remove.
336 (srv_regobj): Set it to "" for x86 non-linux targets.
337 * linux-x86-tdesc.c (i386_linux_read_description):
338 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
339 (init_registers_i386): Remove the declaration.
340 (tdesc_i386): Remove the declaration.
341 (lynx_i386_arch_setup): Call i386_create_target_description.
342 * nto-x86-low.c: Likewise.
343 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
344 [!__x86_64__]: include arch/i386.h.
345 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
346
347 2017-09-05 Yao Qi <yao.qi@linaro.org>
348
349 * configure.srv (srv_amd64_linux_xmlfiles): Remove
350 i386/amd64-XXX-linux from it.
351
352 2017-09-05 Yao Qi <yao.qi@linaro.org>
353
354 * configure.srv: Empty srv_amd64_linux_regobj if $development is
355 false.
356 (ipa_amd64_linux_regobj): Remove.
357 (ipa_x32_linux_regobj): Remove.
358
359 2017-09-05 Yao Qi <yao.qi@linaro.org>
360
361 * Makefile.in (arch-amd64.o): New rule.
362 * configure.srv: Append arch-amd64.o.
363 * linux-amd64-ipa.c: Include common/x86-xstate.h.
364 (get_ipa_tdesc): Call amd64_linux_read_description.
365 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
366 and init_registers_amd64_XXX.
367 * linux-x86-low.c (x86_linux_read_description): Call
368 amd64_linux_read_description.
369 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
370 (initialize_low_arch): Don't call init_registers_x32_XXX and
371 init_registers_amd64_XXX.
372 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
373 and tdesc_amd64_XXX.
374 [__x86_64__] (amd64_tdesc_test): New function.
375 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
376 and init_registers_amd64_XXX.
377 * linux-x86-tdesc.c: Include arch/amd64.h.
378 (xcr0_to_tdesc_idx): New function.
379 (i386_linux_read_description): New function.
380 (amd64_get_ipa_tdesc_idx): New function.
381 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
382 (amd64_get_ipa_tdesc): Declare.
383
384 2017-09-05 Yao Qi <yao.qi@linaro.org>
385
386 * configure.srv (srv_i386_linux_xmlfiles): Remove
387 i386/i386-XXX-linux.xml from it.
388
389 2017-09-05 Yao Qi <yao.qi@linaro.org>
390
391 * configure.srv: Set srv_i386_linux_regobj empty if $development
392 is false.
393 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
394 initialize_low_tdesc.
395 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
396 with #if initialize_low_tdesc.
397 * linux-x86-tdesc-selftest.c: New file.
398 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
399
400 2017-09-05 Yao Qi <yao.qi@linaro.org>
401
402 * Makefile.in (arch-i386.o): New rule.
403 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
404 (x86_64-*-linux*): Likewise.
405 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
406 include arch/i386.h.
407 (i386_linux_read_description): Remove code and call
408 i386_create_target_description.
409 * tdesc.c (allocate_target_description): New function.
410 * tdesc.h (set_tdesc_architecture): Remove declaration.
411 (set_tdesc_osabi): Likewise.
412
413 2017-09-05 Yao Qi <yao.qi@linaro.org>
414
415 * linux-x86-tdesc.c: Don't include <inttypes.h>.
416 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
417 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
418 .xmltarget.
419 * server.c (get_features_xml): Call tdesc_get_features_xml.
420 * tdesc.c (set_tdesc_architecture): New function.
421 (set_tdesc_osabi): New function.
422 (tdesc_get_features_xml): New function.
423 (tdesc_create_feature): Add an argument.
424 * tdesc.h (struct target_desc) <features>: New field.
425 <arch, osabi>: New field.
426 (~target_desc): xfree features, arch, and osabi.
427 (target_desc::oerator==): Don't compare .xmltarget.
428 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
429 (set_tdesc_osabi): Likewise.
430 (tdesc_get_features_xml): Likewise.
431
432 2017-09-05 Yao Qi <yao.qi@linaro.org>
433
434 * linux-x86-tdesc.c: Include selftest.h.
435 (i386_tdesc_test): New function.
436 (initialize_low_tdesc): Call selftests::register_test.
437 * tdesc.h: Include regdef.h.
438 (target_desc): Override operator == and !=.
439
440 2017-09-05 Yao Qi <yao.qi@linaro.org>
441
442 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
443 (ipa_obj): Likewise.
444 * linux-i386-ipa.c: Include common/x86-xstate.h
445 (get_ipa_tdesc): Call i386_linux_read_description.
446 (initialize_low_tracepoint): Don't call init_registers_XXX
447 functions, call initialize_low_tdesc instead.
448 * linux-x86-low.c (x86_linux_read_description): Call
449 i386_linux_read_description.
450 (initialize_low_arch): Don't call init_registers_i386_XXX
451 functions, call initialize_low_tdesc.
452 * linux-x86-tdesc.c: New file.
453 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
454 (i386_get_ipa_tdesc_idx): Declare.
455 (i386_get_ipa_tdesc): Declare.
456 (initialize_low_tdesc): Declare.
457
458 2017-09-05 Yao Qi <yao.qi@linaro.org>
459
460 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
461 instead of 0.
462
463 2017-09-05 Yao Qi <yao.qi@linaro.org>
464
465 * Makefile.in (IPA_OBJS): Add vec-ipa.o
466 * regcache.c (get_thread_regcache): Use VEC_length.
467 (init_register_cache): Likewise.
468 (regcache_cpy): Likewise.
469 (registers_to_string): Iterate reg_defs via VEC_iterate.
470 (find_regno): Likewise.
471 (find_register_by_number): Use VEC_index.
472 (register_size): Call find_register_by_number.
473 (register_data): Call find_register_by_number.
474 (supply_regblock): Use VEC_length.
475 (regcache_raw_read_unsigned): Likewise.
476 * tdesc.c (init_target_desc): Iterate reg_defs via
477 VEC_iterate.
478 (default_description): Update initializer.
479 (copy_target_description): Don't update field num_registers.
480 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
481 <num_registers>: Remove.
482
483 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
484
485 * Makefile.in (.SECONDARY): Define target.
486
487 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
488
489 * linux-low.c (linux_wait_1): Adjust.
490 * server.c (queue_stop_reply_callback): Adjust.
491
492 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
493
494 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
495 QEnvironmentUnset and QEnvironmentReset packets.
496 (handle_query): Inform remote that QEnvironmentHexEncoded,
497 QEnvironmentUnset and QEnvironmentReset are supported.
498
499 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
500
501 * inferiors.h (inferior_target_data): Rename to ...
502 (thread_target_data): ... this.
503 (inferior_regcache_data): Rename to ...
504 (thread_regcache_data): ... this.
505 (set_inferior_regcache_data): Rename to ...
506 (set_thread_regcache_data): ... this.
507 * inferiors.c (inferior_target_data): Rename to ...
508 (thread_target_data): ... this.
509 (inferior_regcache_data): Rename to ...
510 (thread_regcache_data): ... this.
511 (set_inferior_regcache_data): Rename to ...
512 (set_thread_regcache_data): ... this.
513 (free_one_thread): Update.
514 * linux-low.h (get_thread_lwp): Update.
515 * regcache.c (get_thread_regcache): Update.
516 (regcache_invalidate_thread): Update.
517 (free_register_cache_thread): Update.
518 * win32-i386-low.c (update_debug_registers_callback): Update.
519 (win32_get_current_dr): Update.
520 * win32-low.c (thread_rec): Update.
521 (delete_thread_info): Update.
522 (continue_one_thread): Update.
523 (suspend_one_thread): Update.
524
525 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
526
527 * inferiors.c (set_inferior_target_data): Remove.
528 * inferiors.h (set_inferior_target_data): Remove.
529
530 2017-08-18 Yao Qi <yao.qi@linaro.org>
531
532 * Makefile.in (OBS): Add selftest.o.
533 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
534 * configure, config.in: Re-generated.
535 * server.c: Include common/sefltest.h.
536 (captured_main): Handle option --selftest.
537
538 2017-08-09 Yao Qi <yao.qi@linaro.org>
539
540 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
541 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
542 i386-avx-mpx.o and i386-mmx.o.
543 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
544 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
545 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
546 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
547 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
548 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
549 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
550 i386/amd64-avx-mpx.xml.
551
552 2017-08-09 Yao Qi <yao.qi@linaro.org>
553
554 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
555 and x32-avx-avx512.o.
556 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
557 i386/x32-avx-avx512.xml.
558
559 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
560
561 * tracepoint.h (enum class fast_tpoint_collect_result): New
562 enumeration.
563 (fast_tracepoint_collecting): Change return type to
564 fast_tpoint_collect_result.
565 * tracepoint.c (fast_tracepoint_collecting): Likewise.
566 * linux-low.h: Include tracepoint.h.
567 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
568 fast_tpoint_collect_result.
569 * linux-low.c (handle_tracepoints): Adjust.
570 (linux_fast_tracepoint_collecting): Change return type to
571 fast_tpoint_collect_result.
572 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
573 linux_wait_1, stuck_in_jump_pad_callback,
574 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
575 proceed_one_lwp): Adjust to type change.
576
577 2017-07-10 Yao Qi <yao.qi@linaro.org>
578
579 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
580
581 2017-06-29 Yao Qi <yao.qi@linaro.org>
582
583 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
584 Remove.
585 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
586
587 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
588
589 * Makefile.in (IPA_OBJS): Sort and format one item per line.
590
591 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
592
593 * linux-low.c (linux_create_inferior): Adjust code to access the
594 environment information via 'gdb_environ' class.
595 * lynx-low.c (lynx_create_inferior): Likewise.
596 * server.c (our_environ): Make it an instance of 'gdb_environ'.
597 (get_environ): Return a pointer to 'our_environ'.
598 (captured_main): Initialize 'our_environ'.
599 * server.h (get_environ): Adjust prototype.
600 * spu-low.c (spu_create_inferior): Adjust code to access the
601 environment information via 'gdb_environ' class.
602
603 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
604
605 * linux-low.c (linux_read_memory, linux_write_memory): Remove
606 usage of "register" keyword.
607
608 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
609
610 * configure: Re-generate.
611
612 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
613
614 * configure: Re-generate.
615
616 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
617
618 * Makefile.in (COMPILE.pre): Add "-x c++".
619
620 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
621
622 * fork-child.c: Conditionally include <signal.h>.
623
624 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
625
626 * server.c (handle_general_set): Handle new packet
627 "QStartupWithShell".
628 (handle_query): Add "QStartupWithShell" to the list of supported
629 packets.
630 (gdbserver_usage): Add help text explaining the
631 new "--startup-with-shell" and "--no-startup-with-shell" CLI
632 options.
633 (captured_main): Recognize and act upon the presence of the new
634 CLI options.
635
636 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
637 Pedro Alves <palves@redhat.com>
638
639 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
640 * configure: Regenerate.
641 * configure.srv (srv_linux_obj): Add "fork-child.o" and
642 "fork-inferior.o".
643 (i[34567]86-*-lynxos*): Likewise.
644 (spu*-*-*): Likewise.
645 * fork-child.c: New file.
646 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
647 and "environ.h".
648 (linux_ptrace_fun): New function.
649 (linux_create_inferior): Adjust function prototype to reflect
650 change on "target.h". Adjust function code to use
651 "fork_inferior".
652 (linux_request_interrupt): Delete "signal_pid".
653 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
654 (lynx_ptrace_fun): New function.
655 (lynx_create_inferior): Adjust function prototype to reflect
656 change on "target.h". Adjust function code to use
657 "fork_inferior".
658 * nto-low.c (nto_create_inferior): Adjust function prototype and
659 code to reflect change on "target.h". Update comments.
660 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
661 "common-terminal.h" and "environ.h".
662 (terminal_fd): Moved to fork-child.c.
663 (old_foreground_pgrp): Likewise.
664 (restore_old_foreground_pgrp): Likewise.
665 (last_status): Make it global.
666 (last_ptid): Likewise.
667 (our_environ): New variable.
668 (startup_with_shell): Likewise.
669 (program_name): Likewise.
670 (program_argv): Rename to...
671 (program_args): ...this.
672 (wrapper_argv): New variable.
673 (start_inferior): Delete function.
674 (get_exec_wrapper): New function.
675 (get_exec_file): Likewise.
676 (get_environ): Likewise.
677 (prefork_hook): Likewise.
678 (post_fork_inferior): Likewise.
679 (postfork_hook): Likewise.
680 (postfork_child_hook): Likewise.
681 (handle_v_run): Update code to deal with arguments coming from the
682 remote host. Update calls from "start_inferior" to
683 "create_inferior".
684 (captured_main): Likewise. Initialize environment variable. Call
685 "have_job_control".
686 * server.h (post_fork_inferior): New prototype.
687 (get_environ): Likewise.
688 (last_status): Declare.
689 (last_ptid): Likewise.
690 (signal_pid): Likewise.
691 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
692 (spu_ptrace_fun): New function.
693 (spu_create_inferior): Adjust function prototype to reflect change
694 on "target.h". Adjust function code to use "fork_inferior".
695 * target.c (target_terminal_init): New function.
696 (target_terminal_inferior): Likewise.
697 (target_terminal_ours): Likewise.
698 * target.h: Include <vector>.
699 (struct target_ops) <create_inferior>: Update prototype.
700 (create_inferior): Update macro.
701 * utils.c (gdb_flush_out_err): New function.
702 * win32-low.c (win32_create_inferior): Adjust function prototype
703 and code to reflect change on "target.h".
704
705 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
706
707 * inferiors.c (switch_to_thread): New function.
708
709 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
710
711 * Makefile.in (SFILE): Add "common/job-control.c".
712 (OBS): Add "job-control.o".
713
714 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
715
716 * Makefile: Remove "@host_makefile_frag@".
717
718 2017-05-05 Pedro Alves <palves@redhat.com>
719
720 * configure: Regenerate.
721
722 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
723
724 * configure: Regenerate.
725
726 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
727
728 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
729 software_single_step change of return type to
730 std::vector<CORE_ADDR>.
731 * linux-low.c (install_software_single_step_breakpoints):
732 Likewise.
733 * linux-low.h (install_software_single_step_breakpoints):
734 Likewise.
735
736 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
737
738 * remote-utils.c: Include "gdb_termios.h" instead of
739 "terminal.h".
740 * terminal.h: Delete file.
741
742 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
743
744 * server.c: Include <vector>.
745 <program_argv, wrapper_argv>: Convert to std::vector.
746 (start_inferior): Rewrite function to use C++.
747 (handle_v_run): Likewise. Update code that calculates the argv
748 based on the vRun packet; use C++.
749 (captured_main): Likewise.
750
751 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
752
753 * server.c (handle_v_cont): Initialize thread_resume::thread
754 with null_ptid.
755
756 2017-04-05 Pedro Alves <palves@redhat.com>
757
758 * configure: Regenerate.
759
760 2017-04-05 Pedro Alves <palves@redhat.com>
761
762 * gdbreplay.c (sync_error): Constify.
763 * linux-x86-low.c (push_opcode): Constify.
764
765 2017-04-05 Pedro Alves <palves@redhat.com>
766
767 * win32-low.c (get_child_debug_event)
768 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
769 Report TARGET_WAITKIND_SPURIOUS instead.
770
771 2017-04-05 Pedro Alves <palves@redhat.com>
772
773 * remote-utils.c (remote_prepare, remote_open): Constify.
774 * remote-utils.h (remote_prepare, remote_open): Constify.
775 * server.c (captured_main): Constify 'port' handling.
776
777 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
778
779 * Makefile.in (clean): Clear .deps.
780
781 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
782
783 * .gitignore: Remove generated files, replace with wildcard.
784 * (clean): Replace removal of generated files with wildcard.
785 (version.c): Replace with...
786 (version-generated.c): ...this.
787 (xml-builtin.c): Replace with...
788 (xml-builtin-generated.c): ...this.
789 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
790 (%.c: *regformats*): Replace with...
791 (%-generated.c: *regformats*): ...this.
792
793 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
794
795 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
796 (xtensa_fill_gregset): Call collect_register_by_name for
797 threadptr register.
798 (xtensa_store_gregset): Call supply_register_by_name for
799 threadptr register.
800
801 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
802
803 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
804 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
805 (xtensa_store_gregset): Call supply_register for all registers in
806 a0_regnum..a0_regnum + C0_NREGS range.
807
808 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
809
810 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
811 (ax-ipa.o: ax.c): Remove.
812 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
813 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
814 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
815 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
816 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
817
818 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
819
820 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
821 (print-utils-ipa.o: ../common/print-utils.c): Remove.
822 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
823 (errors-ipa.o: ../common/errors.c): Remove.
824 (format-ipa.o: ../common/format.c): Remove.
825 (common-utils-ipa.o: ../common/common-utils.c): Remove.
826
827 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
828
829 * Makefile.in (%-ipa.o: %.c): New rule.
830 (tracepoint-ipa.o: tracepoint.c): Remove.
831 (utils-ipa.o: utils.c): Remove.
832 (remote-utils-ipa.o: remote-utils.c): Remove.
833 (regcache-ipa.o: regcache.c): Remove.
834 (i386-linux-ipa.o: i386-linux.c): Remove.
835 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
836 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
837 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
838 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
839 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
840 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
841 (amd64-linux-ipa.o: amd64-linux.c): Remove.
842 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
843 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
844 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
845 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
846 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
847 (aarch64-ipa.o: aarch64.c): Remove.
848 (s390-linux32-ipa.o: s390-linux32.c): Remove.
849 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
850 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
851 (s390-linux64-ipa.o: s390-linux64.c): Remove.
852 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
853 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
854 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
855 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
856 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
857 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
858 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
859 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
860 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
861 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
862 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
863 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
864 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
865 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
866 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
867 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
868 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
869 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
870 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
871 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
872 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
873 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
874 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
875 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
876 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
877 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
878 (tdesc-ipa.o: tdesc.c): Remove.
879 (x32-linux-ipa.o: x32-linux.c): Remove.
880 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
881 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
882
883 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
884
885 * Makefile.in (%.o: ../arch/%.c): New rule.
886 (arm.o: ../arch/arm.c): Remove.
887 (arm-linux.o: ../arch/arm-linux.c): Remove.
888 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
889 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
890
891 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
892
893 * Makefile.in (%.o: ../nat/%.c): New rule.
894 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
895 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
896 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
897 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
898 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
899 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
900 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
901 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
902 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
903 (linux-personality.o: ../nat/linux-personality.c): Remove.
904 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
905 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
906 (x86-linux.o: ../nat/x86-linux.c): Remove.
907 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
908 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
909
910 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
911
912 * Makefile.in (%.o: ../common/%.c): New rule.
913 (signals.o: ../common/signals.c): Remove.
914 (print-utils.o: ../common/print-utils.c): Remove.
915 (rsp-low.o: ../common/rsp-low.c): Remove.
916 (common-utils.o: ../common/common-utils.c): Remove.
917 (posix-strerror.o: ../common/posix-strerror.c): Remove.
918 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
919 (vec.o: ../common/vec.c): Remove.
920 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
921 (xml-utils.o: ../common/xml-utils.c): Remove.
922 (ptid.o: ../common/ptid.c): Remove.
923 (buffer.o: ../common/buffer.c): Remove.
924 (format.o: ../common/format.c): Remove.
925 (filestuff.o: ../common/filestuff.c): Remove.
926 (agent.o: ../common/agent.c): Remove.
927 (errors.o: ../common/errors.c): Remove.
928 (environ.o: ../common/environ.c): Remove.
929 (common-debug.o: ../common/common-debug.c): Remove.
930 (cleanups.o: ../common/cleanups.c): Remove.
931 (common-exceptions.o: ../common/common-exceptions.c): Remove.
932 (fileio.o: ../common/fileio.c): Remove.
933 (common-regcache.o: ../common/common-regcache.c): Remove.
934 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
935 (new-op.o: ../common/new-op.c): Remove.
936 (btrace-common.o: ../common/btrace-common.c): Remove.
937
938 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
939
940 * Makefile.in (%.o: ../target/%.c): New rule.
941 (waitstatus.o: ../target/waitstatus.c): Remove.
942
943 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
944
945 * Makefile.in
946 (%.c: ../regformats/%.dat,
947 (%.c: ../regformats/arm/%.dat,
948 (%.c: ../regformats/i386/%.dat,
949 (%.c: ../regformats/rs6000/%.dat): New rules.
950 (aarch64.c): Remove.
951 (reg-arm.c): Remove.
952 (arm-with-iwmmxt.c): Remove.
953 (arm-with-vfpv2.c): Remove.
954 (arm-with-vfpv3.c): Remove.
955 (arm-with-neon.c): Remove.
956 (reg-bfin.c): Remove.
957 (reg-cris.c): Remove.
958 (reg-crisv32.c): Remove.
959 (i386.c): Remove.
960 (i386-linux.c): Remove.
961 (i386-avx.c): Remove.
962 (i386-avx-linux.c): Remove.
963 (i386-avx-avx512.c): Remove.
964 (i386-avx-avx512-linux.c): Remove.
965 (i386-mpx.c): Remove.
966 (i386-mpx-linux.c): Remove.
967 (i386-avx-mpx-avx512-pku.c): Remove.
968 (i386-avx-mpx-avx512-pku-linux.c): Remove.
969 (i386-avx-mpx.c): Remove.
970 (i386-avx-mpx-linux.c): Remove.
971 (i386-mmx.c): Remove.
972 (i386-mmx-linux.c): Remove.
973 (reg-ia64.c): Remove.
974 (reg-m32r.c): Remove.
975 (reg-m68k.c): Remove.
976 (reg-cf.c): Remove.
977 (mips-linux.c): Remove.
978 (mips-dsp-linux.c): Remove.
979 (mips64-linux.c): Remove.
980 (mips64-dsp-linux.c): Remove.
981 (nios2-linux.c): Remove.
982 (powerpc-32.c): Remove.
983 (powerpc-32l.c): Remove.
984 (powerpc-altivec32l.c): Remove.
985 (powerpc-cell32l.c): Remove.
986 (powerpc-vsx32l.c): Remove.
987 (powerpc-isa205-32l.c): Remove.
988 (powerpc-isa205-altivec32l.c): Remove.
989 (powerpc-isa205-vsx32l.c): Remove.
990 (powerpc-e500l.c): Remove.
991 (powerpc-64l.c): Remove.
992 (powerpc-altivec64l.c): Remove.
993 (powerpc-cell64l.c): Remove.
994 (powerpc-vsx64l.c): Remove.
995 (powerpc-isa205-64l.c): Remove.
996 (powerpc-isa205-altivec64l.c): Remove.
997 (powerpc-isa205-vsx64l.c): Remove.
998 (s390-linux32.c): Remove.
999 (s390-linux32v1.c): Remove.
1000 (s390-linux32v2.c): Remove.
1001 (s390-linux64.c): Remove.
1002 (s390-linux64v1.c): Remove.
1003 (s390-linux64v2.c): Remove.
1004 (s390-te-linux64.c): Remove.
1005 (s390-vx-linux64.c): Remove.
1006 (s390-tevx-linux64.c): Remove.
1007 (s390x-linux64.c): Remove.
1008 (s390x-linux64v1.c): Remove.
1009 (s390x-linux64v2.c): Remove.
1010 (s390x-te-linux64.c): Remove.
1011 (s390x-vx-linux64.c): Remove.
1012 (s390x-tevx-linux64.c): Remove.
1013 (tic6x-c64xp-linux.c): Remove.
1014 (tic6x-c64x-linux.c): Remove.
1015 (tic6x-c62x-linux.c): Remove.
1016 (reg-sh.c): Remove.
1017 (reg-sparc64.c): Remove.
1018 (reg-spu.c): Remove.
1019 (amd64.c): Remove.
1020 (amd64-linux.c): Remove.
1021 (amd64-avx.c): Remove.
1022 (amd64-avx-linux.c): Remove.
1023 (amd64-avx-avx512.c): Remove.
1024 (amd64-avx-avx512-linux.c): Remove.
1025 (amd64-mpx.c): Remove.
1026 (amd64-mpx-linux.c): Remove.
1027 (amd64-avx-mpx-avx512-pku.c): Remove.
1028 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1029 (amd64-avx-mpx.c): Remove.
1030 (amd64-avx-mpx-linux.c): Remove.
1031 (x32.c): Remove.
1032 (x32-linux.c): Remove.
1033 (x32-avx.c): Remove.
1034 (x32-avx-linux.c): Remove.
1035 (x32-avx-avx512.c): Remove.
1036 (x32-avx-avx512-linux.c): Remove.
1037 (reg-xtensa.c): Remove.
1038 (reg-tilegx.c): Remove.
1039 (reg-tilegx32.c): Remove.
1040
1041 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1042
1043 * Makefile.in (SFILES): Add "common/environ.c".
1044 (OBJS): Add "common/environ.h".
1045
1046 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1047
1048 * configure.ac: Check if the fs_base and gs_base members of
1049 `struct user_regs_struct' exist.
1050 * config.in: Regenerated.
1051 * configure: Likewise.
1052
1053 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1054
1055 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1056 target_read_memory.
1057 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1058 (get_next_pcs_syscall_next_pc): Likewise.
1059
1060 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1061
1062 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1063 * nto-x86-low.c: Likewise.
1064
1065 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1066
1067 * Makefile.in: Include disable-implicit-rules.mk.
1068
1069 2016-11-23 Pedro Alves <palves@redhat.com>
1070
1071 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1072 (debug_vprintf): Use std::chrono::steady_clock instead of
1073 gettimeofday. Use '.' instead of ':'.
1074 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1075 (get_timestamp): Use std::chrono::steady_clock instead of
1076 gettimeofday.
1077
1078 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1079
1080 * Makefile.in: Fix whitespace formatting.
1081
1082 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1083
1084 * Makefile.in (SFILES, OBS): Flatten list and order
1085 alphabetically.
1086
1087 2016-11-23 Pedro Alves <palves@redhat.com>
1088
1089 * event-loop.c (handle_file_event): Use warning.
1090 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1091 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1092 Use warning.
1093
1094 2016-11-23 Pedro Alves <palves@redhat.com>
1095
1096 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1097 output.
1098 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1099 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1100 debug_printf and debug_flush for debug output.
1101 * server.c (handle_general_set): Likewise.
1102 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1103 output.
1104
1105 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1106
1107 * Makefile.in (.c.o): Replace rule with ...
1108 (%.o: %.c): ... this one.
1109
1110 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1111
1112 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1113 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1114 make.
1115 * configure.ac: Remove checks for the make program.
1116 * configure: Re-generate.
1117
1118 2016-10-28 Pedro Alves <palves@redhat.com>
1119
1120 * Makefile.in (CXX_DIALECT): Get from configure.
1121 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1122 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1123 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1124 * config.in: Regenerate.
1125 * configure: Regenerate.
1126
1127 2016-10-27 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-low.c (linux_supports_range_stepping): Return true if
1130 can_software_single_step return true.
1131
1132 2016-10-27 Yao Qi <yao.qi@linaro.org>
1133
1134 * inferiors.c (find_inferior_in_random): New function.
1135 * inferiors.h (find_inferior_in_random): Declare.
1136 * linux-low.c (linux_wait_for_event_filtered): Call
1137 find_inferior_in_random instead of find_inferior.
1138
1139 2016-10-27 Yao Qi <yao.qi@linaro.org>
1140
1141 * linux-low.c (linux_wait_1): If single-step breakpoints are
1142 inserted, remove them.
1143
1144 2016-10-26 Pedro Alves <palves@redhat.com>
1145
1146 * linux-low.c (handle_extended_wait): Link parent/child fork
1147 threads.
1148 (linux_wait_1): Unlink them.
1149 (linux_set_resume_request): Ignore resume requests for
1150 already-resumed and unhandled fork child threads.
1151 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1152 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1153 New functions.
1154 (handle_v_requests) <vCont>: Don't call require_running.
1155 * server.h (in_queued_stop_replies): New declaration.
1156
1157 2016-10-24 Yao Qi <yao.qi@linaro.org>
1158
1159 PR server/20733
1160 * linux-aarch64-low.c (append_insns): Cast the return value to
1161 'uint32_t *'.
1162
1163 2016-10-10 Yao Qi <yao.qi@linaro.org>
1164
1165 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1166
1167 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1168
1169 * target.c (target_supports_multi_process): New function, moved
1170 from...
1171 * target.h (target_supports_multi_process): ... here. Remove
1172 macro.
1173
1174 2016-10-05 Tom Tromey <tom@tromey.com>
1175
1176 PR remote/20655:
1177 * tracepoint.c (handle_tracepoint_bkpts): Check
1178 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1179
1180 2016-10-05 Yao Qi <yao.qi@linaro.org>
1181
1182 * configure.srv: Update the path of arm-*.xml files.
1183
1184 2016-10-05 Terry Guo <terry.guo@arm.com>
1185 Yao Qi <yao.qi@linaro.org>
1186
1187 * Makefile.in: Adjust the path of rules.
1188 * configure.srv: Update the path of xml files.
1189 * regformats/arm-with-iwmmxt.dat: Regenerated.
1190 * regformats/arm-with-neon.dat: Likewise.
1191 * regformats/arm-with-vfpv2.dat: Likewise.
1192 * regformats/arm-with-vfpv3.dat Likewise.
1193
1194 2016-09-30 Yao Qi <yao.qi@linaro.org>
1195
1196 PR gdbserver/20627
1197 * target.c (target_stop_and_wait): Don't call
1198 target_continue_no_signal, use resume_stop instead.
1199
1200 2016-09-26 Yao Qi <yao.qi@linaro.org>
1201
1202 * linux-low.c (linux_wait_1): Call debug_exit.
1203
1204 2016-09-23 Pedro Alves <palves@redhat.com>
1205
1206 * Makefile.in (SFILES): Add common/new-op.c.
1207 (OBS): Add common/new-op.o.
1208 (new-op.o): New rule.
1209
1210 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1211
1212 * .gitinore: Ignore more files.
1213
1214 2016-09-21 Yao Qi <yao.qi@linaro.org>
1215
1216 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1217 23.
1218
1219 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1220
1221 * server.c (start_inferior): Call target_mourn_inferior instead of
1222 mourn_inferior; pass ptid_t argument to it.
1223 (resume): Likewise.
1224 (handle_target_event): Likewise.
1225 * target.c (target_mourn_inferior): New function.
1226 * target.h (mourn_inferior): Delete macro.
1227
1228 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1229
1230 * linux-low.c (lwp_is_stepping): New function.
1231
1232 2016-09-06 Carl Love <cel@us.ibm.com>
1233
1234 * server.c (start_inferior): Fixed comment, requested comment change
1235 didn't get updated correctly. Removed reference to ptrace () call as
1236 it is only true on Linux systems.
1237
1238 2016-09-06 Carl Love <cel@us.ibm.com>
1239
1240 * server.c (start_inferior): Do not call
1241 function target_post_create_inferior () if the
1242 inferior process has already exited.
1243
1244 2016-09-05 Pedro Alves <palves@redhat.com>
1245
1246 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1247 (COMPILE.pre, CC_LD): Use CXX directly.
1248 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1249 * acinclude.m4: Don't include build-with-cxx.m4.
1250 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1251 * configure: Regenerate.
1252
1253 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1254
1255 PR gdb/19495
1256 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1257 call writing data to own_buf.
1258
1259 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1260
1261 * target.c (mywait): Call target_wait instead of
1262 the_target->wait.
1263 (target_wait): New function.
1264
1265 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1266
1267 * server.c (start_inferior): New variable 'ptid'. Replace calls
1268 to the_target->resume by target_continue{,_no_signal}, depending
1269 on the case.
1270 * target.c (target_stop_and_wait): Call target_continue_no_signal
1271 instead of the_target->resume.
1272 (target_continue): New function.
1273
1274 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1275
1276 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1277
1278 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1279
1280 PR server/20491
1281 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1282 ps_prochandle.
1283 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1284 * linux-arm-low.c (ps_get_thread_area): Likewise.
1285 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1286 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1287 * linux-mips-low.c (ps_get_thread_area): Likewise.
1288 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1289 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1290 * linux-x86-low.c (ps_get_thread_area): Likewise.
1291 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1292
1293 2016-08-19 Pedro Alves <palves@redhat.com>
1294
1295 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1296
1297 2016-08-19 Pedro Alves <palves@redhat.com>
1298
1299 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1300 comment. Use memcpy instead of casting through unsigned long.
1301
1302 2016-08-19 Pedro Alves <palves@redhat.com>
1303
1304 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1305 allocating around 0x80000000.
1306
1307 2016-08-19 Pedro Alves <palves@redhat.com>
1308
1309 PR gdb/20415
1310 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1311 (x32-avx512-linux-ipa.o): New rules.
1312 * configure.ac (x86_64-*-linux*): New x32 check.
1313 * configure.srv (ipa_x32_linux_regobj): New.
1314 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1315 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1316 descriptions.
1317 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1318 descriptions.
1319 * configure: Regenerate.
1320
1321 2016-08-09 Pedro Alves <palves@redhat.com>
1322
1323 PR gdb/18653
1324 * Makefile.in (OBS): Add signals-state-save-restore.o.
1325 (signals-state-save-restore.o): New rule.
1326 * config.in: Regenerate.
1327 * configure: Regenerate.
1328 * linux-low.c: Include "signals-state-save-restore.h".
1329 (linux_create_inferior): Call
1330 restore_original_signals_state.
1331 * server.c: Include "dispositions-save-restore.h".
1332 (captured_main): Call save_original_signals_state.
1333
1334 2016-08-05 Pedro Alves <palves@redhat.com>
1335
1336 * configure: Regenerate.
1337
1338 2016-08-04 Yao Qi <yao.qi@linaro.org>
1339
1340 * linux-low.c (regsets_fetch_inferior_registers): Check
1341 errno is ESRCH or not.
1342
1343 2016-08-02 Yao Qi <yao.qi@linaro.org>
1344
1345 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1346 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1347 (thread_db_load_search): Update.
1348 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1349 td_ta_set_event and td_ta_event_getmsg.
1350
1351 2016-07-26 Pedro Alves <palves@redhat.com>
1352
1353 PR server/20414
1354 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1355 of unsigned long for 64-bit registers and use uint32_t instead of
1356 unsigned int for 32-bit registers.
1357
1358 2016-07-26 Pedro Alves <palves@redhat.com>
1359
1360 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1361 to 'ptrace'.
1362
1363 2016-07-21 Tom Tromey <tom@tromey.com>
1364
1365 * configure: Rebuild.
1366
1367 2016-07-21 Yao Qi <yao.qi@linaro.org>
1368
1369 * mem-break.c (find_gdb_breakpoint): Cast bp to
1370 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1371
1372 2016-07-21 Yao Qi <yao.qi@linaro.org>
1373
1374 * server.c (handle_v_requests): Support s and S actions
1375 if target_supports_software_single_step return true.
1376
1377 2016-07-21 Yao Qi <yao.qi@linaro.org>
1378
1379 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1380 is resume_step, call maybe_hw_step.
1381 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1382 and unstop them.
1383 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1384 breakpoints or not.
1385 (proceed_one_lwp): If resume request is resume_step, install
1386 reinsert breakpoints and call maybe_hw_step.
1387
1388 2016-07-21 Yao Qi <yao.qi@linaro.org>
1389
1390 * linux-low.c (proceed_one_lwp): Declare.
1391 (linux_resume_one_thread): Remove local variable 'step'.
1392 Lift code enqueue signal. Call proceed_one_lwp instead of
1393 linux_resume_one_lwp.
1394
1395 2016-07-21 Yao Qi <yao.qi@linaro.org>
1396
1397 * linux-low.c (linux_resume_one_thread): Call
1398 enqueue_pending_signal.
1399
1400 2016-07-21 Yao Qi <yao.qi@linaro.org>
1401
1402 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1403 * inferiors.c (do_restore_current_thread_cleanup): New function.
1404 (make_cleanup_restore_current_thread): Likewise.
1405 * linux-low.c (install_software_single_step_breakpoints): Call
1406 make_cleanup_restore_current_thread. Switch current_thread to
1407 thread.
1408
1409 2016-07-21 Yao Qi <yao.qi@linaro.org>
1410
1411 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1412 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1413 (clone_one_breakpoint): Likewise.
1414 (delete_reinsert_breakpoints): Change parameter to thread.
1415 Callers updated.
1416 (has_reinsert_breakpoints): Likewise.
1417 (uninsert_reinsert_breakpoints): Likewise.
1418 (reinsert_reinsert_breakpoints): Likewise.
1419 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1420 (delete_reinsert_breakpoints): Likewise.
1421 (reinsert_reinsert_breakpoints): Likewise.
1422 (uninsert_reinsert_breakpoints): Likewise.
1423 (has_reinsert_breakpoints): Likewise.
1424
1425 2016-07-21 Yao Qi <yao.qi@linaro.org>
1426
1427 * inferiors.c (get_thread_process): Make parameter const.
1428 * inferiors.h (get_thread_process): Update declaration.
1429 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1430 Add new parameters child_thread and parent_thread. Callers
1431 updated.
1432 * mem-break.h (clone_all_breakpoints): Update declaration.
1433
1434 2016-07-21 Yao Qi <yao.qi@linaro.org>
1435
1436 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1437 <command_list, handler>: Remove.
1438 (struct gdb_breakpoint): New.
1439 (struct other_breakpoint): New.
1440 (struct reinsert_breakpoint): New.
1441 (is_gdb_breakpoint): New function.
1442 (any_persistent_commands): Update command_list if
1443 is_gdb_breakpoint returns true.
1444 (set_breakpoint): Create breakpoints according to their types.
1445 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1446 (set_gdb_breakpoint_1): Likewise.
1447 (set_gdb_breakpoint): Likewise.
1448 (clear_breakpoint_conditions): Change parameter type to
1449 'struct gdb_breakpoint *'.
1450 (clear_breakpoint_commands): Likewise.
1451 (clear_breakpoint_conditions_and_commands): Likewise.
1452 (add_condition_to_breakpoint): Likewise.
1453 (add_breakpoint_condition): Likewise.
1454 (add_commands_to_breakpoint): Likewise.
1455 (check_breakpoints): Check other_breakpoint.
1456 (clone_one_breakpoint): Clone breakpopint according to its type.
1457 * mem-break.h (struct gdb_breakpoint): Declare.
1458 (set_gdb_breakpoint): Update declaration.
1459 (clear_breakpoint_conditions_and_commands): Likewise.
1460 (add_breakpoint_condition): Likewise.
1461 (add_breakpoint_commands): Likewise.
1462 * server.c (process_point_options): Change parameter type to
1463 'struct gdb_breakpoint *'.
1464
1465 2016-07-21 Yao Qi <yao.qi@linaro.org>
1466
1467 * mem-break.c (set_breakpoint_at): Rename it to ...
1468 (set_breakpoint_type_at): ... it.
1469 (set_breakpoint_at): Call set_breakpoint_type_at.
1470 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1471 * mem-break.h (set_breakpoint_at): Update comments.
1472
1473 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1474
1475 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1476 to buf parameter.
1477 (nios2_store_gregset): Likewise.
1478
1479 2016-07-01 Pedro Alves <palves@redhat.com>
1480 Antoine Tremblay <antoine.tremblay@ericsson.com>
1481
1482 * linux-low.c: Change interface to take the target lwp_info
1483 pointer directly and return void. Handle detaching from a zombie
1484 thread.
1485 (linux_detach_lwp_callback): New function.
1486 (linux_detach): Detach from the leader thread after detaching from
1487 the clone threads.
1488
1489 2016-06-28 Yao Qi <yao.qi@linaro.org>
1490
1491 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1492 for variable new_offset.
1493 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1494 (aarch64_ftrace_insn_reloc_cb): Likewise.
1495 (aarch64_ftrace_insn_reloc_tb): Likewise.
1496 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1497 PRIx64 instead of PRIx32.
1498
1499 2016-06-28 Yao Qi <yao.qi@linaro.org>
1500
1501 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1502 (the_low_target): Install arm_get_syscall_trapinfo.
1503
1504 2016-06-28 Yao Qi <yao.qi@linaro.org>
1505
1506 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1507 function.
1508 (the_low_target): Install aarch64_get_syscall_trapinfo.
1509
1510 2016-06-28 Yao Qi <yao.qi@linaro.org>
1511
1512 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1513 Callers updated.
1514 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1515 Remove parameter sysno.
1516 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1517 sysret.
1518
1519 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1520
1521 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1522 (s390_emit_ne_goto): Likewise.
1523 (s390_emit_lt_goto): Likewise.
1524 (s390_emit_le_goto): Likewise.
1525 (s390_emit_gt_goto): Likewise.
1526 (s390_emit_ge_goto): Likewise.
1527 (s390x_emit_eq_goto): Likewise.
1528 (s390x_emit_ne_goto): Likewise.
1529 (s390x_emit_lt_goto): Likewise.
1530 (s390x_emit_le_goto): Likewise.
1531 (s390x_emit_gt_goto): Likewise.
1532 (s390x_emit_ge_goto): Likewise.
1533 (s390_emit_ops_impl): Mark variable static.
1534 (s390x_emit_ops): Likewise.
1535
1536 2016-06-17 Yao Qi <yao.qi@linaro.org>
1537
1538 * linux-low.c (handle_extended_wait): Call
1539 uninsert_reinsert_breakpoints for the parent process. Remove
1540 reinsert breakpoints from the child process. Reinsert them to
1541 the parent process when vfork is done.
1542 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1543 (reinsert_reinsert_breakpoints): New function.
1544 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1545 (reinsert_reinsert_breakpoints): Declare.
1546
1547 2016-06-17 Yao Qi <yao.qi@linaro.org>
1548
1549 * linux-low.c (handle_extended_wait): If the parent is doing
1550 step-over, remove the reinsert breakpoints from the forked child.
1551
1552 2016-06-17 Yao Qi <yao.qi@linaro.org>
1553
1554 * linux-low.c (unsuspend_all_lwps): Declare.
1555 (linux_low_filter_event): If thread exited, call finish_step_over.
1556 If step-over is finished, unsuspend other threads.
1557
1558 2016-06-17 Yao Qi <yao.qi@linaro.org>
1559
1560 * linux-low.c (linux_resume_one_lwp_throw): Assert
1561 has_reinsert_breakpoints returns false.
1562 * mem-break.c (delete_disabled_breakpoints): Assert
1563 bp type isn't reinsert_breakpoint.
1564
1565 2016-06-17 Yao Qi <yao.qi@linaro.org>
1566
1567 * linux-low.c (maybe_hw_step): New function.
1568 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1569 (finish_step_over): Switch current_thread to lwp temporarily,
1570 and assert has_reinsert_breakpoints returns true.
1571 (proceed_one_lwp): Call maybe_hw_step.
1572 * mem-break.c (has_reinsert_breakpoints): New function.
1573 * mem-break.h (has_reinsert_breakpoints): Declare.
1574
1575 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1576
1577 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1578
1579 2016-05-17 Yao Qi <yao.qi@linaro.org>
1580
1581 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1582 instead of find_inferior.
1583
1584 2016-05-05 Yao Qi <yao.qi@linaro.org>
1585
1586 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1587 Initialize res to zero.
1588
1589 2016-05-05 Yao Qi <yao.qi@linaro.org>
1590
1591 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1592 to uint32_t.
1593
1594 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1595
1596 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1597 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1598 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1599
1600 2016-04-28 Par Olsson <par.olsson@windriver.com>
1601 Simon Marchi <simon.marchi@ericsson.com>
1602
1603 * tracepoint.c (write_inferior_int8): New function.
1604 (cmd_qtenable_disable): Write enable flag using
1605 write_inferior_int8.
1606
1607 2016-04-25 Yao Qi <yao.qi@linaro.org>
1608
1609 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1610 (need_step_over_p): Return zero if the LWP has pending signals
1611 can be delivered on software single step target.
1612
1613 2016-04-25 Yao Qi <yao.qi@linaro.org>
1614
1615 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1616 return instead of error.
1617
1618 2016-04-22 Yao Qi <yao.qi@linaro.org>
1619
1620 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1621 to 23.
1622
1623 2016-04-22 Yao Qi <yao.qi@linaro.org>
1624
1625 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1626 signal when stepping over breakpoint with software single
1627 step.
1628
1629 2016-04-21 Pedro Alves <palves@redhat.com>
1630
1631 * linux-s390-low.c (s390_collect_ptrace_register)
1632 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1633 add casts.
1634 (s390_check_regset): Use void * instead of gdb_byte *.
1635
1636 2016-04-20 Pedro Alves <palves@redhat.com>
1637
1638 * configure: Renegerate.
1639
1640 2016-04-20 Yao Qi <yao.qi@linaro.org>
1641
1642 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1643 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1644 number 16.
1645 (arm_store_gregset): Likewise.
1646
1647 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1648
1649 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1650 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1651 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1652 (amd64-avx-mpx-linux.c): New rules.
1653 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1654 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1655 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1656 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1657 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1658 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1659 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1660 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1661 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1662 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1663 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1664 * linux-x86-low.c (x86_linux_read_description): Add case for
1665 X86_XSTATE_AVX_MPX_MASK.
1666 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1667 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1668 init_registers_i386_avx_mpx_linux.
1669 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1670 (initialize_low_tracepoint): Call
1671 init_registers_i386_avx_mpx_linux.
1672 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1673 (initialize_low_tracepoint): Call
1674 init_registers_amd64_avx_mpx_linux.
1675 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1676 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1677 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1678 declarations.
1679
1680 2016-04-18 Pedro Alves <palves@redhat.com>
1681
1682 * configure: Regenerate.
1683
1684 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1685
1686 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1687 (aarch64_emit_sub): Likewise.
1688
1689 2016-04-12 Pedro Alves <palves@redhat.com>
1690
1691 * utils.c (prepare_to_throw_exception): Delete.
1692
1693 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1694
1695 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1696
1697 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1698
1699 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1700
1701 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1702
1703 * linux-aarch64-ipa.c: Add <elf.h> include.
1704 * linux-ppc-ipa.c: Add <elf.h> include.
1705 * linux-s390-ipa.c: Add <elf.h> include.
1706
1707 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1708
1709 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1710 (get_raw_reg_ptr): Likewise.
1711 (get_trace_state_variable_value_ptr): Likewise.
1712 (set_trace_state_variable_value_ptr): Likewise.
1713 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1714 char *.
1715
1716 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1717 Marcin Kościelnicki <koriakin@0x04.net>
1718
1719 PR/17221
1720 * linux-ppc-low.c (emit_insns): New function.
1721 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1722 (ppc_emit_prologue): New function.
1723 (ppc_emit_epilogue): New function.
1724 (ppc_emit_add): New function.
1725 (ppc_emit_sub): New function.
1726 (ppc_emit_mul): New function.
1727 (ppc_emit_lsh): New function.
1728 (ppc_emit_rsh_signed): New function.
1729 (ppc_emit_rsh_unsigned): New function.
1730 (ppc_emit_ext): New function.
1731 (ppc_emit_zero_ext): New function.
1732 (ppc_emit_log_not): New function.
1733 (ppc_emit_bit_and): New function.
1734 (ppc_emit_bit_or): New function.
1735 (ppc_emit_bit_xor): New function.
1736 (ppc_emit_bit_not): New function.
1737 (ppc_emit_equal): New function.
1738 (ppc_emit_less_signed): New function.
1739 (ppc_emit_less_unsigned): New function.
1740 (ppc_emit_ref): New function.
1741 (ppc_emit_const): New function.
1742 (ppc_emit_reg): New function.
1743 (ppc_emit_pop): New function.
1744 (ppc_emit_stack_flush): New function.
1745 (ppc_emit_swap): New function.
1746 (ppc_emit_stack_adjust): New function.
1747 (ppc_emit_call): New function.
1748 (ppc_emit_int_call_1): New function.
1749 (ppc_emit_void_call_2): New function.
1750 (ppc_emit_if_goto): New function.
1751 (ppc_emit_goto): New function.
1752 (ppc_emit_eq_goto): New function.
1753 (ppc_emit_ne_goto): New function.
1754 (ppc_emit_lt_goto): New function.
1755 (ppc_emit_le_goto): New function.
1756 (ppc_emit_gt_goto): New function.
1757 (ppc_emit_ge_goto): New function.
1758 (ppc_write_goto_address): New function.
1759 (ppc_emit_ops_impl): New static variable.
1760 (ppc64v1_emit_prologue): New function.
1761 (ppc64v2_emit_prologue): New function.
1762 (ppc64_emit_epilogue): New function.
1763 (ppc64_emit_add): New function.
1764 (ppc64_emit_sub): New function.
1765 (ppc64_emit_mul): New function.
1766 (ppc64_emit_lsh): New function.
1767 (ppc64_emit_rsh_signed): New function.
1768 (ppc64_emit_rsh_unsigned): New function.
1769 (ppc64_emit_ext): New function.
1770 (ppc64_emit_zero_ext): New function.
1771 (ppc64_emit_log_not): New function.
1772 (ppc64_emit_bit_and): New function.
1773 (ppc64_emit_bit_or): New function.
1774 (ppc64_emit_bit_xor): New function.
1775 (ppc64_emit_bit_not): New function.
1776 (ppc64_emit_equal): New function.
1777 (ppc64_emit_less_signed): New function.
1778 (ppc64_emit_less_unsigned): New function.
1779 (ppc64_emit_ref): New function.
1780 (ppc64_emit_const): New function.
1781 (ppc64v1_emit_reg): New function.
1782 (ppc64v2_emit_reg): New function.
1783 (ppc64_emit_pop): New function.
1784 (ppc64_emit_stack_flush): New function.
1785 (ppc64_emit_swap): New function.
1786 (ppc64v1_emit_call): New function.
1787 (ppc64v2_emit_call): New function.
1788 (ppc64v1_emit_int_call_1): New function.
1789 (ppc64v2_emit_int_call_1): New function.
1790 (ppc64v1_emit_void_call_2): New function.
1791 (ppc64v2_emit_void_call_2): New function.
1792 (ppc64_emit_if_goto): New function.
1793 (ppc64_emit_eq_goto): New function.
1794 (ppc64_emit_ne_goto): New function.
1795 (ppc64_emit_lt_goto): New function.
1796 (ppc64_emit_le_goto): New function.
1797 (ppc64_emit_gt_goto): New function.
1798 (ppc64_emit_ge_goto): New function.
1799 (ppc64v1_emit_ops_impl): New static variable.
1800 (ppc64v2_emit_ops_impl): New static variable.
1801 (ppc_emit_ops): New function.
1802 (linux_low_target): Wire in ppc_emit_ops.
1803
1804 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1805 Marcin Kościelnicki <koriakin@0x04.net>
1806
1807 PR/17221
1808 * Makefile.in: Add powerpc-*-ipa.o
1809 * configure.srv: Add ipa_obj for powerpc*-linux.
1810 * linux-ppc-ipa.c: New file.
1811 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1812 includes.
1813 (PPC_FIELD): New macro.
1814 (PPC_SEXT): New macro.
1815 (PPC_OP6): New macro.
1816 (PPC_BO): New macro.
1817 (PPC_LI): New macro.
1818 (PPC_BD): New macro.
1819 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1820 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1821 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1822 (ppc_get_thread_area): New function.
1823 (is_elfv2_inferior): New function.
1824 (gen_ds_form): New function.
1825 (GEN_STD): New macro.
1826 (GEN_STDU): New macro.
1827 (GEN_LD): New macro.
1828 (GEN_LDU): New macro.
1829 (gen_d_form): New function.
1830 (GEN_ADDI): New macro.
1831 (GEN_ADDIS): New macro.
1832 (GEN_LI): New macro.
1833 (GEN_LIS): New macro.
1834 (GEN_ORI): New macro.
1835 (GEN_ORIS): New macro.
1836 (GEN_LWZ): New macro.
1837 (GEN_STW): New macro.
1838 (GEN_STWU): New macro.
1839 (gen_xfx_form): New function.
1840 (GEN_MFSPR): New macro.
1841 (GEN_MTSPR): New macro.
1842 (GEN_MFCR): New macro.
1843 (GEN_MTCR): New macro.
1844 (GEN_SYNC): New macro.
1845 (GEN_LWSYNC): New macro.
1846 (gen_x_form): New function.
1847 (GEN_OR): New macro.
1848 (GEN_MR): New macro.
1849 (GEN_LWARX): New macro.
1850 (GEN_STWCX): New macro.
1851 (GEN_CMPW): New macro.
1852 (gen_md_form): New function.
1853 (GEN_RLDICL): New macro.
1854 (GEN_RLDICR): New macro.
1855 (gen_i_form): New function.
1856 (GEN_B): New macro.
1857 (GEN_BL): New macro.
1858 (gen_b_form): New function.
1859 (GEN_BNE): New macro.
1860 (GEN_LOAD): New macro.
1861 (GEN_STORE): New macro.
1862 (gen_limm): New function.
1863 (gen_atomic_xchg): New function.
1864 (gen_call): New function.
1865 (ppc_relocate_instruction): New function.
1866 (ppc_install_fast_tracepoint_jump_pad): New function.
1867 (ppc_get_min_fast_tracepoint_insn_len): New function.
1868 (ppc_get_ipa_tdesc_idx): New function.
1869 (the_low_target): Wire in the new functions.
1870 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1871 tdescs.
1872 * linux-ppc-tdesc.h: New file.
1873
1874 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1875
1876 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1877 (alloc_jump_pad_buffer): New function.
1878 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1879 (alloc_jump_pad_buffer): New function.
1880 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1881 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1882 (alloc_jump_pad_buffer): New function.
1883 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1884 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1885 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1886 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1887
1888 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1889
1890 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1891 * linux-amd64-ipa.c: Likewise.
1892 * linux-i386-ipa.c: Likewise.
1893 * linux-s390-ipa.c: Likewise.
1894 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1895 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1896 set_trace_state_variable_value_ptr.
1897 (struct ipa_sym_addresses): Likewise.
1898 (symbol_list): Likewise.
1899 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1900 accessing gdb_collect directly.
1901 (gdb_collect_ptr_type): New typedef.
1902 (get_raw_reg_ptr_type): New typedef.
1903 (get_trace_state_variable_value_ptr_type): New typedef.
1904 (set_trace_state_variable_value_ptr_type): New typedef.
1905 (gdb_collect_ptr): New global.
1906 (get_raw_reg_ptr): New global.
1907 (get_trace_state_variable_value_ptr): New global.
1908 (set_trace_state_variable_value_ptr): New global.
1909 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1910 accessing get_raw_reg directly.
1911 (get_get_tsv_func_addr): Likewise for
1912 get_trace_state_variable_value_ptr.
1913 (get_set_tsv_func_addr): Likewise for
1914 set_trace_state_variable_value_ptr.
1915 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1916
1917 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1918
1919 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1920
1921 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1922
1923 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1924 packets.
1925 (relocate_instruction): Remove own_buf.
1926 * server.c (own_buf): Make global.
1927 (handle_v_requests): Make global.
1928 * server.h (own_buf): New declaration.
1929 (handle_v_requests): New prototype.
1930
1931 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1932
1933 PR 18377
1934 * linux-s390-low.c (add_insns): New function.
1935 (s390_emit_prologue): New function.
1936 (s390_emit_epilogue): New function.
1937 (s390_emit_add): New function.
1938 (s390_emit_sub): New function.
1939 (s390_emit_mul): New function.
1940 (s390_emit_lsh): New function.
1941 (s390_emit_rsh_signed): New function.
1942 (s390_emit_rsh_unsigned): New function.
1943 (s390_emit_ext): New function.
1944 (s390_emit_log_not): New function.
1945 (s390_emit_bit_and): New function.
1946 (s390_emit_bit_or): New function.
1947 (s390_emit_bit_xor): New function.
1948 (s390_emit_bit_not): New function.
1949 (s390_emit_equal): New function.
1950 (s390_emit_less_signed): New function.
1951 (s390_emit_less_unsigned): New function.
1952 (s390_emit_ref): New function.
1953 (s390_emit_if_goto): New function.
1954 (s390_emit_goto): New function.
1955 (s390_write_goto_address): New function.
1956 (s390_emit_litpool): New function.
1957 (s390_emit_const): New function.
1958 (s390_emit_call): New function.
1959 (s390_emit_reg): New function.
1960 (s390_emit_pop): New function.
1961 (s390_emit_stack_flush): New function.
1962 (s390_emit_zero_ext): New function.
1963 (s390_emit_swap): New function.
1964 (s390_emit_stack_adjust): New function.
1965 (s390_emit_set_r2): New function.
1966 (s390_emit_int_call_1): New function.
1967 (s390_emit_void_call_2): New function.
1968 (s390_emit_eq_goto): New function.
1969 (s390_emit_ne_goto): New function.
1970 (s390_emit_lt_goto): New function.
1971 (s390_emit_le_goto): New function.
1972 (s390_emit_gt_goto): New function.
1973 (s390_emit_ge_goto): New function.
1974 (s390x_emit_prologue): New function.
1975 (s390x_emit_epilogue): New function.
1976 (s390x_emit_add): New function.
1977 (s390x_emit_sub): New function.
1978 (s390x_emit_mul): New function.
1979 (s390x_emit_lsh): New function.
1980 (s390x_emit_rsh_signed): New function.
1981 (s390x_emit_rsh_unsigned): New function.
1982 (s390x_emit_ext): New function.
1983 (s390x_emit_log_not): New function.
1984 (s390x_emit_bit_and): New function.
1985 (s390x_emit_bit_or): New function.
1986 (s390x_emit_bit_xor): New function.
1987 (s390x_emit_bit_not): New function.
1988 (s390x_emit_equal): New function.
1989 (s390x_emit_less_signed): New function.
1990 (s390x_emit_less_unsigned): New function.
1991 (s390x_emit_ref): New function.
1992 (s390x_emit_if_goto): New function.
1993 (s390x_emit_const): New function.
1994 (s390x_emit_call): New function.
1995 (s390x_emit_reg): New function.
1996 (s390x_emit_pop): New function.
1997 (s390x_emit_stack_flush): New function.
1998 (s390x_emit_zero_ext): New function.
1999 (s390x_emit_swap): New function.
2000 (s390x_emit_stack_adjust): New function.
2001 (s390x_emit_int_call_1): New function.
2002 (s390x_emit_void_call_2): New function.
2003 (s390x_emit_eq_goto): New function.
2004 (s390x_emit_ne_goto): New function.
2005 (s390x_emit_lt_goto): New function.
2006 (s390x_emit_le_goto): New function.
2007 (s390x_emit_gt_goto): New function.
2008 (s390x_emit_ge_goto): New function.
2009 (s390_emit_ops): New function.
2010 (struct linux_target_ops): Fill in emit_ops hook.
2011
2012 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2013
2014 PR 18377
2015 * Makefile.in: Add s390 IPA files.
2016 * configure.srv: Build IPA for s390.
2017 * linux-s390-ipa.c: New file.
2018 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2019 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2020 (tdesc_s390_linux32): Likewise.
2021 (init_registers_s390_linux32v1): Likewise.
2022 (tdesc_s390_linux32v1): Likewise.
2023 (init_registers_s390_linux32v2): Likewise.
2024 (tdesc_s390_linux32v2): Likewise.
2025 (init_registers_s390_linux64): Likewise.
2026 (tdesc_s390_linux64): Likewise.
2027 (init_registers_s390_linux64v1): Likewise.
2028 (tdesc_s390_linux64v1): Likewise.
2029 (init_registers_s390_linux64v2): Likewise.
2030 (tdesc_s390_linux64v2): Likewise.
2031 (init_registers_s390_te_linux64): Likewise.
2032 (tdesc_s390_te_linux64): Likewise.
2033 (init_registers_s390_vx_linux64): Likewise.
2034 (tdesc_s390_vx_linux64): Likewise.
2035 (init_registers_s390_tevx_linux64): Likewise.
2036 (tdesc_s390_tevx_linux64): Likewise.
2037 (init_registers_s390x_linux64): Likewise.
2038 (tdesc_s390x_linux64): Likewise.
2039 (init_registers_s390x_linux64v1): Likewise.
2040 (tdesc_s390x_linux64v1): Likewise.
2041 (init_registers_s390x_linux64v2): Likewise.
2042 (tdesc_s390x_linux64v2): Likewise.
2043 (init_registers_s390x_te_linux64): Likewise.
2044 (tdesc_s390x_te_linux64): Likewise.
2045 (init_registers_s390x_vx_linux64): Likewise.
2046 (tdesc_s390x_vx_linux64): Likewise.
2047 (init_registers_s390x_tevx_linux64): Likewise.
2048 (tdesc_s390x_tevx_linux64): Likewise.
2049 (have_hwcap_s390_vx): New static variable.
2050 (s390_arch_setup): Fill have_hwcap_s390_vx.
2051 (s390_get_thread_area): New function.
2052 (s390_ft_entry_gpr_esa): New const.
2053 (s390_ft_entry_gpr_zarch): New const.
2054 (s390_ft_entry_misc): New const.
2055 (s390_ft_entry_fr): New const.
2056 (s390_ft_entry_vr): New const.
2057 (s390_ft_main_31): New const.
2058 (s390_ft_main_64): New const.
2059 (s390_ft_exit_fr): New const.
2060 (s390_ft_exit_vr): New const.
2061 (s390_ft_exit_misc): New const.
2062 (s390_ft_exit_gpr_esa): New const.
2063 (s390_ft_exit_gpr_zarch): New const.
2064 (append_insns): New function.
2065 (s390_relocate_instruction): New function.
2066 (s390_install_fast_tracepoint_jump_pad): New function.
2067 (s390_get_min_fast_tracepoint_insn_len): New function.
2068 (s390_get_ipa_tdesc_idx): New function.
2069 (struct linux_target_ops): Wire in the above functions.
2070 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2071 * linux-s390-tdesc.h: New file.
2072
2073 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2074
2075 * linux-s390-low.c (s390_supports_tracepoints): New function.
2076 (struct linux_target_ops): Fill supports_tracepoints hook.
2077
2078 2016-03-18 Yao Qi <yao.qi@linaro.org>
2079
2080 * linux-low.c (lwp_signal_can_be_delivered): New function.
2081 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2082
2083 2016-03-18 Yao Qi <yao.qi@linaro.org>
2084
2085 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2086 0 if signal is enqueued. Remove 'signal' from one debugging
2087 message. Move one debugging message to some lines below.
2088 Remove code setting 'signal' to 0.
2089
2090 2016-03-18 Yao Qi <yao.qi@linaro.org>
2091
2092 * linux-low.c (linux_low_filter_event): Remove redundant
2093 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2094
2095 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2096
2097 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2098 (struct linux_target_ops): Wire in the above.
2099
2100 2016-03-03 Yao Qi <yao.qi@linaro.org>
2101
2102 * linux-low.c: Update comments to start_step_over.
2103
2104 2016-03-03 Yao Qi <yao.qi@linaro.org>
2105
2106 PR server/19736
2107 * linux-low.c (handle_extended_wait): Set child suspended
2108 if event_lwp->bp_reinsert isn't zero.
2109
2110 2016-03-02 Yao Qi <yao.qi@linaro.org>
2111
2112 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2113 enqueue_pending_signal.
2114
2115 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2116
2117 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2118 is actually loaded.
2119
2120 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2121
2122 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2123 (s390_regmap_3264) [!__s390x__]: New global.
2124 (s390_collect_ptrace_register): Skip map entries containing -1.
2125 (s390_supply_ptrace_register): Ditto.
2126 (s390_fill_gprs_high): New function.
2127 (s390_store_gprs_high): New function.
2128 (s390_regsets): Add NT_S390_HIGH_GPRS.
2129 (s390_get_hwcap): Enable on 31-bit.
2130 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2131 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2132 Detect NT_S390_HIGH_GPRS.
2133 (s390_usrregs_info_3264): Enable on 31-bit.
2134 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2135 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2136
2137 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2138
2139 PR gdb/13808
2140 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2141 * configure.srv: Ditto.
2142 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2143 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2144 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2145 (init_registers_amd64_linux): Remove prototype.
2146 (tdesc_amd64_linux): Remove declaration.
2147 (get_ipa_tdesc): New function.
2148 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2149 initialize remaining tdescs.
2150 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2151 (init_registers_i386_linux): Remove prototype.
2152 (tdesc_i386_linux): Remove declaration.
2153 (get_ipa_tdesc): New function.
2154 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2155 initialize remaining tdescs.
2156 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2157 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2158 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2159 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2160 (x86_get_ipa_tdesc_idx): New function.
2161 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2162 * linux-x86-tdesc.h: New file.
2163 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2164 (target_get_ipa_tdesc_idx): New macro.
2165 * tracepoint.c (ipa_tdesc_idx): New macro.
2166 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2167 (symbol_list): Add ipa_tdesc_idx.
2168 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2169 (ipa_tdesc): Remove.
2170 (ipa_tdesc_idx): New variable.
2171 (get_context_regcache): Use get_ipa_tdesc.
2172 (gdb_collect): Ditto.
2173 (gdb_probe): Ditto.
2174 * tracepoint.h (get_ipa_tdesc): New prototype.
2175 (ipa_tdesc): Remove.
2176
2177 2016-02-24 Pedro Alves <palves@redhat.com>
2178
2179 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2180 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2181 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2182 Factor out common code between the USE_SIGTRAP_SIGINFO and
2183 !USE_SIGTRAP_SIGINFO blocks.
2184 (linux_low_filter_event): Call save_stop_reason instead of
2185 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2186 Update comments.
2187 (linux_wait_1): Update comments.
2188
2189 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2190
2191 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2192 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2193 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2194 ppc_insert_point, ppc_remove_point.
2195
2196 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2197
2198 * linux-s390-low.c (s390_supports_z_point_type): New function.
2199 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2200
2201 2016-02-16 Yao Qi <yao.qi@linaro.org>
2202
2203 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2204 PC. Get pc from regcache_read_pc.
2205
2206 2016-02-12 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2209 or linux_get_pc_32bit.
2210 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2211
2212 2016-02-12 Yao Qi <yao.qi@linaro.org>
2213
2214 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2215 arm_linux_get_next_pcs_fixup.
2216
2217 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2218
2219 * tracepoint.c (x_tracepoint_action_download): Change
2220 write_inferior_data_ptr to write_inferior_data_pointer.
2221 (cmd_qtstart): Likewise.
2222 (write_inferior_data_ptr): Remove.
2223 (download_agent_expr): Change write_inferior_data_ptr to
2224 write_inferior_data_pointer.
2225 (download_tracepoint_1): Likewise.
2226 (download_tracepoint): Likewise.
2227 (download_trace_state_variables): Likewise.
2228
2229 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2230 Marcin Kościelnicki <koriakin@0x04.net>
2231
2232 * tracepoint.c (struct tracepoint_action_ops): Remove.
2233 (struct tracepoint_action): Remove ops.
2234 (m_tracepoint_action_download, r_tracepoint_action_download)
2235 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2236 size and offset accordingly.
2237 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2238 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2239 (tracepoint_action_send, tracepoint_action_download): New functions.
2240 Helpers for trace action handlers.
2241 (add_tracepoint_action): Remove setup actions ops.
2242 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2243
2244 2016-02-10 Yao Qi <yao.qi@linaro.org>
2245
2246 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2247
2248 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2249
2250 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2251 to AC_OUTPUT.
2252 * configure: Regenerate.
2253
2254 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2255
2256 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2257 void * to gdb_byte *.
2258 * linux-low.c (siginfo_fixup): Likewise.
2259 (linux_xfer_siginfo): Likewise.
2260 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2261 Likewise.
2262 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2263
2264 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2265
2266 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2267 to srv_tgtobj.
2268 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2269 to srv_tgtobj.
2270 * linux-x86-low.c [__x86_64__]: Include
2271 "nat/amd64-linux-siginfo.h".
2272 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2273 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2274 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2275 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2276 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2277 (cpt_si_fd, si_timerid, si_overrun): Move from
2278 nat/amd64-linux-siginfo.c.
2279 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2280
2281 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2282
2283 * server.c (skip_to_semicolon): Remove.
2284 (process_point_options): Use strchrnul instead of
2285 skip_to_semicolon.
2286
2287 2016-01-26 Yao Qi <yao.qi@linaro.org>
2288
2289 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2290 * linux-low.c (install_software_single_step_breakpoints): Don't
2291 call regcache_read_pc.
2292 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2293 argument pc.
2294
2295 2016-01-26 Yao Qi <yao.qi@linaro.org>
2296
2297 * linux-low.c (install_software_single_step_breakpoints): Call
2298 regcache_read_pc instead of get_pc.
2299
2300 2016-01-26 Yao Qi <yao.qi@linaro.org>
2301
2302 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2303 (unblock_async_io): Rename to ...
2304 (block_unblock_async_io): ... it. New function.
2305 (enable_async_io): Don't install SIGIO handler. Unblock it
2306 instead.
2307 (disable_async_io): Don't ignore SIGIO. Block it instead.
2308 (initialize_async_io): Install SIGIO handler. Don't call
2309 unblock_async_io.
2310
2311 2016-01-26 Yao Qi <yao.qi@linaro.org>
2312
2313 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2314 first character is '\003', call *the_target->request_interrupt.
2315
2316 2016-01-25 Yao Qi <yao.qi@linaro.org>
2317
2318 * remote-utils.c (new_thread_notify): Remove.
2319 (dead_thread_notify): Likewise.
2320 * remote-utils.h (new_thread_notify): Remove declaration.
2321 (dead_thread_notify): Likewise.
2322
2323 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2324
2325 * gdb.trace/pending.exp: Fix expected message on continue.
2326
2327 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2328
2329 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2330 it works properly on big-endian machines where sizeof (CORE_ADDR)
2331 != sizeof (void *).
2332
2333 2016-01-21 Pedro Alves <palves@redhat.com>
2334
2335 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2336 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2337 * configure: Regenerate.
2338
2339 2016-01-21 Yao Qi <yao.qi@linaro.org>
2340
2341 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2342 is_thumb and set it according to CPSR saved on the stack.
2343 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2344 arm_sigreturn_next_pc.
2345
2346 2016-01-18 Yao Qi <yao.qi@linaro.org>
2347
2348 * linux-low.c (linux_set_pc_64bit): New function.
2349 (linux_get_pc_64bit): New function.
2350 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2351 Declare.
2352 * linux-sparc-low.c (debug_threads): Remove declaration.
2353 (sparc_get_pc): Remove.
2354 (the_low_target): Use linux_get_pc_64bit instead of
2355 sparc_get_pc.
2356 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2357 (the_low_target): Use linux_get_pc_64bit and
2358 linux_set_pc_64bit.
2359
2360 2016-01-18 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-arm-low.c (debug_threads): Remove declaration.
2363 (arm_get_pc, arm_set_pc): Remove.
2364 (the_low_target): Use linux_get_pc_32bit and
2365 linux_set_pc_32bit.
2366 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2367 (the_low_target): Use linux_get_pc_32bit and
2368 linux_set_pc_32bit.
2369 * linux-cris-low.c (debug_threads): Remove declaration.
2370 (cris_get_pc, cris_set_pc,): Remove.
2371 (the_low_target): Use linux_get_pc_32bit and
2372 linux_set_pc_32bit.
2373 * linux-crisv32-low.c (debug_threads): Remove declaration.
2374 (cris_get_pc, cris_set_pc): Remove.
2375 (the_low_target): Use linux_get_pc_32bit and
2376 linux_set_pc_32bit.
2377 * linux-low.c: Include inttypes.h.
2378 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2379 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2380 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2381 (the_low_target): Use linux_get_pc_32bit and
2382 linux_set_pc_32bit.
2383 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2384 (the_low_target): Use linux_get_pc_32bit and
2385 linux_set_pc_32bit.
2386 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2387 (the_low_target): Use linux_get_pc_32bit and
2388 linux_set_pc_32bit.
2389 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2390 (the_low_target): Use linux_get_pc_32bit and
2391 linux_set_pc_32bit.
2392 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2393 (the_low_target): Use linux_get_pc_32bit and
2394 linux_set_pc_32bit.
2395
2396 2016-01-18 Gary Benson <gbenson@redhat.com>
2397
2398 * configure.ac (AC_FUNC_FORK): New check.
2399 * config.in: Regenerate.
2400 * configure: Likewise.
2401
2402 2016-01-14 Yao Qi <yao.qi@linaro.org>
2403
2404 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2405 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2406 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2407 arm_get_next_pcs_ctor.
2408
2409 2016-01-12 Josh Stone <jistone@redhat.com>
2410 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2411
2412 * inferiors.h: Include "gdb_vecs.h".
2413 (struct process_info): Add syscalls_to_catch.
2414 * inferiors.c (remove_process): Free syscalls_to_catch.
2415 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2416 syscall_return stops.
2417 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2418 * server.c (handle_general_set): Handle QCatchSyscalls.
2419 (handle_query): Report support for QCatchSyscalls.
2420 * target.h (struct target_ops): Add supports_catch_syscall.
2421 (target_supports_catch_syscall): New macro.
2422 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2423 (struct lwp_info): Add syscall_state.
2424 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2425 Maintain syscall_state and syscalls_to_catch across exec.
2426 (get_syscall_trapinfo): New function, proxy to the_low_target.
2427 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2428 (linux_low_filter_event): Toggle syscall_state entry/return for
2429 syscall traps, and set it ignored for all others.
2430 (gdb_catching_syscalls_p): New function.
2431 (gdb_catch_this_syscall_p): New function.
2432 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2433 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2434 (linux_supports_catch_syscall): New function.
2435 (linux_target_ops): Install it.
2436 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2437 (the_low_target): Install it.
2438
2439 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2440
2441 * acinclude.m4: Include new ../warning.m4 file.
2442 * configure: Regenerated.
2443 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2444
2445 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2446
2447 * ax.c (is_goto_target): Mark static.
2448 * linux-low.c (register_addr): Likewise.
2449 (linux_fetch_registers, linux_store_registers): Likewise.
2450 * mem-break.c (any_persistent_commands): Fix old prototype.
2451 (add_commands_to_breakpoint): Mark static.
2452 * regcache.c (find_register_by_name): Delete unused func.
2453 * remote-utils.c (hex_or_minus_one): Mark static.
2454 * server.c (monitor_show_help): Mark static.
2455 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2456 handle_v_requests): Likewise.
2457
2458 2016-01-12 Pedro Alves <palves@redhat.com>
2459
2460 Remove use of the registered trademark symbol throughout.
2461
2462 2016-01-08 Yao Qi <yao.qi@linaro.org>
2463
2464 * remote-utils.c (getpkt): If c is '\003', call target hook
2465 request_interrupt.
2466
2467 2016-01-06 Yao Qi <yao.qi@linaro.org>
2468
2469 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2470 linux-aarch32-low.c.
2471 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2472 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2473 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2474 (thumb2_breakpoint): Declare.
2475 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2476 linux-aarch32-low.h.
2477 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2478 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2479 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2480
2481 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2482
2483 * gdbreplay.c (gdbreplay_version): Change copyright year in
2484 version message.
2485 * server.c (gdbserver_version): Likewise.
2486
2487 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2488
2489 * server.c (crc32_table): Delete.
2490 (crc32): Use libiberty's xcrc32 function.
2491
2492 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2493
2494 * lynx-low.c (lynx_delete_thread_callback): New function.
2495 (lynx_mourn): Properly delete our process and all of its
2496 threads. Remove call to clear_inferiors.
2497
2498 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2499
2500 * target.c (thread_search_callback): Add check that
2501 the thread_stopped target callback is not NULL before
2502 calling it.
2503
2504 2015-12-21 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2507 arm breakpoint.
2508
2509 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2510
2511 * server.c (handle_query): Call target_supports_software_single_step.
2512
2513 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2514
2515 * linux-low.c (single_step): New function.
2516 (linux_resume_one_lwp_throw): Call single_step.
2517 (start_step_over): Likewise.
2518
2519 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2520
2521 * Makefile.in (SFILES): Append arch/arm-linux.c,
2522 arch/arm-get-next-pcs.c.
2523 (arm-linux.o): New rule.
2524 (arm-get-next-pcs.o): New rule.
2525 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2526 arm-linux.o.
2527 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2528 to linux-aarch32-low.c.
2529 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2530 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2531 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2532 (thumb2_breakpoint_len): Likewise.
2533 (arm_is_thumb_mode): Make non-static.
2534 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2535 from linux-aarch32-low.c.
2536 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2537 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2538 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2539 (thumb2_breakpoint_len): Likewise.
2540 (arm_is_thumb_mode): New declaration.
2541 * linux-arm-low.c: Include arch/arm-linux.h
2542 aarch/arm-get-next-pcs.h, sys/syscall.h.
2543 (get_next_pcs_ops): New struct.
2544 (get_next_pcs_addr_bits_remove): New function.
2545 (get_next_pcs_is_thumb): New function.
2546 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2547 (arm_sigreturn_next_pc): Likewise.
2548 (get_next_pcs_syscall_next_pc): Likewise.
2549 (arm_gdbserver_get_next_pcs): Likewise.
2550 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2551 Initialize.
2552 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2553 * server.h: Include gdb_vecs.h.
2554
2555 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2556
2557 * Makefile.in (SFILES): Append common/common-regcache.c.
2558 (OBS): Append common-regcache.o.
2559 (common-regcache.o): New rule.
2560 * regcache.c (init_register_cache): Initialize cache to
2561 REG_UNAVAILABLE.
2562 (regcache_raw_read_unsigned): New function.
2563 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2564 register_status enum.
2565
2566 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2567
2568 * linux-aarch64-low.c (the_low_targets): Rename
2569 breakpoint_reinsert_addr to get_next_pcs.
2570 * linux-arm-low.c (the_low_targets): Likewise.
2571 * linux-bfin-low.c (the_low_targets): Likewise.
2572 * linux-cris-low.c (the_low_targets): Likewise.
2573 * linux-crisv32-low.c (the_low_targets): Likewise.
2574 * linux-low.c (can_software_single_step): Likewise.
2575 (install_software_single_step_breakpoints): New function.
2576 (start_step_over): Use install_software_single_step_breakpoints.
2577 * linux-low.h: New CORE_ADDR vector.
2578 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2579 get_next_pcs.
2580 * linux-mips-low.c (the_low_targets): Likewise.
2581 * linux-nios2-low.c (the_low_targets): Likewise.
2582 * linux-sparc-low.c (the_low_targets): Likewise.
2583
2584 2015-12-17 Pedro Alves <palves@redhat.com>
2585
2586 * linux-low.c (linux_kill_one_lwp): Remove references to
2587 LinuxThreads.
2588 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2589 to 'kill'.
2590 (linux_init_signals): Delete.
2591 (initialize_low): Adjust.
2592 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2593
2594 2015-12-16 Pedro Alves <palves@redhat.com>
2595
2596 * configure.ac (compiler warning flags): When testing a
2597 -Wno-foo option, check whether -Wfoo works instead.
2598 * configure: Regenerate.
2599
2600 2015-12-11 Don Breazeal <donb@codesourcery.com>
2601
2602 * server.c (process_serial_event): Don't exit from gdbserver
2603 in remote mode if there are still active inferiors.
2604
2605 2015-12-11 Yao Qi <yao.qi@linaro.org>
2606
2607 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2608 arm_breakpoint_at if the process is 32-bit.
2609
2610 2015-12-11 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2613 arm breakpoint.
2614
2615 2015-12-07 Yao Qi <yao.qi@linaro.org>
2616
2617 * configure.srv: Append arm.o to srv_tgtobj for
2618 aarch64*-*-linux* target.
2619 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2620 from linux-arm-low.c.
2621 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2622 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2623 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2624 (thumb2_breakpoint_len): Likewise.
2625 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2626 (arm_breakpoint_kinds): Likewise.
2627 (arm_breakpoint_kind_from_pc): Likewise.
2628 (arm_sw_breakpoint_from_kind): Likewise.
2629 (arm_breakpoint_kind_from_current_state): Likewise.
2630 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2631 (arm_sw_breakpoint_from_kind): Declare.
2632 (arm_breakpoint_kind_from_current_state): Declare.
2633 (arm_breakpoint_at): Declare.
2634 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2635 arm_sw_breakpoint_from_kind if process is 32-bit.
2636 (aarch64_breakpoint_kind_from_pc): New function.
2637 (aarch64_breakpoint_kind_from_current_state): New function.
2638 (the_low_target): Initialize fields breakpoint_kind_from_pc
2639 and breakpoint_kind_from_current_state.
2640 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2641 linux-aarch32-low.c.
2642 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2643 (arm_breakpoint, arm_breakpoint_len): Likewise.
2644 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2645 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2646 (arm_is_thumb_mode): Likewise.
2647 (arm_breakpoint_at): Likewise.
2648 (arm_breakpoint_kind_from_pc): Likewise.
2649 (arm_sw_breakpoint_from_kind): Likewise.
2650 (arm_breakpoint_kind_from_current_state): Likewise.
2651
2652 Revert:
2653 2015-08-04 Yao Qi <yao.qi@linaro.org>
2654
2655 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2656 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2657 * server.c (extended_protocol): Remove "static".
2658 * server.h (extended_protocol): Declare it.
2659
2660 2015-12-04 Josh Stone <jistone@redhat.com>
2661
2662 * target.h (struct target_ops) <arch_setup>: Rename to ...
2663 (struct target_ops) <post_create_inferior>: ... this.
2664 (target_arch_setup): Rename to ...
2665 (target_post_create_inferior): ... this, calling post_create_inferior.
2666 * server.c (start_inferior): Update target_arch_setup calls to
2667 target_post_create_inferior.
2668 * linux-low.c (linux_low_ptrace_options): Forward declare.
2669 (linux_arch_setup): Update its comment for general use.
2670 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2671 (struct linux_target_ops): Use linux_post_create_inferior.
2672 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2673 to post_create_inferior.
2674 * nto-low.c (struct nto_target_ops): Likewise.
2675 * spu-low.c (struct spu_target_ops): Likewise.
2676 * win32-low.c (struct win32_target_ops): Likewise.
2677
2678 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2679
2680 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2681
2682 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2683
2684 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2685 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2686 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2687 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2688 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2689 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2690 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2691 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2692 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2693 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2694 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2695 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2696
2697 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2698
2699 * linux-low.c (linux_look_up_symbols): Don't call
2700 linux_supports_traceclone.
2701 * linux-low.h (thread_db_init): Remove use_events argument.
2702 * thread-db.c (thread_db_use_event): Remove global variable.
2703 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2704 (struct thread_db) <td_create_bp>: Remove field.
2705 (thread_db_create_event): Remove function.
2706 (thread_db_enable_reporting): Likewise.
2707 (find_one_thread): Don't check for thread_db_use_events.
2708 (attach_thread): Likewise.
2709 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2710 (try_thread_db_load_1): Don't check for thread_db_use_events.
2711 (thread_db_init): Remove use_events argument and thread events
2712 handling.
2713 (remove_thread_event_breakpoints): Remove function.
2714 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2715
2716 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2717
2718 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2719 New function.
2720 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2721 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2722 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2723 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2724 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2725 Initialize.
2726 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2727 New function.
2728 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2729 * linux-low.c (can_hardware_single_step): Use
2730 supports_hardware_single_step.
2731 (can_software_single_step): New function.
2732 (start_step_over): Call can_software_single_step.
2733 (linux_supports_hardware_single_step): New function.
2734 (struct target_ops) <supports_software_single_step>: Initialize.
2735 * linux-low.h (struct linux_target_ops)
2736 <supports_hardware_single_step>: Initialize.
2737 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2738 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2739 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2740 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2741 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2742 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2743 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2744 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2745 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2746 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2747 Initialize.
2748 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2749 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2750 Initialize.
2751 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2752 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2753 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2754 New function.
2755 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2756 * target.h (struct target_ops): <supports_software_single_step>:
2757 New field.
2758 (target_supports_software_single_step): New macro.
2759
2760 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2761
2762 * linux-low.c (linux_wait_1): Fix pc advance condition.
2763 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2764 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2765
2766 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2767
2768 * linux-arm-low.c (arm_is_thumb_mode): New function.
2769 (arm_breakpoint_at): Use arm_is_thumb_mode.
2770 (arm_breakpoint_kind_from_current_state): New function.
2771 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2772 Initialize.
2773 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2774 (linux_breakpoint_kind_from_current_state): New function.
2775 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2776 * linux-low.h (struct linux_target_ops)
2777 <breakpoint_kind_from_current_state>: New field.
2778 * target.h (struct target_ops): Likewise.
2779 (target_breakpoint_kind_from_current_state): New macro.
2780
2781 2015-11-30 Pedro Alves <palves@redhat.com>
2782
2783 * linux-low.c (linux_resume): Wake up the event loop before
2784 returning.
2785
2786 2015-11-30 Pedro Alves <palves@redhat.com>
2787
2788 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2789 check.
2790 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2791 to -1.
2792 * target.c (struct thread_search): New structure.
2793 (thread_search_callback): New function.
2794 (prev_general_thread): New global.
2795 (prepare_to_access_memory, done_accessing_memory): New functions.
2796 * target.h (prepare_to_access_memory, done_accessing_memory):
2797 Replace macros with function declarations.
2798
2799 2015-11-30 Pedro Alves <palves@redhat.com>
2800
2801 PR 14618
2802 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2803 report TARGET_WAITKIND_NO_RESUMED.
2804 * remote-utils.c (prepare_resume_reply): Handle
2805 TARGET_WAITKIND_NO_RESUMED.
2806 * server.c (report_no_resumed): New global.
2807 (handle_query) <qSupported>: Handle "no-resumed+". Report
2808 "no-resumed+" support.
2809 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2810 return error if the client doesn't support no-resumed events.
2811 (push_stop_notification): New function.
2812 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2813 events if the client supports them.
2814
2815 2015-11-30 Pedro Alves <palves@redhat.com>
2816
2817 * linux-low.c (thread_still_has_status_pending_p): Don't check
2818 vCont;t here.
2819 (lwp_resumed): New function.
2820 (status_pending_p_callback): Return early if the LWP is not
2821 supposed to be resumed.
2822
2823 2015-11-30 Pedro Alves <palves@redhat.com>
2824
2825 * linux-low.c (handle_extended_wait): Assert that the LWP's
2826 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2827 thread create events, leave the new child's status pending.
2828 (linux_low_filter_event): If GDB wants to hear about thread exit
2829 events, leave the LWP marked dead and don't delete it.
2830 (linux_wait_for_event_filtered): Don't check for thread exit.
2831 (filter_exit_event): New function.
2832 (linux_wait_1): Use it, when returning an exit event.
2833 (linux_resume_one_lwp_throw): Assert that the LWP's
2834 waitstatus is TARGET_WAITKIND_IGNORE.
2835 * remote-utils.c (prepare_resume_reply): Handle
2836 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2837 * server.c (report_thread_events): New global.
2838 (handle_general_set): Handle QThreadEvents.
2839 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2840 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2841 TARGET_WAITKIND_THREAD_EXITED.
2842 * server.h (report_thread_events): Declare.
2843
2844 2015-11-30 Pedro Alves <palves@redhat.com>
2845
2846 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2847 the thread's last_resume_kind was resume_stop.
2848
2849 2015-11-30 Pedro Alves <palves@redhat.com>
2850
2851 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2852 before returning.
2853
2854 2015-11-30 Pedro Alves <palves@redhat.com>
2855
2856 * server.c (handle_v_requests): Handle vCtrlC.
2857
2858 2015-11-30 Pedro Alves <palves@redhat.com>
2859
2860 * gdbthread.h (find_any_thread_of_pid): Declare.
2861 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2862 functions.
2863 * server.c (handle_query): If current_thread is NULL, look for
2864 another thread of the selected process.
2865
2866 2015-11-26 Daniel Colascione <dancol@dancol.org>
2867 Simon Marchi <simon.marchi@ericsson.com>
2868
2869 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2870 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2871 name in reply.
2872 * target.h (struct target_ops) <thread_name>: New field.
2873 (target_thread_name): New macro.
2874
2875 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2876
2877 * regcache.h (regcache_invalidate_pid): Add declaration.
2878 * regcache.c (regcache_invalidate_pid): New function, extracted
2879 from regcache_invalidate.
2880 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2881 Add trivial documentation comment.
2882 * lynx-low.c: Use regcache_invalidate_pid instead of
2883 regcache_invalidate.
2884
2885 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2886
2887 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2888 and Elf64_auxv_t if the target is Android.
2889
2890 2015-11-22 Doug Evans <xdje42@gmail.com>
2891
2892 * target.h: #include <sys/types.h>.
2893
2894 2015-11-19 Pedro Alves <palves@redhat.com>
2895
2896 * linux-low.c (linux_process_qsupported): Change prototype.
2897 Adjust.
2898 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2899 Change prototype.
2900 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2901 and adjust to loop over all features.
2902 * server.c (handle_query) <qSupported>: Adjust to call
2903 target_process_qsupported once, passing it a vector of unprocessed
2904 features.
2905 * target.h (struct target_ops) <process_qsupported>: Change
2906 prototype.
2907 (target_process_qsupported): Adjust.
2908
2909 2015-11-19 Pedro Alves <palves@redhat.com>
2910
2911 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2912 mode.
2913 * configure: Regenerate.
2914
2915 2015-11-19 Pedro Alves <palves@redhat.com>
2916
2917 * configure: Regenerate.
2918
2919 2015-11-19 Yao Qi <yao.qi@linaro.org>
2920
2921 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2922 type to uint32_t.
2923
2924 2015-11-19 Yao Qi <yao.qi@linaro.org>
2925
2926 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2927 (struct aarch64_operand): Move enum out.
2928
2929 2015-11-19 Yao Qi <yao.qi@linaro.org>
2930
2931 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2932 struct user_fpsimd_state *.
2933 (aarch64_store_fpregset): Likewise.
2934
2935 2015-11-19 Yao Qi <yao.qi@linaro.org>
2936
2937 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2938 struct user_pt_regs *.
2939 (aarch64_store_gregset): Likewise.
2940
2941 2015-11-18 Pedro Alves <palves@redhat.com>
2942
2943 * Makefile.in (all_object_files): Add $IPA_OBJS.
2944
2945 2015-11-17 Pedro Alves <palves@redhat.com>
2946
2947 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2948 GDB_SIGNAL_0 and gdb_signal_to_string.
2949
2950 2015-11-17 Pedro Alves <palves@redhat.com>
2951
2952 * win32-low.c (handle_output_debug_string): Remove parameter.
2953 (win32_kill): Remove our_status local and adjust call to
2954 handle_output_debug_string.
2955 (get_child_debug_event): Adjust call to
2956 handle_output_debug_string.
2957
2958 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2959
2960 * linux-mips-low.c (mips_fill_gregset): Add cast.
2961 (mips_store_gregset): Likewise.
2962 (mips_fill_fpregset): Likewise.
2963 (mips_store_fpregset): Likewise.
2964
2965 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2966
2967 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2968 priv.
2969
2970 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2971
2972 * linux-mips-low.c (mips_linux_new_thread): Change type of
2973 watch_type to enum target_hw_bp_type.
2974
2975 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2976
2977 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2978 Change return type to arm_hwbp_type.
2979
2980 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2981
2982 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2983 (arm_store_gregset): Likewise.
2984 * linux-arm-low.c (arm_get_hwcap): Likewise.
2985 (arm_read_description): Likewise.
2986
2987 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2988
2989 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2990
2991 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2992
2993 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2994 (ppc_fill_vsxregset): Likewise.
2995 (ppc_store_vsxregset): Likewise.
2996 (ppc_fill_vrregset): Likewise.
2997 (ppc_store_vrregset): Likewise.
2998 (ppc_fill_evrregset): Likewise.
2999 (ppc_store_evrregset): Likewise.
3000
3001 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3002
3003 * linux-ppc-low.c (ppc_usrregs_info): Remove
3004 forward-declaration.
3005 (ppc_arch_setup): Move lower in file.
3006
3007 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3008
3009 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3010 (ps_pdwrite): Likewise.
3011
3012 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3013
3014 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3015 to after assert checks.
3016
3017 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3018
3019 * proc-service.c (ps_pdread): Add/adjust casts.
3020 (ps_pdwrite): Add/adjust casts.
3021
3022 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3023
3024 * server.c (handle_search_memory_1): Cast return value of
3025 memmem.
3026
3027 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3028
3029 * server.c (write_qxfer_response): Change type of data to
3030 gdb_byte *.
3031
3032 2015-10-29 Pedro Alves <palves@redhat.com>
3033
3034 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3035
3036 2015-10-29 Pedro Alves <palves@redhat.com>
3037
3038 * tracepoint.c (clear_installed_tracepoints): Add casts.
3039
3040 2015-10-29 Pedro Alves <palves@redhat.com>
3041
3042 * server.c (handle_v_cont, process_serial_event): Add enum
3043 gdb_signal casts to signal parsing code.
3044
3045 2015-10-29 Pedro Alves <palves@redhat.com>
3046
3047 * linux-low.h (NULL_REGSET): Define.
3048 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3049 * linux-arm-low.c (arm_regsets): Likewise.
3050 * linux-crisv32-low.c (cris_regsets): Likewise.
3051 * linux-m68k-low.c (m68k_regsets): Likewise.
3052 * linux-mips-low.c (mips_regsets): Likewise.
3053 * linux-nios2-low.c (nios2_regsets): Likewise.
3054 * linux-ppc-low.c (ppc_regsets): Likewise.
3055 * linux-s390-low.c (s390_regsets): Likewise.
3056 * linux-sh-low.c (sh_regsets): Likewise.
3057 * linux-sparc-low.c (sparc_regsets): Likewise.
3058 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3059 * linux-tile-low.c (tile_regsets): Likewise.
3060 * linux-x86-low.c (x86_regsets): Likewise.
3061 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3062
3063 2015-10-29 Pedro Alves <palves@redhat.com>
3064
3065 * linux-low.h (NULL_REGSET): Define.
3066 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3067 * linux-arm-low.c (arm_regsets): Likewise.
3068 * linux-crisv32-low.c (cris_regsets): Likewise.
3069 * linux-m68k-low.c (m68k_regsets): Likewise.
3070 * linux-mips-low.c (mips_regsets): Likewise.
3071 * linux-nios2-low.c (nios2_regsets): Likewise.
3072 * linux-ppc-low.c (ppc_regsets): Likewise.
3073 * linux-s390-low.c (s390_regsets): Likewise.
3074 * linux-sh-low.c (sh_regsets): Likewise.
3075 * linux-sparc-low.c (sparc_regsets): Likewise.
3076 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3077 * linux-tile-low.c (tile_regsets): Likewise.
3078 * linux-x86-low.c (x86_regsets): Likewise.
3079 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3080
3081 2015-10-26 Doug Evans <dje@google.com>
3082
3083 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3084
3085 2015-10-26 Doug Evans <dje@google.com>
3086
3087 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3088
3089 2015-10-26 Doug Evans <dje@google.com>
3090
3091 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3092 for debug_printf.
3093 (attach_thread, find_new_threads_callback): Ditto.
3094
3095 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3096
3097 * mem-break.h (set_breakpoint_data): Remove.
3098
3099 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3100
3101 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3102 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3103 (initialize_low): Remove set_breakpoint_data call.
3104 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3105 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3106 (initialize_low): Remove set_breakpoint_data call.
3107 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3108 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3109 (initialize_low): Remove set_breakpoint_data call.
3110
3111 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3112
3113 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3114 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3115 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3116 * target.h (target_breakpoint_kind_from_pc): New macro.
3117
3118 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3119
3120 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3121 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3122 the default breakpoint kind.
3123
3124 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3125
3126 * linux-arm-low.c (arm_supports_z_point_type): Add software
3127 breakpoint support.
3128
3129 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3130
3131 * linux-arm-low.c: Refactor breakpoint definitions.
3132 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3133 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3134
3135 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3136
3137 * Makefile.in: Add arm.c/o.
3138 * configure.srv: Likewise.
3139 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3140 (arm_breakpoint_kind_from_pc): New function.
3141 (arm_sw_breakpoint_from_kind): Return proper kind.
3142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3143
3144 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3145
3146 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3147 removal.
3148 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3149 (struct raw_breakpoint) <size>: Remove.
3150 (struct raw_breakpoint) <kind>: Add.
3151 (bp_size): New function.
3152 (bp_opcode): Likewise.
3153 (find_raw_breakpoint_at): Adjust for kind.
3154 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3155 (remove_memory_breakpoint): Adjust for kind call bp_size.
3156 (set_raw_breakpoint_at): Adjust for kind.
3157 (set_breakpoint): Likewise.
3158 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3159 (delete_raw_breakpoint): Adjust for kind.
3160 (delete_breakpoint): Likewise.
3161 (find_gdb_breakpoint): Likewise.
3162 (set_gdb_breakpoint_1): Likewise.
3163 (set_gdb_breakpoint): Likewise.
3164 (delete_gdb_breakpoint_1): Likewise.
3165 (delete_gdb_breakpoint): Likewise.
3166 (uninsert_raw_breakpoint): Likewise.
3167 (reinsert_raw_breakpoint): Likewise.
3168 (set_breakpoint_data): Remove.
3169 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3170 (check_mem_read): Adjust for kind call bp_size.
3171 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3172 (clone_one_breakpoint): Adjust for kind.
3173 * mem-break.h (set_gdb_breakpoint): Likewise.
3174 (delete_gdb_breakpoint): Likewise.
3175 * server.c (process_serial_event): Likewise.
3176
3177 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3178
3179 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3180 (struct linux_target_ops) <breakpoint>: Remove.
3181 (struct linux_target_ops) <breakpoint_len>: Remove.
3182 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3183 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3184 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3185 (arm_sw_breakpoint_from_kind): New function.
3186 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3187 (struct linux_target_ops) <breakpoint>: Remove.
3188 (struct linux_target_ops) <breakpoint_len>: Remove.
3189 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3190 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3191 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3192 (struct linux_target_ops) <breakpoint>: Remove.
3193 (struct linux_target_ops) <breakpoint_len>: Remove.
3194 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3195 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3196 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3197 (struct linux_target_ops) <breakpoint>: Remove.
3198 (struct linux_target_ops) <breakpoint_len>: Remove.
3199 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3200 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3201 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3202 and sw_breakpoint_from_kind to increment the pc.
3203 (linux_breakpoint_kind_from_pc): New function.
3204 (linux_sw_breakpoint_from_kind): New function.
3205 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3206 (initialize_low): Call breakpoint_kind_from_pc and
3207 sw_breakpoint_from_kind to replace breakpoint_data/len.
3208 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3209 New field.
3210 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3211 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3212 (struct linux_target_ops) <breakpoint>: Remove.
3213 (struct linux_target_ops) <breakpoint_len>: Remove.
3214 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3215 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3216 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3217 (struct linux_target_ops) <breakpoint>: Remove.
3218 (struct linux_target_ops) <breakpoint_len>: Remove.
3219 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3220 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3221 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3222 (struct linux_target_ops) <breakpoint>: Remove.
3223 (struct linux_target_ops) <breakpoint_len>: Remove.
3224 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3225 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3226 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3227 (struct linux_target_ops) <breakpoint>: Remove.
3228 (struct linux_target_ops) <breakpoint_len>: Remove.
3229 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3231 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3232 (struct linux_target_ops) <breakpoint>: Remove.
3233 (struct linux_target_ops) <breakpoint_len>: Remove.
3234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3235 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3236 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3237 (struct linux_target_ops) <breakpoint>: Remove.
3238 (struct linux_target_ops) <breakpoint_len>: Remove.
3239 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3240 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3241 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3242 (struct linux_target_ops) <breakpoint>: Remove.
3243 (struct linux_target_ops) <breakpoint_len>: Remove.
3244 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3245 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3246 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3247 (struct linux_target_ops) <breakpoint>: Remove.
3248 (struct linux_target_ops) <breakpoint_len>: Remove.
3249 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3250 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3251 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3252 (struct linux_target_ops) <breakpoint>: Remove.
3253 (struct linux_target_ops) <breakpoint_len>: Remove.
3254 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3255 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3256 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3257 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3258 (struct linux_target_ops) <breakpoint>: Remove.
3259 (struct linux_target_ops) <breakpoint_len>: Remove.
3260 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3261 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3262 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3263 (struct linux_target_ops) <breakpoint>: Remove.
3264 (struct linux_target_ops) <breakpoint_len>: Remove.
3265 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3267
3268 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3269
3270 * linux-cris-low.c (cris_get_pc): Remove void arg.
3271
3272 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3273
3274 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3275 variable name.
3276
3277 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3278
3279 * inferiors.c (thread_pid_matches_callback): New function.
3280 (find_thread_process): New function.
3281 (remove_thread): Reset current_thread.
3282 (remove_process): Assert threads have been removed first.
3283
3284 2015-10-15 Yao Qi <yao.qi@linaro.org>
3285
3286 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3287 if it is 3.
3288 (aarch64_remove_point): Likewise.
3289 * regcache.c (regcache_register_size): New function.
3290
3291 2015-10-12 Yao Qi <yao.qi@linaro.org>
3292
3293 * linux-aarch64-low.c: Update all callers as emit_load_store
3294 is renamed to aarch64_emit_load_store.
3295
3296 2015-10-12 Yao Qi <yao.qi@linaro.org>
3297
3298 * linux-aarch64-low.c: Update all callers of function renaming
3299 from emit_insn to aarch64_emit_insn.
3300
3301 2015-10-12 Yao Qi <yao.qi@linaro.org>
3302
3303 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3304 arch/aarch64-insn.h.
3305 (struct aarch64_memory_operand): Likewise.
3306 (ENCODE): Likewise.
3307 (emit_insn): Move to arch/aarch64-insn.c.
3308 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3309 (emit_load_store): Move to arch/aarch64-insn.c.
3310 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3311 (can_encode_int32): Remove.
3312
3313 2015-10-12 Yao Qi <yao.qi@linaro.org>
3314
3315 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3316 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3317 (aarch64_relocate_instruction): Likewise.
3318 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3319 (struct aarch64_insn_visitor): Likewise.
3320
3321 2015-10-12 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3324 (struct aarch64_insn_visitor): New.
3325 (struct aarch64_insn_relocation_data): New.
3326 (aarch64_ftrace_insn_reloc_b): New function.
3327 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3328 (aarch64_ftrace_insn_reloc_cb): Likewise.
3329 (aarch64_ftrace_insn_reloc_tb): Likewise.
3330 (aarch64_ftrace_insn_reloc_adr): Likewise.
3331 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3332 (aarch64_ftrace_insn_reloc_others): Likewise.
3333 (visitor): New.
3334 (aarch64_relocate_instruction): Use visitor.
3335
3336 2015-10-12 Yao Qi <yao.qi@linaro.org>
3337
3338 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3339 int. Add argument buf.
3340 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3341 aarch64_relocate_instruction.
3342
3343 2015-10-12 Yao Qi <yao.qi@linaro.org>
3344
3345 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3346 argument insn. Remove local variable insn. Don't call
3347 target_read_uint32.
3348 (aarch64_install_fast_tracepoint_jump_pad): Call
3349 target_read_uint32.
3350
3351 2015-09-30 Yao Qi <yao.qi@linaro.org>
3352
3353 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3354 (emit_load_store_pair): Likewise.
3355
3356 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3357
3358 * dll.c (match_dll): Add cast(s).
3359 (unloaded_dll): Likewise.
3360 * linux-low.c (second_thread_of_pid_p): Likewise.
3361 (delete_lwp_callback): Likewise.
3362 (count_events_callback): Likewise.
3363 (select_event_lwp_callback): Likewise.
3364 (linux_set_resume_request): Likewise.
3365 * server.c (accumulate_file_name_length): Likewise.
3366 (emit_dll_description): Likewise.
3367 (handle_qxfer_threads_worker): Likewise.
3368 (visit_actioned_threads): Likewise.
3369 * thread-db.c (any_thread_of): Likewise.
3370 * tracepoint.c (same_process_p): Likewise.
3371 (match_blocktype): Likewise.
3372 (build_traceframe_info_xml): Likewise.
3373
3374 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3375
3376 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3377 assignment.
3378 (gdb_unparse_agent_expr): Likewise.
3379 * hostio.c (require_data): Likewise.
3380 (handle_pread): Likewise.
3381 * linux-low.c (disable_regset): Likewise.
3382 (fetch_register): Likewise.
3383 (store_register): Likewise.
3384 (get_dynamic): Likewise.
3385 (linux_qxfer_libraries_svr4): Likewise.
3386 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3387 (set_fast_tracepoint_jump): Likewise.
3388 (uninsert_fast_tracepoint_jumps_at): Likewise.
3389 (reinsert_fast_tracepoint_jumps_at): Likewise.
3390 (validate_inserted_breakpoint): Likewise.
3391 (clone_agent_expr): Likewise.
3392 * regcache.c (init_register_cache): Likewise.
3393 * remote-utils.c (putpkt_binary_1): Likewise.
3394 (decode_M_packet): Likewise.
3395 (decode_X_packet): Likewise.
3396 (look_up_one_symbol): Likewise.
3397 (relocate_instruction): Likewise.
3398 (monitor_output): Likewise.
3399 * server.c (handle_search_memory): Likewise.
3400 (handle_qxfer_exec_file): Likewise.
3401 (handle_qxfer_libraries): Likewise.
3402 (handle_qxfer): Likewise.
3403 (handle_query): Likewise.
3404 (handle_v_cont): Likewise.
3405 (handle_v_run): Likewise.
3406 (captured_main): Likewise.
3407 * target.c (write_inferior_memory): Likewise.
3408 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3409 * tracepoint.c (init_trace_buffer): Likewise.
3410 (add_tracepoint_action): Likewise.
3411 (add_traceframe): Likewise.
3412 (add_traceframe_block): Likewise.
3413 (cmd_qtdpsrc): Likewise.
3414 (cmd_qtdv): Likewise.
3415 (cmd_qtstatus): Likewise.
3416 (response_source): Likewise.
3417 (response_tsv): Likewise.
3418 (cmd_qtnotes): Likewise.
3419 (gdb_collect): Likewise.
3420 (initialize_tracepoint): Likewise.
3421
3422 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3423
3424 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3425 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3426 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3427 <NOP>: New.
3428 (enum aarch64_condition_codes): New enum.
3429 (w0): New static global.
3430 (fp): Likewise.
3431 (lr): Likewise.
3432 (struct aarch64_memory_operand) <type>: New
3433 MEMORY_OPERAND_POSTINDEX type.
3434 (postindex_memory_operand): New helper function.
3435 (emit_ret): New function.
3436 (emit_load_store_pair): New function, factored out of emit_stp
3437 with support for MEMORY_OPERAND_POSTINDEX.
3438 (emit_stp): Rewrite using emit_load_store_pair.
3439 (emit_ldp): New function.
3440 (emit_load_store): Likewise.
3441 (emit_ldr): Mention post-index instruction in comment.
3442 (emit_ldrh): New function.
3443 (emit_ldrb): New function.
3444 (emit_ldrsw): Mention post-index instruction in comment.
3445 (emit_str): Likewise.
3446 (emit_subs): New function.
3447 (emit_cmp): Likewise.
3448 (emit_and): Likewise.
3449 (emit_orr): Likewise.
3450 (emit_orn): Likewise.
3451 (emit_eor): Likewise.
3452 (emit_mvn): Likewise.
3453 (emit_lslv): Likewise.
3454 (emit_lsrv): Likewise.
3455 (emit_asrv): Likewise.
3456 (emit_mul): Likewise.
3457 (emit_sbfm): Likewise.
3458 (emit_sbfx): Likewise.
3459 (emit_ubfm): Likewise.
3460 (emit_ubfx): Likewise.
3461 (emit_csinc): Likewise.
3462 (emit_cset): Likewise.
3463 (emit_nop): Likewise.
3464 (emit_ops_insns): New helper function.
3465 (emit_pop): Likewise.
3466 (emit_push): Likewise.
3467 (aarch64_emit_prologue): New function.
3468 (aarch64_emit_epilogue): Likewise.
3469 (aarch64_emit_add): Likewise.
3470 (aarch64_emit_sub): Likewise.
3471 (aarch64_emit_mul): Likewise.
3472 (aarch64_emit_lsh): Likewise.
3473 (aarch64_emit_rsh_signed): Likewise.
3474 (aarch64_emit_rsh_unsigned): Likewise.
3475 (aarch64_emit_ext): Likewise.
3476 (aarch64_emit_log_not): Likewise.
3477 (aarch64_emit_bit_and): Likewise.
3478 (aarch64_emit_bit_or): Likewise.
3479 (aarch64_emit_bit_xor): Likewise.
3480 (aarch64_emit_bit_not): Likewise.
3481 (aarch64_emit_equal): Likewise.
3482 (aarch64_emit_less_signed): Likewise.
3483 (aarch64_emit_less_unsigned): Likewise.
3484 (aarch64_emit_ref): Likewise.
3485 (aarch64_emit_if_goto): Likewise.
3486 (aarch64_emit_goto): Likewise.
3487 (aarch64_write_goto_address): Likewise.
3488 (aarch64_emit_const): Likewise.
3489 (aarch64_emit_call): Likewise.
3490 (aarch64_emit_reg): Likewise.
3491 (aarch64_emit_pop): Likewise.
3492 (aarch64_emit_stack_flush): Likewise.
3493 (aarch64_emit_zero_ext): Likewise.
3494 (aarch64_emit_swap): Likewise.
3495 (aarch64_emit_stack_adjust): Likewise.
3496 (aarch64_emit_int_call_1): Likewise.
3497 (aarch64_emit_void_call_2): Likewise.
3498 (aarch64_emit_eq_goto): Likewise.
3499 (aarch64_emit_ne_goto): Likewise.
3500 (aarch64_emit_lt_goto): Likewise.
3501 (aarch64_emit_le_goto): Likewise.
3502 (aarch64_emit_gt_goto): Likewise.
3503 (aarch64_emit_ge_got): Likewise.
3504 (aarch64_emit_ops_impl): New static global variable.
3505 (aarch64_emit_ops): New target function, return
3506 &aarch64_emit_ops_impl.
3507 (struct linux_target_ops): Install it.
3508
3509 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3510
3511 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3512 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3513 aarch64-ipa.o.
3514 * linux-aarch64-ipa.c: New file.
3515 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3516 and endian.h.
3517 (aarch64_get_thread_area): New target method.
3518 (extract_signed_bitfield): New helper function.
3519 (aarch64_decode_ldr_literal): New function.
3520 (enum aarch64_opcodes): New enum.
3521 (struct aarch64_register): New struct.
3522 (struct aarch64_operand): New struct.
3523 (x0): New static global.
3524 (x1): Likewise.
3525 (x2): Likewise.
3526 (x3): Likewise.
3527 (x4): Likewise.
3528 (w2): Likewise.
3529 (ip0): Likewise.
3530 (sp): Likewise.
3531 (xzr): Likewise.
3532 (aarch64_register): New helper function.
3533 (register_operand): Likewise.
3534 (immediate_operand): Likewise.
3535 (struct aarch64_memory_operand): New struct.
3536 (offset_memory_operand): New helper function.
3537 (preindex_memory_operand): Likewise.
3538 (enum aarch64_system_control_registers): New enum.
3539 (ENCODE): New macro.
3540 (emit_insn): New helper function.
3541 (emit_b): New function.
3542 (emit_bcond): Likewise.
3543 (emit_cb): Likewise.
3544 (emit_tb): Likewise.
3545 (emit_blr): Likewise.
3546 (emit_stp): Likewise.
3547 (emit_ldp_q_offset): Likewise.
3548 (emit_stp_q_offset): Likewise.
3549 (emit_load_store): Likewise.
3550 (emit_ldr): Likewise.
3551 (emit_ldrsw): Likewise.
3552 (emit_str): Likewise.
3553 (emit_ldaxr): Likewise.
3554 (emit_stxr): Likewise.
3555 (emit_stlr): Likewise.
3556 (emit_data_processing_reg): Likewise.
3557 (emit_data_processing): Likewise.
3558 (emit_add): Likewise.
3559 (emit_sub): Likewise.
3560 (emit_mov): Likewise.
3561 (emit_movk): Likewise.
3562 (emit_mov_addr): Likewise.
3563 (emit_mrs): Likewise.
3564 (emit_msr): Likewise.
3565 (emit_sevl): Likewise.
3566 (emit_wfe): Likewise.
3567 (append_insns): Likewise.
3568 (can_encode_int32_in): New helper function.
3569 (aarch64_relocate_instruction): New function.
3570 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3571 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3572 (struct linux_target_ops): Install aarch64_get_thread_area,
3573 aarch64_install_fast_tracepoint_jump_pad and
3574 aarch64_get_min_fast_tracepoint_insn_len.
3575
3576 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3577
3578 * Makefile.in (aarch64-insn.o): New rule.
3579 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3580
3581 2015-09-21 Yao Qi <yao.qi@linaro.org>
3582
3583 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3584
3585 2015-09-21 Yao Qi <yao.qi@linaro.org>
3586
3587 * tracepoint.c (max_jump_pad_size): Remove.
3588
3589 2015-09-18 Yao Qi <yao.qi@linaro.org>
3590
3591 * linux-aarch64-low.c: Don't include sys/uio.h.
3592 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3593
3594 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3595
3596 * tracepoint.c (eval_result_type): Change prototype.
3597 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3598
3599 2015-09-15 Pedro Alves <palves@redhat.com>
3600
3601 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3602 Check whether to report exec events instead of checking whether
3603 multiprocess is enabled.
3604
3605 2015-09-15 Pedro Alves <palves@redhat.com>
3606
3607 PR remote/18965
3608 * remote-utils.c (prepare_resume_reply): Merge
3609 TARGET_WAITKIND_VFORK_DONE switch case with the
3610 TARGET_WAITKIND_FORKED case.
3611
3612 2015-09-15 Yao Qi <yao.qi@linaro.org>
3613
3614 * server.c (handle_query): Check string comparison using
3615 "else if" instead of "if".
3616
3617 2015-09-15 Yao Qi <yao.qi@linaro.org>
3618
3619 * server.c (vCont_supported): New global variable.
3620 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3621 matches. Append ";vContSupported+" to own_buf.
3622 (handle_v_requests): Append ";s;S" to own_buf if target supports
3623 hardware single step or vCont_supported is false.
3624 (capture_main): Set vCont_supported to zero.
3625
3626 2015-09-15 Yao Qi <yao.qi@linaro.org>
3627
3628 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3629 it to ...
3630 (linux_supports_hardware_single_step): ... New function.
3631 (linux_target_ops): Update.
3632 * lynx-low.c (lynx_target_ops): Set field
3633 supports_hardware_single_step to target_can_do_hardware_single_step.
3634 * nto-low.c (nto_target_ops): Likewise.
3635 * spu-low.c (spu_target_ops): Likewise.
3636 * win32-low.c (win32_target_ops): Likewise.
3637 * target.c (target_can_do_hardware_single_step): New function.
3638 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3639 Remove. <supports_hardware_single_step>: New field.
3640 (target_supports_conditional_breakpoints): Remove.
3641 (target_supports_hardware_single_step): New macro.
3642 (target_can_do_hardware_single_step): Declare.
3643 * server.c (handle_query): Use target_supports_hardware_single_step
3644 instead of target_supports_conditional_breakpoints.
3645
3646 2015-09-15 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3649 function.
3650 (struct linux_target_ops the_low_target): Install
3651 aarch64_linux_siginfo_fixup.
3652
3653 2015-09-11 Don Breazeal <donb@codesourcery.com>
3654 Luis Machado <lgustavo@codesourcery.com>
3655
3656 * linux-low.c (linux_mourn): Static declaration.
3657 (linux_arch_setup): Move in front of
3658 handle_extended_wait.
3659 (linux_arch_setup_thread): New function.
3660 (handle_extended_wait): Handle exec events. Call
3661 linux_arch_setup_thread. Make event_lwp argument a
3662 pointer-to-a-pointer.
3663 (check_zombie_leaders): Do not check stopped threads.
3664 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3665 (linux_low_filter_event): Add lwp and thread for exec'ing
3666 non-leader thread if leader thread has been deleted.
3667 Refactor code into linux_arch_setup_thread and call it.
3668 Pass child lwp pointer by reference to handle_extended_wait.
3669 (linux_wait_for_event_filtered): Update comment.
3670 (linux_wait_1): Prevent clobbering exec event status.
3671 (linux_supports_exec_events): New function.
3672 (linux_target_ops) <supports_exec_events>: Initialize new member.
3673 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3674 new member.
3675 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3676 * server.c (report_exec_events): New global variable.
3677 (handle_query): Handle qSupported query for exec-events feature.
3678 (captured_main): Initialize report_exec_events.
3679 * server.h (report_exec_events): Declare new global variable.
3680 * target.h (struct target_ops) <supports_exec_events>: New
3681 member.
3682 (target_supports_exec_events): New macro.
3683 * win32-low.c (win32_target_ops) <supports_exec_events>:
3684 Initialize new member.
3685
3686 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3687
3688 * linux-low.c (linux_low_enable_btrace): Remove.
3689 (linux_target_ops): Replace linux_low_enable_btrace with
3690 linux_enable_btrace.
3691
3692 2015-09-03 Yao Qi <yao.qi@linaro.org>
3693
3694 * linux-aarch64-low.c (aarch64_insert_point): Call
3695 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3696 returns true.
3697
3698 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3699
3700 * linux-low.c (check_stopped_by_breakpoint): Use
3701 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3702
3703 2015-08-27 Pedro Alves <palves@redhat.com>
3704
3705 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3706
3707 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3708
3709 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3710 the XNEW-family equivalent.
3711 (compile_bytecodes): Likewise.
3712 * dll.c (loaded_dll): Likewise.
3713 * event-loop.c (append_callback_event): Likewise.
3714 (create_file_handler): Likewise.
3715 (create_file_event): Likewise.
3716 * hostio.c (handle_open): Likewise.
3717 * inferiors.c (add_thread): Likewise.
3718 (add_process): Likewise.
3719 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3720 * linux-arm-low.c (arm_new_process): Likewise.
3721 (arm_new_thread): Likewise.
3722 * linux-low.c (add_to_pid_list): Likewise.
3723 (linux_add_process): Likewise.
3724 (handle_extended_wait): Likewise.
3725 (add_lwp): Likewise.
3726 (enqueue_one_deferred_signal): Likewise.
3727 (enqueue_pending_signal): Likewise.
3728 (linux_resume_one_lwp_throw): Likewise.
3729 (linux_resume_one_thread): Likewise.
3730 (linux_read_memory): Likewise.
3731 (linux_write_memory): Likewise.
3732 * linux-mips-low.c (mips_linux_new_process): Likewise.
3733 (mips_linux_new_thread): Likewise.
3734 (mips_add_watchpoint): Likewise.
3735 * linux-x86-low.c (initialize_low_arch): Likewise.
3736 * lynx-low.c (lynx_add_process): Likewise.
3737 * mem-break.c (set_raw_breakpoint_at): Likewise.
3738 (set_breakpoint): Likewise.
3739 (add_condition_to_breakpoint): Likewise.
3740 (add_commands_to_breakpoint): Likewise.
3741 (clone_agent_expr): Likewise.
3742 (clone_one_breakpoint): Likewise.
3743 * regcache.c (new_register_cache): Likewise.
3744 * remote-utils.c (look_up_one_symbol): Likewise.
3745 * server.c (queue_stop_reply): Likewise.
3746 (start_inferior): Likewise.
3747 (queue_stop_reply_callback): Likewise.
3748 (handle_target_event): Likewise.
3749 * spu-low.c (fetch_ppc_memory): Likewise.
3750 (store_ppc_memory): Likewise.
3751 * target.c (set_target_ops): Likewise.
3752 * thread-db.c (thread_db_load_search): Likewise.
3753 (try_thread_db_load_1): Likewise.
3754 * tracepoint.c (add_tracepoint): Likewise.
3755 (add_tracepoint_action): Likewise.
3756 (create_trace_state_variable): Likewise.
3757 (cmd_qtdpsrc): Likewise.
3758 (cmd_qtro): Likewise.
3759 (add_while_stepping_state): Likewise.
3760 * win32-low.c (child_add_thread): Likewise.
3761 (get_image_name): Likewise.
3762
3763 2015-08-25 Yao Qi <yao.qi@linaro.org>
3764
3765 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3766
3767 2015-08-25 Yao Qi <yao.qi@linaro.org>
3768
3769 * Makefile.in (aarch64-linux.o): New rule.
3770 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3771 srv_tgtobj.
3772 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3773 (aarch64_init_debug_reg_state): Make it extern.
3774 (aarch64_linux_prepare_to_resume): Remove.
3775
3776 2015-08-25 Yao Qi <yao.qi@linaro.org>
3777
3778 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3779 lwp_arch_private_info and ptid_of_lwp.
3780
3781 2015-08-25 Yao Qi <yao.qi@linaro.org>
3782
3783 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3784 Find proc_info by find_process_pid. All callers updated.
3785
3786 2015-08-25 Yao Qi <yao.qi@linaro.org>
3787
3788 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3789 Remove.
3790 (debug_reg_change_callback): Remove.
3791 (aarch64_notify_debug_reg_change): Remove.
3792
3793 2015-08-25 Yao Qi <yao.qi@linaro.org>
3794
3795 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3796 Call current_lwp_ptid.
3797
3798 2015-08-25 Yao Qi <yao.qi@linaro.org>
3799
3800 * linux-aarch64-low.c (debug_reg_change_callback): Use
3801 debug_printf.
3802
3803 2015-08-25 Yao Qi <yao.qi@linaro.org>
3804
3805 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3806
3807 2015-08-25 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3810
3811 2015-08-25 Yao Qi <yao.qi@linaro.org>
3812
3813 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3814 the code.
3815
3816 2015-08-25 Yao Qi <yao.qi@linaro.org>
3817
3818 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3819 Remove.
3820 (debug_reg_change_callback): Remove argument entry and add argument
3821 lwp. Remove local variable thread. Don't print thread id in the
3822 debugging output. Don't check whether pid of thread equals to pid.
3823 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3824 iterate_over_lwps instead find_inferior.
3825
3826 2015-08-24 Pedro Alves <palves@redhat.com>
3827
3828 * inferiors.c (get_first_process): New function.
3829 * inferiors.h (get_first_process): New declaration.
3830 * remote-utils.c (read_ptid): Default to the first process in the
3831 list, instead of to the current thread's process.
3832
3833 2015-08-24 Pedro Alves <palves@redhat.com>
3834
3835 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3836 * event-loop.c: Likewise.
3837 * remote-utils.c: Likewise.
3838 * tracepoint.c: Likewise.
3839
3840 2015-08-24 Pedro Alves <palves@redhat.com>
3841
3842 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3843 ptid_get_lwp.
3844
3845 2015-08-21 Pedro Alves <palves@redhat.com>
3846
3847 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3848 instead of literal 1.
3849
3850 2015-08-21 Pedro Alves <palves@redhat.com>
3851
3852 * tdesc.c (default_description): Explicitly zero-initialize.
3853
3854 2015-08-21 Pedro Alves <palves@redhat.com>
3855
3856 PR gdb/18749
3857 * inferiors.c (remove_thread): Discard any pending stop reply for
3858 this thread.
3859 * server.c (remove_all_on_match_pid): Rename to ...
3860 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3861 instead of a pid.
3862 (discard_queued_stop_replies): Change parameter to a ptid. Now
3863 extern.
3864 (handle_v_kill, kill_inferior_callback, captured_main)
3865 (process_serial_event): Adjust.
3866 * server.h (discard_queued_stop_replies): Declare.
3867
3868 2015-08-21 Pedro Alves <palves@redhat.com>
3869
3870 * linux-low.c (wait_for_sigstop): Always switch to no thread
3871 selected if the previously current thread dies.
3872 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3873 process instead of the current thread's.
3874 * remote-utils.c (input_interrupt): Don't check if there's no
3875 current thread.
3876 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3877 current thread to the general thread fails, error out.
3878 (handle_qxfer_auxv, handle_qxfer_libraries)
3879 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3880 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3881 (handle_query): Check if there's a thread selected instead of
3882 checking whether there's any thread in the thread list.
3883 (handle_qxfer_threads, handle_qxfer_btrace)
3884 (handle_qxfer_btrace_conf): Don't error out early if there's no
3885 thread in the thread list.
3886 (handle_v_cont, myresume): Don't set the current thread to the
3887 continue thread.
3888 (process_serial_event) <Hg handling>: Also set thread_id if the
3889 previous general thread is still alive.
3890 (process_serial_event) <g/G handling>: If setting the current
3891 thread to the general thread fails, error out.
3892 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3893 thread's lwp instead of the current thread's.
3894 * target.c (set_desired_thread): If the desired thread was not
3895 found, leave the current thread pointing to NULL. Return an int
3896 (boolean) indicating success.
3897 * target.h (set_desired_thread): Change return type to int.
3898
3899 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3900
3901 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3902 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3903 #includes.
3904 (ps_get_thread_area): New function.
3905
3906 2015-08-19 Gary Benson <gbenson@redhat.com>
3907
3908 * hostio.c (handle_pread): Do not attempt to read more data
3909 than hostio_reply_with_data can fit in a packet.
3910
3911 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3912
3913 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3914
3915 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3916
3917 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3918
3919 2015-08-06 Pedro Alves <palves@redhat.com>
3920
3921 * tracepoint.c (expr_eval_result): Now an int.
3922
3923 2015-08-06 Pedro Alves <palves@redhat.com>
3924
3925 * gdbthread.h (struct regcache): Forward declare.
3926 (struct thread_info) <regcache_data>: Now a struct regcache
3927 pointer.
3928 * inferiors.c (inferior_regcache_data)
3929 (set_inferior_regcache_data): Now work with struct regcache
3930 pointers.
3931 * inferiors.h (struct regcache): Forward declare.
3932 (inferior_regcache_data, set_inferior_regcache_data): Now work
3933 with struct regcache pointers.
3934 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3935 (free_register_cache_thread): Remove struct regcache pointer
3936 casts.
3937
3938 2015-08-06 Pedro Alves <palves@redhat.com>
3939
3940 * server.c (captured_main): On error, print the exception message
3941 to stderr, and if run_once is set, throw a quit.
3942
3943 2015-08-06 Pedro Alves <palves@redhat.com>
3944
3945 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3946 the current thread.
3947
3948 2015-08-06 Pedro Alves <palves@redhat.com>
3949
3950 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3951 reading beyond the passed in buffer length.
3952
3953 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3954
3955 * tracepoint.c (symbol_list) <required>: Remove.
3956
3957 2015-08-06 Pedro Alves <palves@redhat.com>
3958
3959 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3960 count if stopping and suspending threads.
3961 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3962 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3963 (linux_detach): Complete an ongoing step-over.
3964 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3965 throughout.
3966 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3967 (linux_wait_1): If passing a signal to the inferior after
3968 finishing a step-over, unsuspend and re-resume all lwps. If we
3969 see a single-step event but the thread should be continuing, don't
3970 pass the trap to gdb.
3971 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3972 internal_error instead of gdb_assert.
3973 (enqueue_pending_signal): New function.
3974 (check_ptrace_stopped_lwp_gone): Add debug output.
3975 (start_step_over): Use internal_error instead of gdb_assert.
3976 (complete_ongoing_step_over): New function.
3977 (linux_resume_one_thread): Don't resume a suspended thread.
3978 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3979 it stepping.
3980
3981 2015-08-06 Pedro Alves <palves@redhat.com>
3982
3983 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3984 (linux_thread_alive): Use lwp_is_marked_dead.
3985 (extended_event_reported): Delete.
3986 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3987 instead of extended_event_reported.
3988 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3989 as well.
3990 (lwp_is_marked_dead): New function.
3991 (lwp_running): Use lwp_is_marked_dead.
3992 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3993 comment.
3994
3995 2015-08-06 Pedro Alves <palves@redhat.com>
3996
3997 * linux-low.c (linux_wait_1): Move fork event output out of the
3998 !report_to_gdb check. Pass event_child->waitstatus to
3999 target_waitstatus_to_string instead of ourstatus.
4000
4001 2015-08-04 Yao Qi <yao.qi@linaro.org>
4002
4003 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4004 if current_thread is 32 bit.
4005
4006 2015-08-04 Yao Qi <yao.qi@linaro.org>
4007
4008 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4009 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4010 * server.c (extended_protocol): Remove "static".
4011 * server.h (extended_protocol): Declare it.
4012
4013 2015-08-04 Yao Qi <yao.qi@linaro.org>
4014
4015 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4016 both aarch64 and aarch32.
4017 (aarch64_set_pc): Likewise.
4018
4019 2015-08-04 Yao Qi <yao.qi@linaro.org>
4020
4021 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4022 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4023 arm-with-neon.xml to srv_xmlfiles.
4024 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4025 (is_64bit_tdesc): New function.
4026 (aarch64_linux_read_description): New function.
4027 (aarch64_arch_setup): Call aarch64_linux_read_description.
4028 (regs_info): Rename to regs_info_aarch64.
4029 (aarch64_regs_info): Return right regs_info.
4030 (initialize_low_arch): Call initialize_low_arch_aarch32.
4031
4032 2015-08-04 Yao Qi <yao.qi@linaro.org>
4033
4034 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4035 * linux-aarch32-low.c: New file.
4036 * linux-aarch32-low.h: New file.
4037 * linux-arm-low.c (arm_fill_gregset): Move it to
4038 linux-aarch32-low.c.
4039 (arm_store_gregset): Likewise.
4040 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4041 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4042 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4043 (regs_info): Rename to regs_info_arm.
4044 (arm_regs_info): Return regs_info_aarch32 if
4045 have_ptrace_getregset is 1 and target description is
4046 arm_with_neon or arm_with_vfpv3.
4047 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4048 Call initialize_low_arch_aarch32 instead.
4049
4050 2015-08-04 Yao Qi <yao.qi@linaro.org>
4051
4052 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4053 * linux-low.c: ... here.
4054 * linux-low.h (have_ptrace_getregset): Declare it.
4055
4056 2015-08-04 Pedro Alves <palves@redhat.com>
4057
4058 * thread-db.c (struct thread_db): Use new typedefs.
4059 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4060 CHK calls.
4061 (disable_thread_event_reporting): Cast result of dlsym to
4062 destination function pointer type.
4063 (thread_db_mourn): Use td_ta_delete_ftype.
4064
4065 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4066
4067 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4068 arch variant.
4069 (CDX_BREAKPOINT): Define for R2.
4070 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4071 (the_low_target): Add comments.
4072
4073 2015-07-30 Yao Qi <yao.qi@linaro.org>
4074
4075 * linux-arm-low.c (arm_hwcap): Remove it.
4076 (arm_read_description): New local variable arm_hwcap. Don't
4077 set arm_hwcap to zero.
4078
4079 2015-07-30 Yao Qi <yao.qi@linaro.org>
4080
4081 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4082 Use regcache->tdesc instead.
4083 (arm_store_wmmxregset): Likewise.
4084 (arm_fill_vfpregset): Likewise.
4085 (arm_store_vfpregset): Likewise.
4086
4087 2015-07-30 Yao Qi <yao.qi@linaro.org>
4088
4089 * linux-arm-low.c: Include arch/arm.h.
4090 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4091 (arm_store_gregset): Likewise.
4092
4093 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4094
4095 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4096 ptrace's 4th parameter.
4097
4098 2015-07-27 Yao Qi <yao.qi@linaro.org>
4099
4100 * configure.srv (case aarch64*-*-linux*): Don't set
4101 srv_linux_usrregs.
4102
4103 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4104
4105 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4106 sys/ptrace.h.
4107 * linux-arm-low.c: Likewise.
4108 * linux-cris-low.c: Likewise.
4109 * linux-crisv32-low.c: Likewise.
4110 * linux-low.c: Likewise.
4111 * linux-m68k-low.c: Likewise.
4112 * linux-mips-low.c: Likewise.
4113 * linux-nios2-low.c: Likewise.
4114 * linux-s390-low.c: Likewise.
4115 * linux-sparc-low.c: Likewise.
4116 * linux-tic6x-low.c: Likewise.
4117 * linux-tile-low.c: Likewise.
4118 * linux-x86-low.c: Likewise.
4119
4120 2015-07-24 Pedro Alves <palves@redhat.com>
4121
4122 * config.in: Regenerate.
4123 * configure: Regenerate.
4124
4125 2015-07-24 Pedro Alves <palves@redhat.com>
4126
4127 * acinclude.m4: Include ../ptrace.m4.
4128 * configure.ac: Call GDB_AC_PTRACE.
4129 * config.in, configure: Regenerate.
4130
4131 2015-07-24 Yao Qi <yao.qi@linaro.org>
4132
4133 * linux-low.c (linux_create_inferior): Remove setting to
4134 proc->priv->new_inferior.
4135 (linux_attach): Likewise.
4136 (linux_low_filter_event): Likewise.
4137 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4138
4139 2015-07-24 Yao Qi <yao.qi@linaro.org>
4140
4141 * linux-low.c (linux_arch_setup): New function.
4142 (linux_low_filter_event): If proc->tdesc is NULL and
4143 proc->attached is true, call the_low_target.arch_setup.
4144 Otherwise, keep status pending, and return.
4145 (linux_resume_one_lwp_throw): Don't call get_pc if
4146 thread->while_stepping isn't NULL. Don't call
4147 get_thread_regcache if proc->tdesc is NULL.
4148 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4149 (linux_target_ops): Install arch_setup.
4150 * server.c (start_inferior): Call the_target->arch_setup.
4151 * target.h (struct target_ops) <arch_setup>: New field.
4152 (target_arch_setup): New marco.
4153 * lynx-low.c (lynx_target_ops): Update.
4154 * nto-low.c (nto_target_ops): Update.
4155 * spu-low.c (spu_target_ops): Update.
4156 * win32-low.c (win32_target_ops): Update.
4157
4158 2015-07-24 Yao Qi <yao.qi@linaro.org>
4159
4160 * linux-low.c (linux_add_process): Don't set
4161 proc->priv->new_inferior.
4162 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4163 (linux_attach): Likewise.
4164
4165 2015-07-24 Yao Qi <yao.qi@linaro.org>
4166
4167 * server.c (start_inferior): Code refactor.
4168
4169 2015-07-24 Yao Qi <yao.qi@linaro.org>
4170
4171 * server.c (process_serial_event): Set general_thread.
4172
4173 2015-07-21 Yao Qi <yao.qi@linaro.org>
4174
4175 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4176 aarch64_linux_get_debug_reg_capacity.
4177
4178 2015-07-17 Yao Qi <yao.qi@linaro.org>
4179
4180 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4181 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4182 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4183 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4184 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4185 (AARCH64_HWP_ALIGNMENT): Likewise.
4186 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4187 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4188 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4189 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4190 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4191 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4192 (struct aarch64_debug_reg_state): Likewise.
4193 (struct arch_lwp_info): Likewise.
4194 (aarch64_align_watchpoint): Likewise.
4195 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4196 (aarch64_watchpoint_length): Likewise.
4197 (aarch64_point_encode_ctrl_reg): Likewise
4198 (aarch64_point_is_aligned): Likewise.
4199 (aarch64_align_watchpoint): Likewise.
4200 (aarch64_linux_set_debug_regs):
4201 (aarch64_dr_state_insert_one_point): Likewise.
4202 (aarch64_dr_state_remove_one_point): Likewise.
4203 (aarch64_handle_breakpoint): Likewise.
4204 (aarch64_handle_aligned_watchpoint): Likewise.
4205 (aarch64_handle_unaligned_watchpoint): Likewise.
4206 (aarch64_handle_watchpoint): Likewise.
4207
4208 2015-07-17 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4211 and don't aarch64_get_debug_reg_state. All callers update.
4212 (aarch64_handle_aligned_watchpoint): Likewise.
4213 (aarch64_handle_unaligned_watchpoint): Likewise.
4214 (aarch64_handle_watchpoint): Likewise.
4215 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4216 (aarch64_remove_point): Likewise.
4217
4218 2015-07-17 Yao Qi <yao.qi@linaro.org>
4219
4220 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4221 debug_printf.
4222 (aarch64_handle_unaligned_watchpoint): Likewise.
4223
4224 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4225
4226 Revert the previous 3 commits:
4227 Move gdb_regex* to common/
4228 Move linux_find_memory_regions_full & co.
4229 gdbserver build-id attribute generator
4230
4231 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4232 Jan Kratochvil <jan.kratochvil@redhat.com>
4233
4234 gdbserver build-id attribute generator.
4235 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4236 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4237 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4238 (find_phdr): New.
4239 (get_dynamic): Use find_pdhr to traverse program headers.
4240 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4241 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4242 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4243 (get_hex_build_id): New.
4244 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4245 to reply XML document.
4246
4247 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4248 Jan Kratochvil <jan.kratochvil@redhat.com>
4249
4250 * target.c: Include target/target-utils.h and fcntl.h.
4251 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4252 (target_fileio_read_stralloc): New functions.
4253
4254 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4255
4256 * Makefile.in (OBS): Add gdb_regex.o.
4257 (gdb_regex.o): New.
4258 * config.in: Rebuilt.
4259 * configure: Rebuilt.
4260
4261 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4262 Jan Kratochvil <jan.kratochvil@redhat.com>
4263
4264 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4265 * Makefile.in (OBS): Add target-utils.o.
4266 (linux-maps.o, target-utils.o): New.
4267 * configure.srv (srv_linux_obj): Add linux-maps.o.
4268
4269 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4270
4271 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4272 function, return 1.
4273 (the_low_target): Install it.
4274
4275 2015-07-14 Pedro Alves <palves@redhat.com>
4276
4277 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4278 Instead, ignore ECHILD, and throw an error for other errnos.
4279
4280 2015-07-10 Pedro Alves <palves@redhat.com>
4281
4282 * event-loop.c (struct callback_event) <data>: Change type to
4283 gdb_client_data instance instead of gdb_client_data pointer.
4284 (append_callback_event): Adjust.
4285
4286 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4287
4288 * linux-aarch64-low.c: Add comments for each linux_target_ops
4289 method. Remove comments already covered in target_ops and
4290 linux_target_ops definitions.
4291 (the_low_target): Add comments for each unimplemented method.
4292
4293 2015-07-09 Yao Qi <yao.qi@linaro.org>
4294
4295 * linux-aarch64-low.c (aarch64_regmap): Remove.
4296 (aarch64_usrregs_info): Remove.
4297 (regs_info): Set field usrregs to NULL.
4298
4299 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4300
4301 * linux-low.c: Include "rsp-low.h"
4302 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4303 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4304 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4305 (handle_btrace_enable_pt): New.
4306 (handle_btrace_general_set): Support "pt".
4307 (handle_btrace_conf_general_set): Support "pt:size".
4308
4309 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4310
4311 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4312 Z_PACKET_SW_BP.
4313
4314 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4315
4316 * linux-aarch64-low.c: Remove comment about endianness.
4317 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4318 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4319 memcmp.
4320
4321 2015-06-24 Gary Benson <gbenson@redhat.com>
4322
4323 * linux-i386-ipa.c (stdint.h): Do not include.
4324 * lynx-i386-low.c (stdint.h): Likewise.
4325 * lynx-ppc-low.c (stdint.h): Likewise.
4326 * mem-break.c (stdint.h): Likewise.
4327 * thread-db.c (stdint.h): Likewise.
4328 * tracepoint.c (stdint.h): Likewise.
4329 * win32-low.c (stdint.h): Likewise.
4330
4331 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4332
4333 * server.c (write_qxfer_response): Update call to
4334 remote_escape_output.
4335
4336 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4337 Jan Kratochvil <jan.kratochvil@redhat.com>
4338
4339 Merge multiple hex conversions.
4340 * gdbreplay.c (tohex): Rename to 'fromhex'.
4341 (logchar): Use fromhex.
4342
4343 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4344
4345 * server.c (handle_qxfer_libraries): Set `version' attribute for
4346 <library-list>.
4347
4348 2015-06-10 Gary Benson <gbenson@redhat.com>
4349
4350 * target.h (struct target_ops) <multifs_open>: New field.
4351 <multifs_unlink>: Likewise.
4352 <multifs_readlink>: Likewise.
4353 * linux-low.c (nat/linux-namespaces.h): New include.
4354 (linux_target_ops): Initialize the_target->multifs_open,
4355 the_target->multifs_unlink and the_target->multifs_readlink.
4356 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4357 * hostio.c (hostio_fs_pid): New static variable.
4358 (hostio_handle_new_gdb_connection): New function.
4359 (handle_setfs): Likewise.
4360 (handle_open): Use the_target->multifs_open as appropriate.
4361 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4362 (handle_readlink): Use the_target->multifs_readlink as
4363 appropriate.
4364 (handle_vFile): Handle vFile:setfs packets.
4365 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4366 after target_handle_new_gdb_connection.
4367
4368 2015-06-10 Gary Benson <gbenson@redhat.com>
4369
4370 * configure.ac (AC_CHECK_FUNCS): Add setns.
4371 * config.in: Regenerate.
4372 * configure: Likewise.
4373 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4374 (linux-namespaces.o): New rule.
4375 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4376
4377 2015-06-09 Gary Benson <gbenson@redhat.com>
4378
4379 * hostio.c (handle_open): Process mode argument with
4380 fileio_to_host_mode.
4381
4382 2015-06-01 Yao Qi <yao.qi@linaro.org>
4383
4384 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4385 * linux-x86-low.c: Likewise.
4386
4387 2015-05-28 Don Breazeal <donb@codesourcery.com>
4388
4389 * linux-low.c (handle_extended_wait): Initialize
4390 thread_info.last_resume_kind for new fork children.
4391
4392 2015-05-15 Pedro Alves <palves@redhat.com>
4393
4394 * target.h (target_handle_new_gdb_connection): Rewrite using if
4395 wrapped in do/while.
4396
4397 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4398
4399 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4400 * configure, config.in: Regenerate.
4401 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4402 Declare typedef.
4403
4404 2015-05-12 Don Breazeal <donb@codesourcery.com>
4405
4406 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4407 PTRACE_EVENT_VFORK_DONE.
4408 (linux_low_ptrace_options, extended_event_reported): Add vfork
4409 events.
4410 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4411 and "vforkdone" for RSP 'T' Stop Reply Packet.
4412 * server.h (report_vfork_events): Declare
4413 global variable.
4414
4415 2015-05-12 Don Breazeal <donb@codesourcery.com>
4416
4417 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4418 (the_low_target) <new_fork>: Initialize new member.
4419 * linux-arm-low.c (arm_new_fork): New function.
4420 (the_low_target) <new_fork>: Initialize new member.
4421 * linux-low.c (handle_extended_wait): Call new target function
4422 new_fork.
4423 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4424 * linux-mips-low.c (mips_add_watchpoint): New function
4425 extracted from mips_insert_point.
4426 (the_low_target) <new_fork>: Initialize new member.
4427 (mips_linux_new_fork): New function.
4428 (mips_insert_point): Call mips_add_watchpoint.
4429 * linux-x86-low.c (x86_linux_new_fork): New function.
4430 (the_low_target) <new_fork>: Initialize new member.
4431
4432 2015-05-12 Don Breazeal <donb@codesourcery.com>
4433
4434 * linux-low.c (handle_extended_wait): Implement return value,
4435 rename argument 'event_child' to 'event_lwp', handle
4436 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4437 (linux_low_ptrace_options): New function.
4438 (linux_low_filter_event): Call linux_low_ptrace_options,
4439 use different argument fo linux_enable_event_reporting,
4440 use return value from handle_extended_wait.
4441 (extended_event_reported): New function.
4442 (linux_wait_1): Call extended_event_reported and set
4443 status to report fork events.
4444 (linux_write_memory): Add pid to debug message.
4445 (reset_lwp_ptrace_options_callback): New function.
4446 (linux_handle_new_gdb_connection): New function.
4447 (linux_target_ops): Initialize new structure member.
4448 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4449 * lynx-low.c: Initialize new structure member.
4450 * remote-utils.c (prepare_resume_reply): Implement stop reason
4451 "fork" for "T" stop message.
4452 * server.c (handle_query): Call handle_new_gdb_connection.
4453 * server.h (report_fork_events): Declare global flag.
4454 * target.h (struct target_ops) <handle_new_gdb_connection>:
4455 New member.
4456 (target_handle_new_gdb_connection): New macro.
4457 * win32-low.c: Initialize new structure member.
4458
4459 2015-05-12 Don Breazeal <donb@codesourcery.com>
4460
4461 * mem-break.c (APPEND_TO_LIST): Define macro.
4462 (clone_agent_expr): New function.
4463 (clone_one_breakpoint): New function.
4464 (clone_all_breakpoints): New function.
4465 * mem-break.h: Declare new functions.
4466
4467 2015-05-12 Don Breazeal <donb@codesourcery.com>
4468
4469 * linux-low.c (linux_supports_fork_events): New function.
4470 (linux_supports_vfork_events): New function.
4471 (linux_target_ops): Initialize new structure members.
4472 (initialize_low): Call linux_check_ptrace_features.
4473 * lynx-low.c (lynx_target_ops): Initialize new structure
4474 members.
4475 * server.c (report_fork_events, report_vfork_events):
4476 New global flags.
4477 (handle_query): Add new features to qSupported packet and
4478 response.
4479 (captured_main): Initialize new global variables.
4480 * target.h (struct target_ops) <supports_fork_events>:
4481 New member.
4482 <supports_vfork_events>: New member.
4483 (target_supports_fork_events): New macro.
4484 (target_supports_vfork_events): New macro.
4485 * win32-low.c (win32_target_ops): Initialize new structure
4486 members.
4487
4488 2015-05-12 Gary Benson <gbenson@redhat.com>
4489
4490 * server.c (handle_qxfer_exec_file): Use current process
4491 if annex is empty.
4492
4493 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4494
4495 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4496 Remove HAVE_PTRACE_GETREGS conditionals.
4497 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4498 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4499
4500 2015-05-08 Yao Qi <yao.qi@linaro.org>
4501
4502 * linux-low.c (linux_supports_conditional_breakpoints): New
4503 function.
4504 (linux_target_ops): Install new target method.
4505 * lynx-low.c (lynx_target_ops): Install NULL hook for
4506 supports_conditional_breakpoints.
4507 * nto-low.c (nto_target_ops): Likewise.
4508 * spu-low.c (spu_target_ops): Likewise.
4509 * win32-low.c (win32_target_ops): Likewise.
4510 * server.c (handle_query): Check
4511 target_supports_conditional_breakpoints.
4512 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4513 New field.
4514 (target_supports_conditional_breakpoints): New macro.
4515
4516 2015-05-06 Pedro Alves <palves@redhat.com>
4517
4518 PR server/18081
4519 * server.c (start_inferior): If the process exits, mourn it.
4520
4521 2015-04-21 Gary Benson <gbenson@redhat.com>
4522
4523 * hostio.c (fileio_open_flags_to_host): Factored out to
4524 fileio_to_host_openflags in common/fileio.c. Single use
4525 updated.
4526
4527 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4528
4529 * linux-xtensa-low.c (xtensa_fill_gregset)
4530 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4531 XCHAL_HAVE_LOOP.
4532
4533 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4534
4535 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4536 (regs_info): Replace usrregs pointer with NULL.
4537
4538 2015-04-17 Gary Benson <gbenson@redhat.com>
4539
4540 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4541 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4542 * server.c (handle_qxfer_exec_file): New function.
4543 (qxfer_packets): Add exec-file entry.
4544 (handle_query): Report qXfer:exec-file:read as supported packet.
4545
4546 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4547
4548 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4549
4550 2015-04-09 Gary Benson <gbenson@redhat.com>
4551
4552 * hostio-errno.c (errno_to_fileio_error): Remove function.
4553 Update caller to use remote_fileio_to_fio_error.
4554
4555 2015-04-09 Yao Qi <yao.qi@linaro.org>
4556
4557 * linux-low.c (linux_insert_point): Call
4558 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4559 (linux_remove_point): Call remove_memory_breakpoint if type is
4560 raw_bkpt_type_sw.
4561 * linux-x86-low.c (x86_insert_point): Don't call
4562 insert_memory_breakpoint.
4563 (x86_remove_point): Don't call remove_memory_breakpoint.
4564
4565 2015-04-01 Pedro Alves <palves@redhat.com>
4566 Cleber Rosa <crosa@redhat.com>
4567
4568 * server.c (gdbserver_usage): Reorganize and extend the usage
4569 message.
4570
4571 2015-03-24 Pedro Alves <palves@redhat.com>
4572
4573 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4574 output. Also dump TRAP_TRACE.
4575 (linux_low_filter_event): In debug output, distinguish a
4576 resume_stop SIGSTOP from a delayed SIGSTOP.
4577
4578 2015-03-24 Gary Benson <gbenson@redhat.com>
4579
4580 * linux-x86-low.c (x86_linux_new_thread): Moved to
4581 nat/x86-linux.c.
4582 (x86_linux_prepare_to_resume): Likewise.
4583
4584 2015-03-24 Gary Benson <gbenson@redhat.com>
4585
4586 * Makefile.in (x86-linux-dregs.o): New rule.
4587 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4588 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4589 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4590 (x86_linux_dr_get): Likewise.
4591 (x86_linux_dr_set): Likewise.
4592 (update_debug_registers_callback): Likewise.
4593 (x86_linux_dr_set_addr): Likewise.
4594 (x86_linux_dr_get_addr): Likewise.
4595 (x86_linux_dr_set_control): Likewise.
4596 (x86_linux_dr_get_control): Likewise.
4597 (x86_linux_dr_get_status): Likewise.
4598 (x86_linux_update_debug_registers): Likewise.
4599
4600 2015-03-24 Gary Benson <gbenson@redhat.com>
4601
4602 * linux-x86-low.c (x86_linux_update_debug_registers):
4603 New function, factored out from...
4604 (x86_linux_prepare_to_resume): ...this.
4605
4606 2015-03-24 Gary Benson <gbenson@redhat.com>
4607
4608 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4609 (x86_linux_dr_set): Likewise.
4610 (update_debug_registers_callback): Likewise.
4611 (x86_linux_dr_set_addr): Likewise.
4612 (x86_linux_dr_get_addr): Likewise.
4613 (x86_linux_dr_set_control): Likewise.
4614 (x86_linux_dr_get_control): Likewise.
4615 (x86_linux_dr_get_status): Likewise.
4616 (x86_linux_prepare_to_resume): Likewise.
4617
4618 2015-03-24 Gary Benson <gbenson@redhat.com>
4619
4620 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4621 Use perror_with_name. Pass string through gettext.
4622 (x86_linux_dr_set): Likewise.
4623
4624 2015-03-24 Gary Benson <gbenson@redhat.com>
4625
4626 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4627 (x86_linux_dr_set_addr): ...this.
4628 (x86_dr_low_get_addr): Rename to...
4629 (x86_linux_dr_get_addr): ...this.
4630 (x86_dr_low_set_control): Rename to...
4631 (x86_linux_dr_set_control): ...this.
4632 (x86_dr_low_get_control): Rename to...
4633 (x86_linux_dr_get_control): ...this.
4634 (x86_dr_low_get_status): Rename to...
4635 (x86_linux_dr_get_status): ...this.
4636 (x86_dr_low): Update with new function names.
4637
4638 2015-03-24 Gary Benson <gbenson@redhat.com>
4639
4640 * Makefile.in (x86-linux.o): New rule.
4641 * configure.srv: Add x86-linux.o to relevant targets.
4642 * linux-low.c (lwp_set_arch_private_info): New function.
4643 (lwp_arch_private_info): Likewise.
4644 * linux-x86-low.c: Include nat/x86-linux.h.
4645 (arch_lwp_info): Removed structure.
4646 (update_debug_registers_callback):
4647 Use lwp_set_debug_registers_changed.
4648 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4649 and lwp_set_debug_registers_changed.
4650 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4651
4652 2015-03-24 Gary Benson <gbenson@redhat.com>
4653
4654 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4655 * linux-arm-low.c (arm_new_thread): Likewise.
4656 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4657 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4658 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4659 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4660
4661 2015-03-24 Gary Benson <gbenson@redhat.com>
4662
4663 * linux-low.c (ptid_of_lwp): New function.
4664 (lwp_is_stopped): Likewise.
4665 (lwp_stop_reason): Likewise.
4666 * linux-x86-low.c (update_debug_registers_callback):
4667 Use lwp_is_stopped.
4668 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4669 lwp_stop_reason.
4670
4671 2015-03-24 Gary Benson <gbenson@redhat.com>
4672
4673 * linux-low.h (linux_stop_lwp): Remove declaration.
4674
4675 2015-03-24 Gary Benson <gbenson@redhat.com>
4676
4677 * linux-low.h: Include nat/linux-nat.h.
4678 * linux-low.c (iterate_over_lwps_args): New structure.
4679 (iterate_over_lwps_filter): New function.
4680 (iterate_over_lwps): Likewise.
4681 * linux-x86-low.c (update_debug_registers_callback):
4682 Update signature to what iterate_over_lwps expects.
4683 Remove PID check that iterate_over_lwps now performs.
4684 (x86_dr_low_set_addr): Use iterate_over_lwps.
4685 (x86_dr_low_set_control): Likewise.
4686
4687 2015-03-24 Gary Benson <gbenson@redhat.com>
4688
4689 * linux-x86-low.c (x86_debug_reg_state): New function.
4690 (x86_linux_prepare_to_resume): Use the above.
4691
4692 2015-03-24 Gary Benson <gbenson@redhat.com>
4693
4694 * linux-low.c (current_lwp_ptid): New function.
4695 * linux-x86-low.c: Include nat/linux-nat.h.
4696 (x86_dr_low_get_addr): Use current_lwp_ptid.
4697 (x86_dr_low_get_control): Likewise.
4698 (x86_dr_low_get_status): Likewise.
4699
4700 2015-03-20 Pedro Alves <palves@redhat.com>
4701
4702 * tracepoint.c (cmd_qtstatus): Make "str" const.
4703
4704 2015-03-20 Pedro Alves <palves@redhat.com>
4705
4706 * server.c (handle_general_set): Make "req_str" const.
4707
4708 2015-03-19 Pedro Alves <palves@redhat.com>
4709
4710 * linux-low.c (linux_resume_one_lwp): Rename to ...
4711 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4712 instead call perror_with_name.
4713 (check_ptrace_stopped_lwp_gone): New function.
4714 (linux_resume_one_lwp): Reimplement as wrapper around
4715 linux_resume_one_lwp_throw that swallows errors if the LWP is
4716 gone.
4717
4718 2015-03-19 Pedro Alves <palves@redhat.com>
4719
4720 * linux-low.c (count_events_callback, select_event_lwp_callback):
4721 No longer check whether the thread has resume_stop as last resume
4722 kind.
4723
4724 2015-03-19 Pedro Alves <palves@redhat.com>
4725
4726 * linux-low.c (count_events_callback, select_event_lwp_callback):
4727 Use the lwp's status_pending_p field, not the thread's.
4728
4729 2015-03-19 Pedro Alves <palves@redhat.com>
4730
4731 * linux-low.c (select_event_lwp_callback): Update comments to
4732 no longer mention SIGTRAP.
4733
4734 2015-03-18 Gary Benson <gbenson@redhat.com>
4735
4736 * server.c (handle_query): Do not report vFile:fstat as supported.
4737
4738 2015-03-11 Gary Benson <gbenson@redhat.com>
4739
4740 * hostio.c (sys/types.h): New include.
4741 (sys/stat.h): Likewise.
4742 (common-remote-fileio.h): Likewise.
4743 (handle_fstat): New function.
4744 (handle_vFile): Handle vFile:fstat packets.
4745
4746 2015-03-11 Gary Benson <gbenson@redhat.com>
4747
4748 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4749 struct stat.st_blocks and struct stat.st_blksize.
4750 * configure: Regenerate.
4751 * config.in: Likewise.
4752 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4753 (OBS): Add common-remote-fileio.o.
4754 (common-remote-fileio.o): New rule.
4755
4756 2015-03-09 Pedro Alves <palves@redhat.com>
4757
4758 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4759 'struct sockaddr' pointer in 'accept' call.
4760
4761 2015-03-09 Pedro Alves <palves@redhat.com>
4762
4763 Revert:
4764 2015-03-07 Pedro Alves <palves@redhat.com>
4765 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4766 or <winsock2.h> here. Instead include "gdb_socket.h".
4767 (remote_open): Use union gdb_sockaddr_u.
4768 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4769 or <winsock2.h> here. Instead include "gdb_socket.h".
4770 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4771 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4772 or <sys/un.h>.
4773 (init_named_socket, gdb_agent_helper_thread): Use union
4774 gdb_sockaddr_u.
4775
4776 2015-03-07 Pedro Alves <palves@redhat.com>
4777
4778 * configure.ac (build_warnings): Move
4779 -Wdeclaration-after-statement to the C-specific set.
4780 * configure: Regenerate.
4781
4782 2015-03-07 Pedro Alves <palves@redhat.com>
4783
4784 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4785 or <winsock2.h> here. Instead include "gdb_socket.h".
4786 (remote_open): Use union gdb_sockaddr_u.
4787 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4788 or <winsock2.h> here. Instead include "gdb_socket.h".
4789 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4790 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4791 or <sys/un.h>.
4792 (init_named_socket, gdb_agent_helper_thread): Use union
4793 gdb_sockaddr_u.
4794
4795 2015-03-07 Pedro Alves <palves@redhat.com>
4796
4797 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4798 instead.
4799
4800 2015-03-06 Yao Qi <yao.qi@linaro.org>
4801
4802 * linux-aarch64-low.c (aarch64_insert_point): Use
4803 show_debug_regs as a boolean.
4804 (aarch64_remove_point): Likewise.
4805
4806 2015-03-05 Pedro Alves <palves@redhat.com>
4807
4808 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4809 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4810 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4811 * nto-low.c (nto_target_ops): Likewise.
4812 * spu-low.c (spu_target_ops): Likewise.
4813 * win32-low.c (win32_target_ops): Likewise.
4814
4815 2015-03-04 Pedro Alves <palves@redhat.com>
4816
4817 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4818 Decide whether a breakpoint triggered based on the SIGTRAP's
4819 siginfo.si_code.
4820 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4821 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4822 (linux_low_filter_event): Check for breakpoints before checking
4823 watchpoints.
4824 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4825 siginfo.si_code.
4826 (linux_stopped_by_sw_breakpoint)
4827 (linux_supports_stopped_by_sw_breakpoint)
4828 (linux_stopped_by_hw_breakpoint)
4829 (linux_supports_stopped_by_hw_breakpoint): New functions.
4830 (linux_target_ops): Install new target methods.
4831
4832 2015-03-04 Pedro Alves <palves@redhat.com>
4833
4834 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4835 * server.c (swbreak_feature, hwbreak_feature): New globals.
4836 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4837 (captured_main): Clear swbreak_feature and hwbreak_feature.
4838 * server.h (swbreak_feature, hwbreak_feature): Declare.
4839 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4840 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4841 supports_stopped_by_hw_breakpoint>: New fields.
4842 (target_supports_stopped_by_sw_breakpoint)
4843 (target_stopped_by_sw_breakpoint)
4844 (target_supports_stopped_by_hw_breakpoint)
4845 (target_stopped_by_hw_breakpoint): Declare.
4846
4847 2015-03-04 Pedro Alves <palves@redhat.com>
4848
4849 enum lwp_stop_reason -> enum target_stop_reason
4850 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4851 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4852 (linux_wait_1, stuck_in_jump_pad_callback)
4853 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4854 (linux_stopped_by_watchpoint):
4855 * linux-low.h (enum lwp_stop_reason): Delete.
4856 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4857 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4858
4859 2015-03-04 Yao Qi <yao.qi@linaro.org>
4860
4861 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4862
4863 2015-03-03 Gary Benson <gbenson@redhat.com>
4864
4865 * hostio.c (handle_vFile): Fix prefix lengths.
4866
4867 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4868
4869 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4870 ptr_bits.
4871
4872 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4873
4874 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4875 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4876 (clean): Add "rm -f" for above C files.
4877 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4878 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4879 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4880 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4881 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4882 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4883 (init_registers_s390x_vx_linux64)
4884 (init_registers_s390x_tevx_linux64)
4885 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4886 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4887 declarations.
4888 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4889 (s390_store_vxrs_high): New functions.
4890 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4891 NT_S390_VXRS_HIGH.
4892 (s390_arch_setup): Add logic for selecting one of the new target
4893 descriptions. Activate the new vector regsets if applicable.
4894 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4895 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4896 and init_registers_s390x_tevx_linux64.
4897
4898 2015-03-01 Pedro Alves <palves@redhat.com>
4899
4900 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4901 parameter.
4902
4903 2015-02-27 Pedro Alves <palves@redhat.com>
4904
4905 * linux-x86-low.c (u_debugreg_offset): New function.
4906 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4907
4908 2015-02-27 Pedro Alves <palves@redhat.com>
4909
4910 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4911 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4912 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4913 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4914 (ps_lsetfpregs, ps_getpid)
4915 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4916 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4917 (ps_lsetxregs, ps_plog): Declare.
4918
4919 2015-02-27 Pedro Alves <palves@redhat.com>
4920
4921 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4922 IP_AGENT_EXPORT_FUNC.
4923 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4924 IP_AGENT_EXPORT_FUNC.
4925 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4926 (IP_AGENT_EXPORT): Delete.
4927 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4928 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4929 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4930 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4931 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4932 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4933 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4934 (traceframe_read_count, traceframe_write_count)
4935 (traceframes_created, trace_state_variables, get_raw_reg)
4936 (get_trace_state_variable_value, set_trace_state_variable_value)
4937 (ust_loaded, helper_thread_id, cmd_buf): Use
4938 IPA_SYM_EXPORTED_NAME.
4939 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4940 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4941 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4942 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4943 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4944 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4945 EXTERN_C_PUSH/EXTERN_C_POP.
4946 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4947 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4948 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4949 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4950 (traceframe_write_count, traceframe_read_count)
4951 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4952 (about_to_request_buffer_space, get_trace_state_variable_value)
4953 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4954 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4955 EXTERN_C_PUSH/EXTERN_C_POP.
4956 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4957 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4958 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4959 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4960 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4961 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4962 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4963 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4964 Define.
4965 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4966 (IP_AGENT_EXPORT_VAR_DECL): Define.
4967 (tracing): Declare.
4968 (gdb_agent_get_raw_reg): Declare.
4969
4970 2015-02-27 Tom Tromey <tromey@redhat.com>
4971 Pedro Alves <palves@redhat.com>
4972
4973 Rename symbols whose names are reserved C++ keywords throughout.
4974
4975 2015-02-27 Pedro Alves <palves@redhat.com>
4976
4977 * Makefile.in (COMPILER): New, get it from autoconf.
4978 (CXX): Get from autoconf instead.
4979 (COMPILE.pre): Use COMPILER.
4980 (CC-LD): Rename to ...
4981 (CC_LD): ... this. Use COMPILER.
4982 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4983 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4984 * acinclude.m4: Include build-with-cxx.m4.
4985 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4986 Disable -Werror by default if building in C++ mode.
4987 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4988 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4989 the C++ compiler. Save/restore CXXFLAGS too.
4990 * configure: Regenerate.
4991
4992 2015-02-27 Pedro Alves <palves@redhat.com>
4993
4994 * acinclude.m4: Include libiberty.m4.
4995 * configure.ac: Call libiberty_INIT.
4996 * config.in, configure: Regenerate.
4997
4998 2015-02-26 Pedro Alves <palves@redhat.com>
4999
5000 * linux-low.c (linux_wait_1): When incrementing the PC past a
5001 program breakpoint always use the_low_target.breakpoint_len as
5002 increment, rather than the maximum between that and
5003 the_low_target.decr_pc_after_break.
5004
5005 2015-02-23 Pedro Alves <palves@redhat.com>
5006
5007 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5008 thread was doing a step-over; always adjust the PC if
5009 we stepped over a permanent breakpoint.
5010 (linux_wait_1): If we stepped over breakpoint that was on top of a
5011 permanent breakpoint, manually advance the PC past it.
5012
5013 2015-02-23 Pedro Alves <palves@redhat.com>
5014
5015 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5016 modes.
5017 (x86_fill_gregset, x86_store_gregset): Use it when handling
5018 $orig_eax.
5019
5020 2015-02-20 Pedro Alves <palves@redhat.com>
5021
5022 * thread-db.c: Include "nat/linux-procfs.h".
5023 (thread_db_init): Skip listing new threads if the kernel supports
5024 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5025
5026 2015-02-20 Pedro Alves <palves@redhat.com>
5027
5028 * linux-low.c (status_pending_p_callback): Use ptid_match.
5029
5030 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5031
5032 PR breakpoints/16812
5033 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5034 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5035 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5036
5037 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5038
5039 PR breakpoints/15956
5040 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5041
5042 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5043
5044 * linux-low.c (linux_low_btrace_conf): Print size.
5045 * server.c (handle_btrace_conf_general_set): New.
5046 (hanle_general_set): Call handle_btrace_conf_general_set.
5047 (handle_query): Report Qbtrace-conf:bts:size as supported.
5048
5049 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5050
5051 * linux-low.c (linux_low_enable_btrace): Update parameters.
5052 (linux_low_btrace_conf): New.
5053 (linux_target_ops)<to_btrace_conf>: Initialize.
5054 * server.c (current_btrace_conf): New.
5055 (handle_btrace_enable): Rename to ...
5056 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5057 to target_enable_btrace. Update comment. Update users.
5058 (handle_qxfer_btrace_conf): New.
5059 (qxfer_packets): Add btrace-conf entry.
5060 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5061 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5062 (target_ops)<read_btrace_conf>: New.
5063 (target_enable_btrace): Update parameters.
5064 (target_read_btrace_conf): New.
5065
5066 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5067
5068 * server.c (handle_btrace_general_set): Remove call to
5069 target_supports_btrace.
5070 (supported_btrace_packets): New.
5071 (handle_query): Call supported_btrace_packets.
5072 * target.h: include btrace-common.h.
5073 (btrace_target_info): Removed.
5074 (supports_btrace, target_supports_btrace): Update parameters.
5075
5076 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5077
5078 * Makefile.in (SFILES): Add common/btrace-common.c.
5079 (OBS): Add common/btrace-common.o.
5080 (btrace-common.o): Add build rules.
5081 * linux-low: Include btrace-common.h.
5082 (linux_low_read_btrace): Use struct btrace_data. Call
5083 btrace_data_init and btrace_data_fini.
5084
5085 2015-02-06 Pedro Alves <palves@redhat.com>
5086
5087 * thread-db.c (find_new_threads_callback): Add debug output.
5088
5089 2015-02-04 Pedro Alves <palves@redhat.com>
5090
5091 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5092 (resume_stopped_resumed_lwps): New function.
5093 (linux_wait_for_event_filtered): Use it.
5094
5095 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5096
5097 * Makefile.in (SFILES): Add linux-personality.c.
5098 (linux-personality.o): New rule.
5099 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5100 list of objects to be built.
5101 * linux-low.c: Include nat/linux-personality.h.
5102 (linux_create_inferior): Remove code to disable address space
5103 randomization (moved to ../nat/linux-personality.c). Create
5104 cleanup to disable address space randomization.
5105
5106 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5107
5108 * Makefile.in (posix-strerror.o): New rule.
5109 (mingw-strerror.o): Likewise.
5110 * configure: Regenerated.
5111 * configure.ac: Source file ../common/common.host. Initialize new
5112 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5113
5114 2015-01-14 Yao Qi <yao@codesourcery.com>
5115
5116 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5117 (ppc-linux.o): New rule.
5118 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5119 * configure.ac: AC_CHECK_FUNCS(getauxval).
5120 * config.in: Re-generated.
5121 * configure: Re-generated.
5122 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5123 ppc64_64bit_inferior_p
5124
5125 2015-01-14 Yao Qi <yao@codesourcery.com>
5126
5127 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5128 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5129 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5130 (PT_ORIG_R3, PT_TRAP): Likewise.
5131 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5132 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5133 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5134
5135 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5136
5137 * i387-fp.c (i387_cache_to_xsave): In look over
5138 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5139 zmmh_low_space field by use of zmmh_high_space.
5140
5141 2015-01-09 Pedro Alves <palves@redhat.com>
5142
5143 * linux-low.c (step_over_bkpt): Move higher up in the file.
5144 (handle_extended_wait): Don't store the stop_pc here.
5145 (get_stop_pc): Adjust comments and rename to ...
5146 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5147 stopped for a software breakpoint or hardware breakpoint.
5148 (thread_still_has_status_pending_p): New function.
5149 (status_pending_p_callback): Use
5150 thread_still_has_status_pending_p. If the event is no longer
5151 interesting, resume the LWP.
5152 (handle_tracepoints): Add assert.
5153 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5154 (wstatus_maybe_breakpoint): New function.
5155 (cancel_breakpoint): Delete function.
5156 (check_stopped_by_watchpoint): New function, factored out from
5157 linux_low_filter_event.
5158 (lp_status_maybe_breakpoint): Delete function.
5159 (linux_low_filter_event): Remove filter_ptid argument.
5160 Leave thread group exits pending here. Store the LWP's stop PC.
5161 Always leave events pending.
5162 (linux_wait_for_event_filtered): Pull all events out of the
5163 kernel, and leave them all pending.
5164 (count_events_callback, select_event_lwp_callback): Consider all
5165 events.
5166 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5167 (select_event_lwp): Only give preference to the stepping LWP in
5168 all-stop mode. Adjust comments.
5169 (ignore_event): New function.
5170 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5171 references to cancel_breakpoints. Adjust to renames. Also give
5172 equal priority to all LWPs that have had events in non-stop mode.
5173 If reporting a software breakpoint event, unadjust the LWP's PC.
5174 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5175 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5176 Adjust.
5177 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5178 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5179 (linux_stopped_by_watchpoint): Adjust.
5180 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5181 * linux-low.h (enum lwp_stop_reason): New.
5182 (struct lwp_info) <stop_pc>: Adjust comment.
5183 <stopped_by_watchpoint>: Delete field.
5184 <stop_reason>: New field.
5185 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5186 * mem-break.c (software_breakpoint_inserted_here)
5187 (hardware_breakpoint_inserted_here): New function.
5188 * mem-break.h (software_breakpoint_inserted_here)
5189 (hardware_breakpoint_inserted_here): Declare.
5190 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5191 (cancel_breakpoints): Delete.
5192 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5193 (upload_fast_traceframes): Remove references to
5194 cancel_breakpoints.
5195
5196 2015-01-09 Pedro Alves <palves@redhat.com>
5197
5198 * thread-db.c (find_new_threads_callback): Ignore thread if the
5199 kernel thread ID is -1.
5200
5201 2015-01-09 Pedro Alves <palves@redhat.com>
5202
5203 * linux-low.c (linux_attach_fail_reason_string): Move to
5204 nat/linux-ptrace.c, and rename.
5205 (linux_attach_lwp): Update comment.
5206 (attach_proc_task_lwp_callback): New function.
5207 (linux_attach): Adjust to rename and use
5208 linux_proc_attach_tgid_threads.
5209 (linux_attach_fail_reason_string): Delete declaration.
5210
5211 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5212
5213 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5214 * server.c (gdbserver_version): Likewise.
5215
5216 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5217
5218 * remote-utils.c: Include ctype.h.
5219 (input_interrupt): Explicitly handle the case when the char
5220 received is the NUL byte. Improve the printing of non-ASCII
5221 characters.
5222
5223 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5224
5225 * linux-low.c (linux_low_filter_event): Update call to
5226 linux_enable_event_reporting following the addition of
5227 a new parameter to that function.
5228
5229 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5230
5231 PR server/17457
5232 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5233 (AARCH64_FPCR_REGNO): Likewise.
5234 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5235 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5236 (aarch64_store_fpregset): Likewise.
5237
5238 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5239
5240 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5241 Remove FIXME comment about assumption about N.
5242
5243 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5244
5245 * configure.ac: If large-file support is disabled in GDBserver,
5246 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5247 * configure: Regenerate.
5248
5249 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5250
5251 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5252 warning upon ENODATA from ptrace.
5253 * linux-s390-low.c (s390_store_tdb): New.
5254 (s390_regsets): Add regset for NT_S390_TDB.
5255
5256 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5257
5258 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5259 without a fill_function.
5260 * linux-s390-low.c (s390_fill_last_break): Remove.
5261 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5262 (s390_arch_setup): Use regset's size instead of fill_function for
5263 loop end condition.
5264
5265 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5266
5267 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5268 the regset's store function when ptrace returned an error.
5269 * regcache.c (get_thread_regcache): Invalidate register cache
5270 before fetching inferior's registers.
5271
5272 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5273
5274 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5275 while-loop as for-loop.
5276 (regsets_store_inferior_registers): Likewise.
5277
5278 2014-11-28 Yao Qi <yao@codesourcery.com>
5279
5280 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5281 * config.in, configure: Re-generate.
5282 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5283 is defined.
5284
5285 2014-11-21 Yao Qi <yao@codesourcery.com>
5286
5287 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5288 (AC_CHECK_HEADERS): Remove malloc.h.
5289 * configure: Re-generated.
5290 * config.in: Re-generated.
5291 * server.h: Don't include alloca.h and malloc.h.
5292 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5293 Don't include malloc.h.
5294
5295 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5296
5297 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5298 corresponding ERRNO check in same block.
5299
5300 2014-11-12 Pedro Alves <palves@redhat.com>
5301
5302 * server.c (cont_thread): Update comment.
5303 (start_inferior, attach_inferior): No longer clear cont_thread.
5304 (handle_v_cont): No longer set cont_thread.
5305 (captured_main): Clear cont_thread each time a GDB connects.
5306
5307 2014-11-12 Pedro Alves <palves@redhat.com>
5308
5309 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5310 thread, and don't resume all threads if the Hc thread has exited.
5311
5312 2014-11-12 Pedro Alves <palves@redhat.com>
5313
5314 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5315 the process group instead of to a specific LWP.
5316
5317 2014-10-15 Pedro Alves <palves@redhat.com>
5318
5319 PR server/17487
5320 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5321 parameter.
5322 (arm_set_thread_context): Delete.
5323 (the_low_target): Adjust.
5324 * win32-i386-low.c (debug_registers_changed)
5325 (debug_registers_used): Delete.
5326 (update_debug_registers_callback): New function.
5327 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5328 needing to update their debug registers.
5329 (win32_get_current_dr): New function.
5330 (x86_dr_low_get_addr, x86_dr_low_get_control)
5331 (x86_dr_low_get_status): Fetch the debug register from the thread
5332 record's context.
5333 (i386_initial_stuff): Adjust.
5334 (i386_get_thread_context): Remove current_event parameter. Don't
5335 clear debug_registers_changed nor copy DR values to
5336 debug_reg_state.
5337 (i386_set_thread_context): Delete.
5338 (i386_prepare_to_resume): New function.
5339 (i386_thread_added): Mark the thread as needing to update irs
5340 debug registers.
5341 (the_low_target): Remove i386_set_thread_context and install
5342 i386_prepare_to_resume.
5343 * win32-low.c (win32_get_thread_context): Adjust.
5344 (win32_set_thread_context): Use SetThreadContext
5345 directly.
5346 (win32_prepare_to_resume): New function.
5347 (win32_require_context): New function, factored out from ...
5348 (thread_rec): ... this.
5349 (continue_one_thread): Call win32_prepare_to_resume on each thread
5350 we're about to continue.
5351 (win32_resume): Call win32_prepare_to_resume on the event thread.
5352 * win32-low.h (struct win32_thread_info)
5353 <debug_registers_changed>: New field.
5354 (struct win32_target_ops): Change prototype of set_thread_context,
5355 delete set_thread_context and add prepare_to_resume.
5356 (win32_require_context): New declaration.
5357
5358 2014-10-08 Gary Benson <gbenson@redhat.com>
5359
5360 * server.h: Do not include common-exceptions.h.
5361
5362 2014-10-08 Gary Benson <gbenson@redhat.com>
5363
5364 * server.h: Do not include cleanups.h.
5365
5366 2014-09-30 James Hogan <james.hogan@imgtec.com>
5367
5368 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5369 mips64-dsp-linux.c.
5370
5371 2014-09-23 Yao Qi <yao@codesourcery.com>
5372
5373 * linux-low.c (lp_status_maybe_breakpoint): New function.
5374 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5375 (count_events_callback): Likewise.
5376 (select_event_lwp_callback): Likewise.
5377 (cancel_breakpoints_callback): Likewise.
5378
5379 2014-09-19 Don Breazeal <donb@codesourcery.com>
5380
5381 * linux-low.c (handle_extended_wait): Call
5382 linux_ptrace_get_extended_event.
5383 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5384 linux_is_extended_waitstatus.
5385
5386 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5387
5388 * Makefile.in (CPPFLAGS): Define.
5389 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5390 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5391
5392 2014-09-16 Gary Benson <gbenson@redhat.com>
5393
5394 * inferiors.h (current_inferior): Renamed as...
5395 (current_thread): New variable. All uses updated.
5396 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5397 (maybe_move_out_of_jump_pad): Likewise.
5398 (cancel_breakpoint): Likewise.
5399 (linux_low_filter_event): Likewise.
5400 (wait_for_sigstop): Likewise.
5401 (linux_resume_one_lwp): Likewise.
5402 (need_step_over_p): Likewise.
5403 (start_step_over): Likewise.
5404 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5405 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5406 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5407 and save_inferior as saved_thread.
5408 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5409 saved_thread.
5410 (regcache_invalidate_thread): Likewise.
5411 * remote-utils.c (prepare_resume_reply): Likewise.
5412 * thread-db.c (thread_db_get_tls_address): Likewise.
5413 (disable_thread_event_reporting): Likewise.
5414 (remove_thread_event_breakpoints): Likewise.
5415 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5416 as saved_thread.
5417 * target.h (set_desired_inferior): Renamed as...
5418 (set_desired_thread): New declaration. All uses updated.
5419 * server.c (myresume): Updated comment to reference thread instead
5420 of inferior.
5421 (handle_serial_event): Likewise.
5422 (handle_target_event): Likewise.
5423
5424 2014-09-12 Tom Tromey <tromey@redhat.com>
5425 Gary Benson <gbenson@redhat.com>
5426
5427 * regcache.h: Include common-regcache.h.
5428 (regcache_read_pc): Don't declare.
5429 * regcache.c (get_thread_regcache_for_ptid): New function.
5430
5431 2014-09-11 Tom Tromey <tromey@redhat.com>
5432 Gary Benson <gbenson@redhat.com>
5433
5434 * symbol.c: New file.
5435 * Makefile.in (SFILES): Add symbol.c.
5436 (OBS): Add symbol.o.
5437
5438 2014-09-11 Gary Benson <gbenson@redhat.com>
5439
5440 * target.c (target_stop_ptid, target_continue_ptid): New
5441 functions.
5442
5443 2014-09-11 Tom Tromey <tromey@redhat.com>
5444 Gary Benson <gbenson@redhat.com>
5445
5446 * target.h: Include target/target.h.
5447 * target.c (target_read_memory, target_read_uint32)
5448 (target_write_memory): New functions.
5449
5450 2014-09-11 Gary Benson <gbenson@redhat.com>
5451
5452 * server.h (debug_hw_points): Don't declare.
5453 * server.c (debug_hw_points): Don't define. Replace all uses
5454 with show_debug_regs.
5455 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5456 all uses with show_debug_regs.
5457
5458 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5459
5460 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5461 endianness into account.
5462 (ppc_supply_ptrace_register): Likewise.
5463
5464 2014-09-03 James Hogan <james.hogan@imgtec.com>
5465
5466 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5467 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5468
5469 2014-09-03 Gary Benson <gbenson@redhat.com>
5470
5471 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5472 ALL_DEBUG_ADDRESS_REGISTERS.
5473
5474 2014-09-02 Gary Benson <gbenson@redhat.com>
5475
5476 * i386-low.h: Renamed as...
5477 * x86-low.h: New file. All type, function and variable name
5478 prefixes changed from "i386_" to "x86_". All references updated.
5479 * i386-low.c: Renamed as...
5480 * x86-low.c: New file. All type, function and variable name
5481 prefixes changed from "i386_" to "x86_". All references updated.
5482
5483 2014-09-02 Gary Benson <gbenson@redhat.com>
5484
5485 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5486 (x86_linux_new_thread): Likewise.
5487
5488 2014-08-29 Gary Benson <gbenson@redhat.com>
5489
5490 * server.h (setjmp.h): Do not include.
5491 (toplevel): Do not declare.
5492 (common-exceptions.h): Include.
5493 (cleanups.h): Likewise.
5494 * server.c (toplevel): Do not define.
5495 (exit_code): New static global.
5496 (detach_or_kill_for_exit_cleanup): New function.
5497 (main): New function. Original main renamed to...
5498 (captured_main): New function.
5499 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5500
5501 2014-08-29 Gary Benson <gbenson@redhat.com>
5502
5503 * Makefile.in (SFILES): Add common/common-exceptions.c.
5504 (OBS): Add common-exceptions.o.
5505 (common-exceptions.o): New rule.
5506 * utils.c (prepare_to_throw_exception): New function.
5507
5508 2014-08-29 Gary Benson <gbenson@redhat.com>
5509
5510 * config.in: Regenerate.
5511 * configure: Likewise.
5512
5513 2014-08-29 Gary Benson <gbenson@redhat.com>
5514
5515 * Makefile.in (SFILES): Add common/cleanups.c.
5516 (OBS): cleanups.o.
5517 (cleanups.o): New rule.
5518
5519 2014-08-29 Gary Benson <gbenson@redhat.com>
5520
5521 * utils.c (internal_vwarning): New function.
5522
5523 2014-08-28 Gary Benson <gbenson@redhat.com>
5524
5525 * utils.h (fatal): Remove declaration.
5526 * utils.c (fatal): Remove function.
5527
5528 2014-08-28 Gary Benson <gbenson@redhat.com>
5529
5530 * tracepoint.c (gdb_agent_init): Replace fatal with
5531 perror_with_name.
5532 (initialize_tracepoint): Likewise.
5533
5534 2014-08-28 Gary Benson <gbenson@redhat.com>
5535
5536 * remote-utils.c (remote_prepare): Replace fatal with error.
5537
5538 2014-08-28 Gary Benson <gbenson@redhat.com>
5539
5540 * linux-low.c (linux_async): Replace fatal with warning.
5541 Tidy up and return.
5542 (linux_start_non_stop): Return -1 if linux_async failed.
5543
5544 2014-08-28 Gary Benson <gbenson@redhat.com>
5545
5546 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5547 gdb_assert.
5548 (i386_dr_low_get_addr): Remove vague comment.
5549 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5550 gdb_assert.
5551
5552 2014-08-28 Gary Benson <gbenson@redhat.com>
5553
5554 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5555 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5556 internal_error.
5557 (linux_resume_one_lwp): Likewise.
5558 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5559 gdb_assert.
5560 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5561 with internal_error.
5562 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5563 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5564 (find_register_by_name): Replace fatal with internal_error.
5565 (find_regno): Likewise.
5566 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5567 * thread-db.c (thread_db_create_event): Likewise.
5568 (thread_db_load_search): Likewise.
5569 (try_thread_db_load_1): Likewise.
5570 * tracepoint.c (get_jump_space_head): Replace fatal with
5571 internal_error.
5572 (claim_trampoline_space): Likewise.
5573 (have_fast_tracepoint_trampoline_buffer): Likewise.
5574 (cmd_qtstart): Likewise.
5575 (stop_tracing): Likewise.
5576 (fast_tracepoint_collecting): Likewise.
5577 (target_malloc): Likewise.
5578 (download_tracepoint): Likewise.
5579 (download_trace_state_variables): Replace check with gdb_assert.
5580 (upload_fast_traceframes): Replace fatal with internal_error.
5581
5582 2014-08-19 Tom Tromey <tromey@redhat.com>
5583 Gary Benson <gbenson@redhat.com>
5584
5585 * Makefile.in (SFILES): Add common/common-debug.c.
5586 (OBS): Add common-debug.o.
5587 (common-debug.o): New rule.
5588 * debug.h (debug_printf): Don't declare.
5589 * debug.c (debug_printf): Renamed and rewritten as...
5590 (debug_vprintf): New function.
5591
5592 2014-08-19 Gary Benson <gbenson@redhat.com>
5593
5594 * utils.h: Do not include print-utils.h.
5595
5596 2014-08-19 Tom Tromey <tromey@redhat.com>
5597 Gary Benson <gbenson@redhat.com>
5598
5599 * server.h: Add static assertion.
5600 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5601
5602 2014-08-19 Tom Tromey <tromey@redhat.com>
5603 Gary Benson <gbenson@redhat.com>
5604
5605 * Makefile.in (SFILES): Add common/errors.c.
5606 (OBS): Add errors.o.
5607 (IPA_OBS): Add errors-ipa.o.
5608 (errors.o): New rule.
5609 (errors-ipa.o): Likewise.
5610 * utils.h (perror_with_name, error, warning): Don't declare.
5611 * utils.c (warning): Renamed and rewritten as...
5612 (vwarning): New function.
5613 (error): Renamed and rewritten as...
5614 (verror): New function.
5615 (internal_error): Renamed and rewritten as...
5616 (internal_verror): New function.
5617
5618 2014-08-07 Gary Benson <gbenson@redhat.com>
5619
5620 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5621 * configure: Regenerate.
5622 * config.in: Likewise.
5623 * server.h: Do not include errno.h.
5624 * event-loop.c: Likewise.
5625 * hostio-errno.c: Likewise.
5626 * linux-low.c: Likewise.
5627 * remote-utils.c: Likewise.
5628 * spu-low.c: Likewise.
5629 * utils.c: Likewise.
5630 * gdbreplay.c: Unconditionally include errno.h.
5631
5632 2014-08-07 Gary Benson <gbenson@redhat.com>
5633
5634 * server.h: Do not include string.h.
5635 * event-loop.c: Likewise.
5636 * linux-low.c: Likewise.
5637 * regcache.c: Likewise.
5638 * remote-utils.c: Likewise.
5639 * spu-low.c: Likewise.
5640 * utils.c: Likewise.
5641
5642 2014-08-07 Gary Benson <gbenson@redhat.com>
5643
5644 * server.h: Do not include gdb_assert.h.
5645
5646 2014-08-07 Gary Benson <gbenson@redhat.com>
5647
5648 * server.h: Do not include common-utils.h.
5649
5650 2014-08-07 Gary Benson <gbenson@redhat.com>
5651
5652 * server.h: Do not include ptid.h.
5653 * notif.h: Likewise.
5654
5655 2014-08-07 Gary Benson <gbenson@redhat.com>
5656
5657 * server.h: Do not include gdb_locale.h.
5658
5659 2014-08-07 Gary Benson <gbenson@redhat.com>
5660
5661 * server.h: Do not include gdb/signals.h.
5662 * win32-low.c: Likewise.
5663
5664 2014-08-07 Gary Benson <gbenson@redhat.com>
5665
5666 * server.h: Do not include pathmax.h.
5667
5668 2014-08-07 Gary Benson <gbenson@redhat.com>
5669
5670 * server.h: Do not include libiberty.h.
5671 * linux-bfin-low.c: Likewise.
5672
5673 2014-08-07 Gary Benson <gbenson@redhat.com>
5674
5675 * server.h: Do not include ansidecl.h.
5676
5677 2014-08-07 Gary Benson <gbenson@redhat.com>
5678
5679 * linux-x86-low.c: Do not include stddef.h.
5680 * lynx-ppc-low.c: Likewise.
5681 * tracepoint.c: Likewise.
5682
5683 2014-08-07 Gary Benson <gbenson@redhat.com>
5684
5685 * server.h: Do not include stdarg.h.
5686 * nto-low.c: Likewise.
5687
5688 2014-08-07 Gary Benson <gbenson@redhat.com>
5689
5690 * server.h: Do not include stdlib.h.
5691 * inferiors.c: Likewise.
5692 * linux-low.c: Likewise.
5693 * regcache.c: Likewise.
5694 * spu-low.c: Likewise.
5695 * tracepoint.c: Likewise.
5696 * utils.c: Likewise.
5697
5698 2014-08-07 Gary Benson <gbenson@redhat.com>
5699
5700 * server.h: Do not include stdio.h.
5701 * linux-low.c: Likewise.
5702 * remote-utils.c: Likewise.
5703 * spu-low.c: Likewise.
5704 * utils.c: Likewise.
5705 * wincecompat.c: Likewise.
5706
5707 2014-08-06 Gary Benson <gbenson@redhat.com>
5708
5709 * regcache.c (init_register_cache): Move conditionals inside if.
5710
5711 2014-08-06 Gary Benson <gbenson@redhat.com>
5712
5713 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5714
5715 2014-07-31 Gary Benson <gbenson@redhat.com>
5716
5717 * ax.h: Do not include server.h.
5718 * gdbthread.h: Likewise.
5719 * lynx-low.h: Likewise.
5720 * notif.h: Likewise.
5721
5722 2014-07-30 Gary Benson <gbenson@redhat.com>
5723
5724 * server.h: Include common-defs.h.
5725 Do not include config.h or build-gnulib-gdbserver/config.h.
5726
5727 2014-07-30 Gary Benson <gbenson@redhat.com>
5728
5729 * hostio-errno.c: Move server.h to top of includes list.
5730 * inferiors.c: Likewise.
5731 * linux-x86-low.c: Likewise.
5732 * notif.c: Include server.h.
5733
5734 2014-07-24 Tom Tromey <tromey@redhat.com>
5735 Gary Benson <gbenson@redhat.com>
5736
5737 * server.h (CORE_ADDR): Now unsigned.
5738
5739 2014-07-16 Pedro Alves <palves@redhat.com>
5740
5741 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5742
5743 2014-07-15 Pedro Alves <palves@redhat.com>
5744
5745 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5746 copy.
5747
5748 2014-07-11 Pedro Alves <palves@redhat.com>
5749
5750 * linux-low.c (kill_wait_lwp): New function, based on
5751 kill_one_lwp_callback, but use my_waitpid directly.
5752 (kill_one_lwp_callback, linux_kill): Use it.
5753
5754 2014-06-23 Pedro Alves <palves@redhat.com>
5755
5756 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5757 before setting DR0..DR3.
5758
5759 2014-06-20 Gary Benson <gbenson@redhat.com>
5760
5761 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5762 * configure: Regenerated.
5763 * config.in: Likewise.
5764
5765 2014-06-20 Gary Benson <gbenson@redhat.com>
5766
5767 * Makefile.in (SFILES): Update locations for files moved
5768 from common to nat.
5769 (object file files): Reordered.
5770
5771 2014-06-20 Gary Benson <gbenson@redhat.com>
5772
5773 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5774 (i386_dr_low_set_addr): Likewise.
5775 (i386_dr_low_get_addr): Likewise.
5776 (i386_dr_low_can_set_control): Likewise.
5777 (i386_dr_low_set_control): Likewise.
5778 (i386_dr_low_get_control): Likewise.
5779 (i386_dr_low_get_status): Likewise.
5780 (i386_get_debug_register_length): Likewise.
5781 * linux-x86-low.c (i386_dr_low_set_addr):
5782 Changed signature. Made static.
5783 (i386_dr_low_get_addr): Likewise.
5784 (i386_dr_low_set_control): Likewise.
5785 (i386_dr_low_get_control): Likewise.
5786 (i386_dr_low_get_status): Likewise.
5787 (i386_dr_low): New global variable.
5788 * win32-i386-low.c (i386_dr_low_set_addr):
5789 Changed signature. Made static.
5790 (i386_dr_low_get_addr): Likewise.
5791 (i386_dr_low_set_control): Likewise.
5792 (i386_dr_low_get_control): Likewise.
5793 (i386_dr_low_get_status): Likewise.
5794 (i386_dr_low): New global variable.
5795
5796 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5797
5798 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5799 * Makefile.in (AR, AR_FLAGS): Define.
5800 * configure: Regenerate.
5801
5802 2014-06-19 Gary Benson <gbenson@redhat.com>
5803
5804 * Makefile.in (i386-dregs.o): New rule.
5805 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5806 * i386-low.c (target.h): Remove include.
5807 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5808 (DR_CONTROL_SHIFT): Likewise.
5809 (DR_CONTROL_SIZE): Likewise.
5810 (DR_RW_EXECUTE): Likewise.
5811 (DR_RW_WRITE): Likewise.
5812 (DR_RW_READ): Likewise.
5813 (DR_RW_IORW): Likewise.
5814 (DR_LEN_1): Likewise.
5815 (DR_LEN_2): Likewise.
5816 (DR_LEN_4): Likewise.
5817 (DR_LEN_8): Likewise.
5818 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5819 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5820 (DR_ENABLE_SIZE): Likewise.
5821 (DR_LOCAL_SLOWDOWN): Likewise.
5822 (DR_GLOBAL_SLOWDOWN): Likewise.
5823 (DR_CONTROL_RESERVED): Likewise.
5824 (I386_DR_CONTROL_MASK): Likewise.
5825 (I386_DR_VACANT): Likewise.
5826 (I386_DR_LOCAL_ENABLE): Likewise.
5827 (I386_DR_GLOBAL_ENABLE): Likewise.
5828 (I386_DR_DISABLE): Likewise.
5829 (I386_DR_SET_RW_LEN): Likewise.
5830 (I386_DR_GET_RW_LEN): Likewise.
5831 (I386_DR_WATCH_HIT): Likewise.
5832 (i386_wp_op_t): Likewise.
5833 (i386_show_dr): Likewise.
5834 (i386_length_and_rw_bits): Likewise.
5835 (i386_insert_aligned_watchpoint): Likewise.
5836 (i386_remove_aligned_watchpoint): Likewise.
5837 (i386_handle_nonaligned_watchpoint): Likewise.
5838 i386_update_inferior_debug_regs(): Likewise.
5839 (i386_dr_insert_watchpoint): Likewise.
5840 (i386_dr_remove_watchpoint): Likewise.
5841 (i386_dr_region_ok_for_watchpoint): Likewise.
5842 (i386_dr_stopped_data_address): Likewise.
5843 (i386_dr_stopped_by_watchpoint): Likewise.
5844
5845 2014-06-19 Gary Benson <gbenson@redhat.com>
5846
5847 * i386-low.c (i386_dr_show): Renamed to
5848 i386_show_dr and made static. All uses updated.
5849 (i386_dr_length_and_rw_bits): Renamed to
5850 i386_length_and_rw_bits and made static.
5851 All uses updated.
5852 (i386_dr_insert_aligned_watchpoint): Renamed to
5853 i386_insert_aligned_watchpoint and made static.
5854 All uses updated.
5855 (i386_dr_remove_aligned_watchpoint): Renamed to
5856 i386_remove_aligned_watchpoint and made static.
5857 All uses updated.
5858 (i386_dr_update_inferior_debug_regs): Renamed to
5859 i386_update_inferior_debug_regs and made static.
5860 All uses updated.
5861
5862 2014-06-18 Gary Benson <gbenson@redhat.com>
5863
5864 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5865 (i386_dr_low_can_set_control): Likewise.
5866 (i386_get_debug_register_length): Likewise.
5867 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5868 (i386_dr_low_can_set_control): Likewise.
5869 (i386_get_debug_register_length): Likewise.
5870
5871 2014-06-17 Gary Benson <gbenson@redhat.com>
5872
5873 * i386-low.h (i386-dregs.h): New include.
5874 (DR_FIRSTADDR): Now in i386-dregs.h.
5875 (DR_LASTADDR): Likewise.
5876 (DR_NADDR): Likewise.
5877 (DR_STATUS): Likewise.
5878 (DR_CONTROL): Likewise.
5879 (i386_debug_reg_state): Likewise.
5880 (i386_dr_insert_watchpoint): Likewise.
5881 (i386_dr_remove_watchpoint): Likewise.
5882 (i386_dr_region_ok_for_watchpoint): Likewise.
5883 (i386_dr_stopped_data_address): Likewise.
5884 (i386_dr_stopped_by_watchpoint): Likewise.
5885 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5886
5887 2014-06-18 Gary Benson <gbenson@redhat.com>
5888
5889 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5890 i386_dr_insert_watchpoint.
5891 (i386_low_remove_watchpoint): Renamed to
5892 i386_dr_remove_watchpoint.
5893 (i386_low_region_ok_for_watchpoint): Renamed to
5894 i386_dr_region_ok_for_watchpoint.
5895 (i386_low_stopped_data_address): Renamed to
5896 i386_dr_stopped_data_address.
5897 (i386_low_stopped_by_watchpoint): Renamed to
5898 i386_dr_stopped_by_watchpoint.
5899 * i386-low.c (i386_show_dr): Renamed to
5900 i386_dr_show and made nonstatic. All uses updated.
5901 (i386_length_and_rw_bits): Renamed to
5902 i386_dr_length_and_rw_bits and made nonstatic.
5903 All uses updated.
5904 (i386_insert_aligned_watchpoint): Renamed to
5905 i386_dr_insert_aligned_watchpoint and made nonstatic.
5906 All uses updated.
5907 (i386_remove_aligned_watchpoint): Renamed to
5908 i386_dr_remove_aligned_watchpoint and made nonstatic.
5909 All uses updated.
5910 (i386_update_inferior_debug_regs): Renamed to
5911 i386_dr_update_inferior_debug_regs and made nonstatic.
5912 All uses updated.
5913 (i386_low_insert_watchpoint): Renamed to
5914 i386_dr_insert_watchpoint. All uses updated.
5915 (i386_low_remove_watchpoint): Renamed to
5916 i386_dr_remove_watchpoint. All uses updated.
5917 (i386_low_region_ok_for_watchpoint): Renamed to
5918 i386_dr_region_ok_for_watchpoint. All uses updated.
5919 (i386_low_stopped_data_address): Renamed to
5920 i386_dr_stopped_data_address. All uses updated.
5921 (i386_low_stopped_by_watchpoint): Renamed to
5922 i386_dr_stopped_by_watchpoint. All uses updated.
5923
5924 2014-06-18 Gary Benson <gbenson@redhat.com>
5925
5926 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5927 (i386_dr_low_can_set_control): Likewise.
5928 (i386_insert_aligned_watchpoint): New check.
5929
5930 2014-06-18 Gary Benson <gbenson@redhat.com>
5931
5932 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5933 Renamed to state.
5934
5935 2014-06-18 Gary Benson <gbenson@redhat.com>
5936
5937 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5938 instead of fatal and error.
5939 (i386_handle_nonaligned_watchpoint): Likewise.
5940
5941 2014-06-18 Gary Benson <gbenson@redhat.com>
5942
5943 * i386-low.c (i386_get_debug_register_length): New macro.
5944 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5945 (i386_show_dr): Use debug_printf instead of fprintf. Use
5946 phex to format values.
5947
5948 2014-06-18 Gary Benson <gbenson@redhat.com>
5949
5950 * i386-low.h: Comment changes.
5951 * i386-low.c: Likewise.
5952
5953 2014-06-18 Gary Benson <gbenson@redhat.com>
5954
5955 * i386-low.c: Whitespace changes.
5956
5957 2014-06-12 Tom Tromey <tromey@redhat.com>
5958
5959 * utils.c (freeargv): Remove.
5960
5961 2014-06-12 Tom Tromey <tromey@redhat.com>
5962
5963 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5964 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5965 (parse_debug_format_options): Likewise.
5966 (gdbserver_usage): Likewise.
5967 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5968 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5969 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5970 against libiberty.
5971 ($(LIBGNU)): Depend on libiberty.
5972 (all-lib): Recurse into all subdirs.
5973 (install-only): Invoke "install" target in subdirs.
5974 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5975 targets.
5976 * configure: Rebuild.
5977 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5978 for vasprintf, vsnprintf, or gettimeofday.
5979 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5980 srv_tgtobj.
5981
5982 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5983
5984 * development.sh: Delete.
5985 * Makefile.in (config.status): Adjust dependency on development.sh.
5986 * configure.ac: Adjust development.sh source call.
5987 * configure: Regenerate.
5988
5989 2014-06-02 Pedro Alves <palves@redhat.com>
5990
5991 * ax.c (gdb_free_agent_expr): New function.
5992 * ax.h (gdb_free_agent_expr): New declaration.
5993 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5994 list.
5995 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5996 static.
5997 (clear_breakpoint_conditions_and_commands): New function.
5998 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5999 (clear_breakpoint_conditions_and_commands): New declaration.
6000
6001 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6002
6003 * linux-aarch64-low.c (asm/ptrace.h): Include.
6004
6005 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6006
6007 Fix TLS access for -static -pthread.
6008 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6009 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6010 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6011
6012 2014-05-20 Pedro Alves <palves@redhat.com>
6013
6014 * linux-aarch64-low.c (aarch64_insert_point)
6015 (aarch64_remove_point): No longer check whether the type is
6016 supported here. Adjust to new interface.
6017 (the_low_target): Install aarch64_supports_z_point_type as
6018 supports_z_point_type method.
6019 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6020 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6021 instead of a Z packet char. Adjust.
6022 (arm_supports_z_point_type): New function.
6023 (arm_insert_point, arm_remove_point): Adjust to new interface.
6024 (the_low_target): Install arm_supports_z_point_type.
6025 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6026 (cris_insert_point, cris_remove_point): Adjust to new interface.
6027 Don't check whether the type is supported here.
6028 (the_low_target): Install cris_supports_z_point_type.
6029 * linux-low.c (linux_supports_z_point_type): New function.
6030 (linux_insert_point, linux_remove_point): Adjust to new interface.
6031 * linux-low.h (struct linux_target_ops) <insert_point,
6032 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6033 raw_breakpoint pointer parameter.
6034 <supports_z_point_type>: New method.
6035 * linux-mips-low.c (mips_supports_z_point_type): New function.
6036 (mips_insert_point, mips_remove_point): Adjust to new interface.
6037 Use mips_supports_z_point_type.
6038 (the_low_target): Install mips_supports_z_point_type.
6039 * linux-ppc-low.c (the_low_target): Install NULL as
6040 supports_z_point_type method.
6041 * linux-s390-low.c (the_low_target): Install NULL as
6042 supports_z_point_type method.
6043 * linux-sparc-low.c (the_low_target): Install NULL as
6044 supports_z_point_type method.
6045 * linux-x86-low.c (x86_supports_z_point_type): New function.
6046 (x86_insert_point): Adjust to new insert_point interface. Use
6047 insert_memory_breakpoint. Adjust to new
6048 i386_low_insert_watchpoint interface.
6049 (x86_remove_point): Adjust to remove_point interface. Use
6050 remove_memory_breakpoint. Adjust to new
6051 i386_low_remove_watchpoint interface.
6052 (the_low_target): Install x86_supports_z_point_type.
6053 * lynx-low.c (lynx_target_ops): Install NULL as
6054 supports_z_point_type callback.
6055 * nto-low.c (nto_supports_z_point_type): New.
6056 (nto_insert_point, nto_remove_point): Adjust to new interface.
6057 (nto_target_ops): Install nto_supports_z_point_type.
6058 * mem-break.c: Adjust intro comment.
6059 (struct raw_breakpoint) <raw_type, size>: New fields.
6060 <inserted>: Update comment.
6061 <shlib_disabled>: Delete field.
6062 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6063 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6064 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6065 (raw_bkpt_type_to_target_hw_bp_type): New function.
6066 (find_enabled_raw_code_breakpoint_at): New function.
6067 (find_raw_breakpoint_at): New type and size parameters. Use them.
6068 (insert_memory_breakpoint): New function, based off
6069 set_raw_breakpoint_at.
6070 (remove_memory_breakpoint): New function.
6071 (set_raw_breakpoint_at): Reimplement.
6072 (set_breakpoint): New, based on set_breakpoint_at.
6073 (set_breakpoint_at): Reimplement.
6074 (delete_raw_breakpoint): Go through the_target->remove_point
6075 instead of assuming memory breakpoints.
6076 (find_gdb_breakpoint_at): Delete.
6077 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6078 (find_gdb_breakpoint): New function.
6079 (set_gdb_breakpoint_at): Delete.
6080 (z_type_supported): New function.
6081 (set_gdb_breakpoint_1): New function, loosely based off
6082 set_gdb_breakpoint_at.
6083 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6084 (delete_gdb_breakpoint_at): Delete.
6085 (delete_gdb_breakpoint_1): New function, loosely based off
6086 delete_gdb_breakpoint_at.
6087 (delete_gdb_breakpoint): New function.
6088 (clear_gdb_breakpoint_conditions): Rename to ...
6089 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6090 breakpoint.
6091 (add_condition_to_breakpoint): Make static.
6092 (add_breakpoint_condition): Take a struct breakpoint pointer
6093 instead of an address. Adjust.
6094 (gdb_condition_true_at_breakpoint): Rename to ...
6095 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6096 z_type parameter.
6097 (gdb_condition_true_at_breakpoint): Reimplement.
6098 (add_breakpoint_commands): Take a struct breakpoint pointer
6099 instead of an address. Adjust.
6100 (gdb_no_commands_at_breakpoint): Rename to ...
6101 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6102 parameter. Return true if no breakpoint was found. Change debug
6103 output.
6104 (gdb_no_commands_at_breakpoint): Reimplement.
6105 (run_breakpoint_commands): Rename to ...
6106 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6107 and change return type to boolean.
6108 (run_breakpoint_commands): New function.
6109 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6110 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6111 breakpoint. Go through the_target->remove_point instead of
6112 assuming memory breakpoint.
6113 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6114 software and hardware breakpoints.
6115 (reinsert_raw_breakpoint): Go through the_target->insert_point
6116 instead of assuming memory breakpoint.
6117 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6118 software and hardware breakpoints.
6119 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6120 Check both software and hardware breakpoints.
6121 (validate_inserted_breakpoint): Assert the breakpoint is a
6122 software breakpoint. Set the inserted flag to -1 instead of
6123 setting shlib_disabled.
6124 (delete_disabled_breakpoints): Adjust.
6125 (validate_breakpoints): Only validate software breakpoints.
6126 Adjust to inserted flag change.
6127 (check_mem_read, check_mem_write): Skip breakpoint types other
6128 than software breakpoints. Adjust to inserted flag change.
6129 * mem-break.h (enum raw_bkpt_type): New enum.
6130 (raw_breakpoint, struct process_info): Forward declare.
6131 (Z_packet_to_target_hw_bp_type): Delete declaration.
6132 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6133 (set_gdb_breakpoint, delete_gdb_breakpoint)
6134 (clear_breakpoint_conditions): New declarations.
6135 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6136 (breakpoint_inserted_here): Update comment.
6137 (add_breakpoint_condition, add_breakpoint_commands): Replace
6138 address parameter with a breakpoint pointer parameter.
6139 (gdb_breakpoint_here): Update comment.
6140 (delete_gdb_breakpoint_at): Delete.
6141 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6142 * server.c (process_point_options): Take a struct breakpoint
6143 pointer instead of an address. Adjust.
6144 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6145 delete_gdb_breakpoint.
6146 * spu-low.c (spu_target_ops): Install NULL as
6147 supports_z_point_type method.
6148 * target.h: Include mem-break.h.
6149 (struct target_ops) <prepare_to_access_memory>: Update comment.
6150 <supports_z_point_type>: New field.
6151 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6152 instead of a char. Also take a raw breakpoint pointer.
6153 * win32-arm-low.c (the_low_target): Install NULL as
6154 supports_z_point_type.
6155 * win32-i386-low.c (i386_supports_z_point_type): New function.
6156 (i386_insert_point, i386_remove_point): Adjust to new interface.
6157 (the_low_target): Install i386_supports_z_point_type.
6158 * win32-low.c (win32_supports_z_point_type): New function.
6159 (win32_insert_point, win32_remove_point): Adjust to new interface.
6160 (win32_target_ops): Install win32_supports_z_point_type.
6161 * win32-low.h (struct win32_target_ops):
6162 <supports_z_point_type>: New method.
6163 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6164 instead of a char. Also take a raw breakpoint pointer.
6165
6166 2014-05-20 Pedro Alves <palves@redhat.com>
6167
6168 * mem-break.h: Include break-common.h.
6169 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6170 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6171 (Z_packet_to_target_hw_bp_type): New declaration.
6172 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6173 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6174 (Z_PACKET_ACCESS_WP): Delete macros.
6175 (Z_packet_to_hw_type): Delete function.
6176 * i386-low.h: Don't include break-common.h here.
6177 (Z_packet_to_hw_type): Delete declaration.
6178 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6179 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6180 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6181 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6182 * linux-aarch64-low.c: Don't include break-common.h here.
6183 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6184 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6185 (Z_packet_to_target_hw_bp_type): Delete function.
6186 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6187 function.
6188 (mips_insert_point, mips_remove_point): Use
6189 Z_packet_to_target_hw_bp_type.
6190
6191 2014-05-20 Pedro Alves <palves@redhat.com>
6192
6193 * linux-aarch64-low.c: Include break-common.h.
6194 (enum target_point_type): Delete.
6195 (Z_packet_to_point_type): Rename to ...
6196 (Z_packet_to_target_hw_bp_type): ... this, and return a
6197 target_hw_bp_type instead.
6198 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6199 instead of an enum target_point_type.
6200 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6201 breakpoint type.
6202 (aarch64_dr_state_insert_one_point)
6203 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6204 (aarch64_handle_aligned_watchpoint)
6205 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6206 Take an enum target_hw_bp_type instead of an enum
6207 target_point_type.
6208 (aarch64_supports_z_point_type): New function.
6209 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6210 use Z_packet_to_target_hw_bp_type.
6211
6212 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6213
6214 * configure.ac: Only use -Werror by default when DEVELOPMENT
6215 is true.
6216 * configure: Regenerate.
6217
6218 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6219
6220 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6221 * linux-x86-low.c (X86_64_USER_REGS): New.
6222 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6223
6224 2014-04-28 Yao Qi <yao@codesourcery.com>
6225
6226 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6227 name.
6228
6229 2014-04-25 Pedro Alves <palves@redhat.com>
6230
6231 PR server/16255
6232 * linux-low.c (linux_attach_fail_reason_string): New function.
6233 (linux_attach_lwp): Delete.
6234 (linux_attach_lwp_1): Rename to ...
6235 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6236 argument. Remove "initial" parameter. Return int instead of
6237 void. Don't error or warn here.
6238 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6239 failure to attach to the tgid. Call warning when failing to
6240 attach to an lwp.
6241 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6242 argument. Remove "initial" parameter. Return int instead of
6243 void. Don't error or warn here.
6244 (linux_attach_fail_reason_string): New declaration.
6245 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6246 interface change. Use linux_attach_fail_reason_string.
6247
6248 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6249 Walfred Tedeschi <walfred.tedeschi@intel.com>
6250
6251 * Makefile.in: Added rules to handle new files
6252 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6253 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6254 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6255 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6256 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6257 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6258 x32-avx512-linux.o.
6259 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6260 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6261 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6262 i386/x32-avx512.xml.
6263 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6264 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6265 i386/x32-avx512-linux.xml.
6266 * i387-fp.c (num_avx512_k_registers): New constant for number
6267 of K registers.
6268 (num_avx512_zmmh_low_registers): New constant for number of
6269 lower ZMM registers (0-15).
6270 (num_avx512_zmmh_high_registers): New constant for number of
6271 higher ZMM registers (16-31).
6272 (num_avx512_ymmh_registers): New contant for number of higher
6273 YMM registers (ymm16-31 added by avx521 on x86_64).
6274 (num_avx512_xmm_registers): New constant for number of higher
6275 XMM registers (xmm16-31 added by AVX512 on x86_64).
6276 (struct i387_xsave): Add space for AVX512 registers.
6277 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6278 Add code to handle AVX512 registers.
6279 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6280 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6281 prototypei from generated file.
6282 (tdesc_amd64_avx512_linux): Likewise.
6283 (init_registers_x32_avx512_linux): Likewise.
6284 (tdesc_x32_avx512_linux): Likewise.
6285 (init_registers_i386_avx512_linux): Likewise.
6286 (tdesc_i386_avx512_linux): Likewise.
6287 (x86_64_regmap): Add AVX512 registers.
6288 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6289 mask.
6290 (initialize_low_arch): Add code to initialize AVX512 registers.
6291
6292 2014-04-23 Pedro Alves <palves@redhat.com>
6293
6294 * mem-break.c (find_gdb_breakpoint_at): Make static.
6295 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6296
6297 2014-04-23 Pedro Alves <palves@redhat.com>
6298
6299 * i386-low.c: Don't include break-common.h here.
6300 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6301 prototype to take target_hw_bp_type as argument instead of a Z
6302 packet char.
6303 * i386-low.h: Include break-common.h here.
6304 (Z_packet_to_hw_type): Declare.
6305 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6306 prototypes.
6307 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6308 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6309 (x86_remove_point): Convert the packet number to a
6310 target_hw_bp_type before calling i386_low_remove_watchpoint.
6311 * win32-i386-low.c (i386_insert_point): Convert the packet number
6312 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6313 (i386_remove_point): Convert the packet number to a
6314 target_hw_bp_type before calling i386_low_remove_watchpoint.
6315
6316 2014-04-23 Pedro Alves <palves@redhat.com>
6317
6318 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6319
6320 2014-04-10 Pedro Alves <palves@redhat.com>
6321
6322 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6323 Check if the condition or command is NULL before checking if the
6324 breakpoint is known. On success, return true.
6325 * mem-break.h (add_breakpoint_condition): Document return.
6326 (add_breakpoint_commands): Add describing comment.
6327 * server.c (skip_to_semicolon): New function.
6328 (process_point_options): Use it.
6329
6330 2014-04-09 Pedro Alves <palves@redhat.com>
6331
6332 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6333 to lwpid_of.
6334
6335 2014-02-27 Pedro Alves <palves@redhat.com>
6336
6337 PR 12702
6338 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6339 macros.
6340 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6341 output.
6342 (last_thread_of_process_p): Take a PID argument instead of a
6343 thread pointer.
6344 (linux_wait_for_lwp): Delete.
6345 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6346 functions.
6347 (linux_low_filter_event): New function, party factored out from
6348 linux_wait_for_event.
6349 (linux_wait_for_event): Rename to ...
6350 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6351 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6352 sigsuspend. Check for zombie leaders.
6353 (linux_wait_for_event): Reimplement as wrapper around
6354 linux_wait_for_event_filtered.
6355 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6356 a normal or signal exit is seen, it's the whole process exiting.
6357 (wait_for_sigstop): No longer a for_each_inferior callback.
6358 Rewrite on top of linux_wait_for_event_filtered.
6359 (stop_all_lwps): Call wait_for_sigstop directly.
6360 * server.c (resume, handle_target_event): Handle
6361 TARGET_WAITKIND_NO_RESUMED.
6362
6363 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6364
6365 * win32-low.c (psapi_get_dll_name,
6366 * win32_CreateToolhelp32Snapshot): Delete.
6367 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6368 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6369 Delete.
6370 (handle_load_dll): Add function description.
6371 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6372
6373 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6374
6375 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6376 Add comment.
6377 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6378 base address when calling win32_add_one_solib.
6379 (handle_load_dll): Delete local variable load_addr.
6380 Remove 0x1000 offset applied to DLL base address when calling
6381 win32_add_one_solib.
6382 (handle_unload_dll): Add comment.
6383
6384 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6385
6386 * win32-low.c (win32_add_all_dlls): Renames
6387 win32_ensure_ntdll_loaded. Rewrite function documentation.
6388 Adjust implementation to always load all DLLs.
6389 Add 0x1000 offset to DLL base address when calling
6390 win32_add_one_solib.
6391 (child_initialization_done): New static global.
6392 (do_initial_child_stuff): Set child_initialization_done to
6393 zero during child initialization, and 1 after. Replace call
6394 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6395 Add comment.
6396 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6397 (handle_unload_dll): Add function documentation.
6398 (get_child_debug_event): Ignore load and unload DLL events
6399 during child initialization.
6400
6401 2014-02-20 Doug Evans <dje@google.com>
6402
6403 Remove global all_lwps.
6404 * inferiors.h (ptid_of): Move here from linux-low.h.
6405 (pid_of, lwpid_of): Ditto.
6406 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6407 parameter is a struct thread_info * now.
6408 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6409 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6410 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6411 directly.
6412 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6413 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6414 * linux-arm-low.c (update_registers_callback): Update, "entry"
6415 parameter is a struct thread_info * now.
6416 Fetch lwpid from current_inferior directly.
6417 (arm_insert_point): Pass &all_threads to find_inferior instead of
6418 &all_lwps.
6419 (arm_remove_point): Ditto.
6420 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6421 (arm_prepare_to_resume): Fetch pid from thread.
6422 (arm_read_description): Fetch lwpid from current_inferior directly.
6423 * linux-low.c (all_lwps): Delete.
6424 (delete_lwp): Delete call to remove_inferior.
6425 (handle_extended_wait): Fetch lwpid from thread.
6426 (add_lwp): Don't set lwp->entry.id. Remove call to
6427 add_inferior_to_list.
6428 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6429 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6430 (kill_one_lwp_callback): Ditto.
6431 (linux_kill): Don't dereference NULL pointer.
6432 Fetch ptid,lwpid from thread.
6433 (get_detach_signal): Fetch ptid from thread.
6434 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6435 Simplify call to regcache_invalidate_thread.
6436 (delete_lwp_callback): Update, "entry" parameter is a
6437 struct thread_info * now. Fetch pid from thread.
6438 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6439 (status_pending_p_callback): Update, "entry" parameter is a
6440 struct thread_info * now. Fetch ptid from thread.
6441 (find_lwp_pid): Update, "entry" parameter is a
6442 struct thread_info * now.
6443 (linux_wait_for_lwp): Fetch pid from thread.
6444 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6445 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6446 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6447 (dequeue_one_deferred_signal): Ditto.
6448 (cancel_breakpoint): Fetch ptid from current_inferior.
6449 (linux_wait_for_event): Pass &all_threads to find_inferior,
6450 not &all_lwps. Fetch ptid, lwpid from thread.
6451 (count_events_callback): Update, "entry" parameter is a
6452 struct thread_info * now.
6453 (select_singlestep_lwp_callback): Ditto.
6454 (select_event_lwp_callback): Ditto.
6455 (cancel_breakpoints_callback): Ditto.
6456 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6457 not &all_lwps.
6458 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6459 (unsuspend_one_lwp): Update, "entry" parameter is a
6460 struct thread_info * now.
6461 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6462 not &all_lwps.
6463 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6464 Fetch lwpid from thread, not lwp.
6465 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6466 Pass &all_threads to find_inferior, not &all_lwps.
6467 (send_sigstop): Fetch lwpid from thread, not lwp.
6468 (send_sigstop_callback): Update, "entry" parameter is a
6469 struct thread_info * now.
6470 (suspend_and_send_sigstop_callback): Ditto.
6471 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6472 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6473 struct thread_info * now.
6474 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6475 from thread, lwp.
6476 (lwp_running): Update, "entry" parameter is a
6477 struct thread_info * now.
6478 (stop_all_lwps): Fetch ptid from thread.
6479 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6480 (linux_resume_one_lwp): Fetch lwpid from thread.
6481 (linux_set_resume_request): Update, "entry" parameter is a
6482 struct thread_info * now. Fetch pid, lwpid from thread.
6483 (resume_status_pending_p): Update, "entry" parameter is a
6484 struct thread_info * now.
6485 (need_step_over_p): Ditto. Fetch lwpid from thread.
6486 (start_step_over): Fetch lwpid from thread.
6487 (linux_resume_one_thread): Update, "entry" parameter is a
6488 struct thread_info * now. Fetch lwpid from thread.
6489 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6490 (proceed_one_lwp): Update, "entry" parameter is a
6491 struct thread_info * now. Fetch lwpid from thread.
6492 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6493 struct thread_info * now.
6494 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6495 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6496 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6497 directly.
6498 (regsets_store_inferior_registers): Ditto.
6499 (fetch_register, store_register): Ditto.
6500 (linux_read_memory, linux_write_memory): Ditto.
6501 (linux_request_interrupt): Ditto.
6502 (linux_read_auxv): Ditto.
6503 (linux_xfer_siginfo): Ditto.
6504 (linux_qxfer_spu): Ditto.
6505 (linux_qxfer_libraries_svr4): Ditto.
6506 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6507 moved to inferiors.h.
6508 (get_lwp): Delete.
6509 (get_thread_lwp): Update.
6510 (struct lwp_info): Delete member "entry". Simplify comment for
6511 member "thread".
6512 (all_lwps): Delete.
6513 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6514 current_inferior directly.
6515 (update_watch_registers_callback): Update, "entry" parameter is a
6516 struct thread_info * now. Fetch pid from thread.
6517 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6518 (mips_insert_point): Fetch lwpid from current_inferior.
6519 Pass &all_threads to find_inferior, not &all_lwps.
6520 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6521 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6522 directly.
6523 (mips_stopped_data_address): Ditto.
6524 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6525 directly.
6526 * linux-tile-low.c (tile_arch_setup): Ditto.
6527 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6528 (update_debug_registers_callback): Update, "entry" parameter is a
6529 struct thread_info * now. Fetch pid from thread.
6530 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6531 Pass &all_threads to find_inferior, not &all_lwps.
6532 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6533 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6534 Pass &all_threads to find_inferior, not &all_lwps.
6535 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6536 (i386_dr_low_get_status): Ditto.
6537 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6538 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6539 (x86_linux_read_description): Ditto.
6540 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6541
6542 2014-02-20 Doug Evans <dje@google.com>
6543
6544 * inferiors.c (get_first_inferior): Fix buglet.
6545
6546 2014-02-19 Doug Evans <dje@google.com>
6547
6548 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6549 * inferiors.c (add_thread): Change result type to struct thread_info *.
6550 All callers updated.
6551 (add_lwp): Call add_thread here instead of in callers.
6552 All callers updated.
6553 * linux-low.h (get_lwp_thread): Rewrite.
6554 (struct lwp_info): New member "thread".
6555
6556 2014-02-19 Doug Evans <dje@google.com>
6557
6558 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6559 All callers updated.
6560
6561 2014-02-19 Doug Evans <dje@google.com>
6562
6563 * inferiors.c (add_thread): Fix whitespace.
6564
6565 2014-02-19 Doug Evans <dje@google.com>
6566
6567 * dll.c (clear_dlls): Replace accessing list implemention details
6568 with API function.
6569 * gdbthread.h (get_first_thread): Declare.
6570 * inferiors.c (for_each_inferior_with_data): New function.
6571 (get_first_thread): New function.
6572 (find_thread_ptid): Simplify.
6573 (get_first_inferior): New function.
6574 (clear_list): Delete.
6575 (one_inferior_p): New function.
6576 (clear_inferior_list): New function.
6577 (clear_inferiors): Update.
6578 * inferiors.h (for_each_inferior_with_data): Declare.
6579 (clear_inferior_list): Declare.
6580 (one_inferior_p): Declare.
6581 (get_first_inferior): Declare.
6582 * linux-low.c (linux_wait_for_event): Replace accessing list
6583 implemention details with API function.
6584 * server.c (target_running): Ditto.
6585 (accumulate_file_name_length): New function.
6586 (emit_dll_description): New function.
6587 (handle_qxfer_libraries): Replace accessing list implemention
6588 details with API function.
6589 (handle_qxfer_threads_worker): New function.
6590 (handle_qxfer_threads_proper): Replace accessing list implemention
6591 details with API function.
6592 (handle_query): Ditto.
6593 (visit_actioned_threads_callback_ftype): New typedef.
6594 (visit_actioned_threads_data): New struct.
6595 (visit_actioned_threads): Rewrite to be find_inferior callback.
6596 (resume): Call find_inferior.
6597 (handle_status): Replace accessing list implemention
6598 details with API function.
6599 (process_serial_event): Replace accessing list implemention details
6600 with API function.
6601 * target.c (set_desired_inferior): Replace accessing list implemention
6602 details with API function.
6603 * tracepoint.c (same_process_p): New function.
6604 (gdb_agent_about_to_close): Replace accessing list implemention
6605 details with API function.
6606 * win32-low.c (child_delete_thread): Replace accessing list
6607 implemention details with API function.
6608 (match_dll_by_basename): New function.
6609 (dll_is_loaded_by_basename): New function.
6610 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6611 details call to dll_is_loaded_by_basename.
6612
6613 2014-02-19 Doug Evans <dje@google.com>
6614
6615 * dll.h (struct dll_info): Add comment.
6616 * gdbthread.h (struct thread_info): Add comment.
6617 (current_ptid): Simplify.
6618 * inferiors.c (add_process): Update.
6619 (remove_process): Update.
6620 * inferiors.h (struct process_info): Rename member "head" to "entry".
6621 * linux-low.c (delete_lwp): Update.
6622 (add_lwp): Update.
6623 (last_thread_of_process_p): Update.
6624 (kill_one_lwp_callback, linux_kill): Update.
6625 (status_pending_p_callback): Update.
6626 (wait_for_sigstop): Update. Simplify read of ptid.
6627 (start_step_over): Update.
6628 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6629 (get_lwp_thread): Update.
6630 (struct lwp_info): Rename member "head" to "entry".
6631 * regcache.h (inferior_list_entry): Delete.
6632 * server.c (kill_inferior_callback): Update.
6633 (detach_or_kill_inferior_callback): Update.
6634 (print_started_pid): Update.
6635 (print_attached_pid): Update.
6636 (process_serial_event): Simplify read of ptid.
6637 * thread-db.c (thread_db_create_event): Update.
6638 (thread_db_get_tls_address): Update.
6639 * win32-low.c (current_inferior_ptid): Simplify.
6640
6641 2014-02-19 Tom Tromey <tromey@redhat.com>
6642
6643 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6644 argument.
6645 (target_supports_btrace): Update.
6646
6647 2014-02-14 Yao Qi <yao@codesourcery.com>
6648
6649 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6650 (rsp-low-ipa.o): New target.
6651
6652 2014-02-12 Tom Tromey <tromey@redhat.com>
6653
6654 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6655 convert_ascii_to_int.
6656 * regcache.c (registers_to_string): Likewise.
6657 * remote-utils.c (decode_M_packet): Likewise.
6658 * server.c (process_serial_event): Likewise.
6659
6660 2014-02-12 Tom Tromey <tromey@redhat.com>
6661
6662 * server.c (handle_query, handle_v_run): Use hex2bin, not
6663 unhexify.
6664 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6665
6666 2014-02-12 Tom Tromey <tromey@redhat.com>
6667
6668 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6669 convert_int_to_ascii.
6670 * regcache.c (registers_to_string, collect_register_as_string):
6671 Likewise.
6672 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6673 Likewise.
6674 * server.c (process_serial_event): Likewise.
6675 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6676 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6677
6678 2014-02-12 Tom Tromey <tromey@redhat.com>
6679
6680 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6681 bin2hex, not hexify.
6682 * tracepoint.c (cmd_qtstatus): Likewise.
6683
6684 2014-02-12 Tom Tromey <tromey@redhat.com>
6685
6686 * remote-utils.c (monitor_output): Pass explicit length to
6687 hexify.
6688
6689 2014-02-12 Tom Tromey <tromey@redhat.com>
6690
6691 * tracepoint.c: Include rsp-low.h.
6692 * server.c: Include rsp-low.h.
6693 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6694 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6695 declare.
6696 * remote-utils.c: Include rsp-low.h.
6697 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6698 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6699 (convert_int_to_ascii, convert_ascii_to_int): Move to
6700 common/rsp-low.c.
6701 * regcache.c: Include rsp-low.h.
6702 * ax.c: Include rsp-low.h.
6703 * Makefile.in (SFILES): Add common/rsp-low.c.
6704 (OBS): Add rsp-low.o.
6705 (rsp-low.o): New target.
6706
6707 2014-02-12 Tom Tromey <tromey@redhat.com>
6708
6709 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6710 Include print-utils.h.
6711 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6712 (plongest, thirty_two, phex_nz): Remove.
6713 * Makefile.in (SFILES): Add common/print-utils.c.
6714 (OBS): Add print-utils.o.
6715 (print-utils-ipa.o): New target.
6716 (print-utils.o): New target.
6717 (IPA_OBJS): Add print-utils-ipa.o.
6718
6719 2014-02-06 Tom Tromey <tromey@redhat.com>
6720
6721 * Makefile.in (SFILES): Fix indentation.
6722
6723 2014-02-05 Doug Evans <dje@google.com>
6724
6725 * linux-low.c (linux_wait_for_event): Improve comment.
6726 (linux_wait_1): Keep current_inferior in sync with event_child.
6727
6728 2014-01-22 Doug Evans <dje@google.com>
6729
6730 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6731
6732 2014-01-22 Doug Evans <dje@google.com>
6733
6734 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6735 * configure: Regenerate.
6736 * config.in: Regenerate.
6737 * Makefile.in (SFILES): Add debug.c.
6738 (OBS): Add debug.o.
6739 * debug.c: New file.
6740 * debug.h: New file.
6741 * linux-aarch64-low.c (*): Update all debugging printfs to use
6742 debug_printf instead of fprintf.
6743 * linux-arm-low.c (*): Ditto.
6744 * linux-cris-low.c (*): Ditto.
6745 * linux-crisv32-low.c (*): Ditto.
6746 * linux-m32r-low.c (*): Ditto.
6747 * linux-sparc-low.c (*): Ditto.
6748 * linux-x86.c (*): Ditto.
6749 * linux-low.c (*): Ditto.
6750 (linux_wait_1): Add calls to debug_enter, debug_exit.
6751 (linux_wait): Remove redundant debugging printf.
6752 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6753 (linux_resume, unstop_all_lwps): Ditto.
6754 * mem-break.c (*): Update all debugging printfs to use
6755 debug_printf instead of fprintf.
6756 * remote-utils.c (*): Ditto.
6757 * thread-db.c (*): Ditto.
6758 * server.c #include <ctype.h>, "gdb_vecs.h".
6759 (debug_threads): Moved to debug.c.
6760 (*): Update all debugging printfs to use debug_printf instead of
6761 fprintf.
6762 (start_inferior): Replace call to fflush with call to debug_flush.
6763 (monitor_show_help): Mention set debug-format.
6764 (parse_debug_format_options): New function.
6765 (handle_monitor_command): Handle "monitor set debug-format".
6766 (gdbserver_usage): Mention --debug-format.
6767 (main): Parse --debug-format.
6768 * server.h (debug_threads): Declaration moved to debug.h.
6769 #include "debug.h".
6770 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6771 trace_debug_1 that uses debug_printf.
6772 (tracepoint_look_up_symbols): Update all debugging printfs to use
6773 debug_printf instead of fprintf.
6774
6775 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6776
6777 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6778 sys/ptrace.h.
6779
6780 2014-01-17 Pedro Alves <palves@redhat.com>
6781
6782 PR build/16445
6783 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6784 defined after including gdb_proc_service.h.
6785
6786 2014-01-16 Doug Evans <dje@google.com>
6787
6788 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6789 (match_dll): Use it.
6790
6791 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6792
6793 * target.h (target_ops) <read_btrace>: Change parameters and
6794 return type to allow error reporting.
6795 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6796 trace reading errors on.
6797 * linux-low.c (linux_low_read_btrace): Pass trace reading
6798 errors on.
6799 (linux_low_disable_btrace): New.
6800
6801 2014-01-15 Doug Evans <dje@google.com>
6802
6803 * inferiors.c (thread_id_to_gdb_id): Delete.
6804 * inferiors.h (thread_id_to_gdb_id): Delete.
6805
6806 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6807
6808 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6809 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6810 versions.
6811
6812 2014-01-08 Pedro Alves <palves@redhat.com>
6813
6814 * server.c (handle_status): Don't discard previous queued stop
6815 replies or thread's pending status here.
6816 (main) <disconnection>: Do it here instead.
6817
6818 2014-01-08 Pedro Alves <palves@redhat.com>
6819
6820 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6821 * server.c (visit_actioned_threads, handle_pending_status): New
6822 function.
6823 (handle_v_cont): Factor out parts to ...
6824 (resume): ... this new function. If in all-stop, and a thread
6825 being resumed has a pending status, report it without actually
6826 resuming.
6827 (myresume): Adjust to use the new 'resume' function.
6828 (clear_pending_status_callback, set_pending_status_callback)
6829 (find_status_pending_thread_callback): New functions.
6830 (handle_status): Handle the case of multiple threads having
6831 interesting statuses to report. Report threads' real last signal
6832 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6833 with an interesting thread to report the status for, instead of
6834 always reporting the status of the first thread.
6835
6836 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6837
6838 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6839 * gdbreplay.c (gdbreplay_version): Likewise.
6840
6841 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6842
6843 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6844 iov.iov_len with the real length in use.
6845
6846 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6847
6848 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6849 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6850 for all targets that use win32-low.c.
6851 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6852 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6853
6854 2013-12-13 Pedro Alves <palves@redhat.com>
6855
6856 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6857 if equal to TARGET_WAITKIND_LOADED.
6858 * win32-low.c (cached_status): New static global.
6859 (win32_wait): Add declaration.
6860 (do_initial_child_stuff): Flush all initial pending debug events
6861 up to the initial breakpoint.
6862 (win32_wait): If CACHED_STATUS was set, return that instead
6863 of doing a real wait. Remove the code resuming the execution
6864 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6865 during the initial phase. Also remove the code changing
6866 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6867 TARGET_WAITKIND_STOPPED.
6868
6869 2013-12-11 Yao Qi <yao@codesourcery.com>
6870
6871 * notif.c (handle_notif_ack): Return 0 if no notification
6872 matches.
6873
6874 2013-11-20 Doug Evans <dje@google.com>
6875
6876 * linux-low.c (linux_set_resume_request): Fix comment.
6877
6878 2013-11-20 Doug Evans <dje@google.com>
6879
6880 * linux-low.c (resume_status_pending_p): Tweak comment.
6881
6882 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6883
6884 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6885 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6886 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6887 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6888 (srv_amd64_regobj): Add amd64-mpx.o.
6889 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6890 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6891 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6892 * i387-fp.c (num_pl_bnd_register) Added constant.
6893 (num_pl_bnd_cfg_registers) Added constant.
6894 (struct i387_xsave) Added reserved area and MPX fields.
6895 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6896 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6897 function.
6898 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6899 (init_registers_amd64_mpx_linux): Declare new function.
6900 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6901 (x86_64_regmap): Add MPX registers.
6902 (x86_linux_read_description): Add MPX case.
6903 (initialize_low_arch): Initialize MPX targets.
6904
6905 2013-11-18 Tom Tromey <tromey@redhat.com>
6906
6907 * configure: Rebuild.
6908 * configure.ac: Don't check for stdlib.h.
6909 * gdbreplay.c: Unconditionally include stdlib.h.
6910
6911 2013-11-18 Tom Tromey <tromey@redhat.com>
6912
6913 * config.in: Rebuild.
6914 * configure: Rebuild.
6915 * configure.ac: Don't use AC_HEADER_DIRENT.
6916
6917 2013-11-18 Tom Tromey <tromey@redhat.com>
6918
6919 * server.h: Don't check HAVE_STRING_H.
6920 * gdbreplay.c: Don't check HAVE_STRING_H.
6921 * configure: Rebuild.
6922
6923 2013-11-18 Tom Tromey <tromey@redhat.com>
6924
6925 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6926 LIBGNU.
6927
6928 2013-11-08 Tom Tromey <tromey@redhat.com>
6929
6930 * configure, config.in: Rebuild.
6931 * configure.ac: Remove unused configury.
6932
6933 2013-11-08 Tom Tromey <tromey@redhat.com>
6934
6935 * acinclude.m4: Include common.m4, codeset.m4.
6936 * configure, config.in: Rebuild.
6937 * configure.ac: Use GDB_AC_COMMON.
6938
6939 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6940
6941 * linux-s390-low.c (HWCAP_S390_TE): New define.
6942 (s390_arch_setup): Consider the TE field in the HWCAP for
6943 determining 'have_regset_tdb'.
6944
6945 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6946
6947 PR gdb/16014
6948 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6949 call to sizeof.
6950
6951 2013-10-02 Pedro Alves <palves@redhat.com>
6952
6953 * server.c (process_serial_event): Don't output "GDBserver
6954 exiting" if GDB is connected through stdio.
6955 * target.c (mywait): Likewise, be silent if GDB is connected
6956 through stdio.
6957
6958 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6959
6960 * lynx-low.c (lynx_add_threads_after_attach): New function.
6961 (lynx_attach): Remove call to add_thread. Add call to
6962 lynx_add_threads_after_attach instead.
6963
6964 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6965
6966 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6967 * config.in, configure: Regenerated.
6968
6969 2013-09-18 Yao Qi <yao@codesourcery.com>
6970
6971 PR server/15959
6972 * server.c (start_inferior): Clear 'resume_info'.
6973
6974 2013-09-16 Jiong Wang <jiwang@tilera.com>
6975
6976 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6977 for each register.
6978
6979 2013-09-16 Jiong Wang <jiwang@tilera.com>
6980
6981 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6982 linux-tile-low.o to srv_tgtobj.
6983
6984 2013-09-16 Will Newton <will.newton@linaro.org>
6985
6986 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6987 out regs.
6988
6989 2013-09-06 Pedro Alves <palves@redhat.com>
6990
6991 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6992 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6993 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6994 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6995 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6996 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6997
6998 2013-09-06 Pedro Alves <palves@redhat.com>
6999
7000 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7001 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7002
7003 2013-09-06 Pedro Alves <palves@redhat.com>
7004
7005 * linux-amd64-ipa.c: Include tracepoint.h.
7006 * linux-i386-ipa.c: Include tracepoint.h.
7007
7008 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7009
7010 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7011 (ps_get_thread_area): New function.
7012
7013 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7014
7015 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7016 (initialize_low_arch): Call init_registers_crisv32 rather than
7017 init_register_crisv32.
7018
7019 2013-09-05 Pedro Alves <palves@redhat.com>
7020
7021 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7022 to ...
7023 * hostio.h: ... this new file.
7024 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7025 win32-low.c: Include hostio.h.
7026
7027 2013-09-05 Pedro Alves <palves@redhat.com>
7028
7029 * server.h (gdb_client_data, handler_func, callback_handler_func)
7030 (delete_file_handler, add_file_handler, append_callback_event)
7031 (delete_callback_event, start_event_loop, initialize_event_loop):
7032 Move to event-loop.h and include it.
7033 * event-loop.h: New file.
7034
7035 2013-09-05 Pedro Alves <palves@redhat.com>
7036
7037 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7038 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7039 (loaded_dll, unloaded_dll): Move to ...
7040 * dll.h: ... this new file.
7041 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7042
7043 2013-09-05 Pedro Alves <palves@redhat.com>
7044
7045 * server.h (current_process, get_thread_process, all_processes)
7046 (add_inferior_to_list, for_each_inferior, current_inferior)
7047 (remove_inferior, add_process, remove_process, find_process_pid)
7048 (have_started_inferiors_p, have_attached_inferiors_p)
7049 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7050 (clear_inferiors, find_inferior, find_inferior_id)
7051 (inferior_target_data, set_inferior_target_data)
7052 (inferior_regcache_data, set_inferior_regcache_data): Move to
7053 inferiors.h, and include it.
7054 * inferiors.h: New file.
7055
7056 2013-09-05 Pedro Alves <palves@redhat.com>
7057
7058 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7059 Move ...
7060 * ax.h: ... here.
7061
7062 2013-09-05 Pedro Alves <palves@redhat.com>
7063
7064 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7065 tracepoint.h.
7066 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7067 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7068 (handle_tracepoint_general_set, handle_tracepoint_query)
7069 (tracepoint_finished_step, tracepoint_was_hit)
7070 (release_while_stepping_state_list, current_traceframe)
7071 (in_readonly_region, traceframe_read_mem)
7072 (fetch_traceframe_registers, traceframe_read_sdata)
7073 (traceframe_read_info, struct fast_tpoint_collect_status)
7074 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7075 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7076 (supply_fast_tracepoint_registers)
7077 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7078 (ipa_tdesc, claim_trampoline_space)
7079 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7080 (agent_mem_read, agent_get_trace_state_variable_value)
7081 (agent_set_trace_state_variable_value, agent_tsv_read)
7082 (agent_mem_read_string, get_raw_reg_func_addr)
7083 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7084 * tracepoint.h: ... this new file.
7085
7086 2013-09-05 Pedro Alves <palves@redhat.com>
7087
7088 * server.h (perror_with_name, error, fatal, warning, paddress)
7089 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7090 include it.
7091 * utils.h: New file.
7092
7093 2013-09-05 Pedro Alves <palves@redhat.com>
7094
7095 * server.h (remote_debug, noack_mode, transport_is_reliable)
7096 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7097 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7098 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7099 (write_enn, initialize_async_io, enable_async_io)
7100 (disable_async_io, check_remote_input_interrupt_request)
7101 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7102 (dead_thread_notify, prepare_resume_reply)
7103 (decode_address_to_semicolon, decode_address, decode_m_packet)
7104 (decode_M_packet, decode_X_packet, decode_xfer_write)
7105 (decode_search_memory_packet, unhexify, hexify)
7106 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7107 (look_up_one_symbol, relocate_instruction)
7108 (monitor_output): Move to remote-utils.h, and include it.
7109 * remote-utils.h: New file.
7110
7111 2013-09-05 Pedro Alves <palves@redhat.com>
7112
7113 * server.h (_): Delete.
7114
7115 2013-09-02 Pedro Alves <palves@redhat.com>
7116
7117 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7118 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7119 allocated.
7120 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7121
7122 2013-09-02 Pierre Muller <muller@sourceware.org>
7123
7124 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7125 or WriteProcessMemory complete successfully and handle
7126 ERROR_PARTIAL_COPY error.
7127
7128 2013-09-02 Pedro Alves <palves@redhat.com>
7129
7130 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7131 error instead of EIO.
7132
7133 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7134
7135 PR server/15604
7136 * linux-low.c: Include filestuff.h.
7137 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7138 * lynx-low.c: Include filestuff.h.
7139 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7140 * server.c: Include filestuff.h.
7141 (main): Call notice_open_fds.
7142 * spu-low.c: Include filestuff.h.
7143 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7144
7145 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7146
7147 * Makefile.in: Explain why ../target and ../nat are not
7148 listed as include file search paths.
7149 (linux-waitpid.o): New object file rule.
7150 * configure.srv (srv_native_linux_obj): New variable.
7151 Replace all occurrences of linux native object files with
7152 $srv_native_linux_obj.
7153 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7154 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7155 (linux_enable_event_reporting): Remove declaration.
7156 (my_waitpid): Moved to common/linux-waitpid.c.
7157 (linux_wait_for_event): Pass ptid when calling
7158 linux_enable_event_reporting.
7159 (linux_supports_tracefork_flag): Remove.
7160 (linux_enable_event_reporting): Likewise.
7161 (linux_tracefork_grandchild): Remove.
7162 (STACK_SIZE): Moved to common/linux-ptrace.c.
7163 (linux_tracefork_child): Remove.
7164 (linux_test_for_tracefork): Remove.
7165 (linux_look_up_symbols): Call linux_supports_traceclone.
7166 (initialize_low): Remove call to linux_test_for_tracefork.
7167 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7168 common/linux-ptrace.h.
7169 (PTRACE_TYPE_ARG4): Likewise.
7170 Include linux-ptrace.h.
7171
7172 2013-08-21 Pedro Alves <palves@redhat.com>
7173
7174 * config.in: Renegerate.
7175
7176 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7177
7178 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7179 (SFILES): Remove $(srcdir)/common/target-common.c and
7180 add $(srcdir)/target/waitstatus.c.
7181 (OBS): Remove target-common.o and add waitstatus.o.
7182 (server_h): Remove $(srcdir)/../common/target-common.h and
7183 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7184 and $(srcdir)/../target/waitstatus.h.
7185 (target-common.o): Remove.
7186 (waitstatus.o): New target object file.
7187 * target.h: Do not include target-common.h and
7188 include target/resume.h, target/wait.h and
7189 target/waitstatus.h.
7190
7191 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7192
7193 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7194 to PTRACE_TYPE_ARG3.
7195 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7196 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7197 PTRACE_TYPE_ARG4.
7198 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7199 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7200
7201 2013-07-27 Jie Zhang <jie@codesourcery.com>
7202 Daniel Jacobowitz <dan@codesourcery.com>
7203 Yao Qi <yao@codesourcery.com>
7204
7205 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7206 (mips-linux-watch.o): New rule.
7207 (mips_linux_watch_h): New variable.
7208 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7209 srv_tgtobj.
7210 * linux-mips-low.c: Include mips-linux-watch.h.
7211 (struct arch_process_info, struct arch_lwp_info): New.
7212 (update_watch_registers_callback): New function.
7213 (mips_linux_new_process, mips_linux_new_thread) New functions.
7214 (mips_linux_prepare_to_resume, mips_insert_point): New
7215 functions.
7216 (mips_remove_point, mips_stopped_by_watchpoint): New
7217 functions.
7218 (rsp_bp_type_to_target_hw_bp_type): New function.
7219 (mips_stopped_data_address): New function.
7220 (the_low_target): Add watchpoint support functions.
7221
7222 2013-07-27 Yao Qi <yao@codesourcery.com>
7223
7224 * i386-low.c: Include break-common.h.
7225 (enum target_hw_bp_type): Remove.
7226
7227 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7228
7229 * Makefile.in (SFILES): /common/target-common.c.
7230 (OBS): Add target-common.o.
7231 (server_h): Add $(srcdir)/../common/target-common.h.
7232 (target-common.o): New target.
7233 * server.c (queue_stop_reply_callback): Free
7234 status string after use.
7235 * target.c (target_waitstatus_to_string): Remove.
7236 * target.h: Include target-common.h.
7237 (resume_kind): Likewise.
7238 (target_waitkind): Likewise.
7239 (target_waitstatus): Likewise.
7240 (TARGET_WNOHANG): Likewise.
7241
7242 2013-07-04 Yao Qi <yao@codesourcery.com>
7243
7244 * Makefile.in (host_alias): Use @host_noncanonical@.
7245 (target_alias): Use @target_noncanonical@.
7246 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7247 ACX_NONCANONICAL_HOST.
7248 * configure: Regenerated.
7249
7250 Revert:
7251 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7252
7253 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7254 * configure: Rebuild.
7255 * Makefile.in (version_host, version_target): Get from configure.
7256 (version.c): Use $(version_host) and $(version_target).
7257
7258 2013-07-03 Pedro Alves <palves@redhat.com>
7259
7260 * Makefile.in (config.status): Depend on development.sh.
7261 * acinclude.m4: Include libmcheck.m4.
7262 * configure: Regenerate.
7263
7264 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7265
7266 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7267 attribute inside the parentheses.
7268 (winapi_DebugSetProcessKillOnExit): Ditto.
7269 (winapi_DebugBreakProcess): Ditto.
7270 (winapi_GenerateConsoleCtrlEvent): Ditto.
7271
7272 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7273
7274 * notif.h (notif_event): Add a dummy member to avoid compiler
7275 errors.
7276
7277 2013-07-01 Pedro Alves <palves@redhat.com>
7278
7279 * hostio.c (HOSTIO_PATH_MAX): Define.
7280 (require_filename, handle_open, handle_unlink, handle_readlink):
7281 Use it.
7282
7283 2013-07-01 Pedro Alves <palves@redhat.com>
7284
7285 * server.h: Include "pathmax.h".
7286 * linux-low.c: Don't include sys/param.h.
7287 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7288 MAXPATHLEN.
7289 * win32-low.c: Don't include sys/param.h.
7290 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7291
7292 2013-07-01 Pedro Alves <palves@redhat.com>
7293
7294 * event-loop.c: Don't check HAVE_UNISTD_H before including
7295 <unistd.h>.
7296 * gdbreplay.c: Likewise.
7297 * remote-utils.c: Likewise.
7298 * server.c: Likewise.
7299 * configure.ac: Don't check for unistd.h.
7300 * configure: Regenerate.
7301
7302 2013-06-28 Tom Tromey <tromey@redhat.com>
7303
7304 * Makefile.in (version.c): Use version.in, not
7305 common/version.in.
7306
7307 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7308
7309 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7310 * configure: Rebuild.
7311 * Makefile.in (version_host, version_target): Get from configure.
7312 (version.c): Use $(version_host) and $(version_target).
7313
7314 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7315
7316 Fix trace-status to output user name without trailing colon.
7317 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7318
7319 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7320
7321 Fix trace-status to output proper start-time and stop-time.
7322 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7323 output start time and stop time in hex as gdb expects.
7324
7325 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7326
7327 * tracepoint.c (build_traceframe_info_xml): Output trace state
7328 variables present in the trace buffer.
7329
7330 2013-06-24 Tom Tromey <tromey@redhat.com>
7331
7332 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7333 create-version.sh.
7334 (version.o): Remove.
7335 * gdbreplay.c: Include version.h.
7336 (version, host_name): Don't declare.
7337 * server.h: Include version.h.
7338 (version, host_name): Don't declare.
7339
7340 2013-06-12 Pedro Alves <palves@redhat.com>
7341
7342 * linux-x86-low.c (linux_is_elf64): Delete global.
7343 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7344 with local linux_pid_exe_is_elf_64_file use.
7345
7346 2013-06-11 Pedro Alves <palves@redhat.com>
7347
7348 * linux-low.c (regset_disabled, disable_regset): New functions.
7349 (regsets_fetch_inferior_registers)
7350 (regsets_store_inferior_registers): Use them.
7351 (initialize_regsets_info); Don't allocate the disabled_regsets
7352 array here.
7353 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7354 comment.
7355
7356 2013-06-11 Pedro Alves <palves@redhat.com>
7357
7358 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7359 xmalloc.
7360
7361 2013-06-11 Pedro Alves <palves@redhat.com>
7362
7363 * linux-x86-low.c (initialize_low_arch): Call
7364 init_registers_x32_avx_linux.
7365
7366 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7367
7368 Fix compatibility with Android Bionic.
7369 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7370 it is not empty.
7371
7372 2013-06-07 Pedro Alves <palves@redhat.com>
7373
7374 PR server/14823
7375 * Makefile.in (OBS): Add tdesc.o.
7376 (IPA_OBJS): Add tdesc-ipa.o.
7377 (tdesc-ipa.o): New rule.
7378 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7379 interface.
7380 * linux-low.c (new_inferior): Delete.
7381 (disabled_regsets, num_regsets): Delete.
7382 (linux_add_process): Adjust to set the new per-process
7383 new_inferior flag.
7384 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7385 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7386 was a stop. When calling arch_setup, switch the current inferior
7387 to the thread that got an event.
7388 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7389 (regsets_fetch_inferior_registers)
7390 (regsets_store_inferior_registers): New regsets_info parameter.
7391 Adjust to use it.
7392 (linux_register_in_regsets): New regs_info parameter. Adjust to
7393 use it.
7394 (register_addr, fetch_register, store_register): New usrregs_info
7395 parameter. Adjust to use it.
7396 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7397 parameter regs_info. Adjust to use it.
7398 (linux_fetch_registers): Get the current inferior's regs_info, and
7399 adjust to use it.
7400 (linux_store_registers): Ditto.
7401 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7402 (initialize_low): Don't initialize the target_regsets here. Call
7403 initialize_low_arch.
7404 * linux-low.h (target_regsets): Delete declaration.
7405 (struct regsets_info): New.
7406 (struct usrregs_info): New.
7407 (struct regs_info): New.
7408 (struct process_info_private) <new_inferior>: New field.
7409 (struct linux_target_ops): Delete the num_regs, regmap, and
7410 regset_bitmap fields. New field regs_info.
7411 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7412 * i387-fp.c (num_xmm_registers): Delete.
7413 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7414 calls to new interface.
7415 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7416 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7417 Infer the number of xmm registers from the regcache's target
7418 description.
7419 * i387-fp.h (num_xmm_registers): Delete.
7420 * inferiors.c (add_thread): Don't install the thread's regcache
7421 here.
7422 * proc-service.c (gregset_info): Fetch the current inferior's
7423 regs_info. Adjust to use it.
7424 * regcache.c: Include tdesc.h.
7425 (register_bytes, reg_defs, num_registers)
7426 (gdbserver_expedite_regs): Delete.
7427 (get_thread_regcache): If the thread doesn't have a regcache yet,
7428 create one, instead of aborting gdbserver.
7429 (regcache_invalidate_one): Rename to ...
7430 (regcache_invalidate_thread): ... this.
7431 (regcache_invalidate_one): New.
7432 (regcache_invalidate): Only invalidate registers of the current
7433 process.
7434 (init_register_cache): Add target_desc parameter, and use it.
7435 (new_register_cache): Ditto. Assert the target description has a
7436 non zero registers_size.
7437 (regcache_cpy): Add assertions. Adjust.
7438 (realloc_register_cache, set_register_cache): Delete.
7439 (registers_to_string, registers_from_string): Adjust.
7440 (find_register_by_name, find_regno, find_register_by_number)
7441 (register_cache_size): Add target_desc parameter, and use it.
7442 (free_register_cache_thread, free_register_cache_thread_one)
7443 (regcache_release, register_cache_size): New.
7444 (register_size): Add target_desc parameter, and use it.
7445 (register_data, supply_register, supply_register_zeroed)
7446 (supply_regblock, supply_register_by_name, collect_register)
7447 (collect_register_as_string, collect_register_by_name): Adjust.
7448 * regcache.h (struct target_desc): Forward declare.
7449 (struct regcache) <tdesc>: New field.
7450 (init_register_cache, new_register_cache): Add target_desc
7451 parameter.
7452 (regcache_invalidate_thread): Declare.
7453 (regcache_invalidate_one): Delete declaration.
7454 (regcache_release): Declare.
7455 (find_register_by_number, register_cache_size, register_size)
7456 (find_regno): Add target_desc parameter.
7457 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7458 declarations.
7459 * remote-utils.c: Include tdesc.h.
7460 (outreg, prepare_resume_reply): Adjust.
7461 * server.c: Include tdesc.h.
7462 (gdbserver_xmltarget): Delete declaration.
7463 (get_features_xml, process_serial_event): Adjust.
7464 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7465 declare.
7466 (struct process_info) <tdesc>: New field.
7467 (ipa_tdesc): Declare.
7468 * tdesc.c: New file.
7469 * tdesc.h: New file.
7470 * tracepoint.c: Include tdesc.h.
7471 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7472 (get_context_regcache): Adjust to pass ipa_tdesc down.
7473 (do_action_at_tracepoint): Adjust to get the register cache size
7474 from the context regcache's description.
7475 (traceframe_walk_blocks): Adjust to get the register cache size
7476 from the current trace frame's description.
7477 (traceframe_get_pc): Adjust to get current trace frame's
7478 description and pass it down.
7479 (gdb_collect): Adjust to get the register cache size from the
7480 IPA's description.
7481 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7482 (gdbserver_xmltarget): Delete.
7483 (initialize_low_tracepoint): Set the ipa's target description.
7484 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7485 (initialize_low_tracepoint): Set the ipa's target description.
7486 * linux-x86-low.c: Include tdesc.h.
7487 [__x86_64__] (is_64bit_tdesc): New.
7488 (ps_get_thread_area, x86_get_thread_area): Use it.
7489 (i386_cannot_store_register): Rename to ...
7490 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7491 (i386_cannot_fetch_register): Rename to ...
7492 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7493 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7494 to new interface.
7495 (target_regsets): Rename to ...
7496 (x86_regsets): ... this.
7497 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7498 interface.
7499 (x86_siginfo_fixup): Use is_64bit_tdesc.
7500 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7501 (tdesc_x32_avx_linux, tdesc_x32_linux)
7502 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7503 Declare.
7504 (x86_linux_update_xmltarget): Delete.
7505 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7506 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7507 (AMD64_LINUX_USER64_CS): New.
7508 (x86_linux_read_description): New, based on
7509 x86_linux_update_xmltarget.
7510 (same_process_callback): New.
7511 (x86_arch_setup_process_callback): New.
7512 (x86_linux_update_xmltarget): New.
7513 (x86_regsets_info): New.
7514 (amd64_linux_regs_info): New.
7515 (i386_linux_usrregs_info): New.
7516 (i386_linux_regs_info): New.
7517 (x86_linux_regs_info): New.
7518 (x86_arch_setup): Reimplement.
7519 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7520 (x86_emit_ops): Ditto.
7521 (the_low_target): Adjust. Install x86_linux_regs_info,
7522 x86_cannot_fetch_register, and x86_cannot_store_register.
7523 (initialize_low_arch): New.
7524 * linux-ia64-low.c (tdesc_ia64): Declare.
7525 (ia64_fetch_register): Adjust.
7526 (ia64_usrregs_info, regs_info): New globals.
7527 (ia64_regs_info): New function.
7528 (the_low_target): Adjust.
7529 (initialize_low_arch): New function.
7530 * linux-sparc-low.c (tdesc_sparc64): Declare.
7531 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7532 Adjust.
7533 (sparc_arch_setup): New function.
7534 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7535 (the_low_target): Adjust.
7536 (initialize_low_arch): New function.
7537 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7538 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7539 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7540 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7541 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7542 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7543 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7544 (tdesc_powerpc_isa205_vsx64l): Declare.
7545 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7546 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7547 (ppc_set_pc, ppc_get_hwcap): Adjust.
7548 (ppc_usrregs_info): Forward declare.
7549 (!__powerpc64__) ppc_regmap_adjusted: New global.
7550 (ppc_arch_setup): Adjust to the current process'es target
7551 description.
7552 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7553 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7554 (ppc_store_evrregset): Adjust.
7555 (target_regsets): Rename to ...
7556 (ppc_regsets): ... this, and make static.
7557 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7558 (ppc_regs_info): New function.
7559 (the_low_target): Adjust.
7560 (initialize_low_arch): New function.
7561 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7562 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7563 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7564 (tdesc_s390x_linux64v2): Declare.
7565 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7566 (s390_fill_gregset, s390_store_last_break): Adjust.
7567 (target_regsets): Rename to ...
7568 (s390_regsets): ... this, and make static.
7569 (s390_get_pc, s390_set_pc): Adjust.
7570 (s390_get_hwcap): New target_desc parameter, and use it.
7571 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7572 (s390_arch_setup): Adjust to set the current process'es target
7573 description. Don't adjust the regmap.
7574 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7575 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7576 (regs_info_3264): New globals.
7577 (s390_regs_info): New function.
7578 (the_low_target): Adjust.
7579 (initialize_low_arch): New function.
7580 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7581 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7582 [__mips64] (init_registers_mips_linux)
7583 (init_registers_mips_dsp_linux): Delete defines.
7584 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7585 (have_dsp): New global.
7586 (mips_read_description): New, based on mips_arch_setup.
7587 (mips_arch_setup): Reimplement.
7588 (get_usrregs_info): New function.
7589 (mips_cannot_fetch_register, mips_cannot_store_register)
7590 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7591 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7592 (target_regsets): Rename to ...
7593 (mips_regsets): ... this, and make static.
7594 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7595 (dsp_regs_info, regs_info): New globals.
7596 (mips_regs_info): New function.
7597 (the_low_target): Adjust.
7598 (initialize_low_arch): New function.
7599 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7600 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7601 Declare.
7602 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7603 (arm_read_description): New, with bits factored from
7604 arm_arch_setup.
7605 (arm_arch_setup): Reimplement.
7606 (target_regsets): Rename to ...
7607 (arm_regsets): ... this, and make static.
7608 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7609 (arm_regs_info): New function.
7610 (the_low_target): Adjust.
7611 (initialize_low_arch): New function.
7612 * linux-m68k-low.c (tdesc_m68k): Declare.
7613 (target_regsets): Rename to ...
7614 (m68k_regsets): ... this, and make static.
7615 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7616 (m68k_regs_info): New function.
7617 (m68k_arch_setup): New function.
7618 (the_low_target): Adjust.
7619 (initialize_low_arch): New function.
7620 * linux-sh-low.c (tdesc_sharch): Declare.
7621 (target_regsets): Rename to ...
7622 (sh_regsets): ... this, and make static.
7623 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7624 (sh_regs_info, sh_arch_setup): New functions.
7625 (the_low_target): Adjust.
7626 (initialize_low_arch): New function.
7627 * linux-bfin-low.c (tdesc_bfin): Declare.
7628 (bfin_arch_setup): New function.
7629 (bfin_usrregs_info, regs_info): New globals.
7630 (bfin_regs_info): New function.
7631 (the_low_target): Adjust.
7632 (initialize_low_arch): New function.
7633 * linux-cris-low.c (tdesc_cris): Declare.
7634 (cris_arch_setup): New function.
7635 (cris_usrregs_info, regs_info): New globals.
7636 (cris_regs_info): New function.
7637 (the_low_target): Adjust.
7638 (initialize_low_arch): New function.
7639 * linux-cris-low.c (tdesc_crisv32): Declare.
7640 (cris_arch_setup): New function.
7641 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7642 (cris_regs_info): New function.
7643 (the_low_target): Adjust.
7644 (initialize_low_arch): New function.
7645 * linux-m32r-low.c (tdesc_m32r): Declare.
7646 (m32r_arch_setup): New function.
7647 (m32r_usrregs_info, regs_info): New globals.
7648 (m32r_regs_info): Adjust.
7649 (initialize_low_arch): New function.
7650 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7651 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7652 (tic6x_usrregs_info): Forward declare.
7653 (tic6x_read_description): New function, based on ...
7654 (tic6x_arch_setup): ... this. Reimplement.
7655 (target_regsets): Rename to ...
7656 (tic6x_regsets): ... this, and make static.
7657 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7658 (tic6x_regs_info): New function.
7659 (the_low_target): Adjust.
7660 (initialize_low_arch): New function.
7661 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7662 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7663 (target_regsets): Rename to ...
7664 (xtensa_regsets): ... this, and make static.
7665 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7666 globals.
7667 (xtensa_arch_setup, xtensa_regs_info): New functions.
7668 (the_low_target): Adjust.
7669 (initialize_low_arch): New function.
7670 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7671 (nios2_arch_setup): Set the current process'es tdesc.
7672 (target_regsets): Rename to ...
7673 (nios2_regsets): ... this.
7674 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7675 (nios2_regs_info): New function.
7676 (the_low_target): Adjust.
7677 (initialize_low_arch): New function.
7678 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7679 (aarch64_arch_setup): Set the current process'es tdesc.
7680 (target_regsets): Rename to ...
7681 (aarch64_regsets): ... this.
7682 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7683 (aarch64_regs_info): New function.
7684 (the_low_target): Adjust.
7685 (initialize_low_arch): New function.
7686 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7687 globals.
7688 (target_regsets): Rename to ...
7689 (tile_regsets): ... this.
7690 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7691 (tile_regs_info): New function.
7692 (tile_arch_setup): Set the current process'es tdesc.
7693 (the_low_target): Adjust.
7694 (initialize_low_arch): New function.
7695 * spu-low.c (tdesc_spu): Declare.
7696 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7697 * win32-arm-low.c (tdesc_arm): Declare.
7698 (arm_arch_setup): New function.
7699 (the_low_target): Install arm_arch_setup instead of
7700 init_registers_arm.
7701 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7702 (init_windows_x86): Rename to ...
7703 (i386_arch_setup): ... this. Set `win32_tdesc'.
7704 (the_low_target): Adjust.
7705 * win32-low.c (win32_tdesc): New global.
7706 (child_add_thread): Don't create the thread cache here.
7707 (do_initial_child_stuff): Set the new process'es tdesc.
7708 * win32-low.h (struct target_desc): Forward declare.
7709 (win32_tdesc): Declare.
7710 * lynx-i386-low.c (tdesc_i386): Declare global.
7711 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7712 * lynx-low.c (lynx_tdesc): New global.
7713 (lynx_add_process): Set the new process'es tdesc.
7714 * lynx-low.h (struct target_desc): Forward declare.
7715 (lynx_tdesc): Declare global.
7716 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7717 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7718 * nto-low.c (nto_tdesc): New global.
7719 (do_attach): Set the new process'es tdesc.
7720 * nto-low.h (struct target_desc): Forward declare.
7721 (nto_tdesc): Declare.
7722 * nto-x86-low.c (tdesc_i386): Declare.
7723 (nto_x86_arch_setup): Set `nto_tdesc'.
7724
7725 2013-06-04 Gary Benson <gbenson@redhat.com>
7726
7727 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7728 to qSupported response when appropriate.
7729 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7730 with nonzero-length annex.
7731 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7732 arguments supplied in annex.
7733
7734 2013-05-31 Doug Evans <dje@google.com>
7735
7736 PR server/15594
7737 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7738 64 bits in 64-cross-32 environment.
7739
7740 2013-05-28 Pedro Alves <palves@redhat.com>
7741
7742 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7743 (aarch64-without-fpu.c): Delete rule.
7744 * configure.srv (aarch64*-*-linux*): Remove references to
7745 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7746 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7747 declaration.
7748
7749 2013-05-24 Pedro Alves <palves@redhat.com>
7750
7751 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7752 instead of strchr/decode_address. Error if the range isn't split
7753 with a ','. Don't assume there's be a ':' in the action.
7754
7755 2013-05-23 Yao Qi <yao@codesourcery.com>
7756 Pedro Alves <palves@redhat.com>
7757
7758 * linux-low.c (lwp_in_step_range): New function.
7759 (linux_wait_1): If the thread was range stepping and stopped
7760 outside the stepping range, report the stop to GDB. Otherwise,
7761 continue stepping. Add range stepping debug output.
7762 (linux_set_resume_request): Copy the step range from the resume
7763 request to the lwp.
7764 (linux_supports_range_stepping): New.
7765 (linux_target_ops) <supports_range_stepping>: Set to
7766 linux_supports_range_stepping.
7767 * linux-low.h (struct linux_target_ops)
7768 <supports_range_stepping>: New field.
7769 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7770 * linux-x86-low.c (x86_supports_range_stepping): New.
7771 (the_low_target) <supports_range_stepping>: Set to
7772 x86_supports_range_stepping.
7773 * server.c (handle_v_cont): Handle 'r' action.
7774 (handle_v_requests): Append ";r" if the target supports range
7775 stepping.
7776 * target.h (struct thread_resume) <step_range_start,
7777 step_range_end>: New fields.
7778 (struct target_ops) <supports_range_stepping>:
7779 New field.
7780 (target_supports_range_stepping): New macro.
7781
7782 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7783
7784 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7785 confusion in comment.
7786
7787 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7788
7789 * lynx-low.c (struct process_info_private): New type.
7790 (lynx_add_process): New function.
7791 (lynx_create_inferior, lynx_attach): Replace calls to
7792 add_process by calls to lynx_add_process.
7793 (lynx_resume): If PTID is null, then try using
7794 current_process()->private->last_wait_event_ptid.
7795 Add comments.
7796 (lynx_clear_inferiors): Delete. The contents of that function
7797 has been inlined in lynx_mourn;
7798 (lynx_wait_1): Save the ptid in the process's private data.
7799 (lynx_mourn): Free the process' private data. Replace call
7800 to lynx_clear_inferiors by call to clear_inferiors.
7801
7802 2013-05-17 Yao Qi <yao@codesourcery.com>
7803
7804 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7805 the right place.
7806
7807 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7808
7809 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7810 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7811 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7812 PT_TEXT_END_ADDR guards. Update comments.
7813 (linux_target_op) <read_offsets>: Conditionally define to
7814 linux_read_offsets if the target is UCLIBC and if it defines
7815 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7816
7817 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7818 Andrew Jenner <andrew@codesourcery.com>
7819
7820 * Makefile.in (SFILES): Add linux-nios2-low.c.
7821 (clean): Add action to delete nios2-linux.c.
7822 (nios2-linux.c): New rule.
7823 * configure.srv: Add nios2*-*-linux*.
7824 * linux-nios2-low.c: New.
7825
7826 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7827
7828 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7829
7830 2013-04-25 Hui Zhu <hui@codesourcery.com>
7831
7832 PR gdb/15186
7833 * ax.c (ax_printf): Add fflush.
7834
7835 2013-04-22 Tom Tromey <tromey@redhat.com>
7836
7837 * Makefile.in (SFILES): Add filestuff.c.
7838 (OBS): Add filestuff.o.
7839 (filestuff.o): New target.
7840 * config.in, configure: Rebuild.
7841 * configure.ac: Check for fdwalk, pipe2.
7842
7843 2013-04-17 Pedro Alves <palves@redhat.com>
7844
7845 * configure.ac (USE_THREAD_DB): Delete variable.
7846 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7847 Don't AC_SUBST USE_THREAD_DB.
7848 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7849 * config.in, configure: Regenerate.
7850
7851 2013-04-16 Pedro Alves <palves@redhat.com>
7852
7853 * linux-low.h (struct lwp_info) <thread_known>: Move under
7854 the USE_THREAD_DB #ifdef.
7855
7856 2013-04-16 Pedro Alves <palves@redhat.com>
7857
7858 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7859 (linux-low.o): Delete rule.
7860 * linux-low.h: Always include "gdb_thread_db.h" instead of
7861 conditionally including thread_db.h.
7862 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7863 HAVE_THREAD_DB_H.
7864
7865 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7866
7867 * Makefile.in (install-only): Fix make install regression.
7868
7869 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7870
7871 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7872 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7873 installation.
7874 * gdbserver.1: Remove.
7875
7876 2013-03-22 Pedro Alves <palves@redhat.com>
7877
7878 * linux-low.c (handle_extended_wait): Don't call
7879 linux_enable_event_reporting.
7880
7881 2013-03-15 Tony Theodore <tonyt@logyst.com>
7882
7883 PR build/9098:
7884 * Makefile.in (SHELL): Use @SHELL@.
7885
7886 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7887
7888 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7889 compiler warning.
7890
7891 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7892
7893 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7894 Remove extraneous NULL element.
7895
7896 2013-03-13 Yao Qi <yao@codesourcery.com>
7897
7898 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7899 'V' block in trace frame.
7900
7901 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7902
7903 * target.h (struct target_ops): Add btrace ops.
7904 (target_supports_btrace): New macro.
7905 (target_enable_btrace): New macro.
7906 (target_disable_btrace): New macro.
7907 (target_read_btrace): New macro.
7908 * gdbthread.h (struct thread_info): Add btrace field.
7909 * server.c: Include btrace-common.h.
7910 (handle_btrace_general_set): New function.
7911 (handle_btrace_enable): New function.
7912 (handle_btrace_disable): New function.
7913 (handle_general_set): Call handle_btrace_general_set.
7914 (handle_qxfer_btrace): New function.
7915 (struct qxfer qxfer_packets[]): Add btrace entry.
7916 * inferiors.c (remove_thread): Disable btrace.
7917 * linux-low: Include linux-btrace.h.
7918 (linux_low_enable_btrace): New function.
7919 (linux_low_read_btrace): New function.
7920 (linux_target_ops): Add btrace ops.
7921 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7922 Add srv_linux_btrace=yes.
7923 (x86_64-*-linux*): Add linux-btrace.o.
7924 Add srv_linux_btrace=yes.
7925 * configure.ac: Define HAVE_LINUX_BTRACE.
7926 * config.in: Regenerated.
7927 * configure: Regenerated.
7928
7929 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7930
7931 * server.c (handle_qxfer): Preserve error message if -3 is
7932 returned.
7933 (qxfer): Document the -3 return value.
7934
7935 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7936
7937 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7938 (linux_btrace_h): New variable.
7939 (linux-btrace.o): New rule.
7940
7941 2013-03-08 Stan Shebs <stan@codesourcery.com>
7942 Hafiz Abid Qadeer <abidh@codesourcery.com>
7943
7944 * tracepoint.c (trace_buffer_size): New global.
7945 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7946 (init_trace_buffer): Change to one-argument function. Allocate
7947 trace buffer memory.
7948 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7949 handle QTBuffer:size packet.
7950 (cmd_bigqtbuffer_size): New function.
7951 (initialize_tracepoint): Call init_trace_buffer with
7952 DEFAULT_TRACE_BUFFER_SIZE.
7953 * server.c (handle_query): Add QTBuffer:size in the
7954 supported packets.
7955
7956 2013-03-07 Yao Qi <yao@codesourcery.com>
7957
7958 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7959 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7960 of -1.
7961 (cmd_qtsp): Adjust condition. Do post increment.
7962 Set cur_action and cur_step_action back to 0.
7963
7964 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7965
7966 PR server/15236
7967 * linux-low.c (linux_write_memory): Return early success if LEN is
7968 zero.
7969
7970 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7971
7972 * configure.srv: Add x86_64-*-cygwin* as target.
7973
7974 2013-02-28 Tom Tromey <tromey@redhat.com>
7975
7976 * configure.ac: Invoke AC_SYS_LARGEFILE.
7977 * configure, config.in: Rebuild.
7978
7979 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7980
7981 * win32-low.c: Throughout, fix format strings and casts of
7982 printf-like functions to avoid type related warnings on all
7983 platforms.
7984 (get_child_debug_event): Print dwDebugEventCode as hex since
7985 that's how it's usually documented.
7986
7987 2013-02-28 Yao Qi <yao@codesourcery.com>
7988
7989 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7990 pulongest.
7991
7992 2013-02-27 Jiong Wang <jiwang@tilera.com>
7993
7994 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7995 (reg-tilegx32.c): New rule.
7996 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7997 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7998 different register info initializer according to elf class.
7999 (init_registers_tilgx32): New function. The tilegx32 register info
8000 initializer.
8001 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8002 (tile_store_gregset): Likewise.
8003
8004 2013-02-27 Yao Qi <yao@codesourcery.com>
8005
8006 * server.c (process_point_options): Print debug message when
8007 debug_threads is true.
8008
8009 2013-02-26 Yao Qi <yao@codesourcery.com>
8010
8011 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8012
8013 2013-02-19 Pedro Alves <palves@redhat.com>
8014 Kai Tietz <ktietz@redhat.com>
8015
8016 PR gdb/15161
8017
8018 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8019 instead of strtoul to extract address from packet.
8020 (process_serial_event) <'z'>: Likewise.
8021
8022 2013-02-18 Yao Qi <yao@codesourcery.com>
8023
8024 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8025
8026 2013-02-14 Pedro Alves <palves@redhat.com>
8027
8028 Plug memory leak.
8029
8030 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8031 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8032
8033 2013-02-14 Pedro Alves <palves@redhat.com>
8034
8035 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8036
8037 2013-02-14 Pedro Alves <palves@redhat.com>
8038
8039 * tracepoint.c (save_string): Delete.
8040 (add_tracepoint_action): Use savestring instead of save_string.
8041
8042 2013-02-12 Pedro Alves <palves@redhat.com>
8043
8044 * linux-xtensa-low.c: Ditto.
8045 * xtensa-xtregs.c: Ditto.
8046
8047 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8048
8049 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8050 thread_db.
8051
8052 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8053
8054 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8055 aarch64_num_wp_regs and aarch64_num_bp_regs to
8056 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8057
8058 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8059
8060 * linux-aarch64-low.c (ps_get_thread_area): Replace
8061 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8062
8063 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8064 Marcus Shawcroft <marcus.shawcroft@arm.com>
8065 Nigel Stephens <nigel.stephens@arm.com>
8066 Yufeng Zhang <yufeng.zhang@arm.com>
8067
8068 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8069 (aarch64.c, aarch64-without-fpu.c): New targets.
8070 * configure.srv (aarch64*-*-linux*): New.
8071 * linux-aarch64-low.c: New file.
8072
8073 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8074
8075 * linux-low.c (handle_extended_wait, linux_create_inferior)
8076 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8077 (dequeue_one_deferred_signal, linux_resume_one_thread)
8078 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8079 (linux_tracefork_grandchild, linux_test_for_tracefork)
8080 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8081 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8082 where the argument is 0.
8083
8084 2013-01-25 Yao Qi <yao@codesourcery.com>
8085
8086 * event-loop.c: Include "queue.h".
8087 (gdb_event_p): New typedef.
8088 (struct gdb_event) <next_event>: Remove.
8089 (event_queue): Change to QUEUE(gdb_event_p).
8090 (async_queue_event): Remove.
8091 (gdb_event_xfree): New.
8092 (initialize_event_loop): New.
8093 (process_event): Use API from QUEUE.
8094 (wait_for_event): Likewise.
8095 * server.c (main): Call initialize_event_loop.
8096 * server.h (initialize_event_loop): Declare.
8097
8098 2013-01-18 Yao Qi <yao@codesourcery.com>
8099
8100 * ax.h (struct eval_agent_expr_context): New.
8101 (gdb_eval_agent_expr): Update declaration.
8102 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8103 TFRAME. Add new argument CTX.
8104 * server.h (struct eval_agent_expr_context): Declare.
8105 (agent_mem_read, agent_tsv_read): Update declaration.
8106 (agent_mem_read_string): Likewise.
8107 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8108 (add_traceframe_block): Add new argument TPOINT.
8109 Increase TPOINT->traceframe_usage.
8110 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8111 eval_tracepoint_agent_expr.
8112 (condition_true_at_tracepoint): Likewise.
8113 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8114 (agent_mem_read_string, agent_tsv_read): Likewise.
8115
8116 2013-01-16 Yao Qi <yao@codesourcery.com>
8117
8118 * linux-low.c (linux_resume_one_lwp): Don't check
8119 'lwp->bp_reinsert != 0'.
8120
8121 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8122 Pedro Alves <palves@redhat.com>
8123
8124 * lynx-low.c (ptrace_request_to_str): Define a temporary
8125 macro and use it to simplify this function's implementation.
8126
8127 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8128
8129 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8130 sets errno.
8131
8132 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8133
8134 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8135
8136 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8137
8138 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8139
8140 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8141
8142 * lynx-low.c (lynx_resume): Use the resume_info parameter
8143 to determine the ptid for the lynx_ptrace call, unless
8144 it is equal to minus_one_ptid, in which case we use the
8145 ptid of the current_inferior.
8146 (lynx_wait_1): After having received a thread create/exit
8147 event, resume the inferior's execution using the signaling
8148 thread's ptid, rather than the old ptid.
8149
8150 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8151
8152 * lynx-low.c (lynx_resume): Delete variable ret.
8153
8154 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8155
8156 * gdbreplay.c (gdbreplay_version): Update copyright year.
8157 * server.c (gdbserver_version): Likewise.
8158
8159 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8160
8161 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8162 new thread.
8163
8164 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8165
8166 * lynx-low.c (ptrace_request_to_str): Add handling for
8167 PTRACE_GETTRACESIG.
8168
8169 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8170
8171 * lynx-low.c (lynx_attach): Delete variable new_process.
8172
8173 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8174
8175 * lynx-low.c (lynx_create_inferior): Delete variable
8176 new_process.
8177
8178 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8179
8180 * lynx-low.c (ptrace_request_to_str): Do not handle
8181 PTRACE_GETTHREADLIST if this macro does not exist.
8182
8183 2012-12-15 Yao Qi <yao@codesourcery.com>
8184
8185 * Makefile.in (OBS): Add notif.o.
8186 * notif.c, notif.h: New.
8187 * server.c: Include "notif.h".
8188 (struct vstop_notif) <next>: Remove.
8189 <base>: New field.
8190 (queue_stop_reply): Update.
8191 (push_event, send_next_stop_reply): Remove.
8192 (discard_queued_stop_replies): Update.
8193 (notif_stop): New variable.
8194 (handle_v_stopped): Remove.
8195 (handle_v_requests): Don't call handle_v_stopped. Call
8196 handle_ack_notif instead.
8197 (queue_stop_reply_callback): Call notif_event_enque instead
8198 of queue_stop_reply.
8199 (handle_status): Don't call send_next_stop_reply, call
8200 notif_write_event instead.
8201 (kill_inferior_callback): Likewise.
8202 (detach_or_kill_inferior_callback): Likewise.
8203 (main): Call initialize_notif.
8204 (process_serial_event): Call QUEUE_is_empty.
8205 (handle_target_event): Call notif_push instead of push event.
8206 * server.h (push_event): Remove declaration.
8207
8208 2012-12-10 Tom Tromey <tromey@redhat.com>
8209
8210 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8211 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8212 macros.
8213 (.c.o): Rewrite.
8214 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8215 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8216 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8217 (amd64-linux-ipa.o, ax.o): Rewrite.
8218 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8219 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8220 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8221 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8222 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8223 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8224 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8225 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8226 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8227 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8228 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8229 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8230 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8231 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8232 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8233 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8234 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8235 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8236 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8237 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8238 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8239 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8240 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8241 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8242 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8243 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8244 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8245 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8246 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8247 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8248 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8249 (reg-tilegx.o): Remove.
8250 (all_object_files): New macro.
8251 Include .deps files.
8252 * aclocal.m4, configure: Rebuild.
8253 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8254 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8255 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8256
8257 2012-12-05 Tom Tromey <tromey@redhat.com>
8258
8259 PR gdb/14917:
8260 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8261
8262 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8263
8264 * configure.ac: Check for linux/perf_event.h.
8265 * config.in: Regenerated.
8266 * configure: Regenerated.
8267
8268 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8269
8270 * hostio.c (handle_readlink): Decrease buffer size
8271 parameter passed to readlink by one byte.
8272
8273 2012-11-26 Yao Qi <yao@codesourcery.com>
8274
8275 * configure.ac (build_warnings): Append '-Wempty-body'.
8276 * configure: Regenerated.
8277 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8278 body.
8279
8280 2012-11-15 Pierre Muller <muller@sourceware.org>
8281
8282 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8283 * config.in: Regenerate.
8284 * configure: Regenerate.
8285 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8286 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8287 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8288 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8289 header.
8290 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8291 instead of <sys/wait.h> header.
8292 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8293
8294 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8295
8296 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8297 (various make rules): Remove -DGDBSERVER
8298
8299 2012-11-09 Yao Qi <yao@codesourcery.com>
8300
8301 * spu-low.c (current_ptid): Move it to ..
8302 * gdbthread.h: ... here. New.
8303 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8304 * server.c (myresume, process_serial_event): Likewise.
8305 * thread-db.c (thread_db_find_new_threads): Likewise.
8306 * tracepoint.c (run_inferior_command): Likewise.
8307
8308 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8309
8310 * server.c (handle_search_memory_1): Include access length in
8311 warning message.
8312
8313 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8314
8315 * linux-crisv32-low.c: Fix compile errors.
8316
8317 2012-09-04 Yao Qi <yao@codesourcery.com>
8318
8319 * tracepoint.c (cmd_qtsv): Adjust debug message.
8320 Don't check CUR_TPOINT.
8321
8322 2012-08-28 Yao Qi <yao@codesourcery.com>
8323
8324 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8325 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8326 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8327 Remove declarations of xmalloc, xreallloc, xstrdup and
8328 freeargv.
8329 * Makefile.in (libiberty_h): New.
8330 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8331 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8332
8333 2012-08-23 Yao Qi <yao@codesourcery.com>
8334
8335 * server.h: Remove declaration of 'xsnprintf'.
8336
8337 2012-08-22 Keith Seitz <keiths@redhat.com>
8338
8339 * server.h: Include build-gnulib-gbserver/config.h.
8340 * gdbreplay.c: Likewise.
8341
8342 2012-08-08 Doug Evans <dje@google.com>
8343
8344 * Makefile.in (SFILES): Add gdb_vecs.c.
8345 (OBS): Add gdb_vecs.o.
8346 (gdb_vecs_h, host_defs_h): New variables.
8347 (thread-db.o): Add $(gdb_vecs_h) dependency.
8348 (gdb_vecs.o): New rule.
8349 * thread-db.c: #include "gdb_vecs.h".
8350 (thread_db_load_search): Use a vector to iterate over path elements.
8351 Handle text appearing after "$pdir".
8352
8353 * configure.ac: Add check for strstr.
8354 * config.in: Regenerate.
8355 * configure: Regenerate.
8356
8357 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8358
8359 * hostio.c (handle_pread): If pread fails, fall back to attempting
8360 lseek/read.
8361 (handle_pwrite): Likewise for pwrite.
8362
8363 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8364
8365 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8366 between unsupported TYPE and unimplementable ADDR/LEN combination.
8367 (arm_insert_point): Act on new return value.
8368
8369 2012-07-31 Pedro Alves <palves@redhat.com>
8370
8371 * server.c (process_point_options): Only skip tokens if we find
8372 one that is unrecognized. Don't treat 'X' specially while
8373 skipping unrecognized tokens.
8374
8375 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8376
8377 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8378 to 4-byte-align HW breakpoint addresses for Thumb.
8379
8380 2012-07-27 Yao Qi <yao@codesourcery.com>
8381
8382 PR remote/14161.
8383
8384 * server.h: Declare gdb_agent_about_to_close.
8385 * target.c (kill_inferior): Include "agent.h".
8386 New. Send command 'kill'.
8387 * target.h (kill_inferior): Removed macro.
8388 * tracepoint.c (gdb_agent_about_to_close): New.
8389 (gdb_agent_helper_thread): Handle command 'close'.
8390 Wait endlessly until the inferior stops.
8391 Install gdb_agent_remove_socket to atexit hook.
8392 (agent_socket_name): New static variable.
8393 (gdb_agent_socket_init): Replace local variable 'name' with
8394 'agent_socket_name'.
8395 (gdb_agent_remove_socket): New.
8396
8397 2012-07-27 Yao Qi <yao@codesourcery.com>
8398
8399 * server.c (process_point_options): Stop at 'X' when parsing.
8400
8401 2012-07-19 Michael Eager <eager@eagercon.com>
8402
8403 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8404 to hw_execute.
8405 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8406 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8407 hardware breakpoint.
8408
8409 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8410
8411 * gdbserver/linux-low.c (initialize_low): Call
8412 linux_ptrace_init_warnings.
8413
8414 2012-07-02 Doug Evans <dje@google.com>
8415
8416 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8417 pointer to int.
8418
8419 2012-07-02 Stan Shebs <stan@codesourcery.com>
8420
8421 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8422 (ax.o): Add it to build rule.
8423 (ax-ipa.o): Ditto.
8424 (OBS): Add format.o.
8425 (IPA_OBS): Add format.o.
8426 * server.c (handle_query): Claim support for breakpoint commands.
8427 (process_point_options): Add command case.
8428 (process_serial_event): Leave running if there are printfs in
8429 effect.
8430 * mem-break.h (any_persistent_commands): Declare.
8431 (add_breakpoint_commands): Declare.
8432 (gdb_no_commands_at_breakpoint): Declare.
8433 (run_breakpoint_commands): Declare.
8434 * mem-break.c (struct point_command_list): New struct.
8435 (struct breakpoint): New field command_list.
8436 (any_persistent_commands): New function.
8437 (add_commands_to_breakpoint): New function.
8438 (add_breakpoint_commands): New function.
8439 (gdb_no_commands_at_breakpoint): New function.
8440 (run_breakpoint_commands): New function.
8441 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8442 locally.
8443 * ax.c: Include format.h.
8444 (ax_printf): New function.
8445 (gdb_eval_agent_expr): Add printf opcode.
8446
8447 2012-06-13 Yao Qi <yao@codesourcery.com>
8448
8449 * server.c (start_inferior): Remove duplicated writes to fields
8450 'last_resume_kind' and 'last_status' of 'current_inferior'.
8451
8452 2012-06-12 Yao Qi <yao@codesourcery.com>
8453 Pedro Alves <palves@redhat.com>
8454
8455 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8456 comment.
8457 * server.c (handle_v_cont): Extend comment.
8458
8459 2012-06-11 Yao Qi <yao@codesourcery.com>
8460
8461 * linux-low.c (linux_attach): Add 'static'.
8462
8463 2012-06-06 Yao Qi <yao@codesourcery.com>
8464
8465 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8466
8467 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8468
8469 Fix gcc -flto compilation warning.
8470 * server.c (main): Make variable multi_mode and attach volatile.
8471
8472 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8473
8474 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8475 if the platform doesn't know about it.
8476
8477 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8478
8479 * Makefile.in (SFILES): Add linux-tile-low.c.
8480 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8481 * configure.srv: Handle tilegx-*-linux*.
8482 * linux-tile-low.c: New file.
8483
8484 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8485
8486 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8487
8488 2012-05-24 Pedro Alves <palves@redhat.com>
8489
8490 PR gdb/7205
8491
8492 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8493
8494 2012-05-24 Pedro Alves <palves@redhat.com>
8495
8496 PR gdb/7205
8497
8498 Replace target_signal with gdb_signal throughout.
8499
8500 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8501
8502 * linux-low.c (linux_store_registers): Avoid the copying sequence
8503 when no data has been retrieved by ptrace.
8504
8505 2012-05-22 Will Deacon <will.deacon@arm.com>
8506
8507 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8508 Include asm/ptrace.h.
8509 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8510 already defined.
8511
8512 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8513
8514 * linux-low.c (linux_store_registers): Don't re-retrieve data
8515 with ptrace that has already been obtained from /proc. Always
8516 copy any data retrieved with ptrace to the buffer supplied.
8517
8518 2012-05-11 Yao Qi <yao@codesourcery.com>
8519 Pedro Alves <palves@redhat.com>
8520
8521 * linux-low.c (enum stopping_threads_kind): New.
8522 (stopping_threads): Change type to `enum stopping_threads_kind'.
8523 (handle_extended_wait): If stopping and suspending threads, leave
8524 the new_lwp suspended too.
8525 (linux_wait_for_event): Adjust.
8526 (stop_all_lwps): Set `stopping_threads' to
8527 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8528 whether we're suspending threads or just stopping them. Assert no
8529 recursion happens.
8530
8531 2012-04-29 Yao Qi <yao@codesourcery.com>
8532
8533 * server.h: Move some code to ...
8534 * gdbthread.h: ... here. New.
8535 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8536 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8537 (nto-low.o, win32-low.o): Likewise.
8538 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8539 * regcache.c, remote-utils.c, server.c: Likewise.
8540 * target.c, tracepoint.c, win32-low.c: Likewise.
8541
8542 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8543
8544 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8545 (PTRACE_ARG4_TYPE): Likewise.
8546 (PTRACE_XFER_TYPE): Likewise.
8547 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8548 ptrace to PTRACE_ARG3_TYPE.
8549 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8550 (PTRACE_ARG4_TYPE): Likewise.
8551 (PTRACE_XFER_TYPE): Likewise.
8552 (linux_detach_one_lwp): Cast fourth argument of
8553 ptrace to long then PTRACE_ARG4_TYPE.
8554 (regsets_fetch_inferior_registers): Cast third argument of
8555 ptrace to long then PTRACE_ARG3_TYPE.
8556 (regsets_store_inferior_registers): Likewise.
8557
8558 2012-04-20 Pedro Alves <palves@redhat.com>
8559
8560 * configure: Regenerate.
8561
8562 2012-04-19 Pedro Alves <palves@redhat.com>
8563
8564 * Makefile.in (GNULIB_BUILDDIR): New.
8565 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8566 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8567 (all, install-only, uninstall, clean-info, all-lib, clean): No
8568 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8569 (maintainer-clean realclean distclean): Use subdir_do.
8570 (subdir_do): New.
8571 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8572 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8573 * acinclude.m4: Include acx_configure_dir.m4.
8574 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8575 calls. Call AC_PROG_RANLIB. Configure gnulib using
8576 ACX_CONFIGURE_DIR.
8577 (GNULIB): New.
8578 (GNULIB_STDINT_H): Adjust.
8579 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8580 * gdbreplay.c: Include build-gnulib/config.h.
8581 * server.h: Likewise.
8582 * aclocal.m4: Regenerate.
8583 * config.in: Regenerate.
8584 * configure: Regenerate.
8585
8586 2012-04-19 Pedro Alves <palves@redhat.com>
8587
8588 * Makefile.in (LIBGNU, INCGNU): Adjust.
8589 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8590 (all, install-only, uninstall, clean-info, all-lib, clean)
8591 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8592 * configure.ac: Adjust AC_OUTPUT output.
8593 * aclocal.m4: Regenerate.
8594 * configure: Regenerate.
8595
8596 2012-04-19 Pedro Alves <palves@redhat.com>
8597
8598 * Makefile.in (generated_files): New.
8599 (server_h): Remove the explicit dependency on config.h, and depend
8600 on $generated_files.
8601
8602 2012-04-19 Pedro Alves <palves@redhat.com>
8603
8604 * Makefile.in (INCGNU): Add -Ignulib.
8605
8606 2012-04-19 Pedro Alves <palves@redhat.com>
8607
8608 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8609 (INCGNU): ... this, and spell out -I here.
8610 (GNULIB_LIB): Rename to ...
8611 (LIBGNU): ... this.
8612 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8613
8614 2012-04-19 Pedro Alves <palves@redhat.com>
8615
8616 * config.in: Regenerate.
8617
8618 2012-04-19 Pedro Alves <palves@redhat.com>
8619
8620 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8621 * server.h (memmem): Remove declaration.
8622 * config.in: Regenerate.
8623 * configure: Regenerate.
8624
8625 2012-04-19 Yao Qi <yao@codesourcery.com>
8626
8627 * Makefile.in (SFILES): Add common/vec.c.
8628 (OBS): Add vec.o.
8629 (vec.o): New rule.
8630
8631 2012-04-19 Yao Qi <yao@codesourcery.com>
8632
8633 * remote-utils.c (prepare_resume_reply): Replace with macro
8634 target_core_of_thread.
8635 * server.c (handle_qxfer_threads_proper): Likewise.
8636 * target.h (traget_core_of_thread): New macro.
8637
8638 2012-04-18 Pedro Alves <palves@redhat.com>
8639
8640 * aclocal.m4: Regenerate.
8641 * configure: Regenerate.
8642
8643 2012-04-16 Yao Qi <yao@codesourcery.com>
8644
8645 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8646 duplicated on address.
8647
8648 2012-04-16 Yao Qi <yao@codesourcery.com>
8649
8650 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8651 (struct tracepoint_action_ops) <send>: New field.
8652 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8653 (agent_expr_send, x_tracepoint_action_send): New.
8654 (l_tracepoint_action_send): New.
8655 (cmd_qtdp): Download and install tracepoint
8656 according to `use_agent'.
8657 (run_inferior_command): Add one more parameter `len'.
8658 Update callers.
8659 (tracepoint_send_agent): New.
8660 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8661
8662 2012-04-16 Yao Qi <yao@codesourcery.com>
8663
8664 * tracepoint.c (download_tracepoints): Moved to ...
8665 (cmd_qtstart): ... here.
8666
8667 2012-04-14 Yao Qi <yao@codesourcery.com>
8668
8669 * tracepoint.c: Include inttypes.h.
8670 (struct collect_memory_action): Use sized types.
8671 (struct tracepoint): Likewise.
8672 (cmd_qtdp, stop_tracing): Update print specifiers.
8673 (cmd_qtp, response_tracepoint): Likewise.
8674 (collect_data_at_tracepoint): Likewise.
8675 (collect_data_at_step): Likewise.
8676
8677 2012-04-14 Yao Qi <yao@codesourcery.com>
8678
8679 Import gnulib module inttypes.
8680 * aclocal.m4, config.in, configure: Regenerated.
8681
8682 2012-04-14 Yao Qi <yao@codesourcery.com>
8683
8684 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8685 Makefile and config.status at last.
8686
8687 2012-04-13 Yao Qi <yao@codesourcery.com>
8688
8689 * tracepoint.c: Include stdint.h unconditionally.
8690
8691 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8692
8693 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8694 on BFD_HAVE_SYS_PROCFS_TYPE.
8695 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8696 * configure: Regenerate.
8697 * config.in: Likewise.
8698
8699 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8700
8701 * Makefile.in (clean): Also remove x32.c x32-linux.c
8702 x32-avx.c x32-avx-linux.c.
8703 (x32.o): New target.
8704 (x32.c): Likewise.
8705 (x32-linux.o): Likewise.
8706 (x32-linux.c): Likewise.
8707 (x32-avx.o): Likewise.
8708 (x32-avx.c): Likewise.
8709 (x32-avx-linux.o): Likewise.
8710 (x32-avx-linux.c): Likewise.
8711
8712 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8713 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8714 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8715 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8716 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8717 i386/x32-avx-linux.xml.
8718
8719 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8720 (init_registers_x32_avx_linux): Likwise.
8721 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8722 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8723
8724 2012-04-13 Pedro Alves <palves@redhat.com>
8725
8726 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8727 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8728 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8729 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8730 the sub-make.
8731
8732 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8733
8734 * linux-x86-low.c (compat_x32_clock_t): New.
8735 (compat_x32_siginfo_t): Likewise.
8736 (compat_x32_siginfo_from_siginfo): Likewise.
8737 (siginfo_from_compat_x32_siginfo): Likewise.
8738 (linux_is_elf64): Likewise.
8739 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8740 and siginfo_from_compat_x32_siginfo for x32.
8741 (x86_arch_setup): Set linux_is_elf64.
8742
8743 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8744
8745 PR gdb/13969
8746 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8747 e_machine field.
8748 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8749 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8750 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8751 compatible with process.
8752
8753 2012-04-12 Yao Qi <yao@codesourcery.com>
8754
8755 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8756 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8757 (install-only, install-info, clean): Handle sub dir gnulib.
8758 (all-lib, am--refresh): New targets.
8759 (memmem.o): Remove target.
8760 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8761 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8762 (AC_REPLACE_FUNCS): Remove memmem.
8763 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8764 (AC_OUTPUT): Generate Makefile in gnulib/.
8765 * aclocal.m4, config.in, configure: Regenerated.
8766
8767 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8768
8769 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8770
8771 2012-04-05 Pedro Alves <palves@redhat.com>
8772
8773 -Werror=strict-aliasing
8774
8775 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8776 pointer.
8777
8778 2012-04-04 Pedro Alves <palves@redhat.com>
8779
8780 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8781 (sparc_store_gregset_from_stack, sparc_store_gregset)
8782 (sparc_breakpoint_at): Fix formatting.
8783
8784 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8785
8786 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8787 are available.
8788 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8789 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8790 * config.in: Regenerate.
8791 * configure: Likewise.
8792
8793 2012-03-29 Pedro Alves <palves@redhat.com>
8794
8795 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8796 Correct ptrace arguments.
8797
8798 2012-03-28 Pedro Alves <palves@redhat.com>
8799
8800 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8801 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8802 (IA64_FR1_REGNUM): New defines.
8803 (ia64_fetch_register): New.
8804 (the_low_target): Install it.
8805 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8806 field.
8807 * linux-low.c (linux_fetch_registers): Try the
8808 the_low_target.fetch_register hook first.
8809
8810 * linux-arm-low.c (the_low_target): Adjust.
8811 * linux-bfin-low.c (the_low_target): Adjust.
8812 * linux-cris-low.c (the_low_target): Adjust.
8813 * linux-crisv32-low.c (the_low_target): Adjust.
8814 * linux-m32r-low.c (the_low_target): Adjust.
8815 * linux-m68k-low.c (the_low_target): Adjust.
8816 * linux-mips-low.c (the_low_target): Adjust.
8817 * linux-ppc-low.c (the_low_target): Adjust.
8818 * linux-s390-low.c (the_low_target): Adjust.
8819 * linux-sh-low.c (the_low_target): Adjust.
8820 * linux-sparc-low.c (the_low_target): Adjust.
8821 * linux-tic6x-low.c (the_low_target): Adjust.
8822 * linux-x86-low.c (the_low_target): Adjust.
8823 * linux-xtensa-low.c (the_low_target): Adjust.
8824
8825 2012-03-26 Pedro Alves <palves@redhat.com>
8826
8827 * server.c (handle_qxfer_libraries): Don't bail early if
8828 the_target->qxfer_libraries_svr4 is not NULL.
8829
8830 2012-03-26 Pedro Alves <palves@redhat.com>
8831
8832 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8833
8834 2012-03-23 Pedro Alves <palves@redhat.com>
8835
8836 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8837 "library-list-svr4" element's start tag when the the DSO list is
8838 empty.
8839
8840 2012-03-23 Pedro Alves <palves@redhat.com>
8841
8842 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8843 a variable whose type size is the same as the inferior's pointer
8844 size.
8845
8846 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8847
8848 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8849 struct siginfo.
8850 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8851 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8852 * linux-low.h: Include <signal.h>.
8853 (struct siginfo): Remove forward declaration.
8854 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8855 struct siginfo.
8856
8857 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8858
8859 * .gitignore: Ignore more files.
8860
8861 2012-03-19 Pedro Alves <palves@redhat.com>
8862 Jan Kratochvil <jan.kratochvil@redhat.com>
8863
8864 * server.c (cont_thread, general_thread): Add describing comments.
8865 (start_inferior): Clear `cont_thread'.
8866 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8867 of a process.
8868
8869 2012-03-15 Yao Qi <yao@codesourcery.com>
8870
8871 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8872 handling to ...
8873 (cmd_qtdp): ... here.
8874
8875 2012-03-15 Yao Qi <yao@codesourcery.com>
8876
8877 * tracepoint.c (struct tracepoint_action_ops): New.
8878 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8879 (m_tracepoint_action_download): New.
8880 (r_tracepoint_action_download): New.
8881 (x_tracepoint_action_download): New.
8882 (l_tracepoint_action_download): New.
8883 (add_tracepoint_action): Install `action->ops' according type.
8884 (download_tracepoint_1): Move code `download' function pointer
8885 of various tracepoint_action_ops.
8886
8887 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8888
8889 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8890 linux_ptrace_attach_warnings.
8891
8892 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8893
8894 * Makefile.in (linux-ptrace.o): New.
8895 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8896 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8897 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8898 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8899 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8900 of these targets.
8901 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8902
8903 2012-03-08 Yao Qi <yao@codesourcery.com>
8904 Pedro Alves <palves@redhat.com>
8905
8906 Fix PR server/13392.
8907 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8908 offset of JMP insn.
8909 * tracepoint.c (remove_tracepoint): New.
8910 (cmd_qtdp): Call remove_tracepoint when failed to install.
8911
8912 2012-03-07 Pedro Alves <palves@redhat.com>
8913
8914 * linux-low.c (get_detach_signal): New.
8915 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8916 Pass on pending signals to PTRACE_DETACH. Check the result of the
8917 ptrace call.
8918 * server.c (program_signals, program_signals_p): New.
8919 (handle_general_set): Handle QProgramSignals.
8920 * server.h (program_signals, program_signals_p): Declare.
8921
8922 2012-03-05 Pedro Alves <palves@redhat.com>
8923 Jan Kratochvil <jan.kratochvil@redhat.com>
8924
8925 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8926 New comment why.
8927
8928 2012-03-03 Yao Qi <yao@codesourcery.com>
8929
8930 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8931 agent_look_up_symbols.
8932
8933 2012-03-03 Yao Qi <yao@codesourcery.com>
8934
8935 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8936 (linux-x86-low.o): Likewise.
8937 * server.h: Remove in_process_agent_loaded.
8938 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8939 common/agent.c.
8940 Update callers.
8941
8942 2012-03-03 Yao Qi <yao@codesourcery.com>
8943
8944 * tracepoint.c (gdb_agent_capability): New global.
8945 (in_process_agent_loaded_ust): Renamed to
8946 `in_process_agent_supports_ust'.
8947 Update callers.
8948 (in_process_agent_supports_ust): Call agent_capability_check.
8949 (clear_installed_tracepoints): Assert that agent supports
8950 agent.
8951
8952 2012-03-03 Yao Qi <yao@codesourcery.com>
8953
8954 * linux-low.c (linux_supports_agent): New.
8955 (linux_target_ops): Initialize field `supports_agent' with
8956 linux_supports_agent.
8957 * target.h (struct target_ops) <supports_agent>: New.
8958 (target_supports_agent): New macro.
8959 * server.c (handle_general_set): Handle packet 'QAgent'.
8960 (handle_query): Send `QAgent+'.
8961 * Makefile.in (server.o): Depends on agent.h.
8962
8963 2012-03-03 Yao Qi <yao@codesourcery.com>
8964
8965 * Makefile.in (OBS): Add agent.o.
8966 Add new rule for agent.o.
8967 Track dependence of tracepoint.c on agent.h.
8968 * tracepoint.c (run_inferior_command_1):
8969 (run_inferior_command): Call agent_run_command.
8970 (gdb_ust_connect_sync_socket): Deleted. Move it to
8971 common/agent.c.
8972 (resume_thread, stop_thread): Likewise.
8973 (gdb_ust_socket_init): Renamed to ...
8974 (gdb_agent_socket_init): ... New.
8975 (gdb_ust_thread): Renamed to ...
8976 (gdb_agent_helper_thread): ... New.
8977 (gdb_ust_init): Move some code to ...
8978 (gdb_agent_init): ... here. New.
8979 [HAVE_UST]: Call gdb_ust_init.
8980 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8981 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8982 * config.in, configure: Regenerated.
8983
8984 2012-03-02 Pedro Alves <palves@redhat.com>
8985
8986 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8987 * linux-low.c (struct simple_pid_list): New.
8988 (stopped_pids): New a struct simple_pid_list pointer.
8989 (add_to_pid_list, pull_pid_from_list): New.
8990 (handle_extended_wait): Don't assume the first signal new children
8991 report is SIGSTOP. Adjust call to pull_pid_from_list.
8992 (linux_wait_for_lwp): Adjust.
8993
8994 2012-03-02 Yao Qi <yao@codesourcery.com>
8995
8996 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8997 debug log.
8998
8999 2012-03-02 Yao Qi <yao@codesourcery.com>
9000
9001 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9002 `stop_pc' and `tpoint'. Update caller.
9003
9004 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9005
9006 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9007 * linux-low.c (use_linux_regsets): New macro.
9008 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9009 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9010 (linux_register_in_regsets): New function.
9011 (usr_fetch_inferior_registers): Skip registers covered by
9012 regsets.
9013 (usr_store_inferior_registers): Likewise.
9014 (usr_fetch_inferior_registers): New macro.
9015 (usr_store_inferior_registers): Likewise.
9016 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9017 (linux_store_registers): Likewise.
9018 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9019 prototype.
9020 (init_registers_mips64_dsp_linux): Likewise.
9021 (init_registers_mips_linux): New macro.
9022 (init_registers_mips_dsp_linux): Likewise.
9023 (mips_dsp_num_regs): Likewise.
9024 (DSP_BASE, DSP_CONTROL): New fallback macros.
9025 (mips_base_regs): New macro.
9026 (mips_regmap): Use it. Fix the size.
9027 (mips_dsp_regmap): New variable.
9028 (mips_dsp_regset_bitmap): Likewise.
9029 (mips_arch_setup): New function.
9030 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9031 than mips_regmap.
9032 (mips_cannot_store_register): Likewise.
9033 (the_low_target): Update .arch_setup, .num_regs and .regmap
9034 initializers. Add .regset_bitmap initializer.
9035 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9036 initializer.
9037 * linux-bfin-low.c (the_low_target): Likewise.
9038 * linux-cris-low.c (the_low_target): Likewise.
9039 * linux-crisv32-low.c (the_low_target): Likewise.
9040 * linux-ia64-low.c (the_low_target): Likewise.
9041 * linux-m32r-low.c (the_low_target): Likewise.
9042 * linux-m68k-low.c (the_low_target): Likewise.
9043 * linux-ppc-low.c (the_low_target): Likewise.
9044 * linux-s390-low.c (the_low_target): Likewise.
9045 * linux-sh-low.c (the_low_target): Likewise.
9046 * linux-sparc-low.c (the_low_target): Likewise.
9047 * linux-tic6x-low.c (the_low_target): Likewise.
9048 * linux-x86-low.c (the_low_target): Likewise.
9049 * linux-xtensa-low.c (the_low_target): Likewise.
9050 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9051 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9052 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9053 srv_xmlfiles.
9054 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9055 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9056
9057 2012-02-29 Yao Qi <yao@codesourcery.com>
9058 Pedro Alves <palves@redhat.com>
9059
9060 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9061 `step_over_finished' is true.
9062
9063 2012-02-27 Pedro Alves <palves@redhat.com>
9064
9065 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9066 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9067
9068 2012-02-27 Pedro Alves <palves@redhat.com>
9069
9070 PR server/9684
9071 * linux-low.c (pid_is_stopped): New.
9072 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9073
9074 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9075
9076 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9077 of conditions.
9078
9079 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9080
9081 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9082
9083 2012-02-24 Luis Machado <lgustavo@codesourcery>
9084
9085 * server.c (handle_query): Advertise support for target-side
9086 breakpoint condition evaluation.
9087 (process_point_options): New function.
9088 (process_serial_event): When inserting a breakpoint, check for
9089 a target-side condition that should be evaluated.
9090
9091 * mem-break.c: Include regcache.h and ax.h.
9092 (point_cond_list_t): New data structure.
9093 (breakpoint) <cond_list>: New field.
9094 (find_gdb_breakpoint_at): Make non-static.
9095 (delete_gdb_breakpoint_at): Clear any target-side
9096 conditions.
9097 (clear_gdb_breakpoint_conditions): New function.
9098 (add_condition_to_breakpoint): Likewise.
9099 (add_breakpoint_condition): Likewise.
9100 (gdb_condition_true_at_breakpoint): Likewise.
9101 (gdb_breakpoint_here): Return result directly instead
9102 of going through a local variable.
9103
9104 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9105 (clear_gdb_breakpoint_conditions): Likewise.
9106 (add_breakpoint_condition): Likewise.
9107 (gdb_condition_true_at_breakpoint): Likewise.
9108
9109 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9110 (need_step_over_p): Take target-side breakpoint condition into
9111 consideration.
9112
9113 2012-02-24 Luis Machado <lgustavo@codesourcery>
9114
9115 * server.h: Include tracepoint.h.
9116 (agent_mem_read, agent_get_trace_state_variable_value,
9117 agent_set_trace_state_variable_value,
9118 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9119 get_set_tsv_func_addr): New prototypes.
9120
9121 * ax.h: New include file.
9122 * ax.c: New source file.
9123
9124 * tracepoint.c: Include ax.h.
9125 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9126 agent_expr, eval_result_type): Move to ax.h.
9127 (parse_agent_expr): Rename to ...
9128 (gdb_parse_agent_expr): ... this, make it non-static and move
9129 to ax.h.
9130 (unparse_agent_expr) Rename to ...
9131 (gdb_unparse_agent_expr): ... this, make it non-static and move
9132 to ax.h.
9133 (eval_agent_expr): Rename to ...
9134 (eval_tracepoint_agent_expr): ... this.
9135 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9136 forward declarations.
9137 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9138 (agent_get_trace_state_variable_value): New function.
9139 (agent_set_trace_state_variable_value): New function.
9140 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9141 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9142 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9143 (condition_true_at_tracepoint): Likewise.
9144 (parse_agent_expr): Rename to ...
9145 (gdb_parse_agent_expr): ... this and move to ax.c.
9146 (unparse_agent_expr): Rename to ...
9147 (gdb_unparse_agent_expr): ... this and move to ax.c.
9148 (gdb_agent_op_name): Move to ax.c.
9149 (eval_agent_expr): Rename to ...
9150 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9151 and move to ax.c.
9152 (eval_tracepoint_agent_expr): New function.
9153 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9154 non-static.
9155 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9156 ax.c.
9157 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9158 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9159 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9160 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9161 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9162 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9163 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9164 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9165 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9166 (compile_bytecodes): Remove forward declaration.
9167 (is_goto_target): Move to ax.c.
9168 (compile_bytecodes): Move to ax.c and call
9169 agent_get_trace_state_variable_value (...) and
9170 agent_set_trace_state_variable_value (...).
9171
9172 * Makefile.in: Update ax.c and IPA dependencies.
9173
9174 2012-02-24 Pedro Alves <palves@redhat.com>
9175
9176 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9177 (cmd_bigqtbuffer_circular): ... this. Only handle
9178 'QTBuffer:circular:'.
9179 (handle_tracepoint_general_set): Adjust.
9180
9181 2012-02-16 Yao Qi <yao@codesourcery.com>
9182
9183 * inferiors.c: Move code to ...
9184 * dll.c: .... here. New.
9185 * server.h: Declare clear_dlls.
9186 * Makefile.in (SFILES): Add dll.c.
9187 (OBS): Add dll.o
9188 (dll.o): New rule.
9189
9190 2012-02-11 Yao Qi <yao@codesourcery.com>
9191
9192 * server.c: (handle_monitor_command): Add a new parameter
9193 `own_buf'.
9194 (handle_query): Update caller.
9195
9196 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9197
9198 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9199 * configure, config.in: Regenerate.
9200 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9201 is not defined.
9202
9203 2012-02-02 Pedro Alves <palves@redhat.com>
9204
9205 Try SIGKILL first, then PTRACE_KILL.
9206 * linux-low.c (linux_kill_one_lwp): New.
9207 (linux_kill_one_lwp): Rename to ...
9208 (kill_one_lwp_callback): ... this. Use the new
9209 linux_kill_one_lwp.
9210
9211 2012-02-02 Pedro Alves <palves@redhat.com>
9212
9213 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9214 inferior.
9215
9216 2012-01-27 Pedro Alves <palves@redhat.com>
9217
9218 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9219 (elf_64_file_p): Make static.
9220 (linux_pid_exe_is_elf_64_file): New.
9221 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9222 Delete declarations.
9223 (linux_pid_exe_is_elf_64_file): Declare.
9224 * linux-x86-low.c (x86_arch_setup): Use
9225 linux_pid_exe_is_elf_64_file.
9226
9227 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9228
9229 * linux-low.c (linux_wait_for_event_1): Rename to ...
9230 (linux_wait_for_event): ... here and merge it with former
9231 linux_wait_for_event - new variable wait_ptid, use it.
9232 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9233
9234 2012-01-23 Pedro Alves <palves@redhat.com>
9235
9236 * server.c (main): Avoid yet another case of infinite loop while
9237 detaching/killing after a longjmp.
9238
9239 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9240
9241 Code cleanup.
9242 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9243
9244 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9245
9246 * hostio.c (handle_readlink): New function.
9247 (handle_vFile): Call it to handle "vFile:readlink" packets.
9248
9249 2012-01-20 Pedro Alves <palves@redhat.com>
9250 Ulrich Weigand <ulrich.weigand@linaro.org>
9251
9252 * server.c (handle_v_requests): Only support vAttach and vRun to
9253 start multiple processes when in extended protocol mode.
9254
9255 2012-01-17 Pedro Alves <palves@redhat.com>
9256
9257 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9258 memalign plus mprotect to allocate the scratch buffer.
9259
9260 2012-01-13 Pedro Alves <palves@redhat.com>
9261
9262 * server.c (attach_inferior): Clear `cont_thread'.
9263
9264 2012-01-13 Pedro Alves <palves@redhat.com>
9265
9266 * server.c (main): Avoid infinite loop while detaching/killing
9267 after a longjmp.
9268
9269 2012-01-09 Doug Evans <dje@google.com>
9270
9271 * server.c (start_inferior): Set last_ptid in --wrapper case.
9272
9273 2012-01-06 Yao Qi <yao@codesourcery.com>
9274
9275 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9276 defined.
9277 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9278
9279 2012-01-04 Yao Qi <yao@codesourcery.com>
9280
9281 * tracepoint.c (cmd_qtdp): Print debug message
9282 for static tracepoint.
9283
9284 2012-01-04 Yao Qi <yao@codesourcery.com>
9285
9286 * tracepoint.c (trace_vdebug): Differentiate debug message
9287 between gdbserver and IPA.
9288
9289 2012-01-03 Yao Qi <yao@codesourcery.com>
9290
9291 * tracepoint.c (tracepoint_was_hit): Don't collect for
9292 static tracepoint.
9293
9294 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9295
9296 * terminal.h: Reformat copyright header.
9297
9298 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9299
9300 * server.c (gdbserver_version): Update copyright year.
9301 * gdbreplay.c (gdbreplay_version): Likewise.
9302
9303 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9304
9305 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9306
9307 Revert:
9308 2011-12-18 Hui Zhu <teawater@gmail.com>
9309 * linux-low.c (linux_create_inferior): Save return value to ret.
9310
9311 2011-12-18 Hui Zhu <teawater@gmail.com>
9312
9313 * linux-low.c (linux_create_inferior): Save return value to ret.
9314
9315 2011-12-16 Doug Evans <dje@google.com>
9316
9317 * linux-low.c (linux_create_inferior): If stdio connection,
9318 redirect stdin from /dev/null, stdout to stderr.
9319 * remote-utils.c (remote_is_stdio): New static global.
9320 (remote_connection_is_stdio): New function.
9321 (remote_prepare): Handle stdio connection.
9322 (remote_open): Ditto.
9323 (remote_close): Don't close stdin for stdio connections.
9324 (read_prim,write_prim): New functions. Replace all calls to
9325 read/write to these.
9326 * server.c (main): Watch for "-" argument. Move call to
9327 remote_prepare before start_inferior.
9328 * server.h (STDIO_CONNECTION_NAME): New macro.
9329 (remote_connection_is_stdio): Declare.
9330
9331 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9332 in debugging output.
9333
9334 2011-12-15 Yao Qi <yao@codesourcery.com>
9335
9336 * tracepoint.c: Include sys/syscall.h.
9337 (gdb_ust_thread): Remove preprocessor conditional.
9338
9339 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9340
9341 * linux-low.c (linux_detach_one_lwp): Call
9342 the_low_target.prepare_to_resume before detaching.
9343
9344 2011-12-14 Yao Qi <yao@codesourcery.com>
9345
9346 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9347 of write.
9348
9349 2011-12-14 Yao Qi <yao@codesourcery.com>
9350
9351 * i386-low.c (i386_low_stopped_data_address): Initialize local
9352 variable `control'.
9353
9354 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9355
9356 PR remote/13492
9357
9358 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9359 DR_CONTROL unless necessary. Extend comments.
9360 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9361 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9362
9363 2011-12-13 Yao Qi <yao@codesourcery.com>
9364
9365 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9366 macros.
9367 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9368
9369 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9370
9371 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9372 Print new debug message for such case.
9373
9374 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9375
9376 Fix overlapping memcpy.
9377 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9378 the read_inferior_memory transfer.
9379 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9380 write_inferior_memory transfer.
9381 (set_fast_tracepoint_jump): New variable buf. Use it for the
9382 read_inferior_memory and write_inferior_memory transfers.
9383 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9384 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9385 Use it for the write_inferior_memory transfer.
9386 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9387 buffers.
9388
9389 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9390
9391 * linux-low.c (fetch_register, store_register): Make code
9392 consistent, fix formatting.
9393
9394 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9395
9396 * linux-low.c (usr_store_inferior_registers): Factor out code
9397 to handle individual registers into...
9398 (store_register): ... this new function.
9399
9400 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9401
9402 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9403 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9404 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9405 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9406 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9407 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9408 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9409 (srv_xmlfiles): Add new XML files.
9410
9411 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9412 and <sys/uio.h>.
9413 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9414 (init_registers_s390_linux32v1): Add prototype.
9415 (init_registers_s390_linux32v2): Likewise.
9416 (init_registers_s390_linux64v1): Likewise.
9417 (init_registers_s390_linux64v2): Likewise.
9418 (init_registers_s390x_linux64v1): Likewise.
9419 (init_registers_s390x_linux64v2): Likewise.
9420 (s390_num_regs): Increment to 52.
9421 (s390_regmap): Add orig_r2 register.
9422 (s390_num_regs_3264): Increment to 68.
9423 (s390_regmap_3264): Add orig_r2 register.
9424 (s390_collect_ptrace_register): Handle orig_r2 register.
9425 (s390_supply_ptrace_register): Likewise.
9426 (s390_fill_last_break): New function.
9427 (s390_store_last_break): Likewise.
9428 (s390_fill_system_call): New function.
9429 (s390_store_system_call): Likewise.
9430 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9431 register sets.
9432 (s390_check_regset): New function.
9433 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9434 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9435 Update target_regsets for available register sets.
9436
9437 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9438 Jan Kratochvil <jan.kratochvil@redhat.com>
9439
9440 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9441 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9442 New.
9443 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9444 * linux-low.h (struct process_info_private): New member r_debug.
9445 * server.c (handle_qxfer_libraries): Call
9446 the_target->qxfer_libraries_svr4.
9447 (handle_qxfer_libraries_svr4): New function.
9448 (qxfer_packets): New entry "libraries-svr4".
9449 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9450 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9451 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9452 PACKET_qXfer_libraries_svr4.
9453
9454 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9455
9456 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9457 PSW address/mask between 8-byte and 16-byte formats.
9458 (s390_supply_ptrace_register): Likewise.
9459 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9460 basic addressing mode bit.
9461
9462 2011-11-24 Stan Shebs <stan@codesourcery.com>
9463
9464 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9465
9466 2011-11-17 Stan Shebs <stan@codesourcery.com>
9467
9468 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9469 (tracing_start_time): New global.
9470 (tracing_stop_time): New global.
9471 (tracing_user_name): New global.
9472 (tracing_notes): New global.
9473 (tracing_stop_note): New global.
9474 (cmd_qtstart): Set traceframe_usage, start_time.
9475 (stop_tracing): Set stop_time.
9476 (cmd_qtstatus): Report additional status.
9477 (cmd_qtp): New function.
9478 (handle_tracepoint_query): Call it.
9479 (cmd_qtnotes): New function.
9480 (handle_tracepoint_general_set): Call it.
9481 (get_timestamp): Rename from tsv_get_timestamp.
9482
9483 2011-11-14 Stan Shebs <stan@codesourcery.com>
9484 Kwok Cheung Yeung <kcy@codesourcery.com>
9485
9486 * linux-x86-low.c (small_jump_insn): New.
9487 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9488 trampoline and error message, build a trampoline and issue a small
9489 jump instruction to it.
9490 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9491 trampoline and error message.
9492 (x86_get_min_fast_tracepoint_insn_len): New.
9493 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9494 * linux-low.h (struct linux_target_ops): Add arguments to
9495 install_fast_tracepoint_jump_pad operation, add new operation.
9496 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9497 arguments.
9498 (linux_get_min_fast_tracepoint_insn_len): New function.
9499 (linux_target_op): Add new operation.
9500 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9501 (gdb_trampoline_buffer_end): Ditto.
9502 (gdb_trampoline_buffer_error): Ditto.
9503 (struct ipa_sym_addresses): Add fields for new IPA variables.
9504 (symbol_list): Add entries for new IPA variables.
9505 (struct tracepoint): Add fields to hold the address range of the
9506 trampoline used by the tracepoint.
9507 (trampoline_buffer_head): New static variable.
9508 (trampoline_buffer_tail): Ditto.
9509 (claim_trampoline_space): New function.
9510 (have_fast_tracepoint_trampoline_buffer): New function.
9511 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9512 structure.
9513 (install_fast_tracepoint): Ditto, also add error buffer argument.
9514 (cmd_qtminftpilen): New function.
9515 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9516 (fast_tracepoint_from_trampoline_address): New function.
9517 (fast_tracepoint_collecting): Handle trampoline as part of jump
9518 pad space.
9519 (set_trampoline_buffer_space): New function.
9520 (initialize_tracepoint): Initialize new IPA variables.
9521 * target.h (struct target_ops): Add arguments to
9522 install_fast_tracepoint_jump_pad operation, add new
9523 get_min_fast_tracepoint_insn_len operation.
9524 (target_get_min_fast_tracepoint_insn_len): New.
9525 (install_fast_tracepoint_jump_pad): Add arguments.
9526 * server.h (IPA_BUFSIZ): Define.
9527 * linux-i386-ipa.c: Include extra header files.
9528 (initialize_fast_tracepoint_trampoline_buffer): New function.
9529 (initialize_low_tracepoint): Call it.
9530 * server.h (set_trampoline_buffer_space): Declare.
9531 (claim_trampoline_space): Ditto.
9532 (have_fast_tracepoint_trampoline_buffer): Ditto.
9533
9534 2011-11-14 Yao Qi <yao@codesourcery.com>
9535
9536 * server.c (handle_query): Handle InstallInTrace for qSupported.
9537 * tracepoint.c (add_tracepoint): Sort list.
9538 (install_tracepoint, download_tracepoint): New.
9539 (cmd_qtdp): Call them to install and download tracepoints.
9540 (sort_tracepoints): Removed.
9541 (cmd_qtstart): Update.
9542
9543 2011-11-14 Yao Qi <yao@codesourcery.com>
9544
9545 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9546 * mem-break.h: Declare.
9547 * tracepoint.c (cmd_qtstart): Move some code to ...
9548 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9549 New.
9550 (download_tracepoints): Move some code to ...
9551 (download_tracepoint_1): ... here. New.
9552
9553 2011-11-08 Yao Qi <yao@codesourcery.com>
9554
9555 * remote-utils.c (relocate_instruction): A comment fix.
9556
9557 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9558
9559 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9560 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9561 dr_status_mirror and dr_control_mirror from debug_reg_state.
9562 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9563 (i386_initial_stuff): Remove use of deleted globals.
9564 (i386_get_thread_context, i386_set_thread_context,
9565 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9566 from debug_reg_state.
9567
9568 2011-11-05 Yao Qi <yao@codesourcery.com>
9569
9570 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9571 address as TPOINT's.
9572
9573 2011-11-02 Stan Shebs <stan@codesourcery.com>
9574
9575 * tracepoint.c (agent_mem_read_string): New function.
9576 (eval_agent_expr): Call it for tracenz.
9577 * server.c (handle_query): Report support for tracenz.
9578
9579 2011-11-02 Yao Qi <yao@codesourcery.com>
9580
9581 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9582
9583 2011-11-02 Yao Qi <yao@codesourcery.com>
9584
9585 * target.h: Fix a typo in comment.
9586
9587 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9588
9589 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9590 clobber the breakpoints' shadows with fast tracepoint jumps.
9591 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9592 * target.c (write_inferior_memory): Also pass MYADDR down to
9593 check_mem_write.
9594
9595 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9596
9597 * configure.ac: Check support for personality routine.
9598 * configure: Regenerate.
9599 * config.in: Likewise.
9600 * linux-low.c: Include <sys/personality.h>.
9601 Define ADDR_NO_RANDOMIZE if necessary.
9602 (linux_create_inferior): Disable address space randomization when
9603 forking inferior, if requested.
9604 (linux_supports_disable_randomization): New function.
9605 (linux_target_ops): Install it.
9606 * server.h (disable_randomization): Declare.
9607 * server.c (disable_randomization): New global variable.
9608 (handle_general_set): Handle QDisableRandomization.
9609 (handle_query): Likewise for qSupported.
9610 (main): Support --disable-randomization and --no-disable-randomization
9611 command line arguments.
9612 * target.h (struct target_ops): Add supports_disable_randomization.
9613 (target_supports_disable_randomization): New macro.
9614
9615 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9616
9617 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9618 ifdef check.
9619 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9620 [!PT_GETDSBT] (target_loadmap): New definition.
9621 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9622 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9623 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9624 and PT_GETDSBT to LINUX_LOADMAP.
9625 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9626 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9627
9628 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9629
9630 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9631 (arm_linux_hwbp_cap): New static variable.
9632 (arm_linux_get_hwbp_cap): Replace by ...
9633 (arm_linux_init_hwbp_cap): ... this new function.
9634 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9635 (arm_linux_get_hw_watchpoint_count): Likewise.
9636 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9637 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9638 (arm_prepare_to_resume): Use perror_with_name instead of error.
9639
9640 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9641
9642 * linux-arm-low.c: Include <signal.h>.
9643 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9644 (struct arm_linux_hwbp_cap): New data type.
9645 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9646 (struct arm_linux_hw_breakpoint): New data type.
9647 (MAX_BPTS, MAX_WPTS): Define.
9648 (struct arch_process_info, struct arch_lwp_info): New data types.
9649 (arm_linux_get_hwbp_cap): New function.
9650 (arm_linux_get_hw_breakpoint_count): Likewise.
9651 (arm_linux_get_hw_watchpoint_count): Likewise.
9652 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9653 (arm_hwbp_control_initialize): Likewise.
9654 (arm_hwbp_control_is_enabled): Likewise.
9655 (arm_hwbp_control_is_initialized): Likewise.
9656 (arm_hwbp_control_disable): Likewise.
9657 (arm_linux_hw_breakpoint_equal): Likewise.
9658 (arm_linux_hw_point_initialize): Likewise.
9659 (struct update_registers_data): New data structure.
9660 (update_registers_callback: New function.
9661 (arm_insert_point): Likewise.
9662 (arm_remove_point): Likewise.
9663 (arm_stopped_by_watchpoint): Likewise.
9664 (arm_stopped_data_address): Likewise.
9665 (arm_new_process): Likewise.
9666 (arm_new_thread): Likewise.
9667 (arm_prepare_to_resume): Likewise.
9668 (the_low_target): Register arm_insert_point, arm_remove_point,
9669 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9670 arm_new_thread, and arm_prepare_to_resume.
9671
9672 2011-09-15 Stan Shebs <stan@codesourcery.com>
9673
9674 * server.h (struct emit_ops): Add compare-goto fields.
9675 * tracepoint.c (gdb_agent_op_sizes): New table.
9676 (emit_eq_goto): New function.
9677 (emit_ne_goto): New function.
9678 (emit_lt_goto): New function.
9679 (emit_le_goto): New function.
9680 (emit_gt_goto): New function.
9681 (emit_ge_goto): New function.
9682 (is_goto_target): New function.
9683 (compile_bytecodes): Recognize special cases of compare-goto
9684 combinations and call specialized emitters for them.
9685 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9686 (amd64_emit_ne_goto): New function.
9687 (amd64_emit_lt_goto): New function.
9688 (amd64_emit_le_goto): New function.
9689 (amd64_emit_gt_goto): New function.
9690 (amd64_emit_ge_goto): New function.
9691 (amd64_emit_ops): Add the new functions.
9692 (i386_emit_eq_goto): New function.
9693 (i386_emit_ne_goto): New function.
9694 (i386_emit_lt_goto): New function.
9695 (i386_emit_le_goto): New function.
9696 (i386_emit_gt_goto): New function.
9697 (i386_emit_ge_goto): New function.
9698 (i386_emit_ops): Add the new functions.
9699
9700 2011-09-08 Stan Shebs <stan@codesourcery.com>
9701
9702 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9703 (i386_emit_epilogue): Restore %ebx.
9704
9705 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9706
9707 * server.c (step_thread): Remove definition.
9708 (process_serial_event): Don't handle Hs.
9709 * server.h (step_thread): Remove declaration.
9710 * target.c (set_desired_inferior): Remove use of step_thread.
9711
9712 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9713
9714 * linux-low.c: Include linux-procfs.h.
9715 (linux_attach_lwp_1): Update comments.
9716 (linux_attach): Scan for existing threads when attaching to a
9717 process that is the tgid.
9718 * Makefile.in: Update dependencies.
9719
9720 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9721
9722 * configure.srv: Add linux-procfs.o dependencies.
9723
9724 2011-08-14 Yao Qi <yao@codesourcery.com>
9725
9726 * target.h (struct target_ops): Fix indent.
9727 * win32-low.c (win32_target_ops): Fix comment.
9728
9729 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9730 Yao Qi <yao@codesourcery.com>
9731
9732 * Makefile.in (clean): Remove tic6x-*.c files.
9733 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9734 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9735 (tic6x-c64xp-linux.c): Likewise.
9736 * configure.srv: Add support for tic6x-*-uclinux.
9737 * linux-tic6x-low.c: New.
9738 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9739
9740 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9741 Yao Qi <yao@codesourcery.com>
9742
9743 * target.h (struct target_ops): Add read_loadmap.
9744 * linux-low.c (struct target_loadseg): New type.
9745 (struct target_loadmap): New type.
9746 (linux_read_loadmap): New function.
9747 (linux_target_ops): Add linux_read_loadmap.
9748 * server.c (handle_query): Support qXfer:fdpic:read packet.
9749 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9750 to NULL.
9751
9752 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9753
9754 * win32-low.c: Include <stdint.h>.
9755
9756 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9757
9758 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9759 to the inferior here.
9760 (i386_remove_aligned_watchpoint): Ditto.
9761 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9762 fit part of the watchpoint in the debug registers.
9763 (i386_update_inferior_debug_regs): New.
9764 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9765 registers, and only update the inferior on success.
9766 (i386_low_remove_watchpoint): Ditto.
9767
9768 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9769
9770 * linux-low.c (compare_ints, unique, list_threads, show_process,
9771 linux_core_of_thread): Delete.
9772 (linux_target_ops): Change linux_core_of_thread to
9773 linux_common_core_of_thread.
9774 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9775 * utils.c (malloc_failure): Change type of argument.
9776 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9777 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9778 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9779 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9780 (IPA_OBJS): Add common-utils-ipa.o.
9781 (ptid_h, linux_osdata_h): New macros.
9782 (server_h): Add common/common-utils.h, common/xml-utils.h,
9783 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9784 common/ptid.h.
9785 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9786 ptid.o, buffer.o): New rules.
9787 (linux-low.o): Add common/linux-osdata.h as a dependency.
9788 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9789 * configure.ac: Add AC_HEADER_DIRENT check.
9790 * config.in: Regenerate.
9791 * configure: Regenerate.
9792 * remote-utils.c (xml_escape_text): Delete.
9793 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9794 buffer_xml_printf): Move to common/buffer.c.
9795 * server.c (main): Remove call to initialize_inferiors.
9796 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9797 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9798 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9799 internal_error, gdb_assert, gdb_assert_fail): Delete.
9800 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9801 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9802 common/buffer.h.
9803 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9804 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9805 initialize_inferiors): Delete.
9806
9807 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9808
9809 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9810 symbol error.
9811
9812 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9813
9814 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9815 assertion.
9816 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9817
9818 2011-05-26 Yao Qi <yao@codesourcery.com>
9819
9820 * Makefile.in (thread-db.o): Track dependence to
9821 common/gdb_thread_db.h.
9822 * thread-db.c: include gdb_thread_db.h from right place.
9823
9824 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9825
9826 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9827 __FILE__ and __LINE__ to internal_error.
9828
9829 2011-05-13 Doug Evans <dje@google.com>
9830
9831 * thread-db.c (try_thread_db_load_from_sdir): New function.
9832 (try_thread_db_load_from_dir): New function.
9833 (thread_db_load_search): Handle $sdir, ignore $pdir.
9834 Remove trying of system directories if search of
9835 libthread-db-search-path fails, that is now done via $sdir.
9836
9837 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9838
9839 * server.c (handle_query): Add EnableDisableTracepoints to the list
9840 of supported features.
9841 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9842 tracepoints.
9843 (cmd_qtenable_disable): New.
9844 (cmd_qtstart): Install tracepoints even if disabled.
9845 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9846 receiving a QTEnable or QTDisable packet.
9847 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9848 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9849 tracepoints.
9850 (gdb_probe): Skip data collection if static tracepoint is disabled.
9851
9852 2011-05-10 Doug Evans <dje@google.com>
9853
9854 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9855
9856 2011-05-04 Doug Evans <dje@google.com>
9857
9858 * linux-low.c (linux_join): Skip process lookup.
9859 * spu-low.c (spu_join): Ditto.
9860 * server.c (join_inferiors_callback): Delete.
9861 (process_serial_event): For 'D' packet (detach) call join_inferior
9862 directly.
9863
9864 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9865
9866 * README: Don't mention xscale*-*-linux*.
9867 * configure.srv (xscale*-*-linux*): Don't handle target.
9868
9869 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9870
9871 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9872 casting pointers.
9873 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9874 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9875 (i386_emit_void_call_2): Likewise.
9876
9877 2011-04-26 Yao Qi <yao@codesourcery.com>
9878
9879 * linux-low.c: Move common macros to linux-ptrace.h.
9880 Include linux-ptrace.h.
9881 * Makefile.in (linux_ptrace_h): New.
9882 (linux-low.o): Depends on linux-ptrace.h.
9883
9884 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9885
9886 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9887 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9888 (remote_prepare): New function with most of the TCP code from ...
9889 (remote_open): ... here. Detect PORT here unconditionally. Move also
9890 setting transport_is_reliable.
9891 * server.c (run_once): New variable.
9892 (gdbserver_usage): Document it.
9893 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9894 the first run if RUN_ONCE.
9895 * server.h (run_once, remote_prepare): New declarations.
9896
9897 2011-04-19 Tom Tromey <tromey@redhat.com>
9898
9899 * win32-low.c (handle_load_dll): Remove duplicate "the".
9900
9901 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9902
9903 Remove support for old Cygwin 1.5 versions.
9904 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9905 function to avoid warning.
9906 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9907 warning.
9908
9909 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9910
9911 * gdbserver/server.h (Macro _): Define it if not available.
9912
9913 2011-03-14 Michael Snyder <msnyder@vmware.com>
9914
9915 * hostio.c (handle_close): Remove unnecessary null test.
9916
9917 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9918
9919 * Makefile.in (maintainer-clean realclean distclean): Remove
9920 "make ... subdir_do" command.
9921
9922 2011-03-10 Michael Snyder <msnyder@vmware.com>
9923
9924 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9925
9926 * server.c (handle_v_run): Free alloced buffer on early return.
9927
9928 2011-03-09 Yao Qi <yao@codesourcery.com>
9929
9930 Revert:
9931 2011-03-04 Yao Qi <yao@codesourcery.com>
9932
9933 * Makefile.in: Remove GNU make feature --directory.
9934
9935 2011-03-05 Yao Qi <yao@codesourcery.com>
9936
9937 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9938 (subdir_do): New make target. Copied from gdb/Makefile.
9939 (maintainer-clean, realclean, distclean, clean): Call corresponding
9940 make targets in common/Makefile.
9941
9942 2011-02-11 Yao Qi <yao@codesourcery.com>
9943
9944 * configure.ac: Call AC_PROG_RANLIB.
9945 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9946 * configure: Regenerate.
9947
9948 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9949
9950 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9951
9952 2011-03-06 Yao Qi <yao@codesourcery.com>
9953
9954 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9955
9956 2011-03-05 Yao Qi <yao@codesourcery.com>
9957
9958 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9959 (subdir_do): New make target. Copied from gdb/Makefile.
9960 (maintainer-clean, realclean, distclean, clean): Call corresponding
9961 make targets in common/Makefile.
9962
9963 2011-03-04 Yao Qi <yao@codesourcery.com>
9964
9965 * Makefile.in: Remove GNU make feature --directory.
9966
9967 2011-03-04 Michael Snyder <msnyder@vmware.com>
9968
9969 * server.c (queue_stop_reply): Call xmalloc not malloc.
9970
9971 2011-03-02 Michael Snyder <msnyder@vmware.com>
9972
9973 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9974
9975 2011-02-28 Michael Snyder <msnyder@vmware.com>
9976
9977 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9978 (cmd_qtframe): Ditto.
9979 (cmd_qtbuffer): Ditto.
9980 (cmd_bigqtbuffer): Ditto.
9981
9982 * utils.c (decimal2str): Initialize 'width' to nine, then
9983 don't mess with it.
9984
9985 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9986
9987 * hostio.c (require_data): Free *data, not data.
9988
9989 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9990
9991 * hostio.c (require_data): Use free, not xfree.
9992
9993 2011-02-27 Michael Snyder <msnyder@vmware.com>
9994
9995 * server.c (handle_query): Discard unused value.
9996
9997 * hostio.c (require_data): Free malloc memory before returning
9998 error.
9999
10000 2011-02-26 Michael Snyder <msnyder@vmware.com>
10001
10002 * linux-low.c (list_threads): Call closedir for dirent.
10003
10004 2011-02-27 Michael Snyder <msnyder@vmware.com>
10005
10006 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10007 a case statement falls through.
10008
10009 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10010
10011 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10012 in comparison.
10013
10014 2011-02-26 Michael Snyder <msnyder@vmware.com>
10015
10016 * utils.c (decimal2str): Eliminate dead code and dead param.
10017 (pulongest): Drop dead param from call to decimal2str.
10018 (plongest): Ditto.
10019
10020 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10021
10022 Revert the following patch (not approved yet):
10023 2011-02-21 Hui Zhu <teawater@gmail.com>
10024 * tracepoint.c (tp_printf): New function.
10025 (eval_agent_expr): Handle gdb_agent_op_printf.
10026
10027 2011-02-21 Hui Zhu <teawater@gmail.com>
10028
10029 * tracepoint.c (tp_printf): New function.
10030 (eval_agent_expr): Handle gdb_agent_op_printf.
10031
10032 2011-02-18 Tom Tromey <tromey@redhat.com>
10033
10034 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10035 (tracepoint.o): Likewise.
10036 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10037 (gdb_agent_op_names): Likewise.
10038
10039 2011-02-18 Tom Tromey <tromey@redhat.com>
10040
10041 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10042 gdb_agent_op_rot>: New constants.
10043 (gdb_agent_op_names): Add pick and roll.
10044 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10045 cases.
10046
10047 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10048
10049 * aclocal.m4: Regenerated with aclocal-1.11.1.
10050
10051 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10052
10053 * server.c (handle_qxfer_traceframe_info): New.
10054 (qxfer_packets): Register "traceframe-info".
10055 (handle_query): Report support for qXfer:traceframe-info:read+.
10056 * tracepoint.c (match_blocktype): New.
10057 (traceframe_find_block_type): Rename to ...
10058 (traceframe_walk_blocks): ... this. Add callback filter argument,
10059 and use it.
10060 (traceframe_find_block_type): New, reimplemented on top of
10061 traceframe_walk_blocks.
10062 (build_traceframe_info_xml): New.
10063 (traceframe_read_info): New.
10064 * server.h (traceframe_read_info): Declare.
10065
10066 2011-02-11 Yao Qi <yao@codesourcery.com>
10067
10068 * configure.ac: Call AC_PROG_RANLIB.
10069 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10070 * configure: Regenerate.
10071
10072 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10073
10074 * server.c (gdb_read_memory): Change return semantics to allow
10075 partial transfers.
10076 (handle_search_memory_1): Adjust.
10077 (process_serial_event) <'m' packet>: Handle partial transfers.
10078 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10079
10080 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10081
10082 * regcache.c (init_register_cache): Initialize
10083 regcache->register_status.
10084 (free_register_cache): Release regcache->register_status.
10085 (regcache_cpy): Copy register_status.
10086 (registers_to_string): Print 'x's for unavailable registers.
10087 (supply_register): Mark the register's status valid or
10088 unavailable, depending on whether a buffer was passed in or not.
10089 (supply_register_zeroed): New.
10090 (supply_regblock): Mark the registers' status valid or
10091 unavailable, depending on whether a buffer was passed in or not.
10092 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10093 (struct regcache): New `register_status' field.
10094 (supply_register_zeroed): Declare.
10095 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10096 supply_register_zeroed, rather than passing a NULL buffer to
10097 supply_register.
10098 * tracepoint.c (fetch_traceframe_registers): Update comment.
10099
10100 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10101
10102 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10103 buffer explicit.
10104
10105 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10106
10107 * server.h (decode_xfer_write): Change prototype.
10108 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10109 and don't extract the annex here.
10110 * server.c (decode_xfer_read): Remove `annex' parameter,
10111 and don't extract the annex here.
10112 (decode_xfer): New.
10113 (struct qxfer): New.
10114 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10115 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10116 (handle_qxfer_statictrace): New functions, abstracted out from
10117 handle_query, and made to use the struct qxfer interface.
10118 (handle_threads_qxfer_proper): Rename to ...
10119 (handle_qxfer_threads_proper): ... this.
10120 (handle_threads_qxfer): Rename to ...
10121 (handle_qxfer_threads): ... this. Adjust.
10122 (qxfer_packets): New array.
10123 (handle_qxfer): New function.
10124 (handle_query): Use handle_qxfer.
10125
10126 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10127
10128 * gdbreplay.c: Shorten lines of >= 80 columns.
10129 * linux-low.c: Ditto.
10130 * linux-ppc-low.c: Ditto.
10131 * linux-s390-low.c: Ditto.
10132 * linux-sparc-low.c: Ditto.
10133 * linux-x86-low.c: Ditto.
10134 * linux-xtensa-low.c: Ditto.
10135 * mem-break.c: Ditto.
10136 * nto-low.c: Ditto.
10137 * regcache.h: Ditto.
10138 * remote-utils.c: Ditto.
10139 * server.c: Ditto.
10140 * server.h: Ditto.
10141 * thread-db.c: Ditto.
10142 * tracepoint.c: Ditto.
10143 * utils.c: Ditto.
10144 * win32-low.h: Ditto.
10145
10146 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10147
10148 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10149 update.
10150
10151 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10152
10153 * server.c (gdbserver_version): Update copyright year in version
10154 output.
10155 * gdbreplay.c (gdbreplay_version): Ditto.
10156
10157 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10158
10159 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10160 * linux-bfin-low.c: New file.
10161 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10162 PT_DATA_ADDR for BFIN targets.
10163 * Makefile.in (SFILES): Add linux-bfin-low.c.
10164 (clean): Remove reg-bfin.c.
10165 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10166 * README: Mention supported Blackfin targets.
10167
10168 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10169
10170 * .gitignore: New file.
10171
10172 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10173
10174 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10175
10176 2010-10-22 Jie Zhang <jie@codesourcery.com>
10177
10178 * Makefile.in: Add FLAGS_TO_PASS variable.
10179 (install): Remove dependency of install-only and recursively
10180 invoke make for install-only.
10181
10182 2010-10-04 Doug Evans <dje@google.com>
10183
10184 * Makefile.in (uninstall): Use $(DESTDIR).
10185
10186 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10187
10188 PR gdb/11842
10189
10190 * linux-x86-low.c (compat_siginfo_from_siginfo)
10191 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10192 si_code is < 0. Check for si_code == SI_TIMER before checking for
10193 si_code < 0.
10194
10195 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10196
10197 * lynx-i386-low.c: New file.
10198 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10199
10200 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10201
10202 * lynx-low.c (ptrace_request_to_str): Remove handling for
10203 request values that have been removed in LynxOS 5.x.
10204
10205 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10206
10207 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10208 <ptrace.h>
10209
10210 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10211
10212 * configure.ac: Add --enable-inprocess-agent option.
10213 * configure: Rebuilt.
10214
10215 2010-09-06 Yao Qi <yao@codesourcery.com>
10216
10217 * linux-low.c (linux_kill): Remove unused variable.
10218 (linux_stabilize_threads): Likewise.
10219 * server.c (start_inferior): Likewise.
10220 (queue_stop_reply_callback): Likewise.
10221 * tracepoint.c (do_action_at_tracepoint): Likewise.
10222
10223 2010-09-06 Yao Qi <yao@codesourcery.com>
10224
10225 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10226 on return.
10227
10228 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10229
10230 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10231
10232 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10233
10234 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10235 "$(IPA_DEPFILES)".
10236
10237 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10238
10239 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10240 gdbserver/lynx-ppc-low.c: New files.
10241 * Makefile.in (lynx_low_h): New variable.
10242 (lynx-low.o, lynx-ppc-low.o): New rules.
10243 * configure.ac: On LynxOS, link with -lnetinet.
10244 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10245 * configure: regenerate.
10246
10247 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10248
10249 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10250 * configure.ac: Add check for vasprintf and vsnprintf.
10251 * configure, config.in: Regenerate.
10252 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10253
10254 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10255
10256 * gdbreplay.c: Move include of alloca.h up, next to include of
10257 malloc.h.
10258 * server.h: Add include of malloc.h.
10259 * mem-break.c: Remove include of malloc.h.
10260 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10261
10262 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10263
10264 * Makefile.in (memmem.o): Build with -Wno-error.
10265
10266 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10267
10268 * utils.c (xsnprintf): Make non-static.
10269 * server.h: Add xsnprintf declaration.
10270 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10271 replace calls to snprintf by calls to xsnprintf throughout.
10272
10273 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10274
10275 * configure.ac: Add configure check for alloca.
10276 * configure, config.in: Regenerate.
10277 * server.h: Include alloca.h if it exists.
10278 * gdbreplay.c: Include alloca.h if it exists.
10279
10280 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10281
10282 * linux-low.c (__SIGRTMIN): Define if not already defined.
10283 (linux_create_inferior): Check for __ANDROID__ rather than
10284 __SIGRTMIN.
10285 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10286 are already deferred.
10287 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10288 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10289 stopped and already has a pending signal to report.
10290 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10291 a pending signal to report or is moving out of a jump pad.
10292 (linux_init_signals): Check for __ANDROID__ rather than
10293 __SIGRTMIN.
10294
10295 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10296
10297 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10298 debug_threads check. Avoid a linear search when not doing debug
10299 output.
10300
10301 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10302
10303 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10304 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10305 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10306 (process_event): Change local fd's type to gdb_fildes_t.
10307 (create_file_handler): Adjust prototype.
10308 (delete_file_handler): Adjust prototype.
10309 (handle_file_event): Adjust prototype. Use pfildes.
10310 (create_file_event): Adjsut prototype.
10311 * remote-utils.c (remote_desc, listen_desc): Change type to
10312 gdb_fildes_t.
10313 * server.h: New gdb_fildes_t typedef.
10314 [USE_WIN32API]: Include winsock2.h.
10315 (delete_file_handler, add_file_handler): Adjust prototypes.
10316 (pfildes): Declare.
10317 * utils.c (pfildes): New.
10318
10319 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10320
10321 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10322 * configure: Regenerate.
10323
10324 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10325
10326 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10327 (linux_done_accessing_memory): ... this.
10328 (linux_target_ops): Adjust.
10329 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10330 * nto-low.c (nto_target_ops): Adjust comment.
10331 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10332 * spu-low.c (spu_target_ops): Adjust comment.
10333 * target.h (target_ops): Rename unprepare_to_access_memory field
10334 to done_accessing_memory.
10335 (unprepare_to_access_memory): Rename to ...
10336 (done_accessing_memory): ... this.
10337
10338 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10339
10340 * linux-low.c (linux_prepare_to_access_memory): New.
10341 (linux_unprepare_to_access_memory): New.
10342 (linux_target_ops): Install them.
10343 * server.c (read_memory): Rename to ...
10344 (gdb_read_memory): ... this. Use
10345 prepare_to_access_memory/prepare_to_access_memory.
10346 (write_memory): Rename to ...
10347 (gdb_write_memory): ... this. Use
10348 prepare_to_access_memory/prepare_to_access_memory.
10349 (handle_search_memory_1): Adjust.
10350 (process_serial_event): Adjust.
10351 * target.h (struct target_ops): New fields
10352 prepare_to_access_memory and unprepare_to_access_memory.
10353 (prepare_to_access_memory, unprepare_to_access_memory): New.
10354 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10355 prepare_to_access_memory/prepare_to_access_memory.
10356 * nto-low.c (nto_target_ops): Adjust.
10357 * spu-low.c (spu_target_ops): Adjust.
10358 * win32-low.c (win32_target_ops): Adjust.
10359
10360 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10361
10362 * Makefile.in (WARN_CFLAGS): Get it from configure.
10363 (WERROR_CFLAGS): New.
10364 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10365 * configure.ac: Introduce --enable-werror, which adds -Werror to
10366 the compiler command line. Enabled by default. Disable with
10367 --disable-werror. Add -Wdeclaration-after-statement
10368 Wpointer-arith and -Wformat-nonliteral to warning flags.
10369 * configure: Regenerate.
10370
10371 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10372
10373 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10374
10375 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10376
10377 * gdbreplay.c (remote_error): New.
10378 (gdbchar): New.
10379 (expect): Use gdbchar. Check for error reading from GDB.
10380 Clarify sync error output.
10381 (play): Check for errors writing to GDB.
10382 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10383 * remote-utils.c (getpkt): Check for errors writing to the remote
10384 descriptor.
10385
10386 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10387
10388 * linux-low.c (linux_wait_1): Move non-debugging code out of
10389 `debug_threads' control.
10390
10391 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10392
10393 * linux-low.c (linux_wait_1): Don't set last_status here.
10394 * server.c (push_event, queue_stop_reply_callback): Assert we're
10395 not pushing a TARGET_WAITKIND_IGNORE event.
10396 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10397 (myresume, handle_target_event): Set the thread's last_resume_kind
10398 and last_status from the target returned status.
10399
10400 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10401
10402 PR threads/10729
10403
10404 * linux-x86-low.c (update_debug_registers_callback): New.
10405 (i386_dr_low_set_addr): Use it.
10406 (i386_dr_low_get_addr): New.
10407 (i386_dr_low_set_control): Use update_debug_registers_callback.
10408 (i386_dr_low_get_control): New.
10409 (i386_dr_low_get_status): Adjust.
10410 * linux-low.c (linux_stop_lwp): New.
10411 * linux-low.h (linux_stop_lwp): Declare.
10412
10413 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10414 argument instead of a i386_debug_reg_state.
10415 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10416 a i386_debug_reg_state.
10417 (i386_insert_aligned_watchpoint): Adjust.
10418 (i386_remove_aligned_watchpoint): Adjust.
10419 (i386_low_stopped_data_address): Read the debug registers from the
10420 inferior instead of from the mirrors.
10421 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10422 (i386_dr_low_get_addr): Declare.
10423 (i386_dr_low_get_control): Declare.
10424 (i386_dr_low_get_status): Change prototype.
10425
10426 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10427 (i386_dr_low_get_addr): New.
10428 (i386_dr_low_get_control): New.
10429 (i386_dr_low_get_status): Adjust prototype. Return
10430 dr_status_mirror.
10431 (i386_initial_stuff): Clear dr_status_mirror and
10432 dr_control_mirror.
10433 (i386_get_thread_context): Adjust.
10434 (i386_set_thread_context): Adjust.
10435 (i386_thread_added): Adjust.
10436
10437 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10438
10439 * linux-low.h (linux_thread_area): Delete declaration.
10440
10441 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10442
10443 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10444 after its termination.
10445
10446 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10447
10448 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10449 (gdb_wants_all_stopped): Delete.
10450 (linux_wait_1): Don't call them.
10451 * server.c (handle_v_cont): Tag all threads as want-stopped.
10452 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10453 stopped as "client-wants-stopped".
10454
10455 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10456
10457 * Makefile.in (signals_h): New.
10458 (server_h): Depend on it.
10459 (server.o): Don't depend on $(signals_def).
10460 (signals.o): Depend on $(signals_def).
10461
10462 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10463
10464 * Makefile.in (signals_def): New.
10465 (server_h): Append include/gdb/signals.h and signals_def.
10466 (server.o): Append signals_def.
10467
10468 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10469
10470 * server.c (handle_target_event): Use target_signal_to_host for
10471 resume_info.sig initialization.
10472 * target.h (struct thread_resume) <sig>: New comment.
10473
10474 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10475
10476 * server.c (handle_query): strcpy() the returned string from paddress()
10477 instead of sprintf().
10478 * utils.c (paddress): Return phex_nz().
10479
10480 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10481
10482 * server.c (handle_v_cont): Call mourn_inferior if process
10483 just exited.
10484 (myresume): Likewise.
10485
10486 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10487
10488 Static tracepoints, and integration with UST.
10489
10490 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10491 * mem-break.c (uninsert_all_breakpoints)
10492 (reinsert_all_breakpoints): New.
10493 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10494 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10495 (gdb_agent_ust_loaded, helper_thread_id)
10496 (gdb_agent_helper_thread_id): New macros.
10497 (struct ipa_sym_addresses): Add addr_ust_loaded,
10498 addr_helper_thread_id, addr_cmd_buf.
10499 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10500 (in_process_agent_loaded_ust): New.
10501 (write_e_ust_not_loaded): New.
10502 (maybe_write_ipa_ust_not_loaded): New.
10503 (struct collect_static_trace_data_action): New.
10504 (enum tracepoint_type) <static_tracepoint>: New.
10505 (struct tracepoint) <handle>: Mention static tracepoints.
10506 (struct static_tracepoint_ctx): New.
10507 (CMD_BUF_SIZE): New.
10508 (add_tracepoint_action): Handle static tracepoint actions.
10509 (unprobe_marker_at): New.
10510 (clear_installed_tracepoints): Handle static tracepoints.
10511 (cmd_qtdp): Handle static tracepoints.
10512 (probe_marker_at): New.
10513 (cmd_qtstart): Handle static tracepoints.
10514 (response_tracepoint): Handle static tracepoints.
10515 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10516 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10517 (get_context_regcache): Handle static tracepoints.
10518 (do_action_at_tracepoint): Handle static tracepoint actions.
10519 (traceframe_find_block_type): Handle static trace data blocks.
10520 (traceframe_read_sdata): New.
10521 (download_tracepoints): Download static tracepoint actions.
10522 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10523 (GDB_PROBE_NAME): New.
10524 (ust_ops): New.
10525 (GET_UST_SYM): New.
10526 (USTF): New.
10527 (dlsym_ust): New.
10528 (ust_marker_to_static_tracepoint): New.
10529 (gdb_probe): New.
10530 (collect_ust_data_at_tracepoint): New.
10531 (gdb_ust_probe): New.
10532 (UNIX_PATH_MAX, SOCK_DIR): New.
10533 (gdb_ust_connect_sync_socket): New.
10534 (resume_thread, stop_thread): New.
10535 (run_inferior_command): New.
10536 (init_named_socket): New.
10537 (gdb_ust_socket_init): New.
10538 (cstr_to_hexstr): New.
10539 (next_st): New.
10540 (first_marker, next_marker): New.
10541 (response_ust_marker): New.
10542 (cmd_qtfstm, cmd_qtsstm): New.
10543 (unprobe_marker_at, probe_marker_at): New.
10544 (cmd_qtstmat, gdb_ust_thread): New.
10545 (gdb_ust_init): New.
10546 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10547 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10548 (ST_REGENTRY): New.
10549 (x86_64_st_collect_regmap): New.
10550 (X86_64_NUM_ST_COLLECT_GREGS): New.
10551 (AMD64_RIP_REGNUM): New.
10552 (supply_static_tracepoint_registers): New.
10553 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10554 (ST_REGENTRY): New.
10555 (i386_st_collect_regmap): New.
10556 (i386_NUM_ST_COLLECT_GREGS): New.
10557 (supply_static_tracepoint_registers): New.
10558 * server.c (handle_query): Handle qXfer:statictrace:read.
10559 <qSupported>: Report support for StaticTracepoints, and
10560 qXfer:statictrace:read features.
10561 * server.h (traceframe_read_sdata)
10562 (supply_static_tracepoint_registers): Declare.
10563 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10564 (unpack_varlen_hex): Include in IPA build.
10565 * Makefile.in (ustlibs, ustinc): New.
10566 (IPA_OBJS): Add remote-utils-ipa.o.
10567 ($(IPA_LIB)): Link -ldl and -lpthread.
10568 (UST_CFLAGS): New.
10569 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10570 * config.in, configure: Regenerate.
10571
10572 2010-06-20 Ian Lance Taylor <iant@google.com>
10573 Pedro Alves <pedro@codesourcery.com>
10574
10575 * linux-x86-low.c (always_true): Delete.
10576 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10577 trying to fool the compiler with always_true.
10578
10579 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10580
10581 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10582 conditions in gdbserver.
10583
10584 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10585
10586 * spu-low.c (spu_read_memory): Wrap around local store limit.
10587 (spu_write_memory): Likewise.
10588
10589 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10590
10591 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10592 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10593 LONGEST uses.
10594 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10595 uses.
10596 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10597 uses with LONGEST uses.
10598
10599 2010-06-14 Stan Shebs <stan@codesourcery.com>
10600 Pedro Alves <pedro@codesourcery.com>
10601
10602 Bytecode compiler.
10603
10604 * linux-x86-low.c: Include limits.h.
10605 (add_insns): New.
10606 (always_true): New.
10607 (EMIT_ASM): New.
10608 (EMIT_ASM32): New.
10609 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10610 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10611 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10612 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10613 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10614 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10615 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10616 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10617 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10618 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10619 (amd64_emit_void_call_2): New.
10620 (amd64_emit_ops): New.
10621 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10622 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10623 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10624 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10625 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10626 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10627 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10628 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10629 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10630 (i386_emit_stack_adjust, i386_emit_int_call_1)
10631 (i386_emit_void_call_2): New.
10632 (i386_emit_ops): New.
10633 (x86_emit_ops): New.
10634 (the_low_target): Install x86_emit_ops.
10635 * server.h (struct emit_ops): New.
10636 (get_raw_reg_func_addr): Declare.
10637 (current_insn_ptr, emit_error): Declare.
10638 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10639 (set_trace_state_variable_value): New defines.
10640 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10641 addr_get_trace_state_variable_value and
10642 addr_set_trace_state_variable_value.
10643 (symbol_list): New fields for get_raw_reg,
10644 get_trace_state_variable_value and set_trace_state_variable_value.
10645 (condfn): New typedef.
10646 (struct tracepoint): New field `compiled_cond'.
10647 (do_action_at_tracepoint): Clear compiled_cond.
10648 (get_trace_state_variable_value, set_trace_state_variable_value):
10649 Export in the IPA.
10650 (condition_true_at_tracepoint): If there's a compiled condition,
10651 run that.
10652 (current_insn_ptr, emit_error): New globals.
10653 (struct bytecode_address): New.
10654 (get_raw_reg_func_addr): New.
10655 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10656 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10657 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10658 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10659 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10660 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10661 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10662 (compile_tracepoint_condition, compile_bytecodes): New.
10663 * target.h (emit_ops): Forward declare.
10664 (struct target_ops): New field emit_ops.
10665 (target_emit_ops): New.
10666 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10667 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10668 * linux-low.c (linux_emit_ops): New.
10669 (linux_target_ops): Install it.
10670 * linux-low.h (struct linux_target_ops): New field emit_ops.
10671
10672 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10673
10674 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10675 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10676
10677 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10678 Stan Shebs <stan@codesourcery.com>
10679
10680 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10681 (all): Depend on $(extra_libraries).
10682 (install-only): Install the IPA.
10683 (IPA_OBJS, IPA_LIB): New.
10684 (clean): Remove the IPA lib.
10685 (IPAGENT_CFLAGS): New.
10686 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10687 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10688 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10689 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10690 * configure.ac: Check for atomic builtins support in the compiler.
10691 (IPA_DEPFILES, extra_libraries): Define.
10692 * configure.srv (ipa_obj): Add description.
10693 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10694 (i[34567]86-*-linux*): Set ipa_obj.
10695 (x86_64-*-linux*): Set ipa_obj.
10696 * linux-low.c (stabilizing_threads): New.
10697 (supports_fast_tracepoints): New.
10698 (linux_detach): Stabilize threads before detaching.
10699 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10700 the lwp is either not stabilizing, or is moving out of a jump pad.
10701 (linux_fast_tracepoint_collecting): New.
10702 (maybe_move_out_of_jump_pad): New.
10703 (enqueue_one_deferred_signal): New.
10704 (dequeue_one_deferred_signal): New.
10705 (linux_wait_for_event_1): If moving out of a jump pad, defer
10706 pending signals to later.
10707 (linux_stabilize_threads): New.
10708 (linux_wait_1): Check if threads need moving out of jump pads, and
10709 do it if so.
10710 (stuck_in_jump_pad_callback): New.
10711 (move_out_of_jump_pad_callback): New.
10712 (lwp_running): New.
10713 (linux_resume_one_lwp): Handle moving out of jump pads.
10714 (linux_set_resume_request): Dequeue deferred signals.
10715 (need_step_over_p): Also step over fast tracepoint jumps.
10716 (start_step_over): Also uninsert fast tracepoint jumps.
10717 (finish_step_over): Also reinsert fast tracepoint jumps.
10718 (linux_install_fast_tracepoint_jump): New.
10719 (linux_target_ops): Install linux_stabilize_threads and
10720 linux_install_fast_tracepoint_jump_pad.
10721 * linux-low.h (linux_target_ops) <get_thread_area,
10722 install_fast_tracepoint_jump_pad>: New fields.
10723 (struct lwp_info) <collecting_fast_tracepoint,
10724 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10725 (linux_get_thread_area): Declare.
10726 * linux-x86-low.c (jump_insn): New.
10727 (x86_get_thread_area): New.
10728 (append_insns): New.
10729 (push_opcode): New.
10730 (amd64_install_fast_tracepoint_jump_pad): New.
10731 (i386_install_fast_tracepoint_jump_pad): New.
10732 (x86_install_fast_tracepoint_jump_pad): New.
10733 (the_low_target): Install x86_get_thread_area and
10734 x86_install_fast_tracepoint_jump_pad.
10735 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10736 (struct fast_tracepoint_jump): New.
10737 (fast_tracepoint_jump_insn): New.
10738 (fast_tracepoint_jump_shadow): New.
10739 (find_fast_tracepoint_jump_at): New.
10740 (fast_tracepoint_jump_here): New.
10741 (delete_fast_tracepoint_jump): New.
10742 (set_fast_tracepoint_jump): New.
10743 (uninsert_fast_tracepoint_jumps_at): New.
10744 (reinsert_fast_tracepoint_jumps_at): New.
10745 (set_breakpoint_at): Use write_inferior_memory.
10746 (uninsert_raw_breakpoint): Use write_inferior_memory.
10747 (check_mem_read): Mask out fast tracepoint jumps.
10748 (check_mem_write): Mask out fast tracepoint jumps.
10749 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10750 (set_fast_tracepoint_jump): Declare.
10751 (delete_fast_tracepoint_jump)
10752 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10753 (reinsert_fast_tracepoint_jumps_at): Declare.
10754 * regcache.c: Don't compile many functions when building the
10755 in-process agent library.
10756 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10757 the register buffer in the heap.
10758 (free_register_cache): If the register buffer isn't owned by the
10759 regcache, don't free it.
10760 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10761 pre-existing register caches.
10762 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10763 type.
10764 (convert_ascii_to_int): : Constify `from' parameter type.
10765 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10766 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10767 the needed buffer in-place.
10768 (relocate_instruction): New.
10769 * server.c (handle_query) <qSymbols>: If the target supports
10770 tracepoints, give it a chance of looking up symbols. Report
10771 support for fast tracepoints.
10772 (handle_status): Stabilize threads.
10773 (process_serial_event): Adjust.
10774 * server.h (struct fast_tracepoint_jump): Forward declare.
10775 (struct process_info) <fast_tracepoint_jumps>: New field.
10776 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10777 (decode_X_packet, decode_M_packet): Adjust.
10778 (relocate_instruction): Declare.
10779 (in_process_agent_loaded): Declare.
10780 (tracepoint_look_up_symbols): Declare.
10781 (struct fast_tpoint_collect_status): Declare.
10782 (fast_tracepoint_collecting): Declare.
10783 (force_unlock_trace_buffer): Declare.
10784 (handle_tracepoint_bkpts): Declare.
10785 (initialize_low_tracepoint)
10786 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10787 * target.h (struct target_ops) <stabilize_threads,
10788 install_fast_tracepoint_jump_pad>: New fields.
10789 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10790 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10791 [HAVE_STDINT_H]: Include stdint.h.
10792 (trace_debug_1): Rename to ...
10793 (trace_vdebug): ... this.
10794 (trace_debug): Rename to ...
10795 (trace_debug_1): ... this. Add `level' parameter.
10796 (trace_debug): New.
10797 (ATTR_USED, ATTR_NOINLINE): New.
10798 (IP_AGENT_EXPORT): New.
10799 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10800 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10801 (about_to_request_buffer_space, trace_buffer_is_full)
10802 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10803 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10804 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10805 (traceframe_write_count, traceframes_created)
10806 (trace_state_variables)
10807 New renaming defines.
10808 (struct ipa_sym_addresses): New.
10809 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10810 (symbol_list): New.
10811 (ipa_sym_addrs): New.
10812 (all_tracepoint_symbols_looked_up): New.
10813 (in_process_agent_loaded): New.
10814 (write_e_ipa_not_loaded): New.
10815 (maybe_write_ipa_not_loaded): New.
10816 (tracepoint_look_up_symbols): New.
10817 (debug_threads) [IN_PROCESS_AGENT]: New.
10818 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10819 (UNKNOWN_SIDE_EFFECTS): New.
10820 (stop_tracing): New.
10821 (flush_trace_buffer): New.
10822 (stop_tracing_bkpt): New.
10823 (flush_trace_buffer_bkpt): New.
10824 (read_inferior_integer): New.
10825 (read_inferior_uinteger): New.
10826 (read_inferior_data_pointer): New.
10827 (write_inferior_data_pointer): New.
10828 (write_inferior_integer): New.
10829 (write_inferior_uinteger): New.
10830 (struct collect_static_trace_data_action): Delete.
10831 (enum tracepoint_type): New.
10832 (struct tracepoint) <type>: New field `type'.
10833 <actions_str, step_actions, step_actions_str>: Only include in
10834 GDBserver.
10835 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10836 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10837 (tracepoints): Use IP_AGENT_EXPORT.
10838 (last_tracepoint): Don't include in the IPA.
10839 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10840 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10841 (alloced_trace_state_variables): New.
10842 (trace_state_variables): Use IP_AGENT_EXPORT.
10843 (traceframe_t): Delete unused variable.
10844 (circular_trace_buffer): Don't include in the IPA.
10845 (trace_buffer_start): Delete.
10846 (struct trace_buffer_control): New.
10847 (trace_buffer_free): Delete.
10848 (struct ipa_trace_buffer_control): New.
10849 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10850 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10851 New.
10852 (trace_buffer_ctrl): New.
10853 (TRACE_BUFFER_CTRL_CURR): New.
10854 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10855 Reimplement as macros.
10856 (trace_buffer_wrap): Delete.
10857 (traceframe_write_count, traceframe_read_count)
10858 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10859 (struct tracepoint_hit_ctx) <type>: New field.
10860 (struct fast_tracepoint_ctx): New.
10861 (memory_barrier): New.
10862 (cmpxchg): New.
10863 (record_tracepoint_error): Update atomically in the IPA.
10864 (clear_inferior_trace_buffer): New.
10865 (about_to_request_buffer_space): New.
10866 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10867 updating the same buffer.
10868 (add_tracepoint): Default the tracepoint's type to trap
10869 tracepoint, and orig_size to -1.
10870 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10871 internal variables.
10872 (create_trace_state_variable): New parameter `gdb'. Handle it.
10873 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10874 (cmd_qtdp): Handle fast tracepoints.
10875 (cmd_qtdv): Adjust.
10876 (max_jump_pad_size): New.
10877 (gdb_jump_pad_head): New.
10878 (get_jump_space_head): New.
10879 (claim_jump_space): New.
10880 (sort_tracepoints): New.
10881 (MAX_JUMP_SIZE): New.
10882 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10883 IPA.
10884 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10885 support. Upload fast traceframes, and delete internal IPA
10886 breakpoints.
10887 (stop_tracing_handler): New.
10888 (flush_trace_buffer_handler): New.
10889 (cmd_qtstop): Upload fast tracepoints.
10890 (response_tracepoint): Handle fast tracepoints.
10891 (tracepoint_finished_step): Upload fast traceframes. Set the
10892 tracepoint hit context's tracepoint type.
10893 (handle_tracepoint_bkpts): New.
10894 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10895 type. Add comment about fast tracepoints.
10896 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10897 non-existing action_str field.
10898 (get_context_regcache): Handle fast tracepoints.
10899 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10900 to the regcache.
10901 (fast_tracepoint_from_jump_pad_address): New.
10902 (fast_tracepoint_from_ipa_tpoint_address): New.
10903 (collecting_t): New.
10904 (force_unlock_trace_buffer): New.
10905 (fast_tracepoint_collecting): New.
10906 (collecting): New.
10907 (gdb_collect): New.
10908 (write_inferior_data_ptr): New.
10909 (target_tp_heap): New.
10910 (target_malloc): New.
10911 (download_agent_expr): New.
10912 (UALIGN): New.
10913 (download_tracepoints): New.
10914 (download_trace_state_variables): New.
10915 (upload_fast_traceframes): New.
10916 (IPA_FIRST_TRACEFRAME): New.
10917 (IPA_NEXT_TRACEFRAME_1): New.
10918 (IPA_NEXT_TRACEFRAME): New.
10919 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10920 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10921 (gdb_jump_pad_buffer_end): New.
10922 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10923 (initialize_tracepoint): Adjust.
10924 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10925 buffer. Initialize the low module.
10926 * utils.c (PREFIX, TOOLNAME): New.
10927 (malloc_failure): Use PREFIX.
10928 (error): In the IPA, an error causes an exit.
10929 (fatal, warning): Use PREFIX.
10930 (internal_error): Use TOOLNAME.
10931 (NUMCELLS): Increase to 10.
10932 * configure, config.in: Regenerate.
10933
10934 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10935
10936 * server.c (handle_query) <qSupported>: Do two passes over the
10937 qSupported string to avoid nesting strtok.
10938
10939 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10940
10941 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10942 (CDEPS): New.
10943 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10944 -Wl,--dynamic-list.
10945 * configure: Regenerate.
10946 * proc-service.list: New.
10947
10948 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10949
10950 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10951 New comment.
10952
10953 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10954
10955 * gdbreplay.c (remote_open): Check error return from socket() call by
10956 its equality to -1 not by it being negative.
10957 * remote-utils.c (remote_open): Likewise.
10958
10959 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10960
10961 * config.h: Regenerate.
10962
10963 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10964
10965 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10966 doesn't provide PTRACE_GET_THREAD_AREA.
10967
10968 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10969
10970 * linux-m68k-low.c: Include <asm/ptrace.h>
10971 (ps_get_thread_area): Implement.
10972
10973 2010-05-03 Doug Evans <dje@google.com>
10974
10975 * event-loop.c (struct callback_event): New struct.
10976 (callback_list): New global.
10977 (append_callback_event, delete_callback_event): New functions.
10978 (process_callback): New function.
10979 (start_event_loop): Call it.
10980 * remote-utils.c (NOT_SCHEDULED): Define.
10981 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10982 moved out of readchar.
10983 (readchar): Rewrite. Call reschedule before returning.
10984 (reset_readchar): New function.
10985 (remote_close): Call it.
10986 (process_remaining, reschedule): New functions.
10987 * server.h (callback_handler_func): New typedef.
10988 (append_callback_event, delete_callback_event): Declare.
10989
10990 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10991
10992 * proc-service.c (ps_pglobal_lookup): Use
10993 thread_db_look_up_one_symbol.
10994 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10995 parameter. Use it instead of all_symbols_looked_up.
10996 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10997 field.
10998 (all_symbols_looked_up): Don't declare.
10999 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11000 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11001 field.
11002 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11003 Set all_symbols_looked_up here.
11004 (thread_db_look_up_one_symbol): New.
11005 (thread_db_get_tls_address): Adjust.
11006 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11007 thread_db object on the heap, and tentatively set it in the
11008 process structure.
11009 (thread_db_init): Don't set all_symbols_looked_up here.
11010 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11011
11012 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11013
11014 * linux-low.c (linux_kill, linux_detach): Adjust.
11015 (status_pending_p_callback): Remove redundant statement. Check
11016 for !TARGET_WAITIKIND_IGNORE, instead of
11017 TARGET_WAITKIND_STOPPED.
11018 (handle_tracepoints): Make sure LWP is locked. Adjust.
11019 (linux_wait_for_event_1): Adjust.
11020 (linux_cancel_breakpoints): New.
11021 (unsuspend_one_lwp): New.
11022 (unsuspend_all_lwps): New.
11023 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11024 (send_sigstop_callback): Change return type to int, add new
11025 `except' parameter and handle it.
11026 (suspend_and_send_sigstop_callback): New.
11027 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11028 pass them down. If SUSPEND, also increment the lwp's suspend
11029 count.
11030 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11031 (need_step_over_p): Don't consider suspended LWPs.
11032 (start_step_over): Adjust.
11033 (proceed_one_lwp): Change return type to int, add new `except'
11034 parameter and handle it.
11035 (unsuspend_and_proceed_one_lwp): New.
11036 (proceed_all_lwps): Use find_inferior instead of
11037 for_each_inferior.
11038 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11039 also decrement the suspend count of LWPs. Pass `except' down,
11040 instead of hacking its suspend count.
11041 (linux_pause_all): Add `freeze' parameter. Adjust.
11042 (linux_unpause_all): New.
11043 (linux_target_ops): Install linux_unpause_all.
11044 * server.c (handle_status): Adjust.
11045 * target.h (struct target_ops): New fields `unpause_all' and
11046 `cancel_breakpoints'. Add new parameter to `pause_all'.
11047 (pause_all): Add new `freeze' parameter.
11048 (unpause_all): New.
11049 (cancel_breakpoints): New.
11050 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11051 cancel breakpoints.
11052 (cmd_qtstart): Pause threads.
11053 (stop_tracing): Pause threads, and cancel breakpoints.
11054 * win32-low.c (win32_target_ops): Adjust.
11055
11056 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11057
11058 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11059 the inferior right away from here...
11060 (linux_wait_1): ... to here, and adjust to check the thread's
11061 last_resume_kind instead of the lwp's step or stop_expected flags.
11062
11063 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11064
11065 * README: Use consistent `GDB' and `GDBserver' spellings.
11066
11067 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11068
11069 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11070 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11071 (linux_detach_one_lwp): Assume the lwp is stopped.
11072 (any_thread_of): Delete.
11073 (linux_detach): Stop all lwps here. Don't blindly delete all
11074 breakpoints.
11075 (delete_lwp_callback): New.
11076 (linux_mourn): Delete all lwps of the process that is gone.
11077 (linux_wait_1): Don't delete the last lwp of the process here.
11078 * mem-break.h (mark_breakpoints_out): Declare.
11079 * mem-break.c (mark_breakpoints_out): New.
11080 (free_all_breakpoints): Use it.
11081 * server.c (handle_target_event): If the process is gone, mark
11082 breakpoints out.
11083 * thread-db.c (struct thread_db) <create_bp>: New field.
11084 (thread_db_enable_reporting): Fix prototype. Store a thread event
11085 breakpoint reference in the thread_db struct.
11086 (thread_db_load_search): Clear the thread_db object.
11087 (try_thread_db_load_1): Ditto.
11088 (switch_to_process): New.
11089 (disable_thread_event_reporting): Use it.
11090 (remove_thread_event_breakpoints): New.
11091 (thread_db_detach, thread_db_mourn): Use it.
11092
11093 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11094
11095 * linux-low.c (linux_enable_event_reporting): New.
11096 (linux_wait_for_event_1, handle_extended_wait): Use it.
11097
11098 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11099
11100 * linux-low.c (linux_kill_one_lwp, linux_kill)
11101 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11102 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11103 SIGSTOP even if the LWP is stopped.
11104 (send_sigstop_callback): New.
11105 (stop_all_lwps): Use send_sigstop_callback instead.
11106 (linux_resume_one_thread): Adjust.
11107 (proceed_one_lwp): Still proceed an LWP that the client has
11108 requested to stop, if we haven't reported it as stopped yet. Make
11109 sure that LWPs the client want stopped, have a pending SIGSTOP.
11110
11111 2010-04-26 Doug Evans <dje@google.com>
11112
11113 * server.c (handle_general_set): Make static.
11114
11115 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11116 Print received char after testing for error/eof instead of before.
11117 (input_interrupt): Tweak comment.
11118
11119 2010-04-23 Doug Evans <dje@google.com>
11120
11121 * server.c (start_inferior): Print inferior argv if --debug.
11122
11123 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11124
11125 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11126 * nto-x86-low.c: Include server.h
11127
11128 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11129
11130 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11131 be consistent with other sources of this directory.
11132 (init_registers_amd64): Correct name of source file of this function
11133 in the comment.
11134
11135 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11136
11137 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11138 64-bit executables.
11139
11140 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11141
11142 * win32-i386-low.c: Add 64-bit support.
11143 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11144 (init_registers_amd64): Declare.
11145 (mappings): Add 64-bit version of array.
11146 (init_windows_x86): New function.
11147 (the_low_target): Change init_arch field to init_windows_x86.
11148
11149 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11150
11151 * win32-low.c: Adapt to support also 64-bit architecture.
11152 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11153 (get_image_name): Use SIZE_T type for local variable `done'.
11154 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11155 (toolhelp_get_dll_name): Idem.
11156 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11157 Use uintptr_t typecast to avoid warning.
11158 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11159 (handle_exception): Use phex_nz to avoid warning.
11160 (win32_wait): Remove unused local variable `process'.
11161
11162 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11163
11164 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11165 `amd64-avx.o'.
11166
11167 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11168
11169 * configure.ac: Use `ws2_32' library for srv_mingw.
11170 * configure: Regenerate.
11171 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11172 * remote-utils.c: Likewise.
11173
11174 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11175
11176 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11177 if __x86_64__ is defined.
11178
11179 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11180
11181 * configure: Regenerate.
11182
11183 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11184
11185 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11186 * target.h (target_ops): New get_tib_address field.
11187 * win32-low.h (win32_thread_info): Add thread_local_base field.
11188 * win32-low.c (child_add_thread): Add tlb argument.
11189 Set thread_local_base field to TLB.
11190 (get_child_debug_event): Adapt to child_add_thread change.
11191 (win32_get_tib_address): New function.
11192 (win32_target_ops): Set get_tib_address field to
11193 win32_get_tib_address.
11194 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11195
11196 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11197
11198 * linux-low.c (linux_mourn): Also remove the process.
11199 * server.c (handle_target_event): Don't remove the process here.
11200 * nto-low.c (nto_mourn): New.
11201 (nto_target_ops): Install it.
11202 * spu-low.c (spu_mourn): New.
11203 (spu_target_ops): Install it.
11204 * win32-low.c (win32_mourn): New.
11205 (win32_target_ops): Install it.
11206
11207 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11208
11209 * server.h (buffer_xml_printf): Remove redundant `;'.
11210
11211 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11212
11213 * regcache.c (set_register_cache): Invalidate regcaches before
11214 changing the register cache layout.
11215 (regcache_invalidate_one): Allow a NULL regcache.
11216 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11217 regcaches before changing the register cache layout or the target
11218 regsets.
11219
11220 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11221
11222 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11223 variable warning on Linux/x86-64.
11224
11225 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11226
11227 GDBserver disconnected tracing support.
11228
11229 * linux-low.c (linux_remove_process): Delete.
11230 (add_lwp): Don't set last_resume_kind here.
11231 (linux_kill): Use `mourn'.
11232 (linux_detach): Use `thread_db_detach', and `mourn'.
11233 (linux_mourn): New.
11234 (linux_attach_lwp_1): Adjust comment.
11235 (linux_attach): last_resume_kind moved the thread_info; adjust.
11236 (status_pending_p_callback): Adjust.
11237 (linux_wait_for_event_1): Adjust.
11238 (count_events_callback, select_singlestep_lwp_callback)
11239 (select_event_lwp_callback, cancel_breakpoints_callback)
11240 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11241 (proceed_one_lwp): Adjust.
11242 (linux_async): Add debug output.
11243 (linux_thread_stopped): New.
11244 (linux_pause_all): New.
11245 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11246 linux_pause_all.
11247 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11248 (thread_db_free): Delete declaration.
11249 (thread_db_detach, thread_db_mourn): Declare.
11250 * thread-db.c (thread_db_init): Use thread_db_mourn.
11251 (thread_db_free): Delete, split in two.
11252 (disable_thread_event_reporting): New.
11253 (thread_db_detach): New.
11254 (thread_db_mourn): New.
11255
11256 * server.h (struct thread_info) <last_resume_kind>: New field.
11257 <attached>: Add comment.
11258 <gdb_detached>: New field.
11259 (handler_func): Change return type to int.
11260 (handle_serial_event, handle_target_event): Ditto.
11261 (gdb_connected): Declare.
11262 (tracing): Delete.
11263 (disconnected_tracing): Declare.
11264 (stop_tracing): Declare.
11265
11266 * server.c (handle_query) <qSupported>: Report support for
11267 disconnected tracing.
11268 (queue_stop_reply_callback): Account for running threads.
11269 (gdb_wants_thread_stopped): New.
11270 (gdb_wants_all_threads_stopped): New.
11271 (gdb_reattached_process): New.
11272 (handle_status): Clear the `gdb_detached' flag of all processes.
11273 In all-stop, stop all threads.
11274 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11275 (process_serial_event): If the remote connection breaks, or if an
11276 exit was forced with "monitor exit", force an event loop exit.
11277 Handle disconnected tracing on detach.
11278 (handle_serial_event): Adjust.
11279 (handle_target_event): If GDB isn't connected, forward events back
11280 to the inferior, unless the last process exited, in which case,
11281 exit gdbserver. Adjust interface.
11282
11283 * remote-utils.c (remote_open): Don't block in accept. Instead
11284 register an event loop source on the listen socket file
11285 descriptor. Refactor bits into ...
11286 (listen_desc): ... this new global.
11287 (gdb_connected): ... this new function.
11288 (enable_async_notification): ... this new function.
11289 (handle_accept_event): ... this new function.
11290 (remote_close): Clear remote_desc.
11291
11292 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11293
11294 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11295 New fields.
11296 (mourn_inferior): Define.
11297 (target_process_qsupported): Avoid the dangling else problem.
11298 (thread_stopped): Define.
11299 (pause_all): Define.
11300 (target_waitstatus_to_string): Declare.
11301 * target.c (target_waitstatus_to_string): New.
11302
11303 * tracepoint.c (tracing): Make extern.
11304 (disconnected_tracing): New.
11305 (stop_tracing): Make extern. Handle tracing stops due to GDB
11306 disconnecting.
11307 (cmd_qtdisconnected): New.
11308 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11309 (handle_tracepoint_general_set): Handle QTDisconnected.
11310
11311 * event-loop.c (event_handler_func): Change return type to int.
11312 (process_event): Bail out if the event handler wants the event
11313 loop to stop.
11314 (handle_file_event): Ditto.
11315 (start_event_loop): Bail out if the event handler wants the event
11316 loop to stop.
11317
11318 * nto-low.c (nto_target_ops): Adjust.
11319 * spu-low.c (spu_wait): Don't remove the process here.
11320 (spu_target_ops): Adjust.
11321 * win32-low.c (win32_wait): Don't remove the process here.
11322 (win32_target_ops): Adjust.
11323
11324 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11325
11326 * regcache.c (realloc_register_cache): Invalidate inferior's
11327 regcache before recreating it.
11328
11329 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11330
11331 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11332
11333 2010-04-09 Stan Shebs <stan@codesourcery.com>
11334 Pedro Alves <pedro@codesourcery.com>
11335
11336 * server.h (LONGEST): New.
11337 (struct thread_info) <while_stepping>: New field.
11338 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11339 Declare.
11340 (initialize_tracepoint, handle_tracepoint_general_set)
11341 (handle_tracepoint_query, tracepoint_finished_step)
11342 (tracepoint_was_hit, release_while_stepping_state_list):
11343 (current_traceframe): Declare.
11344 * server.c (handle_general_set): Handle tracepoint packets.
11345 (read_memory): New.
11346 (write_memory): New.
11347 (handle_search_memory_1): Use read_memory.
11348 (handle_query): Report support for conditional tracepoints, trace
11349 state variables, and tracepoint sources. Handle tracepoint
11350 queries.
11351 (main): Initialize the tracepoints module.
11352 (process_serial_event): Handle traceframe reads/writes.
11353
11354 * linux-low.c (handle_tracepoints): New.
11355 (linux_wait_1): Call it.
11356 (linux_resume_one_lwp): Handle while-stepping.
11357 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11358 (linux_target_ops): Install them.
11359 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11360 New field.
11361 * linux-x86-low.c (x86_supports_tracepoints): New.
11362 (the_low_target). Install it.
11363
11364 * mem-break.h (delete_breakpoint): Declare.
11365 * mem-break.c (delete_breakpoint): Make external.
11366
11367 * target.h (struct target_ops): Add `supports_tracepoints',
11368 `read_pc', and `write_pc' fields.
11369 (target_supports_tracepoints): Define.
11370 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11371 (phex_nz): New.
11372
11373 * regcache.h (struct regcache) <registers_owned>: New field.
11374 (init_register_cache, regcache_cpy): Declare.
11375 (regcache_read_pc, regcache_write_pc): Declare.
11376 (register_cache_size): Declare.
11377 (supply_regblock): Declare.
11378 * regcache.c (init_register_cache): New.
11379 (new_register_cache): Use it.
11380 (regcache_cpy): New.
11381 (register_cache_size): New.
11382 (supply_regblock): New.
11383 (regcache_read_pc, regcache_write_pc): New.
11384
11385 * tracepoint.c: New.
11386
11387 * Makefile.in (OBS): Add tracepoint.o.
11388 (tracepoint.o): New rule.
11389
11390 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11391
11392 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11393 (i386-mmx.o): New.
11394 (i386-mmx.c): Likewise.
11395 (i386-mmx-linux.o): Likewise.
11396 (i386-mmx-linux.c): Likewise.
11397
11398 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11399 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11400 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11401 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11402
11403 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11404 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11405 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11406
11407 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11408
11409 * Makefile.in (clean): Updated.
11410 (i386-avx.o): New.
11411 (i386-avx.c): Likewise.
11412 (i386-avx-linux.o): Likewise.
11413 (i386-avx-linux.c): Likewise.
11414 (amd64-avx.o): Likewise.
11415 (amd64-avx.c): Likewise.
11416 (amd64-avx-linux.o): Likewise.
11417 (amd64-avx-linux.c): Likewise.
11418
11419 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11420 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11421 (srv_amd64_regobj): Add amd64-avx.o.
11422 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11423 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11424 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11425 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11426 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11427 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11428 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11429
11430 * i387-fp.c: Include "i386-xstate.h".
11431 (i387_xsave): New.
11432 (i387_cache_to_xsave): Likewise.
11433 (i387_xsave_to_cache): Likewise.
11434 (x86_xcr0): Likewise.
11435
11436 * i387-fp.h (i387_cache_to_xsave): Likewise.
11437 (i387_xsave_to_cache): Likewise.
11438 (x86_xcr0): Likewise.
11439
11440 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11441 * linux-crisv32-low.c (target_regsets): Likewise.
11442 * linux-m68k-low.c (target_regsets): Likewise.
11443 * linux-mips-low.c (target_regsets): Likewise.
11444 * linux-ppc-low.c (target_regsets): Likewise.
11445 * linux-s390-low.c (target_regsets): Likewise.
11446 * linux-sh-low.c (target_regsets): Likewise.
11447 * linux-sparc-low.c (target_regsets): Likewise.
11448 * linux-xtensa-low.c (target_regsets): Likewise.
11449
11450 * linux-low.c: Include <sys/uio.h>.
11451 (regsets_fetch_inferior_registers): Support nt_type.
11452 (regsets_store_inferior_registers): Likewise.
11453 (linux_process_qsupported): New.
11454 (linux_target_ops): Add linux_process_qsupported.
11455
11456 * linux-low.h (regset_info): Add nt_type.
11457 (linux_target_ops): Add process_qsupported.
11458
11459 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11460 and <sys/uio.h>.
11461 (init_registers_i386_avx_linux): New.
11462 (init_registers_amd64_avx_linux): Likewise.
11463 (xmltarget_i386_linux_no_xml): Likewise.
11464 (xmltarget_amd64_linux_no_xml): Likewise.
11465 (PTRACE_GETREGSET): Likewise.
11466 (PTRACE_SETREGSET): Likewise.
11467 (x86_fill_xstateregset): Likewise.
11468 (x86_store_xstateregset): Likewise.
11469 (use_xml): Likewise.
11470 (x86_linux_update_xmltarget): Likewise.
11471 (x86_linux_process_qsupported): Likewise.
11472 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11473 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11474 init_registers_i386_linux here. Call
11475 x86_linux_update_xmltarget.
11476 (the_low_target): Add x86_linux_process_qsupported.
11477
11478 * server.c (handle_query): Call target_process_qsupported.
11479
11480 * target.h (target_ops): Add process_qsupported.
11481 (target_process_qsupported): New.
11482
11483 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11484
11485 * inferiors.c (add_thread): Set last_status kind to
11486 TARGET_WAITKIND_IGNORE.
11487 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11488 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11489 (linux_wait_1): Move `thread' local definition to block that uses
11490 it. Don't NULL initialize `event_child'.
11491 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11492 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11493 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11494
11495 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11496
11497 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11498 an extended waitstatus, or by a watchpoint.
11499 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11500 thread was stepping or has been stopped by a watchpoint.
11501
11502 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11503
11504 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11505 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11506 of another, then delete the previous, and validate all
11507 breakpoints.
11508 (validate_inserted_breakpoint): New.
11509 (delete_disabled_breakpoints): New.
11510 (validate_breakpoints): New.
11511 (check_mem_read): Validate breakpoints before trusting their
11512 shadow. Delete disabled breakpoints.
11513 (check_mem_write): Validate breakpoints before trusting they
11514 should be inserted. Delete disabled breakpoints.
11515 * mem-break.h (validate_breakpoints):
11516 * server.c (handle_query): Validate breakpoints when we see a
11517 qSymbol query.
11518
11519 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11520
11521 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11522 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11523 if we could tell there's a GDB breakpoint at stop_pc.
11524 (need_step_over_p): Don't do a step over if we find a GDB
11525 breakpoint at the resume PC.
11526
11527 * mem-break.c (struct raw_breakpoint): New.
11528 (enum bkpt_type): New type `gdb_breakpoint'.
11529 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11530 fields. New field `raw'.
11531 (find_raw_breakpoint_at): New.
11532 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11533 breakpoint instead.
11534 (set_breakpoint_at): Adjust.
11535 (delete_raw_breakpoint): New.
11536 (release_breakpoint): New.
11537 (delete_breakpoint): Rename to...
11538 (delete_breakpoint_1): ... this. Add proc parameter. Use
11539 release_breakpoint. Return ENOENT.
11540 (delete_breakpoint): Reimplement.
11541 (find_breakpoint_at): Delete.
11542 (find_gdb_breakpoint_at): New.
11543 (delete_breakpoint_at): Delete.
11544 (set_gdb_breakpoint_at): New.
11545 (delete_gdb_breakpoint_at): New.
11546 (gdb_breakpoint_here): New.
11547 (set_reinsert_breakpoint): Use release_breakpoint.
11548 (uninsert_breakpoint): Rename to ...
11549 (uninsert_raw_breakpoint): ... this.
11550 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11551 (reinsert_raw_breakpoint): Change parameter type to
11552 raw_breakpoint.
11553 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11554 instead.
11555 (check_breakpoints): Adjust. Use release_breakpoint.
11556 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11557 (breakpoint_inserted_here): Ditto.
11558 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11559 Don't trust the breakpoint's shadow if it is not inserted.
11560 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11561 (delete_all_breakpoints): Adjust.
11562 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11563 use delete_breakpoint_1.
11564
11565 * mem-break.h (breakpoints_supported): Delete declaration.
11566 (set_gdb_breakpoint_at): Declare.
11567 (gdb_breakpoint_here): Declare.
11568 (delete_breakpoint_at): Delete.
11569 (delete_gdb_breakpoint_at): Declare.
11570
11571 * server.h (struct raw_breakpoint): Forward declare.
11572 (struct process_info): New field `raw_breakpoints'.
11573
11574 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11575 breakpoints.
11576
11577 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11578
11579 * linux-low.c (status_pending_p_callback): Fix comment.
11580 (linux_wait_for_event_1): Move most of the internal breakpoint
11581 handling from here...
11582 (linux_wait_1): ... to here.
11583 (count_events_callback): New.
11584 (select_singlestep_lwp_callback): New.
11585 (select_event_lwp_callback): New.
11586 (cancel_breakpoints_callback): New.
11587 (select_event_lwp): New.
11588 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11589 priority to all LWPs that have had events that should be reported
11590 to the client. Cancel breakpoints when about to reporting the
11591 event to the client, not while stopping lwps. No longer cancel
11592 finished single-steps here.
11593 (cancel_finished_single_step): Delete.
11594 (cancel_finished_single_steps): Delete.
11595
11596 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11597
11598 * mem-break.c (enum bkpt_type): New.
11599 (struct breakpoint): New field `type'.
11600 (set_breakpoint_at): Change return type to struct breakpoint
11601 pointer. Set type to `other_breakpoint' by default.
11602 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11603 in the breakpoint list.
11604 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11605 (reinsert_breakpoint): Rename to ...
11606 (reinsert_raw_breakpoint): ... this.
11607 (reinsert_breakpoints_at): Adjust.
11608 * mem-break.h (struct breakpoint): Declare.
11609 (set_breakpoint_at): Change return type to struct breakpoint
11610 pointer.
11611
11612 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11613
11614 * server.c (handle_query): Assign, not compare.
11615
11616 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11617
11618 Teach linux gdbserver to step-over-breakpoints.
11619
11620 * linux-low.c (can_hardware_single_step): New.
11621 (supports_breakpoints): New.
11622 (handle_extended_wait): If stopping threads, read the stop pc of
11623 the new cloned LWP.
11624 (get_pc): New.
11625 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11626 low target doesn't support retrieving the PC.
11627 (add_lwp): Set last_resume_kind to resume_continue.
11628 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11629 (linux_attach): Don't clear stop_expected. Set the lwp's
11630 last_resume_kind to resume_stop.
11631 (linux_detach_one_lwp): Don't check for removed breakpoints.
11632 (check_removed_breakpoint): Delete.
11633 (status_pending_p): Rename to ...
11634 (status_pending_p_callback): ... this. Don't check for removed
11635 breakpoints. Don't consider threads that are stopped from GDB's
11636 perspective.
11637 (linux_wait_for_lwp): Always read the stop_pc here.
11638 (cancel_breakpoint): New.
11639 (step_over_bkpt): New global.
11640 (linux_wait_for_event_1): Implement stepping over breakpoints.
11641 (gdb_wants_lwp_stopped): New.
11642 (gdb_wants_all_stopped): New.
11643 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11644 single-step traps here. Store the thread's last reported target
11645 wait status.
11646 (send_sigstop): Don't clear stop_expected. Always set it,
11647 instead.
11648 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11649 (cancel_finished_single_step): New.
11650 (cancel_finished_single_steps): New.
11651 (wait_for_sigstop): Don't cancel finished single-step traps here.
11652 (linux_resume_one_lwp): Don't check for removed breakpoints.
11653 Don't set `step' on non-hardware step archs.
11654 (linux_set_resume_request): Ignore resume_stop requests if already
11655 stopping or stopped. Set the lwp's last_resume_kind.
11656 (resume_status_pending_p): Don't check for removed breakpoints.
11657 (need_step_over_p): New.
11658 (start_step_over): New.
11659 (finish_step_over): New.
11660 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11661 requests. Clear the thread's last reported target waitstatus.
11662 Don't use the `suspended' flag. Don't consider pending breakpoints.
11663 (linux_resume): Start a step-over if necessary.
11664 (proceed_one_lwp): New.
11665 (proceed_all_lwps): New.
11666 (unstop_all_lwps): New.
11667 * linux-low.h (struct lwp_info): Rewrite comment for the
11668 `suspended' flag. Add the `stop_pc' field. Delete the
11669 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11670 Add `'last_resume_kind' and `need_step_over' fields.
11671 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11672 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11673 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11674 (set_raw_breakpoint_at): New.
11675 (set_breakpoint_at): Rewrite to use it.
11676 (reinsert_breakpoint_handler): Delete.
11677 (set_reinsert_breakpoint): New.
11678 (reinsert_breakpoint_by_bp): Delete.
11679 (delete_reinsert_breakpoints): New.
11680 (uninsert_breakpoint): Rewrite.
11681 (uninsert_breakpoints_at): New.
11682 (reinsert_breakpoint): Rewrite.
11683 (reinsert_breakpoints_at): New.
11684 (check_breakpoints): Rewrite.
11685 (breakpoint_here): New.
11686 (breakpoint_inserted_here): New.
11687 (check_mem_read): Adjust.
11688 * mem-break.h (breakpoints_supported, breakpoint_here)
11689 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11690 (reinsert_breakpoint_by_bp): Delete declaration.
11691 (delete_reinsert_breakpoints): Declare.
11692 (reinsert_breakpoint): Delete declaration.
11693 (reinsert_breakpoints_at): Declare.
11694 (uninsert_breakpoint): Delete declaration.
11695 (uninsert_breakpoints_at): Declare.
11696 (check_breakpoints): Adjust prototype.
11697 * server.h: Adjust include order.
11698 (struct thread_info): Declare here. Add a `last_status' field.
11699
11700 2010-03-23 Michael Snyder <msnyder@vmware.com>
11701
11702 * server.c (crc32): New function.
11703 (handle_query): Add handling for 'qCRC:' request.
11704
11705 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11706
11707 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11708 lwp had been stopped by a watchpoint.
11709
11710 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11711
11712 * server.h (internal_error): Declare.
11713 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11714 * utils.c (internal_error): New function.
11715
11716 2010-03-15 Andreas Schwab <schwab@redhat.com>
11717
11718 * configure.srv: Fix typo setting srv_regobj.
11719
11720 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11721
11722 * linux-low.c (fetch_register): Avoid passing a non string literal
11723 format to `error'.
11724 (usr_store_inferior_registers): Ditto.
11725
11726 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11727
11728 * linux-low.c (linux_write_memory): Bail out early if peeking
11729 memory failed.
11730
11731 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11732
11733 * linux-low.h (struct lwp_info): New fields
11734 `stopped_by_watchpoint' and `stopped_data_address'.
11735 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11736 here, and cache them in the lwp object.
11737 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11738 directly.
11739 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11740 field.
11741 (linux_stopped_by_watchpoint): Rewrite.
11742 (linux_stopped_data_address): Rewrite.
11743
11744 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11745
11746 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11747 switching the current inferior, not before.
11748
11749 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11750
11751 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11752 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11753 i386-linux.c and amd64-linux.c.
11754 (reg-i386.o): Removed.
11755 (reg-i386.c): Likewise.
11756 (reg-i386-linux.o): Likewise.
11757 (reg-i386-linux.c): Likewise.
11758 (reg-x86-64.o): Likewise.
11759 (reg-x86-64.c): Likewise.
11760 (reg-x86-64-linux.o): Likewise.
11761 (reg-x86-64-linux.c): Likewise.
11762 (i386.o): New.
11763 (i386.c): Likewise.
11764 (i386-linux.o): Likewise.
11765 (i386-linux.c): Likewise.
11766 (amd64.o): Likewise.
11767 (amd64.c): Likewise.
11768 (amd64-linux.o): Likewise.
11769 (amd64-linux.c): Likewise.
11770
11771 * configure.srv (srv_i386_regobj): New.
11772 (srv_i386_linux_regobj): Likewise.
11773 (srv_amd64_regobj): Likewise.
11774 (srv_amd64_linux_regobj): Likewise.
11775 (srv_i386_32bit_xmlfiles): Likewise.
11776 (srv_i386_64bit_xmlfiles): Likewise.
11777 (srv_i386_xmlfiles): Likewise.
11778 (srv_amd64_xmlfiles): Likewise.
11779 (srv_i386_linux_xmlfiles): Likewise.
11780 (srv_amd64_linux_xmlfiles): Likewise.
11781 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11782 srv_xmlfiles to $srv_i386_xmlfiles.
11783 (i[34567]86-*-mingw32ce*): Likewise.
11784 (i[34567]86-*-mingw*): Likewise.
11785 (i[34567]86-*-nto*): Likewise.
11786 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11787 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11788 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11789 (x86_64-*-linux*): Likewise.
11790
11791 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11792 (init_registers_amd64_linux): New.
11793 (x86_arch_setup): Replace init_registers_x86_64_linux with
11794 init_registers_amd64_linux.
11795
11796 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11797
11798 * configure.ac: Check for libdl. If it is not available link against
11799 static libthread_db.
11800 * configure: Regenerate.
11801
11802 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11803
11804 PR9605
11805
11806 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11807 handing a read watchpoint.
11808 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11809
11810 2010-02-12 Doug Evans <dje@google.com>
11811
11812 * linux-low.c (linux_supports_tracefork_flag): Document.
11813 (linux_look_up_symbols): Add comment.
11814
11815 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11816
11817 * regcache.c (supply_register): Clear regcache if buf is NULL.
11818
11819 2010-02-02 Nicolas Roche <roche@sourceware.org>
11820 Joel Brobecker <brobecker@adacore.com>
11821
11822 * inferiors.c (find_inferior): Add function documentation.
11823 (unloaded_dll): Handle the case where the unloaded dll has not
11824 been previously registered in the dll list.
11825
11826 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11827
11828 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11829 (thumb2_breakpoint): New.
11830 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11831
11832 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11833
11834 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11835 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11836 breakpoints.
11837
11838 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11839
11840 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11841
11842 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11843
11844 * linux-s390-low.c (s390_collect_ptrace_register)
11845 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11846
11847 2010-01-21 Doug Evans <dje@google.com>
11848
11849 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11850 (PTRACE_ARG4_TYPE): New macro.
11851 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11852 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11853 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11854 (usr_store_inferior_registers): Ditto.
11855 (linux_read_memory, linux_write_memory): Ditto.
11856 (linux_test_for_tracefork): Ditto.
11857
11858 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11859 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11860
11861 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11862
11863 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11864 target.
11865
11866 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11867
11868 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11869 prototype to take a regcache. Adjust.
11870
11871 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11872
11873 * regcache.h (struct thread_info): Forward declare.
11874 (struct regcache): New.
11875 (new_register_cache): Adjust prototype.
11876 (get_thread_regcache): Declare.
11877 (free_register_cache): Adjust prototype.
11878 (registers_to_string, registers_from_string): Ditto.
11879 (supply_register, supply_register_by_name, collect_register)
11880 (collect_register_as_string, collect_register_by_name): Ditto.
11881 * regcache.c (struct inferior_regcache_data): Delete.
11882 (get_regcache): Rename to ...
11883 (get_thread_regcache): ... this. Adjust. Switch inferior before
11884 fetching registers.
11885 (regcache_invalidate_one): Adjust.
11886 (regcache_invalidate): Fix prototype.
11887 (new_register_cache): Return the new register cache.
11888 (free_register_cache): Change prototype.
11889 (realloc_register_cache): Adjust.
11890 (registers_to_string): Change prototype to take a regcache. Adjust.
11891 (registers_from_string): Ditto.
11892 (register_data): Ditto.
11893 (supply_register): Ditto.
11894 (supply_register_by_name): Ditto.
11895 (collect_register): Ditto.
11896 (collect_register_as_string): Ditto.
11897 (collect_register_by_name): Ditto.
11898 * server.c (process_serial_event): Adjust.
11899 * linux-low.h (regset_fill_func, regset_store_func): Change
11900 prototype.
11901 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11902 Change prototype.
11903 * linux-low.c (get_stop_pc): Adjust.
11904 (check_removed_breakpoint): Adjust.
11905 (linux_wait_for_event): Adjust.
11906 (linux_resume_one_lwp): Adjust.
11907 (fetch_register): Add regcache parameter. Adjust.
11908 (usr_store_inferior_registers): Ditto.
11909 (regsets_fetch_inferior_registers): Ditto.
11910 (regsets_store_inferior_registers): Ditto.
11911 (linux_fetch_registers, linux_store_registers): Ditto.
11912 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11913 regcache. Adjust.
11914 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11915 Ditto.
11916 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11917 prototype to take a regcache.
11918 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11919 * remote-utils.c (convert_ascii_to_int, outreg)
11920 (prepare_resume_reply): Change prototype to take a regcache.
11921 Adjust.
11922 * target.h (struct target_ops) <fetch_registers, store_registers>:
11923 Change prototype to take a regcache.
11924 (fetch_inferior_registers, store_inferior_registers): Change
11925 prototype to take a regcache. Adjust.
11926 * proc-service.c (ps_lgetregs): Adjust.
11927 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11928 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11929 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11930 take a regcache. Adjust.
11931 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11932 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11933 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11934 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11935 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11936 (cris_cannot_fetch_register):
11937 (cris_breakpoint_at): Change prototype to take a regcache.
11938 Adjust.
11939 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11940 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11941 to take a regcache. Adjust.
11942 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11943 Adjust.
11944 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11945 take a regcache. Adjust.
11946 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11947 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11948 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11949 * linux-mips-low.c (mips_get_pc):
11950 (mips_set_pc): Change prototype to take a regcache. Adjust.
11951 (mips_reinsert_addr): Adjust.
11952 (mips_collect_register): Change prototype to take a regcache.
11953 Adjust.
11954 (mips_supply_register):
11955 (mips_collect_register_32bit, mips_supply_register_32bit)
11956 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11957 (mips_store_fpregset): Ditto.
11958 * linux-ppc-low.c (ppc_supply_ptrace_register)
11959 (ppc_supply_ptrace_register): Ditto.
11960 (parse_spufs_run): Adjust.
11961 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11962 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11963 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11964 take a regcache. Adjust.
11965 * linux-s390-low.c (s390_collect_ptrace_register)
11966 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11967 (s390_set_pc): Change prototype to take a regcache. Adjust.
11968 (s390_arch_setup): Adjust.
11969 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11970 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11971 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11972 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11973 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11974 regcache. Adjust.
11975 (sparc_breakpoint_at): Adjust.
11976 * linux-xtensa-low.c (xtensa_fill_gregset):
11977 (xtensa_store_gregset):
11978 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11979 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11980 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11981 prototype to take a regcache. Adjust.
11982 * win32-arm-low.c (arm_fetch_inferior_register)
11983 (arm_store_inferior_register): Change prototype to take a
11984 regcache. Adjust.
11985 * win32-i386-low.c (i386_fetch_inferior_register)
11986 (i386_store_inferior_register): Change prototype to take a
11987 regcache. Adjust.
11988 * win32-low.c (child_fetch_inferior_registers)
11989 (child_store_inferior_registers): Change prototype to take a
11990 regcache. Adjust.
11991 (win32_wait): Adjust.
11992 (win32_fetch_inferior_registers): Change prototype to take a
11993 regcache. Adjust.
11994 (win32_store_inferior_registers): Adjust.
11995 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11996 store_inferior_register>: Change prototype to take a regcache.
11997
11998 2010-01-20 Doug Evans <dje@google.com>
11999
12000 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12001 #ifdef.
12002 (linux_wait_for_event1, linux_init_signals): Ditto.
12003 (W_STOPCODE): Provide definition if missing.
12004
12005 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12006
12007 * linux-low.c (linux_core_of_thread): New.
12008 (compare_ints, show_process, list_threads): New.
12009 (linux_qxfer_osdata): Report threads and cores.
12010 (linux_target_op): Register linux_core_of_thread.
12011 * remote-utils.c (prepare_resume_reply): Report the core.
12012 (buffer_xml_printf): Support %d specifier.
12013 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12014 New.
12015 (handle_query): Handle qXfer:threads. Announce availability
12016 thereof.
12017 * target.h (struct target_ops): New field core_of_thread.
12018
12019 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12020
12021 * Makefile.in (clean): Remove new generated files.
12022 (reg-s390.o, reg-s390.c): Remove rules.
12023 (reg-s390x.o, reg-s390x.c): Likewise.
12024 (s390-linux32.o, s390-linux32.c): Add rules.
12025 (s390-linux64.o, s390-linux64.c): Likewise.
12026 (s390x-linux64.o, s390x-linux64.c): Likewise.
12027 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12028 * linux-s390-low.c: Include <elf.h>.
12029 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12030 (init_registers_s390): Remove prototype.
12031 (init_registers_s390x): Likewise.
12032 (init_registers_s390_linux32): Add prototype.
12033 (init_registers_s390_linux64): Likewise.
12034 (init_registers_s390x_linux64): Likewise.
12035 (s390_num_regs_3264): New define.
12036 (s390_regmap_3264): New global variable.
12037 (s390_cannot_fetch_register): Remove obsolete check.
12038 (s390_cannot_store_register): Likewise.
12039 (s390_collect_ptrace_register): Handle upper/lower register halves.
12040 (s390_supply_ptrace_register): Likewise.
12041 (s390_fill_gregset): Update to register number changes.
12042 (s390_get_hwcap): New routine.
12043 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12044 Install appropriate regmap and register set.
12045
12046 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12047
12048 * server.c (gdbserver_version): Update copyright year to 2010.
12049 * gdbreplay.c (gdbreplay_version): Likewise.
12050
12051 2009-12-28 Doug Evans <dje@google.com>
12052
12053 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12054 elf/external.h. Include <elf.h> instead but only if necessary.
12055
12056 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12057
12058 * linux-low.c (linux_remove_process): Remove `detaching'
12059 parameter. Don't release/detach from thread_db here.
12060 (linux_kill): Release/detach from thread_db here, ...
12061 (linux_detach): ... and here, before actually detaching.
12062 (linux_wait_1): ... and here, when a process exits.
12063 * thread-db.c (any_thread_of): New.
12064 (thread_db_free): Switch the current inferior to a thread of the
12065 passed in process.
12066
12067 2009-12-21 Doug Evans <dje@google.com>
12068
12069 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12070
12071 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12072 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12073 warning ifndef __NR_tkill. Move setting of errno there too.
12074 Delete unnecessary resetting of errno after syscall.
12075 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12076
12077 * configure.ac: Check for dladdr.
12078 * config.in: Regenerate.
12079 * configure: Regenerate.
12080 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12081 (try_thread_db_load): Update.
12082
12083 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12084
12085 2009-12-18 Doug Evans <dje@google.com>
12086
12087 * event-loop.c: Include unistd.h if it exists.
12088
12089 * linux-low.c (my_waitpid): Move definition away from being in
12090 between linux_tracefork_child/linux_test_for_tracefork.
12091
12092 * gdb_proc_service.h (psaddr_t): Fix type.
12093 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12094 signature to match glibc.
12095
12096 2009-12-16 Doug Evans <dje@google.com>
12097
12098 * linux-low.c (linux_read_memory): Fix argument to read.
12099
12100 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12101
12102 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12103 events, don't leave current_inferior pointing at null.
12104
12105 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12106
12107 * win32-low.c (LOG): Delete.
12108 (OUTMSG): Output to stderr.
12109 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12110 on compile time LOG macro.
12111 (win32_wait): Fix debug output.
12112
12113 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12114
12115 * win32-low.c (win32_add_one_solib): If the dll name is
12116 "ntdll.dll", prepend the system directory to the dll path.
12117
12118 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12119
12120 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12121
12122 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12123 Vladimir Prus <vladimir@codesourcery.com>
12124
12125 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12126 * configure.ac: Check for __mcoldfire__ and set
12127 gdb_cv_m68k_is_coldfire.
12128 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12129 reg-cf.o and reg-m68k.o.
12130 * configure: Regenerated.
12131
12132 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12133
12134 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12135 Pass it to thread_db_free.
12136 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12137 proper `detaching' argument to linux_remove_process.
12138 * linux-low.h (thread_db_free): Add `detaching' parameter.
12139 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12140 to thread_db_free.
12141 (thread_db_free): Add `detaching' parameter. Only
12142 call td_ta_clear_event if detaching from process.
12143
12144 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12145
12146 * thread-db.c (thread_db_free): Fix typo.
12147
12148 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12149
12150 PR gdb/10838
12151 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12152
12153 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12154
12155 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12156 with an i686 compiler.
12157 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12158 needed.
12159 * configure: Rebuilt.
12160
12161 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12162
12163 PR gdb/10783
12164
12165 * server.c (handle_search_memory_1): Correct read_addr initialization
12166 in loop for searching subsequent chunks.
12167
12168 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12169
12170 * configure.ac: New --with-libthread-db option.
12171 * thread-db.c: Allow direct dependence on libthread_db.
12172 (thread_db_free): Adjust.
12173 * config.in: Regenerate.
12174 * configure: Likewise.
12175
12176 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12177
12178 PR gdb/10757
12179 * thread-db.c (attach_thread): New function.
12180 (maybe_attach_thread): Return success/failure.
12181 (find_new_threads_callback): Adjust.
12182 (thread_db_find_new_threads): Loop until no new threads.
12183
12184 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12185
12186 * proc-service.c (ps_lgetregs): Formatting.
12187
12188 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12189
12190 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12191 * configure.ac: Adjust.
12192 * linux-low.h (struct process_info_private): Move members to struct
12193 thread_db.
12194 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12195 * linux-low.c (linux_remove_process): Adjust.
12196 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12197 * server.c (handle_query): Move code ...
12198 (handle_monitor_command): ... here. New function.
12199 * target.h (struct target_ops): New member.
12200 * thread-db.c (struct thread_db): New.
12201 (libthread_db_search_path): New variable.
12202 (thread_db_create_event, thread_db_enable_reporting)
12203 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12204 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12205 (try_thread_db_load_1, dladdr_to_soname): New functions.
12206 (try_thread_db_load, thread_db_load_search): New functions.
12207 (thread_db_init): Search for libthread_db.
12208 (thread_db_free): New function.
12209 (thread_db_handle_monitor_command): Likewise.
12210 * config.in: Regenerate.
12211 * configure: Regenerate.
12212
12213 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12214
12215 * spu-low.c (spu_kill): Wait for inferior to terminate.
12216 Call clear_inferiors.
12217 (spu_detach): Call clear_inferiors.
12218
12219 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12220
12221 * aclocal.m4: Regenerate.
12222 * config.in: Likewise.
12223 * configure: Likewise.
12224
12225 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12226
12227 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12228 (parse_spufs_run): New function.
12229 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12230 (ppc_breakpoint_at): Handle SPU breakpoints.
12231
12232 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12233
12234 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12235 (SPUFS_MAGIC): Define.
12236 (spu_enumerate_spu_ids): New function.
12237 (linux_qxfer_spu): New function.
12238 (linux_target_ops): Install linux_qxfer_spu.
12239
12240 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12241
12242 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12243 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12244 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12245 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12246 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12247 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12248 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12249 (init_registers_powerpc_cell32l): Add prototype.
12250 (init_registers_powerpc_cell64l): Likewise.
12251 (ppc_arch_setup): Detect Cell/B.E. architecture.
12252
12253 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12254
12255 * Makefile.in (datarootdir): New variable.
12256
12257 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12258
12259 * linux-low.c (linux_write_memory): Update debugging output.
12260 * Makefile.in (clean): Add new descriptions.
12261 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12262 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12263 * configure.srv: Add new files for arm*-*-linux*.
12264 * linux-arm-low.c: Add new declarations.
12265 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12266 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12267 (HWCAP_VFPv3D16): New.
12268 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12269 instead of __IWMMXT__.
12270 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12271 (arm_arch_setup): New.
12272 (target_regsets): Remove #ifdef. Add VFP regset.
12273 (the_low_target): Use arm_arch_setup.
12274
12275 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12276
12277 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12278 the main thread again.
12279
12280 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12281
12282 Adding Neutrino gdbserver.
12283 * configure: Regenerated.
12284 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12285 * configure.srv (i[34567]86-*-nto*): New target.
12286 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12287 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12288 (nto_comctrl) [__QNX__]: New function.
12289 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12290
12291 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12292
12293 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12294 srv_tgtobj.
12295
12296 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12297 Pedro Alves <pedro@codesourcery.com>
12298
12299 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12300 don't support CONTEXT_EXTENDED_REGISTERS.
12301 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12302 (the_low_target): Install them.
12303 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12304 failing with ERROR_PIPE_NOT_CONNECTED.
12305
12306 2009-06-30 Doug Evans <dje@google.com>
12307 Pierre Muller <muller@ics.u-strasbg.fr>
12308
12309 Add h/w watchpoint support to x86-linux, win32-i386.
12310 * Makefile.in (SFILES): Add i386-low.c
12311 (i386_low_h): Define.
12312 (i386-low.o): Add dependencies.
12313 (linux-x86-low.o): Add i386-low.h dependency.
12314 (win32-i386-low.o): Ditto.
12315 * i386-low.c: New file.
12316 * i386-low.h: New file.
12317 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12318 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12319 * linux-low.c (linux_add_process): Initialize arch_private.
12320 (linux_remove_process): Free arch_private.
12321 (add_lwp): Initialize arch_private.
12322 (delete_lwp): Free arch_private.
12323 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12324 provided.
12325 * linux-low.h (process_info_private): New member arch_private.
12326 (lwp_info): New member arch_private.
12327 (linux_target_ops): New members new_process, new_thread,
12328 prepare_to_resume.
12329 (ptid_of): New macro.
12330 * linux-x86-low.c: Include stddef.h, i386-low.h.
12331 (arch_process_info): New struct.
12332 (arch_lwp_info): New struct.
12333 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12334 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12335 (i386_dr_low_get_status): New function.
12336 (x86_insert_point, x86_remove_point): New functions.
12337 (x86_stopped_by_watchpoint): New function.
12338 (x86_stopped_data_address): New function.
12339 (x86_linux_new_process, x86_linux_new_thread): New functions.
12340 (x86_linux_prepare_to_resume): New function.
12341 (the_low_target): Add entries for insert_point, remove_point,
12342 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12343 prepare_to_resume.
12344 * server.c (debug_hw_points): New global.
12345 (monitor_show_help): Document set debug-hw-points.
12346 (handle_query): Process "set debug-hw-points".
12347 * server.h (debug_hw_points): Declare.
12348 (paddress): Declare.
12349 * utils.c (NUMCELLS, CELLSIZE): New macros.
12350 (get_sell, xsnprintf, paddress): New functions.
12351 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12352 remove_point, stopped_by_watchpoint, stopped_data_address.
12353 * win32-i386-low.c: Include i386-low.h.
12354 (debug_reg_state): Replaces dr.
12355 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12356 (i386_dr_low_get_status): New function.
12357 (i386_insert_point, i386_remove_point): New functions.
12358 (i386_stopped_by_watchpoint): New function.
12359 (i386_stopped_data_address): New function.
12360 (i386_initial_stuff): Update.
12361 (get_thread_context,set_thread_context,i386_thread_added): Update.
12362 (the_low_target): Add entries for insert_point,
12363 remove_point, stopped_by_watchpoint, stopped_data_address.
12364 * win32-low.c (win32_insert_watchpoint): New function.
12365 (win32_remove_watchpoint): New function.
12366 (win32_stopped_by_watchpoint): New function.
12367 (win32_stopped_data_address): New function.
12368 (win32_target_ops): Add entries for insert_watchpoint,
12369 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12370 * win32-low.h (win32_target_ops): New members insert_point,
12371 remove_point, stopped_by_watchpoint, stopped_data_address.
12372
12373 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12374
12375 * server.c (process_serial_event): Re-return unsupported, not
12376 error, if the type isn't recognized. Re-allow supporting only
12377 insert or remove packets. Also call require_running for
12378 breakpoints. Add missing break statement to default case. Tidy.
12379 * target.h (struct target_ops): Rename insert_watchpoint to
12380 insert_point, and remove_watchpoint to remove_point.
12381
12382 * linux-low.h (struct linux_target_ops): Likewise.
12383 * linux-low.c (linux_insert_watchpoint): Rename to ...
12384 (linux_insert_point): ... this. Adjust.
12385 (linux_remove_watchpoint): Rename to ...
12386 (linux_remove_point): ... this. Adjust.
12387 (linux_target_ops): Adjust.
12388 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12389 (cris_insert_point): ... this.
12390 (cris_remove_watchpoint): Rename to ...
12391 (cris_remove_point): ... this.
12392 (the_low_target): Adjust.
12393
12394 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12395
12396 * server.c (handle_v_kill): Pass signal_pid to
12397 kill_inferior if multi_process is zero.
12398
12399 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12400
12401 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12402 * target.h (target_ops): Comment for *_watchpoint to make it clear
12403 the functions can get types '0' and '1'.
12404
12405 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12406
12407 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12408 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12409 * regcache.c (get_regcache): Likewise.
12410 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12411 * win32-low.c (child_fetch_inferior_registers): Remove check for
12412 regno 0.
12413
12414 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12415 Pedro Alves <pedro@codesourcery.com>
12416
12417 * target.h (struct target_ops) <supports_multi_process>: New
12418 callback.
12419 (target_supports_multi_process): New.
12420 * server.c (handle_query): Even if GDB reports support, only
12421 enable multi-process if the target also supports it. Report
12422 multi-process support only if the target backend supports it.
12423 * linux-low.c (linux_supports_multi_process): New function.
12424 (linux_target_ops): Install it as target_supports_multi_process
12425 callback.
12426
12427 2009-05-24 Doug Evans <dje@google.com>
12428
12429 Global renaming of find_thread_pid to find_thread_ptid.
12430 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12431 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12432 All callers updated.
12433
12434 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12435 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12436 directly.
12437
12438 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12439 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12440 (linux_resume_one_lwp): Ditto.
12441
12442 2009-05-23 Doug Evans <dje@google.com>
12443
12444 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12445 from struct inferior_list_entry * to struct lwp_info *.
12446 All callers updated.
12447
12448 2009-05-13 Doug Evans <dje@google.com>
12449
12450 * linux-x86-low.c: Don't include assert.h.
12451 (x86_siginfo_fixup): Use fatal, not assert.
12452 (x86_arch_setup): Fix comment.
12453
12454 2009-05-12 Doug Evans <dje@google.com>
12455
12456 Biarch support for i386/amd64 gdbserver.
12457 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12458 Add linux-x86-low.c.
12459 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12460 (linux-x86-low.o): Add.
12461 * linux-x86-64-low.c: Delete.
12462 * linux-i386-low.c: Delete.
12463 * linux-x86-low.c: New file.
12464 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12465 linux-x86-low.o.
12466 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12467 linux-x86-low.o.
12468 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12469 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12470 (linux_child_pid_to_exec_file): New function.
12471 (elf_64_header_p, elf_64_file_p): New functions.
12472 (siginfo_fixup): New function.
12473 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12474 give target a chance to convert layout.
12475 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12476 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12477
12478 2009-05-07 Doug Evans <dje@google.com>
12479
12480 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12481 (regsets_store_inferior_registers): Ditto.
12482
12483 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12484
12485 PR server/10048
12486
12487 * linux-low.c (must_set_ptrace_flags): Delete.
12488 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12489 of the global.
12490 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12491 `lwp->must_set_ptrace_flags' instead.
12492 (linux_wait_for_event_1): Set ptrace options here.
12493 (linux_wait_1): ... not here.
12494
12495 2009-04-30 Doug Evans <dje@google.com>
12496
12497 * inferiors.c (started_inferior_callback): New function.
12498 (attached_inferior_callback): New function.
12499 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12500 * server.c (print_started_pid, print_attached_pid): New functions.
12501 (detach_or_kill_for_exit): New function.
12502 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12503 * server.h (have_started_inferiors_p): Declare.
12504 (have_attached_inferiors_p): Declare.
12505
12506 * inferiors.c (remove_process): Fix memory leak, free process.
12507 * linux-low.c (linux_remove_process): New function.
12508 (linux_kill): Call it instead of remove_process.
12509 (linux_detach, linux_wait_1): Ditto.
12510
12511 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12512
12513 * configure.srv: Add x86 Windows CE target.
12514
12515 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12516
12517 * inferiors.c (get_thread_process): Make global.
12518 * server.h (get_thread_process): Add prototype.
12519 * thread-db.c (find_one_thread): Use get_thread_process
12520 instead of current_process.
12521 (thread_db_get_tls_address): Do not crash if called when
12522 thread layer is not yet initialized.
12523
12524 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12525
12526 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12527 * spu-low.c (current_tid): Rename to ...
12528 (current_ptid): ... this.
12529 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12530 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12531 ptid_get_lwp (current_ptid) instead of current_tid.
12532 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12533 instead of current_tid. Use find_process_pid to verify pid
12534 argument is valid. Pass proper argument to remove_process.
12535 (spu_thread_alive): Compare current_ptid instead of current_tid.
12536 (spu_resume): Likewise.
12537
12538 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12539
12540 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12541 variable.
12542
12543 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12544
12545 Implement the multiprocess extensions, and add linux multiprocess
12546 support.
12547
12548 * server.h (ULONGEST): Declare.
12549 (struct ptid, ptid_t): New.
12550 (minus_one_ptid, null_ptid): Declare.
12551 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12552 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12553 (struct inferior_list_entry): Change `id' type from unsigned from
12554 to ptid_t.
12555 (struct sym_cache, struct breakpoint, struct
12556 process_info_private): Forward declare.
12557 (struct process_info): Declare.
12558 (current_process): Declare.
12559 (all_processes): Declare.
12560 (initialize_inferiors): Declare.
12561 (add_thread): Adjust to use ptid_t.
12562 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12563 (add_process, remove_process, find_thread_pid): Declare.
12564 (find_inferior_id): Adjust to use ptid_t.
12565 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12566 (multi_process): Declare.
12567 (push_event): Adjust to use ptid_t.
12568 (read_ptid, write_ptid): Declare.
12569 (prepare_resume_reply): Adjust to use ptid_t.
12570 (clear_symbol_cache): Declare.
12571 * inferiors.c (all_processes): New.
12572 (null_ptid, minus_one_ptid): New.
12573 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12574 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12575 (add_thread): Change unsigned long to ptid. Remove gdb_id
12576 parameter. Adjust.
12577 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12578 (gdb_id_to_thread): Rename to ...
12579 (find_thread_pid): ... this. Change unsigned long to ptid.
12580 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12581 (loaded_dll, pull_pid_from_list): Adjust.
12582 (add_process, remove_process, find_process_pid)
12583 (get_thread_process, current_process, initialize_inferiors): New.
12584 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12585 (struct target_waitstatus) <related_pid>: Ditto.
12586 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12587 return type to int.
12588 (struct target_ops) <join>: Add `pid' argument.
12589 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12590 (struct target_ops) <wait>: Add `ptid' field. Change return type
12591 to ptid.
12592 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12593 (mywait): Add `ptid' argument. Change return type to ptid_t.
12594 (target_pid_to_str): Declare.
12595 * target.c (set_desired_inferior): Adjust to use ptids.
12596 (mywait): Add new `ptid' argument. Adjust.
12597 (target_pid_to_str): New.
12598 * mem-break.h (free_all_breakpoints): Declare.
12599 * mem-break.c (breakpoints): Delelete.
12600 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12601 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12602 to use per-process breakpoint list.
12603 (free_all_breakpoints): New.
12604 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12605 (symbol_cache, all_symbols_looked_up): Delete.
12606 (hexchars): New.
12607 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12608 read_ptid): New.
12609 (prepare_resume_reply): Change ptid argument's type from unsigned
12610 long to ptid_t. Adjust. Implement W;process and X;process.
12611 (free_sym_cache, clear_symbol_cache): New.
12612 (look_up_one_symbol): Adjust to per-process symbol cache. *
12613 * server.c (cont_thread, general_thread, step_thread): Change type
12614 to ptid_t.
12615 (attached): Delete.
12616 (multi_process): New.
12617 (last_ptid): Change type to ptid_t.
12618 (struct vstop_notif) <ptid>: Change type to ptid_t.
12619 (queue_stop_reply, push_event): Change `ptid' argument's type to
12620 ptid_t.
12621 (discard_queued_stop_replies): Add `pid' argument.
12622 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12623 changes. Don't reference the `attached' global.
12624 (attach_inferior): Adjust to mywait interface changes.
12625 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12626 features. Handle and report "multiprocess+". Handle
12627 "qAttached:PID".
12628 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12629 changes.
12630 (handle_v_kill): New.
12631 (handle_v_stopped): Adjust to use target_pid_to_str.
12632 (handle_v_requests): Allow multiple attaches and runs when
12633 multiprocess extensions are in effect. Handle "vKill".
12634 (myresume): Adjust to use ptids.
12635 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12636 (handle_status): Adjust to discard_queued_stop_replies interface
12637 change.
12638 (first_thread_of, kill_inferior_callback)
12639 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12640 (main): Call initialize_inferiors. Adjust to use ptids, killing
12641 and detaching from all inferiors. Handle multiprocess packet
12642 variants.
12643 * linux-low.h: Include gdb_proc_service.h.
12644 (struct process_info_private): New.
12645 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12646 <lwpid_of>: Use ptid_get_lwp.
12647 (get_lwp_thread): Adjust.
12648 (struct lwp_info): Add `dead' member.
12649 (find_lwp_pid): Declare.
12650 * linux-low.c (thread_db_active): Delete.
12651 (new_inferior): Adjust comment.
12652 (inferior_pid): Delete.
12653 (linux_add_process): New.
12654 (handle_extended_wait): Adjust.
12655 (add_lwp): Change unsigned long to ptid.
12656 (linux_create_inferior): Add process to processes table. Adjust
12657 to use ptids. Don't set new_inferior here.
12658 (linux_attach_lwp): Rename to ...
12659 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12660 it. Adjust to use ptids.
12661 (linux_attach_lwp): New.
12662 (linux_attach): Add process to processes table. Don't set
12663 new_inferior here.
12664 (struct counter): New.
12665 (second_thread_of_pid_p, last_thread_of_process_p): New.
12666 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12667 multiple processes.
12668 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12669 processes. Remove process from process table.
12670 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12671 to multiple processes.
12672 (any_thread_of): New.
12673 (linux_detach): Add `pid' argument, and handle it. Remove process
12674 from processes table.
12675 (linux_join): Add `pid' argument. Handle it.
12676 (linux_thread_alive): Change unsighed long argument to ptid_t.
12677 Consider dead lwps as not being alive.
12678 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12679 threads we're not interested in.
12680 (same_lwp, find_lwp_pid): New.
12681 (linux_wait_for_lwp): Change `pid' argument's type from int to
12682 ptid_t. Adjust.
12683 (linux_wait_for_event): Rename to ...
12684 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12685 from int to ptid_t. Adjust.
12686 (linux_wait_for_event): New.
12687 (linux_wait_1): Add `ptid' argument. Change return type to
12688 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12689 that exit from the process table.
12690 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12691 Adjust.
12692 (mark_lwp_dead): New.
12693 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12694 stopping all threads, mark its main lwp as dead.
12695 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12696 ptids.
12697 (fetch_register, usr_store_inferior_registers)
12698 (regsets_fetch_inferior_registers)
12699 (regsets_store_inferior_registers, linux_read_memory)
12700 (linux_write_memory): Inline `inferior_pid'.
12701 (linux_look_up_symbols): Adjust to use per-process
12702 `thread_db_active'.
12703 (linux_request_interrupt): Adjust to use ptids.
12704 (linux_read_auxv): Inline `inferior_pid'.
12705 (initialize_low): Don't reference thread_db_active.
12706 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12707 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12708 (ps_getpid): Return the pid of the current inferior.
12709 * thread-db.c (proc_handle, thread_agent): Delete.
12710 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12711 per-process data.
12712 (find_one_thread): Change argument type to ptid_t. Adjust to
12713 per-process data.
12714 (maybe_attach_thread): Adjust to per-process data and ptids.
12715 (thread_db_find_new_threads): Ditto.
12716 (thread_db_init): Ditto.
12717 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12718 processes table. Adjust to use ptids.
12719 (spu_kill, spu_detach): Adjust interface. Remove process from
12720 processes table.
12721 (spu_join, spu_thread_alive): Adjust interface.
12722 (spu_wait): Adjust interface. Remove process from processes
12723 table. Adjust to use ptids.
12724 * win32-low.c (current_inferior_tid): Delete.
12725 (current_inferior_ptid): New.
12726 (debug_event_ptid): New.
12727 (thread_rec): Take a ptid. Adjust.
12728 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12729 (child_delete_thread): Ditto.
12730 (do_initial_child_stuff): Add `attached' argument. Add process to
12731 processes table.
12732 (child_fetch_inferior_registers, child_store_inferior_registers):
12733 Adjust.
12734 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12735 (win32_attach): Pass 1 to do_initial_child_stuff.
12736 (win32_kill): Adjust interface. Remove process from processes
12737 table.
12738 (win32_detach): Ditto.
12739 (win32_join): Adjust interface.
12740 (win32_thread_alive): Take a ptid.
12741 (win32_resume): Adjust to use ptids.
12742 (get_child_debug_event): Ditto.
12743 (win32_wait): Adjust interface. Remove exiting process from
12744 processes table.
12745
12746 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12747
12748 Non-stop mode support.
12749
12750 * server.h (non_stop): Declare.
12751 (gdb_client_data, handler_func): Declare.
12752 (delete_file_handler, add_file_handler, start_event_loop):
12753 Declare.
12754 (handle_serial_event, handle_target_event, push_event)
12755 (putpkt_notif): Declare.
12756 * target.h (enum resume_kind): New.
12757 (struct thread_resume): Replace `step' field by `kind' field.
12758 (TARGET_WNOHANG): Define.
12759 (struct target_ops) <wait>: Add `options' argument.
12760 <supports_non_stop, async, start_non_stop>: New fields.
12761 (target_supports_non_stop, target_async): New.
12762 (start_non_stop): Declare.
12763 (mywait): Add `options' argument.
12764 * target.c (mywait): Add `options' argument. Print child exit
12765 notifications here.
12766 (start_non_stop): New.
12767 * server.c (non_stop, own_buf, mem_buf): New globals.
12768 (struct vstop_notif): New.
12769 (notif_queue): New global.
12770 (queue_stop_reply, push_event, discard_queued_stop_replies)
12771 (send_next_stop_reply): New.
12772 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12773 interface changes.
12774 (attach_inferior): In non-stop mode, don't wait for the target
12775 here.
12776 (handle_general_set): Handle QNonStop.
12777 (handle_query): When handling qC, return the current general
12778 thread, instead of the first thread of the list.
12779 (handle_query): If the backend supports non-stop mode, include
12780 QNonStop+ in the qSupported query response.
12781 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12782 and non-stop mode.
12783 (handle_v_attach, handle_v_run): Handle non-stop mode.
12784 (handle_v_stopped): New.
12785 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12786 (myresume): Adjust to use resume_kind. Handle non-stop.
12787 (queue_stop_reply_callback): New.
12788 (handle_status): Handle non-stop mode.
12789 (main): Clear non_stop flag on reconnection. Use the event-loop.
12790 Refactor serial protocol handling from here ...
12791 (process_serial_event): ... to this new function. When GDB
12792 selects any thread, select one here. In non-stop mode, wait until
12793 GDB acks all pending events before exiting.
12794 (handle_serial_event, handle_target_event): New.
12795 * remote-utils.c (remote_open): Install remote_desc in the event
12796 loop.
12797 (remote_close): Remove remote_desc from the event loop.
12798 (putpkt_binary): Rename to...
12799 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12800 (putpkt_binary): New as wrapper around putpkt_binary_1.
12801 (putpkt_notif): New.
12802 (prepare_resume_reply): In non-stop mode, don't change the
12803 general_thread.
12804 * event-loop.c: New.
12805 * Makefile.in (OBJ): Add event-loop.o.
12806 (event-loop.o): New rule.
12807
12808 * linux-low.h (pid_of): Moved here.
12809 (lwpid_of): New.
12810 (get_lwp_thread): Use lwpid_of.
12811 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12812 * linux-low.c (pid_of): Delete.
12813 (inferior_pid): Use lwpid_of.
12814 (linux_event_pipe): New.
12815 (target_is_async_p): New.
12816 (delete_lwp): New.
12817 (handle_extended_wait): Use lwpid_of.
12818 (add_lwp): Don't set lwpid field.
12819 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12820 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12821 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12822 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12823 first. Adjust to linux_wait_for_event interface changes. Use
12824 lwpid_of.
12825 (linux_detach): Don't delete the main lwp here.
12826 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12827 (status_pending_p): Don't consider explicitly suspended lwps.
12828 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12829 pointer. Add OPTIONS argument. Change return type to int. Use
12830 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12831 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12832 pointer. Add status pointer argument. Return a pid instead of a
12833 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12834 changes. In non-stop mode, don't switch to a random thread.
12835 (linux_wait): Rename to...
12836 (linux_wait_1): ... this. Add target_options argument, and handle
12837 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12838 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12839 clean exit and signal exit code. Don't stop all threads in
12840 non-stop mode. In all-stop mode, only stop all threads when
12841 reporting a stop to GDB. Handle explicit thread stop requests.
12842 (async_file_flush, async_file_mark): New.
12843 (linux_wait): New.
12844 (send_sigstop): Use lwpid_of.
12845 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12846 interface changes. In non-stop mode, don't switch to a random
12847 thread.
12848 (linux_resume_one_lwp): Use lwpid_of.
12849 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12850 (linux_resume_one_thread): ... this. Handle resume_stop. In
12851 non-stop mode, don't look for pending flag in all threads.
12852 (resume_status_pending_p): Don't consider explicitly suspended
12853 threads.
12854 (my_waitpid): Reimplement. Emulate __WALL.
12855 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12856 Use lwpid_of.
12857 (sigchld_handler, linux_supports_non_stop, linux_async)
12858 (linux_start_non_stop): New.
12859 (linux_target_ops): Register linux_supports_non_stop, linux_async
12860 and linux_start_non_stop.
12861 (initialize_low): Install SIGCHLD handler.
12862 * thread-db.c (thread_db_create_event, find_one_thread)
12863 (thread_db_get_tls_address): Use lwpid_of.
12864 * win32-low.c (win32_detach): Adjust to use resume_kind.
12865 (win32_wait): Add `options' argument.
12866 * spu-low.c (spu_resume): Adjust to use resume_kind.
12867 (spu_wait): Add `options' argument.
12868
12869 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12870
12871 Decouple target code from remote protocol.
12872
12873 * target.h (enum target_waitkind): New.
12874 (struct target_waitstatus): New.
12875 (struct target_ops) <wait>: Return an unsigned long. Take a
12876 target_waitstatus pointer instead of a char pointer.
12877 (mywait): Likewise.
12878 * target.c (mywait): Change prototype to return an unsigned long.
12879 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12880 * server.h (thread_from_wait, old_thread_from_wait): Delete
12881 declarations.
12882 (prepare_resume_reply): Change prototype to take a
12883 target_waitstatus.
12884 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12885 (last_status, last_ptid): New.
12886 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12887 pid instead of a signal.
12888 (attach_inferior): Remove "status" and "signal" parameters.
12889 Adjust.
12890 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12891 not as an address.
12892 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12893 (handle_v_requests, myresume): Remove "status" and "signal"
12894 parameters. Adjust.
12895 (handle_status): New.
12896 (main): Delete local `status'. Adjust.
12897 * remote-utils.c: Include target.h.
12898 (prepare_resume_reply): Change prototype to take a
12899 target_waitstatus. Adjust.
12900
12901 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12902 interface.
12903 * spu-low.c (spu_wait): Adjust.
12904 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12905 Delete.
12906 (win32_wait): Adjust.
12907
12908 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12909
12910 * target.h (struct thread_resume): Delete leave_stopped member.
12911 (struct target_ops): Add a `n' argument to the `resume' callback.
12912 * server.c (start_inferior): Adjust.
12913 (handle_v_cont, myresume): Adjust.
12914 * linux-low.c (check_removed_breakpoint): Adjust to resume
12915 interface change, and to removed leave_stopped field.
12916 (resume_ptr): Delete.
12917 (struct thread_resume_array): New.
12918 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12919 resume interface change.
12920 (linux_continue_one_thread, linux_queue_one_thread)
12921 (resume_status_pending_p): Check if the resume field is NULL
12922 instead of checking the leave_stopped member.
12923 (linux_resume): Adjust to the target resume interface change.
12924 * spu-low.c (spu_resume): Adjust to the target resume interface
12925 change.
12926 * win32-low.c (win32_detach, win32_resume): Ditto.
12927
12928 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12929
12930 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12931 flag.
12932 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12933 pending.
12934 (linux_continue_one_thread): Only preserve the stepping flag if
12935 there's a pending breakpoint.
12936
12937 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12938
12939 * server.c (main): After the inferior having exited, call
12940 remote_close before exiting gdbserver.
12941
12942 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12943
12944 Fix size of FPSCR in Power 7 processors.
12945 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12946 (PPC_FEATURE_HAS_DFP): New #define.
12947 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12948 size of the FPSCR.
12949
12950 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12951
12952 * server.c (handle_query) Whitespace and formatting.
12953
12954 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12955
12956 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12957 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12958 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12959 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12960 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12961 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12962 Makefile.in, configure.ac: Fix whitespace throughout.
12963 * configure: Regenerate.
12964
12965 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12966
12967 * inferiors.c (find_inferior): Make it safe for the callback
12968 function to delete the currently iterated inferior.
12969
12970 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12971
12972 * Makefile.in (linuw_low_h): Move higher.
12973 (thread-db.o): Depend on $(linux_low_h).
12974
12975 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12976
12977 Rename "process" to "lwp" throughout.
12978
12979 * linux-low.c (all_processes): Rename to...
12980 (all_lwps): ... this.
12981 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12982 (add_process): Rename to ...
12983 (add_lwp): ... this. Adjust.
12984 (linux_create_inferior): Adjust.
12985 (linux_attach_lwp): Adjust.
12986 (linux_attach): Adjust.
12987 (linux_kill_one_process): Rename to ...
12988 (linux_kill_one_lwp): ... this. Adjust.
12989 (linux_kill): Adjust.
12990 (linux_detach_one_process): Rename to ...
12991 (linux_detach_one_lwp): ... this. Adjust.
12992 (linux_detach): Adjust.
12993 (check_removed_breakpoint): Adjust.
12994 (status_pending_p): Adjust.
12995 (linux_wait_for_process): Rename to ...
12996 (linux_wait_for_lwp): ... this. Adjust.
12997 (linux_wait_for_event): Adjust.
12998 (send_sigstop): Adjust.
12999 (wait_for_sigstop): Adjust.
13000 (stop_all_processes): Rename to ...
13001 (stop_all_lwps): ... this.
13002 (linux_resume_one_process): Rename to ...
13003 (linux_resume_one_lwp): ... this. Adjust.
13004 (linux_set_resume_request, linux_continue_one_thread)
13005 (linux_queue_one_thread, resume_status_pending_p)
13006 (usr_store_inferior_registers, regsets_store_inferior_registers)
13007 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13008 Adjust.
13009 * linux-low.h (get_process): Rename to ...
13010 (get_lwp): ... this. Adjust.
13011 (get_thread_process): Rename to ...
13012 (get_thread_lwp): ... this. Adjust.
13013 (get_process_thread): Rename to ...
13014 (get_lwp_thread): ... this. Adjust.
13015 (struct process_info): Rename to ...
13016 (struct lwp_info): ... this.
13017 (all_processes): Rename to ...
13018 (all_lwps): ... this.
13019 * proc-service.c (ps_lgetregs): Adjust.
13020 * thread-db.c (thread_db_create_event, find_one_thread)
13021 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13022
13023 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13024
13025 * server.c (handle_query): Handle "qAttached".
13026
13027 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13028
13029 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13030 GPLv3, update license URL.
13031
13032 2009-03-01 Doug Evans <dje@google.com>
13033
13034 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13035 (server_h): Add gdb_signals.h.
13036 (signals.o): Update.
13037 * server.h (target_signal_from_host,target_signal_to_host_p)
13038 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13039
13040 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13041
13042 * remote-utils.c (getpkt): Also generate remote-debug
13043 information if noack_mode is set.
13044
13045 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13046
13047 * server.c (handle_query): Report qXfer:siginfo:read and
13048 qXfer:siginfo:write as supported and handle them.
13049 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13050 * linux-low.c (linux_xfer_siginfo): New.
13051 (linux_target_ops): Set it.
13052
13053 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13054
13055 * server.c (gdbserver_usage): Mention --remote-debug.
13056 (main): Accept '--remote-debug' switch.
13057
13058 2009-01-18 Doug Evans <dje@google.com>
13059
13060 * regcache.c (new_register_cache): No need to check result of xcalloc.
13061 * server.c (handle_search_memory): Back out calls to xmalloc,
13062 result is checked and error is returned to user upon failure.
13063 (handle_query): Ditto. Add more checks for result of malloc.
13064 (handle_v_cont): Check result of malloc, report error back to
13065 user upon failure.
13066 (handle_v_run): Ditto. Call freeargv.
13067 * server.h (freeargv): Declare.
13068 * utils.c (freeargv): New fn.
13069
13070 2009-01-15 Doug Evans <dje@google.com>
13071
13072 * gdbreplay.c (perror_with_name): Make arg const char *.
13073 * server.h (target_signal_to_name): Make return type const char *.
13074 * thread-db.c (thread_db_err_str): Make return type const char *.
13075 * utils.c (perror_with_name): Make arg const char *.
13076
13077 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13078
13079 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13080 when handling a EXIT_PROCESS_DEBUG_EVENT.
13081
13082 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13083
13084 * gdbreplay.c (gdbreplay_version): Update copyright year.
13085 * server.c (gdbserver_version): Likewise.
13086
13087 2009-01-05 Doug Evans <dje@google.com>
13088
13089 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13090 (handle_extended_wait): Improve comment.
13091
13092 2008-12-13 Doug Evans <dje@google.com>
13093
13094 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13095 * server.h (ATTR_MALLOC): New macro.
13096 (xmalloc,xcalloc,xstrdup): Declare.
13097 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13098 * inferiors.c: Ditto.
13099 * linux-low.c: Ditto.
13100 * mem-break.c: Ditto.
13101 * regcache.c: Ditto.
13102 * remote-utils.c: Ditto.
13103 * server.c: Ditto.
13104 * target.c: Ditto.
13105 * win32-low.c: Ditto.
13106
13107 2008-12-12 Doug Evans <dje@google.com>
13108
13109 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13110 in debugging printf.
13111
13112 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13113
13114 2008-12-09 Doug Evans <dje@google.com>
13115
13116 * linux-low.h (struct process_info): Delete member tid, unused.
13117 * thread-db.c (find_one_thread): Update.
13118 (maybe_attach_thread): Update.
13119
13120 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13121
13122 * target.h (struct target_ops): Add qxfer_osdata member.
13123 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13124 and dirent.h.
13125 (linux_qxfer_osdata): New functions.
13126 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13127 callback.
13128 * server.c (handle_query): Handle "qXfer:osdata:read:".
13129 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13130 (buffer_xml_printf): New functions.
13131 * server.h (struct buffer): New.
13132 (buffer_grow_str, buffer_grow_str0): New macros.
13133 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13134 (buffer_xml_printf): Declare.
13135
13136 2008-11-24 Doug Evans <dje@google.com>
13137
13138 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13139
13140 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13141
13142 * server.c (handle_v_run): Always use the supplied argument list.
13143
13144 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13145
13146 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13147 (xtensa_regmap_table): Add entry for scompare1.
13148
13149 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13150
13151 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13152 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13153 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13154 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13155 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13156 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13157 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13158 XML target descriptions.
13159 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13160 when inferior is running on an ISA 2.05 or later processor. Add
13161 special case to return offset for full 64-bit slot of FPSCR when
13162 in 32-bits.
13163
13164 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13165
13166 * Makefile.in (SFILES, clean): Added sparc64 files.
13167 (reg-sparc64.o, reg-sparc64.c): New.
13168 * configure.srv (sparc*-*-linux*): New configuration.
13169 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13170 syscall arguments for SPARC.
13171 (regsets_store_inferior_registers): Likewise.
13172 * linux-sparc-low.c: New file.
13173
13174 2008-10-21 Doug Evans <dje@google.com>
13175
13176 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13177 (READLINE_DIR,READLINE_DEP): Delete.
13178 (INTERNAL_CFLAGS): Update.
13179 (LINTFLAGS): Update.
13180
13181 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13182
13183 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13184 whole argv from the last run, not just argv[0].
13185
13186 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13187
13188 * regcache.c (new_register_cache): Return NULL if the register
13189 cache size isn't known yet.
13190 (free_register_cache): Avoid dereferencing a NULL regcache.
13191
13192 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13193
13194 * configure.srv: Merge MIPS and MIPS64.
13195
13196 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13197
13198 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13199
13200 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13201
13202 * Makefile.in: Add required vsx dependencies.
13203
13204 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13205 Declare init_registers_powerpc_vsx32l.
13206 Declare init_registers_powerpc_vsx64l.
13207 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13208 (ppc_arch_setup): Check for VSX in hwcap.
13209 (ppc_fill_vsxregset): New function.
13210 (ppc_store_vsxregset): New function.
13211 Add new VSX entry in regset_info target_regsets.
13212
13213 * configure.srv: Add new VSX dependencies.
13214
13215 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13216
13217 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13218 (remote_open): Set or clear transport_is_reliable.
13219 (putpkt_binary): Don't expect acks in noack mode.
13220 (getpkt): Don't send ack/nac in noack mode.
13221 * server.c (handle_general_set): Handle QStartNoAckMode.
13222 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13223 qSupported.
13224 (main): Reset noack_mode on every connection.
13225 * server.h (noack_mode): Declare.
13226
13227 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13228
13229 * Makefile.in (GDBREPLAY_OBS): New variable.
13230 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13231
13232 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13233 Daniel Jacobowitz <dan@codesourcery.com>
13234
13235 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13236 (usr_store_inferior_registers): Likewise.
13237 (regsets_store_inferior_registers): Likewise.
13238
13239 2008-07-31 Rolf Jansen <rj@surtec.com>
13240 Pedro Alves <pedro@codesourcery.com>
13241
13242 * configure.ac: Check for memmem declaration.
13243 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13244 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13245 (disable_packet_qfThreadInfo): Unconditionally compile.
13246 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13247 * configure, config.in: Regenerate.
13248
13249 2008-07-28 Doug Kwan <dougkwan@google.com>
13250
13251 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13252 (linux_write_memory): Remove declaration of errno.
13253
13254 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13255
13256 * linux-low.c (handle_extended_wait): Do not use "status"
13257 variable uninitialized.
13258
13259 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13260
13261 * server.c (handle_v_attach): Inhibit reporting dll changes.
13262
13263 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13264
13265 * remote-utils.c (prepare_resume_reply): If requested, don't
13266 output "thread:TID" in the T stop reply.
13267
13268 * server.c (disable_packet_vCont, disable_packet_Tthread)
13269 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13270 (handle_query): If requested, disable support for qC, qfThreadInfo
13271 and qsThreadInfo.
13272 (handle_v_requests): If requested, disable support for vCont.
13273 (gdbserver_show_disableable): New.
13274 (main): Handle --disable-packet and --disable-packet=LIST.
13275
13276 * server.h (disable_packet_vCont, disable_packet_Tthread)
13277 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13278
13279 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13280
13281 * server.c (gdbserver_usage): Mention --version.
13282
13283 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13284
13285 * Makefile.in (gdbreplay.o): New rule.
13286
13287 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13288
13289 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13290 message, not gdbserver.
13291
13292 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13293 Nathan Sidwell <nathan@codesourcery.com>
13294 Joseph Myers <joseph@codesourcery.com>
13295
13296 * acinclude.m4: Include ../../config/acx.m4.
13297 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13298 * configure, config.in: Regenerate.
13299 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13300 * server.c (gdbserver_version): Print PKGVERSION.
13301 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13302 (main): Adjust gdbserver_usage calls.
13303 * gdbreplay.c (version, host_name): Add declarations.
13304 (gdbreplay_version, gdbreplay_usage): New.
13305 (main): Accept --version and --help options.
13306
13307 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13308
13309 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13310 (arm_breakpoint_at): Handle Thumb.
13311 (the_low_target): Add comment.
13312
13313 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13314
13315 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13316
13317 2008-05-09 Doug Evans <dje@google.com>
13318
13319 * server.h (decode_search_memory_packet): Declare.
13320 * remote-utils.c (decode_search_memory_packet): New fn.
13321 * server.c (handle_search_memory_1): New fn.
13322 (handle_search_memory): New fn.
13323 (handle_query): Process qSearch:memory packets.
13324
13325 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13326
13327 * regcache.c (registers_length): Remove.
13328 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13329 full register packet.
13330 * regcache.h (registers_length): Remove prototype.
13331 * server.h (PBUFSIZ): Define to 16384.
13332
13333 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13334
13335 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13336 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13337 powerpc-64l.o, and powerpc-altivec64l.o.
13338 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13339 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13340 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13341 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13342 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13343 to srv_xmlfiles.
13344
13345 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13346 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13347 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13348 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13349 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13350 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13351 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13352 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13353 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13354 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13355 (clean): Update.
13356
13357 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13358 (init_registers_powerpc_32l): ... this new prototype.
13359 (init_registers_powerpc_32): Remove, replace by ...
13360 (init_registers_powerpc_altivec32l): ... this new prototype.
13361 (init_registers_powerpc_e500): Remove, replace by ...
13362 (init_registers_powerpc_e500l): ... this new prototype.
13363 (init_registers_ppc64): Remove, replace by ...
13364 (init_registers_powerpc_64l): ... this new prototype.
13365 (init_registers_powerpc_64): Remove, replace by ...
13366 (init_registers_powerpc_altivec64l): ... this new prototype.
13367 (ppc_num_regs): Set to 73.
13368 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13369 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13370 (ppc_cannot_store_register): Handle orig_r3 and trap.
13371 (ppc_arch_setup): Update init_registers_... calls.
13372 (ppc_fill_gregset): Handle orig_r3 and trap.
13373
13374 * inferiors.c (clear_inferiors): Reset current_inferior.
13375
13376 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13377
13378 * acinclude.m4: Add override.m4.
13379 * configure: Regenerate.
13380
13381 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13382
13383 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13384 initial call to init_register_ppc64.
13385
13386 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13387
13388 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13389 single powerpc*-*-linux* case.
13390 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13391
13392 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13393
13394 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13395 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13396 from reg_xmlfiles.
13397 * linux-ppc-low.c: Include <elf.h>.
13398 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13399 (ppc_hwcap): New global variable.
13400 (ppc_regmap): Remove __SPE__ #ifdef sections.
13401 (ppc_regmap_e500): New global variable.
13402 (ppc_cannot_store_register): Update __SPE__ special case.
13403 (ppc_get_hwcap): New function.
13404 (ppc_arch_setup): Use it to determine whether inferior supports
13405 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13406 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13407 Do not access registers if target does not support AltiVec.
13408 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13409 Do not access registers if target does not support SPE.
13410 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13411
13412 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13413
13414 * linux-low.c (disabled_regsets, num_regsets): New.
13415 (use_regsets_p): Delete.
13416 (linux_wait_for_process): Clear disabled_regsets.
13417 (regsets_fetch_inferior_registers): Check and set it.
13418 (regsets_store_inferior_registers): Likewise.
13419 (linux_fetch_registers, linux_store_registers): Do not use
13420 use_regsets_p.
13421 (initialize_low): Allocate disabled_regsets.
13422
13423 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13424
13425 * Makefile.in (LIBOBJS): New.
13426 (OBS): Use LIBOBJS.
13427 (memmem.o): New rule.
13428 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13429 * configure: Regenerated.
13430
13431 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13432
13433 * server.c (handle_query): Never return "unsupported" for
13434 qXfer:features:read queries.
13435
13436 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13437
13438 * server.c (get_features_xml): Fix inverted condition.
13439 (handle_query): Always support qXfer:feature:read.
13440
13441 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13442
13443 * server.c (wrapper_argv): New.
13444 (start_inferior): Handle wrapper_argv. If set, expect an extra
13445 trap.
13446 (gdbserver_usage): Document --wrapper.
13447 (main): Parse --wrapper.
13448
13449 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13450
13451 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13452 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13453 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13454 (ppc_set_pc): Likewise.
13455 (ppc_arch_setup): New function.
13456 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13457 of collect_register.
13458 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13459
13460 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13461
13462 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13463 instead of linux-ppc64-low.o.
13464 * linux-ppc64-low.c: Remove file.
13465 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13466 (linux-ppc64-low.o): Remove rule.
13467
13468 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13469 (init_registers_powerpc_64): Likewise.
13470 (ppc_regmap): Conditionally define depending on __powerpc64__.
13471 (ppc_cannot_store_register): Do not special-case "fpscr" when
13472 compiled on __powerpc64__.
13473 (ppc_collect_ptrace_register): New function.
13474 (ppc_supply_ptrace_register): New function.
13475 (ppc_breakpoint): Change type to "unsigned int".
13476 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13477 (the_low_target): Conditionally provide initializers for the
13478 arch_setup member depending on __powerpc64__. Install
13479 collect_ptrace_register and supply_ptrace_register members.
13480
13481 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13482
13483 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13484 * server.c (gdbserver_xmltarget): Define.
13485 (get_features_xml): Use it to replace "target.xml" and arch_string.
13486
13487 * configure.srv: Remove srv_xmltarget. Add XML files that were
13488 mentioned there to srv_xmlfiles instead. Remove conditional tests
13489 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13490 srv_xmlfiles and srv_regobj to include all possible choices.
13491 * configure.ac (srv_xmltarget): Remove.
13492 (srv_xmlfiles): Do not add "target.xml".
13493 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13494 checks for supplementary target information.
13495 * configure: Regenerate.
13496 * Makefile.in (XML_TARGET): Remove.
13497 (target.xml): Remove rule.
13498 (clean): Do not clean up target.xml.
13499 (.PRECIOUS): Do not mention target.xml.
13500
13501 * target.h (struct target_ops): Remove arch_string member.
13502 * linux-low.c (linux_arch_string): Remove.
13503 (linux_target_ops): Remove arch_string initializer.
13504 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13505 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13506 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13507 * spu-low.c (spu_arch_string): Remove.
13508 (spu_target_ops): Remove arch_string initializer.
13509 * win32-low.c (win32_arch_string): Remove.
13510 (win32_target_ops): Remove arch_string initializer.
13511 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13512 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13513 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13514
13515 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13516
13517 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13518 by collect_ptrace_register and supply_ptrace_register hooks.
13519 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13520 instead of checking for the_low_target.left_pad_xfer.
13521 (usr_store_inferior_registers): Use collect_ptrace_register callback
13522 instead of checking for the_low_target.left_pad_xfer.
13523
13524 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13525 (s390_supply_ptrace_register): Likewise.
13526 (s390_fill_gregset): Call s390_collect_ptrace_register.
13527 (the_low_target): Update.
13528
13529 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13530 (ppc_supply_ptrace_register): Likewise.
13531 (the_low_target): Update.
13532
13533 * linux-i386-low.c (the_low_target): Update.
13534 * linux-x86-64-low.c (the_low_target): Update.
13535
13536 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13537
13538 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13539 reg-s390.o and reg-s390x.o.
13540
13541 * linux-low.c (new_inferior): New global variable.
13542 (linux_create_inferior, linux_attach): Set it.
13543 (linux_wait_for_process): Call the_low_target.arch_setup after the
13544 target has stopped for the first time.
13545 (initialize_low): Do not call the_low_target.arch_setup.
13546
13547 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13548 (s390_set_pc): Likewise.
13549 (s390_arch_setup): New function.
13550 (the_low_target): Use s390_arch_setup as arch_setup routine.
13551
13552 * regcache.c (realloc_register_cache): New function.
13553 (set_register_cache): Call it for each existing regcache.
13554
13555 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13556
13557 * server.h (init_registers): Remove prototype.
13558
13559 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13560 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13561 instead of init_registers ().
13562 * linux-arm-low.c (init_registers_arm): Add prototype.
13563 (init_registers_arm_with_iwmmxt): Likewise.
13564 (the_low_target): Add initializer for arch_setup field.
13565 * linux-cris-low.c (init_registers_cris): Add prototype.
13566 (the_low_target): Add initializer for arch_setup field.
13567 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13568 (the_low_target): Add initializer for arch_setup field.
13569 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13570 (the_low_target): Add initializer for arch_setup field.
13571 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13572 (the_low_target): Add initializer for arch_setup field.
13573 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13574 (the_low_target): Add initializer for arch_setup field.
13575 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13576 (the_low_target): Add initializer for arch_setup field.
13577 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13578 (init_registers_mips64_linux): Likewise.
13579 (the_low_target): Add initializer for arch_setup field.
13580 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13581 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13582 (the_low_target): Add initializer for arch_setup field.
13583 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13584 (init_registers_powerpc_64): Likewise.
13585 (the_low_target): Add initializer for arch_setup field.
13586 * linux-s390-low.c (init_registers_s390): Add prototype.
13587 (init_registers_s390x): Likewise.
13588 (the_low_target): Add initializer for arch_setup field.
13589 * linux-sh-low.c (init_registers_sh): Add prototype.
13590 (the_low_target): Add initializer for arch_setup field.
13591 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13592 (the_low_target): Add initializer for arch_setup field.
13593 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13594 (the_low_target): Add initializer for arch_setup field.
13595
13596 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13597 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13598 instead of init_registers ().
13599 * win32-arm-low.c (init_registers_arm): Add prototype.
13600 (the_low_target): Add initializer for arch_setup field.
13601 * win32-i386-low.c (init_registers_i386): Add prototype.
13602 (the_low_target): Add initializer for arch_setup field.
13603
13604 * spu-low.c (init_registers_spu): Add prototype.
13605 (initialize_low): Call initialie_registers_spu () instead of
13606 initialize_registers ().
13607
13608 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13609
13610 * server.c (handle_v_requests): When handling the vRun and vAttach
13611 packets, if already debugging a process, don't kill it. Return an
13612 error instead.
13613
13614 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13615
13616 * server.c (handle_query): Correct length check.
13617
13618 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13619
13620 * win32-low.c (do_initial_child_stuff): Add process handle
13621 parameter. Set current_process_handle and current_process_id from the
13622 parameters. Clear globals.
13623 (win32_create_inferior): Don't set current_process_handle and
13624 current_process_id here. Instead pass them on the call to
13625 do_initial_child_stuff.
13626 (win32_attach): Likewise.
13627 (win32_clear_inferiors): New.
13628 (win32_kill): Don't close the current process handle or the
13629 current thread handle here. Instead call win32_clear_inferiors.
13630 (win32_detach): Don't open a new handle to the process. Call
13631 win32_clear_inferiors.
13632 (win32_join): Don't rely on current_process_handle; open a new
13633 handle using the process id.
13634 (win32_wait): Call win32_clear_inferiors when the inferior process
13635 has exited.
13636
13637 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13638
13639 * server.c (monitor_show_help): Add "exit".
13640
13641 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13642
13643 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13644 (clean): Add reg-xtensa.c.
13645 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13646 * configure.srv (xtensa*-*-linux*) New target.
13647 * linux-xtensa-low.c: New.
13648 * xtensa-xtregs.c: New.
13649
13650 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13651
13652 * hostio.c: Don't include errno.h.
13653 (errno_to_fileio_errno): Move to hostio-errno.
13654 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13655 error number outputting to the target->hostio_last_error callback.
13656 (hostio_packet_error): Use FILEIO_EINVAL directly.
13657 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13658 calls to hostio_error.
13659 * hostio-errno.c: New.
13660 * server.h (hostio_last_error_from_errno): Declare.
13661 * target.h (target_ops): Add hostio_last_error member.
13662 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13663 as hostio_last_error handler.
13664 * spu-low.c (spu_target_ops): Likewise.
13665 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13666 (wince_hostio_last_error): New functions.
13667 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13668 as hostio_last_error handler.
13669 (win32_target_ops) [!_WIN32_WCE]: Register
13670 hostio_last_error_from_errno as hostio_last_error handler.
13671 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13672 (hostio-errno.o): New rule.
13673 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13674 * configure.srv (srv_hostio_err_objs): New variable. Default to
13675 hostio-errno.o.
13676 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13677 * configure: Regenerate.
13678
13679 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13680
13681 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13682 (linux_kill, linux_detach): Clean up the process list.
13683 * remote-utils.c (remote_open): Improve port number parsing.
13684 (putpkt_binary, input_interrupt): Only send interrupts if the target
13685 is running.
13686 * server.c (extended_protocol): Make static.
13687 (attached): Define earlier.
13688 (exit_requested, response_needed, program_argv): New variables.
13689 (target_running): New.
13690 (start_inferior): Clear attached here.
13691 (attach_inferior): Set attached here.
13692 (require_running): Define.
13693 (handle_query): Use require_running and target_running. Implement
13694 "monitor exit".
13695 (handle_v_attach, handle_v_run): New.
13696 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13697 (gdbserver_usage): Update.
13698 (main): Redo argument parsing. Handle --debug and --multi. Handle
13699 --attach along with other options or after the port. Save
13700 program_argv. Support no initial program. Resynchronize
13701 communication with GDB after an error. Handle "monitor exit".
13702 Use require_running and target_running. Always allow the extended
13703 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13704 restart in extended mode.
13705 * README: Refer to the GDB manual. Update --attach usage.
13706
13707 2007-12-20 Andreas Schwab <schwab@suse.de>
13708
13709 * linux-low.c (STACK_SIZE): Define.
13710 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13711 (linux_test_for_tracefork): Likewise.
13712
13713 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13714
13715 * linux-low.c (linux_wait_for_event): Update messages. Do not
13716 reinsert auto-delete breakpoints.
13717 * mem-break.c (struct breakpoint): Change return type of handler to
13718 int.
13719 (set_breakpoint_at): Update handler type.
13720 (reinsert_breakpoint_handler): Return 1 instead of calling
13721 delete_breakpoint.
13722 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13723 setting a new one.
13724 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13725 * mem-break.h (set_breakpoint_at): Update handler type.
13726 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13727 * win32-low.c (auto_delete_breakpoint): New.
13728 (get_child_debug_event): Use it.
13729
13730 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13731
13732 * configure.ac: Check for pread and pwrite.
13733 * hostio.c (handle_pread): Fall back to lseek and read.
13734 (handle_pwrite): Fall back to lseek and write.
13735 * config.in, configure: Regenerated.
13736
13737 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13738
13739 * server.c (myresume): Add own_buf argument.
13740 (main): Update calls.
13741
13742 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13743
13744 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13745 * remote-utils.c (remote_open): Do not call disable_async_io.
13746 (block_async_io): Delete.
13747 (unblock_async_io): Make static.
13748 (initialize_async_io): New.
13749 * server.c (handle_v_cont): Handle async I/O here.
13750 (myresume): Likewise. Move other common resume tasks here...
13751 (main): ... from here. Call initialize_async_io. Disable async
13752 I/O before the main loop.
13753 * server.h (initialize_async_io): Declare.
13754 (block_async_io, unblock_async_io): Delete prototypes.
13755 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13756
13757 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13758
13759 * remote-utils.c (readchar): Allow binary data in received messages.
13760
13761 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13762
13763 * win32-low.c (attaching): New global.
13764 (win32_create_inferior): Clear the `attaching' global.
13765 (win32_attach): Set the `attaching' global.
13766 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13767 attaching. Only set a breakpoint at the entry point if not
13768 attaching.
13769
13770 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13771
13772 * server.c (main): Don't report dll events on the initial
13773 connection on attaches.
13774
13775 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13776
13777 * server.c (main): Relax numerical bases supported for the pid of
13778 the --attach command line argument.
13779
13780 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13781
13782 * win32-low.c (win32_attach): Call OpenProcess before
13783 DebugActiveProcess, not after. Add last error output to error
13784 call.
13785
13786 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13787
13788 * win32-low.c (win32_get_thread_context)
13789 (win32_set_thread_context): New functions.
13790 (thread_rec): Use win32_get_thread_context.
13791 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13792 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13793 field.
13794
13795 2007-12-03 Leo Zayas
13796 Pedro Alves <pedro_alves@portugalmail.pt>
13797
13798 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13799 global variables.
13800 (child_add_thread): Minor cleanup.
13801 (child_continue): Resume artificially suspended threads before
13802 calling ContinueDebugEvent.
13803 (suspend_one_thread): New.
13804 (fake_breakpoint_event): New.
13805 (get_child_debug_event): Change return type to int. Check here if
13806 gdb sent an interrupt request. If a soft interrupt was requested,
13807 fake a breakpoint event. Return 0 if there is no event to handle,
13808 and 1 otherwise.
13809 (win32_wait): Don't check here if gdb sent an interrupt request.
13810 Ensure there is a valid event to handle.
13811 (win32_request_interrupt): Add soft interruption method as last
13812 resort.
13813
13814 2007-12-03 Leo Zayas
13815 Pedro Alves <pedro_alves@portugalmail.pt>
13816
13817 * win32-low.h (win32_thread_info): Add descriptions to the
13818 structure members. Replace `suspend_count' counter by a
13819 `suspended' flag.
13820 * win32-low.c (thread_rec): Update condition of when to get the
13821 context from the inferior. Rely on ContextFlags being set if it
13822 has already been retrieved. Only suspend the inferior thread if
13823 we haven't already. Warn if that fails.
13824 (continue_one_thread): s/suspend_count/suspended/. Only call
13825 ResumeThread once. Warn if that fails.
13826
13827 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13828
13829 * win32-low.c (win32_wait): Don't read from the inferior when it
13830 has already exited.
13831
13832 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13833
13834 * Makefile.in (win32_low_h): New variable.
13835 (win32-low.o): Add dependency on $(win32_low_h).
13836 (win32-arm-low.o, win32-i386-low.o): New rules.
13837
13838 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13839
13840 * hostio.c: Correct copyright year.
13841
13842 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13843
13844 * Makefile.in (OBS): Add hostio.o.
13845 (hostio.o): New rule.
13846 * server.h (handle_vFile): Declare.
13847 * hostio.c: New file.
13848 * server.c (handle_v_requests): Take packet_len and new_packet_len
13849 for binary packets. Call handle_vFile.
13850 (main): Update call to handle_v_requests.
13851
13852 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13853
13854 * linux-low.c: Include <sched.h>.
13855
13856 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13857
13858 * linux-low.c (linux_tracefork_grandchild): New.
13859 (linux_tracefork_child): Use clone.
13860 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13861
13862 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13863
13864 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13865
13866 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13867
13868 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13869
13870 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * inferiors.c (change_inferior_id): Delete.
13873 (add_pid_to_list, pull_pid_from_list): New.
13874 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13875 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13876 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13877 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13878 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13879 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13880 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13881 (using_threads): Always set to 1.
13882 (handle_extended_wait): New.
13883 (add_process): Do not set TID.
13884 (linux_create_inferior): Set must_set_ptrace_flags.
13885 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13886 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13887 (linux_thread_alive): Rename TID argument to LWPID.
13888 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13889 (linux_wait_for_event): Do not use TID or check using_threads. Update
13890 call to dead_thread_notify. Call handle_extended_wait.
13891 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13892 (send_sigstop): Delete sigstop_sent.
13893 (wait_for_sigstop): Avoid TID.
13894 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13895 (linux_test_for_tracefork): New.
13896 (linux_lookup_signals): Use thread_db_active and
13897 linux_supports_tracefork_flag.
13898 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13899 * linux-low.h (get_process_thread): Avoid TID.
13900 (struct process_ifo): Move thread_known and tid to the end. Remove
13901 sigstop_sent.
13902 (linux_attach_lwp, thread_db_init): Update prototypes.
13903 * server.h (change_inferior_id): Delete prototype.
13904 (add_pid_to_list, pull_pid_from_list): New prototypes.
13905 * thread-db.c (thread_db_use_events): New.
13906 (find_first_thread): Rename to...
13907 (find_one_thread): ...this. Update callers and messages. Do not
13908 call fatal. Check thread_db_use_events. Do not call
13909 change_inferior_id or new_thread_notify.
13910 (maybe_attach_thread): Update. Do not call new_thread_notify.
13911 (thread_db_init): Set thread_db_use_events. Check use_events.
13912 * utils.c (fatal, warning): Correct message prefix.
13913
13914 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13915
13916 * Makefile.in (clean): Remove new files.
13917 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13918 (powerpc-64.o, powerpc-64.c): New rules.
13919 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13920 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13921 with SPE.
13922 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13923 SPE targets.
13924 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13925 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13926 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13927 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13928 (target_regsets): Add AltiVec and SPE register sets.
13929 * configure.ac: Check for AltiVec and SPE.
13930 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13931 (ppc_fill_vrregset, ppc_store_vrregset): New.
13932 (target_regsets): Add AltiVec register set.
13933 * configure: Regenerated.
13934
13935 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13936
13937 * linux-low.c (O_LARGEFILE): Define.
13938 (linux_read_memory): Use /proc/PID/mem.
13939 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13940 * configure, config.in: Regenerated.
13941
13942 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * linux-low.c (linux_wait_for_event): Do not pass signals while
13945 single-stepping.
13946
13947 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13948
13949 * win32-low.c (create_process): New.
13950 (win32_create_inferior): Use create_process instead of
13951 CreateProcess. If create_process failed retry appending an ".exe"
13952 suffix. Store the GetLastError result immediatelly after
13953 create_process calls and use it on the call to error.
13954
13955 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13956
13957 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13958
13959 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13960
13961 * configure.ac: Switch license to GPLv3.
13962
13963 2007-08-01 Michael Snyder <msnyder@access-company.com>
13964
13965 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13966
13967 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13968
13969 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13970 typedef.
13971 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13972 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13973 CloseToolhelp32Snapshot.
13974 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13975 CloseToolhelp32Snapshot.
13976
13977 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13978
13979 * server.c (main): Check for inferior exit before main loop.
13980
13981 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13982
13983 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13984 instead of on tmp_desc.
13985
13986 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13987 Daniel Jacobowitz <dan@codesourcery.com>
13988
13989 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13990 (add_thread): Minor cleanups.
13991 (clear_inferiors): Move lower in the file. Clear the DLL
13992 list.
13993 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13994 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13995 (xml_escape_text): New.
13996 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13997 for qSupported.
13998 (handle_v_cont): Report errors.
13999 (gdbserver_version): Update.
14000 (main): Correct size of own_buf. Do not report initial DLL events.
14001 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14002 (unloaded_dll, xml_escape_text): New.
14003 * win32-low.c (enum target_waitkind): Update comments.
14004 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14005 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14006 (win32_EnumProcessModules, win32_GetModuleInformation)
14007 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14008 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14009 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14010 (win32_Module32First, win32_Module32Next, load_toolhelp)
14011 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14012 (get_child_debug_event): Handle DLL events.
14013 (win32_wait): Likewise.
14014
14015 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14016
14017 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14018 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14019
14020 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14021
14022 * win32-low.c (handle_output_debug_string): Ignore event if not
14023 waiting.
14024
14025 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14026
14027 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14028
14029 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14030
14031 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14032
14033 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * inferiors.c (change_inferior_id): Add comment.
14036 * linux-low.c (check_removed_breakpoint): Add an early
14037 prototype. Improve debug output.
14038 (linux_attach): Doc update.
14039 (linux_detach_one_process, linux_detach): Clean up before releasing
14040 each process.
14041 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14042 * linux-low.h (struct process_info): Doc improvement.
14043 * mem-break.c (delete_all_breakpoints): New.
14044 * mem-break.h (delete_all_breakpoints): New prototype.
14045 * thread-db.c (find_first_thread): New.
14046 (thread_db_create_event): Call it instead of
14047 thread_db_find_new_threads. Clean up unused variables.
14048 (maybe_attach_thread): Remove first thread handling.
14049 (thread_db_find_new_threads): Use find_first_thread.
14050 (thread_db_get_tls_address): Likewise.
14051
14052 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14053
14054 * thread-db.c (thread_db_find_new_threads): Add prototype.
14055 (thread_db_create_event): Check for the main thread before adding
14056 a new thread.
14057 (maybe_attach_thread): Only enable event reporting if TID == 0.
14058 (thread_db_get_tls_address): Check for new threads.
14059
14060 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14061
14062 * linux-low.c (linux_create_inferior): Try execv before execvp.
14063 * spu-low.c (spu_create_inferior): Likewise.
14064
14065 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14066
14067 * linux-low.c (linux_create_inferior): Change execv to execvp.
14068 * spu-low.c (spu_create_inferior): Likewies.
14069
14070 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14071
14072 * Makefile.in (clean): Clean new files instead of deleted ones.
14073 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14074 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14075 rules.
14076 * configure.srv: Specify XML files and new regformats for MIPS and
14077 MIPS64 GNU/Linux.
14078 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14079 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14080 an entry for the restart register.
14081 (mips_cannot_fetch_register, mips_cannot_store_register)
14082 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14083 register names to match the XML descriptions.
14084 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14085 restart register instead of $0.
14086
14087 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14088 Markus Deuling <deuling@de.ibm.com>
14089
14090 * remote-utils.c (decode_xfer_write): New function.
14091 * server.h (decode_xfer_write): Add prototype.
14092 * server.c (handle_query): Add PACKET_LEN argument. Support
14093 qXfer:spu:read and qXfer:spu:write packets.
14094 (main): Pass packet_len to handle_query.
14095 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14096 * target.h (target_ops): Add qxfer_spu.
14097
14098 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14099
14100 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14101 accessing non-seekable spufs files.
14102
14103 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14104
14105 * server.c (handle_query): Add reply for qC packet.
14106
14107 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14108 Leo Zayas <lerele@champenstudios@com>
14109
14110 * server.h (check_remote_input_interrupt_request): New function.
14111 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14112 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14113 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14114 (check_remote_input_interrupt_request): New function.
14115 * server.h (check_remote_input_interrupt_request): Declare.
14116 * win32-low.c (winapi_DebugBreakProcess,
14117 winapi_GenerateConsoleCtrlEvent): New typedefs.
14118 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14119 to 250 ms.
14120 (win32_wait): Check for remote interrupt request
14121 with check_remote_input_interrupt_request.
14122 (win32_request_interrupt): New function.
14123 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14124
14125 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14126
14127 * win32-low.c (debug_registers_changed,
14128 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14129 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14130 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14131 (thread_rec): Get context using the low target.
14132 (child_add_thread): Call thread_added on the low target,
14133 which does the same thing.
14134 (regptr): Delete.
14135 (do_initial_child_stuff): Remove debug registers references.
14136 Set context using the low target. Resume threads after
14137 setting the contexts.
14138 (child_continue): Remove dead variable. Remove debug
14139 registers references.
14140 (child_fetch_inferior_registers): Go through the low target.
14141 (do_child_store_inferior_registers): Remove.
14142 (child_store_inferior_registers): Go through the low target.
14143 (win32_resume): Remove debug registers references.
14144 Set context using the low target.
14145 (handle_exception): Change return type to void. Don't record
14146 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14147 first chance exception.
14148 (get_child_debug_event): Change return type to void. Remove
14149 goto loop. Always return after waiting for debug event.
14150 (win32_wait): Convert to switch statement. Handle spurious
14151 events.
14152
14153 * win32-i386-low.c (debug_registers_changed,
14154 debug_registers_used): New.
14155 (initial_stuff): Rename to ...
14156 (i386_initial_stuff): ... this. Clear debug registers
14157 state variables.
14158 (store_debug_registers): Delete.
14159 (i386_get_thread_context): New.
14160 (load_debug_registers): Delete.
14161 (i386_set_thread_context): New.
14162 (i386_thread_added): New.
14163 (single_step): Rename to ...
14164 (i386_single_step): ... this.
14165 (do_fetch_inferior_registers): Rename to ...
14166 (i386_fetch_inferior_register): ... this.
14167 (i386_store_inferior_register): New.
14168 (the_low_target): Adapt to new interface.
14169
14170 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14171 (arm_get_thread_context): New.
14172 (arm_set_thread_context): New.
14173 (regptr): New.
14174 (do_fetch_inferior_registers): Rename to ...
14175 (arm_fetch_inferior_register): ... this.
14176 (arm_store_inferior_register): New.
14177 (arm_wince_breakpoint): Reimplement as unsigned long.
14178 (arm_wince_breakpoint_len): Define.
14179 (the_low_target): Adapt to new interface.
14180
14181 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14182 load_debug_registers. Add get_thread_context, set_thread_context,
14183 thread_added and store_inferior_register. Rename
14184 fetch_inferior_registers to fetch_inferior_register.
14185 (regptr): Remove declaration.
14186
14187 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14188
14189 * linux-low.c (linux_detach): Change return type to int. Return 0.
14190 * spu-low.c (spu_detach): Likewise.
14191
14192 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14193
14194 * target.h (target_ops): Change return type of detach to int.
14195 Add join.
14196 (join_inferior): New.
14197 * server.c (main): Don't skip detach support on mingw32.
14198 If the inferior doesn't support detaching return error.
14199 Call join_inferior instead of using waitpid.
14200 * linux-low.c (linux_join): New.
14201 (linux_target_op): Add linux_join.
14202 * spu-low.c (spu_join): New.
14203 (spu_target_ops): Add spu_join.
14204 * win32-low.c (win32_detach): Adapt to new interface.
14205 Reopen current_process_handle before detaching. Issue a child
14206 resume before detaching.
14207 (win32_join): New.
14208 (win32_target_op): Add win32_join.
14209
14210 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14211
14212 * win32-low.c (win32-attach): Fix return value.
14213 * target.h (target_ops): Describe ATTACH return values.
14214
14215 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14216
14217 * win32-low.c (GETPROCADDRESS): Define.
14218 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14219 (winapi_DebugSetProcessKillOnExit): Likewise.
14220 (win32_create_inferior): Force usage of ansi CreateProcessA.
14221 (win32_attach): Use GETPROCADDRESS.
14222 (win32_detach): Likewise.
14223
14224 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14225
14226 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14227
14228 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14229
14230 * win32-low.c: Commit leftover changes from 2007-03-29.
14231
14232 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14233
14234 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14235 fields short instead of int. Add explicit padding.
14236 (i387_cache_to_fsave): Remove unnecessary casts.
14237 (i387_fsave_to_cache): Doc fix.
14238 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14239
14240 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14241
14242 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14243 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14244
14245 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14246
14247 * configure.srv (arm*-*-mingw32ce*): Move near the other
14248 arm targets.
14249
14250 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14251
14252 * configure.ac: Add errno checking.
14253 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14254 sys/file.h and malloc.h.
14255 (AC_CHECK_DECLS): Add perror.
14256 (srv_mingwce): Handle.
14257 * configure.srv (i[34567]86-*-cygwin*): Add
14258 win32-i386-low.o to srv_tgtobj.
14259 (i[34567]86-*-mingw*): Likewise.
14260 (arm*-*-mingw32ce*): Add case.
14261 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14262 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14263 [__MINGW32CE__] (strerror): New function.
14264 [__MINGW32CE__] (errno): Define to GetLastError.
14265 [__MINGW32CE__] (COUNTOF): New macro.
14266 (remote_open): Remove extra close call.
14267 * mem-break.c (delete_breakpoint_at): New function.
14268 * mem-break.h (delete_breakpoint_at): Declare.
14269 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14270 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14271 [USE_WIN32API] (read, write): Add char* casts.
14272 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14273 * server.h: Include wincecompat.h on Windows CE.
14274 [HAVE_ERRNO_H]: Check.
14275 (perror): Declare if not declared.
14276 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14277 (perror_with_name): Remove errno declaration.
14278 * wincecompat.h: New.
14279 * wincecompat.c: New.
14280 * win32-low.h: New.
14281 * win32-arm-low.c: New.
14282 * win32-i386-low.c: New.
14283 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14284 (OUTMSG2): Make it safe.
14285 (_T): New macro.
14286 (COUNTOF): New macro.
14287 (NUM_REGS): Get it from the low target.
14288 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14289 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14290 (thread_rec): Let low target handle debug registers.
14291 (child_add_thread): Likewise.
14292 (child_init_thread_list): Likewise.
14293 (continue_one_thread): Likewise.
14294 (regptr): New.
14295 (do_child_fetch_inferior_registers): Move to ...
14296 * win32-i386-low.c: ... here, and rename to ...
14297 (do_fetch_inferior_registers): ... this.
14298 * win32-low.c (child_fetch_inferior_registers):
14299 Go through the low target.
14300 (do_child_store_inferior_registers): Use regptr.
14301 (strwinerror): New function.
14302 (win32_create_inferior): Handle Windows CE.
14303 Use strwinerror instead of strerror on Windows error
14304 codes. Add program to the error output.
14305 Don't close the main thread handle on Windows CE.
14306 (win32_attach): Use coredll.dll on Windows CE.
14307 (win32_kill): Close current process and current
14308 thread handles.
14309 (win32_detach): Use coredll.dll on Windows CE.
14310 (win32_resume): Let low target handle debug registers, and
14311 step request.
14312 (handle_exception): Add/Remove initial breakpoint. Avoid
14313 non-existant WSTOPSIG on Windows CE.
14314 (win32_read_inferior_memory): Cast to remove warning.
14315 (win32_arch_string): Go through the low target.
14316 (initialize_low): Call set_breakpoint_data with the low
14317 target's breakpoint.
14318 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14319 FOP_REGNUM, mappings): Move to ...
14320 * win32-i386-low.c: ... here.
14321 * win32-low.c (win32_thread_info): Move to ...
14322 * win32-low.h: ... here.
14323 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14324 win32-arm-low.c and wincecompat.c.
14325 (all:): Add $EXEEXT.
14326 (install-only:): Likewise.
14327 (gdbserver:): Likewise.
14328 (gdbreplay:): Likewise.
14329 * config.in: Regenerate.
14330 * configure: Regenerate.
14331
14332 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14333
14334 * win32-low.c: Rename typedef thread_info to
14335 win32_thread_info throughout.
14336
14337 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14338
14339 * win32-i386-low.c: Rename to ...
14340 * win32-low.c: ... this.
14341 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14342 * Makefile.in: Likewise.
14343
14344 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14345
14346 * remote-utils.c (monitor_output): Constify msg parameter.
14347 * server.h (monitor_output): Likewise.
14348 * win32-i386-low.c (handle_output_debug_string): New.
14349 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14350 handle_output_debug_string.
14351 (get_child_debug_event): Likewise.
14352
14353 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14354
14355 * server.c (main): Correct strtoul check.
14356
14357 2007-03-27 Jon Ringle <jon@ringle.org>
14358
14359 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14360
14361 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14362
14363 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14364
14365 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14366
14367 * terminal.h: Check HAVE_SGTTY_H.
14368
14369 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14370
14371 * remote-utils.c (remote_open): Print out the assigned port number.
14372
14373 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14374
14375 * remote-utils.c (monitor_output): New function.
14376 * server.c (debug_threads): Define here.
14377 (monitor_show_help): New function.
14378 (handle_query): Handle qRcmd.
14379 (main): Do not handle 'd' packet.
14380 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14381 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14382 of debug_threads.
14383
14384 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14385
14386 * Makefile.in (EXEEXT): New.
14387 (clean): Use $(EXEEXT).
14388
14389 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14390
14391 * target.h (target_ops): Rename send_signal to request_interrupt,
14392 and remove enum target_signal parameter.
14393 * linux-low.c (linux_request_interrupt): Rename from
14394 linux_send_signal, and always send SIGINT.
14395 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14396 and always send SIGINT.
14397 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14398 of send_signal.
14399 (input_interrupt): Likewise.
14400
14401 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14402
14403 * server.c (get_features_xml): Check if target implemented
14404 arch_string.
14405 * win32-i386-low.c (win32_arch_string): New.
14406 (win32_target_ops): Add win32_arch_string as arch_string member.
14407
14408 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14409
14410 * spu-low.c (spu_arch_string): New.
14411 (spu_target_ops): Add spu_arch_string.
14412
14413 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14414
14415 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14416 * configure.ac: Do not check for terminal.h.
14417 * configure, config.in: Regenerated.
14418
14419 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14420
14421 * Makefile.in (OBS): Add $(XML_BUILTIN).
14422 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14423 (clean): Update.
14424 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14425 (arm-with-iwmmxt.c): New.
14426 * config.in, configure: Regenerate.
14427 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14428 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14429 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14430 (arm*-*-linux*): Add iWMMXt and regset support.
14431 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14432 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14433 (arm_store_wmmxregset, target_regsets): New.
14434 * server.c (get_features_xml): Take annex argument. Check builtin
14435 XML documents.
14436 (handle_query): Handle multiple annexes.
14437
14438 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14439
14440 * remote-utils.c [USE_WIN32API] (read, write): Define.
14441 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14442 write.
14443
14444 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14445
14446 * linux-i386-low.c (the_low_target): Set arch_string.
14447 * linux-x86-64-low.c (the_low_target): Likewise.
14448 * linux-low.c (linux_arch_string): New.
14449 (linux_target_ops): Add it.
14450 * linux-low.h (struct linux_target_ops): Add arch_string.
14451 * server.c (write_qxfer_response): Use const void * for DATA.
14452 (get_features_xml): New.
14453 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14454 * target.h (struct target_ops): Add arch_string method.
14455
14456 2007-01-03 Denis Pilat <denis.pilat@st.com>
14457 Daniel Jacobowitz <dan@codesourcery.com>
14458
14459 * linux-low.c (linux_kill): Handle being called with no threads.
14460 * win32-i386-low.c (win32_kill): Likewise.
14461 (get_child_debug_event): Clear current_process_handle.
14462
14463 2006-12-30 Denis PILAT <denis.pilat@st.com>
14464 Daniel Jacobowitz <dan@codesourcery.com>
14465
14466 * remote-utils.c (remote_open): Check the type of specified
14467 serial port devices before opening them.
14468 * server.c (main): Kill the inferior if an error occurs during
14469 the first remote_open.
14470
14471 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14472
14473 * README: Update supported targets.
14474
14475 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * Makefile.in (clean): Remove reg-mips64.c.
14478 (reg-mips64.c, reg-mips64.o): New rules.
14479 * configure.srv: Handle mips64. Include regset support for mips.
14480 * linux-mips-low.c (union mips_register): New.
14481 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14482 (mips_breakpoint, mips_breakpoint_at): Use int.
14483 (mips_collect_register, mips_supply_register)
14484 (mips_collect_register_32bit, mips_supply_register_32bit)
14485 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14486 (mips_store_fpregset, target_regsets): New.
14487 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14488
14489 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14490
14491 * configure.srv: Add target "spu*-*-*".
14492 * Makefile.in (clean): Remove reg-spu.c.
14493 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14494 * spu-low.c: New file.
14495
14496 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * configure.ac: Correct td_thr_tls_get_addr test.
14499 * configure: Regenerated.
14500
14501 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14502
14503 * linux-low.c (linux_wait_for_event): Reformat. Use the
14504 pass_signals array.
14505 * remote-utils.c (decode_address_to_semicolon): New.
14506 * server.c (pass_signals, handle_general_set): New.
14507 (handle_query): Mention QPassSignals for qSupported.
14508 (main): Call handle_general_set.
14509 * server.h (pass_signals, decode_address_to_semicolon): New.
14510
14511 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14512
14513 * server.c (handle_query): Correct error handling for read_auxv.
14514
14515 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14516
14517 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14518 and srv_linux_thread_db to yes.
14519 * linux-s390-low.c (s390_fill_gregset): New function.
14520 (target_regsets): Define data structure.
14521
14522 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14523
14524 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14525 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14526 * config.in, configure: Regenerated.
14527 * inferiors.c (gdb_id_to_thread): New function.
14528 (gdb_id_to_thread_id): Use it.
14529 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14530 * linux-low.h (struct process_info): Add th member.
14531 (thread_db_get_tls_address): New prototype.
14532 * remote-utils.c (decode_address): Make non-static.
14533 * server.c (handle_query): Handle qGetTLSAddr.
14534 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14535 * target.h (struct target_ops): Add get_tls_address.
14536 * thread-db.c (maybe_attach_thread): Save the thread handle.
14537 (thread_db_get_tls_address): New.
14538
14539 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14540
14541 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14542 (linux_resume_one_process): Take a siginfo_t *. Update all
14543 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14544 (struct pending_signals): Add a siginfo_t.
14545 (linux_wait_for_process): Always set last_status.
14546 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14547 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14548 * linux-low.h (struct process_info): Add last_status.
14549
14550 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14551
14552 * remote-utils.c (try_rle): New function.
14553 (putpkt_binary): Use it.
14554
14555 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14556
14557 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14558 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14559 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14560 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14561 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14562 point registers.
14563
14564 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14565
14566 * server.c (terminal_fd): New variable.
14567 (old_foreground_pgrp): Likewise.
14568 (restore_old_foreground_pgrp): New function.
14569 (start_inferior): Record the terminal file descriptor in terminal_fd
14570 and its original foreground group in old_foreground_pgrp. Register
14571 restore_old_foreground_pgrp with atexit().
14572
14573 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14574
14575 * server.c (handle_query): Correct qPart to qXfer.
14576
14577 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14578
14579 * configure.ac: Check for more headers which are missing on
14580 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14581 * configure.srv: Add Cygwin and mingw32.
14582 * remote-utils.c: Don't include headers unconditionally which
14583 are missing on mingw32. Include <winsock.h> for mingw32.
14584 (remote_open): Adjust for mingw32 support. Flush
14585 standard error after writing to it.
14586 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14587 (unblock_async_io, enable_async_io, disable_async_io)
14588 (readchar, getpkt): Update for Winsock support.
14589 (prepare_resume_reply): Expect a protocol signal number.
14590 * server.c: Disable <sys/wait.h> on mingw32.
14591 (start_inferior): Adjust for mingw32 support. Flush
14592 standard error after writing to it.
14593 (attach_inferior): Likewise. Use protocol signal
14594 numbers.
14595 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14596 and names.
14597 * win32-i386-low.c: New file.
14598 * Makefile.in (XM_CLIBS): Set.
14599 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14600 (win32-i386-low.o): New dependency rule.
14601 * linux-low.c (linux_wait): Use target signal numbers.
14602 * target.h (struct target_ops): Doc fix.
14603 * server.h (target_signal_to_name): New prototype.
14604 * gdbreplay.c: Don't include headers unconditionally which
14605 are missing on mingw32. Include <winsock.h> for mingw32.
14606 (remote_close, remote_open): Adjust for Winsock support.
14607 * configure, config.in: Regenerated.
14608
14609 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * server.c (decode_xfer_read, write_qxfer_response): New.
14612 (handle_query): Take a packet length argument. Handle
14613 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14614 the qSupported response.
14615 (main): Update call to handle_query.
14616
14617 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14618
14619 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14620 (putpkt_binary): Renamed from putpkt and adjusted for binary
14621 data.
14622 (putpkt): New wrapper for putpkt_binary.
14623 (readchar): Don't mask off the high bit.
14624 (decode_X_packet): New function.
14625 * server.c (main): Call putpkt_binary if a handler sets the packet
14626 length. Save the length of the incoming packet. Handle 'X'.
14627 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14628
14629 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14630
14631 * server.c (handle_query): Handle qSupported.
14632
14633 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14634
14635 * remote-utils.c (all_symbols_looked_up): New variable.
14636 (look_up_one_symbol): Check it.
14637 * server.h (look_up_one_symbol): New declaration.
14638 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14639
14640 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14641
14642 * Makefile.in (linux-arm-low.o): Update dependencies.
14643 * linux-arm-low.c: Include "gdb_proc_service.h".
14644 (PTRACE_GET_THREAD_AREA): Define.
14645 (ps_get_thread_area): New function.
14646
14647 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14648
14649 * configure.srv (m68k*-*-uclinux*): New target.
14650 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14651 (linux_resume_one_process): Remove extraneous cast.
14652 (linux_read_offsets): New.
14653 (linux_target_op): Add linux_read_offsets on mmuless systems.
14654 * server.c (handle_query): Add qOffsets logic.
14655 * target.h (struct target_ops): Add read_offsets.
14656
14657 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14658
14659 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14660 (PTRACE_GET_THREAD_AREA): Define.
14661 (ps_get_thread_area): New function.
14662 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14663 (linux-x86-64-low.o): Update.
14664
14665 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * configure.ac: Remove checks for prfpregset_t.
14668 * gdb_proc_service.h: New file.
14669 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14670 new "gdb_proc_service.h".
14671 * proc-service.c: Likewise.
14672 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14673 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14674 * Makefile.in (gdb_proc_service_h): Updated.
14675 * configure, config.in: Regenerated.
14676
14677 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14678
14679 * remote-utils.c (prepare_resume_reply): Move declaration
14680 of gdb_id_from_wait to the top of the block.
14681
14682 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14683
14684 * linux-low.c (regsets_store_inferior_registers): Read the regset
14685 from the target before filling it.
14686
14687 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14688
14689 * server.c (attach_inferior): Return SIGTRAP for a successful
14690 attach.
14691
14692 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * Makefile.in (OBS): Add version.o.
14695 (STAGESTUFF): Delete.
14696 (version.o): Add dependencies.
14697 (version.c): Replace rule.
14698 (clean): Remove version.c.
14699 * server.c (gdbserver_version): New.
14700 (gdbserver_usage): Use printf.
14701 (main): Handle --version and --help.
14702 * server.h (version, host_name): Add declarations.
14703
14704 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14705
14706 * linux-arm-low.c:
14707 * linux-arm-low.c:
14708 * inferiors.c:
14709 * i387-fp.h:
14710 * i387-fp.c:
14711 * gdbreplay.c:
14712 * regcache.c:
14713 * proc-service.c:
14714 * mem-break.h:
14715 * mem-break.c:
14716 * linux-x86-64-low.c:
14717 * linux-sh-low.c:
14718 * linux-s390-low.c:
14719 * linux-ppc64-low.c:
14720 * linux-ppc-low.c:
14721 * linux-mips-low.c:
14722 * linux-m68k-low.c:
14723 * linux-m32r-low.c:
14724 * linux-low.h:
14725 * linux-low.c:
14726 * linux-ia64-low.c:
14727 * linux-i386-low.c:
14728 * linux-crisv32-low.c:
14729 * thread-db.c:
14730 * terminal.h:
14731 * target.h:
14732 * target.c:
14733 * server.h:
14734 * server.c:
14735 * remote-utils.c:
14736 * regcache.h:
14737 * utils.c:
14738 * Makefile.in:
14739 * configure.ac:
14740 * gdbserver.1: Add (C) after Copyright. Update the FSF
14741 address.
14742
14743 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14744
14745 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14746 (arm_breakpoint_at): Recognize both breakpoints.
14747 (the_low_target): Use the correct breakpoint instruction.
14748
14749 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14750
14751 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14752 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14753 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14754 (the_low_target): Update.
14755
14756 2005-10-25 Andreas Schwab <schwab@suse.de>
14757
14758 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14759
14760 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14761 (ia64_num_regs): Reduce to 462.
14762
14763 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14764
14765 * acinclude.m4: Correct quoting.
14766 * aclocal.m4: Regenerated.
14767
14768 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14769 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14770 (thread_db_init): Call thread_db_err_str.
14771 * configure.ac: Check for TD_VERSION.
14772 * config.in, configure: Regenerated.
14773
14774 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14775
14776 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14777
14778 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14779
14780 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14781 is not available. Define HAVE_PTRACE_GETREGS if it is.
14782 * config.in, configure: Regenerated.
14783 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14784 * linux-i386-low.c, linux-m68k-low.c: Update to use
14785 HAVE_PTRACE_GETREGS.
14786 * linux-low.c (regsets_fetch_inferior_registers)
14787 (regsets_store_inferior_registers): Only return 0 if we processed
14788 GENERAL_REGS.
14789 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14790 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14791
14792 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * inferiors.c (struct thread_info): Add gdb_id.
14795 (add_thread): Add gdb_id argument.
14796 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14797 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14798 calls to add_thread.
14799 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14800 * server.c (handle_query): Use thread_to_gdb_id.
14801 (handle_v_cont, main): Use gdb_id_to_thread_id.
14802 * server.h (add_thread): Update prototype.
14803 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14804 prototypes.
14805
14806 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14807
14808 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14809 left-padded registers.
14810 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14811 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14812
14813 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14814
14815 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14816 * configure: Regenerate.
14817 * config.in: Regenerate.
14818 * server.h (NEED_DECLARATION_STRERROR):
14819 Replace with !HAVE_DECL_STRERROR.
14820
14821 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14822
14823 * linux-low.c (linux_wait, linux_send_signal): Don't test
14824 an unsigned long variable for > 0 if it could be MAX_ULONG.
14825 * server.c (myresume): Likewise.
14826 * target.c (set_desired_inferior): Likewise.
14827
14828 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14829
14830 * configure.ac: Simplify and improve check for socklen_t.
14831 * configure, config.in: Regenerate.
14832
14833 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14834
14835 * acconfig.h: Remove.
14836 * configure.ac: Add a test for socklen_t. Use three-argument
14837 AC_DEFINE throughout.
14838 * config.in: Regenerated using autoheader 2.59.
14839 * configure: Regenerated.
14840
14841 * gdbreplay.c (socklen_t): Provide a default.
14842 (remote_open): Use socklen_t.
14843 * remote-utils.c (socklen_t): Provide a default.
14844 (remote_open): Use socklen_t.
14845 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14846 unsigned char.
14847
14848 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14849 char for buffers.
14850 * linux-low.c (linux_read_memory, linux_write_memory)
14851 (linux_read_auxv): Likewise.
14852 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14853 (check_mem_write): Likewise.
14854 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14855 Likewise.
14856 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14857 (registers_from_string, register_data): Likewise.
14858 * server.c (handle_query, main): Likewise.
14859 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14860 (decode_M_packet): Likewise.
14861 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14862 * target.h (struct target_ops): Update read_memory, write_memory,
14863 and read_auxv.
14864 (read_inferior_memory, write_inferior_memory): Update.
14865 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14866 to unsigned char *.
14867 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14868 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14869 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14870 linux-s390-low.c, linux-sh-low.c: Update for changes in
14871 read_inferior_memory and the_low_target->breakpoint.
14872
14873 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14874
14875 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14876 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14877 * configure.srv: Add powerpc64-*-linux*.
14878 * linux-ppc64-low.c: New file.
14879
14880 2005-05-23 Orjan Friberg <orjanf@axis.com>
14881
14882 * linux-cris-low.c: New file with support for CRIS.
14883 * linux-crisv32-low.c: Ditto for CRISv32.
14884 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14885 (clean): Add reg-cris.c and reg-crisv32.c.
14886 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14887 reg-crisv32.o, and reg-crisv32.c to make rules.
14888 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14889 recognized targets.
14890
14891 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14892
14893 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14894 of sizeof (PTRACE_XFER_TYPE).
14895 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14896
14897 2005-05-12 Orjan Friberg <orjanf@axis.com>
14898
14899 * target.h (struct target_ops): Add insert_watchpoint,
14900 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14901 pointers for hardware watchpoint support.
14902 * linux-low.h (struct linux_target_ops): Ditto.
14903 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14904 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14905 to linux_target_ops.
14906 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14907 reply packet.
14908 * server.c (main): Recognize 'Z' and 'z' packets.
14909
14910 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14911
14912 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14913 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14914 (the_low_target): Add new members.
14915
14916 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14917
14918 * proc-service.c (ps_lgetregs): Search all_processes instead of
14919 all_threads.
14920
14921 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14922
14923 * server.c (start_inferior): Change return type to int.
14924 (attach_inferior): Change sigptr to int *.
14925 (handle_v_cont, handle_v_requests): Change signal to int *.
14926 (main): Change signal to int.
14927
14928 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14929
14930 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14931 * configure.srv: Add m32r*-*-linux*.
14932 * linux-m32r-low.c: New file.
14933
14934 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14937
14938 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14939
14940 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14941 Take unsigned long arguments for PIDs.
14942 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14943 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14944 (wait_for_sigstop, linux_resume_one_process)
14945 (regsets_fetch_inferior_registers, linux_send_signal)
14946 (linux_read_auxv): Likewise. Update the types of variables holding
14947 PIDs. Update format string specifiers.
14948 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14949 * remote-utils.c (prepare_resume_reply): Likewise.
14950 * server.c (cont_thread, general_thread, step_thread)
14951 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14952 unsigned long.
14953 (handle_query): Update format specifiers.
14954 (handle_v_cont, main): Use strtoul for thread IDs.
14955 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14956 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14957 (general_thread, step_thread, thread_from_wait)
14958 (old_thread_from_wait): Update.
14959 * target.h (struct thread_resume): Use unsigned long for THREAD.
14960 (struct target_ops): Use unsigned long for arguments to attach and
14961 thread_alive.
14962
14963 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * acinclude.m4: Include bfd/bfd.m4 directly.
14966 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14967 <agriffis@toolchain.org>.
14968 * aclocal.m4, configure: Regenerated.
14969
14970 2005-01-07 Andrew Cagney <cagney@gnu.org>
14971
14972 * configure.ac: Rename configure.in, require autoconf 2.59.
14973 * configure: Re-generate.
14974
14975 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14976
14977 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14978 LIBS when finished.
14979 * aclocal.m4: Regenerated.
14980 * configure: Regenerated.
14981
14982 2004-11-21 Andreas Schwab <schwab@suse.de>
14983
14984 * linux-m68k-low.c (m68k_num_gregs): Define.
14985 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14986 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14987 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14988 (m68k_breakpoint_at): New. Add to the_low_target.
14989
14990 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14991 srv_linux_thread_db to yes.
14992
14993 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14994
14995 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14996 (ARCH_SET_FS): Likewise.
14997 (ARCH_GET_FS): Likewise.
14998 (ARCH_GET_GS): Likewise.
14999
15000 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15001
15002 * linux-i386-low.c (ps_get_thread_area): New.
15003 * linux-x86-64-low.c (ps_get_thread_area): New.
15004 * linux-low.c: Include <sys/syscall.h>.
15005 (linux_kill_one_process): Don't kill the first thread here.
15006 (linux_kill): Kill the first thread here.
15007 (kill_lwp): New function.
15008 (send_sigstop, linux_send_signal): Use it.
15009 * proc-service.c: Clean up #ifdefs.
15010 (fpregset_info): Delete.
15011 (ps_lgetregs): Update and enable implementation.
15012 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15013 implementations.
15014 * remote-utils.c (struct sym_cache, symbol_cache): New.
15015 (input_interrupt): Print a clearer message.
15016 (async_io_enabled): New variable.
15017 (enable_async_io, disable_async_io): Use it. Update comments.
15018 (look_up_one_symbol): Use the symbol cache.
15019 * thread-db.c (thread_db_look_up_symbols): New function.
15020 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15021
15022 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15023
15024 * configure.in: Test for -rdynamic.
15025 * configure: Regenerated.
15026 * Makefile (INTERNAL_LDFLAGS): New.
15027 (gdbserver, gdbreplay): Use it.
15028
15029 2004-09-02 Andrew Cagney <cagney@gnu.org>
15030
15031 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15032
15033 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15034
15035 * linux-low.c (linux_wait): Clear all_processes list also.
15036
15037 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15038
15039 * linux-low.c: Include <errno.h>. Remove extern declaration of
15040 errno.
15041
15042 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15043
15044 * gdbreplay.c, server.h, utils.c: Update copyright years.
15045
15046 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15047
15048 * server.c (main): Print child status or termination signal from
15049 variable 'signal', not 'sig'.
15050
15051 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15052
15053 * linux-low.c (linux_read_memory): Change return type to
15054 int. Check for and return error from ptrace().
15055 * target.c (read_inferior_memory): Change return type to int. Pass
15056 back return status from the_target->read_memory().
15057 * target.h (struct target_ops): Adapt *read_memory() prototype.
15058 Update comment.
15059 (read_inferior_memory): Adapt prototype.
15060 * server.c (main): Return an error packet if
15061 read_inferior_memory() returns an error.
15062
15063 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15064
15065 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15066 Unify with other clean targets.
15067
15068 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15069
15070 * server.c (handle_v_cont): Call set_desired_inferior.
15071
15072 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15073
15074 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15075
15076 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15077
15078 * linux-low.c (linux_wait): Unblock async I/O.
15079 (linux_resume): Block and enable async I/O.
15080 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15081 * server.h (block_async_io, unblock_async_io): Add prototypes.
15082
15083 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15084
15085 * remote-utils.c (remote_open): Print a status notice after
15086 opening a TCP port.
15087 * server.c (attach_inferior): Print a status notice after
15088 attaching.
15089
15090 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15091
15092 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15093
15094 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15095
15096 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15097 error packet.
15098 * server.c, target.h: Update copyright years.
15099
15100 2004-02-25 Roland McGrath <roland@redhat.com>
15101
15102 * target.h (struct target_ops): New member `read_auxv'.
15103 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15104 * linux-low.c (linux_read_auxv): New function.
15105 (linux_target_ops): Initialize `read_auxv' member to that.
15106
15107 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15108
15109 Committed by Jim Blandy <jimb@redhat.com>.
15110
15111 * linux-s390-low.c (s390_num_regs): Update.
15112 (s390_regmap): Remove control registers. Use __s390x__ predefine
15113 instead of GPR_SIZE to distiguish s390 and s390x targets.
15114
15115 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15116
15117 * linux-low.c: Update copyright year.
15118 (check_removed_breakpoint): Clear pending_is_breakpoint.
15119 (linux_set_resume_request, linux_queue_one_thread)
15120 (resume_status_pending_p): New functions.
15121 (linux_continue_one_thread): Use process->resume.
15122 (linux_resume): Only resume threads if there are no pending events.
15123 * linux-low.h (struct process_info): Add resume request
15124 pointer.
15125
15126 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15127
15128 * regcache.c (new_register_cache): Clear the allocated register
15129 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15130
15131 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15132
15133 * linux-low.c (linux_resume): Take a struct thread_resume *
15134 argument.
15135 (linux_wait): Update call.
15136 (resume_ptr): New static variable.
15137 (linux_continue_one_thread): Renamed from
15138 linux_continue_one_process. Use resume_ptr.
15139 (linux_resume): Use linux_continue_one_thread.
15140 * server.c (handle_v_cont, handle_v_requests): New functions.
15141 (myresume): New function.
15142 (main): Handle 'v' case.
15143 * target.h (struct thread_resume): New type.
15144 (struct target_ops): Change argument of "resume" to struct
15145 thread_resume *.
15146 (myresume): Delete macro.
15147
15148 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15149
15150 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15151 (uninstall): Support DESTDIR.
15152
15153 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15154
15155 * configure.srv: Add xscale*linux copy of arm*linux entry.
15156
15157 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15158
15159 * linux-arm-low.c (arm_reinsert_addr): New function.
15160 (the_low_target): Add arm_reinsert_addr.
15161
15162 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15163
15164 * mem-break.c: Remove whitespace at end of file.
15165
15166 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15167
15168 * configure.in: Check whether we need to prototype strerror.
15169 * server.h: Optionally prototype strerror.
15170 * gdbreplay.c (perror_with_name): Use strerror.
15171 * linux-low.c (linux_attach_lwp): Use strerror.
15172 * utils.c (perror_with_name): Use strerror.
15173 * config.in, configure: Regenerated.
15174
15175 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15176
15177 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15178 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15179
15180 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15181
15182 * Makefile.in (SFILES): Update.
15183 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15184 low-sun3.c: Remove files.
15185
15186 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15187
15188 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15189 (linux_detach_one_process, linux_detach): New functions.
15190 (linux_target_ops): Add linux_detach.
15191 * server.c (main): Handle 'D' packet.
15192 * target.h (struct target_ops): Add "detach" member.
15193 (detach_inferior): Define.
15194
15195 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15196
15197 From Kelley Cook <kelleycook@wideopenwest.com>:
15198 * configure.srv: Accept i[34567]86 variants.
15199
15200 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15201
15202 * linux-low.c (linux_wait_for_event): Correct comment typos.
15203 (linux_resume_one_process): Call check_removed_breakpoint.
15204 (linux_send_signal): New function.
15205 (linux_target_ops): Add linux_send_signal.
15206 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15207 of kill.
15208 * target.h (struct target_ops): Add send_signal.
15209
15210 2003-05-29 Jim Blandy <jimb@redhat.com>
15211
15212 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15213 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15214 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15215 away part of the register's value.
15216
15217 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15218
15219 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15220 (linux_wait_for_event, linux_init_signals): Likewise.
15221
15222 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15223
15224 * configure.in: Check for stdlib.h.
15225 * configure: Regenerated.
15226 * config.in: Regenerated.
15227
15228 2003-01-04 Andreas Schwab <schwab@suse.de>
15229
15230 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15231
15232 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15233
15234 * Makefile.in: Remove obsolete code.
15235
15236 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15237
15238 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15239 defined(PT_FPR0_HI).
15240
15241 2002-11-17 Stuart Hughes <seh@zee2.com>
15242
15243 * linux-arm-low.c (arm_num_regs): Increase.
15244 (arm_regmap): Include status register.
15245
15246 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15247
15248 * linux-low.c (register_addr): Remove incorrect -1 check.
15249
15250 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15251
15252 * linux-low.c (linux_create_inferior): Call setpgid. Return
15253 the new PID.
15254 (unstopped_p, linux_signal_pid): Remove.
15255 (linux_target_ops): Remove linux_signal_pid.
15256 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15257 global instead of target method.
15258 * target.h (struct target_ops): Remove signal_pid. Update comment
15259 for create_inferior.
15260 * server.c (signal_pid): New variable.
15261 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15262 gdbserver. Set the child to be the foreground process group.
15263 (attach_inferior): Set signal_pid.
15264
15265 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15266
15267 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15268
15269 2002-08-20 Jim Blandy <jimb@redhat.com>
15270
15271 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15272 default for this.
15273
15274 2002-08-01 Andrew Cagney <cagney@redhat.com>
15275
15276 * Makefile.in: Make chill references obsolete.
15277
15278 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15279
15280 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15281 * configure: Regenerate.
15282 * config.in: Regenerate.
15283
15284 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15285
15286 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15287 (perror_with_name, remote_close, remote_open, expect, play): Static.
15288
15289 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15290
15291 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15292 byte offsets instead of an array of indexes.
15293 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15294
15295 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15296
15297 * regcache.c: Add comment.
15298
15299 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15300
15301 * thread-db.c: New file.
15302 * proc-service.c: New file.
15303 * acinclude.m4: New file.
15304 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15305 proc-service.o, and thread-db.o.
15306 (linux-low.o): Add USE_THREAD_DB.
15307 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15308 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15309 * aclocal.m4: Regenerated.
15310 * config.in: Regenerated.
15311 * configure: Regenerated.
15312 * configure.in: Check for proc_service.h, sys/procfs.h,
15313 thread_db.h, and linux/elf.h headrs.
15314 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15315 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15316 Check for -lthread_db and thread support.
15317 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15318 PowerPC, and SuperH.
15319 * i387-fp.c: Constify arguments.
15320 * i387-fp.h: Likewise.
15321 * inferiors.c: (struct thread_info): Renamed from
15322 `struct inferior_info'. Remove PID member. Use generic inferior
15323 list header. All uses updated.
15324 (inferiors, signal_pid): Removed.
15325 (all_threads): New variable.
15326 (get_thread): Define.
15327 (add_inferior_to_list): New function.
15328 (for_each_inferior): New function.
15329 (change_inferior_id): New function.
15330 (add_inferior): Removed.
15331 (remove_inferior): New function.
15332 (add_thread): New function.
15333 (free_one_thread): New function.
15334 (remove_thread): New function.
15335 (clear_inferiors): Use for_each_inferior and free_one_thread.
15336 (find_inferior): New function.
15337 (find_inferior_id): New function.
15338 (inferior_target_data): Update argument type.
15339 (set_inferior_target_data): Likewise.
15340 (inferior_regcache_data): Likewise.
15341 (set_inferior_regcache_data): Likewise.
15342 * linux-low.c (linux_bp_reinsert): Remove.
15343 (all_processes, stopping_threads, using_thrads)
15344 (struct pending_signals, debug_threads, pid_of): New.
15345 (inferior_pid): Replace with macro.
15346 (struct inferior_linux_data): Remove.
15347 (get_stop_pc, add_process): New functions.
15348 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15349 Use add_process and add_thread.
15350 (linux_attach_lwp): New function, based on old linux_attach. Use
15351 add_process and add_thread. Set stop_expected for new threads.
15352 (linux_attach): New function.
15353 (linux_kill_one_process): New function.
15354 (linux_kill): Kill all LWPs.
15355 (linux_thread_alive): Use find_inferior_id.
15356 (check_removed_breakpoints, status_pending_p): New functions.
15357 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15358 Update. Use WNOHANG. Wait for cloned processes also. Update process
15359 struct for the found process.
15360 (linux_wait_for_event): New function.
15361 (linux_wait): Use it. Support LWPs.
15362 (send_sigstop, wait_for_sigstop, stop_all_processes)
15363 (linux_resume_one_process, linux_continue_one_process): New functions.
15364 (linux_resume): Support LWPs.
15365 (REGISTER_RAW_SIZE): Remove.
15366 (fetch_register): Use register_size instead. Call supply_register.
15367 (usr_store_inferior_registers): Likewise. Call collect_register.
15368 Fix recursive case.
15369 (regsets_fetch_inferior_registers): Improve error message.
15370 (regsets_store_inferior_registers): Add debugging.
15371 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15372 (unstopped_p, linux_signal_pid): New functions.
15373 (linux_target_ops): Add linux_signal_pid.
15374 (linux_init_signals): New function.
15375 (initialize_low): Call it. Initialize using_threads.
15376 * regcache.c (inferior_regcache_data): Add valid
15377 flag.
15378 (get_regcache): Fetch registers lazily. Add fetch argument
15379 and update all callers.
15380 (regcache_invalidate_one, regcache_invalidate): New
15381 functions.
15382 (new_register_cache): Renamed from create_register_cache.
15383 Return the new regcache.
15384 (free_register_cache): Change argument to a void *.
15385 (registers_to_string, registers_from_string): Call get_regcache
15386 with fetch flag set.
15387 (register_data): Make static. Pass fetch flag to get_regcache.
15388 (supply_register): Call get_regcache with fetch flag clear.
15389 (collect_register): Call get_regcache with fetch flag set.
15390 (collect_register_as_string): New function.
15391 * regcache.h: Update.
15392 * remote-utils.c (putpkt): Flush after debug output and use
15393 stderr.
15394 Handle input interrupts while waiting for an ACK.
15395 (input_interrupt): Use signal_pid method.
15396 (getpkt): Flush after debug output and use stderr.
15397 (outreg): Use collect_register_as_string.
15398 (new_thread_notify, dead_thread_notify): New functions.
15399 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15400 and general_thread.
15401 (look_up_one_symbol): Flush after debug output.
15402 * server.c (step_thread, server_waiting): New variables.
15403 (start_inferior): Don't use signal_pid. Update call to mywait.
15404 (attach_inferior): Update call to mywait.
15405 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15406 (main): Don't fetch/store registers explicitly. Use
15407 set_desired_inferior. Support proposed ``Hs'' packet. Update
15408 calls to mywait.
15409 * server.h: Update.
15410 (struct inferior_list, struct_inferior_list_entry): New.
15411 * target.c (set_desired_inferior): New.
15412 (write_inferior_memory): Constify.
15413 (mywait): New function.
15414 * target.h: Update.
15415 (struct target_ops): New signal_pid method.
15416 (mywait): Removed macro, added prototype.
15417
15418 * linux-low.h (regset_func): Removed.
15419 (regset_fill_func, regset_store_func): New.
15420 (enum regset_type): New.
15421 (struct regset_info): Add type field. Use new operation types.
15422 (struct linux_target_ops): stop_pc renamed to get_pc.
15423 Add decr_pc_after_break and breakpoint_at.
15424 (get_process, get_thread_proess, get_process_thread)
15425 (strut process_info, all_processes, linux_attach_lwp)
15426 (thread_db_init): New.
15427
15428 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15429 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15430 (the_low_target): Add new members.
15431 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15432 (i386_store_fpxregset): Constify.
15433 (target_regsets): Add new kind identifier.
15434 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15435 (i386_set_pc): Add debugging.
15436 (i386_breakpoint_at): New function.
15437 (the_low_target): Add new members.
15438 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15439 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15440 (mips_breakpoint_at): New.
15441 (the_low_target): Add new members.
15442 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15443 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15444 (the_low_target): Add new members.
15445 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15446 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15447 (the_low_target): Add new members.
15448 * linux-x86-64-low.c (target_regsets): Add new kind
15449 identifier.
15450
15451 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15452
15453 From Martin Pool <mbp@samba.org>:
15454 * server.c (gdbserver_usage): New function.
15455 (main): Call it.
15456
15457 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15458
15459 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15460 stop_at -> stop_pc.
15461
15462 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15463
15464 * Makefile.in: Remove obsolete code.
15465
15466 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15467
15468 * linux-low.c (regsets_fetch_inferior_registers),
15469 (regsets_store_inferior_registers): Removed cast to int from
15470 ptrace() calls.
15471 * regcache.h: Added declaration of struct inferior_info.
15472
15473 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15474
15475 * inferiors.c (struct inferior_info): Add regcache_data.
15476 (add_inferior): Call create_register_cache.
15477 (clear_inferiors): Call free_register_cache.
15478 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15479 * regcache.c (struct inferior_regcache_data): New.
15480 (registers): Remove.
15481 (get_regcache): New function.
15482 (create_register_cache, free_register_cache): New functions.
15483 (set_register_cache): Don't initialize the register cache here.
15484 (registers_to_string, registers_from_string, register_data): Call
15485 get_regcache.
15486 * regcache.h: Add prototypes.
15487 * server.h: Likewise.
15488
15489 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15490
15491 * mem-break.c: New file.
15492 * mem-break.h: New file.
15493 * Makefile.in: Add mem-break.o rule; update server.h
15494 dependencies.
15495 * inferiors.c (struct inferior_info): Add target_data
15496 member.
15497 (clear_inferiors): Free target_data member if set.
15498 (inferior_target_data, set_inferior_target_data): New functions.
15499 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15500 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15501 * linux-low.c (linux_bp_reinsert): New variable.
15502 (struct inferior_linux_data): New.
15503 (linux_create_inferior): Use set_inferior_target_data.
15504 (linux_attach): Likewise. Call add_inferior.
15505 (linux_wait_for_one_inferior): New function.
15506 (linux_wait): Call it.
15507 (linux_write_memory): Add const.
15508 (initialize_low): Call set_breakpoint_data.
15509 * linux-low.h (struct linux_target_ops): Add breakpoint
15510 handling members.
15511 * server.c (attach_inferior): Remove extra add_inferior
15512 call.
15513 * server.h: Include mem-break.h. Update inferior.c
15514 prototypes.
15515 * target.c (read_inferior_memory)
15516 (write_inferior_memory): New functions.
15517 * target.h (read_inferior_memory)
15518 (write_inferior_memory): Change macros to prototypes.
15519 (struct target_ops): Update comments. Add const to write_memory
15520 definition.
15521
15522 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15523
15524 * linux-low.c (usr_store_inferior_registers): Support
15525 registers which are allowed to fail to store.
15526 * linux-low.h (linux_target_ops): Likewise.
15527 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15528 (ppc_cannot_store_register): FPSCR may not be storable.
15529
15530 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15531
15532 * server.h: Include <string.h> if HAVE_STRING_H.
15533 * ChangeLog: Correct paths in last ChangeLog entry.
15534
15535 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15536
15537 * linux-low.h: Remove obsolete prototypes.
15538 (struct linux_target_ops): New.
15539 (extern the_low_target): New.
15540 * linux-low.c (num_regs, regmap): Remove declarations.
15541 (register_addr): Use the_low_target explicitly.
15542 (fetch_register): Likewise.
15543 (usr_fetch_inferior_registers): Likewise.
15544 (usr_store_inferior_registers): Likewise.
15545 * linux-arm-low.c (num_regs): Remove.
15546 (arm_num_regs): Define.
15547 (arm_regmap): Renamed from regmap, made static.
15548 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15549 made static.
15550 (arm_cannot_store_register): Renamed from cannot_store_register,
15551 made static.
15552 (the_low_target): New.
15553 * linux-i386-low.c (num_regs): Remove.
15554 (i386_num_regs): Define.
15555 (i386_regmap): Renamed from regmap, made static.
15556 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15557 made static.
15558 (i386_cannot_store_register): Renamed from cannot_store_register,
15559 made static.
15560 (the_low_target): New.
15561 * linux-ia64-low.c (num_regs): Remove.
15562 (ia64_num_regs): Define.
15563 (ia64_regmap): Renamed from regmap, made static.
15564 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15565 made static.
15566 (ia64_cannot_store_register): Renamed from cannot_store_register,
15567 made static.
15568 (the_low_target): New.
15569 * linux-m68k-low.c (num_regs): Remove.
15570 (m68k_num_regs): Define.
15571 (m68k_regmap): Renamed from regmap, made static.
15572 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15573 made static.
15574 (m68k_cannot_store_register): Renamed from cannot_store_register,
15575 made static.
15576 (the_low_target): New.
15577 * linux-mips-low.c (num_regs): Remove.
15578 (mips_num_regs): Define.
15579 (mips_regmap): Renamed from regmap, made static.
15580 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15581 made static.
15582 (mips_cannot_store_register): Renamed from cannot_store_register,
15583 made static.
15584 (the_low_target): New.
15585 * linux-ppc-low.c (num_regs): Remove.
15586 (ppc_num_regs): Define.
15587 (ppc_regmap): Renamed from regmap, made static.
15588 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15589 made static.
15590 (ppc_cannot_store_register): Renamed from cannot_store_register,
15591 made static.
15592 (the_low_target): New.
15593 * linux-s390-low.c (num_regs): Remove.
15594 (s390_num_regs): Define.
15595 (s390_regmap): Renamed from regmap, made static.
15596 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15597 made static.
15598 (s390_cannot_store_register): Renamed from cannot_store_register,
15599 made static.
15600 (the_low_target): New.
15601 * linux-sh-low.c (num_regs): Remove.
15602 (sh_num_regs): Define.
15603 (sh_regmap): Renamed from regmap, made static.
15604 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15605 made static.
15606 (sh_cannot_store_register): Renamed from cannot_store_register,
15607 made static.
15608 (the_low_target): New.
15609 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15610 (the_low_target): New.
15611
15612 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15613
15614 * Makefile.in: Add stamp-h target.
15615 * configure.in: Create stamp-h.
15616 * configure: Regenerated.
15617
15618 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15619
15620 * inferiors.c: New file.
15621 * target.c: New file.
15622 * target.h: New file.
15623 * Makefile.in: Add target.o and inferiors.o. Update
15624 dependencies.
15625 * linux-low.c (inferior_pid): New static variable,
15626 moved from server.c.
15627 (linux_create_inferior): Renamed from create_inferior.
15628 Call add_inferior. Return 0 on success instead of a PID.
15629 (linux_attach): Renamed from myattach.
15630 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15631 (linux_thread_alive): Renamed from mythread_alive.
15632 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15633 child dies.
15634 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15635 (regsets_store_inferior_registers): Correct error message.
15636 Add missing ``return 0''.
15637 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15638 (linux_store_registers): Renamed from store_inferior_registers.
15639 (linux_read_memory): Renamed from read_inferior_memory.
15640 (linux_write_memory): Renamed from write_inferior_memory.
15641 (linux_target_ops): New structure.
15642 (initialize_low): Call set_target_ops ().
15643 * remote-utils.c (unhexify): New function.
15644 (hexify): New function.
15645 (input_interrupt): Send signals to ``signal_pid''.
15646 * server.c (inferior_pid): Remove.
15647 (start_inferior): Update create_inferior call.
15648 (attach_inferior): Call add_inferior.
15649 (handle_query): New function.
15650 (main): Call handle_query for `q' packets.
15651 * server.h: Include "target.h". Remove obsolete prototypes.
15652 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15653
15654 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15655
15656 * Makefile.in: Add WARN_CFLAGS. Update configury
15657 dependencies.
15658 * configure.in: Check for <string.h>
15659 * configure: Regenerate.
15660 * config.in: Regenerate.
15661 * gdbreplay.c: Include needed system headers.
15662 (remote_open): Remove strchr prototype.
15663 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15664 * regcache.c (supply_register): Change buf argument to const void *.
15665 (supply_register_by_name): Likewise.
15666 (collect_register): Change buf argument to void *.
15667 (collect_register_by_name): Likewise.
15668 * regcache.h: Add missing prototypes.
15669 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15670 * server.c (handle_query): New function.
15671 (attached): New static variable, moved out of main.
15672 (main): Quiet longjmp clobber warnings.
15673 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15674 * utils.c (error): Remove NORETURN.
15675 (fatal): Likewise.
This page took 0.376621 seconds and 4 git commands to generate.