5bcd717afe76a7e0c3bab905f77ab3f0b7ad57bf
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2
3 * win32-low.c: Include "common-inferior.h".
4
5 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6
7 * inferiors.c (set_inferior_cwd): New function.
8 * server.c (handle_general_set): Handle QSetWorkingDir packet.
9 (handle_query): Inform that QSetWorkingDir is supported.
10 * win32-low.c (create_process): Pass the inferior's cwd to
11 CreateProcess.
12
13 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
14
15 * inferiors.c (current_inferior_cwd): New global variable.
16 (get_inferior_cwd): New function.
17 * inferiors.h (struct process_info) <cwd>: New field.
18
19 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
20
21 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
22 (OBS): Add gdb_tilde_expand.o.
23
24 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
25
26 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
27 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
28
29 2017-09-29 Pedro Alves <palves@redhat.com>
30
31 * ax.c (gdb_parse_agent_expr): Constify.
32 * ax.h (gdb_parse_agent_expr): Constify.
33 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
34 Constify.
35 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
36 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
37 * remote-utils.h (read_ptid): Constify.
38 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
39 (process_point_options, process_serial_event): Constify.
40 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
41 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
42 (cmd_qtbuffer): Constify.
43
44 2017-09-29 Pedro Alves <palves@redhat.com>
45
46 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
47 fails.
48
49 2017-09-29 Pedro Alves <palves@redhat.com>
50
51 * linux-low.c (handle_extended_wait): Pass parent thread instead
52 of process to thread_db_notice_clone.
53 * linux-low.h (thread_db_notice_clone): Replace parent process
54 parameter with parent thread parameter.
55 * thread-db.c (find_one_thread): Add comment.
56 (thread_db_notice_clone): Replace parent process parameter with
57 parent thread parameter. Temporarily switch to the parent thread.
58
59 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
60
61 * gdbthread.h: Include "common-gdbthread.h".
62 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
63 "if" when validating the ptid.
64 * remote-utils.c: Include "gdbthread.h".
65 (prepare_resume_reply): Use "switch_to_thread".
66 * target.c (done_accessing_memory): Likewise.
67
68 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
69
70 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
71 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
72 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
73 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
74 s390x-gs-linux64-ipa.o to ipa_obj.
75 * linux-s390-low.c (HWCAP_S390_GS): New define.
76 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
77 New functions.
78 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
79 (s390_arch_setup): Check for guarded-storage support and choose
80 appropriate tdesc.
81 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
82 init_registers_s390x_gs_linux64.
83 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
84 enum value.
85 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
86 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
87
88 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
89
90 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
91
92 2017-09-21 Kevin Buettner <kevinb@redhat.com>
93
94 * linux-low.h (struct lwp_info): Add new field, thread_handle.
95 (thread_db_thread_handle): Declare.
96 * linux-low.c (linux_target_ops): Initialize thread_handle.
97 * server.c (handle_qxfer_threads_worker): Add support for
98 "handle" attribute.
99 * target.h (struct target_ops): Add new function pointer,
100 thread_handle.
101 (target_thread_handle): Define.
102 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
103 field in lwp.
104 (thread_db_thread_handle): New function.
105
106 2017-09-21 Kevin Buettner <kevinb@redhat.com>
107
108 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
109 * linux-low.h (thread_db_notice_clone): Declare.
110 * thread-db.c (thread_db_notice_clone): New function.
111
112 2017-09-21 Pedro Alves <palves@redhat.com>
113
114 * server.c (gdb_read_memory, handle_status, process_serial_event)
115 (handle_serial_event, handle_target_event): Adjust to
116 set_desired_thread prototype change.
117 * target.c (set_desired_thread): Remove 'use_general' parameter
118 and adjust.
119 * target.h (set_desired_thread): Remove 'use_general' parameter.
120
121 2017-09-20 Tom Tromey <tom@tromey.com>
122
123 * target.c (target_terminal::terminal_state): Define.
124 (target_terminal::init): Rename from target_terminal_init.
125 (target_terminal::inferior): Rename from
126 target_terminal_inferior.
127 (target_terminal::ours): Rename from target_terminal_ours.
128 (target_terminal::ours_for_output, target_terminal::info): New.
129
130 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
131
132 * server.c (accumulate_file_name_length): Remove.
133 (emit_dll_description): Adjust to std::string change.
134 (handle_qxfer_libraries): Use std::string to hold document.
135
136 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
137
138 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
139 return type of xml_escape_text.
140 * server.c (emit_dll_description): Likewise.
141
142 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
143
144 * server.c (captured_main): Accept argument for --selftest.
145 Update run_tests call.
146 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
147 when registering selftests.
148
149 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
150
151 * regcache.c (get_thread_regcache): Update code to use "std::vector"
152 instead of "VEC" for "target_desc.reg_defs".
153 (regcache_cpy): Likewise.
154 (registers_to_string): Likewise.
155 (registers_from_string): Likewise.
156 (find_regno): Likewise.
157 (supply_regblock): Likewise.
158 (regcache_raw_read_unsigned): Likewise.
159 * tdesc.c (init_target_desc): Likewise.
160 (tdesc_create_reg): Likewise.
161 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
162 (struct target_desc) <reg_defs>: Convert to "std::vector".
163 (target_desc): Do not initialize "reg_defs".
164 (~target_desc): Update code to use "std::vector" instead of "VEC"
165 for "target_desc.reg_defs".
166 (operator==): Likewise.
167
168 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
169
170 * inferiors.h (thread_to_gdb_id): Remove.
171 * inferiors.c (thread_to_gdb_id): Remove.
172 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
173 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
174 lynx_store_registers, lynx_read_memory, lynx_write_memory):
175 Likewise.
176 * nto-low.c (nto_fetch_registers, nto_store_registers,
177 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
178
179 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
180
181 * inferiors.h (gdb_id_to_thread_id): Remove.
182 * inferiors.c (gdb_id_to_thread_id): Remove.
183 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
184 removal. Move pid declaration closer to where it's used.
185
186 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
187
188 * server.c (handle_detach): New function.
189 (process_serial_event): Move code out, call handle_detach.
190
191 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
192
193 * server.c (require_running): Rename to ...
194 (require_running_or_return): ... this ...
195 (require_running_or_break): ... and this.
196 (handle_query, process_serial_event): Adjust.
197
198 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
199
200 * linux-low.c (linux_set_resume_request): Remove unused
201 variables.
202
203 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
204
205 * server.c (first_thread_of): Remove.
206 (process_serial_event): Replace usage of first_thread_of with
207 find_any_thread_of_pid.
208 * tracepoint.c (same_process_p): Remove.
209 (gdb_agent_about_to_close): Replace usage of same_process_p with
210 find_any_thread_of_pid.
211 * linux-x86-low.c (same_process_callback): Remove.
212 (x86_arch_setup_process_callback): Replace usage of
213 same_process_callback with find_any_thread_of_pid.
214 * thread-db.c (any_thread_of): Remove.
215 (switch_to_process): Replace usage of any_thread_of with
216 find_any_thread_of_pid.
217 * inferiors.c (thread_pid_matches_callback): Remove.
218 (find_thread_process): Adjust to use find_any_thread_of_pid.
219
220 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
221
222 * regcache.c (get_thread_regcache): Guard calls to "memset"
223 with "!VEC_empty".
224
225 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
226
227 * linux-low.c (handle_extended_wait): Use
228 "allocate_target_description" instead of "XNEW".
229 * linux-x86-low.c (initialize_low_arch): Likewise.
230
231 2017-09-05 Yao Qi <yao.qi@linaro.org>
232
233 * configure.srv (srv_i386_regobj): Remove.
234 (srv_amd64_regobj): Remove.
235 (srv_regobj): Set it to "" for x86 non-linux targets.
236 * linux-x86-tdesc.c (i386_linux_read_description):
237 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
238 (init_registers_i386): Remove the declaration.
239 (tdesc_i386): Remove the declaration.
240 (lynx_i386_arch_setup): Call i386_create_target_description.
241 * nto-x86-low.c: Likewise.
242 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
243 [!__x86_64__]: include arch/i386.h.
244 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
245
246 2017-09-05 Yao Qi <yao.qi@linaro.org>
247
248 * configure.srv (srv_amd64_linux_xmlfiles): Remove
249 i386/amd64-XXX-linux from it.
250
251 2017-09-05 Yao Qi <yao.qi@linaro.org>
252
253 * configure.srv: Empty srv_amd64_linux_regobj if $development is
254 false.
255 (ipa_amd64_linux_regobj): Remove.
256 (ipa_x32_linux_regobj): Remove.
257
258 2017-09-05 Yao Qi <yao.qi@linaro.org>
259
260 * Makefile.in (arch-amd64.o): New rule.
261 * configure.srv: Append arch-amd64.o.
262 * linux-amd64-ipa.c: Include common/x86-xstate.h.
263 (get_ipa_tdesc): Call amd64_linux_read_description.
264 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
265 and init_registers_amd64_XXX.
266 * linux-x86-low.c (x86_linux_read_description): Call
267 amd64_linux_read_description.
268 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
269 (initialize_low_arch): Don't call init_registers_x32_XXX and
270 init_registers_amd64_XXX.
271 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
272 and tdesc_amd64_XXX.
273 [__x86_64__] (amd64_tdesc_test): New function.
274 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
275 and init_registers_amd64_XXX.
276 * linux-x86-tdesc.c: Include arch/amd64.h.
277 (xcr0_to_tdesc_idx): New function.
278 (i386_linux_read_description): New function.
279 (amd64_get_ipa_tdesc_idx): New function.
280 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
281 (amd64_get_ipa_tdesc): Declare.
282
283 2017-09-05 Yao Qi <yao.qi@linaro.org>
284
285 * configure.srv (srv_i386_linux_xmlfiles): Remove
286 i386/i386-XXX-linux.xml from it.
287
288 2017-09-05 Yao Qi <yao.qi@linaro.org>
289
290 * configure.srv: Set srv_i386_linux_regobj empty if $development
291 is false.
292 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
293 initialize_low_tdesc.
294 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
295 with #if initialize_low_tdesc.
296 * linux-x86-tdesc-selftest.c: New file.
297 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
298
299 2017-09-05 Yao Qi <yao.qi@linaro.org>
300
301 * Makefile.in (arch-i386.o): New rule.
302 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
303 (x86_64-*-linux*): Likewise.
304 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
305 include arch/i386.h.
306 (i386_linux_read_description): Remove code and call
307 i386_create_target_description.
308 * tdesc.c (allocate_target_description): New function.
309 * tdesc.h (set_tdesc_architecture): Remove declaration.
310 (set_tdesc_osabi): Likewise.
311
312 2017-09-05 Yao Qi <yao.qi@linaro.org>
313
314 * linux-x86-tdesc.c: Don't include <inttypes.h>.
315 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
316 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
317 .xmltarget.
318 * server.c (get_features_xml): Call tdesc_get_features_xml.
319 * tdesc.c (set_tdesc_architecture): New function.
320 (set_tdesc_osabi): New function.
321 (tdesc_get_features_xml): New function.
322 (tdesc_create_feature): Add an argument.
323 * tdesc.h (struct target_desc) <features>: New field.
324 <arch, osabi>: New field.
325 (~target_desc): xfree features, arch, and osabi.
326 (target_desc::oerator==): Don't compare .xmltarget.
327 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
328 (set_tdesc_osabi): Likewise.
329 (tdesc_get_features_xml): Likewise.
330
331 2017-09-05 Yao Qi <yao.qi@linaro.org>
332
333 * linux-x86-tdesc.c: Include selftest.h.
334 (i386_tdesc_test): New function.
335 (initialize_low_tdesc): Call selftests::register_test.
336 * tdesc.h: Include regdef.h.
337 (target_desc): Override operator == and !=.
338
339 2017-09-05 Yao Qi <yao.qi@linaro.org>
340
341 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
342 (ipa_obj): Likewise.
343 * linux-i386-ipa.c: Include common/x86-xstate.h
344 (get_ipa_tdesc): Call i386_linux_read_description.
345 (initialize_low_tracepoint): Don't call init_registers_XXX
346 functions, call initialize_low_tdesc instead.
347 * linux-x86-low.c (x86_linux_read_description): Call
348 i386_linux_read_description.
349 (initialize_low_arch): Don't call init_registers_i386_XXX
350 functions, call initialize_low_tdesc.
351 * linux-x86-tdesc.c: New file.
352 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
353 (i386_get_ipa_tdesc_idx): Declare.
354 (i386_get_ipa_tdesc): Declare.
355 (initialize_low_tdesc): Declare.
356
357 2017-09-05 Yao Qi <yao.qi@linaro.org>
358
359 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
360 instead of 0.
361
362 2017-09-05 Yao Qi <yao.qi@linaro.org>
363
364 * Makefile.in (IPA_OBJS): Add vec-ipa.o
365 * regcache.c (get_thread_regcache): Use VEC_length.
366 (init_register_cache): Likewise.
367 (regcache_cpy): Likewise.
368 (registers_to_string): Iterate reg_defs via VEC_iterate.
369 (find_regno): Likewise.
370 (find_register_by_number): Use VEC_index.
371 (register_size): Call find_register_by_number.
372 (register_data): Call find_register_by_number.
373 (supply_regblock): Use VEC_length.
374 (regcache_raw_read_unsigned): Likewise.
375 * tdesc.c (init_target_desc): Iterate reg_defs via
376 VEC_iterate.
377 (default_description): Update initializer.
378 (copy_target_description): Don't update field num_registers.
379 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
380 <num_registers>: Remove.
381
382 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
383
384 * Makefile.in (.SECONDARY): Define target.
385
386 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
387
388 * linux-low.c (linux_wait_1): Adjust.
389 * server.c (queue_stop_reply_callback): Adjust.
390
391 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
394 QEnvironmentUnset and QEnvironmentReset packets.
395 (handle_query): Inform remote that QEnvironmentHexEncoded,
396 QEnvironmentUnset and QEnvironmentReset are supported.
397
398 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
399
400 * inferiors.h (inferior_target_data): Rename to ...
401 (thread_target_data): ... this.
402 (inferior_regcache_data): Rename to ...
403 (thread_regcache_data): ... this.
404 (set_inferior_regcache_data): Rename to ...
405 (set_thread_regcache_data): ... this.
406 * inferiors.c (inferior_target_data): Rename to ...
407 (thread_target_data): ... this.
408 (inferior_regcache_data): Rename to ...
409 (thread_regcache_data): ... this.
410 (set_inferior_regcache_data): Rename to ...
411 (set_thread_regcache_data): ... this.
412 (free_one_thread): Update.
413 * linux-low.h (get_thread_lwp): Update.
414 * regcache.c (get_thread_regcache): Update.
415 (regcache_invalidate_thread): Update.
416 (free_register_cache_thread): Update.
417 * win32-i386-low.c (update_debug_registers_callback): Update.
418 (win32_get_current_dr): Update.
419 * win32-low.c (thread_rec): Update.
420 (delete_thread_info): Update.
421 (continue_one_thread): Update.
422 (suspend_one_thread): Update.
423
424 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
425
426 * inferiors.c (set_inferior_target_data): Remove.
427 * inferiors.h (set_inferior_target_data): Remove.
428
429 2017-08-18 Yao Qi <yao.qi@linaro.org>
430
431 * Makefile.in (OBS): Add selftest.o.
432 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
433 * configure, config.in: Re-generated.
434 * server.c: Include common/sefltest.h.
435 (captured_main): Handle option --selftest.
436
437 2017-08-09 Yao Qi <yao.qi@linaro.org>
438
439 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
440 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
441 i386-avx-mpx.o and i386-mmx.o.
442 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
443 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
444 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
445 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
446 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
447 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
448 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
449 i386/amd64-avx-mpx.xml.
450
451 2017-08-09 Yao Qi <yao.qi@linaro.org>
452
453 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
454 and x32-avx-avx512.o.
455 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
456 i386/x32-avx-avx512.xml.
457
458 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
459
460 * tracepoint.h (enum class fast_tpoint_collect_result): New
461 enumeration.
462 (fast_tracepoint_collecting): Change return type to
463 fast_tpoint_collect_result.
464 * tracepoint.c (fast_tracepoint_collecting): Likewise.
465 * linux-low.h: Include tracepoint.h.
466 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
467 fast_tpoint_collect_result.
468 * linux-low.c (handle_tracepoints): Adjust.
469 (linux_fast_tracepoint_collecting): Change return type to
470 fast_tpoint_collect_result.
471 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
472 linux_wait_1, stuck_in_jump_pad_callback,
473 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
474 proceed_one_lwp): Adjust to type change.
475
476 2017-07-10 Yao Qi <yao.qi@linaro.org>
477
478 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
479
480 2017-06-29 Yao Qi <yao.qi@linaro.org>
481
482 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
483 Remove.
484 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
485
486 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
487
488 * Makefile.in (IPA_OBJS): Sort and format one item per line.
489
490 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
491
492 * linux-low.c (linux_create_inferior): Adjust code to access the
493 environment information via 'gdb_environ' class.
494 * lynx-low.c (lynx_create_inferior): Likewise.
495 * server.c (our_environ): Make it an instance of 'gdb_environ'.
496 (get_environ): Return a pointer to 'our_environ'.
497 (captured_main): Initialize 'our_environ'.
498 * server.h (get_environ): Adjust prototype.
499 * spu-low.c (spu_create_inferior): Adjust code to access the
500 environment information via 'gdb_environ' class.
501
502 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
503
504 * linux-low.c (linux_read_memory, linux_write_memory): Remove
505 usage of "register" keyword.
506
507 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
508
509 * configure: Re-generate.
510
511 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
512
513 * configure: Re-generate.
514
515 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
516
517 * Makefile.in (COMPILE.pre): Add "-x c++".
518
519 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
520
521 * fork-child.c: Conditionally include <signal.h>.
522
523 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
524
525 * server.c (handle_general_set): Handle new packet
526 "QStartupWithShell".
527 (handle_query): Add "QStartupWithShell" to the list of supported
528 packets.
529 (gdbserver_usage): Add help text explaining the
530 new "--startup-with-shell" and "--no-startup-with-shell" CLI
531 options.
532 (captured_main): Recognize and act upon the presence of the new
533 CLI options.
534
535 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
536 Pedro Alves <palves@redhat.com>
537
538 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
539 * configure: Regenerate.
540 * configure.srv (srv_linux_obj): Add "fork-child.o" and
541 "fork-inferior.o".
542 (i[34567]86-*-lynxos*): Likewise.
543 (spu*-*-*): Likewise.
544 * fork-child.c: New file.
545 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
546 and "environ.h".
547 (linux_ptrace_fun): New function.
548 (linux_create_inferior): Adjust function prototype to reflect
549 change on "target.h". Adjust function code to use
550 "fork_inferior".
551 (linux_request_interrupt): Delete "signal_pid".
552 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
553 (lynx_ptrace_fun): New function.
554 (lynx_create_inferior): Adjust function prototype to reflect
555 change on "target.h". Adjust function code to use
556 "fork_inferior".
557 * nto-low.c (nto_create_inferior): Adjust function prototype and
558 code to reflect change on "target.h". Update comments.
559 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
560 "common-terminal.h" and "environ.h".
561 (terminal_fd): Moved to fork-child.c.
562 (old_foreground_pgrp): Likewise.
563 (restore_old_foreground_pgrp): Likewise.
564 (last_status): Make it global.
565 (last_ptid): Likewise.
566 (our_environ): New variable.
567 (startup_with_shell): Likewise.
568 (program_name): Likewise.
569 (program_argv): Rename to...
570 (program_args): ...this.
571 (wrapper_argv): New variable.
572 (start_inferior): Delete function.
573 (get_exec_wrapper): New function.
574 (get_exec_file): Likewise.
575 (get_environ): Likewise.
576 (prefork_hook): Likewise.
577 (post_fork_inferior): Likewise.
578 (postfork_hook): Likewise.
579 (postfork_child_hook): Likewise.
580 (handle_v_run): Update code to deal with arguments coming from the
581 remote host. Update calls from "start_inferior" to
582 "create_inferior".
583 (captured_main): Likewise. Initialize environment variable. Call
584 "have_job_control".
585 * server.h (post_fork_inferior): New prototype.
586 (get_environ): Likewise.
587 (last_status): Declare.
588 (last_ptid): Likewise.
589 (signal_pid): Likewise.
590 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
591 (spu_ptrace_fun): New function.
592 (spu_create_inferior): Adjust function prototype to reflect change
593 on "target.h". Adjust function code to use "fork_inferior".
594 * target.c (target_terminal_init): New function.
595 (target_terminal_inferior): Likewise.
596 (target_terminal_ours): Likewise.
597 * target.h: Include <vector>.
598 (struct target_ops) <create_inferior>: Update prototype.
599 (create_inferior): Update macro.
600 * utils.c (gdb_flush_out_err): New function.
601 * win32-low.c (win32_create_inferior): Adjust function prototype
602 and code to reflect change on "target.h".
603
604 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
605
606 * inferiors.c (switch_to_thread): New function.
607
608 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
609
610 * Makefile.in (SFILE): Add "common/job-control.c".
611 (OBS): Add "job-control.o".
612
613 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
614
615 * Makefile: Remove "@host_makefile_frag@".
616
617 2017-05-05 Pedro Alves <palves@redhat.com>
618
619 * configure: Regenerate.
620
621 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
622
623 * configure: Regenerate.
624
625 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
626
627 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
628 software_single_step change of return type to
629 std::vector<CORE_ADDR>.
630 * linux-low.c (install_software_single_step_breakpoints):
631 Likewise.
632 * linux-low.h (install_software_single_step_breakpoints):
633 Likewise.
634
635 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
636
637 * remote-utils.c: Include "gdb_termios.h" instead of
638 "terminal.h".
639 * terminal.h: Delete file.
640
641 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
642
643 * server.c: Include <vector>.
644 <program_argv, wrapper_argv>: Convert to std::vector.
645 (start_inferior): Rewrite function to use C++.
646 (handle_v_run): Likewise. Update code that calculates the argv
647 based on the vRun packet; use C++.
648 (captured_main): Likewise.
649
650 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
651
652 * server.c (handle_v_cont): Initialize thread_resume::thread
653 with null_ptid.
654
655 2017-04-05 Pedro Alves <palves@redhat.com>
656
657 * configure: Regenerate.
658
659 2017-04-05 Pedro Alves <palves@redhat.com>
660
661 * gdbreplay.c (sync_error): Constify.
662 * linux-x86-low.c (push_opcode): Constify.
663
664 2017-04-05 Pedro Alves <palves@redhat.com>
665
666 * win32-low.c (get_child_debug_event)
667 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
668 Report TARGET_WAITKIND_SPURIOUS instead.
669
670 2017-04-05 Pedro Alves <palves@redhat.com>
671
672 * remote-utils.c (remote_prepare, remote_open): Constify.
673 * remote-utils.h (remote_prepare, remote_open): Constify.
674 * server.c (captured_main): Constify 'port' handling.
675
676 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
677
678 * Makefile.in (clean): Clear .deps.
679
680 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
681
682 * .gitignore: Remove generated files, replace with wildcard.
683 * (clean): Replace removal of generated files with wildcard.
684 (version.c): Replace with...
685 (version-generated.c): ...this.
686 (xml-builtin.c): Replace with...
687 (xml-builtin-generated.c): ...this.
688 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
689 (%.c: *regformats*): Replace with...
690 (%-generated.c: *regformats*): ...this.
691
692 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
693
694 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
695 (xtensa_fill_gregset): Call collect_register_by_name for
696 threadptr register.
697 (xtensa_store_gregset): Call supply_register_by_name for
698 threadptr register.
699
700 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
701
702 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
703 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
704 (xtensa_store_gregset): Call supply_register for all registers in
705 a0_regnum..a0_regnum + C0_NREGS range.
706
707 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
708
709 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
710 (ax-ipa.o: ax.c): Remove.
711 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
712 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
713 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
714 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
715 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
716
717 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
718
719 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
720 (print-utils-ipa.o: ../common/print-utils.c): Remove.
721 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
722 (errors-ipa.o: ../common/errors.c): Remove.
723 (format-ipa.o: ../common/format.c): Remove.
724 (common-utils-ipa.o: ../common/common-utils.c): Remove.
725
726 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
727
728 * Makefile.in (%-ipa.o: %.c): New rule.
729 (tracepoint-ipa.o: tracepoint.c): Remove.
730 (utils-ipa.o: utils.c): Remove.
731 (remote-utils-ipa.o: remote-utils.c): Remove.
732 (regcache-ipa.o: regcache.c): Remove.
733 (i386-linux-ipa.o: i386-linux.c): Remove.
734 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
735 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
736 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
737 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
738 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
739 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
740 (amd64-linux-ipa.o: amd64-linux.c): Remove.
741 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
742 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
743 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
744 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
745 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
746 (aarch64-ipa.o: aarch64.c): Remove.
747 (s390-linux32-ipa.o: s390-linux32.c): Remove.
748 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
749 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
750 (s390-linux64-ipa.o: s390-linux64.c): Remove.
751 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
752 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
753 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
754 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
755 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
756 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
757 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
758 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
759 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
760 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
761 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
762 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
763 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
764 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
765 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
766 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
767 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
768 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
769 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
770 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
771 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
772 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
773 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
774 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
775 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
776 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
777 (tdesc-ipa.o: tdesc.c): Remove.
778 (x32-linux-ipa.o: x32-linux.c): Remove.
779 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
780 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
781
782 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
783
784 * Makefile.in (%.o: ../arch/%.c): New rule.
785 (arm.o: ../arch/arm.c): Remove.
786 (arm-linux.o: ../arch/arm-linux.c): Remove.
787 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
788 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
789
790 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
791
792 * Makefile.in (%.o: ../nat/%.c): New rule.
793 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
794 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
795 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
796 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
797 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
798 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
799 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
800 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
801 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
802 (linux-personality.o: ../nat/linux-personality.c): Remove.
803 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
804 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
805 (x86-linux.o: ../nat/x86-linux.c): Remove.
806 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
807 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
808
809 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
810
811 * Makefile.in (%.o: ../common/%.c): New rule.
812 (signals.o: ../common/signals.c): Remove.
813 (print-utils.o: ../common/print-utils.c): Remove.
814 (rsp-low.o: ../common/rsp-low.c): Remove.
815 (common-utils.o: ../common/common-utils.c): Remove.
816 (posix-strerror.o: ../common/posix-strerror.c): Remove.
817 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
818 (vec.o: ../common/vec.c): Remove.
819 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
820 (xml-utils.o: ../common/xml-utils.c): Remove.
821 (ptid.o: ../common/ptid.c): Remove.
822 (buffer.o: ../common/buffer.c): Remove.
823 (format.o: ../common/format.c): Remove.
824 (filestuff.o: ../common/filestuff.c): Remove.
825 (agent.o: ../common/agent.c): Remove.
826 (errors.o: ../common/errors.c): Remove.
827 (environ.o: ../common/environ.c): Remove.
828 (common-debug.o: ../common/common-debug.c): Remove.
829 (cleanups.o: ../common/cleanups.c): Remove.
830 (common-exceptions.o: ../common/common-exceptions.c): Remove.
831 (fileio.o: ../common/fileio.c): Remove.
832 (common-regcache.o: ../common/common-regcache.c): Remove.
833 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
834 (new-op.o: ../common/new-op.c): Remove.
835 (btrace-common.o: ../common/btrace-common.c): Remove.
836
837 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
838
839 * Makefile.in (%.o: ../target/%.c): New rule.
840 (waitstatus.o: ../target/waitstatus.c): Remove.
841
842 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
843
844 * Makefile.in
845 (%.c: ../regformats/%.dat,
846 (%.c: ../regformats/arm/%.dat,
847 (%.c: ../regformats/i386/%.dat,
848 (%.c: ../regformats/rs6000/%.dat): New rules.
849 (aarch64.c): Remove.
850 (reg-arm.c): Remove.
851 (arm-with-iwmmxt.c): Remove.
852 (arm-with-vfpv2.c): Remove.
853 (arm-with-vfpv3.c): Remove.
854 (arm-with-neon.c): Remove.
855 (reg-bfin.c): Remove.
856 (reg-cris.c): Remove.
857 (reg-crisv32.c): Remove.
858 (i386.c): Remove.
859 (i386-linux.c): Remove.
860 (i386-avx.c): Remove.
861 (i386-avx-linux.c): Remove.
862 (i386-avx-avx512.c): Remove.
863 (i386-avx-avx512-linux.c): Remove.
864 (i386-mpx.c): Remove.
865 (i386-mpx-linux.c): Remove.
866 (i386-avx-mpx-avx512-pku.c): Remove.
867 (i386-avx-mpx-avx512-pku-linux.c): Remove.
868 (i386-avx-mpx.c): Remove.
869 (i386-avx-mpx-linux.c): Remove.
870 (i386-mmx.c): Remove.
871 (i386-mmx-linux.c): Remove.
872 (reg-ia64.c): Remove.
873 (reg-m32r.c): Remove.
874 (reg-m68k.c): Remove.
875 (reg-cf.c): Remove.
876 (mips-linux.c): Remove.
877 (mips-dsp-linux.c): Remove.
878 (mips64-linux.c): Remove.
879 (mips64-dsp-linux.c): Remove.
880 (nios2-linux.c): Remove.
881 (powerpc-32.c): Remove.
882 (powerpc-32l.c): Remove.
883 (powerpc-altivec32l.c): Remove.
884 (powerpc-cell32l.c): Remove.
885 (powerpc-vsx32l.c): Remove.
886 (powerpc-isa205-32l.c): Remove.
887 (powerpc-isa205-altivec32l.c): Remove.
888 (powerpc-isa205-vsx32l.c): Remove.
889 (powerpc-e500l.c): Remove.
890 (powerpc-64l.c): Remove.
891 (powerpc-altivec64l.c): Remove.
892 (powerpc-cell64l.c): Remove.
893 (powerpc-vsx64l.c): Remove.
894 (powerpc-isa205-64l.c): Remove.
895 (powerpc-isa205-altivec64l.c): Remove.
896 (powerpc-isa205-vsx64l.c): Remove.
897 (s390-linux32.c): Remove.
898 (s390-linux32v1.c): Remove.
899 (s390-linux32v2.c): Remove.
900 (s390-linux64.c): Remove.
901 (s390-linux64v1.c): Remove.
902 (s390-linux64v2.c): Remove.
903 (s390-te-linux64.c): Remove.
904 (s390-vx-linux64.c): Remove.
905 (s390-tevx-linux64.c): Remove.
906 (s390x-linux64.c): Remove.
907 (s390x-linux64v1.c): Remove.
908 (s390x-linux64v2.c): Remove.
909 (s390x-te-linux64.c): Remove.
910 (s390x-vx-linux64.c): Remove.
911 (s390x-tevx-linux64.c): Remove.
912 (tic6x-c64xp-linux.c): Remove.
913 (tic6x-c64x-linux.c): Remove.
914 (tic6x-c62x-linux.c): Remove.
915 (reg-sh.c): Remove.
916 (reg-sparc64.c): Remove.
917 (reg-spu.c): Remove.
918 (amd64.c): Remove.
919 (amd64-linux.c): Remove.
920 (amd64-avx.c): Remove.
921 (amd64-avx-linux.c): Remove.
922 (amd64-avx-avx512.c): Remove.
923 (amd64-avx-avx512-linux.c): Remove.
924 (amd64-mpx.c): Remove.
925 (amd64-mpx-linux.c): Remove.
926 (amd64-avx-mpx-avx512-pku.c): Remove.
927 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
928 (amd64-avx-mpx.c): Remove.
929 (amd64-avx-mpx-linux.c): Remove.
930 (x32.c): Remove.
931 (x32-linux.c): Remove.
932 (x32-avx.c): Remove.
933 (x32-avx-linux.c): Remove.
934 (x32-avx-avx512.c): Remove.
935 (x32-avx-avx512-linux.c): Remove.
936 (reg-xtensa.c): Remove.
937 (reg-tilegx.c): Remove.
938 (reg-tilegx32.c): Remove.
939
940 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
941
942 * Makefile.in (SFILES): Add "common/environ.c".
943 (OBJS): Add "common/environ.h".
944
945 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
946
947 * configure.ac: Check if the fs_base and gs_base members of
948 `struct user_regs_struct' exist.
949 * config.in: Regenerated.
950 * configure: Likewise.
951
952 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
953
954 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
955 target_read_memory.
956 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
957 (get_next_pcs_syscall_next_pc): Likewise.
958
959 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
960
961 * win32-i386-low.c: Fix incorrect reference to a couple source files.
962 * nto-x86-low.c: Likewise.
963
964 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
965
966 * Makefile.in: Include disable-implicit-rules.mk.
967
968 2016-11-23 Pedro Alves <palves@redhat.com>
969
970 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
971 (debug_vprintf): Use std::chrono::steady_clock instead of
972 gettimeofday. Use '.' instead of ':'.
973 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
974 (get_timestamp): Use std::chrono::steady_clock instead of
975 gettimeofday.
976
977 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
978
979 * Makefile.in: Fix whitespace formatting.
980
981 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
982
983 * Makefile.in (SFILES, OBS): Flatten list and order
984 alphabetically.
985
986 2016-11-23 Pedro Alves <palves@redhat.com>
987
988 * event-loop.c (handle_file_event): Use warning.
989 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
990 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
991 Use warning.
992
993 2016-11-23 Pedro Alves <palves@redhat.com>
994
995 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
996 output.
997 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
998 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
999 debug_printf and debug_flush for debug output.
1000 * server.c (handle_general_set): Likewise.
1001 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1002 output.
1003
1004 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1005
1006 * Makefile.in (.c.o): Replace rule with ...
1007 (%.o: %.c): ... this one.
1008
1009 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1010
1011 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1012 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1013 make.
1014 * configure.ac: Remove checks for the make program.
1015 * configure: Re-generate.
1016
1017 2016-10-28 Pedro Alves <palves@redhat.com>
1018
1019 * Makefile.in (CXX_DIALECT): Get from configure.
1020 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1021 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1022 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1023 * config.in: Regenerate.
1024 * configure: Regenerate.
1025
1026 2016-10-27 Yao Qi <yao.qi@linaro.org>
1027
1028 * linux-low.c (linux_supports_range_stepping): Return true if
1029 can_software_single_step return true.
1030
1031 2016-10-27 Yao Qi <yao.qi@linaro.org>
1032
1033 * inferiors.c (find_inferior_in_random): New function.
1034 * inferiors.h (find_inferior_in_random): Declare.
1035 * linux-low.c (linux_wait_for_event_filtered): Call
1036 find_inferior_in_random instead of find_inferior.
1037
1038 2016-10-27 Yao Qi <yao.qi@linaro.org>
1039
1040 * linux-low.c (linux_wait_1): If single-step breakpoints are
1041 inserted, remove them.
1042
1043 2016-10-26 Pedro Alves <palves@redhat.com>
1044
1045 * linux-low.c (handle_extended_wait): Link parent/child fork
1046 threads.
1047 (linux_wait_1): Unlink them.
1048 (linux_set_resume_request): Ignore resume requests for
1049 already-resumed and unhandled fork child threads.
1050 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1051 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1052 New functions.
1053 (handle_v_requests) <vCont>: Don't call require_running.
1054 * server.h (in_queued_stop_replies): New declaration.
1055
1056 2016-10-24 Yao Qi <yao.qi@linaro.org>
1057
1058 PR server/20733
1059 * linux-aarch64-low.c (append_insns): Cast the return value to
1060 'uint32_t *'.
1061
1062 2016-10-10 Yao Qi <yao.qi@linaro.org>
1063
1064 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1065
1066 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1067
1068 * target.c (target_supports_multi_process): New function, moved
1069 from...
1070 * target.h (target_supports_multi_process): ... here. Remove
1071 macro.
1072
1073 2016-10-05 Tom Tromey <tom@tromey.com>
1074
1075 PR remote/20655:
1076 * tracepoint.c (handle_tracepoint_bkpts): Check
1077 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1078
1079 2016-10-05 Yao Qi <yao.qi@linaro.org>
1080
1081 * configure.srv: Update the path of arm-*.xml files.
1082
1083 2016-10-05 Terry Guo <terry.guo@arm.com>
1084 Yao Qi <yao.qi@linaro.org>
1085
1086 * Makefile.in: Adjust the path of rules.
1087 * configure.srv: Update the path of xml files.
1088 * regformats/arm-with-iwmmxt.dat: Regenerated.
1089 * regformats/arm-with-neon.dat: Likewise.
1090 * regformats/arm-with-vfpv2.dat: Likewise.
1091 * regformats/arm-with-vfpv3.dat Likewise.
1092
1093 2016-09-30 Yao Qi <yao.qi@linaro.org>
1094
1095 PR gdbserver/20627
1096 * target.c (target_stop_and_wait): Don't call
1097 target_continue_no_signal, use resume_stop instead.
1098
1099 2016-09-26 Yao Qi <yao.qi@linaro.org>
1100
1101 * linux-low.c (linux_wait_1): Call debug_exit.
1102
1103 2016-09-23 Pedro Alves <palves@redhat.com>
1104
1105 * Makefile.in (SFILES): Add common/new-op.c.
1106 (OBS): Add common/new-op.o.
1107 (new-op.o): New rule.
1108
1109 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1110
1111 * .gitinore: Ignore more files.
1112
1113 2016-09-21 Yao Qi <yao.qi@linaro.org>
1114
1115 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1116 23.
1117
1118 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1119
1120 * server.c (start_inferior): Call target_mourn_inferior instead of
1121 mourn_inferior; pass ptid_t argument to it.
1122 (resume): Likewise.
1123 (handle_target_event): Likewise.
1124 * target.c (target_mourn_inferior): New function.
1125 * target.h (mourn_inferior): Delete macro.
1126
1127 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1128
1129 * linux-low.c (lwp_is_stepping): New function.
1130
1131 2016-09-06 Carl Love <cel@us.ibm.com>
1132
1133 * server.c (start_inferior): Fixed comment, requested comment change
1134 didn't get updated correctly. Removed reference to ptrace () call as
1135 it is only true on Linux systems.
1136
1137 2016-09-06 Carl Love <cel@us.ibm.com>
1138
1139 * server.c (start_inferior): Do not call
1140 function target_post_create_inferior () if the
1141 inferior process has already exited.
1142
1143 2016-09-05 Pedro Alves <palves@redhat.com>
1144
1145 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1146 (COMPILE.pre, CC_LD): Use CXX directly.
1147 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1148 * acinclude.m4: Don't include build-with-cxx.m4.
1149 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1150 * configure: Regenerate.
1151
1152 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1153
1154 PR gdb/19495
1155 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1156 call writing data to own_buf.
1157
1158 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1159
1160 * target.c (mywait): Call target_wait instead of
1161 the_target->wait.
1162 (target_wait): New function.
1163
1164 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1165
1166 * server.c (start_inferior): New variable 'ptid'. Replace calls
1167 to the_target->resume by target_continue{,_no_signal}, depending
1168 on the case.
1169 * target.c (target_stop_and_wait): Call target_continue_no_signal
1170 instead of the_target->resume.
1171 (target_continue): New function.
1172
1173 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1174
1175 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1176
1177 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1178
1179 PR server/20491
1180 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1181 ps_prochandle.
1182 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1183 * linux-arm-low.c (ps_get_thread_area): Likewise.
1184 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1185 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1186 * linux-mips-low.c (ps_get_thread_area): Likewise.
1187 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1188 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1189 * linux-x86-low.c (ps_get_thread_area): Likewise.
1190 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1191
1192 2016-08-19 Pedro Alves <palves@redhat.com>
1193
1194 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1195
1196 2016-08-19 Pedro Alves <palves@redhat.com>
1197
1198 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1199 comment. Use memcpy instead of casting through unsigned long.
1200
1201 2016-08-19 Pedro Alves <palves@redhat.com>
1202
1203 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1204 allocating around 0x80000000.
1205
1206 2016-08-19 Pedro Alves <palves@redhat.com>
1207
1208 PR gdb/20415
1209 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1210 (x32-avx512-linux-ipa.o): New rules.
1211 * configure.ac (x86_64-*-linux*): New x32 check.
1212 * configure.srv (ipa_x32_linux_regobj): New.
1213 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1214 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1215 descriptions.
1216 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1217 descriptions.
1218 * configure: Regenerate.
1219
1220 2016-08-09 Pedro Alves <palves@redhat.com>
1221
1222 PR gdb/18653
1223 * Makefile.in (OBS): Add signals-state-save-restore.o.
1224 (signals-state-save-restore.o): New rule.
1225 * config.in: Regenerate.
1226 * configure: Regenerate.
1227 * linux-low.c: Include "signals-state-save-restore.h".
1228 (linux_create_inferior): Call
1229 restore_original_signals_state.
1230 * server.c: Include "dispositions-save-restore.h".
1231 (captured_main): Call save_original_signals_state.
1232
1233 2016-08-05 Pedro Alves <palves@redhat.com>
1234
1235 * configure: Regenerate.
1236
1237 2016-08-04 Yao Qi <yao.qi@linaro.org>
1238
1239 * linux-low.c (regsets_fetch_inferior_registers): Check
1240 errno is ESRCH or not.
1241
1242 2016-08-02 Yao Qi <yao.qi@linaro.org>
1243
1244 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1245 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1246 (thread_db_load_search): Update.
1247 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1248 td_ta_set_event and td_ta_event_getmsg.
1249
1250 2016-07-26 Pedro Alves <palves@redhat.com>
1251
1252 PR server/20414
1253 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1254 of unsigned long for 64-bit registers and use uint32_t instead of
1255 unsigned int for 32-bit registers.
1256
1257 2016-07-26 Pedro Alves <palves@redhat.com>
1258
1259 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1260 to 'ptrace'.
1261
1262 2016-07-21 Tom Tromey <tom@tromey.com>
1263
1264 * configure: Rebuild.
1265
1266 2016-07-21 Yao Qi <yao.qi@linaro.org>
1267
1268 * mem-break.c (find_gdb_breakpoint): Cast bp to
1269 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1270
1271 2016-07-21 Yao Qi <yao.qi@linaro.org>
1272
1273 * server.c (handle_v_requests): Support s and S actions
1274 if target_supports_software_single_step return true.
1275
1276 2016-07-21 Yao Qi <yao.qi@linaro.org>
1277
1278 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1279 is resume_step, call maybe_hw_step.
1280 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1281 and unstop them.
1282 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1283 breakpoints or not.
1284 (proceed_one_lwp): If resume request is resume_step, install
1285 reinsert breakpoints and call maybe_hw_step.
1286
1287 2016-07-21 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-low.c (proceed_one_lwp): Declare.
1290 (linux_resume_one_thread): Remove local variable 'step'.
1291 Lift code enqueue signal. Call proceed_one_lwp instead of
1292 linux_resume_one_lwp.
1293
1294 2016-07-21 Yao Qi <yao.qi@linaro.org>
1295
1296 * linux-low.c (linux_resume_one_thread): Call
1297 enqueue_pending_signal.
1298
1299 2016-07-21 Yao Qi <yao.qi@linaro.org>
1300
1301 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1302 * inferiors.c (do_restore_current_thread_cleanup): New function.
1303 (make_cleanup_restore_current_thread): Likewise.
1304 * linux-low.c (install_software_single_step_breakpoints): Call
1305 make_cleanup_restore_current_thread. Switch current_thread to
1306 thread.
1307
1308 2016-07-21 Yao Qi <yao.qi@linaro.org>
1309
1310 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1311 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1312 (clone_one_breakpoint): Likewise.
1313 (delete_reinsert_breakpoints): Change parameter to thread.
1314 Callers updated.
1315 (has_reinsert_breakpoints): Likewise.
1316 (uninsert_reinsert_breakpoints): Likewise.
1317 (reinsert_reinsert_breakpoints): Likewise.
1318 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1319 (delete_reinsert_breakpoints): Likewise.
1320 (reinsert_reinsert_breakpoints): Likewise.
1321 (uninsert_reinsert_breakpoints): Likewise.
1322 (has_reinsert_breakpoints): Likewise.
1323
1324 2016-07-21 Yao Qi <yao.qi@linaro.org>
1325
1326 * inferiors.c (get_thread_process): Make parameter const.
1327 * inferiors.h (get_thread_process): Update declaration.
1328 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1329 Add new parameters child_thread and parent_thread. Callers
1330 updated.
1331 * mem-break.h (clone_all_breakpoints): Update declaration.
1332
1333 2016-07-21 Yao Qi <yao.qi@linaro.org>
1334
1335 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1336 <command_list, handler>: Remove.
1337 (struct gdb_breakpoint): New.
1338 (struct other_breakpoint): New.
1339 (struct reinsert_breakpoint): New.
1340 (is_gdb_breakpoint): New function.
1341 (any_persistent_commands): Update command_list if
1342 is_gdb_breakpoint returns true.
1343 (set_breakpoint): Create breakpoints according to their types.
1344 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1345 (set_gdb_breakpoint_1): Likewise.
1346 (set_gdb_breakpoint): Likewise.
1347 (clear_breakpoint_conditions): Change parameter type to
1348 'struct gdb_breakpoint *'.
1349 (clear_breakpoint_commands): Likewise.
1350 (clear_breakpoint_conditions_and_commands): Likewise.
1351 (add_condition_to_breakpoint): Likewise.
1352 (add_breakpoint_condition): Likewise.
1353 (add_commands_to_breakpoint): Likewise.
1354 (check_breakpoints): Check other_breakpoint.
1355 (clone_one_breakpoint): Clone breakpopint according to its type.
1356 * mem-break.h (struct gdb_breakpoint): Declare.
1357 (set_gdb_breakpoint): Update declaration.
1358 (clear_breakpoint_conditions_and_commands): Likewise.
1359 (add_breakpoint_condition): Likewise.
1360 (add_breakpoint_commands): Likewise.
1361 * server.c (process_point_options): Change parameter type to
1362 'struct gdb_breakpoint *'.
1363
1364 2016-07-21 Yao Qi <yao.qi@linaro.org>
1365
1366 * mem-break.c (set_breakpoint_at): Rename it to ...
1367 (set_breakpoint_type_at): ... it.
1368 (set_breakpoint_at): Call set_breakpoint_type_at.
1369 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1370 * mem-break.h (set_breakpoint_at): Update comments.
1371
1372 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1373
1374 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1375 to buf parameter.
1376 (nios2_store_gregset): Likewise.
1377
1378 2016-07-01 Pedro Alves <palves@redhat.com>
1379 Antoine Tremblay <antoine.tremblay@ericsson.com>
1380
1381 * linux-low.c: Change interface to take the target lwp_info
1382 pointer directly and return void. Handle detaching from a zombie
1383 thread.
1384 (linux_detach_lwp_callback): New function.
1385 (linux_detach): Detach from the leader thread after detaching from
1386 the clone threads.
1387
1388 2016-06-28 Yao Qi <yao.qi@linaro.org>
1389
1390 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1391 for variable new_offset.
1392 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1393 (aarch64_ftrace_insn_reloc_cb): Likewise.
1394 (aarch64_ftrace_insn_reloc_tb): Likewise.
1395 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1396 PRIx64 instead of PRIx32.
1397
1398 2016-06-28 Yao Qi <yao.qi@linaro.org>
1399
1400 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1401 (the_low_target): Install arm_get_syscall_trapinfo.
1402
1403 2016-06-28 Yao Qi <yao.qi@linaro.org>
1404
1405 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1406 function.
1407 (the_low_target): Install aarch64_get_syscall_trapinfo.
1408
1409 2016-06-28 Yao Qi <yao.qi@linaro.org>
1410
1411 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1412 Callers updated.
1413 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1414 Remove parameter sysno.
1415 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1416 sysret.
1417
1418 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1419
1420 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1421 (s390_emit_ne_goto): Likewise.
1422 (s390_emit_lt_goto): Likewise.
1423 (s390_emit_le_goto): Likewise.
1424 (s390_emit_gt_goto): Likewise.
1425 (s390_emit_ge_goto): Likewise.
1426 (s390x_emit_eq_goto): Likewise.
1427 (s390x_emit_ne_goto): Likewise.
1428 (s390x_emit_lt_goto): Likewise.
1429 (s390x_emit_le_goto): Likewise.
1430 (s390x_emit_gt_goto): Likewise.
1431 (s390x_emit_ge_goto): Likewise.
1432 (s390_emit_ops_impl): Mark variable static.
1433 (s390x_emit_ops): Likewise.
1434
1435 2016-06-17 Yao Qi <yao.qi@linaro.org>
1436
1437 * linux-low.c (handle_extended_wait): Call
1438 uninsert_reinsert_breakpoints for the parent process. Remove
1439 reinsert breakpoints from the child process. Reinsert them to
1440 the parent process when vfork is done.
1441 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1442 (reinsert_reinsert_breakpoints): New function.
1443 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1444 (reinsert_reinsert_breakpoints): Declare.
1445
1446 2016-06-17 Yao Qi <yao.qi@linaro.org>
1447
1448 * linux-low.c (handle_extended_wait): If the parent is doing
1449 step-over, remove the reinsert breakpoints from the forked child.
1450
1451 2016-06-17 Yao Qi <yao.qi@linaro.org>
1452
1453 * linux-low.c (unsuspend_all_lwps): Declare.
1454 (linux_low_filter_event): If thread exited, call finish_step_over.
1455 If step-over is finished, unsuspend other threads.
1456
1457 2016-06-17 Yao Qi <yao.qi@linaro.org>
1458
1459 * linux-low.c (linux_resume_one_lwp_throw): Assert
1460 has_reinsert_breakpoints returns false.
1461 * mem-break.c (delete_disabled_breakpoints): Assert
1462 bp type isn't reinsert_breakpoint.
1463
1464 2016-06-17 Yao Qi <yao.qi@linaro.org>
1465
1466 * linux-low.c (maybe_hw_step): New function.
1467 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1468 (finish_step_over): Switch current_thread to lwp temporarily,
1469 and assert has_reinsert_breakpoints returns true.
1470 (proceed_one_lwp): Call maybe_hw_step.
1471 * mem-break.c (has_reinsert_breakpoints): New function.
1472 * mem-break.h (has_reinsert_breakpoints): Declare.
1473
1474 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1475
1476 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1477
1478 2016-05-17 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1481 instead of find_inferior.
1482
1483 2016-05-05 Yao Qi <yao.qi@linaro.org>
1484
1485 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1486 Initialize res to zero.
1487
1488 2016-05-05 Yao Qi <yao.qi@linaro.org>
1489
1490 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1491 to uint32_t.
1492
1493 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1494
1495 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1496 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1497 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1498
1499 2016-04-28 Par Olsson <par.olsson@windriver.com>
1500 Simon Marchi <simon.marchi@ericsson.com>
1501
1502 * tracepoint.c (write_inferior_int8): New function.
1503 (cmd_qtenable_disable): Write enable flag using
1504 write_inferior_int8.
1505
1506 2016-04-25 Yao Qi <yao.qi@linaro.org>
1507
1508 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1509 (need_step_over_p): Return zero if the LWP has pending signals
1510 can be delivered on software single step target.
1511
1512 2016-04-25 Yao Qi <yao.qi@linaro.org>
1513
1514 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1515 return instead of error.
1516
1517 2016-04-22 Yao Qi <yao.qi@linaro.org>
1518
1519 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1520 to 23.
1521
1522 2016-04-22 Yao Qi <yao.qi@linaro.org>
1523
1524 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1525 signal when stepping over breakpoint with software single
1526 step.
1527
1528 2016-04-21 Pedro Alves <palves@redhat.com>
1529
1530 * linux-s390-low.c (s390_collect_ptrace_register)
1531 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1532 add casts.
1533 (s390_check_regset): Use void * instead of gdb_byte *.
1534
1535 2016-04-20 Pedro Alves <palves@redhat.com>
1536
1537 * configure: Renegerate.
1538
1539 2016-04-20 Yao Qi <yao.qi@linaro.org>
1540
1541 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1542 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1543 number 16.
1544 (arm_store_gregset): Likewise.
1545
1546 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1547
1548 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1549 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1550 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1551 (amd64-avx-mpx-linux.c): New rules.
1552 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1553 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1554 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1555 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1556 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1557 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1558 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1559 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1560 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1561 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1562 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1563 * linux-x86-low.c (x86_linux_read_description): Add case for
1564 X86_XSTATE_AVX_MPX_MASK.
1565 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1566 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1567 init_registers_i386_avx_mpx_linux.
1568 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1569 (initialize_low_tracepoint): Call
1570 init_registers_i386_avx_mpx_linux.
1571 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1572 (initialize_low_tracepoint): Call
1573 init_registers_amd64_avx_mpx_linux.
1574 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1575 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1576 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1577 declarations.
1578
1579 2016-04-18 Pedro Alves <palves@redhat.com>
1580
1581 * configure: Regenerate.
1582
1583 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1584
1585 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1586 (aarch64_emit_sub): Likewise.
1587
1588 2016-04-12 Pedro Alves <palves@redhat.com>
1589
1590 * utils.c (prepare_to_throw_exception): Delete.
1591
1592 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1593
1594 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1595
1596 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1597
1598 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1599
1600 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1601
1602 * linux-aarch64-ipa.c: Add <elf.h> include.
1603 * linux-ppc-ipa.c: Add <elf.h> include.
1604 * linux-s390-ipa.c: Add <elf.h> include.
1605
1606 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1607
1608 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1609 (get_raw_reg_ptr): Likewise.
1610 (get_trace_state_variable_value_ptr): Likewise.
1611 (set_trace_state_variable_value_ptr): Likewise.
1612 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1613 char *.
1614
1615 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1616 Marcin Kościelnicki <koriakin@0x04.net>
1617
1618 PR/17221
1619 * linux-ppc-low.c (emit_insns): New function.
1620 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1621 (ppc_emit_prologue): New function.
1622 (ppc_emit_epilogue): New function.
1623 (ppc_emit_add): New function.
1624 (ppc_emit_sub): New function.
1625 (ppc_emit_mul): New function.
1626 (ppc_emit_lsh): New function.
1627 (ppc_emit_rsh_signed): New function.
1628 (ppc_emit_rsh_unsigned): New function.
1629 (ppc_emit_ext): New function.
1630 (ppc_emit_zero_ext): New function.
1631 (ppc_emit_log_not): New function.
1632 (ppc_emit_bit_and): New function.
1633 (ppc_emit_bit_or): New function.
1634 (ppc_emit_bit_xor): New function.
1635 (ppc_emit_bit_not): New function.
1636 (ppc_emit_equal): New function.
1637 (ppc_emit_less_signed): New function.
1638 (ppc_emit_less_unsigned): New function.
1639 (ppc_emit_ref): New function.
1640 (ppc_emit_const): New function.
1641 (ppc_emit_reg): New function.
1642 (ppc_emit_pop): New function.
1643 (ppc_emit_stack_flush): New function.
1644 (ppc_emit_swap): New function.
1645 (ppc_emit_stack_adjust): New function.
1646 (ppc_emit_call): New function.
1647 (ppc_emit_int_call_1): New function.
1648 (ppc_emit_void_call_2): New function.
1649 (ppc_emit_if_goto): New function.
1650 (ppc_emit_goto): New function.
1651 (ppc_emit_eq_goto): New function.
1652 (ppc_emit_ne_goto): New function.
1653 (ppc_emit_lt_goto): New function.
1654 (ppc_emit_le_goto): New function.
1655 (ppc_emit_gt_goto): New function.
1656 (ppc_emit_ge_goto): New function.
1657 (ppc_write_goto_address): New function.
1658 (ppc_emit_ops_impl): New static variable.
1659 (ppc64v1_emit_prologue): New function.
1660 (ppc64v2_emit_prologue): New function.
1661 (ppc64_emit_epilogue): New function.
1662 (ppc64_emit_add): New function.
1663 (ppc64_emit_sub): New function.
1664 (ppc64_emit_mul): New function.
1665 (ppc64_emit_lsh): New function.
1666 (ppc64_emit_rsh_signed): New function.
1667 (ppc64_emit_rsh_unsigned): New function.
1668 (ppc64_emit_ext): New function.
1669 (ppc64_emit_zero_ext): New function.
1670 (ppc64_emit_log_not): New function.
1671 (ppc64_emit_bit_and): New function.
1672 (ppc64_emit_bit_or): New function.
1673 (ppc64_emit_bit_xor): New function.
1674 (ppc64_emit_bit_not): New function.
1675 (ppc64_emit_equal): New function.
1676 (ppc64_emit_less_signed): New function.
1677 (ppc64_emit_less_unsigned): New function.
1678 (ppc64_emit_ref): New function.
1679 (ppc64_emit_const): New function.
1680 (ppc64v1_emit_reg): New function.
1681 (ppc64v2_emit_reg): New function.
1682 (ppc64_emit_pop): New function.
1683 (ppc64_emit_stack_flush): New function.
1684 (ppc64_emit_swap): New function.
1685 (ppc64v1_emit_call): New function.
1686 (ppc64v2_emit_call): New function.
1687 (ppc64v1_emit_int_call_1): New function.
1688 (ppc64v2_emit_int_call_1): New function.
1689 (ppc64v1_emit_void_call_2): New function.
1690 (ppc64v2_emit_void_call_2): New function.
1691 (ppc64_emit_if_goto): New function.
1692 (ppc64_emit_eq_goto): New function.
1693 (ppc64_emit_ne_goto): New function.
1694 (ppc64_emit_lt_goto): New function.
1695 (ppc64_emit_le_goto): New function.
1696 (ppc64_emit_gt_goto): New function.
1697 (ppc64_emit_ge_goto): New function.
1698 (ppc64v1_emit_ops_impl): New static variable.
1699 (ppc64v2_emit_ops_impl): New static variable.
1700 (ppc_emit_ops): New function.
1701 (linux_low_target): Wire in ppc_emit_ops.
1702
1703 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1704 Marcin Kościelnicki <koriakin@0x04.net>
1705
1706 PR/17221
1707 * Makefile.in: Add powerpc-*-ipa.o
1708 * configure.srv: Add ipa_obj for powerpc*-linux.
1709 * linux-ppc-ipa.c: New file.
1710 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1711 includes.
1712 (PPC_FIELD): New macro.
1713 (PPC_SEXT): New macro.
1714 (PPC_OP6): New macro.
1715 (PPC_BO): New macro.
1716 (PPC_LI): New macro.
1717 (PPC_BD): New macro.
1718 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1719 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1720 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1721 (ppc_get_thread_area): New function.
1722 (is_elfv2_inferior): New function.
1723 (gen_ds_form): New function.
1724 (GEN_STD): New macro.
1725 (GEN_STDU): New macro.
1726 (GEN_LD): New macro.
1727 (GEN_LDU): New macro.
1728 (gen_d_form): New function.
1729 (GEN_ADDI): New macro.
1730 (GEN_ADDIS): New macro.
1731 (GEN_LI): New macro.
1732 (GEN_LIS): New macro.
1733 (GEN_ORI): New macro.
1734 (GEN_ORIS): New macro.
1735 (GEN_LWZ): New macro.
1736 (GEN_STW): New macro.
1737 (GEN_STWU): New macro.
1738 (gen_xfx_form): New function.
1739 (GEN_MFSPR): New macro.
1740 (GEN_MTSPR): New macro.
1741 (GEN_MFCR): New macro.
1742 (GEN_MTCR): New macro.
1743 (GEN_SYNC): New macro.
1744 (GEN_LWSYNC): New macro.
1745 (gen_x_form): New function.
1746 (GEN_OR): New macro.
1747 (GEN_MR): New macro.
1748 (GEN_LWARX): New macro.
1749 (GEN_STWCX): New macro.
1750 (GEN_CMPW): New macro.
1751 (gen_md_form): New function.
1752 (GEN_RLDICL): New macro.
1753 (GEN_RLDICR): New macro.
1754 (gen_i_form): New function.
1755 (GEN_B): New macro.
1756 (GEN_BL): New macro.
1757 (gen_b_form): New function.
1758 (GEN_BNE): New macro.
1759 (GEN_LOAD): New macro.
1760 (GEN_STORE): New macro.
1761 (gen_limm): New function.
1762 (gen_atomic_xchg): New function.
1763 (gen_call): New function.
1764 (ppc_relocate_instruction): New function.
1765 (ppc_install_fast_tracepoint_jump_pad): New function.
1766 (ppc_get_min_fast_tracepoint_insn_len): New function.
1767 (ppc_get_ipa_tdesc_idx): New function.
1768 (the_low_target): Wire in the new functions.
1769 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1770 tdescs.
1771 * linux-ppc-tdesc.h: New file.
1772
1773 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1774
1775 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1776 (alloc_jump_pad_buffer): New function.
1777 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1778 (alloc_jump_pad_buffer): New function.
1779 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1780 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1781 (alloc_jump_pad_buffer): New function.
1782 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1783 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1784 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1785 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1786
1787 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1788
1789 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1790 * linux-amd64-ipa.c: Likewise.
1791 * linux-i386-ipa.c: Likewise.
1792 * linux-s390-ipa.c: Likewise.
1793 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1794 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1795 set_trace_state_variable_value_ptr.
1796 (struct ipa_sym_addresses): Likewise.
1797 (symbol_list): Likewise.
1798 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1799 accessing gdb_collect directly.
1800 (gdb_collect_ptr_type): New typedef.
1801 (get_raw_reg_ptr_type): New typedef.
1802 (get_trace_state_variable_value_ptr_type): New typedef.
1803 (set_trace_state_variable_value_ptr_type): New typedef.
1804 (gdb_collect_ptr): New global.
1805 (get_raw_reg_ptr): New global.
1806 (get_trace_state_variable_value_ptr): New global.
1807 (set_trace_state_variable_value_ptr): New global.
1808 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1809 accessing get_raw_reg directly.
1810 (get_get_tsv_func_addr): Likewise for
1811 get_trace_state_variable_value_ptr.
1812 (get_set_tsv_func_addr): Likewise for
1813 set_trace_state_variable_value_ptr.
1814 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1815
1816 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1817
1818 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1819
1820 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1821
1822 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1823 packets.
1824 (relocate_instruction): Remove own_buf.
1825 * server.c (own_buf): Make global.
1826 (handle_v_requests): Make global.
1827 * server.h (own_buf): New declaration.
1828 (handle_v_requests): New prototype.
1829
1830 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1831
1832 PR 18377
1833 * linux-s390-low.c (add_insns): New function.
1834 (s390_emit_prologue): New function.
1835 (s390_emit_epilogue): New function.
1836 (s390_emit_add): New function.
1837 (s390_emit_sub): New function.
1838 (s390_emit_mul): New function.
1839 (s390_emit_lsh): New function.
1840 (s390_emit_rsh_signed): New function.
1841 (s390_emit_rsh_unsigned): New function.
1842 (s390_emit_ext): New function.
1843 (s390_emit_log_not): New function.
1844 (s390_emit_bit_and): New function.
1845 (s390_emit_bit_or): New function.
1846 (s390_emit_bit_xor): New function.
1847 (s390_emit_bit_not): New function.
1848 (s390_emit_equal): New function.
1849 (s390_emit_less_signed): New function.
1850 (s390_emit_less_unsigned): New function.
1851 (s390_emit_ref): New function.
1852 (s390_emit_if_goto): New function.
1853 (s390_emit_goto): New function.
1854 (s390_write_goto_address): New function.
1855 (s390_emit_litpool): New function.
1856 (s390_emit_const): New function.
1857 (s390_emit_call): New function.
1858 (s390_emit_reg): New function.
1859 (s390_emit_pop): New function.
1860 (s390_emit_stack_flush): New function.
1861 (s390_emit_zero_ext): New function.
1862 (s390_emit_swap): New function.
1863 (s390_emit_stack_adjust): New function.
1864 (s390_emit_set_r2): New function.
1865 (s390_emit_int_call_1): New function.
1866 (s390_emit_void_call_2): New function.
1867 (s390_emit_eq_goto): New function.
1868 (s390_emit_ne_goto): New function.
1869 (s390_emit_lt_goto): New function.
1870 (s390_emit_le_goto): New function.
1871 (s390_emit_gt_goto): New function.
1872 (s390_emit_ge_goto): New function.
1873 (s390x_emit_prologue): New function.
1874 (s390x_emit_epilogue): New function.
1875 (s390x_emit_add): New function.
1876 (s390x_emit_sub): New function.
1877 (s390x_emit_mul): New function.
1878 (s390x_emit_lsh): New function.
1879 (s390x_emit_rsh_signed): New function.
1880 (s390x_emit_rsh_unsigned): New function.
1881 (s390x_emit_ext): New function.
1882 (s390x_emit_log_not): New function.
1883 (s390x_emit_bit_and): New function.
1884 (s390x_emit_bit_or): New function.
1885 (s390x_emit_bit_xor): New function.
1886 (s390x_emit_bit_not): New function.
1887 (s390x_emit_equal): New function.
1888 (s390x_emit_less_signed): New function.
1889 (s390x_emit_less_unsigned): New function.
1890 (s390x_emit_ref): New function.
1891 (s390x_emit_if_goto): New function.
1892 (s390x_emit_const): New function.
1893 (s390x_emit_call): New function.
1894 (s390x_emit_reg): New function.
1895 (s390x_emit_pop): New function.
1896 (s390x_emit_stack_flush): New function.
1897 (s390x_emit_zero_ext): New function.
1898 (s390x_emit_swap): New function.
1899 (s390x_emit_stack_adjust): New function.
1900 (s390x_emit_int_call_1): New function.
1901 (s390x_emit_void_call_2): New function.
1902 (s390x_emit_eq_goto): New function.
1903 (s390x_emit_ne_goto): New function.
1904 (s390x_emit_lt_goto): New function.
1905 (s390x_emit_le_goto): New function.
1906 (s390x_emit_gt_goto): New function.
1907 (s390x_emit_ge_goto): New function.
1908 (s390_emit_ops): New function.
1909 (struct linux_target_ops): Fill in emit_ops hook.
1910
1911 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1912
1913 PR 18377
1914 * Makefile.in: Add s390 IPA files.
1915 * configure.srv: Build IPA for s390.
1916 * linux-s390-ipa.c: New file.
1917 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1918 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1919 (tdesc_s390_linux32): Likewise.
1920 (init_registers_s390_linux32v1): Likewise.
1921 (tdesc_s390_linux32v1): Likewise.
1922 (init_registers_s390_linux32v2): Likewise.
1923 (tdesc_s390_linux32v2): Likewise.
1924 (init_registers_s390_linux64): Likewise.
1925 (tdesc_s390_linux64): Likewise.
1926 (init_registers_s390_linux64v1): Likewise.
1927 (tdesc_s390_linux64v1): Likewise.
1928 (init_registers_s390_linux64v2): Likewise.
1929 (tdesc_s390_linux64v2): Likewise.
1930 (init_registers_s390_te_linux64): Likewise.
1931 (tdesc_s390_te_linux64): Likewise.
1932 (init_registers_s390_vx_linux64): Likewise.
1933 (tdesc_s390_vx_linux64): Likewise.
1934 (init_registers_s390_tevx_linux64): Likewise.
1935 (tdesc_s390_tevx_linux64): Likewise.
1936 (init_registers_s390x_linux64): Likewise.
1937 (tdesc_s390x_linux64): Likewise.
1938 (init_registers_s390x_linux64v1): Likewise.
1939 (tdesc_s390x_linux64v1): Likewise.
1940 (init_registers_s390x_linux64v2): Likewise.
1941 (tdesc_s390x_linux64v2): Likewise.
1942 (init_registers_s390x_te_linux64): Likewise.
1943 (tdesc_s390x_te_linux64): Likewise.
1944 (init_registers_s390x_vx_linux64): Likewise.
1945 (tdesc_s390x_vx_linux64): Likewise.
1946 (init_registers_s390x_tevx_linux64): Likewise.
1947 (tdesc_s390x_tevx_linux64): Likewise.
1948 (have_hwcap_s390_vx): New static variable.
1949 (s390_arch_setup): Fill have_hwcap_s390_vx.
1950 (s390_get_thread_area): New function.
1951 (s390_ft_entry_gpr_esa): New const.
1952 (s390_ft_entry_gpr_zarch): New const.
1953 (s390_ft_entry_misc): New const.
1954 (s390_ft_entry_fr): New const.
1955 (s390_ft_entry_vr): New const.
1956 (s390_ft_main_31): New const.
1957 (s390_ft_main_64): New const.
1958 (s390_ft_exit_fr): New const.
1959 (s390_ft_exit_vr): New const.
1960 (s390_ft_exit_misc): New const.
1961 (s390_ft_exit_gpr_esa): New const.
1962 (s390_ft_exit_gpr_zarch): New const.
1963 (append_insns): New function.
1964 (s390_relocate_instruction): New function.
1965 (s390_install_fast_tracepoint_jump_pad): New function.
1966 (s390_get_min_fast_tracepoint_insn_len): New function.
1967 (s390_get_ipa_tdesc_idx): New function.
1968 (struct linux_target_ops): Wire in the above functions.
1969 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1970 * linux-s390-tdesc.h: New file.
1971
1972 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1973
1974 * linux-s390-low.c (s390_supports_tracepoints): New function.
1975 (struct linux_target_ops): Fill supports_tracepoints hook.
1976
1977 2016-03-18 Yao Qi <yao.qi@linaro.org>
1978
1979 * linux-low.c (lwp_signal_can_be_delivered): New function.
1980 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1981
1982 2016-03-18 Yao Qi <yao.qi@linaro.org>
1983
1984 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1985 0 if signal is enqueued. Remove 'signal' from one debugging
1986 message. Move one debugging message to some lines below.
1987 Remove code setting 'signal' to 0.
1988
1989 2016-03-18 Yao Qi <yao.qi@linaro.org>
1990
1991 * linux-low.c (linux_low_filter_event): Remove redundant
1992 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1993
1994 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1995
1996 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1997 (struct linux_target_ops): Wire in the above.
1998
1999 2016-03-03 Yao Qi <yao.qi@linaro.org>
2000
2001 * linux-low.c: Update comments to start_step_over.
2002
2003 2016-03-03 Yao Qi <yao.qi@linaro.org>
2004
2005 PR server/19736
2006 * linux-low.c (handle_extended_wait): Set child suspended
2007 if event_lwp->bp_reinsert isn't zero.
2008
2009 2016-03-02 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2012 enqueue_pending_signal.
2013
2014 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2015
2016 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2017 is actually loaded.
2018
2019 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2020
2021 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2022 (s390_regmap_3264) [!__s390x__]: New global.
2023 (s390_collect_ptrace_register): Skip map entries containing -1.
2024 (s390_supply_ptrace_register): Ditto.
2025 (s390_fill_gprs_high): New function.
2026 (s390_store_gprs_high): New function.
2027 (s390_regsets): Add NT_S390_HIGH_GPRS.
2028 (s390_get_hwcap): Enable on 31-bit.
2029 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2030 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2031 Detect NT_S390_HIGH_GPRS.
2032 (s390_usrregs_info_3264): Enable on 31-bit.
2033 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2034 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2035
2036 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2037
2038 PR gdb/13808
2039 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2040 * configure.srv: Ditto.
2041 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2042 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2043 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2044 (init_registers_amd64_linux): Remove prototype.
2045 (tdesc_amd64_linux): Remove declaration.
2046 (get_ipa_tdesc): New function.
2047 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2048 initialize remaining tdescs.
2049 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2050 (init_registers_i386_linux): Remove prototype.
2051 (tdesc_i386_linux): Remove declaration.
2052 (get_ipa_tdesc): New function.
2053 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2054 initialize remaining tdescs.
2055 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2056 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2057 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2058 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2059 (x86_get_ipa_tdesc_idx): New function.
2060 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2061 * linux-x86-tdesc.h: New file.
2062 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2063 (target_get_ipa_tdesc_idx): New macro.
2064 * tracepoint.c (ipa_tdesc_idx): New macro.
2065 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2066 (symbol_list): Add ipa_tdesc_idx.
2067 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2068 (ipa_tdesc): Remove.
2069 (ipa_tdesc_idx): New variable.
2070 (get_context_regcache): Use get_ipa_tdesc.
2071 (gdb_collect): Ditto.
2072 (gdb_probe): Ditto.
2073 * tracepoint.h (get_ipa_tdesc): New prototype.
2074 (ipa_tdesc): Remove.
2075
2076 2016-02-24 Pedro Alves <palves@redhat.com>
2077
2078 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2079 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2080 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2081 Factor out common code between the USE_SIGTRAP_SIGINFO and
2082 !USE_SIGTRAP_SIGINFO blocks.
2083 (linux_low_filter_event): Call save_stop_reason instead of
2084 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2085 Update comments.
2086 (linux_wait_1): Update comments.
2087
2088 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2089
2090 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2091 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2092 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2093 ppc_insert_point, ppc_remove_point.
2094
2095 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2096
2097 * linux-s390-low.c (s390_supports_z_point_type): New function.
2098 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2099
2100 2016-02-16 Yao Qi <yao.qi@linaro.org>
2101
2102 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2103 PC. Get pc from regcache_read_pc.
2104
2105 2016-02-12 Yao Qi <yao.qi@linaro.org>
2106
2107 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2108 or linux_get_pc_32bit.
2109 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2110
2111 2016-02-12 Yao Qi <yao.qi@linaro.org>
2112
2113 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2114 arm_linux_get_next_pcs_fixup.
2115
2116 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2117
2118 * tracepoint.c (x_tracepoint_action_download): Change
2119 write_inferior_data_ptr to write_inferior_data_pointer.
2120 (cmd_qtstart): Likewise.
2121 (write_inferior_data_ptr): Remove.
2122 (download_agent_expr): Change write_inferior_data_ptr to
2123 write_inferior_data_pointer.
2124 (download_tracepoint_1): Likewise.
2125 (download_tracepoint): Likewise.
2126 (download_trace_state_variables): Likewise.
2127
2128 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2129 Marcin Kościelnicki <koriakin@0x04.net>
2130
2131 * tracepoint.c (struct tracepoint_action_ops): Remove.
2132 (struct tracepoint_action): Remove ops.
2133 (m_tracepoint_action_download, r_tracepoint_action_download)
2134 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2135 size and offset accordingly.
2136 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2137 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2138 (tracepoint_action_send, tracepoint_action_download): New functions.
2139 Helpers for trace action handlers.
2140 (add_tracepoint_action): Remove setup actions ops.
2141 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2142
2143 2016-02-10 Yao Qi <yao.qi@linaro.org>
2144
2145 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2146
2147 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2148
2149 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2150 to AC_OUTPUT.
2151 * configure: Regenerate.
2152
2153 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2154
2155 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2156 void * to gdb_byte *.
2157 * linux-low.c (siginfo_fixup): Likewise.
2158 (linux_xfer_siginfo): Likewise.
2159 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2160 Likewise.
2161 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2162
2163 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2164
2165 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2166 to srv_tgtobj.
2167 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2168 to srv_tgtobj.
2169 * linux-x86-low.c [__x86_64__]: Include
2170 "nat/amd64-linux-siginfo.h".
2171 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2172 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2173 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2174 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2175 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2176 (cpt_si_fd, si_timerid, si_overrun): Move from
2177 nat/amd64-linux-siginfo.c.
2178 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2179
2180 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2181
2182 * server.c (skip_to_semicolon): Remove.
2183 (process_point_options): Use strchrnul instead of
2184 skip_to_semicolon.
2185
2186 2016-01-26 Yao Qi <yao.qi@linaro.org>
2187
2188 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2189 * linux-low.c (install_software_single_step_breakpoints): Don't
2190 call regcache_read_pc.
2191 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2192 argument pc.
2193
2194 2016-01-26 Yao Qi <yao.qi@linaro.org>
2195
2196 * linux-low.c (install_software_single_step_breakpoints): Call
2197 regcache_read_pc instead of get_pc.
2198
2199 2016-01-26 Yao Qi <yao.qi@linaro.org>
2200
2201 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2202 (unblock_async_io): Rename to ...
2203 (block_unblock_async_io): ... it. New function.
2204 (enable_async_io): Don't install SIGIO handler. Unblock it
2205 instead.
2206 (disable_async_io): Don't ignore SIGIO. Block it instead.
2207 (initialize_async_io): Install SIGIO handler. Don't call
2208 unblock_async_io.
2209
2210 2016-01-26 Yao Qi <yao.qi@linaro.org>
2211
2212 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2213 first character is '\003', call *the_target->request_interrupt.
2214
2215 2016-01-25 Yao Qi <yao.qi@linaro.org>
2216
2217 * remote-utils.c (new_thread_notify): Remove.
2218 (dead_thread_notify): Likewise.
2219 * remote-utils.h (new_thread_notify): Remove declaration.
2220 (dead_thread_notify): Likewise.
2221
2222 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2223
2224 * gdb.trace/pending.exp: Fix expected message on continue.
2225
2226 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2227
2228 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2229 it works properly on big-endian machines where sizeof (CORE_ADDR)
2230 != sizeof (void *).
2231
2232 2016-01-21 Pedro Alves <palves@redhat.com>
2233
2234 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2235 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2236 * configure: Regenerate.
2237
2238 2016-01-21 Yao Qi <yao.qi@linaro.org>
2239
2240 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2241 is_thumb and set it according to CPSR saved on the stack.
2242 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2243 arm_sigreturn_next_pc.
2244
2245 2016-01-18 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-low.c (linux_set_pc_64bit): New function.
2248 (linux_get_pc_64bit): New function.
2249 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2250 Declare.
2251 * linux-sparc-low.c (debug_threads): Remove declaration.
2252 (sparc_get_pc): Remove.
2253 (the_low_target): Use linux_get_pc_64bit instead of
2254 sparc_get_pc.
2255 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2256 (the_low_target): Use linux_get_pc_64bit and
2257 linux_set_pc_64bit.
2258
2259 2016-01-18 Yao Qi <yao.qi@linaro.org>
2260
2261 * linux-arm-low.c (debug_threads): Remove declaration.
2262 (arm_get_pc, arm_set_pc): Remove.
2263 (the_low_target): Use linux_get_pc_32bit and
2264 linux_set_pc_32bit.
2265 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2266 (the_low_target): Use linux_get_pc_32bit and
2267 linux_set_pc_32bit.
2268 * linux-cris-low.c (debug_threads): Remove declaration.
2269 (cris_get_pc, cris_set_pc,): Remove.
2270 (the_low_target): Use linux_get_pc_32bit and
2271 linux_set_pc_32bit.
2272 * linux-crisv32-low.c (debug_threads): Remove declaration.
2273 (cris_get_pc, cris_set_pc): Remove.
2274 (the_low_target): Use linux_get_pc_32bit and
2275 linux_set_pc_32bit.
2276 * linux-low.c: Include inttypes.h.
2277 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2278 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2279 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2280 (the_low_target): Use linux_get_pc_32bit and
2281 linux_set_pc_32bit.
2282 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2283 (the_low_target): Use linux_get_pc_32bit and
2284 linux_set_pc_32bit.
2285 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2286 (the_low_target): Use linux_get_pc_32bit and
2287 linux_set_pc_32bit.
2288 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2289 (the_low_target): Use linux_get_pc_32bit and
2290 linux_set_pc_32bit.
2291 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2292 (the_low_target): Use linux_get_pc_32bit and
2293 linux_set_pc_32bit.
2294
2295 2016-01-18 Gary Benson <gbenson@redhat.com>
2296
2297 * configure.ac (AC_FUNC_FORK): New check.
2298 * config.in: Regenerate.
2299 * configure: Likewise.
2300
2301 2016-01-14 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2304 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2305 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2306 arm_get_next_pcs_ctor.
2307
2308 2016-01-12 Josh Stone <jistone@redhat.com>
2309 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2310
2311 * inferiors.h: Include "gdb_vecs.h".
2312 (struct process_info): Add syscalls_to_catch.
2313 * inferiors.c (remove_process): Free syscalls_to_catch.
2314 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2315 syscall_return stops.
2316 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2317 * server.c (handle_general_set): Handle QCatchSyscalls.
2318 (handle_query): Report support for QCatchSyscalls.
2319 * target.h (struct target_ops): Add supports_catch_syscall.
2320 (target_supports_catch_syscall): New macro.
2321 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2322 (struct lwp_info): Add syscall_state.
2323 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2324 Maintain syscall_state and syscalls_to_catch across exec.
2325 (get_syscall_trapinfo): New function, proxy to the_low_target.
2326 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2327 (linux_low_filter_event): Toggle syscall_state entry/return for
2328 syscall traps, and set it ignored for all others.
2329 (gdb_catching_syscalls_p): New function.
2330 (gdb_catch_this_syscall_p): New function.
2331 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2332 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2333 (linux_supports_catch_syscall): New function.
2334 (linux_target_ops): Install it.
2335 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2336 (the_low_target): Install it.
2337
2338 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2339
2340 * acinclude.m4: Include new ../warning.m4 file.
2341 * configure: Regenerated.
2342 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2343
2344 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2345
2346 * ax.c (is_goto_target): Mark static.
2347 * linux-low.c (register_addr): Likewise.
2348 (linux_fetch_registers, linux_store_registers): Likewise.
2349 * mem-break.c (any_persistent_commands): Fix old prototype.
2350 (add_commands_to_breakpoint): Mark static.
2351 * regcache.c (find_register_by_name): Delete unused func.
2352 * remote-utils.c (hex_or_minus_one): Mark static.
2353 * server.c (monitor_show_help): Mark static.
2354 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2355 handle_v_requests): Likewise.
2356
2357 2016-01-12 Pedro Alves <palves@redhat.com>
2358
2359 Remove use of the registered trademark symbol throughout.
2360
2361 2016-01-08 Yao Qi <yao.qi@linaro.org>
2362
2363 * remote-utils.c (getpkt): If c is '\003', call target hook
2364 request_interrupt.
2365
2366 2016-01-06 Yao Qi <yao.qi@linaro.org>
2367
2368 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2369 linux-aarch32-low.c.
2370 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2371 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2372 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2373 (thumb2_breakpoint): Declare.
2374 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2375 linux-aarch32-low.h.
2376 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2377 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2378 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2379
2380 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2381
2382 * gdbreplay.c (gdbreplay_version): Change copyright year in
2383 version message.
2384 * server.c (gdbserver_version): Likewise.
2385
2386 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2387
2388 * server.c (crc32_table): Delete.
2389 (crc32): Use libiberty's xcrc32 function.
2390
2391 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2392
2393 * lynx-low.c (lynx_delete_thread_callback): New function.
2394 (lynx_mourn): Properly delete our process and all of its
2395 threads. Remove call to clear_inferiors.
2396
2397 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2398
2399 * target.c (thread_search_callback): Add check that
2400 the thread_stopped target callback is not NULL before
2401 calling it.
2402
2403 2015-12-21 Yao Qi <yao.qi@linaro.org>
2404
2405 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2406 arm breakpoint.
2407
2408 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2409
2410 * server.c (handle_query): Call target_supports_software_single_step.
2411
2412 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2413
2414 * linux-low.c (single_step): New function.
2415 (linux_resume_one_lwp_throw): Call single_step.
2416 (start_step_over): Likewise.
2417
2418 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2419
2420 * Makefile.in (SFILES): Append arch/arm-linux.c,
2421 arch/arm-get-next-pcs.c.
2422 (arm-linux.o): New rule.
2423 (arm-get-next-pcs.o): New rule.
2424 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2425 arm-linux.o.
2426 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2427 to linux-aarch32-low.c.
2428 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2429 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2430 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2431 (thumb2_breakpoint_len): Likewise.
2432 (arm_is_thumb_mode): Make non-static.
2433 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2434 from linux-aarch32-low.c.
2435 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2436 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2437 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2438 (thumb2_breakpoint_len): Likewise.
2439 (arm_is_thumb_mode): New declaration.
2440 * linux-arm-low.c: Include arch/arm-linux.h
2441 aarch/arm-get-next-pcs.h, sys/syscall.h.
2442 (get_next_pcs_ops): New struct.
2443 (get_next_pcs_addr_bits_remove): New function.
2444 (get_next_pcs_is_thumb): New function.
2445 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2446 (arm_sigreturn_next_pc): Likewise.
2447 (get_next_pcs_syscall_next_pc): Likewise.
2448 (arm_gdbserver_get_next_pcs): Likewise.
2449 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2450 Initialize.
2451 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2452 * server.h: Include gdb_vecs.h.
2453
2454 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2455
2456 * Makefile.in (SFILES): Append common/common-regcache.c.
2457 (OBS): Append common-regcache.o.
2458 (common-regcache.o): New rule.
2459 * regcache.c (init_register_cache): Initialize cache to
2460 REG_UNAVAILABLE.
2461 (regcache_raw_read_unsigned): New function.
2462 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2463 register_status enum.
2464
2465 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2466
2467 * linux-aarch64-low.c (the_low_targets): Rename
2468 breakpoint_reinsert_addr to get_next_pcs.
2469 * linux-arm-low.c (the_low_targets): Likewise.
2470 * linux-bfin-low.c (the_low_targets): Likewise.
2471 * linux-cris-low.c (the_low_targets): Likewise.
2472 * linux-crisv32-low.c (the_low_targets): Likewise.
2473 * linux-low.c (can_software_single_step): Likewise.
2474 (install_software_single_step_breakpoints): New function.
2475 (start_step_over): Use install_software_single_step_breakpoints.
2476 * linux-low.h: New CORE_ADDR vector.
2477 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2478 get_next_pcs.
2479 * linux-mips-low.c (the_low_targets): Likewise.
2480 * linux-nios2-low.c (the_low_targets): Likewise.
2481 * linux-sparc-low.c (the_low_targets): Likewise.
2482
2483 2015-12-17 Pedro Alves <palves@redhat.com>
2484
2485 * linux-low.c (linux_kill_one_lwp): Remove references to
2486 LinuxThreads.
2487 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2488 to 'kill'.
2489 (linux_init_signals): Delete.
2490 (initialize_low): Adjust.
2491 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2492
2493 2015-12-16 Pedro Alves <palves@redhat.com>
2494
2495 * configure.ac (compiler warning flags): When testing a
2496 -Wno-foo option, check whether -Wfoo works instead.
2497 * configure: Regenerate.
2498
2499 2015-12-11 Don Breazeal <donb@codesourcery.com>
2500
2501 * server.c (process_serial_event): Don't exit from gdbserver
2502 in remote mode if there are still active inferiors.
2503
2504 2015-12-11 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2507 arm_breakpoint_at if the process is 32-bit.
2508
2509 2015-12-11 Yao Qi <yao.qi@linaro.org>
2510
2511 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2512 arm breakpoint.
2513
2514 2015-12-07 Yao Qi <yao.qi@linaro.org>
2515
2516 * configure.srv: Append arm.o to srv_tgtobj for
2517 aarch64*-*-linux* target.
2518 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2519 from linux-arm-low.c.
2520 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2521 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2522 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2523 (thumb2_breakpoint_len): Likewise.
2524 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2525 (arm_breakpoint_kinds): Likewise.
2526 (arm_breakpoint_kind_from_pc): Likewise.
2527 (arm_sw_breakpoint_from_kind): Likewise.
2528 (arm_breakpoint_kind_from_current_state): Likewise.
2529 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2530 (arm_sw_breakpoint_from_kind): Declare.
2531 (arm_breakpoint_kind_from_current_state): Declare.
2532 (arm_breakpoint_at): Declare.
2533 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2534 arm_sw_breakpoint_from_kind if process is 32-bit.
2535 (aarch64_breakpoint_kind_from_pc): New function.
2536 (aarch64_breakpoint_kind_from_current_state): New function.
2537 (the_low_target): Initialize fields breakpoint_kind_from_pc
2538 and breakpoint_kind_from_current_state.
2539 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2540 linux-aarch32-low.c.
2541 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2542 (arm_breakpoint, arm_breakpoint_len): Likewise.
2543 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2544 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2545 (arm_is_thumb_mode): Likewise.
2546 (arm_breakpoint_at): Likewise.
2547 (arm_breakpoint_kind_from_pc): Likewise.
2548 (arm_sw_breakpoint_from_kind): Likewise.
2549 (arm_breakpoint_kind_from_current_state): Likewise.
2550
2551 Revert:
2552 2015-08-04 Yao Qi <yao.qi@linaro.org>
2553
2554 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2555 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2556 * server.c (extended_protocol): Remove "static".
2557 * server.h (extended_protocol): Declare it.
2558
2559 2015-12-04 Josh Stone <jistone@redhat.com>
2560
2561 * target.h (struct target_ops) <arch_setup>: Rename to ...
2562 (struct target_ops) <post_create_inferior>: ... this.
2563 (target_arch_setup): Rename to ...
2564 (target_post_create_inferior): ... this, calling post_create_inferior.
2565 * server.c (start_inferior): Update target_arch_setup calls to
2566 target_post_create_inferior.
2567 * linux-low.c (linux_low_ptrace_options): Forward declare.
2568 (linux_arch_setup): Update its comment for general use.
2569 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2570 (struct linux_target_ops): Use linux_post_create_inferior.
2571 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2572 to post_create_inferior.
2573 * nto-low.c (struct nto_target_ops): Likewise.
2574 * spu-low.c (struct spu_target_ops): Likewise.
2575 * win32-low.c (struct win32_target_ops): Likewise.
2576
2577 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2578
2579 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2580
2581 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2582
2583 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2584 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2585 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2586 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2587 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2588 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2589 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2590 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2591 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2592 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2593 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2594 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2595
2596 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2597
2598 * linux-low.c (linux_look_up_symbols): Don't call
2599 linux_supports_traceclone.
2600 * linux-low.h (thread_db_init): Remove use_events argument.
2601 * thread-db.c (thread_db_use_event): Remove global variable.
2602 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2603 (struct thread_db) <td_create_bp>: Remove field.
2604 (thread_db_create_event): Remove function.
2605 (thread_db_enable_reporting): Likewise.
2606 (find_one_thread): Don't check for thread_db_use_events.
2607 (attach_thread): Likewise.
2608 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2609 (try_thread_db_load_1): Don't check for thread_db_use_events.
2610 (thread_db_init): Remove use_events argument and thread events
2611 handling.
2612 (remove_thread_event_breakpoints): Remove function.
2613 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2614
2615 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2616
2617 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2618 New function.
2619 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2620 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2621 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2622 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2623 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2624 Initialize.
2625 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2626 New function.
2627 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2628 * linux-low.c (can_hardware_single_step): Use
2629 supports_hardware_single_step.
2630 (can_software_single_step): New function.
2631 (start_step_over): Call can_software_single_step.
2632 (linux_supports_hardware_single_step): New function.
2633 (struct target_ops) <supports_software_single_step>: Initialize.
2634 * linux-low.h (struct linux_target_ops)
2635 <supports_hardware_single_step>: Initialize.
2636 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2637 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2638 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2639 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2640 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2641 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2642 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2643 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2644 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2645 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2646 Initialize.
2647 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2648 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2649 Initialize.
2650 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2651 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2652 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2653 New function.
2654 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2655 * target.h (struct target_ops): <supports_software_single_step>:
2656 New field.
2657 (target_supports_software_single_step): New macro.
2658
2659 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2660
2661 * linux-low.c (linux_wait_1): Fix pc advance condition.
2662 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2663 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2664
2665 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2666
2667 * linux-arm-low.c (arm_is_thumb_mode): New function.
2668 (arm_breakpoint_at): Use arm_is_thumb_mode.
2669 (arm_breakpoint_kind_from_current_state): New function.
2670 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2671 Initialize.
2672 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2673 (linux_breakpoint_kind_from_current_state): New function.
2674 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2675 * linux-low.h (struct linux_target_ops)
2676 <breakpoint_kind_from_current_state>: New field.
2677 * target.h (struct target_ops): Likewise.
2678 (target_breakpoint_kind_from_current_state): New macro.
2679
2680 2015-11-30 Pedro Alves <palves@redhat.com>
2681
2682 * linux-low.c (linux_resume): Wake up the event loop before
2683 returning.
2684
2685 2015-11-30 Pedro Alves <palves@redhat.com>
2686
2687 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2688 check.
2689 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2690 to -1.
2691 * target.c (struct thread_search): New structure.
2692 (thread_search_callback): New function.
2693 (prev_general_thread): New global.
2694 (prepare_to_access_memory, done_accessing_memory): New functions.
2695 * target.h (prepare_to_access_memory, done_accessing_memory):
2696 Replace macros with function declarations.
2697
2698 2015-11-30 Pedro Alves <palves@redhat.com>
2699
2700 PR 14618
2701 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2702 report TARGET_WAITKIND_NO_RESUMED.
2703 * remote-utils.c (prepare_resume_reply): Handle
2704 TARGET_WAITKIND_NO_RESUMED.
2705 * server.c (report_no_resumed): New global.
2706 (handle_query) <qSupported>: Handle "no-resumed+". Report
2707 "no-resumed+" support.
2708 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2709 return error if the client doesn't support no-resumed events.
2710 (push_stop_notification): New function.
2711 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2712 events if the client supports them.
2713
2714 2015-11-30 Pedro Alves <palves@redhat.com>
2715
2716 * linux-low.c (thread_still_has_status_pending_p): Don't check
2717 vCont;t here.
2718 (lwp_resumed): New function.
2719 (status_pending_p_callback): Return early if the LWP is not
2720 supposed to be resumed.
2721
2722 2015-11-30 Pedro Alves <palves@redhat.com>
2723
2724 * linux-low.c (handle_extended_wait): Assert that the LWP's
2725 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2726 thread create events, leave the new child's status pending.
2727 (linux_low_filter_event): If GDB wants to hear about thread exit
2728 events, leave the LWP marked dead and don't delete it.
2729 (linux_wait_for_event_filtered): Don't check for thread exit.
2730 (filter_exit_event): New function.
2731 (linux_wait_1): Use it, when returning an exit event.
2732 (linux_resume_one_lwp_throw): Assert that the LWP's
2733 waitstatus is TARGET_WAITKIND_IGNORE.
2734 * remote-utils.c (prepare_resume_reply): Handle
2735 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2736 * server.c (report_thread_events): New global.
2737 (handle_general_set): Handle QThreadEvents.
2738 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2739 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2740 TARGET_WAITKIND_THREAD_EXITED.
2741 * server.h (report_thread_events): Declare.
2742
2743 2015-11-30 Pedro Alves <palves@redhat.com>
2744
2745 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2746 the thread's last_resume_kind was resume_stop.
2747
2748 2015-11-30 Pedro Alves <palves@redhat.com>
2749
2750 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2751 before returning.
2752
2753 2015-11-30 Pedro Alves <palves@redhat.com>
2754
2755 * server.c (handle_v_requests): Handle vCtrlC.
2756
2757 2015-11-30 Pedro Alves <palves@redhat.com>
2758
2759 * gdbthread.h (find_any_thread_of_pid): Declare.
2760 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2761 functions.
2762 * server.c (handle_query): If current_thread is NULL, look for
2763 another thread of the selected process.
2764
2765 2015-11-26 Daniel Colascione <dancol@dancol.org>
2766 Simon Marchi <simon.marchi@ericsson.com>
2767
2768 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2769 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2770 name in reply.
2771 * target.h (struct target_ops) <thread_name>: New field.
2772 (target_thread_name): New macro.
2773
2774 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2775
2776 * regcache.h (regcache_invalidate_pid): Add declaration.
2777 * regcache.c (regcache_invalidate_pid): New function, extracted
2778 from regcache_invalidate.
2779 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2780 Add trivial documentation comment.
2781 * lynx-low.c: Use regcache_invalidate_pid instead of
2782 regcache_invalidate.
2783
2784 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2785
2786 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2787 and Elf64_auxv_t if the target is Android.
2788
2789 2015-11-22 Doug Evans <xdje42@gmail.com>
2790
2791 * target.h: #include <sys/types.h>.
2792
2793 2015-11-19 Pedro Alves <palves@redhat.com>
2794
2795 * linux-low.c (linux_process_qsupported): Change prototype.
2796 Adjust.
2797 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2798 Change prototype.
2799 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2800 and adjust to loop over all features.
2801 * server.c (handle_query) <qSupported>: Adjust to call
2802 target_process_qsupported once, passing it a vector of unprocessed
2803 features.
2804 * target.h (struct target_ops) <process_qsupported>: Change
2805 prototype.
2806 (target_process_qsupported): Adjust.
2807
2808 2015-11-19 Pedro Alves <palves@redhat.com>
2809
2810 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2811 mode.
2812 * configure: Regenerate.
2813
2814 2015-11-19 Pedro Alves <palves@redhat.com>
2815
2816 * configure: Regenerate.
2817
2818 2015-11-19 Yao Qi <yao.qi@linaro.org>
2819
2820 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2821 type to uint32_t.
2822
2823 2015-11-19 Yao Qi <yao.qi@linaro.org>
2824
2825 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2826 (struct aarch64_operand): Move enum out.
2827
2828 2015-11-19 Yao Qi <yao.qi@linaro.org>
2829
2830 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2831 struct user_fpsimd_state *.
2832 (aarch64_store_fpregset): Likewise.
2833
2834 2015-11-19 Yao Qi <yao.qi@linaro.org>
2835
2836 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2837 struct user_pt_regs *.
2838 (aarch64_store_gregset): Likewise.
2839
2840 2015-11-18 Pedro Alves <palves@redhat.com>
2841
2842 * Makefile.in (all_object_files): Add $IPA_OBJS.
2843
2844 2015-11-17 Pedro Alves <palves@redhat.com>
2845
2846 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2847 GDB_SIGNAL_0 and gdb_signal_to_string.
2848
2849 2015-11-17 Pedro Alves <palves@redhat.com>
2850
2851 * win32-low.c (handle_output_debug_string): Remove parameter.
2852 (win32_kill): Remove our_status local and adjust call to
2853 handle_output_debug_string.
2854 (get_child_debug_event): Adjust call to
2855 handle_output_debug_string.
2856
2857 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2858
2859 * linux-mips-low.c (mips_fill_gregset): Add cast.
2860 (mips_store_gregset): Likewise.
2861 (mips_fill_fpregset): Likewise.
2862 (mips_store_fpregset): Likewise.
2863
2864 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2865
2866 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2867 priv.
2868
2869 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2870
2871 * linux-mips-low.c (mips_linux_new_thread): Change type of
2872 watch_type to enum target_hw_bp_type.
2873
2874 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2875
2876 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2877 Change return type to arm_hwbp_type.
2878
2879 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2880
2881 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2882 (arm_store_gregset): Likewise.
2883 * linux-arm-low.c (arm_get_hwcap): Likewise.
2884 (arm_read_description): Likewise.
2885
2886 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2887
2888 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2889
2890 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2891
2892 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2893 (ppc_fill_vsxregset): Likewise.
2894 (ppc_store_vsxregset): Likewise.
2895 (ppc_fill_vrregset): Likewise.
2896 (ppc_store_vrregset): Likewise.
2897 (ppc_fill_evrregset): Likewise.
2898 (ppc_store_evrregset): Likewise.
2899
2900 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2901
2902 * linux-ppc-low.c (ppc_usrregs_info): Remove
2903 forward-declaration.
2904 (ppc_arch_setup): Move lower in file.
2905
2906 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2907
2908 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2909 (ps_pdwrite): Likewise.
2910
2911 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2912
2913 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2914 to after assert checks.
2915
2916 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2917
2918 * proc-service.c (ps_pdread): Add/adjust casts.
2919 (ps_pdwrite): Add/adjust casts.
2920
2921 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2922
2923 * server.c (handle_search_memory_1): Cast return value of
2924 memmem.
2925
2926 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2927
2928 * server.c (write_qxfer_response): Change type of data to
2929 gdb_byte *.
2930
2931 2015-10-29 Pedro Alves <palves@redhat.com>
2932
2933 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2934
2935 2015-10-29 Pedro Alves <palves@redhat.com>
2936
2937 * tracepoint.c (clear_installed_tracepoints): Add casts.
2938
2939 2015-10-29 Pedro Alves <palves@redhat.com>
2940
2941 * server.c (handle_v_cont, process_serial_event): Add enum
2942 gdb_signal casts to signal parsing code.
2943
2944 2015-10-29 Pedro Alves <palves@redhat.com>
2945
2946 * linux-low.h (NULL_REGSET): Define.
2947 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2948 * linux-arm-low.c (arm_regsets): Likewise.
2949 * linux-crisv32-low.c (cris_regsets): Likewise.
2950 * linux-m68k-low.c (m68k_regsets): Likewise.
2951 * linux-mips-low.c (mips_regsets): Likewise.
2952 * linux-nios2-low.c (nios2_regsets): Likewise.
2953 * linux-ppc-low.c (ppc_regsets): Likewise.
2954 * linux-s390-low.c (s390_regsets): Likewise.
2955 * linux-sh-low.c (sh_regsets): Likewise.
2956 * linux-sparc-low.c (sparc_regsets): Likewise.
2957 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2958 * linux-tile-low.c (tile_regsets): Likewise.
2959 * linux-x86-low.c (x86_regsets): Likewise.
2960 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2961
2962 2015-10-29 Pedro Alves <palves@redhat.com>
2963
2964 * linux-low.h (NULL_REGSET): Define.
2965 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2966 * linux-arm-low.c (arm_regsets): Likewise.
2967 * linux-crisv32-low.c (cris_regsets): Likewise.
2968 * linux-m68k-low.c (m68k_regsets): Likewise.
2969 * linux-mips-low.c (mips_regsets): Likewise.
2970 * linux-nios2-low.c (nios2_regsets): Likewise.
2971 * linux-ppc-low.c (ppc_regsets): Likewise.
2972 * linux-s390-low.c (s390_regsets): Likewise.
2973 * linux-sh-low.c (sh_regsets): Likewise.
2974 * linux-sparc-low.c (sparc_regsets): Likewise.
2975 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2976 * linux-tile-low.c (tile_regsets): Likewise.
2977 * linux-x86-low.c (x86_regsets): Likewise.
2978 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2979
2980 2015-10-26 Doug Evans <dje@google.com>
2981
2982 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2983
2984 2015-10-26 Doug Evans <dje@google.com>
2985
2986 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2987
2988 2015-10-26 Doug Evans <dje@google.com>
2989
2990 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2991 for debug_printf.
2992 (attach_thread, find_new_threads_callback): Ditto.
2993
2994 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2995
2996 * mem-break.h (set_breakpoint_data): Remove.
2997
2998 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2999
3000 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3001 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3002 (initialize_low): Remove set_breakpoint_data call.
3003 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3004 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3005 (initialize_low): Remove set_breakpoint_data call.
3006 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3007 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3008 (initialize_low): Remove set_breakpoint_data call.
3009
3010 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3011
3012 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3013 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3014 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3015 * target.h (target_breakpoint_kind_from_pc): New macro.
3016
3017 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3018
3019 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3020 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3021 the default breakpoint kind.
3022
3023 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3024
3025 * linux-arm-low.c (arm_supports_z_point_type): Add software
3026 breakpoint support.
3027
3028 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3029
3030 * linux-arm-low.c: Refactor breakpoint definitions.
3031 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3032 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3033
3034 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3035
3036 * Makefile.in: Add arm.c/o.
3037 * configure.srv: Likewise.
3038 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3039 (arm_breakpoint_kind_from_pc): New function.
3040 (arm_sw_breakpoint_from_kind): Return proper kind.
3041 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3042
3043 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3044
3045 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3046 removal.
3047 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3048 (struct raw_breakpoint) <size>: Remove.
3049 (struct raw_breakpoint) <kind>: Add.
3050 (bp_size): New function.
3051 (bp_opcode): Likewise.
3052 (find_raw_breakpoint_at): Adjust for kind.
3053 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3054 (remove_memory_breakpoint): Adjust for kind call bp_size.
3055 (set_raw_breakpoint_at): Adjust for kind.
3056 (set_breakpoint): Likewise.
3057 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3058 (delete_raw_breakpoint): Adjust for kind.
3059 (delete_breakpoint): Likewise.
3060 (find_gdb_breakpoint): Likewise.
3061 (set_gdb_breakpoint_1): Likewise.
3062 (set_gdb_breakpoint): Likewise.
3063 (delete_gdb_breakpoint_1): Likewise.
3064 (delete_gdb_breakpoint): Likewise.
3065 (uninsert_raw_breakpoint): Likewise.
3066 (reinsert_raw_breakpoint): Likewise.
3067 (set_breakpoint_data): Remove.
3068 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3069 (check_mem_read): Adjust for kind call bp_size.
3070 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3071 (clone_one_breakpoint): Adjust for kind.
3072 * mem-break.h (set_gdb_breakpoint): Likewise.
3073 (delete_gdb_breakpoint): Likewise.
3074 * server.c (process_serial_event): Likewise.
3075
3076 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3077
3078 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3079 (struct linux_target_ops) <breakpoint>: Remove.
3080 (struct linux_target_ops) <breakpoint_len>: Remove.
3081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3083 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3084 (arm_sw_breakpoint_from_kind): New function.
3085 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3086 (struct linux_target_ops) <breakpoint>: Remove.
3087 (struct linux_target_ops) <breakpoint_len>: Remove.
3088 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3089 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3090 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3091 (struct linux_target_ops) <breakpoint>: Remove.
3092 (struct linux_target_ops) <breakpoint_len>: Remove.
3093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3094 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3095 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3096 (struct linux_target_ops) <breakpoint>: Remove.
3097 (struct linux_target_ops) <breakpoint_len>: Remove.
3098 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3099 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3100 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3101 and sw_breakpoint_from_kind to increment the pc.
3102 (linux_breakpoint_kind_from_pc): New function.
3103 (linux_sw_breakpoint_from_kind): New function.
3104 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3105 (initialize_low): Call breakpoint_kind_from_pc and
3106 sw_breakpoint_from_kind to replace breakpoint_data/len.
3107 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3108 New field.
3109 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3110 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3111 (struct linux_target_ops) <breakpoint>: Remove.
3112 (struct linux_target_ops) <breakpoint_len>: Remove.
3113 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3115 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3116 (struct linux_target_ops) <breakpoint>: Remove.
3117 (struct linux_target_ops) <breakpoint_len>: Remove.
3118 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3119 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3120 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3121 (struct linux_target_ops) <breakpoint>: Remove.
3122 (struct linux_target_ops) <breakpoint_len>: Remove.
3123 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3124 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3125 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3126 (struct linux_target_ops) <breakpoint>: Remove.
3127 (struct linux_target_ops) <breakpoint_len>: Remove.
3128 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3129 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3130 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3131 (struct linux_target_ops) <breakpoint>: Remove.
3132 (struct linux_target_ops) <breakpoint_len>: Remove.
3133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3134 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3135 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3136 (struct linux_target_ops) <breakpoint>: Remove.
3137 (struct linux_target_ops) <breakpoint_len>: Remove.
3138 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3139 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3140 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3141 (struct linux_target_ops) <breakpoint>: Remove.
3142 (struct linux_target_ops) <breakpoint_len>: Remove.
3143 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3144 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3145 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3146 (struct linux_target_ops) <breakpoint>: Remove.
3147 (struct linux_target_ops) <breakpoint_len>: Remove.
3148 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3149 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3150 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3151 (struct linux_target_ops) <breakpoint>: Remove.
3152 (struct linux_target_ops) <breakpoint_len>: Remove.
3153 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3154 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3155 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3156 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3157 (struct linux_target_ops) <breakpoint>: Remove.
3158 (struct linux_target_ops) <breakpoint_len>: Remove.
3159 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3160 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3161 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3162 (struct linux_target_ops) <breakpoint>: Remove.
3163 (struct linux_target_ops) <breakpoint_len>: Remove.
3164 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3165 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3166
3167 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3168
3169 * linux-cris-low.c (cris_get_pc): Remove void arg.
3170
3171 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3172
3173 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3174 variable name.
3175
3176 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3177
3178 * inferiors.c (thread_pid_matches_callback): New function.
3179 (find_thread_process): New function.
3180 (remove_thread): Reset current_thread.
3181 (remove_process): Assert threads have been removed first.
3182
3183 2015-10-15 Yao Qi <yao.qi@linaro.org>
3184
3185 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3186 if it is 3.
3187 (aarch64_remove_point): Likewise.
3188 * regcache.c (regcache_register_size): New function.
3189
3190 2015-10-12 Yao Qi <yao.qi@linaro.org>
3191
3192 * linux-aarch64-low.c: Update all callers as emit_load_store
3193 is renamed to aarch64_emit_load_store.
3194
3195 2015-10-12 Yao Qi <yao.qi@linaro.org>
3196
3197 * linux-aarch64-low.c: Update all callers of function renaming
3198 from emit_insn to aarch64_emit_insn.
3199
3200 2015-10-12 Yao Qi <yao.qi@linaro.org>
3201
3202 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3203 arch/aarch64-insn.h.
3204 (struct aarch64_memory_operand): Likewise.
3205 (ENCODE): Likewise.
3206 (emit_insn): Move to arch/aarch64-insn.c.
3207 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3208 (emit_load_store): Move to arch/aarch64-insn.c.
3209 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3210 (can_encode_int32): Remove.
3211
3212 2015-10-12 Yao Qi <yao.qi@linaro.org>
3213
3214 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3215 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3216 (aarch64_relocate_instruction): Likewise.
3217 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3218 (struct aarch64_insn_visitor): Likewise.
3219
3220 2015-10-12 Yao Qi <yao.qi@linaro.org>
3221
3222 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3223 (struct aarch64_insn_visitor): New.
3224 (struct aarch64_insn_relocation_data): New.
3225 (aarch64_ftrace_insn_reloc_b): New function.
3226 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3227 (aarch64_ftrace_insn_reloc_cb): Likewise.
3228 (aarch64_ftrace_insn_reloc_tb): Likewise.
3229 (aarch64_ftrace_insn_reloc_adr): Likewise.
3230 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3231 (aarch64_ftrace_insn_reloc_others): Likewise.
3232 (visitor): New.
3233 (aarch64_relocate_instruction): Use visitor.
3234
3235 2015-10-12 Yao Qi <yao.qi@linaro.org>
3236
3237 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3238 int. Add argument buf.
3239 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3240 aarch64_relocate_instruction.
3241
3242 2015-10-12 Yao Qi <yao.qi@linaro.org>
3243
3244 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3245 argument insn. Remove local variable insn. Don't call
3246 target_read_uint32.
3247 (aarch64_install_fast_tracepoint_jump_pad): Call
3248 target_read_uint32.
3249
3250 2015-09-30 Yao Qi <yao.qi@linaro.org>
3251
3252 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3253 (emit_load_store_pair): Likewise.
3254
3255 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3256
3257 * dll.c (match_dll): Add cast(s).
3258 (unloaded_dll): Likewise.
3259 * linux-low.c (second_thread_of_pid_p): Likewise.
3260 (delete_lwp_callback): Likewise.
3261 (count_events_callback): Likewise.
3262 (select_event_lwp_callback): Likewise.
3263 (linux_set_resume_request): Likewise.
3264 * server.c (accumulate_file_name_length): Likewise.
3265 (emit_dll_description): Likewise.
3266 (handle_qxfer_threads_worker): Likewise.
3267 (visit_actioned_threads): Likewise.
3268 * thread-db.c (any_thread_of): Likewise.
3269 * tracepoint.c (same_process_p): Likewise.
3270 (match_blocktype): Likewise.
3271 (build_traceframe_info_xml): Likewise.
3272
3273 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3274
3275 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3276 assignment.
3277 (gdb_unparse_agent_expr): Likewise.
3278 * hostio.c (require_data): Likewise.
3279 (handle_pread): Likewise.
3280 * linux-low.c (disable_regset): Likewise.
3281 (fetch_register): Likewise.
3282 (store_register): Likewise.
3283 (get_dynamic): Likewise.
3284 (linux_qxfer_libraries_svr4): Likewise.
3285 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3286 (set_fast_tracepoint_jump): Likewise.
3287 (uninsert_fast_tracepoint_jumps_at): Likewise.
3288 (reinsert_fast_tracepoint_jumps_at): Likewise.
3289 (validate_inserted_breakpoint): Likewise.
3290 (clone_agent_expr): Likewise.
3291 * regcache.c (init_register_cache): Likewise.
3292 * remote-utils.c (putpkt_binary_1): Likewise.
3293 (decode_M_packet): Likewise.
3294 (decode_X_packet): Likewise.
3295 (look_up_one_symbol): Likewise.
3296 (relocate_instruction): Likewise.
3297 (monitor_output): Likewise.
3298 * server.c (handle_search_memory): Likewise.
3299 (handle_qxfer_exec_file): Likewise.
3300 (handle_qxfer_libraries): Likewise.
3301 (handle_qxfer): Likewise.
3302 (handle_query): Likewise.
3303 (handle_v_cont): Likewise.
3304 (handle_v_run): Likewise.
3305 (captured_main): Likewise.
3306 * target.c (write_inferior_memory): Likewise.
3307 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3308 * tracepoint.c (init_trace_buffer): Likewise.
3309 (add_tracepoint_action): Likewise.
3310 (add_traceframe): Likewise.
3311 (add_traceframe_block): Likewise.
3312 (cmd_qtdpsrc): Likewise.
3313 (cmd_qtdv): Likewise.
3314 (cmd_qtstatus): Likewise.
3315 (response_source): Likewise.
3316 (response_tsv): Likewise.
3317 (cmd_qtnotes): Likewise.
3318 (gdb_collect): Likewise.
3319 (initialize_tracepoint): Likewise.
3320
3321 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3322
3323 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3324 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3325 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3326 <NOP>: New.
3327 (enum aarch64_condition_codes): New enum.
3328 (w0): New static global.
3329 (fp): Likewise.
3330 (lr): Likewise.
3331 (struct aarch64_memory_operand) <type>: New
3332 MEMORY_OPERAND_POSTINDEX type.
3333 (postindex_memory_operand): New helper function.
3334 (emit_ret): New function.
3335 (emit_load_store_pair): New function, factored out of emit_stp
3336 with support for MEMORY_OPERAND_POSTINDEX.
3337 (emit_stp): Rewrite using emit_load_store_pair.
3338 (emit_ldp): New function.
3339 (emit_load_store): Likewise.
3340 (emit_ldr): Mention post-index instruction in comment.
3341 (emit_ldrh): New function.
3342 (emit_ldrb): New function.
3343 (emit_ldrsw): Mention post-index instruction in comment.
3344 (emit_str): Likewise.
3345 (emit_subs): New function.
3346 (emit_cmp): Likewise.
3347 (emit_and): Likewise.
3348 (emit_orr): Likewise.
3349 (emit_orn): Likewise.
3350 (emit_eor): Likewise.
3351 (emit_mvn): Likewise.
3352 (emit_lslv): Likewise.
3353 (emit_lsrv): Likewise.
3354 (emit_asrv): Likewise.
3355 (emit_mul): Likewise.
3356 (emit_sbfm): Likewise.
3357 (emit_sbfx): Likewise.
3358 (emit_ubfm): Likewise.
3359 (emit_ubfx): Likewise.
3360 (emit_csinc): Likewise.
3361 (emit_cset): Likewise.
3362 (emit_nop): Likewise.
3363 (emit_ops_insns): New helper function.
3364 (emit_pop): Likewise.
3365 (emit_push): Likewise.
3366 (aarch64_emit_prologue): New function.
3367 (aarch64_emit_epilogue): Likewise.
3368 (aarch64_emit_add): Likewise.
3369 (aarch64_emit_sub): Likewise.
3370 (aarch64_emit_mul): Likewise.
3371 (aarch64_emit_lsh): Likewise.
3372 (aarch64_emit_rsh_signed): Likewise.
3373 (aarch64_emit_rsh_unsigned): Likewise.
3374 (aarch64_emit_ext): Likewise.
3375 (aarch64_emit_log_not): Likewise.
3376 (aarch64_emit_bit_and): Likewise.
3377 (aarch64_emit_bit_or): Likewise.
3378 (aarch64_emit_bit_xor): Likewise.
3379 (aarch64_emit_bit_not): Likewise.
3380 (aarch64_emit_equal): Likewise.
3381 (aarch64_emit_less_signed): Likewise.
3382 (aarch64_emit_less_unsigned): Likewise.
3383 (aarch64_emit_ref): Likewise.
3384 (aarch64_emit_if_goto): Likewise.
3385 (aarch64_emit_goto): Likewise.
3386 (aarch64_write_goto_address): Likewise.
3387 (aarch64_emit_const): Likewise.
3388 (aarch64_emit_call): Likewise.
3389 (aarch64_emit_reg): Likewise.
3390 (aarch64_emit_pop): Likewise.
3391 (aarch64_emit_stack_flush): Likewise.
3392 (aarch64_emit_zero_ext): Likewise.
3393 (aarch64_emit_swap): Likewise.
3394 (aarch64_emit_stack_adjust): Likewise.
3395 (aarch64_emit_int_call_1): Likewise.
3396 (aarch64_emit_void_call_2): Likewise.
3397 (aarch64_emit_eq_goto): Likewise.
3398 (aarch64_emit_ne_goto): Likewise.
3399 (aarch64_emit_lt_goto): Likewise.
3400 (aarch64_emit_le_goto): Likewise.
3401 (aarch64_emit_gt_goto): Likewise.
3402 (aarch64_emit_ge_got): Likewise.
3403 (aarch64_emit_ops_impl): New static global variable.
3404 (aarch64_emit_ops): New target function, return
3405 &aarch64_emit_ops_impl.
3406 (struct linux_target_ops): Install it.
3407
3408 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3409
3410 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3411 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3412 aarch64-ipa.o.
3413 * linux-aarch64-ipa.c: New file.
3414 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3415 and endian.h.
3416 (aarch64_get_thread_area): New target method.
3417 (extract_signed_bitfield): New helper function.
3418 (aarch64_decode_ldr_literal): New function.
3419 (enum aarch64_opcodes): New enum.
3420 (struct aarch64_register): New struct.
3421 (struct aarch64_operand): New struct.
3422 (x0): New static global.
3423 (x1): Likewise.
3424 (x2): Likewise.
3425 (x3): Likewise.
3426 (x4): Likewise.
3427 (w2): Likewise.
3428 (ip0): Likewise.
3429 (sp): Likewise.
3430 (xzr): Likewise.
3431 (aarch64_register): New helper function.
3432 (register_operand): Likewise.
3433 (immediate_operand): Likewise.
3434 (struct aarch64_memory_operand): New struct.
3435 (offset_memory_operand): New helper function.
3436 (preindex_memory_operand): Likewise.
3437 (enum aarch64_system_control_registers): New enum.
3438 (ENCODE): New macro.
3439 (emit_insn): New helper function.
3440 (emit_b): New function.
3441 (emit_bcond): Likewise.
3442 (emit_cb): Likewise.
3443 (emit_tb): Likewise.
3444 (emit_blr): Likewise.
3445 (emit_stp): Likewise.
3446 (emit_ldp_q_offset): Likewise.
3447 (emit_stp_q_offset): Likewise.
3448 (emit_load_store): Likewise.
3449 (emit_ldr): Likewise.
3450 (emit_ldrsw): Likewise.
3451 (emit_str): Likewise.
3452 (emit_ldaxr): Likewise.
3453 (emit_stxr): Likewise.
3454 (emit_stlr): Likewise.
3455 (emit_data_processing_reg): Likewise.
3456 (emit_data_processing): Likewise.
3457 (emit_add): Likewise.
3458 (emit_sub): Likewise.
3459 (emit_mov): Likewise.
3460 (emit_movk): Likewise.
3461 (emit_mov_addr): Likewise.
3462 (emit_mrs): Likewise.
3463 (emit_msr): Likewise.
3464 (emit_sevl): Likewise.
3465 (emit_wfe): Likewise.
3466 (append_insns): Likewise.
3467 (can_encode_int32_in): New helper function.
3468 (aarch64_relocate_instruction): New function.
3469 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3470 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3471 (struct linux_target_ops): Install aarch64_get_thread_area,
3472 aarch64_install_fast_tracepoint_jump_pad and
3473 aarch64_get_min_fast_tracepoint_insn_len.
3474
3475 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3476
3477 * Makefile.in (aarch64-insn.o): New rule.
3478 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3479
3480 2015-09-21 Yao Qi <yao.qi@linaro.org>
3481
3482 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3483
3484 2015-09-21 Yao Qi <yao.qi@linaro.org>
3485
3486 * tracepoint.c (max_jump_pad_size): Remove.
3487
3488 2015-09-18 Yao Qi <yao.qi@linaro.org>
3489
3490 * linux-aarch64-low.c: Don't include sys/uio.h.
3491 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3492
3493 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3494
3495 * tracepoint.c (eval_result_type): Change prototype.
3496 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3497
3498 2015-09-15 Pedro Alves <palves@redhat.com>
3499
3500 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3501 Check whether to report exec events instead of checking whether
3502 multiprocess is enabled.
3503
3504 2015-09-15 Pedro Alves <palves@redhat.com>
3505
3506 PR remote/18965
3507 * remote-utils.c (prepare_resume_reply): Merge
3508 TARGET_WAITKIND_VFORK_DONE switch case with the
3509 TARGET_WAITKIND_FORKED case.
3510
3511 2015-09-15 Yao Qi <yao.qi@linaro.org>
3512
3513 * server.c (handle_query): Check string comparison using
3514 "else if" instead of "if".
3515
3516 2015-09-15 Yao Qi <yao.qi@linaro.org>
3517
3518 * server.c (vCont_supported): New global variable.
3519 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3520 matches. Append ";vContSupported+" to own_buf.
3521 (handle_v_requests): Append ";s;S" to own_buf if target supports
3522 hardware single step or vCont_supported is false.
3523 (capture_main): Set vCont_supported to zero.
3524
3525 2015-09-15 Yao Qi <yao.qi@linaro.org>
3526
3527 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3528 it to ...
3529 (linux_supports_hardware_single_step): ... New function.
3530 (linux_target_ops): Update.
3531 * lynx-low.c (lynx_target_ops): Set field
3532 supports_hardware_single_step to target_can_do_hardware_single_step.
3533 * nto-low.c (nto_target_ops): Likewise.
3534 * spu-low.c (spu_target_ops): Likewise.
3535 * win32-low.c (win32_target_ops): Likewise.
3536 * target.c (target_can_do_hardware_single_step): New function.
3537 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3538 Remove. <supports_hardware_single_step>: New field.
3539 (target_supports_conditional_breakpoints): Remove.
3540 (target_supports_hardware_single_step): New macro.
3541 (target_can_do_hardware_single_step): Declare.
3542 * server.c (handle_query): Use target_supports_hardware_single_step
3543 instead of target_supports_conditional_breakpoints.
3544
3545 2015-09-15 Yao Qi <yao.qi@linaro.org>
3546
3547 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3548 function.
3549 (struct linux_target_ops the_low_target): Install
3550 aarch64_linux_siginfo_fixup.
3551
3552 2015-09-11 Don Breazeal <donb@codesourcery.com>
3553 Luis Machado <lgustavo@codesourcery.com>
3554
3555 * linux-low.c (linux_mourn): Static declaration.
3556 (linux_arch_setup): Move in front of
3557 handle_extended_wait.
3558 (linux_arch_setup_thread): New function.
3559 (handle_extended_wait): Handle exec events. Call
3560 linux_arch_setup_thread. Make event_lwp argument a
3561 pointer-to-a-pointer.
3562 (check_zombie_leaders): Do not check stopped threads.
3563 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3564 (linux_low_filter_event): Add lwp and thread for exec'ing
3565 non-leader thread if leader thread has been deleted.
3566 Refactor code into linux_arch_setup_thread and call it.
3567 Pass child lwp pointer by reference to handle_extended_wait.
3568 (linux_wait_for_event_filtered): Update comment.
3569 (linux_wait_1): Prevent clobbering exec event status.
3570 (linux_supports_exec_events): New function.
3571 (linux_target_ops) <supports_exec_events>: Initialize new member.
3572 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3573 new member.
3574 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3575 * server.c (report_exec_events): New global variable.
3576 (handle_query): Handle qSupported query for exec-events feature.
3577 (captured_main): Initialize report_exec_events.
3578 * server.h (report_exec_events): Declare new global variable.
3579 * target.h (struct target_ops) <supports_exec_events>: New
3580 member.
3581 (target_supports_exec_events): New macro.
3582 * win32-low.c (win32_target_ops) <supports_exec_events>:
3583 Initialize new member.
3584
3585 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3586
3587 * linux-low.c (linux_low_enable_btrace): Remove.
3588 (linux_target_ops): Replace linux_low_enable_btrace with
3589 linux_enable_btrace.
3590
3591 2015-09-03 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-aarch64-low.c (aarch64_insert_point): Call
3594 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3595 returns true.
3596
3597 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3598
3599 * linux-low.c (check_stopped_by_breakpoint): Use
3600 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3601
3602 2015-08-27 Pedro Alves <palves@redhat.com>
3603
3604 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3605
3606 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3607
3608 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3609 the XNEW-family equivalent.
3610 (compile_bytecodes): Likewise.
3611 * dll.c (loaded_dll): Likewise.
3612 * event-loop.c (append_callback_event): Likewise.
3613 (create_file_handler): Likewise.
3614 (create_file_event): Likewise.
3615 * hostio.c (handle_open): Likewise.
3616 * inferiors.c (add_thread): Likewise.
3617 (add_process): Likewise.
3618 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3619 * linux-arm-low.c (arm_new_process): Likewise.
3620 (arm_new_thread): Likewise.
3621 * linux-low.c (add_to_pid_list): Likewise.
3622 (linux_add_process): Likewise.
3623 (handle_extended_wait): Likewise.
3624 (add_lwp): Likewise.
3625 (enqueue_one_deferred_signal): Likewise.
3626 (enqueue_pending_signal): Likewise.
3627 (linux_resume_one_lwp_throw): Likewise.
3628 (linux_resume_one_thread): Likewise.
3629 (linux_read_memory): Likewise.
3630 (linux_write_memory): Likewise.
3631 * linux-mips-low.c (mips_linux_new_process): Likewise.
3632 (mips_linux_new_thread): Likewise.
3633 (mips_add_watchpoint): Likewise.
3634 * linux-x86-low.c (initialize_low_arch): Likewise.
3635 * lynx-low.c (lynx_add_process): Likewise.
3636 * mem-break.c (set_raw_breakpoint_at): Likewise.
3637 (set_breakpoint): Likewise.
3638 (add_condition_to_breakpoint): Likewise.
3639 (add_commands_to_breakpoint): Likewise.
3640 (clone_agent_expr): Likewise.
3641 (clone_one_breakpoint): Likewise.
3642 * regcache.c (new_register_cache): Likewise.
3643 * remote-utils.c (look_up_one_symbol): Likewise.
3644 * server.c (queue_stop_reply): Likewise.
3645 (start_inferior): Likewise.
3646 (queue_stop_reply_callback): Likewise.
3647 (handle_target_event): Likewise.
3648 * spu-low.c (fetch_ppc_memory): Likewise.
3649 (store_ppc_memory): Likewise.
3650 * target.c (set_target_ops): Likewise.
3651 * thread-db.c (thread_db_load_search): Likewise.
3652 (try_thread_db_load_1): Likewise.
3653 * tracepoint.c (add_tracepoint): Likewise.
3654 (add_tracepoint_action): Likewise.
3655 (create_trace_state_variable): Likewise.
3656 (cmd_qtdpsrc): Likewise.
3657 (cmd_qtro): Likewise.
3658 (add_while_stepping_state): Likewise.
3659 * win32-low.c (child_add_thread): Likewise.
3660 (get_image_name): Likewise.
3661
3662 2015-08-25 Yao Qi <yao.qi@linaro.org>
3663
3664 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3665
3666 2015-08-25 Yao Qi <yao.qi@linaro.org>
3667
3668 * Makefile.in (aarch64-linux.o): New rule.
3669 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3670 srv_tgtobj.
3671 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3672 (aarch64_init_debug_reg_state): Make it extern.
3673 (aarch64_linux_prepare_to_resume): Remove.
3674
3675 2015-08-25 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3678 lwp_arch_private_info and ptid_of_lwp.
3679
3680 2015-08-25 Yao Qi <yao.qi@linaro.org>
3681
3682 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3683 Find proc_info by find_process_pid. All callers updated.
3684
3685 2015-08-25 Yao Qi <yao.qi@linaro.org>
3686
3687 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3688 Remove.
3689 (debug_reg_change_callback): Remove.
3690 (aarch64_notify_debug_reg_change): Remove.
3691
3692 2015-08-25 Yao Qi <yao.qi@linaro.org>
3693
3694 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3695 Call current_lwp_ptid.
3696
3697 2015-08-25 Yao Qi <yao.qi@linaro.org>
3698
3699 * linux-aarch64-low.c (debug_reg_change_callback): Use
3700 debug_printf.
3701
3702 2015-08-25 Yao Qi <yao.qi@linaro.org>
3703
3704 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3705
3706 2015-08-25 Yao Qi <yao.qi@linaro.org>
3707
3708 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3709
3710 2015-08-25 Yao Qi <yao.qi@linaro.org>
3711
3712 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3713 the code.
3714
3715 2015-08-25 Yao Qi <yao.qi@linaro.org>
3716
3717 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3718 Remove.
3719 (debug_reg_change_callback): Remove argument entry and add argument
3720 lwp. Remove local variable thread. Don't print thread id in the
3721 debugging output. Don't check whether pid of thread equals to pid.
3722 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3723 iterate_over_lwps instead find_inferior.
3724
3725 2015-08-24 Pedro Alves <palves@redhat.com>
3726
3727 * inferiors.c (get_first_process): New function.
3728 * inferiors.h (get_first_process): New declaration.
3729 * remote-utils.c (read_ptid): Default to the first process in the
3730 list, instead of to the current thread's process.
3731
3732 2015-08-24 Pedro Alves <palves@redhat.com>
3733
3734 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3735 * event-loop.c: Likewise.
3736 * remote-utils.c: Likewise.
3737 * tracepoint.c: Likewise.
3738
3739 2015-08-24 Pedro Alves <palves@redhat.com>
3740
3741 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3742 ptid_get_lwp.
3743
3744 2015-08-21 Pedro Alves <palves@redhat.com>
3745
3746 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3747 instead of literal 1.
3748
3749 2015-08-21 Pedro Alves <palves@redhat.com>
3750
3751 * tdesc.c (default_description): Explicitly zero-initialize.
3752
3753 2015-08-21 Pedro Alves <palves@redhat.com>
3754
3755 PR gdb/18749
3756 * inferiors.c (remove_thread): Discard any pending stop reply for
3757 this thread.
3758 * server.c (remove_all_on_match_pid): Rename to ...
3759 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3760 instead of a pid.
3761 (discard_queued_stop_replies): Change parameter to a ptid. Now
3762 extern.
3763 (handle_v_kill, kill_inferior_callback, captured_main)
3764 (process_serial_event): Adjust.
3765 * server.h (discard_queued_stop_replies): Declare.
3766
3767 2015-08-21 Pedro Alves <palves@redhat.com>
3768
3769 * linux-low.c (wait_for_sigstop): Always switch to no thread
3770 selected if the previously current thread dies.
3771 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3772 process instead of the current thread's.
3773 * remote-utils.c (input_interrupt): Don't check if there's no
3774 current thread.
3775 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3776 current thread to the general thread fails, error out.
3777 (handle_qxfer_auxv, handle_qxfer_libraries)
3778 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3779 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3780 (handle_query): Check if there's a thread selected instead of
3781 checking whether there's any thread in the thread list.
3782 (handle_qxfer_threads, handle_qxfer_btrace)
3783 (handle_qxfer_btrace_conf): Don't error out early if there's no
3784 thread in the thread list.
3785 (handle_v_cont, myresume): Don't set the current thread to the
3786 continue thread.
3787 (process_serial_event) <Hg handling>: Also set thread_id if the
3788 previous general thread is still alive.
3789 (process_serial_event) <g/G handling>: If setting the current
3790 thread to the general thread fails, error out.
3791 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3792 thread's lwp instead of the current thread's.
3793 * target.c (set_desired_thread): If the desired thread was not
3794 found, leave the current thread pointing to NULL. Return an int
3795 (boolean) indicating success.
3796 * target.h (set_desired_thread): Change return type to int.
3797
3798 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3799
3800 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3801 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3802 #includes.
3803 (ps_get_thread_area): New function.
3804
3805 2015-08-19 Gary Benson <gbenson@redhat.com>
3806
3807 * hostio.c (handle_pread): Do not attempt to read more data
3808 than hostio_reply_with_data can fit in a packet.
3809
3810 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3811
3812 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3813
3814 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3815
3816 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3817
3818 2015-08-06 Pedro Alves <palves@redhat.com>
3819
3820 * tracepoint.c (expr_eval_result): Now an int.
3821
3822 2015-08-06 Pedro Alves <palves@redhat.com>
3823
3824 * gdbthread.h (struct regcache): Forward declare.
3825 (struct thread_info) <regcache_data>: Now a struct regcache
3826 pointer.
3827 * inferiors.c (inferior_regcache_data)
3828 (set_inferior_regcache_data): Now work with struct regcache
3829 pointers.
3830 * inferiors.h (struct regcache): Forward declare.
3831 (inferior_regcache_data, set_inferior_regcache_data): Now work
3832 with struct regcache pointers.
3833 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3834 (free_register_cache_thread): Remove struct regcache pointer
3835 casts.
3836
3837 2015-08-06 Pedro Alves <palves@redhat.com>
3838
3839 * server.c (captured_main): On error, print the exception message
3840 to stderr, and if run_once is set, throw a quit.
3841
3842 2015-08-06 Pedro Alves <palves@redhat.com>
3843
3844 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3845 the current thread.
3846
3847 2015-08-06 Pedro Alves <palves@redhat.com>
3848
3849 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3850 reading beyond the passed in buffer length.
3851
3852 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3853
3854 * tracepoint.c (symbol_list) <required>: Remove.
3855
3856 2015-08-06 Pedro Alves <palves@redhat.com>
3857
3858 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3859 count if stopping and suspending threads.
3860 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3861 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3862 (linux_detach): Complete an ongoing step-over.
3863 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3864 throughout.
3865 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3866 (linux_wait_1): If passing a signal to the inferior after
3867 finishing a step-over, unsuspend and re-resume all lwps. If we
3868 see a single-step event but the thread should be continuing, don't
3869 pass the trap to gdb.
3870 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3871 internal_error instead of gdb_assert.
3872 (enqueue_pending_signal): New function.
3873 (check_ptrace_stopped_lwp_gone): Add debug output.
3874 (start_step_over): Use internal_error instead of gdb_assert.
3875 (complete_ongoing_step_over): New function.
3876 (linux_resume_one_thread): Don't resume a suspended thread.
3877 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3878 it stepping.
3879
3880 2015-08-06 Pedro Alves <palves@redhat.com>
3881
3882 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3883 (linux_thread_alive): Use lwp_is_marked_dead.
3884 (extended_event_reported): Delete.
3885 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3886 instead of extended_event_reported.
3887 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3888 as well.
3889 (lwp_is_marked_dead): New function.
3890 (lwp_running): Use lwp_is_marked_dead.
3891 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3892 comment.
3893
3894 2015-08-06 Pedro Alves <palves@redhat.com>
3895
3896 * linux-low.c (linux_wait_1): Move fork event output out of the
3897 !report_to_gdb check. Pass event_child->waitstatus to
3898 target_waitstatus_to_string instead of ourstatus.
3899
3900 2015-08-04 Yao Qi <yao.qi@linaro.org>
3901
3902 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3903 if current_thread is 32 bit.
3904
3905 2015-08-04 Yao Qi <yao.qi@linaro.org>
3906
3907 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3908 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3909 * server.c (extended_protocol): Remove "static".
3910 * server.h (extended_protocol): Declare it.
3911
3912 2015-08-04 Yao Qi <yao.qi@linaro.org>
3913
3914 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3915 both aarch64 and aarch32.
3916 (aarch64_set_pc): Likewise.
3917
3918 2015-08-04 Yao Qi <yao.qi@linaro.org>
3919
3920 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3921 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3922 arm-with-neon.xml to srv_xmlfiles.
3923 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3924 (is_64bit_tdesc): New function.
3925 (aarch64_linux_read_description): New function.
3926 (aarch64_arch_setup): Call aarch64_linux_read_description.
3927 (regs_info): Rename to regs_info_aarch64.
3928 (aarch64_regs_info): Return right regs_info.
3929 (initialize_low_arch): Call initialize_low_arch_aarch32.
3930
3931 2015-08-04 Yao Qi <yao.qi@linaro.org>
3932
3933 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3934 * linux-aarch32-low.c: New file.
3935 * linux-aarch32-low.h: New file.
3936 * linux-arm-low.c (arm_fill_gregset): Move it to
3937 linux-aarch32-low.c.
3938 (arm_store_gregset): Likewise.
3939 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3940 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3941 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3942 (regs_info): Rename to regs_info_arm.
3943 (arm_regs_info): Return regs_info_aarch32 if
3944 have_ptrace_getregset is 1 and target description is
3945 arm_with_neon or arm_with_vfpv3.
3946 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3947 Call initialize_low_arch_aarch32 instead.
3948
3949 2015-08-04 Yao Qi <yao.qi@linaro.org>
3950
3951 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3952 * linux-low.c: ... here.
3953 * linux-low.h (have_ptrace_getregset): Declare it.
3954
3955 2015-08-04 Pedro Alves <palves@redhat.com>
3956
3957 * thread-db.c (struct thread_db): Use new typedefs.
3958 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3959 CHK calls.
3960 (disable_thread_event_reporting): Cast result of dlsym to
3961 destination function pointer type.
3962 (thread_db_mourn): Use td_ta_delete_ftype.
3963
3964 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3965
3966 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3967 arch variant.
3968 (CDX_BREAKPOINT): Define for R2.
3969 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3970 (the_low_target): Add comments.
3971
3972 2015-07-30 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-arm-low.c (arm_hwcap): Remove it.
3975 (arm_read_description): New local variable arm_hwcap. Don't
3976 set arm_hwcap to zero.
3977
3978 2015-07-30 Yao Qi <yao.qi@linaro.org>
3979
3980 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3981 Use regcache->tdesc instead.
3982 (arm_store_wmmxregset): Likewise.
3983 (arm_fill_vfpregset): Likewise.
3984 (arm_store_vfpregset): Likewise.
3985
3986 2015-07-30 Yao Qi <yao.qi@linaro.org>
3987
3988 * linux-arm-low.c: Include arch/arm.h.
3989 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3990 (arm_store_gregset): Likewise.
3991
3992 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3993
3994 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3995 ptrace's 4th parameter.
3996
3997 2015-07-27 Yao Qi <yao.qi@linaro.org>
3998
3999 * configure.srv (case aarch64*-*-linux*): Don't set
4000 srv_linux_usrregs.
4001
4002 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4003
4004 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4005 sys/ptrace.h.
4006 * linux-arm-low.c: Likewise.
4007 * linux-cris-low.c: Likewise.
4008 * linux-crisv32-low.c: Likewise.
4009 * linux-low.c: Likewise.
4010 * linux-m68k-low.c: Likewise.
4011 * linux-mips-low.c: Likewise.
4012 * linux-nios2-low.c: Likewise.
4013 * linux-s390-low.c: Likewise.
4014 * linux-sparc-low.c: Likewise.
4015 * linux-tic6x-low.c: Likewise.
4016 * linux-tile-low.c: Likewise.
4017 * linux-x86-low.c: Likewise.
4018
4019 2015-07-24 Pedro Alves <palves@redhat.com>
4020
4021 * config.in: Regenerate.
4022 * configure: Regenerate.
4023
4024 2015-07-24 Pedro Alves <palves@redhat.com>
4025
4026 * acinclude.m4: Include ../ptrace.m4.
4027 * configure.ac: Call GDB_AC_PTRACE.
4028 * config.in, configure: Regenerate.
4029
4030 2015-07-24 Yao Qi <yao.qi@linaro.org>
4031
4032 * linux-low.c (linux_create_inferior): Remove setting to
4033 proc->priv->new_inferior.
4034 (linux_attach): Likewise.
4035 (linux_low_filter_event): Likewise.
4036 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4037
4038 2015-07-24 Yao Qi <yao.qi@linaro.org>
4039
4040 * linux-low.c (linux_arch_setup): New function.
4041 (linux_low_filter_event): If proc->tdesc is NULL and
4042 proc->attached is true, call the_low_target.arch_setup.
4043 Otherwise, keep status pending, and return.
4044 (linux_resume_one_lwp_throw): Don't call get_pc if
4045 thread->while_stepping isn't NULL. Don't call
4046 get_thread_regcache if proc->tdesc is NULL.
4047 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4048 (linux_target_ops): Install arch_setup.
4049 * server.c (start_inferior): Call the_target->arch_setup.
4050 * target.h (struct target_ops) <arch_setup>: New field.
4051 (target_arch_setup): New marco.
4052 * lynx-low.c (lynx_target_ops): Update.
4053 * nto-low.c (nto_target_ops): Update.
4054 * spu-low.c (spu_target_ops): Update.
4055 * win32-low.c (win32_target_ops): Update.
4056
4057 2015-07-24 Yao Qi <yao.qi@linaro.org>
4058
4059 * linux-low.c (linux_add_process): Don't set
4060 proc->priv->new_inferior.
4061 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4062 (linux_attach): Likewise.
4063
4064 2015-07-24 Yao Qi <yao.qi@linaro.org>
4065
4066 * server.c (start_inferior): Code refactor.
4067
4068 2015-07-24 Yao Qi <yao.qi@linaro.org>
4069
4070 * server.c (process_serial_event): Set general_thread.
4071
4072 2015-07-21 Yao Qi <yao.qi@linaro.org>
4073
4074 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4075 aarch64_linux_get_debug_reg_capacity.
4076
4077 2015-07-17 Yao Qi <yao.qi@linaro.org>
4078
4079 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4080 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4081 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4082 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4083 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4084 (AARCH64_HWP_ALIGNMENT): Likewise.
4085 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4086 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4087 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4088 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4089 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4090 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4091 (struct aarch64_debug_reg_state): Likewise.
4092 (struct arch_lwp_info): Likewise.
4093 (aarch64_align_watchpoint): Likewise.
4094 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4095 (aarch64_watchpoint_length): Likewise.
4096 (aarch64_point_encode_ctrl_reg): Likewise
4097 (aarch64_point_is_aligned): Likewise.
4098 (aarch64_align_watchpoint): Likewise.
4099 (aarch64_linux_set_debug_regs):
4100 (aarch64_dr_state_insert_one_point): Likewise.
4101 (aarch64_dr_state_remove_one_point): Likewise.
4102 (aarch64_handle_breakpoint): Likewise.
4103 (aarch64_handle_aligned_watchpoint): Likewise.
4104 (aarch64_handle_unaligned_watchpoint): Likewise.
4105 (aarch64_handle_watchpoint): Likewise.
4106
4107 2015-07-17 Yao Qi <yao.qi@linaro.org>
4108
4109 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4110 and don't aarch64_get_debug_reg_state. All callers update.
4111 (aarch64_handle_aligned_watchpoint): Likewise.
4112 (aarch64_handle_unaligned_watchpoint): Likewise.
4113 (aarch64_handle_watchpoint): Likewise.
4114 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4115 (aarch64_remove_point): Likewise.
4116
4117 2015-07-17 Yao Qi <yao.qi@linaro.org>
4118
4119 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4120 debug_printf.
4121 (aarch64_handle_unaligned_watchpoint): Likewise.
4122
4123 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4124
4125 Revert the previous 3 commits:
4126 Move gdb_regex* to common/
4127 Move linux_find_memory_regions_full & co.
4128 gdbserver build-id attribute generator
4129
4130 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4131 Jan Kratochvil <jan.kratochvil@redhat.com>
4132
4133 gdbserver build-id attribute generator.
4134 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4135 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4136 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4137 (find_phdr): New.
4138 (get_dynamic): Use find_pdhr to traverse program headers.
4139 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4140 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4141 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4142 (get_hex_build_id): New.
4143 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4144 to reply XML document.
4145
4146 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4147 Jan Kratochvil <jan.kratochvil@redhat.com>
4148
4149 * target.c: Include target/target-utils.h and fcntl.h.
4150 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4151 (target_fileio_read_stralloc): New functions.
4152
4153 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4154
4155 * Makefile.in (OBS): Add gdb_regex.o.
4156 (gdb_regex.o): New.
4157 * config.in: Rebuilt.
4158 * configure: Rebuilt.
4159
4160 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4161 Jan Kratochvil <jan.kratochvil@redhat.com>
4162
4163 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4164 * Makefile.in (OBS): Add target-utils.o.
4165 (linux-maps.o, target-utils.o): New.
4166 * configure.srv (srv_linux_obj): Add linux-maps.o.
4167
4168 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4169
4170 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4171 function, return 1.
4172 (the_low_target): Install it.
4173
4174 2015-07-14 Pedro Alves <palves@redhat.com>
4175
4176 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4177 Instead, ignore ECHILD, and throw an error for other errnos.
4178
4179 2015-07-10 Pedro Alves <palves@redhat.com>
4180
4181 * event-loop.c (struct callback_event) <data>: Change type to
4182 gdb_client_data instance instead of gdb_client_data pointer.
4183 (append_callback_event): Adjust.
4184
4185 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4186
4187 * linux-aarch64-low.c: Add comments for each linux_target_ops
4188 method. Remove comments already covered in target_ops and
4189 linux_target_ops definitions.
4190 (the_low_target): Add comments for each unimplemented method.
4191
4192 2015-07-09 Yao Qi <yao.qi@linaro.org>
4193
4194 * linux-aarch64-low.c (aarch64_regmap): Remove.
4195 (aarch64_usrregs_info): Remove.
4196 (regs_info): Set field usrregs to NULL.
4197
4198 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4199
4200 * linux-low.c: Include "rsp-low.h"
4201 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4202 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4203 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4204 (handle_btrace_enable_pt): New.
4205 (handle_btrace_general_set): Support "pt".
4206 (handle_btrace_conf_general_set): Support "pt:size".
4207
4208 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4209
4210 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4211 Z_PACKET_SW_BP.
4212
4213 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4214
4215 * linux-aarch64-low.c: Remove comment about endianness.
4216 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4217 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4218 memcmp.
4219
4220 2015-06-24 Gary Benson <gbenson@redhat.com>
4221
4222 * linux-i386-ipa.c (stdint.h): Do not include.
4223 * lynx-i386-low.c (stdint.h): Likewise.
4224 * lynx-ppc-low.c (stdint.h): Likewise.
4225 * mem-break.c (stdint.h): Likewise.
4226 * thread-db.c (stdint.h): Likewise.
4227 * tracepoint.c (stdint.h): Likewise.
4228 * win32-low.c (stdint.h): Likewise.
4229
4230 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4231
4232 * server.c (write_qxfer_response): Update call to
4233 remote_escape_output.
4234
4235 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4236 Jan Kratochvil <jan.kratochvil@redhat.com>
4237
4238 Merge multiple hex conversions.
4239 * gdbreplay.c (tohex): Rename to 'fromhex'.
4240 (logchar): Use fromhex.
4241
4242 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4243
4244 * server.c (handle_qxfer_libraries): Set `version' attribute for
4245 <library-list>.
4246
4247 2015-06-10 Gary Benson <gbenson@redhat.com>
4248
4249 * target.h (struct target_ops) <multifs_open>: New field.
4250 <multifs_unlink>: Likewise.
4251 <multifs_readlink>: Likewise.
4252 * linux-low.c (nat/linux-namespaces.h): New include.
4253 (linux_target_ops): Initialize the_target->multifs_open,
4254 the_target->multifs_unlink and the_target->multifs_readlink.
4255 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4256 * hostio.c (hostio_fs_pid): New static variable.
4257 (hostio_handle_new_gdb_connection): New function.
4258 (handle_setfs): Likewise.
4259 (handle_open): Use the_target->multifs_open as appropriate.
4260 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4261 (handle_readlink): Use the_target->multifs_readlink as
4262 appropriate.
4263 (handle_vFile): Handle vFile:setfs packets.
4264 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4265 after target_handle_new_gdb_connection.
4266
4267 2015-06-10 Gary Benson <gbenson@redhat.com>
4268
4269 * configure.ac (AC_CHECK_FUNCS): Add setns.
4270 * config.in: Regenerate.
4271 * configure: Likewise.
4272 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4273 (linux-namespaces.o): New rule.
4274 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4275
4276 2015-06-09 Gary Benson <gbenson@redhat.com>
4277
4278 * hostio.c (handle_open): Process mode argument with
4279 fileio_to_host_mode.
4280
4281 2015-06-01 Yao Qi <yao.qi@linaro.org>
4282
4283 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4284 * linux-x86-low.c: Likewise.
4285
4286 2015-05-28 Don Breazeal <donb@codesourcery.com>
4287
4288 * linux-low.c (handle_extended_wait): Initialize
4289 thread_info.last_resume_kind for new fork children.
4290
4291 2015-05-15 Pedro Alves <palves@redhat.com>
4292
4293 * target.h (target_handle_new_gdb_connection): Rewrite using if
4294 wrapped in do/while.
4295
4296 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4297
4298 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4299 * configure, config.in: Regenerate.
4300 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4301 Declare typedef.
4302
4303 2015-05-12 Don Breazeal <donb@codesourcery.com>
4304
4305 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4306 PTRACE_EVENT_VFORK_DONE.
4307 (linux_low_ptrace_options, extended_event_reported): Add vfork
4308 events.
4309 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4310 and "vforkdone" for RSP 'T' Stop Reply Packet.
4311 * server.h (report_vfork_events): Declare
4312 global variable.
4313
4314 2015-05-12 Don Breazeal <donb@codesourcery.com>
4315
4316 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4317 (the_low_target) <new_fork>: Initialize new member.
4318 * linux-arm-low.c (arm_new_fork): New function.
4319 (the_low_target) <new_fork>: Initialize new member.
4320 * linux-low.c (handle_extended_wait): Call new target function
4321 new_fork.
4322 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4323 * linux-mips-low.c (mips_add_watchpoint): New function
4324 extracted from mips_insert_point.
4325 (the_low_target) <new_fork>: Initialize new member.
4326 (mips_linux_new_fork): New function.
4327 (mips_insert_point): Call mips_add_watchpoint.
4328 * linux-x86-low.c (x86_linux_new_fork): New function.
4329 (the_low_target) <new_fork>: Initialize new member.
4330
4331 2015-05-12 Don Breazeal <donb@codesourcery.com>
4332
4333 * linux-low.c (handle_extended_wait): Implement return value,
4334 rename argument 'event_child' to 'event_lwp', handle
4335 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4336 (linux_low_ptrace_options): New function.
4337 (linux_low_filter_event): Call linux_low_ptrace_options,
4338 use different argument fo linux_enable_event_reporting,
4339 use return value from handle_extended_wait.
4340 (extended_event_reported): New function.
4341 (linux_wait_1): Call extended_event_reported and set
4342 status to report fork events.
4343 (linux_write_memory): Add pid to debug message.
4344 (reset_lwp_ptrace_options_callback): New function.
4345 (linux_handle_new_gdb_connection): New function.
4346 (linux_target_ops): Initialize new structure member.
4347 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4348 * lynx-low.c: Initialize new structure member.
4349 * remote-utils.c (prepare_resume_reply): Implement stop reason
4350 "fork" for "T" stop message.
4351 * server.c (handle_query): Call handle_new_gdb_connection.
4352 * server.h (report_fork_events): Declare global flag.
4353 * target.h (struct target_ops) <handle_new_gdb_connection>:
4354 New member.
4355 (target_handle_new_gdb_connection): New macro.
4356 * win32-low.c: Initialize new structure member.
4357
4358 2015-05-12 Don Breazeal <donb@codesourcery.com>
4359
4360 * mem-break.c (APPEND_TO_LIST): Define macro.
4361 (clone_agent_expr): New function.
4362 (clone_one_breakpoint): New function.
4363 (clone_all_breakpoints): New function.
4364 * mem-break.h: Declare new functions.
4365
4366 2015-05-12 Don Breazeal <donb@codesourcery.com>
4367
4368 * linux-low.c (linux_supports_fork_events): New function.
4369 (linux_supports_vfork_events): New function.
4370 (linux_target_ops): Initialize new structure members.
4371 (initialize_low): Call linux_check_ptrace_features.
4372 * lynx-low.c (lynx_target_ops): Initialize new structure
4373 members.
4374 * server.c (report_fork_events, report_vfork_events):
4375 New global flags.
4376 (handle_query): Add new features to qSupported packet and
4377 response.
4378 (captured_main): Initialize new global variables.
4379 * target.h (struct target_ops) <supports_fork_events>:
4380 New member.
4381 <supports_vfork_events>: New member.
4382 (target_supports_fork_events): New macro.
4383 (target_supports_vfork_events): New macro.
4384 * win32-low.c (win32_target_ops): Initialize new structure
4385 members.
4386
4387 2015-05-12 Gary Benson <gbenson@redhat.com>
4388
4389 * server.c (handle_qxfer_exec_file): Use current process
4390 if annex is empty.
4391
4392 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4393
4394 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4395 Remove HAVE_PTRACE_GETREGS conditionals.
4396 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4397 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4398
4399 2015-05-08 Yao Qi <yao.qi@linaro.org>
4400
4401 * linux-low.c (linux_supports_conditional_breakpoints): New
4402 function.
4403 (linux_target_ops): Install new target method.
4404 * lynx-low.c (lynx_target_ops): Install NULL hook for
4405 supports_conditional_breakpoints.
4406 * nto-low.c (nto_target_ops): Likewise.
4407 * spu-low.c (spu_target_ops): Likewise.
4408 * win32-low.c (win32_target_ops): Likewise.
4409 * server.c (handle_query): Check
4410 target_supports_conditional_breakpoints.
4411 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4412 New field.
4413 (target_supports_conditional_breakpoints): New macro.
4414
4415 2015-05-06 Pedro Alves <palves@redhat.com>
4416
4417 PR server/18081
4418 * server.c (start_inferior): If the process exits, mourn it.
4419
4420 2015-04-21 Gary Benson <gbenson@redhat.com>
4421
4422 * hostio.c (fileio_open_flags_to_host): Factored out to
4423 fileio_to_host_openflags in common/fileio.c. Single use
4424 updated.
4425
4426 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4427
4428 * linux-xtensa-low.c (xtensa_fill_gregset)
4429 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4430 XCHAL_HAVE_LOOP.
4431
4432 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4433
4434 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4435 (regs_info): Replace usrregs pointer with NULL.
4436
4437 2015-04-17 Gary Benson <gbenson@redhat.com>
4438
4439 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4440 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4441 * server.c (handle_qxfer_exec_file): New function.
4442 (qxfer_packets): Add exec-file entry.
4443 (handle_query): Report qXfer:exec-file:read as supported packet.
4444
4445 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4446
4447 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4448
4449 2015-04-09 Gary Benson <gbenson@redhat.com>
4450
4451 * hostio-errno.c (errno_to_fileio_error): Remove function.
4452 Update caller to use remote_fileio_to_fio_error.
4453
4454 2015-04-09 Yao Qi <yao.qi@linaro.org>
4455
4456 * linux-low.c (linux_insert_point): Call
4457 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4458 (linux_remove_point): Call remove_memory_breakpoint if type is
4459 raw_bkpt_type_sw.
4460 * linux-x86-low.c (x86_insert_point): Don't call
4461 insert_memory_breakpoint.
4462 (x86_remove_point): Don't call remove_memory_breakpoint.
4463
4464 2015-04-01 Pedro Alves <palves@redhat.com>
4465 Cleber Rosa <crosa@redhat.com>
4466
4467 * server.c (gdbserver_usage): Reorganize and extend the usage
4468 message.
4469
4470 2015-03-24 Pedro Alves <palves@redhat.com>
4471
4472 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4473 output. Also dump TRAP_TRACE.
4474 (linux_low_filter_event): In debug output, distinguish a
4475 resume_stop SIGSTOP from a delayed SIGSTOP.
4476
4477 2015-03-24 Gary Benson <gbenson@redhat.com>
4478
4479 * linux-x86-low.c (x86_linux_new_thread): Moved to
4480 nat/x86-linux.c.
4481 (x86_linux_prepare_to_resume): Likewise.
4482
4483 2015-03-24 Gary Benson <gbenson@redhat.com>
4484
4485 * Makefile.in (x86-linux-dregs.o): New rule.
4486 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4487 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4488 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4489 (x86_linux_dr_get): Likewise.
4490 (x86_linux_dr_set): Likewise.
4491 (update_debug_registers_callback): Likewise.
4492 (x86_linux_dr_set_addr): Likewise.
4493 (x86_linux_dr_get_addr): Likewise.
4494 (x86_linux_dr_set_control): Likewise.
4495 (x86_linux_dr_get_control): Likewise.
4496 (x86_linux_dr_get_status): Likewise.
4497 (x86_linux_update_debug_registers): Likewise.
4498
4499 2015-03-24 Gary Benson <gbenson@redhat.com>
4500
4501 * linux-x86-low.c (x86_linux_update_debug_registers):
4502 New function, factored out from...
4503 (x86_linux_prepare_to_resume): ...this.
4504
4505 2015-03-24 Gary Benson <gbenson@redhat.com>
4506
4507 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4508 (x86_linux_dr_set): Likewise.
4509 (update_debug_registers_callback): Likewise.
4510 (x86_linux_dr_set_addr): Likewise.
4511 (x86_linux_dr_get_addr): Likewise.
4512 (x86_linux_dr_set_control): Likewise.
4513 (x86_linux_dr_get_control): Likewise.
4514 (x86_linux_dr_get_status): Likewise.
4515 (x86_linux_prepare_to_resume): Likewise.
4516
4517 2015-03-24 Gary Benson <gbenson@redhat.com>
4518
4519 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4520 Use perror_with_name. Pass string through gettext.
4521 (x86_linux_dr_set): Likewise.
4522
4523 2015-03-24 Gary Benson <gbenson@redhat.com>
4524
4525 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4526 (x86_linux_dr_set_addr): ...this.
4527 (x86_dr_low_get_addr): Rename to...
4528 (x86_linux_dr_get_addr): ...this.
4529 (x86_dr_low_set_control): Rename to...
4530 (x86_linux_dr_set_control): ...this.
4531 (x86_dr_low_get_control): Rename to...
4532 (x86_linux_dr_get_control): ...this.
4533 (x86_dr_low_get_status): Rename to...
4534 (x86_linux_dr_get_status): ...this.
4535 (x86_dr_low): Update with new function names.
4536
4537 2015-03-24 Gary Benson <gbenson@redhat.com>
4538
4539 * Makefile.in (x86-linux.o): New rule.
4540 * configure.srv: Add x86-linux.o to relevant targets.
4541 * linux-low.c (lwp_set_arch_private_info): New function.
4542 (lwp_arch_private_info): Likewise.
4543 * linux-x86-low.c: Include nat/x86-linux.h.
4544 (arch_lwp_info): Removed structure.
4545 (update_debug_registers_callback):
4546 Use lwp_set_debug_registers_changed.
4547 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4548 and lwp_set_debug_registers_changed.
4549 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4550
4551 2015-03-24 Gary Benson <gbenson@redhat.com>
4552
4553 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4554 * linux-arm-low.c (arm_new_thread): Likewise.
4555 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4556 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4557 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4558 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4559
4560 2015-03-24 Gary Benson <gbenson@redhat.com>
4561
4562 * linux-low.c (ptid_of_lwp): New function.
4563 (lwp_is_stopped): Likewise.
4564 (lwp_stop_reason): Likewise.
4565 * linux-x86-low.c (update_debug_registers_callback):
4566 Use lwp_is_stopped.
4567 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4568 lwp_stop_reason.
4569
4570 2015-03-24 Gary Benson <gbenson@redhat.com>
4571
4572 * linux-low.h (linux_stop_lwp): Remove declaration.
4573
4574 2015-03-24 Gary Benson <gbenson@redhat.com>
4575
4576 * linux-low.h: Include nat/linux-nat.h.
4577 * linux-low.c (iterate_over_lwps_args): New structure.
4578 (iterate_over_lwps_filter): New function.
4579 (iterate_over_lwps): Likewise.
4580 * linux-x86-low.c (update_debug_registers_callback):
4581 Update signature to what iterate_over_lwps expects.
4582 Remove PID check that iterate_over_lwps now performs.
4583 (x86_dr_low_set_addr): Use iterate_over_lwps.
4584 (x86_dr_low_set_control): Likewise.
4585
4586 2015-03-24 Gary Benson <gbenson@redhat.com>
4587
4588 * linux-x86-low.c (x86_debug_reg_state): New function.
4589 (x86_linux_prepare_to_resume): Use the above.
4590
4591 2015-03-24 Gary Benson <gbenson@redhat.com>
4592
4593 * linux-low.c (current_lwp_ptid): New function.
4594 * linux-x86-low.c: Include nat/linux-nat.h.
4595 (x86_dr_low_get_addr): Use current_lwp_ptid.
4596 (x86_dr_low_get_control): Likewise.
4597 (x86_dr_low_get_status): Likewise.
4598
4599 2015-03-20 Pedro Alves <palves@redhat.com>
4600
4601 * tracepoint.c (cmd_qtstatus): Make "str" const.
4602
4603 2015-03-20 Pedro Alves <palves@redhat.com>
4604
4605 * server.c (handle_general_set): Make "req_str" const.
4606
4607 2015-03-19 Pedro Alves <palves@redhat.com>
4608
4609 * linux-low.c (linux_resume_one_lwp): Rename to ...
4610 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4611 instead call perror_with_name.
4612 (check_ptrace_stopped_lwp_gone): New function.
4613 (linux_resume_one_lwp): Reimplement as wrapper around
4614 linux_resume_one_lwp_throw that swallows errors if the LWP is
4615 gone.
4616
4617 2015-03-19 Pedro Alves <palves@redhat.com>
4618
4619 * linux-low.c (count_events_callback, select_event_lwp_callback):
4620 No longer check whether the thread has resume_stop as last resume
4621 kind.
4622
4623 2015-03-19 Pedro Alves <palves@redhat.com>
4624
4625 * linux-low.c (count_events_callback, select_event_lwp_callback):
4626 Use the lwp's status_pending_p field, not the thread's.
4627
4628 2015-03-19 Pedro Alves <palves@redhat.com>
4629
4630 * linux-low.c (select_event_lwp_callback): Update comments to
4631 no longer mention SIGTRAP.
4632
4633 2015-03-18 Gary Benson <gbenson@redhat.com>
4634
4635 * server.c (handle_query): Do not report vFile:fstat as supported.
4636
4637 2015-03-11 Gary Benson <gbenson@redhat.com>
4638
4639 * hostio.c (sys/types.h): New include.
4640 (sys/stat.h): Likewise.
4641 (common-remote-fileio.h): Likewise.
4642 (handle_fstat): New function.
4643 (handle_vFile): Handle vFile:fstat packets.
4644
4645 2015-03-11 Gary Benson <gbenson@redhat.com>
4646
4647 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4648 struct stat.st_blocks and struct stat.st_blksize.
4649 * configure: Regenerate.
4650 * config.in: Likewise.
4651 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4652 (OBS): Add common-remote-fileio.o.
4653 (common-remote-fileio.o): New rule.
4654
4655 2015-03-09 Pedro Alves <palves@redhat.com>
4656
4657 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4658 'struct sockaddr' pointer in 'accept' call.
4659
4660 2015-03-09 Pedro Alves <palves@redhat.com>
4661
4662 Revert:
4663 2015-03-07 Pedro Alves <palves@redhat.com>
4664 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4665 or <winsock2.h> here. Instead include "gdb_socket.h".
4666 (remote_open): Use union gdb_sockaddr_u.
4667 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4668 or <winsock2.h> here. Instead include "gdb_socket.h".
4669 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4670 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4671 or <sys/un.h>.
4672 (init_named_socket, gdb_agent_helper_thread): Use union
4673 gdb_sockaddr_u.
4674
4675 2015-03-07 Pedro Alves <palves@redhat.com>
4676
4677 * configure.ac (build_warnings): Move
4678 -Wdeclaration-after-statement to the C-specific set.
4679 * configure: Regenerate.
4680
4681 2015-03-07 Pedro Alves <palves@redhat.com>
4682
4683 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4684 or <winsock2.h> here. Instead include "gdb_socket.h".
4685 (remote_open): Use union gdb_sockaddr_u.
4686 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4687 or <winsock2.h> here. Instead include "gdb_socket.h".
4688 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4689 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4690 or <sys/un.h>.
4691 (init_named_socket, gdb_agent_helper_thread): Use union
4692 gdb_sockaddr_u.
4693
4694 2015-03-07 Pedro Alves <palves@redhat.com>
4695
4696 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4697 instead.
4698
4699 2015-03-06 Yao Qi <yao.qi@linaro.org>
4700
4701 * linux-aarch64-low.c (aarch64_insert_point): Use
4702 show_debug_regs as a boolean.
4703 (aarch64_remove_point): Likewise.
4704
4705 2015-03-05 Pedro Alves <palves@redhat.com>
4706
4707 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4708 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4709 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4710 * nto-low.c (nto_target_ops): Likewise.
4711 * spu-low.c (spu_target_ops): Likewise.
4712 * win32-low.c (win32_target_ops): Likewise.
4713
4714 2015-03-04 Pedro Alves <palves@redhat.com>
4715
4716 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4717 Decide whether a breakpoint triggered based on the SIGTRAP's
4718 siginfo.si_code.
4719 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4720 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4721 (linux_low_filter_event): Check for breakpoints before checking
4722 watchpoints.
4723 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4724 siginfo.si_code.
4725 (linux_stopped_by_sw_breakpoint)
4726 (linux_supports_stopped_by_sw_breakpoint)
4727 (linux_stopped_by_hw_breakpoint)
4728 (linux_supports_stopped_by_hw_breakpoint): New functions.
4729 (linux_target_ops): Install new target methods.
4730
4731 2015-03-04 Pedro Alves <palves@redhat.com>
4732
4733 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4734 * server.c (swbreak_feature, hwbreak_feature): New globals.
4735 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4736 (captured_main): Clear swbreak_feature and hwbreak_feature.
4737 * server.h (swbreak_feature, hwbreak_feature): Declare.
4738 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4739 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4740 supports_stopped_by_hw_breakpoint>: New fields.
4741 (target_supports_stopped_by_sw_breakpoint)
4742 (target_stopped_by_sw_breakpoint)
4743 (target_supports_stopped_by_hw_breakpoint)
4744 (target_stopped_by_hw_breakpoint): Declare.
4745
4746 2015-03-04 Pedro Alves <palves@redhat.com>
4747
4748 enum lwp_stop_reason -> enum target_stop_reason
4749 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4750 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4751 (linux_wait_1, stuck_in_jump_pad_callback)
4752 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4753 (linux_stopped_by_watchpoint):
4754 * linux-low.h (enum lwp_stop_reason): Delete.
4755 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4756 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4757
4758 2015-03-04 Yao Qi <yao.qi@linaro.org>
4759
4760 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4761
4762 2015-03-03 Gary Benson <gbenson@redhat.com>
4763
4764 * hostio.c (handle_vFile): Fix prefix lengths.
4765
4766 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4767
4768 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4769 ptr_bits.
4770
4771 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4772
4773 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4774 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4775 (clean): Add "rm -f" for above C files.
4776 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4777 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4778 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4779 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4780 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4781 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4782 (init_registers_s390x_vx_linux64)
4783 (init_registers_s390x_tevx_linux64)
4784 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4785 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4786 declarations.
4787 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4788 (s390_store_vxrs_high): New functions.
4789 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4790 NT_S390_VXRS_HIGH.
4791 (s390_arch_setup): Add logic for selecting one of the new target
4792 descriptions. Activate the new vector regsets if applicable.
4793 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4794 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4795 and init_registers_s390x_tevx_linux64.
4796
4797 2015-03-01 Pedro Alves <palves@redhat.com>
4798
4799 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4800 parameter.
4801
4802 2015-02-27 Pedro Alves <palves@redhat.com>
4803
4804 * linux-x86-low.c (u_debugreg_offset): New function.
4805 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4806
4807 2015-02-27 Pedro Alves <palves@redhat.com>
4808
4809 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4810 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4811 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4812 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4813 (ps_lsetfpregs, ps_getpid)
4814 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4815 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4816 (ps_lsetxregs, ps_plog): Declare.
4817
4818 2015-02-27 Pedro Alves <palves@redhat.com>
4819
4820 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4821 IP_AGENT_EXPORT_FUNC.
4822 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4823 IP_AGENT_EXPORT_FUNC.
4824 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4825 (IP_AGENT_EXPORT): Delete.
4826 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4827 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4828 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4829 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4830 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4831 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4832 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4833 (traceframe_read_count, traceframe_write_count)
4834 (traceframes_created, trace_state_variables, get_raw_reg)
4835 (get_trace_state_variable_value, set_trace_state_variable_value)
4836 (ust_loaded, helper_thread_id, cmd_buf): Use
4837 IPA_SYM_EXPORTED_NAME.
4838 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4839 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4840 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4841 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4842 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4843 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4844 EXTERN_C_PUSH/EXTERN_C_POP.
4845 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4846 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4847 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4848 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4849 (traceframe_write_count, traceframe_read_count)
4850 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4851 (about_to_request_buffer_space, get_trace_state_variable_value)
4852 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4853 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4854 EXTERN_C_PUSH/EXTERN_C_POP.
4855 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4856 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4857 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4858 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4859 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4860 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4861 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4862 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4863 Define.
4864 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4865 (IP_AGENT_EXPORT_VAR_DECL): Define.
4866 (tracing): Declare.
4867 (gdb_agent_get_raw_reg): Declare.
4868
4869 2015-02-27 Tom Tromey <tromey@redhat.com>
4870 Pedro Alves <palves@redhat.com>
4871
4872 Rename symbols whose names are reserved C++ keywords throughout.
4873
4874 2015-02-27 Pedro Alves <palves@redhat.com>
4875
4876 * Makefile.in (COMPILER): New, get it from autoconf.
4877 (CXX): Get from autoconf instead.
4878 (COMPILE.pre): Use COMPILER.
4879 (CC-LD): Rename to ...
4880 (CC_LD): ... this. Use COMPILER.
4881 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4882 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4883 * acinclude.m4: Include build-with-cxx.m4.
4884 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4885 Disable -Werror by default if building in C++ mode.
4886 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4887 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4888 the C++ compiler. Save/restore CXXFLAGS too.
4889 * configure: Regenerate.
4890
4891 2015-02-27 Pedro Alves <palves@redhat.com>
4892
4893 * acinclude.m4: Include libiberty.m4.
4894 * configure.ac: Call libiberty_INIT.
4895 * config.in, configure: Regenerate.
4896
4897 2015-02-26 Pedro Alves <palves@redhat.com>
4898
4899 * linux-low.c (linux_wait_1): When incrementing the PC past a
4900 program breakpoint always use the_low_target.breakpoint_len as
4901 increment, rather than the maximum between that and
4902 the_low_target.decr_pc_after_break.
4903
4904 2015-02-23 Pedro Alves <palves@redhat.com>
4905
4906 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4907 thread was doing a step-over; always adjust the PC if
4908 we stepped over a permanent breakpoint.
4909 (linux_wait_1): If we stepped over breakpoint that was on top of a
4910 permanent breakpoint, manually advance the PC past it.
4911
4912 2015-02-23 Pedro Alves <palves@redhat.com>
4913
4914 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4915 modes.
4916 (x86_fill_gregset, x86_store_gregset): Use it when handling
4917 $orig_eax.
4918
4919 2015-02-20 Pedro Alves <palves@redhat.com>
4920
4921 * thread-db.c: Include "nat/linux-procfs.h".
4922 (thread_db_init): Skip listing new threads if the kernel supports
4923 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4924
4925 2015-02-20 Pedro Alves <palves@redhat.com>
4926
4927 * linux-low.c (status_pending_p_callback): Use ptid_match.
4928
4929 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4930
4931 PR breakpoints/16812
4932 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4933 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4934 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4935
4936 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4937
4938 PR breakpoints/15956
4939 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4940
4941 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4942
4943 * linux-low.c (linux_low_btrace_conf): Print size.
4944 * server.c (handle_btrace_conf_general_set): New.
4945 (hanle_general_set): Call handle_btrace_conf_general_set.
4946 (handle_query): Report Qbtrace-conf:bts:size as supported.
4947
4948 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4949
4950 * linux-low.c (linux_low_enable_btrace): Update parameters.
4951 (linux_low_btrace_conf): New.
4952 (linux_target_ops)<to_btrace_conf>: Initialize.
4953 * server.c (current_btrace_conf): New.
4954 (handle_btrace_enable): Rename to ...
4955 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4956 to target_enable_btrace. Update comment. Update users.
4957 (handle_qxfer_btrace_conf): New.
4958 (qxfer_packets): Add btrace-conf entry.
4959 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4960 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4961 (target_ops)<read_btrace_conf>: New.
4962 (target_enable_btrace): Update parameters.
4963 (target_read_btrace_conf): New.
4964
4965 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4966
4967 * server.c (handle_btrace_general_set): Remove call to
4968 target_supports_btrace.
4969 (supported_btrace_packets): New.
4970 (handle_query): Call supported_btrace_packets.
4971 * target.h: include btrace-common.h.
4972 (btrace_target_info): Removed.
4973 (supports_btrace, target_supports_btrace): Update parameters.
4974
4975 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4976
4977 * Makefile.in (SFILES): Add common/btrace-common.c.
4978 (OBS): Add common/btrace-common.o.
4979 (btrace-common.o): Add build rules.
4980 * linux-low: Include btrace-common.h.
4981 (linux_low_read_btrace): Use struct btrace_data. Call
4982 btrace_data_init and btrace_data_fini.
4983
4984 2015-02-06 Pedro Alves <palves@redhat.com>
4985
4986 * thread-db.c (find_new_threads_callback): Add debug output.
4987
4988 2015-02-04 Pedro Alves <palves@redhat.com>
4989
4990 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4991 (resume_stopped_resumed_lwps): New function.
4992 (linux_wait_for_event_filtered): Use it.
4993
4994 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4995
4996 * Makefile.in (SFILES): Add linux-personality.c.
4997 (linux-personality.o): New rule.
4998 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4999 list of objects to be built.
5000 * linux-low.c: Include nat/linux-personality.h.
5001 (linux_create_inferior): Remove code to disable address space
5002 randomization (moved to ../nat/linux-personality.c). Create
5003 cleanup to disable address space randomization.
5004
5005 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5006
5007 * Makefile.in (posix-strerror.o): New rule.
5008 (mingw-strerror.o): Likewise.
5009 * configure: Regenerated.
5010 * configure.ac: Source file ../common/common.host. Initialize new
5011 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5012
5013 2015-01-14 Yao Qi <yao@codesourcery.com>
5014
5015 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5016 (ppc-linux.o): New rule.
5017 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5018 * configure.ac: AC_CHECK_FUNCS(getauxval).
5019 * config.in: Re-generated.
5020 * configure: Re-generated.
5021 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5022 ppc64_64bit_inferior_p
5023
5024 2015-01-14 Yao Qi <yao@codesourcery.com>
5025
5026 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5027 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5028 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5029 (PT_ORIG_R3, PT_TRAP): Likewise.
5030 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5031 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5032 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5033
5034 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5035
5036 * i387-fp.c (i387_cache_to_xsave): In look over
5037 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5038 zmmh_low_space field by use of zmmh_high_space.
5039
5040 2015-01-09 Pedro Alves <palves@redhat.com>
5041
5042 * linux-low.c (step_over_bkpt): Move higher up in the file.
5043 (handle_extended_wait): Don't store the stop_pc here.
5044 (get_stop_pc): Adjust comments and rename to ...
5045 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5046 stopped for a software breakpoint or hardware breakpoint.
5047 (thread_still_has_status_pending_p): New function.
5048 (status_pending_p_callback): Use
5049 thread_still_has_status_pending_p. If the event is no longer
5050 interesting, resume the LWP.
5051 (handle_tracepoints): Add assert.
5052 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5053 (wstatus_maybe_breakpoint): New function.
5054 (cancel_breakpoint): Delete function.
5055 (check_stopped_by_watchpoint): New function, factored out from
5056 linux_low_filter_event.
5057 (lp_status_maybe_breakpoint): Delete function.
5058 (linux_low_filter_event): Remove filter_ptid argument.
5059 Leave thread group exits pending here. Store the LWP's stop PC.
5060 Always leave events pending.
5061 (linux_wait_for_event_filtered): Pull all events out of the
5062 kernel, and leave them all pending.
5063 (count_events_callback, select_event_lwp_callback): Consider all
5064 events.
5065 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5066 (select_event_lwp): Only give preference to the stepping LWP in
5067 all-stop mode. Adjust comments.
5068 (ignore_event): New function.
5069 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5070 references to cancel_breakpoints. Adjust to renames. Also give
5071 equal priority to all LWPs that have had events in non-stop mode.
5072 If reporting a software breakpoint event, unadjust the LWP's PC.
5073 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5074 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5075 Adjust.
5076 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5077 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5078 (linux_stopped_by_watchpoint): Adjust.
5079 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5080 * linux-low.h (enum lwp_stop_reason): New.
5081 (struct lwp_info) <stop_pc>: Adjust comment.
5082 <stopped_by_watchpoint>: Delete field.
5083 <stop_reason>: New field.
5084 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5085 * mem-break.c (software_breakpoint_inserted_here)
5086 (hardware_breakpoint_inserted_here): New function.
5087 * mem-break.h (software_breakpoint_inserted_here)
5088 (hardware_breakpoint_inserted_here): Declare.
5089 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5090 (cancel_breakpoints): Delete.
5091 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5092 (upload_fast_traceframes): Remove references to
5093 cancel_breakpoints.
5094
5095 2015-01-09 Pedro Alves <palves@redhat.com>
5096
5097 * thread-db.c (find_new_threads_callback): Ignore thread if the
5098 kernel thread ID is -1.
5099
5100 2015-01-09 Pedro Alves <palves@redhat.com>
5101
5102 * linux-low.c (linux_attach_fail_reason_string): Move to
5103 nat/linux-ptrace.c, and rename.
5104 (linux_attach_lwp): Update comment.
5105 (attach_proc_task_lwp_callback): New function.
5106 (linux_attach): Adjust to rename and use
5107 linux_proc_attach_tgid_threads.
5108 (linux_attach_fail_reason_string): Delete declaration.
5109
5110 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5111
5112 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5113 * server.c (gdbserver_version): Likewise.
5114
5115 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5116
5117 * remote-utils.c: Include ctype.h.
5118 (input_interrupt): Explicitly handle the case when the char
5119 received is the NUL byte. Improve the printing of non-ASCII
5120 characters.
5121
5122 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5123
5124 * linux-low.c (linux_low_filter_event): Update call to
5125 linux_enable_event_reporting following the addition of
5126 a new parameter to that function.
5127
5128 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5129
5130 PR server/17457
5131 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5132 (AARCH64_FPCR_REGNO): Likewise.
5133 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5134 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5135 (aarch64_store_fpregset): Likewise.
5136
5137 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5138
5139 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5140 Remove FIXME comment about assumption about N.
5141
5142 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5143
5144 * configure.ac: If large-file support is disabled in GDBserver,
5145 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5146 * configure: Regenerate.
5147
5148 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5149
5150 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5151 warning upon ENODATA from ptrace.
5152 * linux-s390-low.c (s390_store_tdb): New.
5153 (s390_regsets): Add regset for NT_S390_TDB.
5154
5155 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5156
5157 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5158 without a fill_function.
5159 * linux-s390-low.c (s390_fill_last_break): Remove.
5160 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5161 (s390_arch_setup): Use regset's size instead of fill_function for
5162 loop end condition.
5163
5164 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5165
5166 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5167 the regset's store function when ptrace returned an error.
5168 * regcache.c (get_thread_regcache): Invalidate register cache
5169 before fetching inferior's registers.
5170
5171 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5172
5173 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5174 while-loop as for-loop.
5175 (regsets_store_inferior_registers): Likewise.
5176
5177 2014-11-28 Yao Qi <yao@codesourcery.com>
5178
5179 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5180 * config.in, configure: Re-generate.
5181 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5182 is defined.
5183
5184 2014-11-21 Yao Qi <yao@codesourcery.com>
5185
5186 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5187 (AC_CHECK_HEADERS): Remove malloc.h.
5188 * configure: Re-generated.
5189 * config.in: Re-generated.
5190 * server.h: Don't include alloca.h and malloc.h.
5191 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5192 Don't include malloc.h.
5193
5194 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5195
5196 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5197 corresponding ERRNO check in same block.
5198
5199 2014-11-12 Pedro Alves <palves@redhat.com>
5200
5201 * server.c (cont_thread): Update comment.
5202 (start_inferior, attach_inferior): No longer clear cont_thread.
5203 (handle_v_cont): No longer set cont_thread.
5204 (captured_main): Clear cont_thread each time a GDB connects.
5205
5206 2014-11-12 Pedro Alves <palves@redhat.com>
5207
5208 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5209 thread, and don't resume all threads if the Hc thread has exited.
5210
5211 2014-11-12 Pedro Alves <palves@redhat.com>
5212
5213 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5214 the process group instead of to a specific LWP.
5215
5216 2014-10-15 Pedro Alves <palves@redhat.com>
5217
5218 PR server/17487
5219 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5220 parameter.
5221 (arm_set_thread_context): Delete.
5222 (the_low_target): Adjust.
5223 * win32-i386-low.c (debug_registers_changed)
5224 (debug_registers_used): Delete.
5225 (update_debug_registers_callback): New function.
5226 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5227 needing to update their debug registers.
5228 (win32_get_current_dr): New function.
5229 (x86_dr_low_get_addr, x86_dr_low_get_control)
5230 (x86_dr_low_get_status): Fetch the debug register from the thread
5231 record's context.
5232 (i386_initial_stuff): Adjust.
5233 (i386_get_thread_context): Remove current_event parameter. Don't
5234 clear debug_registers_changed nor copy DR values to
5235 debug_reg_state.
5236 (i386_set_thread_context): Delete.
5237 (i386_prepare_to_resume): New function.
5238 (i386_thread_added): Mark the thread as needing to update irs
5239 debug registers.
5240 (the_low_target): Remove i386_set_thread_context and install
5241 i386_prepare_to_resume.
5242 * win32-low.c (win32_get_thread_context): Adjust.
5243 (win32_set_thread_context): Use SetThreadContext
5244 directly.
5245 (win32_prepare_to_resume): New function.
5246 (win32_require_context): New function, factored out from ...
5247 (thread_rec): ... this.
5248 (continue_one_thread): Call win32_prepare_to_resume on each thread
5249 we're about to continue.
5250 (win32_resume): Call win32_prepare_to_resume on the event thread.
5251 * win32-low.h (struct win32_thread_info)
5252 <debug_registers_changed>: New field.
5253 (struct win32_target_ops): Change prototype of set_thread_context,
5254 delete set_thread_context and add prepare_to_resume.
5255 (win32_require_context): New declaration.
5256
5257 2014-10-08 Gary Benson <gbenson@redhat.com>
5258
5259 * server.h: Do not include common-exceptions.h.
5260
5261 2014-10-08 Gary Benson <gbenson@redhat.com>
5262
5263 * server.h: Do not include cleanups.h.
5264
5265 2014-09-30 James Hogan <james.hogan@imgtec.com>
5266
5267 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5268 mips64-dsp-linux.c.
5269
5270 2014-09-23 Yao Qi <yao@codesourcery.com>
5271
5272 * linux-low.c (lp_status_maybe_breakpoint): New function.
5273 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5274 (count_events_callback): Likewise.
5275 (select_event_lwp_callback): Likewise.
5276 (cancel_breakpoints_callback): Likewise.
5277
5278 2014-09-19 Don Breazeal <donb@codesourcery.com>
5279
5280 * linux-low.c (handle_extended_wait): Call
5281 linux_ptrace_get_extended_event.
5282 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5283 linux_is_extended_waitstatus.
5284
5285 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5286
5287 * Makefile.in (CPPFLAGS): Define.
5288 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5289 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5290
5291 2014-09-16 Gary Benson <gbenson@redhat.com>
5292
5293 * inferiors.h (current_inferior): Renamed as...
5294 (current_thread): New variable. All uses updated.
5295 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5296 (maybe_move_out_of_jump_pad): Likewise.
5297 (cancel_breakpoint): Likewise.
5298 (linux_low_filter_event): Likewise.
5299 (wait_for_sigstop): Likewise.
5300 (linux_resume_one_lwp): Likewise.
5301 (need_step_over_p): Likewise.
5302 (start_step_over): Likewise.
5303 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5304 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5305 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5306 and save_inferior as saved_thread.
5307 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5308 saved_thread.
5309 (regcache_invalidate_thread): Likewise.
5310 * remote-utils.c (prepare_resume_reply): Likewise.
5311 * thread-db.c (thread_db_get_tls_address): Likewise.
5312 (disable_thread_event_reporting): Likewise.
5313 (remove_thread_event_breakpoints): Likewise.
5314 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5315 as saved_thread.
5316 * target.h (set_desired_inferior): Renamed as...
5317 (set_desired_thread): New declaration. All uses updated.
5318 * server.c (myresume): Updated comment to reference thread instead
5319 of inferior.
5320 (handle_serial_event): Likewise.
5321 (handle_target_event): Likewise.
5322
5323 2014-09-12 Tom Tromey <tromey@redhat.com>
5324 Gary Benson <gbenson@redhat.com>
5325
5326 * regcache.h: Include common-regcache.h.
5327 (regcache_read_pc): Don't declare.
5328 * regcache.c (get_thread_regcache_for_ptid): New function.
5329
5330 2014-09-11 Tom Tromey <tromey@redhat.com>
5331 Gary Benson <gbenson@redhat.com>
5332
5333 * symbol.c: New file.
5334 * Makefile.in (SFILES): Add symbol.c.
5335 (OBS): Add symbol.o.
5336
5337 2014-09-11 Gary Benson <gbenson@redhat.com>
5338
5339 * target.c (target_stop_ptid, target_continue_ptid): New
5340 functions.
5341
5342 2014-09-11 Tom Tromey <tromey@redhat.com>
5343 Gary Benson <gbenson@redhat.com>
5344
5345 * target.h: Include target/target.h.
5346 * target.c (target_read_memory, target_read_uint32)
5347 (target_write_memory): New functions.
5348
5349 2014-09-11 Gary Benson <gbenson@redhat.com>
5350
5351 * server.h (debug_hw_points): Don't declare.
5352 * server.c (debug_hw_points): Don't define. Replace all uses
5353 with show_debug_regs.
5354 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5355 all uses with show_debug_regs.
5356
5357 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5358
5359 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5360 endianness into account.
5361 (ppc_supply_ptrace_register): Likewise.
5362
5363 2014-09-03 James Hogan <james.hogan@imgtec.com>
5364
5365 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5366 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5367
5368 2014-09-03 Gary Benson <gbenson@redhat.com>
5369
5370 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5371 ALL_DEBUG_ADDRESS_REGISTERS.
5372
5373 2014-09-02 Gary Benson <gbenson@redhat.com>
5374
5375 * i386-low.h: Renamed as...
5376 * x86-low.h: New file. All type, function and variable name
5377 prefixes changed from "i386_" to "x86_". All references updated.
5378 * i386-low.c: Renamed as...
5379 * x86-low.c: New file. All type, function and variable name
5380 prefixes changed from "i386_" to "x86_". All references updated.
5381
5382 2014-09-02 Gary Benson <gbenson@redhat.com>
5383
5384 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5385 (x86_linux_new_thread): Likewise.
5386
5387 2014-08-29 Gary Benson <gbenson@redhat.com>
5388
5389 * server.h (setjmp.h): Do not include.
5390 (toplevel): Do not declare.
5391 (common-exceptions.h): Include.
5392 (cleanups.h): Likewise.
5393 * server.c (toplevel): Do not define.
5394 (exit_code): New static global.
5395 (detach_or_kill_for_exit_cleanup): New function.
5396 (main): New function. Original main renamed to...
5397 (captured_main): New function.
5398 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5399
5400 2014-08-29 Gary Benson <gbenson@redhat.com>
5401
5402 * Makefile.in (SFILES): Add common/common-exceptions.c.
5403 (OBS): Add common-exceptions.o.
5404 (common-exceptions.o): New rule.
5405 * utils.c (prepare_to_throw_exception): New function.
5406
5407 2014-08-29 Gary Benson <gbenson@redhat.com>
5408
5409 * config.in: Regenerate.
5410 * configure: Likewise.
5411
5412 2014-08-29 Gary Benson <gbenson@redhat.com>
5413
5414 * Makefile.in (SFILES): Add common/cleanups.c.
5415 (OBS): cleanups.o.
5416 (cleanups.o): New rule.
5417
5418 2014-08-29 Gary Benson <gbenson@redhat.com>
5419
5420 * utils.c (internal_vwarning): New function.
5421
5422 2014-08-28 Gary Benson <gbenson@redhat.com>
5423
5424 * utils.h (fatal): Remove declaration.
5425 * utils.c (fatal): Remove function.
5426
5427 2014-08-28 Gary Benson <gbenson@redhat.com>
5428
5429 * tracepoint.c (gdb_agent_init): Replace fatal with
5430 perror_with_name.
5431 (initialize_tracepoint): Likewise.
5432
5433 2014-08-28 Gary Benson <gbenson@redhat.com>
5434
5435 * remote-utils.c (remote_prepare): Replace fatal with error.
5436
5437 2014-08-28 Gary Benson <gbenson@redhat.com>
5438
5439 * linux-low.c (linux_async): Replace fatal with warning.
5440 Tidy up and return.
5441 (linux_start_non_stop): Return -1 if linux_async failed.
5442
5443 2014-08-28 Gary Benson <gbenson@redhat.com>
5444
5445 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5446 gdb_assert.
5447 (i386_dr_low_get_addr): Remove vague comment.
5448 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5449 gdb_assert.
5450
5451 2014-08-28 Gary Benson <gbenson@redhat.com>
5452
5453 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5454 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5455 internal_error.
5456 (linux_resume_one_lwp): Likewise.
5457 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5458 gdb_assert.
5459 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5460 with internal_error.
5461 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5462 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5463 (find_register_by_name): Replace fatal with internal_error.
5464 (find_regno): Likewise.
5465 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5466 * thread-db.c (thread_db_create_event): Likewise.
5467 (thread_db_load_search): Likewise.
5468 (try_thread_db_load_1): Likewise.
5469 * tracepoint.c (get_jump_space_head): Replace fatal with
5470 internal_error.
5471 (claim_trampoline_space): Likewise.
5472 (have_fast_tracepoint_trampoline_buffer): Likewise.
5473 (cmd_qtstart): Likewise.
5474 (stop_tracing): Likewise.
5475 (fast_tracepoint_collecting): Likewise.
5476 (target_malloc): Likewise.
5477 (download_tracepoint): Likewise.
5478 (download_trace_state_variables): Replace check with gdb_assert.
5479 (upload_fast_traceframes): Replace fatal with internal_error.
5480
5481 2014-08-19 Tom Tromey <tromey@redhat.com>
5482 Gary Benson <gbenson@redhat.com>
5483
5484 * Makefile.in (SFILES): Add common/common-debug.c.
5485 (OBS): Add common-debug.o.
5486 (common-debug.o): New rule.
5487 * debug.h (debug_printf): Don't declare.
5488 * debug.c (debug_printf): Renamed and rewritten as...
5489 (debug_vprintf): New function.
5490
5491 2014-08-19 Gary Benson <gbenson@redhat.com>
5492
5493 * utils.h: Do not include print-utils.h.
5494
5495 2014-08-19 Tom Tromey <tromey@redhat.com>
5496 Gary Benson <gbenson@redhat.com>
5497
5498 * server.h: Add static assertion.
5499 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5500
5501 2014-08-19 Tom Tromey <tromey@redhat.com>
5502 Gary Benson <gbenson@redhat.com>
5503
5504 * Makefile.in (SFILES): Add common/errors.c.
5505 (OBS): Add errors.o.
5506 (IPA_OBS): Add errors-ipa.o.
5507 (errors.o): New rule.
5508 (errors-ipa.o): Likewise.
5509 * utils.h (perror_with_name, error, warning): Don't declare.
5510 * utils.c (warning): Renamed and rewritten as...
5511 (vwarning): New function.
5512 (error): Renamed and rewritten as...
5513 (verror): New function.
5514 (internal_error): Renamed and rewritten as...
5515 (internal_verror): New function.
5516
5517 2014-08-07 Gary Benson <gbenson@redhat.com>
5518
5519 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5520 * configure: Regenerate.
5521 * config.in: Likewise.
5522 * server.h: Do not include errno.h.
5523 * event-loop.c: Likewise.
5524 * hostio-errno.c: Likewise.
5525 * linux-low.c: Likewise.
5526 * remote-utils.c: Likewise.
5527 * spu-low.c: Likewise.
5528 * utils.c: Likewise.
5529 * gdbreplay.c: Unconditionally include errno.h.
5530
5531 2014-08-07 Gary Benson <gbenson@redhat.com>
5532
5533 * server.h: Do not include string.h.
5534 * event-loop.c: Likewise.
5535 * linux-low.c: Likewise.
5536 * regcache.c: Likewise.
5537 * remote-utils.c: Likewise.
5538 * spu-low.c: Likewise.
5539 * utils.c: Likewise.
5540
5541 2014-08-07 Gary Benson <gbenson@redhat.com>
5542
5543 * server.h: Do not include gdb_assert.h.
5544
5545 2014-08-07 Gary Benson <gbenson@redhat.com>
5546
5547 * server.h: Do not include common-utils.h.
5548
5549 2014-08-07 Gary Benson <gbenson@redhat.com>
5550
5551 * server.h: Do not include ptid.h.
5552 * notif.h: Likewise.
5553
5554 2014-08-07 Gary Benson <gbenson@redhat.com>
5555
5556 * server.h: Do not include gdb_locale.h.
5557
5558 2014-08-07 Gary Benson <gbenson@redhat.com>
5559
5560 * server.h: Do not include gdb/signals.h.
5561 * win32-low.c: Likewise.
5562
5563 2014-08-07 Gary Benson <gbenson@redhat.com>
5564
5565 * server.h: Do not include pathmax.h.
5566
5567 2014-08-07 Gary Benson <gbenson@redhat.com>
5568
5569 * server.h: Do not include libiberty.h.
5570 * linux-bfin-low.c: Likewise.
5571
5572 2014-08-07 Gary Benson <gbenson@redhat.com>
5573
5574 * server.h: Do not include ansidecl.h.
5575
5576 2014-08-07 Gary Benson <gbenson@redhat.com>
5577
5578 * linux-x86-low.c: Do not include stddef.h.
5579 * lynx-ppc-low.c: Likewise.
5580 * tracepoint.c: Likewise.
5581
5582 2014-08-07 Gary Benson <gbenson@redhat.com>
5583
5584 * server.h: Do not include stdarg.h.
5585 * nto-low.c: Likewise.
5586
5587 2014-08-07 Gary Benson <gbenson@redhat.com>
5588
5589 * server.h: Do not include stdlib.h.
5590 * inferiors.c: Likewise.
5591 * linux-low.c: Likewise.
5592 * regcache.c: Likewise.
5593 * spu-low.c: Likewise.
5594 * tracepoint.c: Likewise.
5595 * utils.c: Likewise.
5596
5597 2014-08-07 Gary Benson <gbenson@redhat.com>
5598
5599 * server.h: Do not include stdio.h.
5600 * linux-low.c: Likewise.
5601 * remote-utils.c: Likewise.
5602 * spu-low.c: Likewise.
5603 * utils.c: Likewise.
5604 * wincecompat.c: Likewise.
5605
5606 2014-08-06 Gary Benson <gbenson@redhat.com>
5607
5608 * regcache.c (init_register_cache): Move conditionals inside if.
5609
5610 2014-08-06 Gary Benson <gbenson@redhat.com>
5611
5612 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5613
5614 2014-07-31 Gary Benson <gbenson@redhat.com>
5615
5616 * ax.h: Do not include server.h.
5617 * gdbthread.h: Likewise.
5618 * lynx-low.h: Likewise.
5619 * notif.h: Likewise.
5620
5621 2014-07-30 Gary Benson <gbenson@redhat.com>
5622
5623 * server.h: Include common-defs.h.
5624 Do not include config.h or build-gnulib-gdbserver/config.h.
5625
5626 2014-07-30 Gary Benson <gbenson@redhat.com>
5627
5628 * hostio-errno.c: Move server.h to top of includes list.
5629 * inferiors.c: Likewise.
5630 * linux-x86-low.c: Likewise.
5631 * notif.c: Include server.h.
5632
5633 2014-07-24 Tom Tromey <tromey@redhat.com>
5634 Gary Benson <gbenson@redhat.com>
5635
5636 * server.h (CORE_ADDR): Now unsigned.
5637
5638 2014-07-16 Pedro Alves <palves@redhat.com>
5639
5640 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5641
5642 2014-07-15 Pedro Alves <palves@redhat.com>
5643
5644 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5645 copy.
5646
5647 2014-07-11 Pedro Alves <palves@redhat.com>
5648
5649 * linux-low.c (kill_wait_lwp): New function, based on
5650 kill_one_lwp_callback, but use my_waitpid directly.
5651 (kill_one_lwp_callback, linux_kill): Use it.
5652
5653 2014-06-23 Pedro Alves <palves@redhat.com>
5654
5655 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5656 before setting DR0..DR3.
5657
5658 2014-06-20 Gary Benson <gbenson@redhat.com>
5659
5660 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5661 * configure: Regenerated.
5662 * config.in: Likewise.
5663
5664 2014-06-20 Gary Benson <gbenson@redhat.com>
5665
5666 * Makefile.in (SFILES): Update locations for files moved
5667 from common to nat.
5668 (object file files): Reordered.
5669
5670 2014-06-20 Gary Benson <gbenson@redhat.com>
5671
5672 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5673 (i386_dr_low_set_addr): Likewise.
5674 (i386_dr_low_get_addr): Likewise.
5675 (i386_dr_low_can_set_control): Likewise.
5676 (i386_dr_low_set_control): Likewise.
5677 (i386_dr_low_get_control): Likewise.
5678 (i386_dr_low_get_status): Likewise.
5679 (i386_get_debug_register_length): Likewise.
5680 * linux-x86-low.c (i386_dr_low_set_addr):
5681 Changed signature. Made static.
5682 (i386_dr_low_get_addr): Likewise.
5683 (i386_dr_low_set_control): Likewise.
5684 (i386_dr_low_get_control): Likewise.
5685 (i386_dr_low_get_status): Likewise.
5686 (i386_dr_low): New global variable.
5687 * win32-i386-low.c (i386_dr_low_set_addr):
5688 Changed signature. Made static.
5689 (i386_dr_low_get_addr): Likewise.
5690 (i386_dr_low_set_control): Likewise.
5691 (i386_dr_low_get_control): Likewise.
5692 (i386_dr_low_get_status): Likewise.
5693 (i386_dr_low): New global variable.
5694
5695 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5696
5697 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5698 * Makefile.in (AR, AR_FLAGS): Define.
5699 * configure: Regenerate.
5700
5701 2014-06-19 Gary Benson <gbenson@redhat.com>
5702
5703 * Makefile.in (i386-dregs.o): New rule.
5704 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5705 * i386-low.c (target.h): Remove include.
5706 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5707 (DR_CONTROL_SHIFT): Likewise.
5708 (DR_CONTROL_SIZE): Likewise.
5709 (DR_RW_EXECUTE): Likewise.
5710 (DR_RW_WRITE): Likewise.
5711 (DR_RW_READ): Likewise.
5712 (DR_RW_IORW): Likewise.
5713 (DR_LEN_1): Likewise.
5714 (DR_LEN_2): Likewise.
5715 (DR_LEN_4): Likewise.
5716 (DR_LEN_8): Likewise.
5717 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5718 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5719 (DR_ENABLE_SIZE): Likewise.
5720 (DR_LOCAL_SLOWDOWN): Likewise.
5721 (DR_GLOBAL_SLOWDOWN): Likewise.
5722 (DR_CONTROL_RESERVED): Likewise.
5723 (I386_DR_CONTROL_MASK): Likewise.
5724 (I386_DR_VACANT): Likewise.
5725 (I386_DR_LOCAL_ENABLE): Likewise.
5726 (I386_DR_GLOBAL_ENABLE): Likewise.
5727 (I386_DR_DISABLE): Likewise.
5728 (I386_DR_SET_RW_LEN): Likewise.
5729 (I386_DR_GET_RW_LEN): Likewise.
5730 (I386_DR_WATCH_HIT): Likewise.
5731 (i386_wp_op_t): Likewise.
5732 (i386_show_dr): Likewise.
5733 (i386_length_and_rw_bits): Likewise.
5734 (i386_insert_aligned_watchpoint): Likewise.
5735 (i386_remove_aligned_watchpoint): Likewise.
5736 (i386_handle_nonaligned_watchpoint): Likewise.
5737 i386_update_inferior_debug_regs(): Likewise.
5738 (i386_dr_insert_watchpoint): Likewise.
5739 (i386_dr_remove_watchpoint): Likewise.
5740 (i386_dr_region_ok_for_watchpoint): Likewise.
5741 (i386_dr_stopped_data_address): Likewise.
5742 (i386_dr_stopped_by_watchpoint): Likewise.
5743
5744 2014-06-19 Gary Benson <gbenson@redhat.com>
5745
5746 * i386-low.c (i386_dr_show): Renamed to
5747 i386_show_dr and made static. All uses updated.
5748 (i386_dr_length_and_rw_bits): Renamed to
5749 i386_length_and_rw_bits and made static.
5750 All uses updated.
5751 (i386_dr_insert_aligned_watchpoint): Renamed to
5752 i386_insert_aligned_watchpoint and made static.
5753 All uses updated.
5754 (i386_dr_remove_aligned_watchpoint): Renamed to
5755 i386_remove_aligned_watchpoint and made static.
5756 All uses updated.
5757 (i386_dr_update_inferior_debug_regs): Renamed to
5758 i386_update_inferior_debug_regs and made static.
5759 All uses updated.
5760
5761 2014-06-18 Gary Benson <gbenson@redhat.com>
5762
5763 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5764 (i386_dr_low_can_set_control): Likewise.
5765 (i386_get_debug_register_length): Likewise.
5766 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5767 (i386_dr_low_can_set_control): Likewise.
5768 (i386_get_debug_register_length): Likewise.
5769
5770 2014-06-17 Gary Benson <gbenson@redhat.com>
5771
5772 * i386-low.h (i386-dregs.h): New include.
5773 (DR_FIRSTADDR): Now in i386-dregs.h.
5774 (DR_LASTADDR): Likewise.
5775 (DR_NADDR): Likewise.
5776 (DR_STATUS): Likewise.
5777 (DR_CONTROL): Likewise.
5778 (i386_debug_reg_state): Likewise.
5779 (i386_dr_insert_watchpoint): Likewise.
5780 (i386_dr_remove_watchpoint): Likewise.
5781 (i386_dr_region_ok_for_watchpoint): Likewise.
5782 (i386_dr_stopped_data_address): Likewise.
5783 (i386_dr_stopped_by_watchpoint): Likewise.
5784 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5785
5786 2014-06-18 Gary Benson <gbenson@redhat.com>
5787
5788 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5789 i386_dr_insert_watchpoint.
5790 (i386_low_remove_watchpoint): Renamed to
5791 i386_dr_remove_watchpoint.
5792 (i386_low_region_ok_for_watchpoint): Renamed to
5793 i386_dr_region_ok_for_watchpoint.
5794 (i386_low_stopped_data_address): Renamed to
5795 i386_dr_stopped_data_address.
5796 (i386_low_stopped_by_watchpoint): Renamed to
5797 i386_dr_stopped_by_watchpoint.
5798 * i386-low.c (i386_show_dr): Renamed to
5799 i386_dr_show and made nonstatic. All uses updated.
5800 (i386_length_and_rw_bits): Renamed to
5801 i386_dr_length_and_rw_bits and made nonstatic.
5802 All uses updated.
5803 (i386_insert_aligned_watchpoint): Renamed to
5804 i386_dr_insert_aligned_watchpoint and made nonstatic.
5805 All uses updated.
5806 (i386_remove_aligned_watchpoint): Renamed to
5807 i386_dr_remove_aligned_watchpoint and made nonstatic.
5808 All uses updated.
5809 (i386_update_inferior_debug_regs): Renamed to
5810 i386_dr_update_inferior_debug_regs and made nonstatic.
5811 All uses updated.
5812 (i386_low_insert_watchpoint): Renamed to
5813 i386_dr_insert_watchpoint. All uses updated.
5814 (i386_low_remove_watchpoint): Renamed to
5815 i386_dr_remove_watchpoint. All uses updated.
5816 (i386_low_region_ok_for_watchpoint): Renamed to
5817 i386_dr_region_ok_for_watchpoint. All uses updated.
5818 (i386_low_stopped_data_address): Renamed to
5819 i386_dr_stopped_data_address. All uses updated.
5820 (i386_low_stopped_by_watchpoint): Renamed to
5821 i386_dr_stopped_by_watchpoint. All uses updated.
5822
5823 2014-06-18 Gary Benson <gbenson@redhat.com>
5824
5825 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5826 (i386_dr_low_can_set_control): Likewise.
5827 (i386_insert_aligned_watchpoint): New check.
5828
5829 2014-06-18 Gary Benson <gbenson@redhat.com>
5830
5831 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5832 Renamed to state.
5833
5834 2014-06-18 Gary Benson <gbenson@redhat.com>
5835
5836 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5837 instead of fatal and error.
5838 (i386_handle_nonaligned_watchpoint): Likewise.
5839
5840 2014-06-18 Gary Benson <gbenson@redhat.com>
5841
5842 * i386-low.c (i386_get_debug_register_length): New macro.
5843 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5844 (i386_show_dr): Use debug_printf instead of fprintf. Use
5845 phex to format values.
5846
5847 2014-06-18 Gary Benson <gbenson@redhat.com>
5848
5849 * i386-low.h: Comment changes.
5850 * i386-low.c: Likewise.
5851
5852 2014-06-18 Gary Benson <gbenson@redhat.com>
5853
5854 * i386-low.c: Whitespace changes.
5855
5856 2014-06-12 Tom Tromey <tromey@redhat.com>
5857
5858 * utils.c (freeargv): Remove.
5859
5860 2014-06-12 Tom Tromey <tromey@redhat.com>
5861
5862 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5863 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5864 (parse_debug_format_options): Likewise.
5865 (gdbserver_usage): Likewise.
5866 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5867 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5868 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5869 against libiberty.
5870 ($(LIBGNU)): Depend on libiberty.
5871 (all-lib): Recurse into all subdirs.
5872 (install-only): Invoke "install" target in subdirs.
5873 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5874 targets.
5875 * configure: Rebuild.
5876 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5877 for vasprintf, vsnprintf, or gettimeofday.
5878 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5879 srv_tgtobj.
5880
5881 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5882
5883 * development.sh: Delete.
5884 * Makefile.in (config.status): Adjust dependency on development.sh.
5885 * configure.ac: Adjust development.sh source call.
5886 * configure: Regenerate.
5887
5888 2014-06-02 Pedro Alves <palves@redhat.com>
5889
5890 * ax.c (gdb_free_agent_expr): New function.
5891 * ax.h (gdb_free_agent_expr): New declaration.
5892 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5893 list.
5894 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5895 static.
5896 (clear_breakpoint_conditions_and_commands): New function.
5897 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5898 (clear_breakpoint_conditions_and_commands): New declaration.
5899
5900 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5901
5902 * linux-aarch64-low.c (asm/ptrace.h): Include.
5903
5904 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5905
5906 Fix TLS access for -static -pthread.
5907 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5908 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5909 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5910
5911 2014-05-20 Pedro Alves <palves@redhat.com>
5912
5913 * linux-aarch64-low.c (aarch64_insert_point)
5914 (aarch64_remove_point): No longer check whether the type is
5915 supported here. Adjust to new interface.
5916 (the_low_target): Install aarch64_supports_z_point_type as
5917 supports_z_point_type method.
5918 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5919 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5920 instead of a Z packet char. Adjust.
5921 (arm_supports_z_point_type): New function.
5922 (arm_insert_point, arm_remove_point): Adjust to new interface.
5923 (the_low_target): Install arm_supports_z_point_type.
5924 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5925 (cris_insert_point, cris_remove_point): Adjust to new interface.
5926 Don't check whether the type is supported here.
5927 (the_low_target): Install cris_supports_z_point_type.
5928 * linux-low.c (linux_supports_z_point_type): New function.
5929 (linux_insert_point, linux_remove_point): Adjust to new interface.
5930 * linux-low.h (struct linux_target_ops) <insert_point,
5931 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5932 raw_breakpoint pointer parameter.
5933 <supports_z_point_type>: New method.
5934 * linux-mips-low.c (mips_supports_z_point_type): New function.
5935 (mips_insert_point, mips_remove_point): Adjust to new interface.
5936 Use mips_supports_z_point_type.
5937 (the_low_target): Install mips_supports_z_point_type.
5938 * linux-ppc-low.c (the_low_target): Install NULL as
5939 supports_z_point_type method.
5940 * linux-s390-low.c (the_low_target): Install NULL as
5941 supports_z_point_type method.
5942 * linux-sparc-low.c (the_low_target): Install NULL as
5943 supports_z_point_type method.
5944 * linux-x86-low.c (x86_supports_z_point_type): New function.
5945 (x86_insert_point): Adjust to new insert_point interface. Use
5946 insert_memory_breakpoint. Adjust to new
5947 i386_low_insert_watchpoint interface.
5948 (x86_remove_point): Adjust to remove_point interface. Use
5949 remove_memory_breakpoint. Adjust to new
5950 i386_low_remove_watchpoint interface.
5951 (the_low_target): Install x86_supports_z_point_type.
5952 * lynx-low.c (lynx_target_ops): Install NULL as
5953 supports_z_point_type callback.
5954 * nto-low.c (nto_supports_z_point_type): New.
5955 (nto_insert_point, nto_remove_point): Adjust to new interface.
5956 (nto_target_ops): Install nto_supports_z_point_type.
5957 * mem-break.c: Adjust intro comment.
5958 (struct raw_breakpoint) <raw_type, size>: New fields.
5959 <inserted>: Update comment.
5960 <shlib_disabled>: Delete field.
5961 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5962 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5963 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5964 (raw_bkpt_type_to_target_hw_bp_type): New function.
5965 (find_enabled_raw_code_breakpoint_at): New function.
5966 (find_raw_breakpoint_at): New type and size parameters. Use them.
5967 (insert_memory_breakpoint): New function, based off
5968 set_raw_breakpoint_at.
5969 (remove_memory_breakpoint): New function.
5970 (set_raw_breakpoint_at): Reimplement.
5971 (set_breakpoint): New, based on set_breakpoint_at.
5972 (set_breakpoint_at): Reimplement.
5973 (delete_raw_breakpoint): Go through the_target->remove_point
5974 instead of assuming memory breakpoints.
5975 (find_gdb_breakpoint_at): Delete.
5976 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5977 (find_gdb_breakpoint): New function.
5978 (set_gdb_breakpoint_at): Delete.
5979 (z_type_supported): New function.
5980 (set_gdb_breakpoint_1): New function, loosely based off
5981 set_gdb_breakpoint_at.
5982 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5983 (delete_gdb_breakpoint_at): Delete.
5984 (delete_gdb_breakpoint_1): New function, loosely based off
5985 delete_gdb_breakpoint_at.
5986 (delete_gdb_breakpoint): New function.
5987 (clear_gdb_breakpoint_conditions): Rename to ...
5988 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5989 breakpoint.
5990 (add_condition_to_breakpoint): Make static.
5991 (add_breakpoint_condition): Take a struct breakpoint pointer
5992 instead of an address. Adjust.
5993 (gdb_condition_true_at_breakpoint): Rename to ...
5994 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5995 z_type parameter.
5996 (gdb_condition_true_at_breakpoint): Reimplement.
5997 (add_breakpoint_commands): Take a struct breakpoint pointer
5998 instead of an address. Adjust.
5999 (gdb_no_commands_at_breakpoint): Rename to ...
6000 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6001 parameter. Return true if no breakpoint was found. Change debug
6002 output.
6003 (gdb_no_commands_at_breakpoint): Reimplement.
6004 (run_breakpoint_commands): Rename to ...
6005 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6006 and change return type to boolean.
6007 (run_breakpoint_commands): New function.
6008 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6009 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6010 breakpoint. Go through the_target->remove_point instead of
6011 assuming memory breakpoint.
6012 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6013 software and hardware breakpoints.
6014 (reinsert_raw_breakpoint): Go through the_target->insert_point
6015 instead of assuming memory breakpoint.
6016 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6017 software and hardware breakpoints.
6018 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6019 Check both software and hardware breakpoints.
6020 (validate_inserted_breakpoint): Assert the breakpoint is a
6021 software breakpoint. Set the inserted flag to -1 instead of
6022 setting shlib_disabled.
6023 (delete_disabled_breakpoints): Adjust.
6024 (validate_breakpoints): Only validate software breakpoints.
6025 Adjust to inserted flag change.
6026 (check_mem_read, check_mem_write): Skip breakpoint types other
6027 than software breakpoints. Adjust to inserted flag change.
6028 * mem-break.h (enum raw_bkpt_type): New enum.
6029 (raw_breakpoint, struct process_info): Forward declare.
6030 (Z_packet_to_target_hw_bp_type): Delete declaration.
6031 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6032 (set_gdb_breakpoint, delete_gdb_breakpoint)
6033 (clear_breakpoint_conditions): New declarations.
6034 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6035 (breakpoint_inserted_here): Update comment.
6036 (add_breakpoint_condition, add_breakpoint_commands): Replace
6037 address parameter with a breakpoint pointer parameter.
6038 (gdb_breakpoint_here): Update comment.
6039 (delete_gdb_breakpoint_at): Delete.
6040 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6041 * server.c (process_point_options): Take a struct breakpoint
6042 pointer instead of an address. Adjust.
6043 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6044 delete_gdb_breakpoint.
6045 * spu-low.c (spu_target_ops): Install NULL as
6046 supports_z_point_type method.
6047 * target.h: Include mem-break.h.
6048 (struct target_ops) <prepare_to_access_memory>: Update comment.
6049 <supports_z_point_type>: New field.
6050 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6051 instead of a char. Also take a raw breakpoint pointer.
6052 * win32-arm-low.c (the_low_target): Install NULL as
6053 supports_z_point_type.
6054 * win32-i386-low.c (i386_supports_z_point_type): New function.
6055 (i386_insert_point, i386_remove_point): Adjust to new interface.
6056 (the_low_target): Install i386_supports_z_point_type.
6057 * win32-low.c (win32_supports_z_point_type): New function.
6058 (win32_insert_point, win32_remove_point): Adjust to new interface.
6059 (win32_target_ops): Install win32_supports_z_point_type.
6060 * win32-low.h (struct win32_target_ops):
6061 <supports_z_point_type>: New method.
6062 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6063 instead of a char. Also take a raw breakpoint pointer.
6064
6065 2014-05-20 Pedro Alves <palves@redhat.com>
6066
6067 * mem-break.h: Include break-common.h.
6068 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6069 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6070 (Z_packet_to_target_hw_bp_type): New declaration.
6071 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6072 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6073 (Z_PACKET_ACCESS_WP): Delete macros.
6074 (Z_packet_to_hw_type): Delete function.
6075 * i386-low.h: Don't include break-common.h here.
6076 (Z_packet_to_hw_type): Delete declaration.
6077 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6078 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6079 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6080 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6081 * linux-aarch64-low.c: Don't include break-common.h here.
6082 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6083 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6084 (Z_packet_to_target_hw_bp_type): Delete function.
6085 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6086 function.
6087 (mips_insert_point, mips_remove_point): Use
6088 Z_packet_to_target_hw_bp_type.
6089
6090 2014-05-20 Pedro Alves <palves@redhat.com>
6091
6092 * linux-aarch64-low.c: Include break-common.h.
6093 (enum target_point_type): Delete.
6094 (Z_packet_to_point_type): Rename to ...
6095 (Z_packet_to_target_hw_bp_type): ... this, and return a
6096 target_hw_bp_type instead.
6097 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6098 instead of an enum target_point_type.
6099 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6100 breakpoint type.
6101 (aarch64_dr_state_insert_one_point)
6102 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6103 (aarch64_handle_aligned_watchpoint)
6104 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6105 Take an enum target_hw_bp_type instead of an enum
6106 target_point_type.
6107 (aarch64_supports_z_point_type): New function.
6108 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6109 use Z_packet_to_target_hw_bp_type.
6110
6111 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6112
6113 * configure.ac: Only use -Werror by default when DEVELOPMENT
6114 is true.
6115 * configure: Regenerate.
6116
6117 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6118
6119 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6120 * linux-x86-low.c (X86_64_USER_REGS): New.
6121 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6122
6123 2014-04-28 Yao Qi <yao@codesourcery.com>
6124
6125 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6126 name.
6127
6128 2014-04-25 Pedro Alves <palves@redhat.com>
6129
6130 PR server/16255
6131 * linux-low.c (linux_attach_fail_reason_string): New function.
6132 (linux_attach_lwp): Delete.
6133 (linux_attach_lwp_1): Rename to ...
6134 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6135 argument. Remove "initial" parameter. Return int instead of
6136 void. Don't error or warn here.
6137 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6138 failure to attach to the tgid. Call warning when failing to
6139 attach to an lwp.
6140 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6141 argument. Remove "initial" parameter. Return int instead of
6142 void. Don't error or warn here.
6143 (linux_attach_fail_reason_string): New declaration.
6144 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6145 interface change. Use linux_attach_fail_reason_string.
6146
6147 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6148 Walfred Tedeschi <walfred.tedeschi@intel.com>
6149
6150 * Makefile.in: Added rules to handle new files
6151 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6152 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6153 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6154 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6155 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6156 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6157 x32-avx512-linux.o.
6158 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6159 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6160 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6161 i386/x32-avx512.xml.
6162 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6163 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6164 i386/x32-avx512-linux.xml.
6165 * i387-fp.c (num_avx512_k_registers): New constant for number
6166 of K registers.
6167 (num_avx512_zmmh_low_registers): New constant for number of
6168 lower ZMM registers (0-15).
6169 (num_avx512_zmmh_high_registers): New constant for number of
6170 higher ZMM registers (16-31).
6171 (num_avx512_ymmh_registers): New contant for number of higher
6172 YMM registers (ymm16-31 added by avx521 on x86_64).
6173 (num_avx512_xmm_registers): New constant for number of higher
6174 XMM registers (xmm16-31 added by AVX512 on x86_64).
6175 (struct i387_xsave): Add space for AVX512 registers.
6176 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6177 Add code to handle AVX512 registers.
6178 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6179 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6180 prototypei from generated file.
6181 (tdesc_amd64_avx512_linux): Likewise.
6182 (init_registers_x32_avx512_linux): Likewise.
6183 (tdesc_x32_avx512_linux): Likewise.
6184 (init_registers_i386_avx512_linux): Likewise.
6185 (tdesc_i386_avx512_linux): Likewise.
6186 (x86_64_regmap): Add AVX512 registers.
6187 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6188 mask.
6189 (initialize_low_arch): Add code to initialize AVX512 registers.
6190
6191 2014-04-23 Pedro Alves <palves@redhat.com>
6192
6193 * mem-break.c (find_gdb_breakpoint_at): Make static.
6194 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6195
6196 2014-04-23 Pedro Alves <palves@redhat.com>
6197
6198 * i386-low.c: Don't include break-common.h here.
6199 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6200 prototype to take target_hw_bp_type as argument instead of a Z
6201 packet char.
6202 * i386-low.h: Include break-common.h here.
6203 (Z_packet_to_hw_type): Declare.
6204 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6205 prototypes.
6206 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6207 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6208 (x86_remove_point): Convert the packet number to a
6209 target_hw_bp_type before calling i386_low_remove_watchpoint.
6210 * win32-i386-low.c (i386_insert_point): Convert the packet number
6211 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6212 (i386_remove_point): Convert the packet number to a
6213 target_hw_bp_type before calling i386_low_remove_watchpoint.
6214
6215 2014-04-23 Pedro Alves <palves@redhat.com>
6216
6217 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6218
6219 2014-04-10 Pedro Alves <palves@redhat.com>
6220
6221 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6222 Check if the condition or command is NULL before checking if the
6223 breakpoint is known. On success, return true.
6224 * mem-break.h (add_breakpoint_condition): Document return.
6225 (add_breakpoint_commands): Add describing comment.
6226 * server.c (skip_to_semicolon): New function.
6227 (process_point_options): Use it.
6228
6229 2014-04-09 Pedro Alves <palves@redhat.com>
6230
6231 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6232 to lwpid_of.
6233
6234 2014-02-27 Pedro Alves <palves@redhat.com>
6235
6236 PR 12702
6237 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6238 macros.
6239 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6240 output.
6241 (last_thread_of_process_p): Take a PID argument instead of a
6242 thread pointer.
6243 (linux_wait_for_lwp): Delete.
6244 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6245 functions.
6246 (linux_low_filter_event): New function, party factored out from
6247 linux_wait_for_event.
6248 (linux_wait_for_event): Rename to ...
6249 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6250 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6251 sigsuspend. Check for zombie leaders.
6252 (linux_wait_for_event): Reimplement as wrapper around
6253 linux_wait_for_event_filtered.
6254 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6255 a normal or signal exit is seen, it's the whole process exiting.
6256 (wait_for_sigstop): No longer a for_each_inferior callback.
6257 Rewrite on top of linux_wait_for_event_filtered.
6258 (stop_all_lwps): Call wait_for_sigstop directly.
6259 * server.c (resume, handle_target_event): Handle
6260 TARGET_WAITKIND_NO_RESUMED.
6261
6262 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6263
6264 * win32-low.c (psapi_get_dll_name,
6265 * win32_CreateToolhelp32Snapshot): Delete.
6266 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6267 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6268 Delete.
6269 (handle_load_dll): Add function description.
6270 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6271
6272 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6273
6274 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6275 Add comment.
6276 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6277 base address when calling win32_add_one_solib.
6278 (handle_load_dll): Delete local variable load_addr.
6279 Remove 0x1000 offset applied to DLL base address when calling
6280 win32_add_one_solib.
6281 (handle_unload_dll): Add comment.
6282
6283 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6284
6285 * win32-low.c (win32_add_all_dlls): Renames
6286 win32_ensure_ntdll_loaded. Rewrite function documentation.
6287 Adjust implementation to always load all DLLs.
6288 Add 0x1000 offset to DLL base address when calling
6289 win32_add_one_solib.
6290 (child_initialization_done): New static global.
6291 (do_initial_child_stuff): Set child_initialization_done to
6292 zero during child initialization, and 1 after. Replace call
6293 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6294 Add comment.
6295 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6296 (handle_unload_dll): Add function documentation.
6297 (get_child_debug_event): Ignore load and unload DLL events
6298 during child initialization.
6299
6300 2014-02-20 Doug Evans <dje@google.com>
6301
6302 Remove global all_lwps.
6303 * inferiors.h (ptid_of): Move here from linux-low.h.
6304 (pid_of, lwpid_of): Ditto.
6305 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6306 parameter is a struct thread_info * now.
6307 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6308 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6309 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6310 directly.
6311 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6312 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6313 * linux-arm-low.c (update_registers_callback): Update, "entry"
6314 parameter is a struct thread_info * now.
6315 Fetch lwpid from current_inferior directly.
6316 (arm_insert_point): Pass &all_threads to find_inferior instead of
6317 &all_lwps.
6318 (arm_remove_point): Ditto.
6319 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6320 (arm_prepare_to_resume): Fetch pid from thread.
6321 (arm_read_description): Fetch lwpid from current_inferior directly.
6322 * linux-low.c (all_lwps): Delete.
6323 (delete_lwp): Delete call to remove_inferior.
6324 (handle_extended_wait): Fetch lwpid from thread.
6325 (add_lwp): Don't set lwp->entry.id. Remove call to
6326 add_inferior_to_list.
6327 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6328 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6329 (kill_one_lwp_callback): Ditto.
6330 (linux_kill): Don't dereference NULL pointer.
6331 Fetch ptid,lwpid from thread.
6332 (get_detach_signal): Fetch ptid from thread.
6333 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6334 Simplify call to regcache_invalidate_thread.
6335 (delete_lwp_callback): Update, "entry" parameter is a
6336 struct thread_info * now. Fetch pid from thread.
6337 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6338 (status_pending_p_callback): Update, "entry" parameter is a
6339 struct thread_info * now. Fetch ptid from thread.
6340 (find_lwp_pid): Update, "entry" parameter is a
6341 struct thread_info * now.
6342 (linux_wait_for_lwp): Fetch pid from thread.
6343 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6344 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6345 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6346 (dequeue_one_deferred_signal): Ditto.
6347 (cancel_breakpoint): Fetch ptid from current_inferior.
6348 (linux_wait_for_event): Pass &all_threads to find_inferior,
6349 not &all_lwps. Fetch ptid, lwpid from thread.
6350 (count_events_callback): Update, "entry" parameter is a
6351 struct thread_info * now.
6352 (select_singlestep_lwp_callback): Ditto.
6353 (select_event_lwp_callback): Ditto.
6354 (cancel_breakpoints_callback): Ditto.
6355 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6356 not &all_lwps.
6357 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6358 (unsuspend_one_lwp): Update, "entry" parameter is a
6359 struct thread_info * now.
6360 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6361 not &all_lwps.
6362 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6363 Fetch lwpid from thread, not lwp.
6364 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6365 Pass &all_threads to find_inferior, not &all_lwps.
6366 (send_sigstop): Fetch lwpid from thread, not lwp.
6367 (send_sigstop_callback): Update, "entry" parameter is a
6368 struct thread_info * now.
6369 (suspend_and_send_sigstop_callback): Ditto.
6370 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6371 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6372 struct thread_info * now.
6373 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6374 from thread, lwp.
6375 (lwp_running): Update, "entry" parameter is a
6376 struct thread_info * now.
6377 (stop_all_lwps): Fetch ptid from thread.
6378 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6379 (linux_resume_one_lwp): Fetch lwpid from thread.
6380 (linux_set_resume_request): Update, "entry" parameter is a
6381 struct thread_info * now. Fetch pid, lwpid from thread.
6382 (resume_status_pending_p): Update, "entry" parameter is a
6383 struct thread_info * now.
6384 (need_step_over_p): Ditto. Fetch lwpid from thread.
6385 (start_step_over): Fetch lwpid from thread.
6386 (linux_resume_one_thread): Update, "entry" parameter is a
6387 struct thread_info * now. Fetch lwpid from thread.
6388 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6389 (proceed_one_lwp): Update, "entry" parameter is a
6390 struct thread_info * now. Fetch lwpid from thread.
6391 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6392 struct thread_info * now.
6393 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6394 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6395 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6396 directly.
6397 (regsets_store_inferior_registers): Ditto.
6398 (fetch_register, store_register): Ditto.
6399 (linux_read_memory, linux_write_memory): Ditto.
6400 (linux_request_interrupt): Ditto.
6401 (linux_read_auxv): Ditto.
6402 (linux_xfer_siginfo): Ditto.
6403 (linux_qxfer_spu): Ditto.
6404 (linux_qxfer_libraries_svr4): Ditto.
6405 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6406 moved to inferiors.h.
6407 (get_lwp): Delete.
6408 (get_thread_lwp): Update.
6409 (struct lwp_info): Delete member "entry". Simplify comment for
6410 member "thread".
6411 (all_lwps): Delete.
6412 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6413 current_inferior directly.
6414 (update_watch_registers_callback): Update, "entry" parameter is a
6415 struct thread_info * now. Fetch pid from thread.
6416 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6417 (mips_insert_point): Fetch lwpid from current_inferior.
6418 Pass &all_threads to find_inferior, not &all_lwps.
6419 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6420 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6421 directly.
6422 (mips_stopped_data_address): Ditto.
6423 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6424 directly.
6425 * linux-tile-low.c (tile_arch_setup): Ditto.
6426 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6427 (update_debug_registers_callback): Update, "entry" parameter is a
6428 struct thread_info * now. Fetch pid from thread.
6429 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6430 Pass &all_threads to find_inferior, not &all_lwps.
6431 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6432 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6433 Pass &all_threads to find_inferior, not &all_lwps.
6434 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6435 (i386_dr_low_get_status): Ditto.
6436 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6437 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6438 (x86_linux_read_description): Ditto.
6439 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6440
6441 2014-02-20 Doug Evans <dje@google.com>
6442
6443 * inferiors.c (get_first_inferior): Fix buglet.
6444
6445 2014-02-19 Doug Evans <dje@google.com>
6446
6447 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6448 * inferiors.c (add_thread): Change result type to struct thread_info *.
6449 All callers updated.
6450 (add_lwp): Call add_thread here instead of in callers.
6451 All callers updated.
6452 * linux-low.h (get_lwp_thread): Rewrite.
6453 (struct lwp_info): New member "thread".
6454
6455 2014-02-19 Doug Evans <dje@google.com>
6456
6457 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6458 All callers updated.
6459
6460 2014-02-19 Doug Evans <dje@google.com>
6461
6462 * inferiors.c (add_thread): Fix whitespace.
6463
6464 2014-02-19 Doug Evans <dje@google.com>
6465
6466 * dll.c (clear_dlls): Replace accessing list implemention details
6467 with API function.
6468 * gdbthread.h (get_first_thread): Declare.
6469 * inferiors.c (for_each_inferior_with_data): New function.
6470 (get_first_thread): New function.
6471 (find_thread_ptid): Simplify.
6472 (get_first_inferior): New function.
6473 (clear_list): Delete.
6474 (one_inferior_p): New function.
6475 (clear_inferior_list): New function.
6476 (clear_inferiors): Update.
6477 * inferiors.h (for_each_inferior_with_data): Declare.
6478 (clear_inferior_list): Declare.
6479 (one_inferior_p): Declare.
6480 (get_first_inferior): Declare.
6481 * linux-low.c (linux_wait_for_event): Replace accessing list
6482 implemention details with API function.
6483 * server.c (target_running): Ditto.
6484 (accumulate_file_name_length): New function.
6485 (emit_dll_description): New function.
6486 (handle_qxfer_libraries): Replace accessing list implemention
6487 details with API function.
6488 (handle_qxfer_threads_worker): New function.
6489 (handle_qxfer_threads_proper): Replace accessing list implemention
6490 details with API function.
6491 (handle_query): Ditto.
6492 (visit_actioned_threads_callback_ftype): New typedef.
6493 (visit_actioned_threads_data): New struct.
6494 (visit_actioned_threads): Rewrite to be find_inferior callback.
6495 (resume): Call find_inferior.
6496 (handle_status): Replace accessing list implemention
6497 details with API function.
6498 (process_serial_event): Replace accessing list implemention details
6499 with API function.
6500 * target.c (set_desired_inferior): Replace accessing list implemention
6501 details with API function.
6502 * tracepoint.c (same_process_p): New function.
6503 (gdb_agent_about_to_close): Replace accessing list implemention
6504 details with API function.
6505 * win32-low.c (child_delete_thread): Replace accessing list
6506 implemention details with API function.
6507 (match_dll_by_basename): New function.
6508 (dll_is_loaded_by_basename): New function.
6509 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6510 details call to dll_is_loaded_by_basename.
6511
6512 2014-02-19 Doug Evans <dje@google.com>
6513
6514 * dll.h (struct dll_info): Add comment.
6515 * gdbthread.h (struct thread_info): Add comment.
6516 (current_ptid): Simplify.
6517 * inferiors.c (add_process): Update.
6518 (remove_process): Update.
6519 * inferiors.h (struct process_info): Rename member "head" to "entry".
6520 * linux-low.c (delete_lwp): Update.
6521 (add_lwp): Update.
6522 (last_thread_of_process_p): Update.
6523 (kill_one_lwp_callback, linux_kill): Update.
6524 (status_pending_p_callback): Update.
6525 (wait_for_sigstop): Update. Simplify read of ptid.
6526 (start_step_over): Update.
6527 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6528 (get_lwp_thread): Update.
6529 (struct lwp_info): Rename member "head" to "entry".
6530 * regcache.h (inferior_list_entry): Delete.
6531 * server.c (kill_inferior_callback): Update.
6532 (detach_or_kill_inferior_callback): Update.
6533 (print_started_pid): Update.
6534 (print_attached_pid): Update.
6535 (process_serial_event): Simplify read of ptid.
6536 * thread-db.c (thread_db_create_event): Update.
6537 (thread_db_get_tls_address): Update.
6538 * win32-low.c (current_inferior_ptid): Simplify.
6539
6540 2014-02-19 Tom Tromey <tromey@redhat.com>
6541
6542 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6543 argument.
6544 (target_supports_btrace): Update.
6545
6546 2014-02-14 Yao Qi <yao@codesourcery.com>
6547
6548 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6549 (rsp-low-ipa.o): New target.
6550
6551 2014-02-12 Tom Tromey <tromey@redhat.com>
6552
6553 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6554 convert_ascii_to_int.
6555 * regcache.c (registers_to_string): Likewise.
6556 * remote-utils.c (decode_M_packet): Likewise.
6557 * server.c (process_serial_event): Likewise.
6558
6559 2014-02-12 Tom Tromey <tromey@redhat.com>
6560
6561 * server.c (handle_query, handle_v_run): Use hex2bin, not
6562 unhexify.
6563 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6564
6565 2014-02-12 Tom Tromey <tromey@redhat.com>
6566
6567 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6568 convert_int_to_ascii.
6569 * regcache.c (registers_to_string, collect_register_as_string):
6570 Likewise.
6571 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6572 Likewise.
6573 * server.c (process_serial_event): Likewise.
6574 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6575 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6576
6577 2014-02-12 Tom Tromey <tromey@redhat.com>
6578
6579 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6580 bin2hex, not hexify.
6581 * tracepoint.c (cmd_qtstatus): Likewise.
6582
6583 2014-02-12 Tom Tromey <tromey@redhat.com>
6584
6585 * remote-utils.c (monitor_output): Pass explicit length to
6586 hexify.
6587
6588 2014-02-12 Tom Tromey <tromey@redhat.com>
6589
6590 * tracepoint.c: Include rsp-low.h.
6591 * server.c: Include rsp-low.h.
6592 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6593 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6594 declare.
6595 * remote-utils.c: Include rsp-low.h.
6596 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6597 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6598 (convert_int_to_ascii, convert_ascii_to_int): Move to
6599 common/rsp-low.c.
6600 * regcache.c: Include rsp-low.h.
6601 * ax.c: Include rsp-low.h.
6602 * Makefile.in (SFILES): Add common/rsp-low.c.
6603 (OBS): Add rsp-low.o.
6604 (rsp-low.o): New target.
6605
6606 2014-02-12 Tom Tromey <tromey@redhat.com>
6607
6608 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6609 Include print-utils.h.
6610 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6611 (plongest, thirty_two, phex_nz): Remove.
6612 * Makefile.in (SFILES): Add common/print-utils.c.
6613 (OBS): Add print-utils.o.
6614 (print-utils-ipa.o): New target.
6615 (print-utils.o): New target.
6616 (IPA_OBJS): Add print-utils-ipa.o.
6617
6618 2014-02-06 Tom Tromey <tromey@redhat.com>
6619
6620 * Makefile.in (SFILES): Fix indentation.
6621
6622 2014-02-05 Doug Evans <dje@google.com>
6623
6624 * linux-low.c (linux_wait_for_event): Improve comment.
6625 (linux_wait_1): Keep current_inferior in sync with event_child.
6626
6627 2014-01-22 Doug Evans <dje@google.com>
6628
6629 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6630
6631 2014-01-22 Doug Evans <dje@google.com>
6632
6633 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6634 * configure: Regenerate.
6635 * config.in: Regenerate.
6636 * Makefile.in (SFILES): Add debug.c.
6637 (OBS): Add debug.o.
6638 * debug.c: New file.
6639 * debug.h: New file.
6640 * linux-aarch64-low.c (*): Update all debugging printfs to use
6641 debug_printf instead of fprintf.
6642 * linux-arm-low.c (*): Ditto.
6643 * linux-cris-low.c (*): Ditto.
6644 * linux-crisv32-low.c (*): Ditto.
6645 * linux-m32r-low.c (*): Ditto.
6646 * linux-sparc-low.c (*): Ditto.
6647 * linux-x86.c (*): Ditto.
6648 * linux-low.c (*): Ditto.
6649 (linux_wait_1): Add calls to debug_enter, debug_exit.
6650 (linux_wait): Remove redundant debugging printf.
6651 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6652 (linux_resume, unstop_all_lwps): Ditto.
6653 * mem-break.c (*): Update all debugging printfs to use
6654 debug_printf instead of fprintf.
6655 * remote-utils.c (*): Ditto.
6656 * thread-db.c (*): Ditto.
6657 * server.c #include <ctype.h>, "gdb_vecs.h".
6658 (debug_threads): Moved to debug.c.
6659 (*): Update all debugging printfs to use debug_printf instead of
6660 fprintf.
6661 (start_inferior): Replace call to fflush with call to debug_flush.
6662 (monitor_show_help): Mention set debug-format.
6663 (parse_debug_format_options): New function.
6664 (handle_monitor_command): Handle "monitor set debug-format".
6665 (gdbserver_usage): Mention --debug-format.
6666 (main): Parse --debug-format.
6667 * server.h (debug_threads): Declaration moved to debug.h.
6668 #include "debug.h".
6669 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6670 trace_debug_1 that uses debug_printf.
6671 (tracepoint_look_up_symbols): Update all debugging printfs to use
6672 debug_printf instead of fprintf.
6673
6674 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6675
6676 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6677 sys/ptrace.h.
6678
6679 2014-01-17 Pedro Alves <palves@redhat.com>
6680
6681 PR build/16445
6682 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6683 defined after including gdb_proc_service.h.
6684
6685 2014-01-16 Doug Evans <dje@google.com>
6686
6687 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6688 (match_dll): Use it.
6689
6690 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6691
6692 * target.h (target_ops) <read_btrace>: Change parameters and
6693 return type to allow error reporting.
6694 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6695 trace reading errors on.
6696 * linux-low.c (linux_low_read_btrace): Pass trace reading
6697 errors on.
6698 (linux_low_disable_btrace): New.
6699
6700 2014-01-15 Doug Evans <dje@google.com>
6701
6702 * inferiors.c (thread_id_to_gdb_id): Delete.
6703 * inferiors.h (thread_id_to_gdb_id): Delete.
6704
6705 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6706
6707 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6708 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6709 versions.
6710
6711 2014-01-08 Pedro Alves <palves@redhat.com>
6712
6713 * server.c (handle_status): Don't discard previous queued stop
6714 replies or thread's pending status here.
6715 (main) <disconnection>: Do it here instead.
6716
6717 2014-01-08 Pedro Alves <palves@redhat.com>
6718
6719 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6720 * server.c (visit_actioned_threads, handle_pending_status): New
6721 function.
6722 (handle_v_cont): Factor out parts to ...
6723 (resume): ... this new function. If in all-stop, and a thread
6724 being resumed has a pending status, report it without actually
6725 resuming.
6726 (myresume): Adjust to use the new 'resume' function.
6727 (clear_pending_status_callback, set_pending_status_callback)
6728 (find_status_pending_thread_callback): New functions.
6729 (handle_status): Handle the case of multiple threads having
6730 interesting statuses to report. Report threads' real last signal
6731 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6732 with an interesting thread to report the status for, instead of
6733 always reporting the status of the first thread.
6734
6735 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6736
6737 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6738 * gdbreplay.c (gdbreplay_version): Likewise.
6739
6740 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6741
6742 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6743 iov.iov_len with the real length in use.
6744
6745 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6746
6747 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6748 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6749 for all targets that use win32-low.c.
6750 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6751 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6752
6753 2013-12-13 Pedro Alves <palves@redhat.com>
6754
6755 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6756 if equal to TARGET_WAITKIND_LOADED.
6757 * win32-low.c (cached_status): New static global.
6758 (win32_wait): Add declaration.
6759 (do_initial_child_stuff): Flush all initial pending debug events
6760 up to the initial breakpoint.
6761 (win32_wait): If CACHED_STATUS was set, return that instead
6762 of doing a real wait. Remove the code resuming the execution
6763 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6764 during the initial phase. Also remove the code changing
6765 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6766 TARGET_WAITKIND_STOPPED.
6767
6768 2013-12-11 Yao Qi <yao@codesourcery.com>
6769
6770 * notif.c (handle_notif_ack): Return 0 if no notification
6771 matches.
6772
6773 2013-11-20 Doug Evans <dje@google.com>
6774
6775 * linux-low.c (linux_set_resume_request): Fix comment.
6776
6777 2013-11-20 Doug Evans <dje@google.com>
6778
6779 * linux-low.c (resume_status_pending_p): Tweak comment.
6780
6781 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6782
6783 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6784 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6785 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6786 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6787 (srv_amd64_regobj): Add amd64-mpx.o.
6788 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6789 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6790 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6791 * i387-fp.c (num_pl_bnd_register) Added constant.
6792 (num_pl_bnd_cfg_registers) Added constant.
6793 (struct i387_xsave) Added reserved area and MPX fields.
6794 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6795 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6796 function.
6797 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6798 (init_registers_amd64_mpx_linux): Declare new function.
6799 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6800 (x86_64_regmap): Add MPX registers.
6801 (x86_linux_read_description): Add MPX case.
6802 (initialize_low_arch): Initialize MPX targets.
6803
6804 2013-11-18 Tom Tromey <tromey@redhat.com>
6805
6806 * configure: Rebuild.
6807 * configure.ac: Don't check for stdlib.h.
6808 * gdbreplay.c: Unconditionally include stdlib.h.
6809
6810 2013-11-18 Tom Tromey <tromey@redhat.com>
6811
6812 * config.in: Rebuild.
6813 * configure: Rebuild.
6814 * configure.ac: Don't use AC_HEADER_DIRENT.
6815
6816 2013-11-18 Tom Tromey <tromey@redhat.com>
6817
6818 * server.h: Don't check HAVE_STRING_H.
6819 * gdbreplay.c: Don't check HAVE_STRING_H.
6820 * configure: Rebuild.
6821
6822 2013-11-18 Tom Tromey <tromey@redhat.com>
6823
6824 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6825 LIBGNU.
6826
6827 2013-11-08 Tom Tromey <tromey@redhat.com>
6828
6829 * configure, config.in: Rebuild.
6830 * configure.ac: Remove unused configury.
6831
6832 2013-11-08 Tom Tromey <tromey@redhat.com>
6833
6834 * acinclude.m4: Include common.m4, codeset.m4.
6835 * configure, config.in: Rebuild.
6836 * configure.ac: Use GDB_AC_COMMON.
6837
6838 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6839
6840 * linux-s390-low.c (HWCAP_S390_TE): New define.
6841 (s390_arch_setup): Consider the TE field in the HWCAP for
6842 determining 'have_regset_tdb'.
6843
6844 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6845
6846 PR gdb/16014
6847 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6848 call to sizeof.
6849
6850 2013-10-02 Pedro Alves <palves@redhat.com>
6851
6852 * server.c (process_serial_event): Don't output "GDBserver
6853 exiting" if GDB is connected through stdio.
6854 * target.c (mywait): Likewise, be silent if GDB is connected
6855 through stdio.
6856
6857 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6858
6859 * lynx-low.c (lynx_add_threads_after_attach): New function.
6860 (lynx_attach): Remove call to add_thread. Add call to
6861 lynx_add_threads_after_attach instead.
6862
6863 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6864
6865 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6866 * config.in, configure: Regenerated.
6867
6868 2013-09-18 Yao Qi <yao@codesourcery.com>
6869
6870 PR server/15959
6871 * server.c (start_inferior): Clear 'resume_info'.
6872
6873 2013-09-16 Jiong Wang <jiwang@tilera.com>
6874
6875 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6876 for each register.
6877
6878 2013-09-16 Jiong Wang <jiwang@tilera.com>
6879
6880 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6881 linux-tile-low.o to srv_tgtobj.
6882
6883 2013-09-16 Will Newton <will.newton@linaro.org>
6884
6885 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6886 out regs.
6887
6888 2013-09-06 Pedro Alves <palves@redhat.com>
6889
6890 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6891 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6892 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6893 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6894 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6895 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6896
6897 2013-09-06 Pedro Alves <palves@redhat.com>
6898
6899 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6900 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6901
6902 2013-09-06 Pedro Alves <palves@redhat.com>
6903
6904 * linux-amd64-ipa.c: Include tracepoint.h.
6905 * linux-i386-ipa.c: Include tracepoint.h.
6906
6907 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6908
6909 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6910 (ps_get_thread_area): New function.
6911
6912 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6913
6914 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6915 (initialize_low_arch): Call init_registers_crisv32 rather than
6916 init_register_crisv32.
6917
6918 2013-09-05 Pedro Alves <palves@redhat.com>
6919
6920 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6921 to ...
6922 * hostio.h: ... this new file.
6923 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6924 win32-low.c: Include hostio.h.
6925
6926 2013-09-05 Pedro Alves <palves@redhat.com>
6927
6928 * server.h (gdb_client_data, handler_func, callback_handler_func)
6929 (delete_file_handler, add_file_handler, append_callback_event)
6930 (delete_callback_event, start_event_loop, initialize_event_loop):
6931 Move to event-loop.h and include it.
6932 * event-loop.h: New file.
6933
6934 2013-09-05 Pedro Alves <palves@redhat.com>
6935
6936 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6937 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6938 (loaded_dll, unloaded_dll): Move to ...
6939 * dll.h: ... this new file.
6940 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6941
6942 2013-09-05 Pedro Alves <palves@redhat.com>
6943
6944 * server.h (current_process, get_thread_process, all_processes)
6945 (add_inferior_to_list, for_each_inferior, current_inferior)
6946 (remove_inferior, add_process, remove_process, find_process_pid)
6947 (have_started_inferiors_p, have_attached_inferiors_p)
6948 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6949 (clear_inferiors, find_inferior, find_inferior_id)
6950 (inferior_target_data, set_inferior_target_data)
6951 (inferior_regcache_data, set_inferior_regcache_data): Move to
6952 inferiors.h, and include it.
6953 * inferiors.h: New file.
6954
6955 2013-09-05 Pedro Alves <palves@redhat.com>
6956
6957 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6958 Move ...
6959 * ax.h: ... here.
6960
6961 2013-09-05 Pedro Alves <palves@redhat.com>
6962
6963 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6964 tracepoint.h.
6965 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6966 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6967 (handle_tracepoint_general_set, handle_tracepoint_query)
6968 (tracepoint_finished_step, tracepoint_was_hit)
6969 (release_while_stepping_state_list, current_traceframe)
6970 (in_readonly_region, traceframe_read_mem)
6971 (fetch_traceframe_registers, traceframe_read_sdata)
6972 (traceframe_read_info, struct fast_tpoint_collect_status)
6973 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6974 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6975 (supply_fast_tracepoint_registers)
6976 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6977 (ipa_tdesc, claim_trampoline_space)
6978 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6979 (agent_mem_read, agent_get_trace_state_variable_value)
6980 (agent_set_trace_state_variable_value, agent_tsv_read)
6981 (agent_mem_read_string, get_raw_reg_func_addr)
6982 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6983 * tracepoint.h: ... this new file.
6984
6985 2013-09-05 Pedro Alves <palves@redhat.com>
6986
6987 * server.h (perror_with_name, error, fatal, warning, paddress)
6988 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6989 include it.
6990 * utils.h: New file.
6991
6992 2013-09-05 Pedro Alves <palves@redhat.com>
6993
6994 * server.h (remote_debug, noack_mode, transport_is_reliable)
6995 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6996 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6997 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6998 (write_enn, initialize_async_io, enable_async_io)
6999 (disable_async_io, check_remote_input_interrupt_request)
7000 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7001 (dead_thread_notify, prepare_resume_reply)
7002 (decode_address_to_semicolon, decode_address, decode_m_packet)
7003 (decode_M_packet, decode_X_packet, decode_xfer_write)
7004 (decode_search_memory_packet, unhexify, hexify)
7005 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7006 (look_up_one_symbol, relocate_instruction)
7007 (monitor_output): Move to remote-utils.h, and include it.
7008 * remote-utils.h: New file.
7009
7010 2013-09-05 Pedro Alves <palves@redhat.com>
7011
7012 * server.h (_): Delete.
7013
7014 2013-09-02 Pedro Alves <palves@redhat.com>
7015
7016 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7017 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7018 allocated.
7019 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7020
7021 2013-09-02 Pierre Muller <muller@sourceware.org>
7022
7023 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7024 or WriteProcessMemory complete successfully and handle
7025 ERROR_PARTIAL_COPY error.
7026
7027 2013-09-02 Pedro Alves <palves@redhat.com>
7028
7029 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7030 error instead of EIO.
7031
7032 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7033
7034 PR server/15604
7035 * linux-low.c: Include filestuff.h.
7036 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7037 * lynx-low.c: Include filestuff.h.
7038 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7039 * server.c: Include filestuff.h.
7040 (main): Call notice_open_fds.
7041 * spu-low.c: Include filestuff.h.
7042 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7043
7044 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7045
7046 * Makefile.in: Explain why ../target and ../nat are not
7047 listed as include file search paths.
7048 (linux-waitpid.o): New object file rule.
7049 * configure.srv (srv_native_linux_obj): New variable.
7050 Replace all occurrences of linux native object files with
7051 $srv_native_linux_obj.
7052 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7053 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7054 (linux_enable_event_reporting): Remove declaration.
7055 (my_waitpid): Moved to common/linux-waitpid.c.
7056 (linux_wait_for_event): Pass ptid when calling
7057 linux_enable_event_reporting.
7058 (linux_supports_tracefork_flag): Remove.
7059 (linux_enable_event_reporting): Likewise.
7060 (linux_tracefork_grandchild): Remove.
7061 (STACK_SIZE): Moved to common/linux-ptrace.c.
7062 (linux_tracefork_child): Remove.
7063 (linux_test_for_tracefork): Remove.
7064 (linux_look_up_symbols): Call linux_supports_traceclone.
7065 (initialize_low): Remove call to linux_test_for_tracefork.
7066 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7067 common/linux-ptrace.h.
7068 (PTRACE_TYPE_ARG4): Likewise.
7069 Include linux-ptrace.h.
7070
7071 2013-08-21 Pedro Alves <palves@redhat.com>
7072
7073 * config.in: Renegerate.
7074
7075 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7076
7077 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7078 (SFILES): Remove $(srcdir)/common/target-common.c and
7079 add $(srcdir)/target/waitstatus.c.
7080 (OBS): Remove target-common.o and add waitstatus.o.
7081 (server_h): Remove $(srcdir)/../common/target-common.h and
7082 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7083 and $(srcdir)/../target/waitstatus.h.
7084 (target-common.o): Remove.
7085 (waitstatus.o): New target object file.
7086 * target.h: Do not include target-common.h and
7087 include target/resume.h, target/wait.h and
7088 target/waitstatus.h.
7089
7090 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7091
7092 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7093 to PTRACE_TYPE_ARG3.
7094 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7095 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7096 PTRACE_TYPE_ARG4.
7097 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7098 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7099
7100 2013-07-27 Jie Zhang <jie@codesourcery.com>
7101 Daniel Jacobowitz <dan@codesourcery.com>
7102 Yao Qi <yao@codesourcery.com>
7103
7104 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7105 (mips-linux-watch.o): New rule.
7106 (mips_linux_watch_h): New variable.
7107 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7108 srv_tgtobj.
7109 * linux-mips-low.c: Include mips-linux-watch.h.
7110 (struct arch_process_info, struct arch_lwp_info): New.
7111 (update_watch_registers_callback): New function.
7112 (mips_linux_new_process, mips_linux_new_thread) New functions.
7113 (mips_linux_prepare_to_resume, mips_insert_point): New
7114 functions.
7115 (mips_remove_point, mips_stopped_by_watchpoint): New
7116 functions.
7117 (rsp_bp_type_to_target_hw_bp_type): New function.
7118 (mips_stopped_data_address): New function.
7119 (the_low_target): Add watchpoint support functions.
7120
7121 2013-07-27 Yao Qi <yao@codesourcery.com>
7122
7123 * i386-low.c: Include break-common.h.
7124 (enum target_hw_bp_type): Remove.
7125
7126 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7127
7128 * Makefile.in (SFILES): /common/target-common.c.
7129 (OBS): Add target-common.o.
7130 (server_h): Add $(srcdir)/../common/target-common.h.
7131 (target-common.o): New target.
7132 * server.c (queue_stop_reply_callback): Free
7133 status string after use.
7134 * target.c (target_waitstatus_to_string): Remove.
7135 * target.h: Include target-common.h.
7136 (resume_kind): Likewise.
7137 (target_waitkind): Likewise.
7138 (target_waitstatus): Likewise.
7139 (TARGET_WNOHANG): Likewise.
7140
7141 2013-07-04 Yao Qi <yao@codesourcery.com>
7142
7143 * Makefile.in (host_alias): Use @host_noncanonical@.
7144 (target_alias): Use @target_noncanonical@.
7145 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7146 ACX_NONCANONICAL_HOST.
7147 * configure: Regenerated.
7148
7149 Revert:
7150 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7151
7152 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7153 * configure: Rebuild.
7154 * Makefile.in (version_host, version_target): Get from configure.
7155 (version.c): Use $(version_host) and $(version_target).
7156
7157 2013-07-03 Pedro Alves <palves@redhat.com>
7158
7159 * Makefile.in (config.status): Depend on development.sh.
7160 * acinclude.m4: Include libmcheck.m4.
7161 * configure: Regenerate.
7162
7163 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7164
7165 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7166 attribute inside the parentheses.
7167 (winapi_DebugSetProcessKillOnExit): Ditto.
7168 (winapi_DebugBreakProcess): Ditto.
7169 (winapi_GenerateConsoleCtrlEvent): Ditto.
7170
7171 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7172
7173 * notif.h (notif_event): Add a dummy member to avoid compiler
7174 errors.
7175
7176 2013-07-01 Pedro Alves <palves@redhat.com>
7177
7178 * hostio.c (HOSTIO_PATH_MAX): Define.
7179 (require_filename, handle_open, handle_unlink, handle_readlink):
7180 Use it.
7181
7182 2013-07-01 Pedro Alves <palves@redhat.com>
7183
7184 * server.h: Include "pathmax.h".
7185 * linux-low.c: Don't include sys/param.h.
7186 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7187 MAXPATHLEN.
7188 * win32-low.c: Don't include sys/param.h.
7189 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7190
7191 2013-07-01 Pedro Alves <palves@redhat.com>
7192
7193 * event-loop.c: Don't check HAVE_UNISTD_H before including
7194 <unistd.h>.
7195 * gdbreplay.c: Likewise.
7196 * remote-utils.c: Likewise.
7197 * server.c: Likewise.
7198 * configure.ac: Don't check for unistd.h.
7199 * configure: Regenerate.
7200
7201 2013-06-28 Tom Tromey <tromey@redhat.com>
7202
7203 * Makefile.in (version.c): Use version.in, not
7204 common/version.in.
7205
7206 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7207
7208 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7209 * configure: Rebuild.
7210 * Makefile.in (version_host, version_target): Get from configure.
7211 (version.c): Use $(version_host) and $(version_target).
7212
7213 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7214
7215 Fix trace-status to output user name without trailing colon.
7216 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7217
7218 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7219
7220 Fix trace-status to output proper start-time and stop-time.
7221 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7222 output start time and stop time in hex as gdb expects.
7223
7224 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7225
7226 * tracepoint.c (build_traceframe_info_xml): Output trace state
7227 variables present in the trace buffer.
7228
7229 2013-06-24 Tom Tromey <tromey@redhat.com>
7230
7231 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7232 create-version.sh.
7233 (version.o): Remove.
7234 * gdbreplay.c: Include version.h.
7235 (version, host_name): Don't declare.
7236 * server.h: Include version.h.
7237 (version, host_name): Don't declare.
7238
7239 2013-06-12 Pedro Alves <palves@redhat.com>
7240
7241 * linux-x86-low.c (linux_is_elf64): Delete global.
7242 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7243 with local linux_pid_exe_is_elf_64_file use.
7244
7245 2013-06-11 Pedro Alves <palves@redhat.com>
7246
7247 * linux-low.c (regset_disabled, disable_regset): New functions.
7248 (regsets_fetch_inferior_registers)
7249 (regsets_store_inferior_registers): Use them.
7250 (initialize_regsets_info); Don't allocate the disabled_regsets
7251 array here.
7252 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7253 comment.
7254
7255 2013-06-11 Pedro Alves <palves@redhat.com>
7256
7257 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7258 xmalloc.
7259
7260 2013-06-11 Pedro Alves <palves@redhat.com>
7261
7262 * linux-x86-low.c (initialize_low_arch): Call
7263 init_registers_x32_avx_linux.
7264
7265 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7266
7267 Fix compatibility with Android Bionic.
7268 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7269 it is not empty.
7270
7271 2013-06-07 Pedro Alves <palves@redhat.com>
7272
7273 PR server/14823
7274 * Makefile.in (OBS): Add tdesc.o.
7275 (IPA_OBJS): Add tdesc-ipa.o.
7276 (tdesc-ipa.o): New rule.
7277 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7278 interface.
7279 * linux-low.c (new_inferior): Delete.
7280 (disabled_regsets, num_regsets): Delete.
7281 (linux_add_process): Adjust to set the new per-process
7282 new_inferior flag.
7283 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7284 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7285 was a stop. When calling arch_setup, switch the current inferior
7286 to the thread that got an event.
7287 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7288 (regsets_fetch_inferior_registers)
7289 (regsets_store_inferior_registers): New regsets_info parameter.
7290 Adjust to use it.
7291 (linux_register_in_regsets): New regs_info parameter. Adjust to
7292 use it.
7293 (register_addr, fetch_register, store_register): New usrregs_info
7294 parameter. Adjust to use it.
7295 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7296 parameter regs_info. Adjust to use it.
7297 (linux_fetch_registers): Get the current inferior's regs_info, and
7298 adjust to use it.
7299 (linux_store_registers): Ditto.
7300 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7301 (initialize_low): Don't initialize the target_regsets here. Call
7302 initialize_low_arch.
7303 * linux-low.h (target_regsets): Delete declaration.
7304 (struct regsets_info): New.
7305 (struct usrregs_info): New.
7306 (struct regs_info): New.
7307 (struct process_info_private) <new_inferior>: New field.
7308 (struct linux_target_ops): Delete the num_regs, regmap, and
7309 regset_bitmap fields. New field regs_info.
7310 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7311 * i387-fp.c (num_xmm_registers): Delete.
7312 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7313 calls to new interface.
7314 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7315 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7316 Infer the number of xmm registers from the regcache's target
7317 description.
7318 * i387-fp.h (num_xmm_registers): Delete.
7319 * inferiors.c (add_thread): Don't install the thread's regcache
7320 here.
7321 * proc-service.c (gregset_info): Fetch the current inferior's
7322 regs_info. Adjust to use it.
7323 * regcache.c: Include tdesc.h.
7324 (register_bytes, reg_defs, num_registers)
7325 (gdbserver_expedite_regs): Delete.
7326 (get_thread_regcache): If the thread doesn't have a regcache yet,
7327 create one, instead of aborting gdbserver.
7328 (regcache_invalidate_one): Rename to ...
7329 (regcache_invalidate_thread): ... this.
7330 (regcache_invalidate_one): New.
7331 (regcache_invalidate): Only invalidate registers of the current
7332 process.
7333 (init_register_cache): Add target_desc parameter, and use it.
7334 (new_register_cache): Ditto. Assert the target description has a
7335 non zero registers_size.
7336 (regcache_cpy): Add assertions. Adjust.
7337 (realloc_register_cache, set_register_cache): Delete.
7338 (registers_to_string, registers_from_string): Adjust.
7339 (find_register_by_name, find_regno, find_register_by_number)
7340 (register_cache_size): Add target_desc parameter, and use it.
7341 (free_register_cache_thread, free_register_cache_thread_one)
7342 (regcache_release, register_cache_size): New.
7343 (register_size): Add target_desc parameter, and use it.
7344 (register_data, supply_register, supply_register_zeroed)
7345 (supply_regblock, supply_register_by_name, collect_register)
7346 (collect_register_as_string, collect_register_by_name): Adjust.
7347 * regcache.h (struct target_desc): Forward declare.
7348 (struct regcache) <tdesc>: New field.
7349 (init_register_cache, new_register_cache): Add target_desc
7350 parameter.
7351 (regcache_invalidate_thread): Declare.
7352 (regcache_invalidate_one): Delete declaration.
7353 (regcache_release): Declare.
7354 (find_register_by_number, register_cache_size, register_size)
7355 (find_regno): Add target_desc parameter.
7356 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7357 declarations.
7358 * remote-utils.c: Include tdesc.h.
7359 (outreg, prepare_resume_reply): Adjust.
7360 * server.c: Include tdesc.h.
7361 (gdbserver_xmltarget): Delete declaration.
7362 (get_features_xml, process_serial_event): Adjust.
7363 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7364 declare.
7365 (struct process_info) <tdesc>: New field.
7366 (ipa_tdesc): Declare.
7367 * tdesc.c: New file.
7368 * tdesc.h: New file.
7369 * tracepoint.c: Include tdesc.h.
7370 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7371 (get_context_regcache): Adjust to pass ipa_tdesc down.
7372 (do_action_at_tracepoint): Adjust to get the register cache size
7373 from the context regcache's description.
7374 (traceframe_walk_blocks): Adjust to get the register cache size
7375 from the current trace frame's description.
7376 (traceframe_get_pc): Adjust to get current trace frame's
7377 description and pass it down.
7378 (gdb_collect): Adjust to get the register cache size from the
7379 IPA's description.
7380 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7381 (gdbserver_xmltarget): Delete.
7382 (initialize_low_tracepoint): Set the ipa's target description.
7383 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7384 (initialize_low_tracepoint): Set the ipa's target description.
7385 * linux-x86-low.c: Include tdesc.h.
7386 [__x86_64__] (is_64bit_tdesc): New.
7387 (ps_get_thread_area, x86_get_thread_area): Use it.
7388 (i386_cannot_store_register): Rename to ...
7389 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7390 (i386_cannot_fetch_register): Rename to ...
7391 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7392 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7393 to new interface.
7394 (target_regsets): Rename to ...
7395 (x86_regsets): ... this.
7396 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7397 interface.
7398 (x86_siginfo_fixup): Use is_64bit_tdesc.
7399 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7400 (tdesc_x32_avx_linux, tdesc_x32_linux)
7401 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7402 Declare.
7403 (x86_linux_update_xmltarget): Delete.
7404 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7405 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7406 (AMD64_LINUX_USER64_CS): New.
7407 (x86_linux_read_description): New, based on
7408 x86_linux_update_xmltarget.
7409 (same_process_callback): New.
7410 (x86_arch_setup_process_callback): New.
7411 (x86_linux_update_xmltarget): New.
7412 (x86_regsets_info): New.
7413 (amd64_linux_regs_info): New.
7414 (i386_linux_usrregs_info): New.
7415 (i386_linux_regs_info): New.
7416 (x86_linux_regs_info): New.
7417 (x86_arch_setup): Reimplement.
7418 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7419 (x86_emit_ops): Ditto.
7420 (the_low_target): Adjust. Install x86_linux_regs_info,
7421 x86_cannot_fetch_register, and x86_cannot_store_register.
7422 (initialize_low_arch): New.
7423 * linux-ia64-low.c (tdesc_ia64): Declare.
7424 (ia64_fetch_register): Adjust.
7425 (ia64_usrregs_info, regs_info): New globals.
7426 (ia64_regs_info): New function.
7427 (the_low_target): Adjust.
7428 (initialize_low_arch): New function.
7429 * linux-sparc-low.c (tdesc_sparc64): Declare.
7430 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7431 Adjust.
7432 (sparc_arch_setup): New function.
7433 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7434 (the_low_target): Adjust.
7435 (initialize_low_arch): New function.
7436 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7437 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7438 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7439 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7440 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7441 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7442 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7443 (tdesc_powerpc_isa205_vsx64l): Declare.
7444 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7445 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7446 (ppc_set_pc, ppc_get_hwcap): Adjust.
7447 (ppc_usrregs_info): Forward declare.
7448 (!__powerpc64__) ppc_regmap_adjusted: New global.
7449 (ppc_arch_setup): Adjust to the current process'es target
7450 description.
7451 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7452 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7453 (ppc_store_evrregset): Adjust.
7454 (target_regsets): Rename to ...
7455 (ppc_regsets): ... this, and make static.
7456 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7457 (ppc_regs_info): New function.
7458 (the_low_target): Adjust.
7459 (initialize_low_arch): New function.
7460 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7461 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7462 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7463 (tdesc_s390x_linux64v2): Declare.
7464 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7465 (s390_fill_gregset, s390_store_last_break): Adjust.
7466 (target_regsets): Rename to ...
7467 (s390_regsets): ... this, and make static.
7468 (s390_get_pc, s390_set_pc): Adjust.
7469 (s390_get_hwcap): New target_desc parameter, and use it.
7470 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7471 (s390_arch_setup): Adjust to set the current process'es target
7472 description. Don't adjust the regmap.
7473 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7474 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7475 (regs_info_3264): New globals.
7476 (s390_regs_info): New function.
7477 (the_low_target): Adjust.
7478 (initialize_low_arch): New function.
7479 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7480 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7481 [__mips64] (init_registers_mips_linux)
7482 (init_registers_mips_dsp_linux): Delete defines.
7483 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7484 (have_dsp): New global.
7485 (mips_read_description): New, based on mips_arch_setup.
7486 (mips_arch_setup): Reimplement.
7487 (get_usrregs_info): New function.
7488 (mips_cannot_fetch_register, mips_cannot_store_register)
7489 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7490 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7491 (target_regsets): Rename to ...
7492 (mips_regsets): ... this, and make static.
7493 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7494 (dsp_regs_info, regs_info): New globals.
7495 (mips_regs_info): New function.
7496 (the_low_target): Adjust.
7497 (initialize_low_arch): New function.
7498 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7499 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7500 Declare.
7501 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7502 (arm_read_description): New, with bits factored from
7503 arm_arch_setup.
7504 (arm_arch_setup): Reimplement.
7505 (target_regsets): Rename to ...
7506 (arm_regsets): ... this, and make static.
7507 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7508 (arm_regs_info): New function.
7509 (the_low_target): Adjust.
7510 (initialize_low_arch): New function.
7511 * linux-m68k-low.c (tdesc_m68k): Declare.
7512 (target_regsets): Rename to ...
7513 (m68k_regsets): ... this, and make static.
7514 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7515 (m68k_regs_info): New function.
7516 (m68k_arch_setup): New function.
7517 (the_low_target): Adjust.
7518 (initialize_low_arch): New function.
7519 * linux-sh-low.c (tdesc_sharch): Declare.
7520 (target_regsets): Rename to ...
7521 (sh_regsets): ... this, and make static.
7522 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7523 (sh_regs_info, sh_arch_setup): New functions.
7524 (the_low_target): Adjust.
7525 (initialize_low_arch): New function.
7526 * linux-bfin-low.c (tdesc_bfin): Declare.
7527 (bfin_arch_setup): New function.
7528 (bfin_usrregs_info, regs_info): New globals.
7529 (bfin_regs_info): New function.
7530 (the_low_target): Adjust.
7531 (initialize_low_arch): New function.
7532 * linux-cris-low.c (tdesc_cris): Declare.
7533 (cris_arch_setup): New function.
7534 (cris_usrregs_info, regs_info): New globals.
7535 (cris_regs_info): New function.
7536 (the_low_target): Adjust.
7537 (initialize_low_arch): New function.
7538 * linux-cris-low.c (tdesc_crisv32): Declare.
7539 (cris_arch_setup): New function.
7540 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7541 (cris_regs_info): New function.
7542 (the_low_target): Adjust.
7543 (initialize_low_arch): New function.
7544 * linux-m32r-low.c (tdesc_m32r): Declare.
7545 (m32r_arch_setup): New function.
7546 (m32r_usrregs_info, regs_info): New globals.
7547 (m32r_regs_info): Adjust.
7548 (initialize_low_arch): New function.
7549 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7550 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7551 (tic6x_usrregs_info): Forward declare.
7552 (tic6x_read_description): New function, based on ...
7553 (tic6x_arch_setup): ... this. Reimplement.
7554 (target_regsets): Rename to ...
7555 (tic6x_regsets): ... this, and make static.
7556 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7557 (tic6x_regs_info): New function.
7558 (the_low_target): Adjust.
7559 (initialize_low_arch): New function.
7560 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7561 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7562 (target_regsets): Rename to ...
7563 (xtensa_regsets): ... this, and make static.
7564 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7565 globals.
7566 (xtensa_arch_setup, xtensa_regs_info): New functions.
7567 (the_low_target): Adjust.
7568 (initialize_low_arch): New function.
7569 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7570 (nios2_arch_setup): Set the current process'es tdesc.
7571 (target_regsets): Rename to ...
7572 (nios2_regsets): ... this.
7573 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7574 (nios2_regs_info): New function.
7575 (the_low_target): Adjust.
7576 (initialize_low_arch): New function.
7577 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7578 (aarch64_arch_setup): Set the current process'es tdesc.
7579 (target_regsets): Rename to ...
7580 (aarch64_regsets): ... this.
7581 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7582 (aarch64_regs_info): New function.
7583 (the_low_target): Adjust.
7584 (initialize_low_arch): New function.
7585 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7586 globals.
7587 (target_regsets): Rename to ...
7588 (tile_regsets): ... this.
7589 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7590 (tile_regs_info): New function.
7591 (tile_arch_setup): Set the current process'es tdesc.
7592 (the_low_target): Adjust.
7593 (initialize_low_arch): New function.
7594 * spu-low.c (tdesc_spu): Declare.
7595 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7596 * win32-arm-low.c (tdesc_arm): Declare.
7597 (arm_arch_setup): New function.
7598 (the_low_target): Install arm_arch_setup instead of
7599 init_registers_arm.
7600 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7601 (init_windows_x86): Rename to ...
7602 (i386_arch_setup): ... this. Set `win32_tdesc'.
7603 (the_low_target): Adjust.
7604 * win32-low.c (win32_tdesc): New global.
7605 (child_add_thread): Don't create the thread cache here.
7606 (do_initial_child_stuff): Set the new process'es tdesc.
7607 * win32-low.h (struct target_desc): Forward declare.
7608 (win32_tdesc): Declare.
7609 * lynx-i386-low.c (tdesc_i386): Declare global.
7610 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7611 * lynx-low.c (lynx_tdesc): New global.
7612 (lynx_add_process): Set the new process'es tdesc.
7613 * lynx-low.h (struct target_desc): Forward declare.
7614 (lynx_tdesc): Declare global.
7615 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7616 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7617 * nto-low.c (nto_tdesc): New global.
7618 (do_attach): Set the new process'es tdesc.
7619 * nto-low.h (struct target_desc): Forward declare.
7620 (nto_tdesc): Declare.
7621 * nto-x86-low.c (tdesc_i386): Declare.
7622 (nto_x86_arch_setup): Set `nto_tdesc'.
7623
7624 2013-06-04 Gary Benson <gbenson@redhat.com>
7625
7626 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7627 to qSupported response when appropriate.
7628 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7629 with nonzero-length annex.
7630 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7631 arguments supplied in annex.
7632
7633 2013-05-31 Doug Evans <dje@google.com>
7634
7635 PR server/15594
7636 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7637 64 bits in 64-cross-32 environment.
7638
7639 2013-05-28 Pedro Alves <palves@redhat.com>
7640
7641 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7642 (aarch64-without-fpu.c): Delete rule.
7643 * configure.srv (aarch64*-*-linux*): Remove references to
7644 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7645 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7646 declaration.
7647
7648 2013-05-24 Pedro Alves <palves@redhat.com>
7649
7650 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7651 instead of strchr/decode_address. Error if the range isn't split
7652 with a ','. Don't assume there's be a ':' in the action.
7653
7654 2013-05-23 Yao Qi <yao@codesourcery.com>
7655 Pedro Alves <palves@redhat.com>
7656
7657 * linux-low.c (lwp_in_step_range): New function.
7658 (linux_wait_1): If the thread was range stepping and stopped
7659 outside the stepping range, report the stop to GDB. Otherwise,
7660 continue stepping. Add range stepping debug output.
7661 (linux_set_resume_request): Copy the step range from the resume
7662 request to the lwp.
7663 (linux_supports_range_stepping): New.
7664 (linux_target_ops) <supports_range_stepping>: Set to
7665 linux_supports_range_stepping.
7666 * linux-low.h (struct linux_target_ops)
7667 <supports_range_stepping>: New field.
7668 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7669 * linux-x86-low.c (x86_supports_range_stepping): New.
7670 (the_low_target) <supports_range_stepping>: Set to
7671 x86_supports_range_stepping.
7672 * server.c (handle_v_cont): Handle 'r' action.
7673 (handle_v_requests): Append ";r" if the target supports range
7674 stepping.
7675 * target.h (struct thread_resume) <step_range_start,
7676 step_range_end>: New fields.
7677 (struct target_ops) <supports_range_stepping>:
7678 New field.
7679 (target_supports_range_stepping): New macro.
7680
7681 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7682
7683 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7684 confusion in comment.
7685
7686 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7687
7688 * lynx-low.c (struct process_info_private): New type.
7689 (lynx_add_process): New function.
7690 (lynx_create_inferior, lynx_attach): Replace calls to
7691 add_process by calls to lynx_add_process.
7692 (lynx_resume): If PTID is null, then try using
7693 current_process()->private->last_wait_event_ptid.
7694 Add comments.
7695 (lynx_clear_inferiors): Delete. The contents of that function
7696 has been inlined in lynx_mourn;
7697 (lynx_wait_1): Save the ptid in the process's private data.
7698 (lynx_mourn): Free the process' private data. Replace call
7699 to lynx_clear_inferiors by call to clear_inferiors.
7700
7701 2013-05-17 Yao Qi <yao@codesourcery.com>
7702
7703 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7704 the right place.
7705
7706 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7707
7708 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7709 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7710 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7711 PT_TEXT_END_ADDR guards. Update comments.
7712 (linux_target_op) <read_offsets>: Conditionally define to
7713 linux_read_offsets if the target is UCLIBC and if it defines
7714 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7715
7716 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7717 Andrew Jenner <andrew@codesourcery.com>
7718
7719 * Makefile.in (SFILES): Add linux-nios2-low.c.
7720 (clean): Add action to delete nios2-linux.c.
7721 (nios2-linux.c): New rule.
7722 * configure.srv: Add nios2*-*-linux*.
7723 * linux-nios2-low.c: New.
7724
7725 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7726
7727 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7728
7729 2013-04-25 Hui Zhu <hui@codesourcery.com>
7730
7731 PR gdb/15186
7732 * ax.c (ax_printf): Add fflush.
7733
7734 2013-04-22 Tom Tromey <tromey@redhat.com>
7735
7736 * Makefile.in (SFILES): Add filestuff.c.
7737 (OBS): Add filestuff.o.
7738 (filestuff.o): New target.
7739 * config.in, configure: Rebuild.
7740 * configure.ac: Check for fdwalk, pipe2.
7741
7742 2013-04-17 Pedro Alves <palves@redhat.com>
7743
7744 * configure.ac (USE_THREAD_DB): Delete variable.
7745 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7746 Don't AC_SUBST USE_THREAD_DB.
7747 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7748 * config.in, configure: Regenerate.
7749
7750 2013-04-16 Pedro Alves <palves@redhat.com>
7751
7752 * linux-low.h (struct lwp_info) <thread_known>: Move under
7753 the USE_THREAD_DB #ifdef.
7754
7755 2013-04-16 Pedro Alves <palves@redhat.com>
7756
7757 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7758 (linux-low.o): Delete rule.
7759 * linux-low.h: Always include "gdb_thread_db.h" instead of
7760 conditionally including thread_db.h.
7761 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7762 HAVE_THREAD_DB_H.
7763
7764 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7765
7766 * Makefile.in (install-only): Fix make install regression.
7767
7768 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7769
7770 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7771 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7772 installation.
7773 * gdbserver.1: Remove.
7774
7775 2013-03-22 Pedro Alves <palves@redhat.com>
7776
7777 * linux-low.c (handle_extended_wait): Don't call
7778 linux_enable_event_reporting.
7779
7780 2013-03-15 Tony Theodore <tonyt@logyst.com>
7781
7782 PR build/9098:
7783 * Makefile.in (SHELL): Use @SHELL@.
7784
7785 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7786
7787 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7788 compiler warning.
7789
7790 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7791
7792 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7793 Remove extraneous NULL element.
7794
7795 2013-03-13 Yao Qi <yao@codesourcery.com>
7796
7797 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7798 'V' block in trace frame.
7799
7800 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7801
7802 * target.h (struct target_ops): Add btrace ops.
7803 (target_supports_btrace): New macro.
7804 (target_enable_btrace): New macro.
7805 (target_disable_btrace): New macro.
7806 (target_read_btrace): New macro.
7807 * gdbthread.h (struct thread_info): Add btrace field.
7808 * server.c: Include btrace-common.h.
7809 (handle_btrace_general_set): New function.
7810 (handle_btrace_enable): New function.
7811 (handle_btrace_disable): New function.
7812 (handle_general_set): Call handle_btrace_general_set.
7813 (handle_qxfer_btrace): New function.
7814 (struct qxfer qxfer_packets[]): Add btrace entry.
7815 * inferiors.c (remove_thread): Disable btrace.
7816 * linux-low: Include linux-btrace.h.
7817 (linux_low_enable_btrace): New function.
7818 (linux_low_read_btrace): New function.
7819 (linux_target_ops): Add btrace ops.
7820 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7821 Add srv_linux_btrace=yes.
7822 (x86_64-*-linux*): Add linux-btrace.o.
7823 Add srv_linux_btrace=yes.
7824 * configure.ac: Define HAVE_LINUX_BTRACE.
7825 * config.in: Regenerated.
7826 * configure: Regenerated.
7827
7828 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7829
7830 * server.c (handle_qxfer): Preserve error message if -3 is
7831 returned.
7832 (qxfer): Document the -3 return value.
7833
7834 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7835
7836 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7837 (linux_btrace_h): New variable.
7838 (linux-btrace.o): New rule.
7839
7840 2013-03-08 Stan Shebs <stan@codesourcery.com>
7841 Hafiz Abid Qadeer <abidh@codesourcery.com>
7842
7843 * tracepoint.c (trace_buffer_size): New global.
7844 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7845 (init_trace_buffer): Change to one-argument function. Allocate
7846 trace buffer memory.
7847 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7848 handle QTBuffer:size packet.
7849 (cmd_bigqtbuffer_size): New function.
7850 (initialize_tracepoint): Call init_trace_buffer with
7851 DEFAULT_TRACE_BUFFER_SIZE.
7852 * server.c (handle_query): Add QTBuffer:size in the
7853 supported packets.
7854
7855 2013-03-07 Yao Qi <yao@codesourcery.com>
7856
7857 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7858 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7859 of -1.
7860 (cmd_qtsp): Adjust condition. Do post increment.
7861 Set cur_action and cur_step_action back to 0.
7862
7863 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7864
7865 PR server/15236
7866 * linux-low.c (linux_write_memory): Return early success if LEN is
7867 zero.
7868
7869 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7870
7871 * configure.srv: Add x86_64-*-cygwin* as target.
7872
7873 2013-02-28 Tom Tromey <tromey@redhat.com>
7874
7875 * configure.ac: Invoke AC_SYS_LARGEFILE.
7876 * configure, config.in: Rebuild.
7877
7878 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7879
7880 * win32-low.c: Throughout, fix format strings and casts of
7881 printf-like functions to avoid type related warnings on all
7882 platforms.
7883 (get_child_debug_event): Print dwDebugEventCode as hex since
7884 that's how it's usually documented.
7885
7886 2013-02-28 Yao Qi <yao@codesourcery.com>
7887
7888 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7889 pulongest.
7890
7891 2013-02-27 Jiong Wang <jiwang@tilera.com>
7892
7893 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7894 (reg-tilegx32.c): New rule.
7895 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7896 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7897 different register info initializer according to elf class.
7898 (init_registers_tilgx32): New function. The tilegx32 register info
7899 initializer.
7900 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7901 (tile_store_gregset): Likewise.
7902
7903 2013-02-27 Yao Qi <yao@codesourcery.com>
7904
7905 * server.c (process_point_options): Print debug message when
7906 debug_threads is true.
7907
7908 2013-02-26 Yao Qi <yao@codesourcery.com>
7909
7910 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7911
7912 2013-02-19 Pedro Alves <palves@redhat.com>
7913 Kai Tietz <ktietz@redhat.com>
7914
7915 PR gdb/15161
7916
7917 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7918 instead of strtoul to extract address from packet.
7919 (process_serial_event) <'z'>: Likewise.
7920
7921 2013-02-18 Yao Qi <yao@codesourcery.com>
7922
7923 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7924
7925 2013-02-14 Pedro Alves <palves@redhat.com>
7926
7927 Plug memory leak.
7928
7929 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7930 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7931
7932 2013-02-14 Pedro Alves <palves@redhat.com>
7933
7934 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7935
7936 2013-02-14 Pedro Alves <palves@redhat.com>
7937
7938 * tracepoint.c (save_string): Delete.
7939 (add_tracepoint_action): Use savestring instead of save_string.
7940
7941 2013-02-12 Pedro Alves <palves@redhat.com>
7942
7943 * linux-xtensa-low.c: Ditto.
7944 * xtensa-xtregs.c: Ditto.
7945
7946 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7947
7948 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7949 thread_db.
7950
7951 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7952
7953 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7954 aarch64_num_wp_regs and aarch64_num_bp_regs to
7955 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7956
7957 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7958
7959 * linux-aarch64-low.c (ps_get_thread_area): Replace
7960 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7961
7962 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7963 Marcus Shawcroft <marcus.shawcroft@arm.com>
7964 Nigel Stephens <nigel.stephens@arm.com>
7965 Yufeng Zhang <yufeng.zhang@arm.com>
7966
7967 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7968 (aarch64.c, aarch64-without-fpu.c): New targets.
7969 * configure.srv (aarch64*-*-linux*): New.
7970 * linux-aarch64-low.c: New file.
7971
7972 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7973
7974 * linux-low.c (handle_extended_wait, linux_create_inferior)
7975 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7976 (dequeue_one_deferred_signal, linux_resume_one_thread)
7977 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7978 (linux_tracefork_grandchild, linux_test_for_tracefork)
7979 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7980 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7981 where the argument is 0.
7982
7983 2013-01-25 Yao Qi <yao@codesourcery.com>
7984
7985 * event-loop.c: Include "queue.h".
7986 (gdb_event_p): New typedef.
7987 (struct gdb_event) <next_event>: Remove.
7988 (event_queue): Change to QUEUE(gdb_event_p).
7989 (async_queue_event): Remove.
7990 (gdb_event_xfree): New.
7991 (initialize_event_loop): New.
7992 (process_event): Use API from QUEUE.
7993 (wait_for_event): Likewise.
7994 * server.c (main): Call initialize_event_loop.
7995 * server.h (initialize_event_loop): Declare.
7996
7997 2013-01-18 Yao Qi <yao@codesourcery.com>
7998
7999 * ax.h (struct eval_agent_expr_context): New.
8000 (gdb_eval_agent_expr): Update declaration.
8001 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8002 TFRAME. Add new argument CTX.
8003 * server.h (struct eval_agent_expr_context): Declare.
8004 (agent_mem_read, agent_tsv_read): Update declaration.
8005 (agent_mem_read_string): Likewise.
8006 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8007 (add_traceframe_block): Add new argument TPOINT.
8008 Increase TPOINT->traceframe_usage.
8009 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8010 eval_tracepoint_agent_expr.
8011 (condition_true_at_tracepoint): Likewise.
8012 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8013 (agent_mem_read_string, agent_tsv_read): Likewise.
8014
8015 2013-01-16 Yao Qi <yao@codesourcery.com>
8016
8017 * linux-low.c (linux_resume_one_lwp): Don't check
8018 'lwp->bp_reinsert != 0'.
8019
8020 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8021 Pedro Alves <palves@redhat.com>
8022
8023 * lynx-low.c (ptrace_request_to_str): Define a temporary
8024 macro and use it to simplify this function's implementation.
8025
8026 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8027
8028 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8029 sets errno.
8030
8031 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8032
8033 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8034
8035 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8036
8037 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8038
8039 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8040
8041 * lynx-low.c (lynx_resume): Use the resume_info parameter
8042 to determine the ptid for the lynx_ptrace call, unless
8043 it is equal to minus_one_ptid, in which case we use the
8044 ptid of the current_inferior.
8045 (lynx_wait_1): After having received a thread create/exit
8046 event, resume the inferior's execution using the signaling
8047 thread's ptid, rather than the old ptid.
8048
8049 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8050
8051 * lynx-low.c (lynx_resume): Delete variable ret.
8052
8053 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8054
8055 * gdbreplay.c (gdbreplay_version): Update copyright year.
8056 * server.c (gdbserver_version): Likewise.
8057
8058 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8059
8060 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8061 new thread.
8062
8063 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8064
8065 * lynx-low.c (ptrace_request_to_str): Add handling for
8066 PTRACE_GETTRACESIG.
8067
8068 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8069
8070 * lynx-low.c (lynx_attach): Delete variable new_process.
8071
8072 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8073
8074 * lynx-low.c (lynx_create_inferior): Delete variable
8075 new_process.
8076
8077 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8078
8079 * lynx-low.c (ptrace_request_to_str): Do not handle
8080 PTRACE_GETTHREADLIST if this macro does not exist.
8081
8082 2012-12-15 Yao Qi <yao@codesourcery.com>
8083
8084 * Makefile.in (OBS): Add notif.o.
8085 * notif.c, notif.h: New.
8086 * server.c: Include "notif.h".
8087 (struct vstop_notif) <next>: Remove.
8088 <base>: New field.
8089 (queue_stop_reply): Update.
8090 (push_event, send_next_stop_reply): Remove.
8091 (discard_queued_stop_replies): Update.
8092 (notif_stop): New variable.
8093 (handle_v_stopped): Remove.
8094 (handle_v_requests): Don't call handle_v_stopped. Call
8095 handle_ack_notif instead.
8096 (queue_stop_reply_callback): Call notif_event_enque instead
8097 of queue_stop_reply.
8098 (handle_status): Don't call send_next_stop_reply, call
8099 notif_write_event instead.
8100 (kill_inferior_callback): Likewise.
8101 (detach_or_kill_inferior_callback): Likewise.
8102 (main): Call initialize_notif.
8103 (process_serial_event): Call QUEUE_is_empty.
8104 (handle_target_event): Call notif_push instead of push event.
8105 * server.h (push_event): Remove declaration.
8106
8107 2012-12-10 Tom Tromey <tromey@redhat.com>
8108
8109 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8110 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8111 macros.
8112 (.c.o): Rewrite.
8113 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8114 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8115 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8116 (amd64-linux-ipa.o, ax.o): Rewrite.
8117 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8118 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8119 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8120 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8121 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8122 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8123 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8124 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8125 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8126 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8127 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8128 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8129 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8130 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8131 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8132 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8133 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8134 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8135 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8136 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8137 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8138 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8139 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8140 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8141 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8142 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8143 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8144 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8145 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8146 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8147 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8148 (reg-tilegx.o): Remove.
8149 (all_object_files): New macro.
8150 Include .deps files.
8151 * aclocal.m4, configure: Rebuild.
8152 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8153 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8154 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8155
8156 2012-12-05 Tom Tromey <tromey@redhat.com>
8157
8158 PR gdb/14917:
8159 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8160
8161 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8162
8163 * configure.ac: Check for linux/perf_event.h.
8164 * config.in: Regenerated.
8165 * configure: Regenerated.
8166
8167 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8168
8169 * hostio.c (handle_readlink): Decrease buffer size
8170 parameter passed to readlink by one byte.
8171
8172 2012-11-26 Yao Qi <yao@codesourcery.com>
8173
8174 * configure.ac (build_warnings): Append '-Wempty-body'.
8175 * configure: Regenerated.
8176 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8177 body.
8178
8179 2012-11-15 Pierre Muller <muller@sourceware.org>
8180
8181 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8182 * config.in: Regenerate.
8183 * configure: Regenerate.
8184 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8185 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8186 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8187 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8188 header.
8189 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8190 instead of <sys/wait.h> header.
8191 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8192
8193 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8194
8195 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8196 (various make rules): Remove -DGDBSERVER
8197
8198 2012-11-09 Yao Qi <yao@codesourcery.com>
8199
8200 * spu-low.c (current_ptid): Move it to ..
8201 * gdbthread.h: ... here. New.
8202 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8203 * server.c (myresume, process_serial_event): Likewise.
8204 * thread-db.c (thread_db_find_new_threads): Likewise.
8205 * tracepoint.c (run_inferior_command): Likewise.
8206
8207 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8208
8209 * server.c (handle_search_memory_1): Include access length in
8210 warning message.
8211
8212 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8213
8214 * linux-crisv32-low.c: Fix compile errors.
8215
8216 2012-09-04 Yao Qi <yao@codesourcery.com>
8217
8218 * tracepoint.c (cmd_qtsv): Adjust debug message.
8219 Don't check CUR_TPOINT.
8220
8221 2012-08-28 Yao Qi <yao@codesourcery.com>
8222
8223 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8224 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8225 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8226 Remove declarations of xmalloc, xreallloc, xstrdup and
8227 freeargv.
8228 * Makefile.in (libiberty_h): New.
8229 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8230 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8231
8232 2012-08-23 Yao Qi <yao@codesourcery.com>
8233
8234 * server.h: Remove declaration of 'xsnprintf'.
8235
8236 2012-08-22 Keith Seitz <keiths@redhat.com>
8237
8238 * server.h: Include build-gnulib-gbserver/config.h.
8239 * gdbreplay.c: Likewise.
8240
8241 2012-08-08 Doug Evans <dje@google.com>
8242
8243 * Makefile.in (SFILES): Add gdb_vecs.c.
8244 (OBS): Add gdb_vecs.o.
8245 (gdb_vecs_h, host_defs_h): New variables.
8246 (thread-db.o): Add $(gdb_vecs_h) dependency.
8247 (gdb_vecs.o): New rule.
8248 * thread-db.c: #include "gdb_vecs.h".
8249 (thread_db_load_search): Use a vector to iterate over path elements.
8250 Handle text appearing after "$pdir".
8251
8252 * configure.ac: Add check for strstr.
8253 * config.in: Regenerate.
8254 * configure: Regenerate.
8255
8256 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8257
8258 * hostio.c (handle_pread): If pread fails, fall back to attempting
8259 lseek/read.
8260 (handle_pwrite): Likewise for pwrite.
8261
8262 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8263
8264 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8265 between unsupported TYPE and unimplementable ADDR/LEN combination.
8266 (arm_insert_point): Act on new return value.
8267
8268 2012-07-31 Pedro Alves <palves@redhat.com>
8269
8270 * server.c (process_point_options): Only skip tokens if we find
8271 one that is unrecognized. Don't treat 'X' specially while
8272 skipping unrecognized tokens.
8273
8274 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8275
8276 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8277 to 4-byte-align HW breakpoint addresses for Thumb.
8278
8279 2012-07-27 Yao Qi <yao@codesourcery.com>
8280
8281 PR remote/14161.
8282
8283 * server.h: Declare gdb_agent_about_to_close.
8284 * target.c (kill_inferior): Include "agent.h".
8285 New. Send command 'kill'.
8286 * target.h (kill_inferior): Removed macro.
8287 * tracepoint.c (gdb_agent_about_to_close): New.
8288 (gdb_agent_helper_thread): Handle command 'close'.
8289 Wait endlessly until the inferior stops.
8290 Install gdb_agent_remove_socket to atexit hook.
8291 (agent_socket_name): New static variable.
8292 (gdb_agent_socket_init): Replace local variable 'name' with
8293 'agent_socket_name'.
8294 (gdb_agent_remove_socket): New.
8295
8296 2012-07-27 Yao Qi <yao@codesourcery.com>
8297
8298 * server.c (process_point_options): Stop at 'X' when parsing.
8299
8300 2012-07-19 Michael Eager <eager@eagercon.com>
8301
8302 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8303 to hw_execute.
8304 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8305 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8306 hardware breakpoint.
8307
8308 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8309
8310 * gdbserver/linux-low.c (initialize_low): Call
8311 linux_ptrace_init_warnings.
8312
8313 2012-07-02 Doug Evans <dje@google.com>
8314
8315 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8316 pointer to int.
8317
8318 2012-07-02 Stan Shebs <stan@codesourcery.com>
8319
8320 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8321 (ax.o): Add it to build rule.
8322 (ax-ipa.o): Ditto.
8323 (OBS): Add format.o.
8324 (IPA_OBS): Add format.o.
8325 * server.c (handle_query): Claim support for breakpoint commands.
8326 (process_point_options): Add command case.
8327 (process_serial_event): Leave running if there are printfs in
8328 effect.
8329 * mem-break.h (any_persistent_commands): Declare.
8330 (add_breakpoint_commands): Declare.
8331 (gdb_no_commands_at_breakpoint): Declare.
8332 (run_breakpoint_commands): Declare.
8333 * mem-break.c (struct point_command_list): New struct.
8334 (struct breakpoint): New field command_list.
8335 (any_persistent_commands): New function.
8336 (add_commands_to_breakpoint): New function.
8337 (add_breakpoint_commands): New function.
8338 (gdb_no_commands_at_breakpoint): New function.
8339 (run_breakpoint_commands): New function.
8340 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8341 locally.
8342 * ax.c: Include format.h.
8343 (ax_printf): New function.
8344 (gdb_eval_agent_expr): Add printf opcode.
8345
8346 2012-06-13 Yao Qi <yao@codesourcery.com>
8347
8348 * server.c (start_inferior): Remove duplicated writes to fields
8349 'last_resume_kind' and 'last_status' of 'current_inferior'.
8350
8351 2012-06-12 Yao Qi <yao@codesourcery.com>
8352 Pedro Alves <palves@redhat.com>
8353
8354 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8355 comment.
8356 * server.c (handle_v_cont): Extend comment.
8357
8358 2012-06-11 Yao Qi <yao@codesourcery.com>
8359
8360 * linux-low.c (linux_attach): Add 'static'.
8361
8362 2012-06-06 Yao Qi <yao@codesourcery.com>
8363
8364 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8365
8366 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8367
8368 Fix gcc -flto compilation warning.
8369 * server.c (main): Make variable multi_mode and attach volatile.
8370
8371 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8372
8373 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8374 if the platform doesn't know about it.
8375
8376 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8377
8378 * Makefile.in (SFILES): Add linux-tile-low.c.
8379 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8380 * configure.srv: Handle tilegx-*-linux*.
8381 * linux-tile-low.c: New file.
8382
8383 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8384
8385 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8386
8387 2012-05-24 Pedro Alves <palves@redhat.com>
8388
8389 PR gdb/7205
8390
8391 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8392
8393 2012-05-24 Pedro Alves <palves@redhat.com>
8394
8395 PR gdb/7205
8396
8397 Replace target_signal with gdb_signal throughout.
8398
8399 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8400
8401 * linux-low.c (linux_store_registers): Avoid the copying sequence
8402 when no data has been retrieved by ptrace.
8403
8404 2012-05-22 Will Deacon <will.deacon@arm.com>
8405
8406 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8407 Include asm/ptrace.h.
8408 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8409 already defined.
8410
8411 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8412
8413 * linux-low.c (linux_store_registers): Don't re-retrieve data
8414 with ptrace that has already been obtained from /proc. Always
8415 copy any data retrieved with ptrace to the buffer supplied.
8416
8417 2012-05-11 Yao Qi <yao@codesourcery.com>
8418 Pedro Alves <palves@redhat.com>
8419
8420 * linux-low.c (enum stopping_threads_kind): New.
8421 (stopping_threads): Change type to `enum stopping_threads_kind'.
8422 (handle_extended_wait): If stopping and suspending threads, leave
8423 the new_lwp suspended too.
8424 (linux_wait_for_event): Adjust.
8425 (stop_all_lwps): Set `stopping_threads' to
8426 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8427 whether we're suspending threads or just stopping them. Assert no
8428 recursion happens.
8429
8430 2012-04-29 Yao Qi <yao@codesourcery.com>
8431
8432 * server.h: Move some code to ...
8433 * gdbthread.h: ... here. New.
8434 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8435 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8436 (nto-low.o, win32-low.o): Likewise.
8437 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8438 * regcache.c, remote-utils.c, server.c: Likewise.
8439 * target.c, tracepoint.c, win32-low.c: Likewise.
8440
8441 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8442
8443 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8444 (PTRACE_ARG4_TYPE): Likewise.
8445 (PTRACE_XFER_TYPE): Likewise.
8446 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8447 ptrace to PTRACE_ARG3_TYPE.
8448 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8449 (PTRACE_ARG4_TYPE): Likewise.
8450 (PTRACE_XFER_TYPE): Likewise.
8451 (linux_detach_one_lwp): Cast fourth argument of
8452 ptrace to long then PTRACE_ARG4_TYPE.
8453 (regsets_fetch_inferior_registers): Cast third argument of
8454 ptrace to long then PTRACE_ARG3_TYPE.
8455 (regsets_store_inferior_registers): Likewise.
8456
8457 2012-04-20 Pedro Alves <palves@redhat.com>
8458
8459 * configure: Regenerate.
8460
8461 2012-04-19 Pedro Alves <palves@redhat.com>
8462
8463 * Makefile.in (GNULIB_BUILDDIR): New.
8464 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8465 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8466 (all, install-only, uninstall, clean-info, all-lib, clean): No
8467 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8468 (maintainer-clean realclean distclean): Use subdir_do.
8469 (subdir_do): New.
8470 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8471 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8472 * acinclude.m4: Include acx_configure_dir.m4.
8473 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8474 calls. Call AC_PROG_RANLIB. Configure gnulib using
8475 ACX_CONFIGURE_DIR.
8476 (GNULIB): New.
8477 (GNULIB_STDINT_H): Adjust.
8478 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8479 * gdbreplay.c: Include build-gnulib/config.h.
8480 * server.h: Likewise.
8481 * aclocal.m4: Regenerate.
8482 * config.in: Regenerate.
8483 * configure: Regenerate.
8484
8485 2012-04-19 Pedro Alves <palves@redhat.com>
8486
8487 * Makefile.in (LIBGNU, INCGNU): Adjust.
8488 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8489 (all, install-only, uninstall, clean-info, all-lib, clean)
8490 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8491 * configure.ac: Adjust AC_OUTPUT output.
8492 * aclocal.m4: Regenerate.
8493 * configure: Regenerate.
8494
8495 2012-04-19 Pedro Alves <palves@redhat.com>
8496
8497 * Makefile.in (generated_files): New.
8498 (server_h): Remove the explicit dependency on config.h, and depend
8499 on $generated_files.
8500
8501 2012-04-19 Pedro Alves <palves@redhat.com>
8502
8503 * Makefile.in (INCGNU): Add -Ignulib.
8504
8505 2012-04-19 Pedro Alves <palves@redhat.com>
8506
8507 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8508 (INCGNU): ... this, and spell out -I here.
8509 (GNULIB_LIB): Rename to ...
8510 (LIBGNU): ... this.
8511 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8512
8513 2012-04-19 Pedro Alves <palves@redhat.com>
8514
8515 * config.in: Regenerate.
8516
8517 2012-04-19 Pedro Alves <palves@redhat.com>
8518
8519 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8520 * server.h (memmem): Remove declaration.
8521 * config.in: Regenerate.
8522 * configure: Regenerate.
8523
8524 2012-04-19 Yao Qi <yao@codesourcery.com>
8525
8526 * Makefile.in (SFILES): Add common/vec.c.
8527 (OBS): Add vec.o.
8528 (vec.o): New rule.
8529
8530 2012-04-19 Yao Qi <yao@codesourcery.com>
8531
8532 * remote-utils.c (prepare_resume_reply): Replace with macro
8533 target_core_of_thread.
8534 * server.c (handle_qxfer_threads_proper): Likewise.
8535 * target.h (traget_core_of_thread): New macro.
8536
8537 2012-04-18 Pedro Alves <palves@redhat.com>
8538
8539 * aclocal.m4: Regenerate.
8540 * configure: Regenerate.
8541
8542 2012-04-16 Yao Qi <yao@codesourcery.com>
8543
8544 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8545 duplicated on address.
8546
8547 2012-04-16 Yao Qi <yao@codesourcery.com>
8548
8549 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8550 (struct tracepoint_action_ops) <send>: New field.
8551 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8552 (agent_expr_send, x_tracepoint_action_send): New.
8553 (l_tracepoint_action_send): New.
8554 (cmd_qtdp): Download and install tracepoint
8555 according to `use_agent'.
8556 (run_inferior_command): Add one more parameter `len'.
8557 Update callers.
8558 (tracepoint_send_agent): New.
8559 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8560
8561 2012-04-16 Yao Qi <yao@codesourcery.com>
8562
8563 * tracepoint.c (download_tracepoints): Moved to ...
8564 (cmd_qtstart): ... here.
8565
8566 2012-04-14 Yao Qi <yao@codesourcery.com>
8567
8568 * tracepoint.c: Include inttypes.h.
8569 (struct collect_memory_action): Use sized types.
8570 (struct tracepoint): Likewise.
8571 (cmd_qtdp, stop_tracing): Update print specifiers.
8572 (cmd_qtp, response_tracepoint): Likewise.
8573 (collect_data_at_tracepoint): Likewise.
8574 (collect_data_at_step): Likewise.
8575
8576 2012-04-14 Yao Qi <yao@codesourcery.com>
8577
8578 Import gnulib module inttypes.
8579 * aclocal.m4, config.in, configure: Regenerated.
8580
8581 2012-04-14 Yao Qi <yao@codesourcery.com>
8582
8583 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8584 Makefile and config.status at last.
8585
8586 2012-04-13 Yao Qi <yao@codesourcery.com>
8587
8588 * tracepoint.c: Include stdint.h unconditionally.
8589
8590 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8591
8592 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8593 on BFD_HAVE_SYS_PROCFS_TYPE.
8594 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8595 * configure: Regenerate.
8596 * config.in: Likewise.
8597
8598 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8599
8600 * Makefile.in (clean): Also remove x32.c x32-linux.c
8601 x32-avx.c x32-avx-linux.c.
8602 (x32.o): New target.
8603 (x32.c): Likewise.
8604 (x32-linux.o): Likewise.
8605 (x32-linux.c): Likewise.
8606 (x32-avx.o): Likewise.
8607 (x32-avx.c): Likewise.
8608 (x32-avx-linux.o): Likewise.
8609 (x32-avx-linux.c): Likewise.
8610
8611 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8612 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8613 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8614 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8615 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8616 i386/x32-avx-linux.xml.
8617
8618 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8619 (init_registers_x32_avx_linux): Likwise.
8620 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8621 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8622
8623 2012-04-13 Pedro Alves <palves@redhat.com>
8624
8625 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8626 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8627 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8628 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8629 the sub-make.
8630
8631 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8632
8633 * linux-x86-low.c (compat_x32_clock_t): New.
8634 (compat_x32_siginfo_t): Likewise.
8635 (compat_x32_siginfo_from_siginfo): Likewise.
8636 (siginfo_from_compat_x32_siginfo): Likewise.
8637 (linux_is_elf64): Likewise.
8638 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8639 and siginfo_from_compat_x32_siginfo for x32.
8640 (x86_arch_setup): Set linux_is_elf64.
8641
8642 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8643
8644 PR gdb/13969
8645 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8646 e_machine field.
8647 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8648 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8649 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8650 compatible with process.
8651
8652 2012-04-12 Yao Qi <yao@codesourcery.com>
8653
8654 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8655 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8656 (install-only, install-info, clean): Handle sub dir gnulib.
8657 (all-lib, am--refresh): New targets.
8658 (memmem.o): Remove target.
8659 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8660 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8661 (AC_REPLACE_FUNCS): Remove memmem.
8662 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8663 (AC_OUTPUT): Generate Makefile in gnulib/.
8664 * aclocal.m4, config.in, configure: Regenerated.
8665
8666 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8667
8668 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8669
8670 2012-04-05 Pedro Alves <palves@redhat.com>
8671
8672 -Werror=strict-aliasing
8673
8674 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8675 pointer.
8676
8677 2012-04-04 Pedro Alves <palves@redhat.com>
8678
8679 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8680 (sparc_store_gregset_from_stack, sparc_store_gregset)
8681 (sparc_breakpoint_at): Fix formatting.
8682
8683 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8684
8685 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8686 are available.
8687 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8688 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8689 * config.in: Regenerate.
8690 * configure: Likewise.
8691
8692 2012-03-29 Pedro Alves <palves@redhat.com>
8693
8694 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8695 Correct ptrace arguments.
8696
8697 2012-03-28 Pedro Alves <palves@redhat.com>
8698
8699 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8700 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8701 (IA64_FR1_REGNUM): New defines.
8702 (ia64_fetch_register): New.
8703 (the_low_target): Install it.
8704 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8705 field.
8706 * linux-low.c (linux_fetch_registers): Try the
8707 the_low_target.fetch_register hook first.
8708
8709 * linux-arm-low.c (the_low_target): Adjust.
8710 * linux-bfin-low.c (the_low_target): Adjust.
8711 * linux-cris-low.c (the_low_target): Adjust.
8712 * linux-crisv32-low.c (the_low_target): Adjust.
8713 * linux-m32r-low.c (the_low_target): Adjust.
8714 * linux-m68k-low.c (the_low_target): Adjust.
8715 * linux-mips-low.c (the_low_target): Adjust.
8716 * linux-ppc-low.c (the_low_target): Adjust.
8717 * linux-s390-low.c (the_low_target): Adjust.
8718 * linux-sh-low.c (the_low_target): Adjust.
8719 * linux-sparc-low.c (the_low_target): Adjust.
8720 * linux-tic6x-low.c (the_low_target): Adjust.
8721 * linux-x86-low.c (the_low_target): Adjust.
8722 * linux-xtensa-low.c (the_low_target): Adjust.
8723
8724 2012-03-26 Pedro Alves <palves@redhat.com>
8725
8726 * server.c (handle_qxfer_libraries): Don't bail early if
8727 the_target->qxfer_libraries_svr4 is not NULL.
8728
8729 2012-03-26 Pedro Alves <palves@redhat.com>
8730
8731 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8732
8733 2012-03-23 Pedro Alves <palves@redhat.com>
8734
8735 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8736 "library-list-svr4" element's start tag when the the DSO list is
8737 empty.
8738
8739 2012-03-23 Pedro Alves <palves@redhat.com>
8740
8741 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8742 a variable whose type size is the same as the inferior's pointer
8743 size.
8744
8745 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8746
8747 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8748 struct siginfo.
8749 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8750 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8751 * linux-low.h: Include <signal.h>.
8752 (struct siginfo): Remove forward declaration.
8753 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8754 struct siginfo.
8755
8756 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8757
8758 * .gitignore: Ignore more files.
8759
8760 2012-03-19 Pedro Alves <palves@redhat.com>
8761 Jan Kratochvil <jan.kratochvil@redhat.com>
8762
8763 * server.c (cont_thread, general_thread): Add describing comments.
8764 (start_inferior): Clear `cont_thread'.
8765 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8766 of a process.
8767
8768 2012-03-15 Yao Qi <yao@codesourcery.com>
8769
8770 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8771 handling to ...
8772 (cmd_qtdp): ... here.
8773
8774 2012-03-15 Yao Qi <yao@codesourcery.com>
8775
8776 * tracepoint.c (struct tracepoint_action_ops): New.
8777 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8778 (m_tracepoint_action_download): New.
8779 (r_tracepoint_action_download): New.
8780 (x_tracepoint_action_download): New.
8781 (l_tracepoint_action_download): New.
8782 (add_tracepoint_action): Install `action->ops' according type.
8783 (download_tracepoint_1): Move code `download' function pointer
8784 of various tracepoint_action_ops.
8785
8786 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8787
8788 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8789 linux_ptrace_attach_warnings.
8790
8791 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8792
8793 * Makefile.in (linux-ptrace.o): New.
8794 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8795 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8796 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8797 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8798 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8799 of these targets.
8800 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8801
8802 2012-03-08 Yao Qi <yao@codesourcery.com>
8803 Pedro Alves <palves@redhat.com>
8804
8805 Fix PR server/13392.
8806 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8807 offset of JMP insn.
8808 * tracepoint.c (remove_tracepoint): New.
8809 (cmd_qtdp): Call remove_tracepoint when failed to install.
8810
8811 2012-03-07 Pedro Alves <palves@redhat.com>
8812
8813 * linux-low.c (get_detach_signal): New.
8814 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8815 Pass on pending signals to PTRACE_DETACH. Check the result of the
8816 ptrace call.
8817 * server.c (program_signals, program_signals_p): New.
8818 (handle_general_set): Handle QProgramSignals.
8819 * server.h (program_signals, program_signals_p): Declare.
8820
8821 2012-03-05 Pedro Alves <palves@redhat.com>
8822 Jan Kratochvil <jan.kratochvil@redhat.com>
8823
8824 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8825 New comment why.
8826
8827 2012-03-03 Yao Qi <yao@codesourcery.com>
8828
8829 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8830 agent_look_up_symbols.
8831
8832 2012-03-03 Yao Qi <yao@codesourcery.com>
8833
8834 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8835 (linux-x86-low.o): Likewise.
8836 * server.h: Remove in_process_agent_loaded.
8837 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8838 common/agent.c.
8839 Update callers.
8840
8841 2012-03-03 Yao Qi <yao@codesourcery.com>
8842
8843 * tracepoint.c (gdb_agent_capability): New global.
8844 (in_process_agent_loaded_ust): Renamed to
8845 `in_process_agent_supports_ust'.
8846 Update callers.
8847 (in_process_agent_supports_ust): Call agent_capability_check.
8848 (clear_installed_tracepoints): Assert that agent supports
8849 agent.
8850
8851 2012-03-03 Yao Qi <yao@codesourcery.com>
8852
8853 * linux-low.c (linux_supports_agent): New.
8854 (linux_target_ops): Initialize field `supports_agent' with
8855 linux_supports_agent.
8856 * target.h (struct target_ops) <supports_agent>: New.
8857 (target_supports_agent): New macro.
8858 * server.c (handle_general_set): Handle packet 'QAgent'.
8859 (handle_query): Send `QAgent+'.
8860 * Makefile.in (server.o): Depends on agent.h.
8861
8862 2012-03-03 Yao Qi <yao@codesourcery.com>
8863
8864 * Makefile.in (OBS): Add agent.o.
8865 Add new rule for agent.o.
8866 Track dependence of tracepoint.c on agent.h.
8867 * tracepoint.c (run_inferior_command_1):
8868 (run_inferior_command): Call agent_run_command.
8869 (gdb_ust_connect_sync_socket): Deleted. Move it to
8870 common/agent.c.
8871 (resume_thread, stop_thread): Likewise.
8872 (gdb_ust_socket_init): Renamed to ...
8873 (gdb_agent_socket_init): ... New.
8874 (gdb_ust_thread): Renamed to ...
8875 (gdb_agent_helper_thread): ... New.
8876 (gdb_ust_init): Move some code to ...
8877 (gdb_agent_init): ... here. New.
8878 [HAVE_UST]: Call gdb_ust_init.
8879 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8880 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8881 * config.in, configure: Regenerated.
8882
8883 2012-03-02 Pedro Alves <palves@redhat.com>
8884
8885 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8886 * linux-low.c (struct simple_pid_list): New.
8887 (stopped_pids): New a struct simple_pid_list pointer.
8888 (add_to_pid_list, pull_pid_from_list): New.
8889 (handle_extended_wait): Don't assume the first signal new children
8890 report is SIGSTOP. Adjust call to pull_pid_from_list.
8891 (linux_wait_for_lwp): Adjust.
8892
8893 2012-03-02 Yao Qi <yao@codesourcery.com>
8894
8895 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8896 debug log.
8897
8898 2012-03-02 Yao Qi <yao@codesourcery.com>
8899
8900 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8901 `stop_pc' and `tpoint'. Update caller.
8902
8903 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8904
8905 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8906 * linux-low.c (use_linux_regsets): New macro.
8907 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8908 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8909 (linux_register_in_regsets): New function.
8910 (usr_fetch_inferior_registers): Skip registers covered by
8911 regsets.
8912 (usr_store_inferior_registers): Likewise.
8913 (usr_fetch_inferior_registers): New macro.
8914 (usr_store_inferior_registers): Likewise.
8915 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8916 (linux_store_registers): Likewise.
8917 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8918 prototype.
8919 (init_registers_mips64_dsp_linux): Likewise.
8920 (init_registers_mips_linux): New macro.
8921 (init_registers_mips_dsp_linux): Likewise.
8922 (mips_dsp_num_regs): Likewise.
8923 (DSP_BASE, DSP_CONTROL): New fallback macros.
8924 (mips_base_regs): New macro.
8925 (mips_regmap): Use it. Fix the size.
8926 (mips_dsp_regmap): New variable.
8927 (mips_dsp_regset_bitmap): Likewise.
8928 (mips_arch_setup): New function.
8929 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8930 than mips_regmap.
8931 (mips_cannot_store_register): Likewise.
8932 (the_low_target): Update .arch_setup, .num_regs and .regmap
8933 initializers. Add .regset_bitmap initializer.
8934 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8935 initializer.
8936 * linux-bfin-low.c (the_low_target): Likewise.
8937 * linux-cris-low.c (the_low_target): Likewise.
8938 * linux-crisv32-low.c (the_low_target): Likewise.
8939 * linux-ia64-low.c (the_low_target): Likewise.
8940 * linux-m32r-low.c (the_low_target): Likewise.
8941 * linux-m68k-low.c (the_low_target): Likewise.
8942 * linux-ppc-low.c (the_low_target): Likewise.
8943 * linux-s390-low.c (the_low_target): Likewise.
8944 * linux-sh-low.c (the_low_target): Likewise.
8945 * linux-sparc-low.c (the_low_target): Likewise.
8946 * linux-tic6x-low.c (the_low_target): Likewise.
8947 * linux-x86-low.c (the_low_target): Likewise.
8948 * linux-xtensa-low.c (the_low_target): Likewise.
8949 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8950 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8951 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8952 srv_xmlfiles.
8953 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8954 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8955
8956 2012-02-29 Yao Qi <yao@codesourcery.com>
8957 Pedro Alves <palves@redhat.com>
8958
8959 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8960 `step_over_finished' is true.
8961
8962 2012-02-27 Pedro Alves <palves@redhat.com>
8963
8964 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8965 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8966
8967 2012-02-27 Pedro Alves <palves@redhat.com>
8968
8969 PR server/9684
8970 * linux-low.c (pid_is_stopped): New.
8971 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8972
8973 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8974
8975 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8976 of conditions.
8977
8978 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8979
8980 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8981
8982 2012-02-24 Luis Machado <lgustavo@codesourcery>
8983
8984 * server.c (handle_query): Advertise support for target-side
8985 breakpoint condition evaluation.
8986 (process_point_options): New function.
8987 (process_serial_event): When inserting a breakpoint, check for
8988 a target-side condition that should be evaluated.
8989
8990 * mem-break.c: Include regcache.h and ax.h.
8991 (point_cond_list_t): New data structure.
8992 (breakpoint) <cond_list>: New field.
8993 (find_gdb_breakpoint_at): Make non-static.
8994 (delete_gdb_breakpoint_at): Clear any target-side
8995 conditions.
8996 (clear_gdb_breakpoint_conditions): New function.
8997 (add_condition_to_breakpoint): Likewise.
8998 (add_breakpoint_condition): Likewise.
8999 (gdb_condition_true_at_breakpoint): Likewise.
9000 (gdb_breakpoint_here): Return result directly instead
9001 of going through a local variable.
9002
9003 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9004 (clear_gdb_breakpoint_conditions): Likewise.
9005 (add_breakpoint_condition): Likewise.
9006 (gdb_condition_true_at_breakpoint): Likewise.
9007
9008 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9009 (need_step_over_p): Take target-side breakpoint condition into
9010 consideration.
9011
9012 2012-02-24 Luis Machado <lgustavo@codesourcery>
9013
9014 * server.h: Include tracepoint.h.
9015 (agent_mem_read, agent_get_trace_state_variable_value,
9016 agent_set_trace_state_variable_value,
9017 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9018 get_set_tsv_func_addr): New prototypes.
9019
9020 * ax.h: New include file.
9021 * ax.c: New source file.
9022
9023 * tracepoint.c: Include ax.h.
9024 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9025 agent_expr, eval_result_type): Move to ax.h.
9026 (parse_agent_expr): Rename to ...
9027 (gdb_parse_agent_expr): ... this, make it non-static and move
9028 to ax.h.
9029 (unparse_agent_expr) Rename to ...
9030 (gdb_unparse_agent_expr): ... this, make it non-static and move
9031 to ax.h.
9032 (eval_agent_expr): Rename to ...
9033 (eval_tracepoint_agent_expr): ... this.
9034 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9035 forward declarations.
9036 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9037 (agent_get_trace_state_variable_value): New function.
9038 (agent_set_trace_state_variable_value): New function.
9039 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9040 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9041 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9042 (condition_true_at_tracepoint): Likewise.
9043 (parse_agent_expr): Rename to ...
9044 (gdb_parse_agent_expr): ... this and move to ax.c.
9045 (unparse_agent_expr): Rename to ...
9046 (gdb_unparse_agent_expr): ... this and move to ax.c.
9047 (gdb_agent_op_name): Move to ax.c.
9048 (eval_agent_expr): Rename to ...
9049 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9050 and move to ax.c.
9051 (eval_tracepoint_agent_expr): New function.
9052 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9053 non-static.
9054 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9055 ax.c.
9056 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9057 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9058 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9059 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9060 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9061 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9062 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9063 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9064 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9065 (compile_bytecodes): Remove forward declaration.
9066 (is_goto_target): Move to ax.c.
9067 (compile_bytecodes): Move to ax.c and call
9068 agent_get_trace_state_variable_value (...) and
9069 agent_set_trace_state_variable_value (...).
9070
9071 * Makefile.in: Update ax.c and IPA dependencies.
9072
9073 2012-02-24 Pedro Alves <palves@redhat.com>
9074
9075 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9076 (cmd_bigqtbuffer_circular): ... this. Only handle
9077 'QTBuffer:circular:'.
9078 (handle_tracepoint_general_set): Adjust.
9079
9080 2012-02-16 Yao Qi <yao@codesourcery.com>
9081
9082 * inferiors.c: Move code to ...
9083 * dll.c: .... here. New.
9084 * server.h: Declare clear_dlls.
9085 * Makefile.in (SFILES): Add dll.c.
9086 (OBS): Add dll.o
9087 (dll.o): New rule.
9088
9089 2012-02-11 Yao Qi <yao@codesourcery.com>
9090
9091 * server.c: (handle_monitor_command): Add a new parameter
9092 `own_buf'.
9093 (handle_query): Update caller.
9094
9095 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9096
9097 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9098 * configure, config.in: Regenerate.
9099 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9100 is not defined.
9101
9102 2012-02-02 Pedro Alves <palves@redhat.com>
9103
9104 Try SIGKILL first, then PTRACE_KILL.
9105 * linux-low.c (linux_kill_one_lwp): New.
9106 (linux_kill_one_lwp): Rename to ...
9107 (kill_one_lwp_callback): ... this. Use the new
9108 linux_kill_one_lwp.
9109
9110 2012-02-02 Pedro Alves <palves@redhat.com>
9111
9112 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9113 inferior.
9114
9115 2012-01-27 Pedro Alves <palves@redhat.com>
9116
9117 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9118 (elf_64_file_p): Make static.
9119 (linux_pid_exe_is_elf_64_file): New.
9120 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9121 Delete declarations.
9122 (linux_pid_exe_is_elf_64_file): Declare.
9123 * linux-x86-low.c (x86_arch_setup): Use
9124 linux_pid_exe_is_elf_64_file.
9125
9126 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9127
9128 * linux-low.c (linux_wait_for_event_1): Rename to ...
9129 (linux_wait_for_event): ... here and merge it with former
9130 linux_wait_for_event - new variable wait_ptid, use it.
9131 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9132
9133 2012-01-23 Pedro Alves <palves@redhat.com>
9134
9135 * server.c (main): Avoid yet another case of infinite loop while
9136 detaching/killing after a longjmp.
9137
9138 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9139
9140 Code cleanup.
9141 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9142
9143 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9144
9145 * hostio.c (handle_readlink): New function.
9146 (handle_vFile): Call it to handle "vFile:readlink" packets.
9147
9148 2012-01-20 Pedro Alves <palves@redhat.com>
9149 Ulrich Weigand <ulrich.weigand@linaro.org>
9150
9151 * server.c (handle_v_requests): Only support vAttach and vRun to
9152 start multiple processes when in extended protocol mode.
9153
9154 2012-01-17 Pedro Alves <palves@redhat.com>
9155
9156 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9157 memalign plus mprotect to allocate the scratch buffer.
9158
9159 2012-01-13 Pedro Alves <palves@redhat.com>
9160
9161 * server.c (attach_inferior): Clear `cont_thread'.
9162
9163 2012-01-13 Pedro Alves <palves@redhat.com>
9164
9165 * server.c (main): Avoid infinite loop while detaching/killing
9166 after a longjmp.
9167
9168 2012-01-09 Doug Evans <dje@google.com>
9169
9170 * server.c (start_inferior): Set last_ptid in --wrapper case.
9171
9172 2012-01-06 Yao Qi <yao@codesourcery.com>
9173
9174 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9175 defined.
9176 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9177
9178 2012-01-04 Yao Qi <yao@codesourcery.com>
9179
9180 * tracepoint.c (cmd_qtdp): Print debug message
9181 for static tracepoint.
9182
9183 2012-01-04 Yao Qi <yao@codesourcery.com>
9184
9185 * tracepoint.c (trace_vdebug): Differentiate debug message
9186 between gdbserver and IPA.
9187
9188 2012-01-03 Yao Qi <yao@codesourcery.com>
9189
9190 * tracepoint.c (tracepoint_was_hit): Don't collect for
9191 static tracepoint.
9192
9193 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9194
9195 * terminal.h: Reformat copyright header.
9196
9197 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9198
9199 * server.c (gdbserver_version): Update copyright year.
9200 * gdbreplay.c (gdbreplay_version): Likewise.
9201
9202 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9203
9204 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9205
9206 Revert:
9207 2011-12-18 Hui Zhu <teawater@gmail.com>
9208 * linux-low.c (linux_create_inferior): Save return value to ret.
9209
9210 2011-12-18 Hui Zhu <teawater@gmail.com>
9211
9212 * linux-low.c (linux_create_inferior): Save return value to ret.
9213
9214 2011-12-16 Doug Evans <dje@google.com>
9215
9216 * linux-low.c (linux_create_inferior): If stdio connection,
9217 redirect stdin from /dev/null, stdout to stderr.
9218 * remote-utils.c (remote_is_stdio): New static global.
9219 (remote_connection_is_stdio): New function.
9220 (remote_prepare): Handle stdio connection.
9221 (remote_open): Ditto.
9222 (remote_close): Don't close stdin for stdio connections.
9223 (read_prim,write_prim): New functions. Replace all calls to
9224 read/write to these.
9225 * server.c (main): Watch for "-" argument. Move call to
9226 remote_prepare before start_inferior.
9227 * server.h (STDIO_CONNECTION_NAME): New macro.
9228 (remote_connection_is_stdio): Declare.
9229
9230 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9231 in debugging output.
9232
9233 2011-12-15 Yao Qi <yao@codesourcery.com>
9234
9235 * tracepoint.c: Include sys/syscall.h.
9236 (gdb_ust_thread): Remove preprocessor conditional.
9237
9238 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9239
9240 * linux-low.c (linux_detach_one_lwp): Call
9241 the_low_target.prepare_to_resume before detaching.
9242
9243 2011-12-14 Yao Qi <yao@codesourcery.com>
9244
9245 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9246 of write.
9247
9248 2011-12-14 Yao Qi <yao@codesourcery.com>
9249
9250 * i386-low.c (i386_low_stopped_data_address): Initialize local
9251 variable `control'.
9252
9253 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9254
9255 PR remote/13492
9256
9257 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9258 DR_CONTROL unless necessary. Extend comments.
9259 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9260 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9261
9262 2011-12-13 Yao Qi <yao@codesourcery.com>
9263
9264 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9265 macros.
9266 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9267
9268 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9269
9270 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9271 Print new debug message for such case.
9272
9273 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9274
9275 Fix overlapping memcpy.
9276 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9277 the read_inferior_memory transfer.
9278 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9279 write_inferior_memory transfer.
9280 (set_fast_tracepoint_jump): New variable buf. Use it for the
9281 read_inferior_memory and write_inferior_memory transfers.
9282 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9283 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9284 Use it for the write_inferior_memory transfer.
9285 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9286 buffers.
9287
9288 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9289
9290 * linux-low.c (fetch_register, store_register): Make code
9291 consistent, fix formatting.
9292
9293 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9294
9295 * linux-low.c (usr_store_inferior_registers): Factor out code
9296 to handle individual registers into...
9297 (store_register): ... this new function.
9298
9299 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9300
9301 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9302 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9303 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9304 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9305 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9306 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9307 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9308 (srv_xmlfiles): Add new XML files.
9309
9310 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9311 and <sys/uio.h>.
9312 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9313 (init_registers_s390_linux32v1): Add prototype.
9314 (init_registers_s390_linux32v2): Likewise.
9315 (init_registers_s390_linux64v1): Likewise.
9316 (init_registers_s390_linux64v2): Likewise.
9317 (init_registers_s390x_linux64v1): Likewise.
9318 (init_registers_s390x_linux64v2): Likewise.
9319 (s390_num_regs): Increment to 52.
9320 (s390_regmap): Add orig_r2 register.
9321 (s390_num_regs_3264): Increment to 68.
9322 (s390_regmap_3264): Add orig_r2 register.
9323 (s390_collect_ptrace_register): Handle orig_r2 register.
9324 (s390_supply_ptrace_register): Likewise.
9325 (s390_fill_last_break): New function.
9326 (s390_store_last_break): Likewise.
9327 (s390_fill_system_call): New function.
9328 (s390_store_system_call): Likewise.
9329 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9330 register sets.
9331 (s390_check_regset): New function.
9332 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9333 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9334 Update target_regsets for available register sets.
9335
9336 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9337 Jan Kratochvil <jan.kratochvil@redhat.com>
9338
9339 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9340 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9341 New.
9342 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9343 * linux-low.h (struct process_info_private): New member r_debug.
9344 * server.c (handle_qxfer_libraries): Call
9345 the_target->qxfer_libraries_svr4.
9346 (handle_qxfer_libraries_svr4): New function.
9347 (qxfer_packets): New entry "libraries-svr4".
9348 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9349 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9350 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9351 PACKET_qXfer_libraries_svr4.
9352
9353 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9354
9355 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9356 PSW address/mask between 8-byte and 16-byte formats.
9357 (s390_supply_ptrace_register): Likewise.
9358 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9359 basic addressing mode bit.
9360
9361 2011-11-24 Stan Shebs <stan@codesourcery.com>
9362
9363 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9364
9365 2011-11-17 Stan Shebs <stan@codesourcery.com>
9366
9367 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9368 (tracing_start_time): New global.
9369 (tracing_stop_time): New global.
9370 (tracing_user_name): New global.
9371 (tracing_notes): New global.
9372 (tracing_stop_note): New global.
9373 (cmd_qtstart): Set traceframe_usage, start_time.
9374 (stop_tracing): Set stop_time.
9375 (cmd_qtstatus): Report additional status.
9376 (cmd_qtp): New function.
9377 (handle_tracepoint_query): Call it.
9378 (cmd_qtnotes): New function.
9379 (handle_tracepoint_general_set): Call it.
9380 (get_timestamp): Rename from tsv_get_timestamp.
9381
9382 2011-11-14 Stan Shebs <stan@codesourcery.com>
9383 Kwok Cheung Yeung <kcy@codesourcery.com>
9384
9385 * linux-x86-low.c (small_jump_insn): New.
9386 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9387 trampoline and error message, build a trampoline and issue a small
9388 jump instruction to it.
9389 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9390 trampoline and error message.
9391 (x86_get_min_fast_tracepoint_insn_len): New.
9392 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9393 * linux-low.h (struct linux_target_ops): Add arguments to
9394 install_fast_tracepoint_jump_pad operation, add new operation.
9395 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9396 arguments.
9397 (linux_get_min_fast_tracepoint_insn_len): New function.
9398 (linux_target_op): Add new operation.
9399 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9400 (gdb_trampoline_buffer_end): Ditto.
9401 (gdb_trampoline_buffer_error): Ditto.
9402 (struct ipa_sym_addresses): Add fields for new IPA variables.
9403 (symbol_list): Add entries for new IPA variables.
9404 (struct tracepoint): Add fields to hold the address range of the
9405 trampoline used by the tracepoint.
9406 (trampoline_buffer_head): New static variable.
9407 (trampoline_buffer_tail): Ditto.
9408 (claim_trampoline_space): New function.
9409 (have_fast_tracepoint_trampoline_buffer): New function.
9410 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9411 structure.
9412 (install_fast_tracepoint): Ditto, also add error buffer argument.
9413 (cmd_qtminftpilen): New function.
9414 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9415 (fast_tracepoint_from_trampoline_address): New function.
9416 (fast_tracepoint_collecting): Handle trampoline as part of jump
9417 pad space.
9418 (set_trampoline_buffer_space): New function.
9419 (initialize_tracepoint): Initialize new IPA variables.
9420 * target.h (struct target_ops): Add arguments to
9421 install_fast_tracepoint_jump_pad operation, add new
9422 get_min_fast_tracepoint_insn_len operation.
9423 (target_get_min_fast_tracepoint_insn_len): New.
9424 (install_fast_tracepoint_jump_pad): Add arguments.
9425 * server.h (IPA_BUFSIZ): Define.
9426 * linux-i386-ipa.c: Include extra header files.
9427 (initialize_fast_tracepoint_trampoline_buffer): New function.
9428 (initialize_low_tracepoint): Call it.
9429 * server.h (set_trampoline_buffer_space): Declare.
9430 (claim_trampoline_space): Ditto.
9431 (have_fast_tracepoint_trampoline_buffer): Ditto.
9432
9433 2011-11-14 Yao Qi <yao@codesourcery.com>
9434
9435 * server.c (handle_query): Handle InstallInTrace for qSupported.
9436 * tracepoint.c (add_tracepoint): Sort list.
9437 (install_tracepoint, download_tracepoint): New.
9438 (cmd_qtdp): Call them to install and download tracepoints.
9439 (sort_tracepoints): Removed.
9440 (cmd_qtstart): Update.
9441
9442 2011-11-14 Yao Qi <yao@codesourcery.com>
9443
9444 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9445 * mem-break.h: Declare.
9446 * tracepoint.c (cmd_qtstart): Move some code to ...
9447 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9448 New.
9449 (download_tracepoints): Move some code to ...
9450 (download_tracepoint_1): ... here. New.
9451
9452 2011-11-08 Yao Qi <yao@codesourcery.com>
9453
9454 * remote-utils.c (relocate_instruction): A comment fix.
9455
9456 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9457
9458 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9459 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9460 dr_status_mirror and dr_control_mirror from debug_reg_state.
9461 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9462 (i386_initial_stuff): Remove use of deleted globals.
9463 (i386_get_thread_context, i386_set_thread_context,
9464 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9465 from debug_reg_state.
9466
9467 2011-11-05 Yao Qi <yao@codesourcery.com>
9468
9469 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9470 address as TPOINT's.
9471
9472 2011-11-02 Stan Shebs <stan@codesourcery.com>
9473
9474 * tracepoint.c (agent_mem_read_string): New function.
9475 (eval_agent_expr): Call it for tracenz.
9476 * server.c (handle_query): Report support for tracenz.
9477
9478 2011-11-02 Yao Qi <yao@codesourcery.com>
9479
9480 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9481
9482 2011-11-02 Yao Qi <yao@codesourcery.com>
9483
9484 * target.h: Fix a typo in comment.
9485
9486 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9487
9488 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9489 clobber the breakpoints' shadows with fast tracepoint jumps.
9490 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9491 * target.c (write_inferior_memory): Also pass MYADDR down to
9492 check_mem_write.
9493
9494 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9495
9496 * configure.ac: Check support for personality routine.
9497 * configure: Regenerate.
9498 * config.in: Likewise.
9499 * linux-low.c: Include <sys/personality.h>.
9500 Define ADDR_NO_RANDOMIZE if necessary.
9501 (linux_create_inferior): Disable address space randomization when
9502 forking inferior, if requested.
9503 (linux_supports_disable_randomization): New function.
9504 (linux_target_ops): Install it.
9505 * server.h (disable_randomization): Declare.
9506 * server.c (disable_randomization): New global variable.
9507 (handle_general_set): Handle QDisableRandomization.
9508 (handle_query): Likewise for qSupported.
9509 (main): Support --disable-randomization and --no-disable-randomization
9510 command line arguments.
9511 * target.h (struct target_ops): Add supports_disable_randomization.
9512 (target_supports_disable_randomization): New macro.
9513
9514 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9515
9516 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9517 ifdef check.
9518 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9519 [!PT_GETDSBT] (target_loadmap): New definition.
9520 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9521 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9522 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9523 and PT_GETDSBT to LINUX_LOADMAP.
9524 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9525 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9526
9527 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9528
9529 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9530 (arm_linux_hwbp_cap): New static variable.
9531 (arm_linux_get_hwbp_cap): Replace by ...
9532 (arm_linux_init_hwbp_cap): ... this new function.
9533 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9534 (arm_linux_get_hw_watchpoint_count): Likewise.
9535 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9536 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9537 (arm_prepare_to_resume): Use perror_with_name instead of error.
9538
9539 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9540
9541 * linux-arm-low.c: Include <signal.h>.
9542 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9543 (struct arm_linux_hwbp_cap): New data type.
9544 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9545 (struct arm_linux_hw_breakpoint): New data type.
9546 (MAX_BPTS, MAX_WPTS): Define.
9547 (struct arch_process_info, struct arch_lwp_info): New data types.
9548 (arm_linux_get_hwbp_cap): New function.
9549 (arm_linux_get_hw_breakpoint_count): Likewise.
9550 (arm_linux_get_hw_watchpoint_count): Likewise.
9551 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9552 (arm_hwbp_control_initialize): Likewise.
9553 (arm_hwbp_control_is_enabled): Likewise.
9554 (arm_hwbp_control_is_initialized): Likewise.
9555 (arm_hwbp_control_disable): Likewise.
9556 (arm_linux_hw_breakpoint_equal): Likewise.
9557 (arm_linux_hw_point_initialize): Likewise.
9558 (struct update_registers_data): New data structure.
9559 (update_registers_callback: New function.
9560 (arm_insert_point): Likewise.
9561 (arm_remove_point): Likewise.
9562 (arm_stopped_by_watchpoint): Likewise.
9563 (arm_stopped_data_address): Likewise.
9564 (arm_new_process): Likewise.
9565 (arm_new_thread): Likewise.
9566 (arm_prepare_to_resume): Likewise.
9567 (the_low_target): Register arm_insert_point, arm_remove_point,
9568 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9569 arm_new_thread, and arm_prepare_to_resume.
9570
9571 2011-09-15 Stan Shebs <stan@codesourcery.com>
9572
9573 * server.h (struct emit_ops): Add compare-goto fields.
9574 * tracepoint.c (gdb_agent_op_sizes): New table.
9575 (emit_eq_goto): New function.
9576 (emit_ne_goto): New function.
9577 (emit_lt_goto): New function.
9578 (emit_le_goto): New function.
9579 (emit_gt_goto): New function.
9580 (emit_ge_goto): New function.
9581 (is_goto_target): New function.
9582 (compile_bytecodes): Recognize special cases of compare-goto
9583 combinations and call specialized emitters for them.
9584 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9585 (amd64_emit_ne_goto): New function.
9586 (amd64_emit_lt_goto): New function.
9587 (amd64_emit_le_goto): New function.
9588 (amd64_emit_gt_goto): New function.
9589 (amd64_emit_ge_goto): New function.
9590 (amd64_emit_ops): Add the new functions.
9591 (i386_emit_eq_goto): New function.
9592 (i386_emit_ne_goto): New function.
9593 (i386_emit_lt_goto): New function.
9594 (i386_emit_le_goto): New function.
9595 (i386_emit_gt_goto): New function.
9596 (i386_emit_ge_goto): New function.
9597 (i386_emit_ops): Add the new functions.
9598
9599 2011-09-08 Stan Shebs <stan@codesourcery.com>
9600
9601 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9602 (i386_emit_epilogue): Restore %ebx.
9603
9604 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9605
9606 * server.c (step_thread): Remove definition.
9607 (process_serial_event): Don't handle Hs.
9608 * server.h (step_thread): Remove declaration.
9609 * target.c (set_desired_inferior): Remove use of step_thread.
9610
9611 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9612
9613 * linux-low.c: Include linux-procfs.h.
9614 (linux_attach_lwp_1): Update comments.
9615 (linux_attach): Scan for existing threads when attaching to a
9616 process that is the tgid.
9617 * Makefile.in: Update dependencies.
9618
9619 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9620
9621 * configure.srv: Add linux-procfs.o dependencies.
9622
9623 2011-08-14 Yao Qi <yao@codesourcery.com>
9624
9625 * target.h (struct target_ops): Fix indent.
9626 * win32-low.c (win32_target_ops): Fix comment.
9627
9628 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9629 Yao Qi <yao@codesourcery.com>
9630
9631 * Makefile.in (clean): Remove tic6x-*.c files.
9632 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9633 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9634 (tic6x-c64xp-linux.c): Likewise.
9635 * configure.srv: Add support for tic6x-*-uclinux.
9636 * linux-tic6x-low.c: New.
9637 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9638
9639 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9640 Yao Qi <yao@codesourcery.com>
9641
9642 * target.h (struct target_ops): Add read_loadmap.
9643 * linux-low.c (struct target_loadseg): New type.
9644 (struct target_loadmap): New type.
9645 (linux_read_loadmap): New function.
9646 (linux_target_ops): Add linux_read_loadmap.
9647 * server.c (handle_query): Support qXfer:fdpic:read packet.
9648 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9649 to NULL.
9650
9651 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9652
9653 * win32-low.c: Include <stdint.h>.
9654
9655 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9656
9657 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9658 to the inferior here.
9659 (i386_remove_aligned_watchpoint): Ditto.
9660 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9661 fit part of the watchpoint in the debug registers.
9662 (i386_update_inferior_debug_regs): New.
9663 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9664 registers, and only update the inferior on success.
9665 (i386_low_remove_watchpoint): Ditto.
9666
9667 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9668
9669 * linux-low.c (compare_ints, unique, list_threads, show_process,
9670 linux_core_of_thread): Delete.
9671 (linux_target_ops): Change linux_core_of_thread to
9672 linux_common_core_of_thread.
9673 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9674 * utils.c (malloc_failure): Change type of argument.
9675 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9676 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9677 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9678 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9679 (IPA_OBJS): Add common-utils-ipa.o.
9680 (ptid_h, linux_osdata_h): New macros.
9681 (server_h): Add common/common-utils.h, common/xml-utils.h,
9682 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9683 common/ptid.h.
9684 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9685 ptid.o, buffer.o): New rules.
9686 (linux-low.o): Add common/linux-osdata.h as a dependency.
9687 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9688 * configure.ac: Add AC_HEADER_DIRENT check.
9689 * config.in: Regenerate.
9690 * configure: Regenerate.
9691 * remote-utils.c (xml_escape_text): Delete.
9692 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9693 buffer_xml_printf): Move to common/buffer.c.
9694 * server.c (main): Remove call to initialize_inferiors.
9695 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9696 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9697 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9698 internal_error, gdb_assert, gdb_assert_fail): Delete.
9699 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9700 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9701 common/buffer.h.
9702 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9703 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9704 initialize_inferiors): Delete.
9705
9706 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9707
9708 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9709 symbol error.
9710
9711 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9712
9713 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9714 assertion.
9715 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9716
9717 2011-05-26 Yao Qi <yao@codesourcery.com>
9718
9719 * Makefile.in (thread-db.o): Track dependence to
9720 common/gdb_thread_db.h.
9721 * thread-db.c: include gdb_thread_db.h from right place.
9722
9723 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9724
9725 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9726 __FILE__ and __LINE__ to internal_error.
9727
9728 2011-05-13 Doug Evans <dje@google.com>
9729
9730 * thread-db.c (try_thread_db_load_from_sdir): New function.
9731 (try_thread_db_load_from_dir): New function.
9732 (thread_db_load_search): Handle $sdir, ignore $pdir.
9733 Remove trying of system directories if search of
9734 libthread-db-search-path fails, that is now done via $sdir.
9735
9736 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9737
9738 * server.c (handle_query): Add EnableDisableTracepoints to the list
9739 of supported features.
9740 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9741 tracepoints.
9742 (cmd_qtenable_disable): New.
9743 (cmd_qtstart): Install tracepoints even if disabled.
9744 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9745 receiving a QTEnable or QTDisable packet.
9746 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9747 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9748 tracepoints.
9749 (gdb_probe): Skip data collection if static tracepoint is disabled.
9750
9751 2011-05-10 Doug Evans <dje@google.com>
9752
9753 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9754
9755 2011-05-04 Doug Evans <dje@google.com>
9756
9757 * linux-low.c (linux_join): Skip process lookup.
9758 * spu-low.c (spu_join): Ditto.
9759 * server.c (join_inferiors_callback): Delete.
9760 (process_serial_event): For 'D' packet (detach) call join_inferior
9761 directly.
9762
9763 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9764
9765 * README: Don't mention xscale*-*-linux*.
9766 * configure.srv (xscale*-*-linux*): Don't handle target.
9767
9768 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9769
9770 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9771 casting pointers.
9772 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9773 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9774 (i386_emit_void_call_2): Likewise.
9775
9776 2011-04-26 Yao Qi <yao@codesourcery.com>
9777
9778 * linux-low.c: Move common macros to linux-ptrace.h.
9779 Include linux-ptrace.h.
9780 * Makefile.in (linux_ptrace_h): New.
9781 (linux-low.o): Depends on linux-ptrace.h.
9782
9783 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9784
9785 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9786 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9787 (remote_prepare): New function with most of the TCP code from ...
9788 (remote_open): ... here. Detect PORT here unconditionally. Move also
9789 setting transport_is_reliable.
9790 * server.c (run_once): New variable.
9791 (gdbserver_usage): Document it.
9792 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9793 the first run if RUN_ONCE.
9794 * server.h (run_once, remote_prepare): New declarations.
9795
9796 2011-04-19 Tom Tromey <tromey@redhat.com>
9797
9798 * win32-low.c (handle_load_dll): Remove duplicate "the".
9799
9800 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9801
9802 Remove support for old Cygwin 1.5 versions.
9803 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9804 function to avoid warning.
9805 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9806 warning.
9807
9808 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9809
9810 * gdbserver/server.h (Macro _): Define it if not available.
9811
9812 2011-03-14 Michael Snyder <msnyder@vmware.com>
9813
9814 * hostio.c (handle_close): Remove unnecessary null test.
9815
9816 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9817
9818 * Makefile.in (maintainer-clean realclean distclean): Remove
9819 "make ... subdir_do" command.
9820
9821 2011-03-10 Michael Snyder <msnyder@vmware.com>
9822
9823 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9824
9825 * server.c (handle_v_run): Free alloced buffer on early return.
9826
9827 2011-03-09 Yao Qi <yao@codesourcery.com>
9828
9829 Revert:
9830 2011-03-04 Yao Qi <yao@codesourcery.com>
9831
9832 * Makefile.in: Remove GNU make feature --directory.
9833
9834 2011-03-05 Yao Qi <yao@codesourcery.com>
9835
9836 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9837 (subdir_do): New make target. Copied from gdb/Makefile.
9838 (maintainer-clean, realclean, distclean, clean): Call corresponding
9839 make targets in common/Makefile.
9840
9841 2011-02-11 Yao Qi <yao@codesourcery.com>
9842
9843 * configure.ac: Call AC_PROG_RANLIB.
9844 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9845 * configure: Regenerate.
9846
9847 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9848
9849 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9850
9851 2011-03-06 Yao Qi <yao@codesourcery.com>
9852
9853 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9854
9855 2011-03-05 Yao Qi <yao@codesourcery.com>
9856
9857 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9858 (subdir_do): New make target. Copied from gdb/Makefile.
9859 (maintainer-clean, realclean, distclean, clean): Call corresponding
9860 make targets in common/Makefile.
9861
9862 2011-03-04 Yao Qi <yao@codesourcery.com>
9863
9864 * Makefile.in: Remove GNU make feature --directory.
9865
9866 2011-03-04 Michael Snyder <msnyder@vmware.com>
9867
9868 * server.c (queue_stop_reply): Call xmalloc not malloc.
9869
9870 2011-03-02 Michael Snyder <msnyder@vmware.com>
9871
9872 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9873
9874 2011-02-28 Michael Snyder <msnyder@vmware.com>
9875
9876 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9877 (cmd_qtframe): Ditto.
9878 (cmd_qtbuffer): Ditto.
9879 (cmd_bigqtbuffer): Ditto.
9880
9881 * utils.c (decimal2str): Initialize 'width' to nine, then
9882 don't mess with it.
9883
9884 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9885
9886 * hostio.c (require_data): Free *data, not data.
9887
9888 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9889
9890 * hostio.c (require_data): Use free, not xfree.
9891
9892 2011-02-27 Michael Snyder <msnyder@vmware.com>
9893
9894 * server.c (handle_query): Discard unused value.
9895
9896 * hostio.c (require_data): Free malloc memory before returning
9897 error.
9898
9899 2011-02-26 Michael Snyder <msnyder@vmware.com>
9900
9901 * linux-low.c (list_threads): Call closedir for dirent.
9902
9903 2011-02-27 Michael Snyder <msnyder@vmware.com>
9904
9905 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9906 a case statement falls through.
9907
9908 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9909
9910 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9911 in comparison.
9912
9913 2011-02-26 Michael Snyder <msnyder@vmware.com>
9914
9915 * utils.c (decimal2str): Eliminate dead code and dead param.
9916 (pulongest): Drop dead param from call to decimal2str.
9917 (plongest): Ditto.
9918
9919 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9920
9921 Revert the following patch (not approved yet):
9922 2011-02-21 Hui Zhu <teawater@gmail.com>
9923 * tracepoint.c (tp_printf): New function.
9924 (eval_agent_expr): Handle gdb_agent_op_printf.
9925
9926 2011-02-21 Hui Zhu <teawater@gmail.com>
9927
9928 * tracepoint.c (tp_printf): New function.
9929 (eval_agent_expr): Handle gdb_agent_op_printf.
9930
9931 2011-02-18 Tom Tromey <tromey@redhat.com>
9932
9933 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9934 (tracepoint.o): Likewise.
9935 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9936 (gdb_agent_op_names): Likewise.
9937
9938 2011-02-18 Tom Tromey <tromey@redhat.com>
9939
9940 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9941 gdb_agent_op_rot>: New constants.
9942 (gdb_agent_op_names): Add pick and roll.
9943 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9944 cases.
9945
9946 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9947
9948 * aclocal.m4: Regenerated with aclocal-1.11.1.
9949
9950 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9951
9952 * server.c (handle_qxfer_traceframe_info): New.
9953 (qxfer_packets): Register "traceframe-info".
9954 (handle_query): Report support for qXfer:traceframe-info:read+.
9955 * tracepoint.c (match_blocktype): New.
9956 (traceframe_find_block_type): Rename to ...
9957 (traceframe_walk_blocks): ... this. Add callback filter argument,
9958 and use it.
9959 (traceframe_find_block_type): New, reimplemented on top of
9960 traceframe_walk_blocks.
9961 (build_traceframe_info_xml): New.
9962 (traceframe_read_info): New.
9963 * server.h (traceframe_read_info): Declare.
9964
9965 2011-02-11 Yao Qi <yao@codesourcery.com>
9966
9967 * configure.ac: Call AC_PROG_RANLIB.
9968 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9969 * configure: Regenerate.
9970
9971 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9972
9973 * server.c (gdb_read_memory): Change return semantics to allow
9974 partial transfers.
9975 (handle_search_memory_1): Adjust.
9976 (process_serial_event) <'m' packet>: Handle partial transfers.
9977 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9978
9979 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9980
9981 * regcache.c (init_register_cache): Initialize
9982 regcache->register_status.
9983 (free_register_cache): Release regcache->register_status.
9984 (regcache_cpy): Copy register_status.
9985 (registers_to_string): Print 'x's for unavailable registers.
9986 (supply_register): Mark the register's status valid or
9987 unavailable, depending on whether a buffer was passed in or not.
9988 (supply_register_zeroed): New.
9989 (supply_regblock): Mark the registers' status valid or
9990 unavailable, depending on whether a buffer was passed in or not.
9991 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9992 (struct regcache): New `register_status' field.
9993 (supply_register_zeroed): Declare.
9994 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9995 supply_register_zeroed, rather than passing a NULL buffer to
9996 supply_register.
9997 * tracepoint.c (fetch_traceframe_registers): Update comment.
9998
9999 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10000
10001 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10002 buffer explicit.
10003
10004 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10005
10006 * server.h (decode_xfer_write): Change prototype.
10007 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10008 and don't extract the annex here.
10009 * server.c (decode_xfer_read): Remove `annex' parameter,
10010 and don't extract the annex here.
10011 (decode_xfer): New.
10012 (struct qxfer): New.
10013 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10014 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10015 (handle_qxfer_statictrace): New functions, abstracted out from
10016 handle_query, and made to use the struct qxfer interface.
10017 (handle_threads_qxfer_proper): Rename to ...
10018 (handle_qxfer_threads_proper): ... this.
10019 (handle_threads_qxfer): Rename to ...
10020 (handle_qxfer_threads): ... this. Adjust.
10021 (qxfer_packets): New array.
10022 (handle_qxfer): New function.
10023 (handle_query): Use handle_qxfer.
10024
10025 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10026
10027 * gdbreplay.c: Shorten lines of >= 80 columns.
10028 * linux-low.c: Ditto.
10029 * linux-ppc-low.c: Ditto.
10030 * linux-s390-low.c: Ditto.
10031 * linux-sparc-low.c: Ditto.
10032 * linux-x86-low.c: Ditto.
10033 * linux-xtensa-low.c: Ditto.
10034 * mem-break.c: Ditto.
10035 * nto-low.c: Ditto.
10036 * regcache.h: Ditto.
10037 * remote-utils.c: Ditto.
10038 * server.c: Ditto.
10039 * server.h: Ditto.
10040 * thread-db.c: Ditto.
10041 * tracepoint.c: Ditto.
10042 * utils.c: Ditto.
10043 * win32-low.h: Ditto.
10044
10045 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10046
10047 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10048 update.
10049
10050 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10051
10052 * server.c (gdbserver_version): Update copyright year in version
10053 output.
10054 * gdbreplay.c (gdbreplay_version): Ditto.
10055
10056 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10057
10058 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10059 * linux-bfin-low.c: New file.
10060 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10061 PT_DATA_ADDR for BFIN targets.
10062 * Makefile.in (SFILES): Add linux-bfin-low.c.
10063 (clean): Remove reg-bfin.c.
10064 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10065 * README: Mention supported Blackfin targets.
10066
10067 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10068
10069 * .gitignore: New file.
10070
10071 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10072
10073 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10074
10075 2010-10-22 Jie Zhang <jie@codesourcery.com>
10076
10077 * Makefile.in: Add FLAGS_TO_PASS variable.
10078 (install): Remove dependency of install-only and recursively
10079 invoke make for install-only.
10080
10081 2010-10-04 Doug Evans <dje@google.com>
10082
10083 * Makefile.in (uninstall): Use $(DESTDIR).
10084
10085 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10086
10087 PR gdb/11842
10088
10089 * linux-x86-low.c (compat_siginfo_from_siginfo)
10090 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10091 si_code is < 0. Check for si_code == SI_TIMER before checking for
10092 si_code < 0.
10093
10094 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10095
10096 * lynx-i386-low.c: New file.
10097 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10098
10099 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10100
10101 * lynx-low.c (ptrace_request_to_str): Remove handling for
10102 request values that have been removed in LynxOS 5.x.
10103
10104 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10105
10106 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10107 <ptrace.h>
10108
10109 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10110
10111 * configure.ac: Add --enable-inprocess-agent option.
10112 * configure: Rebuilt.
10113
10114 2010-09-06 Yao Qi <yao@codesourcery.com>
10115
10116 * linux-low.c (linux_kill): Remove unused variable.
10117 (linux_stabilize_threads): Likewise.
10118 * server.c (start_inferior): Likewise.
10119 (queue_stop_reply_callback): Likewise.
10120 * tracepoint.c (do_action_at_tracepoint): Likewise.
10121
10122 2010-09-06 Yao Qi <yao@codesourcery.com>
10123
10124 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10125 on return.
10126
10127 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10128
10129 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10130
10131 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10132
10133 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10134 "$(IPA_DEPFILES)".
10135
10136 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10137
10138 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10139 gdbserver/lynx-ppc-low.c: New files.
10140 * Makefile.in (lynx_low_h): New variable.
10141 (lynx-low.o, lynx-ppc-low.o): New rules.
10142 * configure.ac: On LynxOS, link with -lnetinet.
10143 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10144 * configure: regenerate.
10145
10146 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10147
10148 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10149 * configure.ac: Add check for vasprintf and vsnprintf.
10150 * configure, config.in: Regenerate.
10151 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10152
10153 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10154
10155 * gdbreplay.c: Move include of alloca.h up, next to include of
10156 malloc.h.
10157 * server.h: Add include of malloc.h.
10158 * mem-break.c: Remove include of malloc.h.
10159 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10160
10161 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10162
10163 * Makefile.in (memmem.o): Build with -Wno-error.
10164
10165 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10166
10167 * utils.c (xsnprintf): Make non-static.
10168 * server.h: Add xsnprintf declaration.
10169 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10170 replace calls to snprintf by calls to xsnprintf throughout.
10171
10172 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10173
10174 * configure.ac: Add configure check for alloca.
10175 * configure, config.in: Regenerate.
10176 * server.h: Include alloca.h if it exists.
10177 * gdbreplay.c: Include alloca.h if it exists.
10178
10179 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10180
10181 * linux-low.c (__SIGRTMIN): Define if not already defined.
10182 (linux_create_inferior): Check for __ANDROID__ rather than
10183 __SIGRTMIN.
10184 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10185 are already deferred.
10186 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10187 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10188 stopped and already has a pending signal to report.
10189 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10190 a pending signal to report or is moving out of a jump pad.
10191 (linux_init_signals): Check for __ANDROID__ rather than
10192 __SIGRTMIN.
10193
10194 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10195
10196 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10197 debug_threads check. Avoid a linear search when not doing debug
10198 output.
10199
10200 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10201
10202 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10203 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10204 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10205 (process_event): Change local fd's type to gdb_fildes_t.
10206 (create_file_handler): Adjust prototype.
10207 (delete_file_handler): Adjust prototype.
10208 (handle_file_event): Adjust prototype. Use pfildes.
10209 (create_file_event): Adjsut prototype.
10210 * remote-utils.c (remote_desc, listen_desc): Change type to
10211 gdb_fildes_t.
10212 * server.h: New gdb_fildes_t typedef.
10213 [USE_WIN32API]: Include winsock2.h.
10214 (delete_file_handler, add_file_handler): Adjust prototypes.
10215 (pfildes): Declare.
10216 * utils.c (pfildes): New.
10217
10218 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10219
10220 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10221 * configure: Regenerate.
10222
10223 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10224
10225 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10226 (linux_done_accessing_memory): ... this.
10227 (linux_target_ops): Adjust.
10228 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10229 * nto-low.c (nto_target_ops): Adjust comment.
10230 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10231 * spu-low.c (spu_target_ops): Adjust comment.
10232 * target.h (target_ops): Rename unprepare_to_access_memory field
10233 to done_accessing_memory.
10234 (unprepare_to_access_memory): Rename to ...
10235 (done_accessing_memory): ... this.
10236
10237 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10238
10239 * linux-low.c (linux_prepare_to_access_memory): New.
10240 (linux_unprepare_to_access_memory): New.
10241 (linux_target_ops): Install them.
10242 * server.c (read_memory): Rename to ...
10243 (gdb_read_memory): ... this. Use
10244 prepare_to_access_memory/prepare_to_access_memory.
10245 (write_memory): Rename to ...
10246 (gdb_write_memory): ... this. Use
10247 prepare_to_access_memory/prepare_to_access_memory.
10248 (handle_search_memory_1): Adjust.
10249 (process_serial_event): Adjust.
10250 * target.h (struct target_ops): New fields
10251 prepare_to_access_memory and unprepare_to_access_memory.
10252 (prepare_to_access_memory, unprepare_to_access_memory): New.
10253 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10254 prepare_to_access_memory/prepare_to_access_memory.
10255 * nto-low.c (nto_target_ops): Adjust.
10256 * spu-low.c (spu_target_ops): Adjust.
10257 * win32-low.c (win32_target_ops): Adjust.
10258
10259 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10260
10261 * Makefile.in (WARN_CFLAGS): Get it from configure.
10262 (WERROR_CFLAGS): New.
10263 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10264 * configure.ac: Introduce --enable-werror, which adds -Werror to
10265 the compiler command line. Enabled by default. Disable with
10266 --disable-werror. Add -Wdeclaration-after-statement
10267 Wpointer-arith and -Wformat-nonliteral to warning flags.
10268 * configure: Regenerate.
10269
10270 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10271
10272 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10273
10274 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10275
10276 * gdbreplay.c (remote_error): New.
10277 (gdbchar): New.
10278 (expect): Use gdbchar. Check for error reading from GDB.
10279 Clarify sync error output.
10280 (play): Check for errors writing to GDB.
10281 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10282 * remote-utils.c (getpkt): Check for errors writing to the remote
10283 descriptor.
10284
10285 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10286
10287 * linux-low.c (linux_wait_1): Move non-debugging code out of
10288 `debug_threads' control.
10289
10290 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10291
10292 * linux-low.c (linux_wait_1): Don't set last_status here.
10293 * server.c (push_event, queue_stop_reply_callback): Assert we're
10294 not pushing a TARGET_WAITKIND_IGNORE event.
10295 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10296 (myresume, handle_target_event): Set the thread's last_resume_kind
10297 and last_status from the target returned status.
10298
10299 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10300
10301 PR threads/10729
10302
10303 * linux-x86-low.c (update_debug_registers_callback): New.
10304 (i386_dr_low_set_addr): Use it.
10305 (i386_dr_low_get_addr): New.
10306 (i386_dr_low_set_control): Use update_debug_registers_callback.
10307 (i386_dr_low_get_control): New.
10308 (i386_dr_low_get_status): Adjust.
10309 * linux-low.c (linux_stop_lwp): New.
10310 * linux-low.h (linux_stop_lwp): Declare.
10311
10312 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10313 argument instead of a i386_debug_reg_state.
10314 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10315 a i386_debug_reg_state.
10316 (i386_insert_aligned_watchpoint): Adjust.
10317 (i386_remove_aligned_watchpoint): Adjust.
10318 (i386_low_stopped_data_address): Read the debug registers from the
10319 inferior instead of from the mirrors.
10320 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10321 (i386_dr_low_get_addr): Declare.
10322 (i386_dr_low_get_control): Declare.
10323 (i386_dr_low_get_status): Change prototype.
10324
10325 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10326 (i386_dr_low_get_addr): New.
10327 (i386_dr_low_get_control): New.
10328 (i386_dr_low_get_status): Adjust prototype. Return
10329 dr_status_mirror.
10330 (i386_initial_stuff): Clear dr_status_mirror and
10331 dr_control_mirror.
10332 (i386_get_thread_context): Adjust.
10333 (i386_set_thread_context): Adjust.
10334 (i386_thread_added): Adjust.
10335
10336 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10337
10338 * linux-low.h (linux_thread_area): Delete declaration.
10339
10340 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10341
10342 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10343 after its termination.
10344
10345 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10346
10347 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10348 (gdb_wants_all_stopped): Delete.
10349 (linux_wait_1): Don't call them.
10350 * server.c (handle_v_cont): Tag all threads as want-stopped.
10351 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10352 stopped as "client-wants-stopped".
10353
10354 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10355
10356 * Makefile.in (signals_h): New.
10357 (server_h): Depend on it.
10358 (server.o): Don't depend on $(signals_def).
10359 (signals.o): Depend on $(signals_def).
10360
10361 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10362
10363 * Makefile.in (signals_def): New.
10364 (server_h): Append include/gdb/signals.h and signals_def.
10365 (server.o): Append signals_def.
10366
10367 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10368
10369 * server.c (handle_target_event): Use target_signal_to_host for
10370 resume_info.sig initialization.
10371 * target.h (struct thread_resume) <sig>: New comment.
10372
10373 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10374
10375 * server.c (handle_query): strcpy() the returned string from paddress()
10376 instead of sprintf().
10377 * utils.c (paddress): Return phex_nz().
10378
10379 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10380
10381 * server.c (handle_v_cont): Call mourn_inferior if process
10382 just exited.
10383 (myresume): Likewise.
10384
10385 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10386
10387 Static tracepoints, and integration with UST.
10388
10389 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10390 * mem-break.c (uninsert_all_breakpoints)
10391 (reinsert_all_breakpoints): New.
10392 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10393 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10394 (gdb_agent_ust_loaded, helper_thread_id)
10395 (gdb_agent_helper_thread_id): New macros.
10396 (struct ipa_sym_addresses): Add addr_ust_loaded,
10397 addr_helper_thread_id, addr_cmd_buf.
10398 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10399 (in_process_agent_loaded_ust): New.
10400 (write_e_ust_not_loaded): New.
10401 (maybe_write_ipa_ust_not_loaded): New.
10402 (struct collect_static_trace_data_action): New.
10403 (enum tracepoint_type) <static_tracepoint>: New.
10404 (struct tracepoint) <handle>: Mention static tracepoints.
10405 (struct static_tracepoint_ctx): New.
10406 (CMD_BUF_SIZE): New.
10407 (add_tracepoint_action): Handle static tracepoint actions.
10408 (unprobe_marker_at): New.
10409 (clear_installed_tracepoints): Handle static tracepoints.
10410 (cmd_qtdp): Handle static tracepoints.
10411 (probe_marker_at): New.
10412 (cmd_qtstart): Handle static tracepoints.
10413 (response_tracepoint): Handle static tracepoints.
10414 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10415 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10416 (get_context_regcache): Handle static tracepoints.
10417 (do_action_at_tracepoint): Handle static tracepoint actions.
10418 (traceframe_find_block_type): Handle static trace data blocks.
10419 (traceframe_read_sdata): New.
10420 (download_tracepoints): Download static tracepoint actions.
10421 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10422 (GDB_PROBE_NAME): New.
10423 (ust_ops): New.
10424 (GET_UST_SYM): New.
10425 (USTF): New.
10426 (dlsym_ust): New.
10427 (ust_marker_to_static_tracepoint): New.
10428 (gdb_probe): New.
10429 (collect_ust_data_at_tracepoint): New.
10430 (gdb_ust_probe): New.
10431 (UNIX_PATH_MAX, SOCK_DIR): New.
10432 (gdb_ust_connect_sync_socket): New.
10433 (resume_thread, stop_thread): New.
10434 (run_inferior_command): New.
10435 (init_named_socket): New.
10436 (gdb_ust_socket_init): New.
10437 (cstr_to_hexstr): New.
10438 (next_st): New.
10439 (first_marker, next_marker): New.
10440 (response_ust_marker): New.
10441 (cmd_qtfstm, cmd_qtsstm): New.
10442 (unprobe_marker_at, probe_marker_at): New.
10443 (cmd_qtstmat, gdb_ust_thread): New.
10444 (gdb_ust_init): New.
10445 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10446 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10447 (ST_REGENTRY): New.
10448 (x86_64_st_collect_regmap): New.
10449 (X86_64_NUM_ST_COLLECT_GREGS): New.
10450 (AMD64_RIP_REGNUM): New.
10451 (supply_static_tracepoint_registers): New.
10452 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10453 (ST_REGENTRY): New.
10454 (i386_st_collect_regmap): New.
10455 (i386_NUM_ST_COLLECT_GREGS): New.
10456 (supply_static_tracepoint_registers): New.
10457 * server.c (handle_query): Handle qXfer:statictrace:read.
10458 <qSupported>: Report support for StaticTracepoints, and
10459 qXfer:statictrace:read features.
10460 * server.h (traceframe_read_sdata)
10461 (supply_static_tracepoint_registers): Declare.
10462 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10463 (unpack_varlen_hex): Include in IPA build.
10464 * Makefile.in (ustlibs, ustinc): New.
10465 (IPA_OBJS): Add remote-utils-ipa.o.
10466 ($(IPA_LIB)): Link -ldl and -lpthread.
10467 (UST_CFLAGS): New.
10468 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10469 * config.in, configure: Regenerate.
10470
10471 2010-06-20 Ian Lance Taylor <iant@google.com>
10472 Pedro Alves <pedro@codesourcery.com>
10473
10474 * linux-x86-low.c (always_true): Delete.
10475 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10476 trying to fool the compiler with always_true.
10477
10478 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10479
10480 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10481 conditions in gdbserver.
10482
10483 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10484
10485 * spu-low.c (spu_read_memory): Wrap around local store limit.
10486 (spu_write_memory): Likewise.
10487
10488 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10489
10490 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10491 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10492 LONGEST uses.
10493 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10494 uses.
10495 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10496 uses with LONGEST uses.
10497
10498 2010-06-14 Stan Shebs <stan@codesourcery.com>
10499 Pedro Alves <pedro@codesourcery.com>
10500
10501 Bytecode compiler.
10502
10503 * linux-x86-low.c: Include limits.h.
10504 (add_insns): New.
10505 (always_true): New.
10506 (EMIT_ASM): New.
10507 (EMIT_ASM32): New.
10508 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10509 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10510 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10511 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10512 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10513 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10514 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10515 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10516 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10517 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10518 (amd64_emit_void_call_2): New.
10519 (amd64_emit_ops): New.
10520 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10521 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10522 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10523 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10524 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10525 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10526 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10527 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10528 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10529 (i386_emit_stack_adjust, i386_emit_int_call_1)
10530 (i386_emit_void_call_2): New.
10531 (i386_emit_ops): New.
10532 (x86_emit_ops): New.
10533 (the_low_target): Install x86_emit_ops.
10534 * server.h (struct emit_ops): New.
10535 (get_raw_reg_func_addr): Declare.
10536 (current_insn_ptr, emit_error): Declare.
10537 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10538 (set_trace_state_variable_value): New defines.
10539 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10540 addr_get_trace_state_variable_value and
10541 addr_set_trace_state_variable_value.
10542 (symbol_list): New fields for get_raw_reg,
10543 get_trace_state_variable_value and set_trace_state_variable_value.
10544 (condfn): New typedef.
10545 (struct tracepoint): New field `compiled_cond'.
10546 (do_action_at_tracepoint): Clear compiled_cond.
10547 (get_trace_state_variable_value, set_trace_state_variable_value):
10548 Export in the IPA.
10549 (condition_true_at_tracepoint): If there's a compiled condition,
10550 run that.
10551 (current_insn_ptr, emit_error): New globals.
10552 (struct bytecode_address): New.
10553 (get_raw_reg_func_addr): New.
10554 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10555 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10556 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10557 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10558 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10559 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10560 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10561 (compile_tracepoint_condition, compile_bytecodes): New.
10562 * target.h (emit_ops): Forward declare.
10563 (struct target_ops): New field emit_ops.
10564 (target_emit_ops): New.
10565 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10566 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10567 * linux-low.c (linux_emit_ops): New.
10568 (linux_target_ops): Install it.
10569 * linux-low.h (struct linux_target_ops): New field emit_ops.
10570
10571 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10572
10573 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10574 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10575
10576 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10577 Stan Shebs <stan@codesourcery.com>
10578
10579 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10580 (all): Depend on $(extra_libraries).
10581 (install-only): Install the IPA.
10582 (IPA_OBJS, IPA_LIB): New.
10583 (clean): Remove the IPA lib.
10584 (IPAGENT_CFLAGS): New.
10585 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10586 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10587 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10588 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10589 * configure.ac: Check for atomic builtins support in the compiler.
10590 (IPA_DEPFILES, extra_libraries): Define.
10591 * configure.srv (ipa_obj): Add description.
10592 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10593 (i[34567]86-*-linux*): Set ipa_obj.
10594 (x86_64-*-linux*): Set ipa_obj.
10595 * linux-low.c (stabilizing_threads): New.
10596 (supports_fast_tracepoints): New.
10597 (linux_detach): Stabilize threads before detaching.
10598 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10599 the lwp is either not stabilizing, or is moving out of a jump pad.
10600 (linux_fast_tracepoint_collecting): New.
10601 (maybe_move_out_of_jump_pad): New.
10602 (enqueue_one_deferred_signal): New.
10603 (dequeue_one_deferred_signal): New.
10604 (linux_wait_for_event_1): If moving out of a jump pad, defer
10605 pending signals to later.
10606 (linux_stabilize_threads): New.
10607 (linux_wait_1): Check if threads need moving out of jump pads, and
10608 do it if so.
10609 (stuck_in_jump_pad_callback): New.
10610 (move_out_of_jump_pad_callback): New.
10611 (lwp_running): New.
10612 (linux_resume_one_lwp): Handle moving out of jump pads.
10613 (linux_set_resume_request): Dequeue deferred signals.
10614 (need_step_over_p): Also step over fast tracepoint jumps.
10615 (start_step_over): Also uninsert fast tracepoint jumps.
10616 (finish_step_over): Also reinsert fast tracepoint jumps.
10617 (linux_install_fast_tracepoint_jump): New.
10618 (linux_target_ops): Install linux_stabilize_threads and
10619 linux_install_fast_tracepoint_jump_pad.
10620 * linux-low.h (linux_target_ops) <get_thread_area,
10621 install_fast_tracepoint_jump_pad>: New fields.
10622 (struct lwp_info) <collecting_fast_tracepoint,
10623 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10624 (linux_get_thread_area): Declare.
10625 * linux-x86-low.c (jump_insn): New.
10626 (x86_get_thread_area): New.
10627 (append_insns): New.
10628 (push_opcode): New.
10629 (amd64_install_fast_tracepoint_jump_pad): New.
10630 (i386_install_fast_tracepoint_jump_pad): New.
10631 (x86_install_fast_tracepoint_jump_pad): New.
10632 (the_low_target): Install x86_get_thread_area and
10633 x86_install_fast_tracepoint_jump_pad.
10634 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10635 (struct fast_tracepoint_jump): New.
10636 (fast_tracepoint_jump_insn): New.
10637 (fast_tracepoint_jump_shadow): New.
10638 (find_fast_tracepoint_jump_at): New.
10639 (fast_tracepoint_jump_here): New.
10640 (delete_fast_tracepoint_jump): New.
10641 (set_fast_tracepoint_jump): New.
10642 (uninsert_fast_tracepoint_jumps_at): New.
10643 (reinsert_fast_tracepoint_jumps_at): New.
10644 (set_breakpoint_at): Use write_inferior_memory.
10645 (uninsert_raw_breakpoint): Use write_inferior_memory.
10646 (check_mem_read): Mask out fast tracepoint jumps.
10647 (check_mem_write): Mask out fast tracepoint jumps.
10648 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10649 (set_fast_tracepoint_jump): Declare.
10650 (delete_fast_tracepoint_jump)
10651 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10652 (reinsert_fast_tracepoint_jumps_at): Declare.
10653 * regcache.c: Don't compile many functions when building the
10654 in-process agent library.
10655 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10656 the register buffer in the heap.
10657 (free_register_cache): If the register buffer isn't owned by the
10658 regcache, don't free it.
10659 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10660 pre-existing register caches.
10661 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10662 type.
10663 (convert_ascii_to_int): : Constify `from' parameter type.
10664 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10665 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10666 the needed buffer in-place.
10667 (relocate_instruction): New.
10668 * server.c (handle_query) <qSymbols>: If the target supports
10669 tracepoints, give it a chance of looking up symbols. Report
10670 support for fast tracepoints.
10671 (handle_status): Stabilize threads.
10672 (process_serial_event): Adjust.
10673 * server.h (struct fast_tracepoint_jump): Forward declare.
10674 (struct process_info) <fast_tracepoint_jumps>: New field.
10675 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10676 (decode_X_packet, decode_M_packet): Adjust.
10677 (relocate_instruction): Declare.
10678 (in_process_agent_loaded): Declare.
10679 (tracepoint_look_up_symbols): Declare.
10680 (struct fast_tpoint_collect_status): Declare.
10681 (fast_tracepoint_collecting): Declare.
10682 (force_unlock_trace_buffer): Declare.
10683 (handle_tracepoint_bkpts): Declare.
10684 (initialize_low_tracepoint)
10685 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10686 * target.h (struct target_ops) <stabilize_threads,
10687 install_fast_tracepoint_jump_pad>: New fields.
10688 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10689 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10690 [HAVE_STDINT_H]: Include stdint.h.
10691 (trace_debug_1): Rename to ...
10692 (trace_vdebug): ... this.
10693 (trace_debug): Rename to ...
10694 (trace_debug_1): ... this. Add `level' parameter.
10695 (trace_debug): New.
10696 (ATTR_USED, ATTR_NOINLINE): New.
10697 (IP_AGENT_EXPORT): New.
10698 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10699 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10700 (about_to_request_buffer_space, trace_buffer_is_full)
10701 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10702 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10703 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10704 (traceframe_write_count, traceframes_created)
10705 (trace_state_variables)
10706 New renaming defines.
10707 (struct ipa_sym_addresses): New.
10708 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10709 (symbol_list): New.
10710 (ipa_sym_addrs): New.
10711 (all_tracepoint_symbols_looked_up): New.
10712 (in_process_agent_loaded): New.
10713 (write_e_ipa_not_loaded): New.
10714 (maybe_write_ipa_not_loaded): New.
10715 (tracepoint_look_up_symbols): New.
10716 (debug_threads) [IN_PROCESS_AGENT]: New.
10717 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10718 (UNKNOWN_SIDE_EFFECTS): New.
10719 (stop_tracing): New.
10720 (flush_trace_buffer): New.
10721 (stop_tracing_bkpt): New.
10722 (flush_trace_buffer_bkpt): New.
10723 (read_inferior_integer): New.
10724 (read_inferior_uinteger): New.
10725 (read_inferior_data_pointer): New.
10726 (write_inferior_data_pointer): New.
10727 (write_inferior_integer): New.
10728 (write_inferior_uinteger): New.
10729 (struct collect_static_trace_data_action): Delete.
10730 (enum tracepoint_type): New.
10731 (struct tracepoint) <type>: New field `type'.
10732 <actions_str, step_actions, step_actions_str>: Only include in
10733 GDBserver.
10734 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10735 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10736 (tracepoints): Use IP_AGENT_EXPORT.
10737 (last_tracepoint): Don't include in the IPA.
10738 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10739 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10740 (alloced_trace_state_variables): New.
10741 (trace_state_variables): Use IP_AGENT_EXPORT.
10742 (traceframe_t): Delete unused variable.
10743 (circular_trace_buffer): Don't include in the IPA.
10744 (trace_buffer_start): Delete.
10745 (struct trace_buffer_control): New.
10746 (trace_buffer_free): Delete.
10747 (struct ipa_trace_buffer_control): New.
10748 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10749 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10750 New.
10751 (trace_buffer_ctrl): New.
10752 (TRACE_BUFFER_CTRL_CURR): New.
10753 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10754 Reimplement as macros.
10755 (trace_buffer_wrap): Delete.
10756 (traceframe_write_count, traceframe_read_count)
10757 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10758 (struct tracepoint_hit_ctx) <type>: New field.
10759 (struct fast_tracepoint_ctx): New.
10760 (memory_barrier): New.
10761 (cmpxchg): New.
10762 (record_tracepoint_error): Update atomically in the IPA.
10763 (clear_inferior_trace_buffer): New.
10764 (about_to_request_buffer_space): New.
10765 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10766 updating the same buffer.
10767 (add_tracepoint): Default the tracepoint's type to trap
10768 tracepoint, and orig_size to -1.
10769 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10770 internal variables.
10771 (create_trace_state_variable): New parameter `gdb'. Handle it.
10772 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10773 (cmd_qtdp): Handle fast tracepoints.
10774 (cmd_qtdv): Adjust.
10775 (max_jump_pad_size): New.
10776 (gdb_jump_pad_head): New.
10777 (get_jump_space_head): New.
10778 (claim_jump_space): New.
10779 (sort_tracepoints): New.
10780 (MAX_JUMP_SIZE): New.
10781 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10782 IPA.
10783 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10784 support. Upload fast traceframes, and delete internal IPA
10785 breakpoints.
10786 (stop_tracing_handler): New.
10787 (flush_trace_buffer_handler): New.
10788 (cmd_qtstop): Upload fast tracepoints.
10789 (response_tracepoint): Handle fast tracepoints.
10790 (tracepoint_finished_step): Upload fast traceframes. Set the
10791 tracepoint hit context's tracepoint type.
10792 (handle_tracepoint_bkpts): New.
10793 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10794 type. Add comment about fast tracepoints.
10795 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10796 non-existing action_str field.
10797 (get_context_regcache): Handle fast tracepoints.
10798 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10799 to the regcache.
10800 (fast_tracepoint_from_jump_pad_address): New.
10801 (fast_tracepoint_from_ipa_tpoint_address): New.
10802 (collecting_t): New.
10803 (force_unlock_trace_buffer): New.
10804 (fast_tracepoint_collecting): New.
10805 (collecting): New.
10806 (gdb_collect): New.
10807 (write_inferior_data_ptr): New.
10808 (target_tp_heap): New.
10809 (target_malloc): New.
10810 (download_agent_expr): New.
10811 (UALIGN): New.
10812 (download_tracepoints): New.
10813 (download_trace_state_variables): New.
10814 (upload_fast_traceframes): New.
10815 (IPA_FIRST_TRACEFRAME): New.
10816 (IPA_NEXT_TRACEFRAME_1): New.
10817 (IPA_NEXT_TRACEFRAME): New.
10818 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10819 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10820 (gdb_jump_pad_buffer_end): New.
10821 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10822 (initialize_tracepoint): Adjust.
10823 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10824 buffer. Initialize the low module.
10825 * utils.c (PREFIX, TOOLNAME): New.
10826 (malloc_failure): Use PREFIX.
10827 (error): In the IPA, an error causes an exit.
10828 (fatal, warning): Use PREFIX.
10829 (internal_error): Use TOOLNAME.
10830 (NUMCELLS): Increase to 10.
10831 * configure, config.in: Regenerate.
10832
10833 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10834
10835 * server.c (handle_query) <qSupported>: Do two passes over the
10836 qSupported string to avoid nesting strtok.
10837
10838 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10839
10840 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10841 (CDEPS): New.
10842 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10843 -Wl,--dynamic-list.
10844 * configure: Regenerate.
10845 * proc-service.list: New.
10846
10847 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10848
10849 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10850 New comment.
10851
10852 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10853
10854 * gdbreplay.c (remote_open): Check error return from socket() call by
10855 its equality to -1 not by it being negative.
10856 * remote-utils.c (remote_open): Likewise.
10857
10858 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10859
10860 * config.h: Regenerate.
10861
10862 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10863
10864 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10865 doesn't provide PTRACE_GET_THREAD_AREA.
10866
10867 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10868
10869 * linux-m68k-low.c: Include <asm/ptrace.h>
10870 (ps_get_thread_area): Implement.
10871
10872 2010-05-03 Doug Evans <dje@google.com>
10873
10874 * event-loop.c (struct callback_event): New struct.
10875 (callback_list): New global.
10876 (append_callback_event, delete_callback_event): New functions.
10877 (process_callback): New function.
10878 (start_event_loop): Call it.
10879 * remote-utils.c (NOT_SCHEDULED): Define.
10880 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10881 moved out of readchar.
10882 (readchar): Rewrite. Call reschedule before returning.
10883 (reset_readchar): New function.
10884 (remote_close): Call it.
10885 (process_remaining, reschedule): New functions.
10886 * server.h (callback_handler_func): New typedef.
10887 (append_callback_event, delete_callback_event): Declare.
10888
10889 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10890
10891 * proc-service.c (ps_pglobal_lookup): Use
10892 thread_db_look_up_one_symbol.
10893 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10894 parameter. Use it instead of all_symbols_looked_up.
10895 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10896 field.
10897 (all_symbols_looked_up): Don't declare.
10898 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10899 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10900 field.
10901 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10902 Set all_symbols_looked_up here.
10903 (thread_db_look_up_one_symbol): New.
10904 (thread_db_get_tls_address): Adjust.
10905 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10906 thread_db object on the heap, and tentatively set it in the
10907 process structure.
10908 (thread_db_init): Don't set all_symbols_looked_up here.
10909 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10910
10911 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10912
10913 * linux-low.c (linux_kill, linux_detach): Adjust.
10914 (status_pending_p_callback): Remove redundant statement. Check
10915 for !TARGET_WAITIKIND_IGNORE, instead of
10916 TARGET_WAITKIND_STOPPED.
10917 (handle_tracepoints): Make sure LWP is locked. Adjust.
10918 (linux_wait_for_event_1): Adjust.
10919 (linux_cancel_breakpoints): New.
10920 (unsuspend_one_lwp): New.
10921 (unsuspend_all_lwps): New.
10922 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10923 (send_sigstop_callback): Change return type to int, add new
10924 `except' parameter and handle it.
10925 (suspend_and_send_sigstop_callback): New.
10926 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10927 pass them down. If SUSPEND, also increment the lwp's suspend
10928 count.
10929 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10930 (need_step_over_p): Don't consider suspended LWPs.
10931 (start_step_over): Adjust.
10932 (proceed_one_lwp): Change return type to int, add new `except'
10933 parameter and handle it.
10934 (unsuspend_and_proceed_one_lwp): New.
10935 (proceed_all_lwps): Use find_inferior instead of
10936 for_each_inferior.
10937 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10938 also decrement the suspend count of LWPs. Pass `except' down,
10939 instead of hacking its suspend count.
10940 (linux_pause_all): Add `freeze' parameter. Adjust.
10941 (linux_unpause_all): New.
10942 (linux_target_ops): Install linux_unpause_all.
10943 * server.c (handle_status): Adjust.
10944 * target.h (struct target_ops): New fields `unpause_all' and
10945 `cancel_breakpoints'. Add new parameter to `pause_all'.
10946 (pause_all): Add new `freeze' parameter.
10947 (unpause_all): New.
10948 (cancel_breakpoints): New.
10949 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10950 cancel breakpoints.
10951 (cmd_qtstart): Pause threads.
10952 (stop_tracing): Pause threads, and cancel breakpoints.
10953 * win32-low.c (win32_target_ops): Adjust.
10954
10955 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10956
10957 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10958 the inferior right away from here...
10959 (linux_wait_1): ... to here, and adjust to check the thread's
10960 last_resume_kind instead of the lwp's step or stop_expected flags.
10961
10962 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10963
10964 * README: Use consistent `GDB' and `GDBserver' spellings.
10965
10966 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10967
10968 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10969 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10970 (linux_detach_one_lwp): Assume the lwp is stopped.
10971 (any_thread_of): Delete.
10972 (linux_detach): Stop all lwps here. Don't blindly delete all
10973 breakpoints.
10974 (delete_lwp_callback): New.
10975 (linux_mourn): Delete all lwps of the process that is gone.
10976 (linux_wait_1): Don't delete the last lwp of the process here.
10977 * mem-break.h (mark_breakpoints_out): Declare.
10978 * mem-break.c (mark_breakpoints_out): New.
10979 (free_all_breakpoints): Use it.
10980 * server.c (handle_target_event): If the process is gone, mark
10981 breakpoints out.
10982 * thread-db.c (struct thread_db) <create_bp>: New field.
10983 (thread_db_enable_reporting): Fix prototype. Store a thread event
10984 breakpoint reference in the thread_db struct.
10985 (thread_db_load_search): Clear the thread_db object.
10986 (try_thread_db_load_1): Ditto.
10987 (switch_to_process): New.
10988 (disable_thread_event_reporting): Use it.
10989 (remove_thread_event_breakpoints): New.
10990 (thread_db_detach, thread_db_mourn): Use it.
10991
10992 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10993
10994 * linux-low.c (linux_enable_event_reporting): New.
10995 (linux_wait_for_event_1, handle_extended_wait): Use it.
10996
10997 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10998
10999 * linux-low.c (linux_kill_one_lwp, linux_kill)
11000 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11001 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11002 SIGSTOP even if the LWP is stopped.
11003 (send_sigstop_callback): New.
11004 (stop_all_lwps): Use send_sigstop_callback instead.
11005 (linux_resume_one_thread): Adjust.
11006 (proceed_one_lwp): Still proceed an LWP that the client has
11007 requested to stop, if we haven't reported it as stopped yet. Make
11008 sure that LWPs the client want stopped, have a pending SIGSTOP.
11009
11010 2010-04-26 Doug Evans <dje@google.com>
11011
11012 * server.c (handle_general_set): Make static.
11013
11014 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11015 Print received char after testing for error/eof instead of before.
11016 (input_interrupt): Tweak comment.
11017
11018 2010-04-23 Doug Evans <dje@google.com>
11019
11020 * server.c (start_inferior): Print inferior argv if --debug.
11021
11022 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11023
11024 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11025 * nto-x86-low.c: Include server.h
11026
11027 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11028
11029 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11030 be consistent with other sources of this directory.
11031 (init_registers_amd64): Correct name of source file of this function
11032 in the comment.
11033
11034 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11035
11036 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11037 64-bit executables.
11038
11039 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11040
11041 * win32-i386-low.c: Add 64-bit support.
11042 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11043 (init_registers_amd64): Declare.
11044 (mappings): Add 64-bit version of array.
11045 (init_windows_x86): New function.
11046 (the_low_target): Change init_arch field to init_windows_x86.
11047
11048 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11049
11050 * win32-low.c: Adapt to support also 64-bit architecture.
11051 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11052 (get_image_name): Use SIZE_T type for local variable `done'.
11053 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11054 (toolhelp_get_dll_name): Idem.
11055 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11056 Use uintptr_t typecast to avoid warning.
11057 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11058 (handle_exception): Use phex_nz to avoid warning.
11059 (win32_wait): Remove unused local variable `process'.
11060
11061 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11062
11063 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11064 `amd64-avx.o'.
11065
11066 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11067
11068 * configure.ac: Use `ws2_32' library for srv_mingw.
11069 * configure: Regenerate.
11070 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11071 * remote-utils.c: Likewise.
11072
11073 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11074
11075 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11076 if __x86_64__ is defined.
11077
11078 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11079
11080 * configure: Regenerate.
11081
11082 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11083
11084 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11085 * target.h (target_ops): New get_tib_address field.
11086 * win32-low.h (win32_thread_info): Add thread_local_base field.
11087 * win32-low.c (child_add_thread): Add tlb argument.
11088 Set thread_local_base field to TLB.
11089 (get_child_debug_event): Adapt to child_add_thread change.
11090 (win32_get_tib_address): New function.
11091 (win32_target_ops): Set get_tib_address field to
11092 win32_get_tib_address.
11093 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11094
11095 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11096
11097 * linux-low.c (linux_mourn): Also remove the process.
11098 * server.c (handle_target_event): Don't remove the process here.
11099 * nto-low.c (nto_mourn): New.
11100 (nto_target_ops): Install it.
11101 * spu-low.c (spu_mourn): New.
11102 (spu_target_ops): Install it.
11103 * win32-low.c (win32_mourn): New.
11104 (win32_target_ops): Install it.
11105
11106 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11107
11108 * server.h (buffer_xml_printf): Remove redundant `;'.
11109
11110 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11111
11112 * regcache.c (set_register_cache): Invalidate regcaches before
11113 changing the register cache layout.
11114 (regcache_invalidate_one): Allow a NULL regcache.
11115 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11116 regcaches before changing the register cache layout or the target
11117 regsets.
11118
11119 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11120
11121 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11122 variable warning on Linux/x86-64.
11123
11124 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11125
11126 GDBserver disconnected tracing support.
11127
11128 * linux-low.c (linux_remove_process): Delete.
11129 (add_lwp): Don't set last_resume_kind here.
11130 (linux_kill): Use `mourn'.
11131 (linux_detach): Use `thread_db_detach', and `mourn'.
11132 (linux_mourn): New.
11133 (linux_attach_lwp_1): Adjust comment.
11134 (linux_attach): last_resume_kind moved the thread_info; adjust.
11135 (status_pending_p_callback): Adjust.
11136 (linux_wait_for_event_1): Adjust.
11137 (count_events_callback, select_singlestep_lwp_callback)
11138 (select_event_lwp_callback, cancel_breakpoints_callback)
11139 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11140 (proceed_one_lwp): Adjust.
11141 (linux_async): Add debug output.
11142 (linux_thread_stopped): New.
11143 (linux_pause_all): New.
11144 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11145 linux_pause_all.
11146 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11147 (thread_db_free): Delete declaration.
11148 (thread_db_detach, thread_db_mourn): Declare.
11149 * thread-db.c (thread_db_init): Use thread_db_mourn.
11150 (thread_db_free): Delete, split in two.
11151 (disable_thread_event_reporting): New.
11152 (thread_db_detach): New.
11153 (thread_db_mourn): New.
11154
11155 * server.h (struct thread_info) <last_resume_kind>: New field.
11156 <attached>: Add comment.
11157 <gdb_detached>: New field.
11158 (handler_func): Change return type to int.
11159 (handle_serial_event, handle_target_event): Ditto.
11160 (gdb_connected): Declare.
11161 (tracing): Delete.
11162 (disconnected_tracing): Declare.
11163 (stop_tracing): Declare.
11164
11165 * server.c (handle_query) <qSupported>: Report support for
11166 disconnected tracing.
11167 (queue_stop_reply_callback): Account for running threads.
11168 (gdb_wants_thread_stopped): New.
11169 (gdb_wants_all_threads_stopped): New.
11170 (gdb_reattached_process): New.
11171 (handle_status): Clear the `gdb_detached' flag of all processes.
11172 In all-stop, stop all threads.
11173 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11174 (process_serial_event): If the remote connection breaks, or if an
11175 exit was forced with "monitor exit", force an event loop exit.
11176 Handle disconnected tracing on detach.
11177 (handle_serial_event): Adjust.
11178 (handle_target_event): If GDB isn't connected, forward events back
11179 to the inferior, unless the last process exited, in which case,
11180 exit gdbserver. Adjust interface.
11181
11182 * remote-utils.c (remote_open): Don't block in accept. Instead
11183 register an event loop source on the listen socket file
11184 descriptor. Refactor bits into ...
11185 (listen_desc): ... this new global.
11186 (gdb_connected): ... this new function.
11187 (enable_async_notification): ... this new function.
11188 (handle_accept_event): ... this new function.
11189 (remote_close): Clear remote_desc.
11190
11191 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11192
11193 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11194 New fields.
11195 (mourn_inferior): Define.
11196 (target_process_qsupported): Avoid the dangling else problem.
11197 (thread_stopped): Define.
11198 (pause_all): Define.
11199 (target_waitstatus_to_string): Declare.
11200 * target.c (target_waitstatus_to_string): New.
11201
11202 * tracepoint.c (tracing): Make extern.
11203 (disconnected_tracing): New.
11204 (stop_tracing): Make extern. Handle tracing stops due to GDB
11205 disconnecting.
11206 (cmd_qtdisconnected): New.
11207 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11208 (handle_tracepoint_general_set): Handle QTDisconnected.
11209
11210 * event-loop.c (event_handler_func): Change return type to int.
11211 (process_event): Bail out if the event handler wants the event
11212 loop to stop.
11213 (handle_file_event): Ditto.
11214 (start_event_loop): Bail out if the event handler wants the event
11215 loop to stop.
11216
11217 * nto-low.c (nto_target_ops): Adjust.
11218 * spu-low.c (spu_wait): Don't remove the process here.
11219 (spu_target_ops): Adjust.
11220 * win32-low.c (win32_wait): Don't remove the process here.
11221 (win32_target_ops): Adjust.
11222
11223 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11224
11225 * regcache.c (realloc_register_cache): Invalidate inferior's
11226 regcache before recreating it.
11227
11228 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11229
11230 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11231
11232 2010-04-09 Stan Shebs <stan@codesourcery.com>
11233 Pedro Alves <pedro@codesourcery.com>
11234
11235 * server.h (LONGEST): New.
11236 (struct thread_info) <while_stepping>: New field.
11237 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11238 Declare.
11239 (initialize_tracepoint, handle_tracepoint_general_set)
11240 (handle_tracepoint_query, tracepoint_finished_step)
11241 (tracepoint_was_hit, release_while_stepping_state_list):
11242 (current_traceframe): Declare.
11243 * server.c (handle_general_set): Handle tracepoint packets.
11244 (read_memory): New.
11245 (write_memory): New.
11246 (handle_search_memory_1): Use read_memory.
11247 (handle_query): Report support for conditional tracepoints, trace
11248 state variables, and tracepoint sources. Handle tracepoint
11249 queries.
11250 (main): Initialize the tracepoints module.
11251 (process_serial_event): Handle traceframe reads/writes.
11252
11253 * linux-low.c (handle_tracepoints): New.
11254 (linux_wait_1): Call it.
11255 (linux_resume_one_lwp): Handle while-stepping.
11256 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11257 (linux_target_ops): Install them.
11258 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11259 New field.
11260 * linux-x86-low.c (x86_supports_tracepoints): New.
11261 (the_low_target). Install it.
11262
11263 * mem-break.h (delete_breakpoint): Declare.
11264 * mem-break.c (delete_breakpoint): Make external.
11265
11266 * target.h (struct target_ops): Add `supports_tracepoints',
11267 `read_pc', and `write_pc' fields.
11268 (target_supports_tracepoints): Define.
11269 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11270 (phex_nz): New.
11271
11272 * regcache.h (struct regcache) <registers_owned>: New field.
11273 (init_register_cache, regcache_cpy): Declare.
11274 (regcache_read_pc, regcache_write_pc): Declare.
11275 (register_cache_size): Declare.
11276 (supply_regblock): Declare.
11277 * regcache.c (init_register_cache): New.
11278 (new_register_cache): Use it.
11279 (regcache_cpy): New.
11280 (register_cache_size): New.
11281 (supply_regblock): New.
11282 (regcache_read_pc, regcache_write_pc): New.
11283
11284 * tracepoint.c: New.
11285
11286 * Makefile.in (OBS): Add tracepoint.o.
11287 (tracepoint.o): New rule.
11288
11289 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11290
11291 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11292 (i386-mmx.o): New.
11293 (i386-mmx.c): Likewise.
11294 (i386-mmx-linux.o): Likewise.
11295 (i386-mmx-linux.c): Likewise.
11296
11297 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11298 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11299 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11300 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11301
11302 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11303 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11304 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11305
11306 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11307
11308 * Makefile.in (clean): Updated.
11309 (i386-avx.o): New.
11310 (i386-avx.c): Likewise.
11311 (i386-avx-linux.o): Likewise.
11312 (i386-avx-linux.c): Likewise.
11313 (amd64-avx.o): Likewise.
11314 (amd64-avx.c): Likewise.
11315 (amd64-avx-linux.o): Likewise.
11316 (amd64-avx-linux.c): Likewise.
11317
11318 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11319 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11320 (srv_amd64_regobj): Add amd64-avx.o.
11321 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11322 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11323 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11324 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11325 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11326 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11327 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11328
11329 * i387-fp.c: Include "i386-xstate.h".
11330 (i387_xsave): New.
11331 (i387_cache_to_xsave): Likewise.
11332 (i387_xsave_to_cache): Likewise.
11333 (x86_xcr0): Likewise.
11334
11335 * i387-fp.h (i387_cache_to_xsave): Likewise.
11336 (i387_xsave_to_cache): Likewise.
11337 (x86_xcr0): Likewise.
11338
11339 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11340 * linux-crisv32-low.c (target_regsets): Likewise.
11341 * linux-m68k-low.c (target_regsets): Likewise.
11342 * linux-mips-low.c (target_regsets): Likewise.
11343 * linux-ppc-low.c (target_regsets): Likewise.
11344 * linux-s390-low.c (target_regsets): Likewise.
11345 * linux-sh-low.c (target_regsets): Likewise.
11346 * linux-sparc-low.c (target_regsets): Likewise.
11347 * linux-xtensa-low.c (target_regsets): Likewise.
11348
11349 * linux-low.c: Include <sys/uio.h>.
11350 (regsets_fetch_inferior_registers): Support nt_type.
11351 (regsets_store_inferior_registers): Likewise.
11352 (linux_process_qsupported): New.
11353 (linux_target_ops): Add linux_process_qsupported.
11354
11355 * linux-low.h (regset_info): Add nt_type.
11356 (linux_target_ops): Add process_qsupported.
11357
11358 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11359 and <sys/uio.h>.
11360 (init_registers_i386_avx_linux): New.
11361 (init_registers_amd64_avx_linux): Likewise.
11362 (xmltarget_i386_linux_no_xml): Likewise.
11363 (xmltarget_amd64_linux_no_xml): Likewise.
11364 (PTRACE_GETREGSET): Likewise.
11365 (PTRACE_SETREGSET): Likewise.
11366 (x86_fill_xstateregset): Likewise.
11367 (x86_store_xstateregset): Likewise.
11368 (use_xml): Likewise.
11369 (x86_linux_update_xmltarget): Likewise.
11370 (x86_linux_process_qsupported): Likewise.
11371 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11372 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11373 init_registers_i386_linux here. Call
11374 x86_linux_update_xmltarget.
11375 (the_low_target): Add x86_linux_process_qsupported.
11376
11377 * server.c (handle_query): Call target_process_qsupported.
11378
11379 * target.h (target_ops): Add process_qsupported.
11380 (target_process_qsupported): New.
11381
11382 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11383
11384 * inferiors.c (add_thread): Set last_status kind to
11385 TARGET_WAITKIND_IGNORE.
11386 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11387 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11388 (linux_wait_1): Move `thread' local definition to block that uses
11389 it. Don't NULL initialize `event_child'.
11390 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11391 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11392 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11393
11394 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11395
11396 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11397 an extended waitstatus, or by a watchpoint.
11398 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11399 thread was stepping or has been stopped by a watchpoint.
11400
11401 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11402
11403 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11404 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11405 of another, then delete the previous, and validate all
11406 breakpoints.
11407 (validate_inserted_breakpoint): New.
11408 (delete_disabled_breakpoints): New.
11409 (validate_breakpoints): New.
11410 (check_mem_read): Validate breakpoints before trusting their
11411 shadow. Delete disabled breakpoints.
11412 (check_mem_write): Validate breakpoints before trusting they
11413 should be inserted. Delete disabled breakpoints.
11414 * mem-break.h (validate_breakpoints):
11415 * server.c (handle_query): Validate breakpoints when we see a
11416 qSymbol query.
11417
11418 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11419
11420 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11421 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11422 if we could tell there's a GDB breakpoint at stop_pc.
11423 (need_step_over_p): Don't do a step over if we find a GDB
11424 breakpoint at the resume PC.
11425
11426 * mem-break.c (struct raw_breakpoint): New.
11427 (enum bkpt_type): New type `gdb_breakpoint'.
11428 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11429 fields. New field `raw'.
11430 (find_raw_breakpoint_at): New.
11431 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11432 breakpoint instead.
11433 (set_breakpoint_at): Adjust.
11434 (delete_raw_breakpoint): New.
11435 (release_breakpoint): New.
11436 (delete_breakpoint): Rename to...
11437 (delete_breakpoint_1): ... this. Add proc parameter. Use
11438 release_breakpoint. Return ENOENT.
11439 (delete_breakpoint): Reimplement.
11440 (find_breakpoint_at): Delete.
11441 (find_gdb_breakpoint_at): New.
11442 (delete_breakpoint_at): Delete.
11443 (set_gdb_breakpoint_at): New.
11444 (delete_gdb_breakpoint_at): New.
11445 (gdb_breakpoint_here): New.
11446 (set_reinsert_breakpoint): Use release_breakpoint.
11447 (uninsert_breakpoint): Rename to ...
11448 (uninsert_raw_breakpoint): ... this.
11449 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11450 (reinsert_raw_breakpoint): Change parameter type to
11451 raw_breakpoint.
11452 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11453 instead.
11454 (check_breakpoints): Adjust. Use release_breakpoint.
11455 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11456 (breakpoint_inserted_here): Ditto.
11457 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11458 Don't trust the breakpoint's shadow if it is not inserted.
11459 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11460 (delete_all_breakpoints): Adjust.
11461 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11462 use delete_breakpoint_1.
11463
11464 * mem-break.h (breakpoints_supported): Delete declaration.
11465 (set_gdb_breakpoint_at): Declare.
11466 (gdb_breakpoint_here): Declare.
11467 (delete_breakpoint_at): Delete.
11468 (delete_gdb_breakpoint_at): Declare.
11469
11470 * server.h (struct raw_breakpoint): Forward declare.
11471 (struct process_info): New field `raw_breakpoints'.
11472
11473 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11474 breakpoints.
11475
11476 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11477
11478 * linux-low.c (status_pending_p_callback): Fix comment.
11479 (linux_wait_for_event_1): Move most of the internal breakpoint
11480 handling from here...
11481 (linux_wait_1): ... to here.
11482 (count_events_callback): New.
11483 (select_singlestep_lwp_callback): New.
11484 (select_event_lwp_callback): New.
11485 (cancel_breakpoints_callback): New.
11486 (select_event_lwp): New.
11487 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11488 priority to all LWPs that have had events that should be reported
11489 to the client. Cancel breakpoints when about to reporting the
11490 event to the client, not while stopping lwps. No longer cancel
11491 finished single-steps here.
11492 (cancel_finished_single_step): Delete.
11493 (cancel_finished_single_steps): Delete.
11494
11495 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11496
11497 * mem-break.c (enum bkpt_type): New.
11498 (struct breakpoint): New field `type'.
11499 (set_breakpoint_at): Change return type to struct breakpoint
11500 pointer. Set type to `other_breakpoint' by default.
11501 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11502 in the breakpoint list.
11503 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11504 (reinsert_breakpoint): Rename to ...
11505 (reinsert_raw_breakpoint): ... this.
11506 (reinsert_breakpoints_at): Adjust.
11507 * mem-break.h (struct breakpoint): Declare.
11508 (set_breakpoint_at): Change return type to struct breakpoint
11509 pointer.
11510
11511 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11512
11513 * server.c (handle_query): Assign, not compare.
11514
11515 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11516
11517 Teach linux gdbserver to step-over-breakpoints.
11518
11519 * linux-low.c (can_hardware_single_step): New.
11520 (supports_breakpoints): New.
11521 (handle_extended_wait): If stopping threads, read the stop pc of
11522 the new cloned LWP.
11523 (get_pc): New.
11524 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11525 low target doesn't support retrieving the PC.
11526 (add_lwp): Set last_resume_kind to resume_continue.
11527 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11528 (linux_attach): Don't clear stop_expected. Set the lwp's
11529 last_resume_kind to resume_stop.
11530 (linux_detach_one_lwp): Don't check for removed breakpoints.
11531 (check_removed_breakpoint): Delete.
11532 (status_pending_p): Rename to ...
11533 (status_pending_p_callback): ... this. Don't check for removed
11534 breakpoints. Don't consider threads that are stopped from GDB's
11535 perspective.
11536 (linux_wait_for_lwp): Always read the stop_pc here.
11537 (cancel_breakpoint): New.
11538 (step_over_bkpt): New global.
11539 (linux_wait_for_event_1): Implement stepping over breakpoints.
11540 (gdb_wants_lwp_stopped): New.
11541 (gdb_wants_all_stopped): New.
11542 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11543 single-step traps here. Store the thread's last reported target
11544 wait status.
11545 (send_sigstop): Don't clear stop_expected. Always set it,
11546 instead.
11547 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11548 (cancel_finished_single_step): New.
11549 (cancel_finished_single_steps): New.
11550 (wait_for_sigstop): Don't cancel finished single-step traps here.
11551 (linux_resume_one_lwp): Don't check for removed breakpoints.
11552 Don't set `step' on non-hardware step archs.
11553 (linux_set_resume_request): Ignore resume_stop requests if already
11554 stopping or stopped. Set the lwp's last_resume_kind.
11555 (resume_status_pending_p): Don't check for removed breakpoints.
11556 (need_step_over_p): New.
11557 (start_step_over): New.
11558 (finish_step_over): New.
11559 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11560 requests. Clear the thread's last reported target waitstatus.
11561 Don't use the `suspended' flag. Don't consider pending breakpoints.
11562 (linux_resume): Start a step-over if necessary.
11563 (proceed_one_lwp): New.
11564 (proceed_all_lwps): New.
11565 (unstop_all_lwps): New.
11566 * linux-low.h (struct lwp_info): Rewrite comment for the
11567 `suspended' flag. Add the `stop_pc' field. Delete the
11568 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11569 Add `'last_resume_kind' and `need_step_over' fields.
11570 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11571 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11572 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11573 (set_raw_breakpoint_at): New.
11574 (set_breakpoint_at): Rewrite to use it.
11575 (reinsert_breakpoint_handler): Delete.
11576 (set_reinsert_breakpoint): New.
11577 (reinsert_breakpoint_by_bp): Delete.
11578 (delete_reinsert_breakpoints): New.
11579 (uninsert_breakpoint): Rewrite.
11580 (uninsert_breakpoints_at): New.
11581 (reinsert_breakpoint): Rewrite.
11582 (reinsert_breakpoints_at): New.
11583 (check_breakpoints): Rewrite.
11584 (breakpoint_here): New.
11585 (breakpoint_inserted_here): New.
11586 (check_mem_read): Adjust.
11587 * mem-break.h (breakpoints_supported, breakpoint_here)
11588 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11589 (reinsert_breakpoint_by_bp): Delete declaration.
11590 (delete_reinsert_breakpoints): Declare.
11591 (reinsert_breakpoint): Delete declaration.
11592 (reinsert_breakpoints_at): Declare.
11593 (uninsert_breakpoint): Delete declaration.
11594 (uninsert_breakpoints_at): Declare.
11595 (check_breakpoints): Adjust prototype.
11596 * server.h: Adjust include order.
11597 (struct thread_info): Declare here. Add a `last_status' field.
11598
11599 2010-03-23 Michael Snyder <msnyder@vmware.com>
11600
11601 * server.c (crc32): New function.
11602 (handle_query): Add handling for 'qCRC:' request.
11603
11604 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11605
11606 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11607 lwp had been stopped by a watchpoint.
11608
11609 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11610
11611 * server.h (internal_error): Declare.
11612 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11613 * utils.c (internal_error): New function.
11614
11615 2010-03-15 Andreas Schwab <schwab@redhat.com>
11616
11617 * configure.srv: Fix typo setting srv_regobj.
11618
11619 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11620
11621 * linux-low.c (fetch_register): Avoid passing a non string literal
11622 format to `error'.
11623 (usr_store_inferior_registers): Ditto.
11624
11625 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11626
11627 * linux-low.c (linux_write_memory): Bail out early if peeking
11628 memory failed.
11629
11630 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11631
11632 * linux-low.h (struct lwp_info): New fields
11633 `stopped_by_watchpoint' and `stopped_data_address'.
11634 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11635 here, and cache them in the lwp object.
11636 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11637 directly.
11638 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11639 field.
11640 (linux_stopped_by_watchpoint): Rewrite.
11641 (linux_stopped_data_address): Rewrite.
11642
11643 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11644
11645 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11646 switching the current inferior, not before.
11647
11648 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11649
11650 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11651 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11652 i386-linux.c and amd64-linux.c.
11653 (reg-i386.o): Removed.
11654 (reg-i386.c): Likewise.
11655 (reg-i386-linux.o): Likewise.
11656 (reg-i386-linux.c): Likewise.
11657 (reg-x86-64.o): Likewise.
11658 (reg-x86-64.c): Likewise.
11659 (reg-x86-64-linux.o): Likewise.
11660 (reg-x86-64-linux.c): Likewise.
11661 (i386.o): New.
11662 (i386.c): Likewise.
11663 (i386-linux.o): Likewise.
11664 (i386-linux.c): Likewise.
11665 (amd64.o): Likewise.
11666 (amd64.c): Likewise.
11667 (amd64-linux.o): Likewise.
11668 (amd64-linux.c): Likewise.
11669
11670 * configure.srv (srv_i386_regobj): New.
11671 (srv_i386_linux_regobj): Likewise.
11672 (srv_amd64_regobj): Likewise.
11673 (srv_amd64_linux_regobj): Likewise.
11674 (srv_i386_32bit_xmlfiles): Likewise.
11675 (srv_i386_64bit_xmlfiles): Likewise.
11676 (srv_i386_xmlfiles): Likewise.
11677 (srv_amd64_xmlfiles): Likewise.
11678 (srv_i386_linux_xmlfiles): Likewise.
11679 (srv_amd64_linux_xmlfiles): Likewise.
11680 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11681 srv_xmlfiles to $srv_i386_xmlfiles.
11682 (i[34567]86-*-mingw32ce*): Likewise.
11683 (i[34567]86-*-mingw*): Likewise.
11684 (i[34567]86-*-nto*): Likewise.
11685 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11686 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11687 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11688 (x86_64-*-linux*): Likewise.
11689
11690 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11691 (init_registers_amd64_linux): New.
11692 (x86_arch_setup): Replace init_registers_x86_64_linux with
11693 init_registers_amd64_linux.
11694
11695 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11696
11697 * configure.ac: Check for libdl. If it is not available link against
11698 static libthread_db.
11699 * configure: Regenerate.
11700
11701 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11702
11703 PR9605
11704
11705 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11706 handing a read watchpoint.
11707 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11708
11709 2010-02-12 Doug Evans <dje@google.com>
11710
11711 * linux-low.c (linux_supports_tracefork_flag): Document.
11712 (linux_look_up_symbols): Add comment.
11713
11714 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11715
11716 * regcache.c (supply_register): Clear regcache if buf is NULL.
11717
11718 2010-02-02 Nicolas Roche <roche@sourceware.org>
11719 Joel Brobecker <brobecker@adacore.com>
11720
11721 * inferiors.c (find_inferior): Add function documentation.
11722 (unloaded_dll): Handle the case where the unloaded dll has not
11723 been previously registered in the dll list.
11724
11725 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11726
11727 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11728 (thumb2_breakpoint): New.
11729 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11730
11731 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11732
11733 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11734 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11735 breakpoints.
11736
11737 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11738
11739 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11740
11741 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11742
11743 * linux-s390-low.c (s390_collect_ptrace_register)
11744 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11745
11746 2010-01-21 Doug Evans <dje@google.com>
11747
11748 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11749 (PTRACE_ARG4_TYPE): New macro.
11750 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11751 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11752 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11753 (usr_store_inferior_registers): Ditto.
11754 (linux_read_memory, linux_write_memory): Ditto.
11755 (linux_test_for_tracefork): Ditto.
11756
11757 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11758 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11759
11760 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11761
11762 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11763 target.
11764
11765 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11766
11767 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11768 prototype to take a regcache. Adjust.
11769
11770 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11771
11772 * regcache.h (struct thread_info): Forward declare.
11773 (struct regcache): New.
11774 (new_register_cache): Adjust prototype.
11775 (get_thread_regcache): Declare.
11776 (free_register_cache): Adjust prototype.
11777 (registers_to_string, registers_from_string): Ditto.
11778 (supply_register, supply_register_by_name, collect_register)
11779 (collect_register_as_string, collect_register_by_name): Ditto.
11780 * regcache.c (struct inferior_regcache_data): Delete.
11781 (get_regcache): Rename to ...
11782 (get_thread_regcache): ... this. Adjust. Switch inferior before
11783 fetching registers.
11784 (regcache_invalidate_one): Adjust.
11785 (regcache_invalidate): Fix prototype.
11786 (new_register_cache): Return the new register cache.
11787 (free_register_cache): Change prototype.
11788 (realloc_register_cache): Adjust.
11789 (registers_to_string): Change prototype to take a regcache. Adjust.
11790 (registers_from_string): Ditto.
11791 (register_data): Ditto.
11792 (supply_register): Ditto.
11793 (supply_register_by_name): Ditto.
11794 (collect_register): Ditto.
11795 (collect_register_as_string): Ditto.
11796 (collect_register_by_name): Ditto.
11797 * server.c (process_serial_event): Adjust.
11798 * linux-low.h (regset_fill_func, regset_store_func): Change
11799 prototype.
11800 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11801 Change prototype.
11802 * linux-low.c (get_stop_pc): Adjust.
11803 (check_removed_breakpoint): Adjust.
11804 (linux_wait_for_event): Adjust.
11805 (linux_resume_one_lwp): Adjust.
11806 (fetch_register): Add regcache parameter. Adjust.
11807 (usr_store_inferior_registers): Ditto.
11808 (regsets_fetch_inferior_registers): Ditto.
11809 (regsets_store_inferior_registers): Ditto.
11810 (linux_fetch_registers, linux_store_registers): Ditto.
11811 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11812 regcache. Adjust.
11813 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11814 Ditto.
11815 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11816 prototype to take a regcache.
11817 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11818 * remote-utils.c (convert_ascii_to_int, outreg)
11819 (prepare_resume_reply): Change prototype to take a regcache.
11820 Adjust.
11821 * target.h (struct target_ops) <fetch_registers, store_registers>:
11822 Change prototype to take a regcache.
11823 (fetch_inferior_registers, store_inferior_registers): Change
11824 prototype to take a regcache. Adjust.
11825 * proc-service.c (ps_lgetregs): Adjust.
11826 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11827 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11828 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11829 take a regcache. Adjust.
11830 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11831 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11832 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11833 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11834 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11835 (cris_cannot_fetch_register):
11836 (cris_breakpoint_at): Change prototype to take a regcache.
11837 Adjust.
11838 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11839 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11840 to take a regcache. Adjust.
11841 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11842 Adjust.
11843 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11844 take a regcache. Adjust.
11845 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11846 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11847 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11848 * linux-mips-low.c (mips_get_pc):
11849 (mips_set_pc): Change prototype to take a regcache. Adjust.
11850 (mips_reinsert_addr): Adjust.
11851 (mips_collect_register): Change prototype to take a regcache.
11852 Adjust.
11853 (mips_supply_register):
11854 (mips_collect_register_32bit, mips_supply_register_32bit)
11855 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11856 (mips_store_fpregset): Ditto.
11857 * linux-ppc-low.c (ppc_supply_ptrace_register)
11858 (ppc_supply_ptrace_register): Ditto.
11859 (parse_spufs_run): Adjust.
11860 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11861 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11862 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11863 take a regcache. Adjust.
11864 * linux-s390-low.c (s390_collect_ptrace_register)
11865 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11866 (s390_set_pc): Change prototype to take a regcache. Adjust.
11867 (s390_arch_setup): Adjust.
11868 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11869 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11870 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11871 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11872 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11873 regcache. Adjust.
11874 (sparc_breakpoint_at): Adjust.
11875 * linux-xtensa-low.c (xtensa_fill_gregset):
11876 (xtensa_store_gregset):
11877 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11878 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11879 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11880 prototype to take a regcache. Adjust.
11881 * win32-arm-low.c (arm_fetch_inferior_register)
11882 (arm_store_inferior_register): Change prototype to take a
11883 regcache. Adjust.
11884 * win32-i386-low.c (i386_fetch_inferior_register)
11885 (i386_store_inferior_register): Change prototype to take a
11886 regcache. Adjust.
11887 * win32-low.c (child_fetch_inferior_registers)
11888 (child_store_inferior_registers): Change prototype to take a
11889 regcache. Adjust.
11890 (win32_wait): Adjust.
11891 (win32_fetch_inferior_registers): Change prototype to take a
11892 regcache. Adjust.
11893 (win32_store_inferior_registers): Adjust.
11894 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11895 store_inferior_register>: Change prototype to take a regcache.
11896
11897 2010-01-20 Doug Evans <dje@google.com>
11898
11899 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11900 #ifdef.
11901 (linux_wait_for_event1, linux_init_signals): Ditto.
11902 (W_STOPCODE): Provide definition if missing.
11903
11904 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11905
11906 * linux-low.c (linux_core_of_thread): New.
11907 (compare_ints, show_process, list_threads): New.
11908 (linux_qxfer_osdata): Report threads and cores.
11909 (linux_target_op): Register linux_core_of_thread.
11910 * remote-utils.c (prepare_resume_reply): Report the core.
11911 (buffer_xml_printf): Support %d specifier.
11912 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11913 New.
11914 (handle_query): Handle qXfer:threads. Announce availability
11915 thereof.
11916 * target.h (struct target_ops): New field core_of_thread.
11917
11918 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11919
11920 * Makefile.in (clean): Remove new generated files.
11921 (reg-s390.o, reg-s390.c): Remove rules.
11922 (reg-s390x.o, reg-s390x.c): Likewise.
11923 (s390-linux32.o, s390-linux32.c): Add rules.
11924 (s390-linux64.o, s390-linux64.c): Likewise.
11925 (s390x-linux64.o, s390x-linux64.c): Likewise.
11926 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11927 * linux-s390-low.c: Include <elf.h>.
11928 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11929 (init_registers_s390): Remove prototype.
11930 (init_registers_s390x): Likewise.
11931 (init_registers_s390_linux32): Add prototype.
11932 (init_registers_s390_linux64): Likewise.
11933 (init_registers_s390x_linux64): Likewise.
11934 (s390_num_regs_3264): New define.
11935 (s390_regmap_3264): New global variable.
11936 (s390_cannot_fetch_register): Remove obsolete check.
11937 (s390_cannot_store_register): Likewise.
11938 (s390_collect_ptrace_register): Handle upper/lower register halves.
11939 (s390_supply_ptrace_register): Likewise.
11940 (s390_fill_gregset): Update to register number changes.
11941 (s390_get_hwcap): New routine.
11942 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11943 Install appropriate regmap and register set.
11944
11945 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11946
11947 * server.c (gdbserver_version): Update copyright year to 2010.
11948 * gdbreplay.c (gdbreplay_version): Likewise.
11949
11950 2009-12-28 Doug Evans <dje@google.com>
11951
11952 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11953 elf/external.h. Include <elf.h> instead but only if necessary.
11954
11955 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11956
11957 * linux-low.c (linux_remove_process): Remove `detaching'
11958 parameter. Don't release/detach from thread_db here.
11959 (linux_kill): Release/detach from thread_db here, ...
11960 (linux_detach): ... and here, before actually detaching.
11961 (linux_wait_1): ... and here, when a process exits.
11962 * thread-db.c (any_thread_of): New.
11963 (thread_db_free): Switch the current inferior to a thread of the
11964 passed in process.
11965
11966 2009-12-21 Doug Evans <dje@google.com>
11967
11968 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11969
11970 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11971 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11972 warning ifndef __NR_tkill. Move setting of errno there too.
11973 Delete unnecessary resetting of errno after syscall.
11974 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11975
11976 * configure.ac: Check for dladdr.
11977 * config.in: Regenerate.
11978 * configure: Regenerate.
11979 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11980 (try_thread_db_load): Update.
11981
11982 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11983
11984 2009-12-18 Doug Evans <dje@google.com>
11985
11986 * event-loop.c: Include unistd.h if it exists.
11987
11988 * linux-low.c (my_waitpid): Move definition away from being in
11989 between linux_tracefork_child/linux_test_for_tracefork.
11990
11991 * gdb_proc_service.h (psaddr_t): Fix type.
11992 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11993 signature to match glibc.
11994
11995 2009-12-16 Doug Evans <dje@google.com>
11996
11997 * linux-low.c (linux_read_memory): Fix argument to read.
11998
11999 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12000
12001 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12002 events, don't leave current_inferior pointing at null.
12003
12004 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12005
12006 * win32-low.c (LOG): Delete.
12007 (OUTMSG): Output to stderr.
12008 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12009 on compile time LOG macro.
12010 (win32_wait): Fix debug output.
12011
12012 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12013
12014 * win32-low.c (win32_add_one_solib): If the dll name is
12015 "ntdll.dll", prepend the system directory to the dll path.
12016
12017 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12018
12019 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12020
12021 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12022 Vladimir Prus <vladimir@codesourcery.com>
12023
12024 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12025 * configure.ac: Check for __mcoldfire__ and set
12026 gdb_cv_m68k_is_coldfire.
12027 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12028 reg-cf.o and reg-m68k.o.
12029 * configure: Regenerated.
12030
12031 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12032
12033 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12034 Pass it to thread_db_free.
12035 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12036 proper `detaching' argument to linux_remove_process.
12037 * linux-low.h (thread_db_free): Add `detaching' parameter.
12038 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12039 to thread_db_free.
12040 (thread_db_free): Add `detaching' parameter. Only
12041 call td_ta_clear_event if detaching from process.
12042
12043 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12044
12045 * thread-db.c (thread_db_free): Fix typo.
12046
12047 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12048
12049 PR gdb/10838
12050 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12051
12052 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12053
12054 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12055 with an i686 compiler.
12056 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12057 needed.
12058 * configure: Rebuilt.
12059
12060 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12061
12062 PR gdb/10783
12063
12064 * server.c (handle_search_memory_1): Correct read_addr initialization
12065 in loop for searching subsequent chunks.
12066
12067 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12068
12069 * configure.ac: New --with-libthread-db option.
12070 * thread-db.c: Allow direct dependence on libthread_db.
12071 (thread_db_free): Adjust.
12072 * config.in: Regenerate.
12073 * configure: Likewise.
12074
12075 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12076
12077 PR gdb/10757
12078 * thread-db.c (attach_thread): New function.
12079 (maybe_attach_thread): Return success/failure.
12080 (find_new_threads_callback): Adjust.
12081 (thread_db_find_new_threads): Loop until no new threads.
12082
12083 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12084
12085 * proc-service.c (ps_lgetregs): Formatting.
12086
12087 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12088
12089 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12090 * configure.ac: Adjust.
12091 * linux-low.h (struct process_info_private): Move members to struct
12092 thread_db.
12093 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12094 * linux-low.c (linux_remove_process): Adjust.
12095 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12096 * server.c (handle_query): Move code ...
12097 (handle_monitor_command): ... here. New function.
12098 * target.h (struct target_ops): New member.
12099 * thread-db.c (struct thread_db): New.
12100 (libthread_db_search_path): New variable.
12101 (thread_db_create_event, thread_db_enable_reporting)
12102 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12103 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12104 (try_thread_db_load_1, dladdr_to_soname): New functions.
12105 (try_thread_db_load, thread_db_load_search): New functions.
12106 (thread_db_init): Search for libthread_db.
12107 (thread_db_free): New function.
12108 (thread_db_handle_monitor_command): Likewise.
12109 * config.in: Regenerate.
12110 * configure: Regenerate.
12111
12112 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12113
12114 * spu-low.c (spu_kill): Wait for inferior to terminate.
12115 Call clear_inferiors.
12116 (spu_detach): Call clear_inferiors.
12117
12118 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12119
12120 * aclocal.m4: Regenerate.
12121 * config.in: Likewise.
12122 * configure: Likewise.
12123
12124 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12125
12126 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12127 (parse_spufs_run): New function.
12128 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12129 (ppc_breakpoint_at): Handle SPU breakpoints.
12130
12131 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12132
12133 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12134 (SPUFS_MAGIC): Define.
12135 (spu_enumerate_spu_ids): New function.
12136 (linux_qxfer_spu): New function.
12137 (linux_target_ops): Install linux_qxfer_spu.
12138
12139 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12140
12141 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12142 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12143 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12144 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12145 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12146 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12147 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12148 (init_registers_powerpc_cell32l): Add prototype.
12149 (init_registers_powerpc_cell64l): Likewise.
12150 (ppc_arch_setup): Detect Cell/B.E. architecture.
12151
12152 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12153
12154 * Makefile.in (datarootdir): New variable.
12155
12156 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12157
12158 * linux-low.c (linux_write_memory): Update debugging output.
12159 * Makefile.in (clean): Add new descriptions.
12160 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12161 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12162 * configure.srv: Add new files for arm*-*-linux*.
12163 * linux-arm-low.c: Add new declarations.
12164 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12165 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12166 (HWCAP_VFPv3D16): New.
12167 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12168 instead of __IWMMXT__.
12169 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12170 (arm_arch_setup): New.
12171 (target_regsets): Remove #ifdef. Add VFP regset.
12172 (the_low_target): Use arm_arch_setup.
12173
12174 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12175
12176 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12177 the main thread again.
12178
12179 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12180
12181 Adding Neutrino gdbserver.
12182 * configure: Regenerated.
12183 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12184 * configure.srv (i[34567]86-*-nto*): New target.
12185 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12186 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12187 (nto_comctrl) [__QNX__]: New function.
12188 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12189
12190 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12191
12192 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12193 srv_tgtobj.
12194
12195 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12196 Pedro Alves <pedro@codesourcery.com>
12197
12198 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12199 don't support CONTEXT_EXTENDED_REGISTERS.
12200 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12201 (the_low_target): Install them.
12202 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12203 failing with ERROR_PIPE_NOT_CONNECTED.
12204
12205 2009-06-30 Doug Evans <dje@google.com>
12206 Pierre Muller <muller@ics.u-strasbg.fr>
12207
12208 Add h/w watchpoint support to x86-linux, win32-i386.
12209 * Makefile.in (SFILES): Add i386-low.c
12210 (i386_low_h): Define.
12211 (i386-low.o): Add dependencies.
12212 (linux-x86-low.o): Add i386-low.h dependency.
12213 (win32-i386-low.o): Ditto.
12214 * i386-low.c: New file.
12215 * i386-low.h: New file.
12216 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12217 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12218 * linux-low.c (linux_add_process): Initialize arch_private.
12219 (linux_remove_process): Free arch_private.
12220 (add_lwp): Initialize arch_private.
12221 (delete_lwp): Free arch_private.
12222 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12223 provided.
12224 * linux-low.h (process_info_private): New member arch_private.
12225 (lwp_info): New member arch_private.
12226 (linux_target_ops): New members new_process, new_thread,
12227 prepare_to_resume.
12228 (ptid_of): New macro.
12229 * linux-x86-low.c: Include stddef.h, i386-low.h.
12230 (arch_process_info): New struct.
12231 (arch_lwp_info): New struct.
12232 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12233 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12234 (i386_dr_low_get_status): New function.
12235 (x86_insert_point, x86_remove_point): New functions.
12236 (x86_stopped_by_watchpoint): New function.
12237 (x86_stopped_data_address): New function.
12238 (x86_linux_new_process, x86_linux_new_thread): New functions.
12239 (x86_linux_prepare_to_resume): New function.
12240 (the_low_target): Add entries for insert_point, remove_point,
12241 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12242 prepare_to_resume.
12243 * server.c (debug_hw_points): New global.
12244 (monitor_show_help): Document set debug-hw-points.
12245 (handle_query): Process "set debug-hw-points".
12246 * server.h (debug_hw_points): Declare.
12247 (paddress): Declare.
12248 * utils.c (NUMCELLS, CELLSIZE): New macros.
12249 (get_sell, xsnprintf, paddress): New functions.
12250 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12251 remove_point, stopped_by_watchpoint, stopped_data_address.
12252 * win32-i386-low.c: Include i386-low.h.
12253 (debug_reg_state): Replaces dr.
12254 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12255 (i386_dr_low_get_status): New function.
12256 (i386_insert_point, i386_remove_point): New functions.
12257 (i386_stopped_by_watchpoint): New function.
12258 (i386_stopped_data_address): New function.
12259 (i386_initial_stuff): Update.
12260 (get_thread_context,set_thread_context,i386_thread_added): Update.
12261 (the_low_target): Add entries for insert_point,
12262 remove_point, stopped_by_watchpoint, stopped_data_address.
12263 * win32-low.c (win32_insert_watchpoint): New function.
12264 (win32_remove_watchpoint): New function.
12265 (win32_stopped_by_watchpoint): New function.
12266 (win32_stopped_data_address): New function.
12267 (win32_target_ops): Add entries for insert_watchpoint,
12268 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12269 * win32-low.h (win32_target_ops): New members insert_point,
12270 remove_point, stopped_by_watchpoint, stopped_data_address.
12271
12272 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12273
12274 * server.c (process_serial_event): Re-return unsupported, not
12275 error, if the type isn't recognized. Re-allow supporting only
12276 insert or remove packets. Also call require_running for
12277 breakpoints. Add missing break statement to default case. Tidy.
12278 * target.h (struct target_ops): Rename insert_watchpoint to
12279 insert_point, and remove_watchpoint to remove_point.
12280
12281 * linux-low.h (struct linux_target_ops): Likewise.
12282 * linux-low.c (linux_insert_watchpoint): Rename to ...
12283 (linux_insert_point): ... this. Adjust.
12284 (linux_remove_watchpoint): Rename to ...
12285 (linux_remove_point): ... this. Adjust.
12286 (linux_target_ops): Adjust.
12287 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12288 (cris_insert_point): ... this.
12289 (cris_remove_watchpoint): Rename to ...
12290 (cris_remove_point): ... this.
12291 (the_low_target): Adjust.
12292
12293 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12294
12295 * server.c (handle_v_kill): Pass signal_pid to
12296 kill_inferior if multi_process is zero.
12297
12298 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12299
12300 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12301 * target.h (target_ops): Comment for *_watchpoint to make it clear
12302 the functions can get types '0' and '1'.
12303
12304 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12305
12306 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12307 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12308 * regcache.c (get_regcache): Likewise.
12309 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12310 * win32-low.c (child_fetch_inferior_registers): Remove check for
12311 regno 0.
12312
12313 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12314 Pedro Alves <pedro@codesourcery.com>
12315
12316 * target.h (struct target_ops) <supports_multi_process>: New
12317 callback.
12318 (target_supports_multi_process): New.
12319 * server.c (handle_query): Even if GDB reports support, only
12320 enable multi-process if the target also supports it. Report
12321 multi-process support only if the target backend supports it.
12322 * linux-low.c (linux_supports_multi_process): New function.
12323 (linux_target_ops): Install it as target_supports_multi_process
12324 callback.
12325
12326 2009-05-24 Doug Evans <dje@google.com>
12327
12328 Global renaming of find_thread_pid to find_thread_ptid.
12329 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12330 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12331 All callers updated.
12332
12333 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12334 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12335 directly.
12336
12337 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12338 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12339 (linux_resume_one_lwp): Ditto.
12340
12341 2009-05-23 Doug Evans <dje@google.com>
12342
12343 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12344 from struct inferior_list_entry * to struct lwp_info *.
12345 All callers updated.
12346
12347 2009-05-13 Doug Evans <dje@google.com>
12348
12349 * linux-x86-low.c: Don't include assert.h.
12350 (x86_siginfo_fixup): Use fatal, not assert.
12351 (x86_arch_setup): Fix comment.
12352
12353 2009-05-12 Doug Evans <dje@google.com>
12354
12355 Biarch support for i386/amd64 gdbserver.
12356 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12357 Add linux-x86-low.c.
12358 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12359 (linux-x86-low.o): Add.
12360 * linux-x86-64-low.c: Delete.
12361 * linux-i386-low.c: Delete.
12362 * linux-x86-low.c: New file.
12363 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12364 linux-x86-low.o.
12365 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12366 linux-x86-low.o.
12367 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12368 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12369 (linux_child_pid_to_exec_file): New function.
12370 (elf_64_header_p, elf_64_file_p): New functions.
12371 (siginfo_fixup): New function.
12372 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12373 give target a chance to convert layout.
12374 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12375 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12376
12377 2009-05-07 Doug Evans <dje@google.com>
12378
12379 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12380 (regsets_store_inferior_registers): Ditto.
12381
12382 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12383
12384 PR server/10048
12385
12386 * linux-low.c (must_set_ptrace_flags): Delete.
12387 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12388 of the global.
12389 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12390 `lwp->must_set_ptrace_flags' instead.
12391 (linux_wait_for_event_1): Set ptrace options here.
12392 (linux_wait_1): ... not here.
12393
12394 2009-04-30 Doug Evans <dje@google.com>
12395
12396 * inferiors.c (started_inferior_callback): New function.
12397 (attached_inferior_callback): New function.
12398 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12399 * server.c (print_started_pid, print_attached_pid): New functions.
12400 (detach_or_kill_for_exit): New function.
12401 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12402 * server.h (have_started_inferiors_p): Declare.
12403 (have_attached_inferiors_p): Declare.
12404
12405 * inferiors.c (remove_process): Fix memory leak, free process.
12406 * linux-low.c (linux_remove_process): New function.
12407 (linux_kill): Call it instead of remove_process.
12408 (linux_detach, linux_wait_1): Ditto.
12409
12410 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12411
12412 * configure.srv: Add x86 Windows CE target.
12413
12414 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12415
12416 * inferiors.c (get_thread_process): Make global.
12417 * server.h (get_thread_process): Add prototype.
12418 * thread-db.c (find_one_thread): Use get_thread_process
12419 instead of current_process.
12420 (thread_db_get_tls_address): Do not crash if called when
12421 thread layer is not yet initialized.
12422
12423 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12424
12425 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12426 * spu-low.c (current_tid): Rename to ...
12427 (current_ptid): ... this.
12428 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12429 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12430 ptid_get_lwp (current_ptid) instead of current_tid.
12431 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12432 instead of current_tid. Use find_process_pid to verify pid
12433 argument is valid. Pass proper argument to remove_process.
12434 (spu_thread_alive): Compare current_ptid instead of current_tid.
12435 (spu_resume): Likewise.
12436
12437 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12438
12439 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12440 variable.
12441
12442 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12443
12444 Implement the multiprocess extensions, and add linux multiprocess
12445 support.
12446
12447 * server.h (ULONGEST): Declare.
12448 (struct ptid, ptid_t): New.
12449 (minus_one_ptid, null_ptid): Declare.
12450 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12451 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12452 (struct inferior_list_entry): Change `id' type from unsigned from
12453 to ptid_t.
12454 (struct sym_cache, struct breakpoint, struct
12455 process_info_private): Forward declare.
12456 (struct process_info): Declare.
12457 (current_process): Declare.
12458 (all_processes): Declare.
12459 (initialize_inferiors): Declare.
12460 (add_thread): Adjust to use ptid_t.
12461 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12462 (add_process, remove_process, find_thread_pid): Declare.
12463 (find_inferior_id): Adjust to use ptid_t.
12464 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12465 (multi_process): Declare.
12466 (push_event): Adjust to use ptid_t.
12467 (read_ptid, write_ptid): Declare.
12468 (prepare_resume_reply): Adjust to use ptid_t.
12469 (clear_symbol_cache): Declare.
12470 * inferiors.c (all_processes): New.
12471 (null_ptid, minus_one_ptid): New.
12472 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12473 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12474 (add_thread): Change unsigned long to ptid. Remove gdb_id
12475 parameter. Adjust.
12476 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12477 (gdb_id_to_thread): Rename to ...
12478 (find_thread_pid): ... this. Change unsigned long to ptid.
12479 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12480 (loaded_dll, pull_pid_from_list): Adjust.
12481 (add_process, remove_process, find_process_pid)
12482 (get_thread_process, current_process, initialize_inferiors): New.
12483 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12484 (struct target_waitstatus) <related_pid>: Ditto.
12485 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12486 return type to int.
12487 (struct target_ops) <join>: Add `pid' argument.
12488 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12489 (struct target_ops) <wait>: Add `ptid' field. Change return type
12490 to ptid.
12491 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12492 (mywait): Add `ptid' argument. Change return type to ptid_t.
12493 (target_pid_to_str): Declare.
12494 * target.c (set_desired_inferior): Adjust to use ptids.
12495 (mywait): Add new `ptid' argument. Adjust.
12496 (target_pid_to_str): New.
12497 * mem-break.h (free_all_breakpoints): Declare.
12498 * mem-break.c (breakpoints): Delelete.
12499 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12500 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12501 to use per-process breakpoint list.
12502 (free_all_breakpoints): New.
12503 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12504 (symbol_cache, all_symbols_looked_up): Delete.
12505 (hexchars): New.
12506 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12507 read_ptid): New.
12508 (prepare_resume_reply): Change ptid argument's type from unsigned
12509 long to ptid_t. Adjust. Implement W;process and X;process.
12510 (free_sym_cache, clear_symbol_cache): New.
12511 (look_up_one_symbol): Adjust to per-process symbol cache. *
12512 * server.c (cont_thread, general_thread, step_thread): Change type
12513 to ptid_t.
12514 (attached): Delete.
12515 (multi_process): New.
12516 (last_ptid): Change type to ptid_t.
12517 (struct vstop_notif) <ptid>: Change type to ptid_t.
12518 (queue_stop_reply, push_event): Change `ptid' argument's type to
12519 ptid_t.
12520 (discard_queued_stop_replies): Add `pid' argument.
12521 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12522 changes. Don't reference the `attached' global.
12523 (attach_inferior): Adjust to mywait interface changes.
12524 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12525 features. Handle and report "multiprocess+". Handle
12526 "qAttached:PID".
12527 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12528 changes.
12529 (handle_v_kill): New.
12530 (handle_v_stopped): Adjust to use target_pid_to_str.
12531 (handle_v_requests): Allow multiple attaches and runs when
12532 multiprocess extensions are in effect. Handle "vKill".
12533 (myresume): Adjust to use ptids.
12534 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12535 (handle_status): Adjust to discard_queued_stop_replies interface
12536 change.
12537 (first_thread_of, kill_inferior_callback)
12538 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12539 (main): Call initialize_inferiors. Adjust to use ptids, killing
12540 and detaching from all inferiors. Handle multiprocess packet
12541 variants.
12542 * linux-low.h: Include gdb_proc_service.h.
12543 (struct process_info_private): New.
12544 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12545 <lwpid_of>: Use ptid_get_lwp.
12546 (get_lwp_thread): Adjust.
12547 (struct lwp_info): Add `dead' member.
12548 (find_lwp_pid): Declare.
12549 * linux-low.c (thread_db_active): Delete.
12550 (new_inferior): Adjust comment.
12551 (inferior_pid): Delete.
12552 (linux_add_process): New.
12553 (handle_extended_wait): Adjust.
12554 (add_lwp): Change unsigned long to ptid.
12555 (linux_create_inferior): Add process to processes table. Adjust
12556 to use ptids. Don't set new_inferior here.
12557 (linux_attach_lwp): Rename to ...
12558 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12559 it. Adjust to use ptids.
12560 (linux_attach_lwp): New.
12561 (linux_attach): Add process to processes table. Don't set
12562 new_inferior here.
12563 (struct counter): New.
12564 (second_thread_of_pid_p, last_thread_of_process_p): New.
12565 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12566 multiple processes.
12567 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12568 processes. Remove process from process table.
12569 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12570 to multiple processes.
12571 (any_thread_of): New.
12572 (linux_detach): Add `pid' argument, and handle it. Remove process
12573 from processes table.
12574 (linux_join): Add `pid' argument. Handle it.
12575 (linux_thread_alive): Change unsighed long argument to ptid_t.
12576 Consider dead lwps as not being alive.
12577 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12578 threads we're not interested in.
12579 (same_lwp, find_lwp_pid): New.
12580 (linux_wait_for_lwp): Change `pid' argument's type from int to
12581 ptid_t. Adjust.
12582 (linux_wait_for_event): Rename to ...
12583 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12584 from int to ptid_t. Adjust.
12585 (linux_wait_for_event): New.
12586 (linux_wait_1): Add `ptid' argument. Change return type to
12587 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12588 that exit from the process table.
12589 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12590 Adjust.
12591 (mark_lwp_dead): New.
12592 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12593 stopping all threads, mark its main lwp as dead.
12594 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12595 ptids.
12596 (fetch_register, usr_store_inferior_registers)
12597 (regsets_fetch_inferior_registers)
12598 (regsets_store_inferior_registers, linux_read_memory)
12599 (linux_write_memory): Inline `inferior_pid'.
12600 (linux_look_up_symbols): Adjust to use per-process
12601 `thread_db_active'.
12602 (linux_request_interrupt): Adjust to use ptids.
12603 (linux_read_auxv): Inline `inferior_pid'.
12604 (initialize_low): Don't reference thread_db_active.
12605 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12606 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12607 (ps_getpid): Return the pid of the current inferior.
12608 * thread-db.c (proc_handle, thread_agent): Delete.
12609 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12610 per-process data.
12611 (find_one_thread): Change argument type to ptid_t. Adjust to
12612 per-process data.
12613 (maybe_attach_thread): Adjust to per-process data and ptids.
12614 (thread_db_find_new_threads): Ditto.
12615 (thread_db_init): Ditto.
12616 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12617 processes table. Adjust to use ptids.
12618 (spu_kill, spu_detach): Adjust interface. Remove process from
12619 processes table.
12620 (spu_join, spu_thread_alive): Adjust interface.
12621 (spu_wait): Adjust interface. Remove process from processes
12622 table. Adjust to use ptids.
12623 * win32-low.c (current_inferior_tid): Delete.
12624 (current_inferior_ptid): New.
12625 (debug_event_ptid): New.
12626 (thread_rec): Take a ptid. Adjust.
12627 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12628 (child_delete_thread): Ditto.
12629 (do_initial_child_stuff): Add `attached' argument. Add process to
12630 processes table.
12631 (child_fetch_inferior_registers, child_store_inferior_registers):
12632 Adjust.
12633 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12634 (win32_attach): Pass 1 to do_initial_child_stuff.
12635 (win32_kill): Adjust interface. Remove process from processes
12636 table.
12637 (win32_detach): Ditto.
12638 (win32_join): Adjust interface.
12639 (win32_thread_alive): Take a ptid.
12640 (win32_resume): Adjust to use ptids.
12641 (get_child_debug_event): Ditto.
12642 (win32_wait): Adjust interface. Remove exiting process from
12643 processes table.
12644
12645 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12646
12647 Non-stop mode support.
12648
12649 * server.h (non_stop): Declare.
12650 (gdb_client_data, handler_func): Declare.
12651 (delete_file_handler, add_file_handler, start_event_loop):
12652 Declare.
12653 (handle_serial_event, handle_target_event, push_event)
12654 (putpkt_notif): Declare.
12655 * target.h (enum resume_kind): New.
12656 (struct thread_resume): Replace `step' field by `kind' field.
12657 (TARGET_WNOHANG): Define.
12658 (struct target_ops) <wait>: Add `options' argument.
12659 <supports_non_stop, async, start_non_stop>: New fields.
12660 (target_supports_non_stop, target_async): New.
12661 (start_non_stop): Declare.
12662 (mywait): Add `options' argument.
12663 * target.c (mywait): Add `options' argument. Print child exit
12664 notifications here.
12665 (start_non_stop): New.
12666 * server.c (non_stop, own_buf, mem_buf): New globals.
12667 (struct vstop_notif): New.
12668 (notif_queue): New global.
12669 (queue_stop_reply, push_event, discard_queued_stop_replies)
12670 (send_next_stop_reply): New.
12671 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12672 interface changes.
12673 (attach_inferior): In non-stop mode, don't wait for the target
12674 here.
12675 (handle_general_set): Handle QNonStop.
12676 (handle_query): When handling qC, return the current general
12677 thread, instead of the first thread of the list.
12678 (handle_query): If the backend supports non-stop mode, include
12679 QNonStop+ in the qSupported query response.
12680 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12681 and non-stop mode.
12682 (handle_v_attach, handle_v_run): Handle non-stop mode.
12683 (handle_v_stopped): New.
12684 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12685 (myresume): Adjust to use resume_kind. Handle non-stop.
12686 (queue_stop_reply_callback): New.
12687 (handle_status): Handle non-stop mode.
12688 (main): Clear non_stop flag on reconnection. Use the event-loop.
12689 Refactor serial protocol handling from here ...
12690 (process_serial_event): ... to this new function. When GDB
12691 selects any thread, select one here. In non-stop mode, wait until
12692 GDB acks all pending events before exiting.
12693 (handle_serial_event, handle_target_event): New.
12694 * remote-utils.c (remote_open): Install remote_desc in the event
12695 loop.
12696 (remote_close): Remove remote_desc from the event loop.
12697 (putpkt_binary): Rename to...
12698 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12699 (putpkt_binary): New as wrapper around putpkt_binary_1.
12700 (putpkt_notif): New.
12701 (prepare_resume_reply): In non-stop mode, don't change the
12702 general_thread.
12703 * event-loop.c: New.
12704 * Makefile.in (OBJ): Add event-loop.o.
12705 (event-loop.o): New rule.
12706
12707 * linux-low.h (pid_of): Moved here.
12708 (lwpid_of): New.
12709 (get_lwp_thread): Use lwpid_of.
12710 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12711 * linux-low.c (pid_of): Delete.
12712 (inferior_pid): Use lwpid_of.
12713 (linux_event_pipe): New.
12714 (target_is_async_p): New.
12715 (delete_lwp): New.
12716 (handle_extended_wait): Use lwpid_of.
12717 (add_lwp): Don't set lwpid field.
12718 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12719 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12720 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12721 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12722 first. Adjust to linux_wait_for_event interface changes. Use
12723 lwpid_of.
12724 (linux_detach): Don't delete the main lwp here.
12725 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12726 (status_pending_p): Don't consider explicitly suspended lwps.
12727 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12728 pointer. Add OPTIONS argument. Change return type to int. Use
12729 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12730 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12731 pointer. Add status pointer argument. Return a pid instead of a
12732 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12733 changes. In non-stop mode, don't switch to a random thread.
12734 (linux_wait): Rename to...
12735 (linux_wait_1): ... this. Add target_options argument, and handle
12736 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12737 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12738 clean exit and signal exit code. Don't stop all threads in
12739 non-stop mode. In all-stop mode, only stop all threads when
12740 reporting a stop to GDB. Handle explicit thread stop requests.
12741 (async_file_flush, async_file_mark): New.
12742 (linux_wait): New.
12743 (send_sigstop): Use lwpid_of.
12744 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12745 interface changes. In non-stop mode, don't switch to a random
12746 thread.
12747 (linux_resume_one_lwp): Use lwpid_of.
12748 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12749 (linux_resume_one_thread): ... this. Handle resume_stop. In
12750 non-stop mode, don't look for pending flag in all threads.
12751 (resume_status_pending_p): Don't consider explicitly suspended
12752 threads.
12753 (my_waitpid): Reimplement. Emulate __WALL.
12754 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12755 Use lwpid_of.
12756 (sigchld_handler, linux_supports_non_stop, linux_async)
12757 (linux_start_non_stop): New.
12758 (linux_target_ops): Register linux_supports_non_stop, linux_async
12759 and linux_start_non_stop.
12760 (initialize_low): Install SIGCHLD handler.
12761 * thread-db.c (thread_db_create_event, find_one_thread)
12762 (thread_db_get_tls_address): Use lwpid_of.
12763 * win32-low.c (win32_detach): Adjust to use resume_kind.
12764 (win32_wait): Add `options' argument.
12765 * spu-low.c (spu_resume): Adjust to use resume_kind.
12766 (spu_wait): Add `options' argument.
12767
12768 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12769
12770 Decouple target code from remote protocol.
12771
12772 * target.h (enum target_waitkind): New.
12773 (struct target_waitstatus): New.
12774 (struct target_ops) <wait>: Return an unsigned long. Take a
12775 target_waitstatus pointer instead of a char pointer.
12776 (mywait): Likewise.
12777 * target.c (mywait): Change prototype to return an unsigned long.
12778 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12779 * server.h (thread_from_wait, old_thread_from_wait): Delete
12780 declarations.
12781 (prepare_resume_reply): Change prototype to take a
12782 target_waitstatus.
12783 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12784 (last_status, last_ptid): New.
12785 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12786 pid instead of a signal.
12787 (attach_inferior): Remove "status" and "signal" parameters.
12788 Adjust.
12789 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12790 not as an address.
12791 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12792 (handle_v_requests, myresume): Remove "status" and "signal"
12793 parameters. Adjust.
12794 (handle_status): New.
12795 (main): Delete local `status'. Adjust.
12796 * remote-utils.c: Include target.h.
12797 (prepare_resume_reply): Change prototype to take a
12798 target_waitstatus. Adjust.
12799
12800 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12801 interface.
12802 * spu-low.c (spu_wait): Adjust.
12803 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12804 Delete.
12805 (win32_wait): Adjust.
12806
12807 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12808
12809 * target.h (struct thread_resume): Delete leave_stopped member.
12810 (struct target_ops): Add a `n' argument to the `resume' callback.
12811 * server.c (start_inferior): Adjust.
12812 (handle_v_cont, myresume): Adjust.
12813 * linux-low.c (check_removed_breakpoint): Adjust to resume
12814 interface change, and to removed leave_stopped field.
12815 (resume_ptr): Delete.
12816 (struct thread_resume_array): New.
12817 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12818 resume interface change.
12819 (linux_continue_one_thread, linux_queue_one_thread)
12820 (resume_status_pending_p): Check if the resume field is NULL
12821 instead of checking the leave_stopped member.
12822 (linux_resume): Adjust to the target resume interface change.
12823 * spu-low.c (spu_resume): Adjust to the target resume interface
12824 change.
12825 * win32-low.c (win32_detach, win32_resume): Ditto.
12826
12827 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12828
12829 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12830 flag.
12831 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12832 pending.
12833 (linux_continue_one_thread): Only preserve the stepping flag if
12834 there's a pending breakpoint.
12835
12836 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12837
12838 * server.c (main): After the inferior having exited, call
12839 remote_close before exiting gdbserver.
12840
12841 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12842
12843 Fix size of FPSCR in Power 7 processors.
12844 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12845 (PPC_FEATURE_HAS_DFP): New #define.
12846 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12847 size of the FPSCR.
12848
12849 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12850
12851 * server.c (handle_query) Whitespace and formatting.
12852
12853 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12854
12855 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12856 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12857 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12858 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12859 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12860 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12861 Makefile.in, configure.ac: Fix whitespace throughout.
12862 * configure: Regenerate.
12863
12864 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12865
12866 * inferiors.c (find_inferior): Make it safe for the callback
12867 function to delete the currently iterated inferior.
12868
12869 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12870
12871 * Makefile.in (linuw_low_h): Move higher.
12872 (thread-db.o): Depend on $(linux_low_h).
12873
12874 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12875
12876 Rename "process" to "lwp" throughout.
12877
12878 * linux-low.c (all_processes): Rename to...
12879 (all_lwps): ... this.
12880 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12881 (add_process): Rename to ...
12882 (add_lwp): ... this. Adjust.
12883 (linux_create_inferior): Adjust.
12884 (linux_attach_lwp): Adjust.
12885 (linux_attach): Adjust.
12886 (linux_kill_one_process): Rename to ...
12887 (linux_kill_one_lwp): ... this. Adjust.
12888 (linux_kill): Adjust.
12889 (linux_detach_one_process): Rename to ...
12890 (linux_detach_one_lwp): ... this. Adjust.
12891 (linux_detach): Adjust.
12892 (check_removed_breakpoint): Adjust.
12893 (status_pending_p): Adjust.
12894 (linux_wait_for_process): Rename to ...
12895 (linux_wait_for_lwp): ... this. Adjust.
12896 (linux_wait_for_event): Adjust.
12897 (send_sigstop): Adjust.
12898 (wait_for_sigstop): Adjust.
12899 (stop_all_processes): Rename to ...
12900 (stop_all_lwps): ... this.
12901 (linux_resume_one_process): Rename to ...
12902 (linux_resume_one_lwp): ... this. Adjust.
12903 (linux_set_resume_request, linux_continue_one_thread)
12904 (linux_queue_one_thread, resume_status_pending_p)
12905 (usr_store_inferior_registers, regsets_store_inferior_registers)
12906 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12907 Adjust.
12908 * linux-low.h (get_process): Rename to ...
12909 (get_lwp): ... this. Adjust.
12910 (get_thread_process): Rename to ...
12911 (get_thread_lwp): ... this. Adjust.
12912 (get_process_thread): Rename to ...
12913 (get_lwp_thread): ... this. Adjust.
12914 (struct process_info): Rename to ...
12915 (struct lwp_info): ... this.
12916 (all_processes): Rename to ...
12917 (all_lwps): ... this.
12918 * proc-service.c (ps_lgetregs): Adjust.
12919 * thread-db.c (thread_db_create_event, find_one_thread)
12920 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12921
12922 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12923
12924 * server.c (handle_query): Handle "qAttached".
12925
12926 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12927
12928 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12929 GPLv3, update license URL.
12930
12931 2009-03-01 Doug Evans <dje@google.com>
12932
12933 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12934 (server_h): Add gdb_signals.h.
12935 (signals.o): Update.
12936 * server.h (target_signal_from_host,target_signal_to_host_p)
12937 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12938
12939 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12940
12941 * remote-utils.c (getpkt): Also generate remote-debug
12942 information if noack_mode is set.
12943
12944 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12945
12946 * server.c (handle_query): Report qXfer:siginfo:read and
12947 qXfer:siginfo:write as supported and handle them.
12948 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12949 * linux-low.c (linux_xfer_siginfo): New.
12950 (linux_target_ops): Set it.
12951
12952 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12953
12954 * server.c (gdbserver_usage): Mention --remote-debug.
12955 (main): Accept '--remote-debug' switch.
12956
12957 2009-01-18 Doug Evans <dje@google.com>
12958
12959 * regcache.c (new_register_cache): No need to check result of xcalloc.
12960 * server.c (handle_search_memory): Back out calls to xmalloc,
12961 result is checked and error is returned to user upon failure.
12962 (handle_query): Ditto. Add more checks for result of malloc.
12963 (handle_v_cont): Check result of malloc, report error back to
12964 user upon failure.
12965 (handle_v_run): Ditto. Call freeargv.
12966 * server.h (freeargv): Declare.
12967 * utils.c (freeargv): New fn.
12968
12969 2009-01-15 Doug Evans <dje@google.com>
12970
12971 * gdbreplay.c (perror_with_name): Make arg const char *.
12972 * server.h (target_signal_to_name): Make return type const char *.
12973 * thread-db.c (thread_db_err_str): Make return type const char *.
12974 * utils.c (perror_with_name): Make arg const char *.
12975
12976 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12977
12978 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12979 when handling a EXIT_PROCESS_DEBUG_EVENT.
12980
12981 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12982
12983 * gdbreplay.c (gdbreplay_version): Update copyright year.
12984 * server.c (gdbserver_version): Likewise.
12985
12986 2009-01-05 Doug Evans <dje@google.com>
12987
12988 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12989 (handle_extended_wait): Improve comment.
12990
12991 2008-12-13 Doug Evans <dje@google.com>
12992
12993 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12994 * server.h (ATTR_MALLOC): New macro.
12995 (xmalloc,xcalloc,xstrdup): Declare.
12996 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12997 * inferiors.c: Ditto.
12998 * linux-low.c: Ditto.
12999 * mem-break.c: Ditto.
13000 * regcache.c: Ditto.
13001 * remote-utils.c: Ditto.
13002 * server.c: Ditto.
13003 * target.c: Ditto.
13004 * win32-low.c: Ditto.
13005
13006 2008-12-12 Doug Evans <dje@google.com>
13007
13008 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13009 in debugging printf.
13010
13011 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13012
13013 2008-12-09 Doug Evans <dje@google.com>
13014
13015 * linux-low.h (struct process_info): Delete member tid, unused.
13016 * thread-db.c (find_one_thread): Update.
13017 (maybe_attach_thread): Update.
13018
13019 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13020
13021 * target.h (struct target_ops): Add qxfer_osdata member.
13022 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13023 and dirent.h.
13024 (linux_qxfer_osdata): New functions.
13025 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13026 callback.
13027 * server.c (handle_query): Handle "qXfer:osdata:read:".
13028 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13029 (buffer_xml_printf): New functions.
13030 * server.h (struct buffer): New.
13031 (buffer_grow_str, buffer_grow_str0): New macros.
13032 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13033 (buffer_xml_printf): Declare.
13034
13035 2008-11-24 Doug Evans <dje@google.com>
13036
13037 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13038
13039 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13040
13041 * server.c (handle_v_run): Always use the supplied argument list.
13042
13043 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13044
13045 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13046 (xtensa_regmap_table): Add entry for scompare1.
13047
13048 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13049
13050 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13051 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13052 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13053 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13054 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13055 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13056 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13057 XML target descriptions.
13058 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13059 when inferior is running on an ISA 2.05 or later processor. Add
13060 special case to return offset for full 64-bit slot of FPSCR when
13061 in 32-bits.
13062
13063 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13064
13065 * Makefile.in (SFILES, clean): Added sparc64 files.
13066 (reg-sparc64.o, reg-sparc64.c): New.
13067 * configure.srv (sparc*-*-linux*): New configuration.
13068 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13069 syscall arguments for SPARC.
13070 (regsets_store_inferior_registers): Likewise.
13071 * linux-sparc-low.c: New file.
13072
13073 2008-10-21 Doug Evans <dje@google.com>
13074
13075 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13076 (READLINE_DIR,READLINE_DEP): Delete.
13077 (INTERNAL_CFLAGS): Update.
13078 (LINTFLAGS): Update.
13079
13080 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13081
13082 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13083 whole argv from the last run, not just argv[0].
13084
13085 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13086
13087 * regcache.c (new_register_cache): Return NULL if the register
13088 cache size isn't known yet.
13089 (free_register_cache): Avoid dereferencing a NULL regcache.
13090
13091 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13092
13093 * configure.srv: Merge MIPS and MIPS64.
13094
13095 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13096
13097 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13098
13099 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13100
13101 * Makefile.in: Add required vsx dependencies.
13102
13103 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13104 Declare init_registers_powerpc_vsx32l.
13105 Declare init_registers_powerpc_vsx64l.
13106 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13107 (ppc_arch_setup): Check for VSX in hwcap.
13108 (ppc_fill_vsxregset): New function.
13109 (ppc_store_vsxregset): New function.
13110 Add new VSX entry in regset_info target_regsets.
13111
13112 * configure.srv: Add new VSX dependencies.
13113
13114 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13115
13116 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13117 (remote_open): Set or clear transport_is_reliable.
13118 (putpkt_binary): Don't expect acks in noack mode.
13119 (getpkt): Don't send ack/nac in noack mode.
13120 * server.c (handle_general_set): Handle QStartNoAckMode.
13121 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13122 qSupported.
13123 (main): Reset noack_mode on every connection.
13124 * server.h (noack_mode): Declare.
13125
13126 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13127
13128 * Makefile.in (GDBREPLAY_OBS): New variable.
13129 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13130
13131 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13132 Daniel Jacobowitz <dan@codesourcery.com>
13133
13134 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13135 (usr_store_inferior_registers): Likewise.
13136 (regsets_store_inferior_registers): Likewise.
13137
13138 2008-07-31 Rolf Jansen <rj@surtec.com>
13139 Pedro Alves <pedro@codesourcery.com>
13140
13141 * configure.ac: Check for memmem declaration.
13142 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13143 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13144 (disable_packet_qfThreadInfo): Unconditionally compile.
13145 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13146 * configure, config.in: Regenerate.
13147
13148 2008-07-28 Doug Kwan <dougkwan@google.com>
13149
13150 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13151 (linux_write_memory): Remove declaration of errno.
13152
13153 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13154
13155 * linux-low.c (handle_extended_wait): Do not use "status"
13156 variable uninitialized.
13157
13158 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13159
13160 * server.c (handle_v_attach): Inhibit reporting dll changes.
13161
13162 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13163
13164 * remote-utils.c (prepare_resume_reply): If requested, don't
13165 output "thread:TID" in the T stop reply.
13166
13167 * server.c (disable_packet_vCont, disable_packet_Tthread)
13168 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13169 (handle_query): If requested, disable support for qC, qfThreadInfo
13170 and qsThreadInfo.
13171 (handle_v_requests): If requested, disable support for vCont.
13172 (gdbserver_show_disableable): New.
13173 (main): Handle --disable-packet and --disable-packet=LIST.
13174
13175 * server.h (disable_packet_vCont, disable_packet_Tthread)
13176 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13177
13178 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13179
13180 * server.c (gdbserver_usage): Mention --version.
13181
13182 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13183
13184 * Makefile.in (gdbreplay.o): New rule.
13185
13186 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13187
13188 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13189 message, not gdbserver.
13190
13191 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13192 Nathan Sidwell <nathan@codesourcery.com>
13193 Joseph Myers <joseph@codesourcery.com>
13194
13195 * acinclude.m4: Include ../../config/acx.m4.
13196 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13197 * configure, config.in: Regenerate.
13198 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13199 * server.c (gdbserver_version): Print PKGVERSION.
13200 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13201 (main): Adjust gdbserver_usage calls.
13202 * gdbreplay.c (version, host_name): Add declarations.
13203 (gdbreplay_version, gdbreplay_usage): New.
13204 (main): Accept --version and --help options.
13205
13206 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13207
13208 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13209 (arm_breakpoint_at): Handle Thumb.
13210 (the_low_target): Add comment.
13211
13212 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13213
13214 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13215
13216 2008-05-09 Doug Evans <dje@google.com>
13217
13218 * server.h (decode_search_memory_packet): Declare.
13219 * remote-utils.c (decode_search_memory_packet): New fn.
13220 * server.c (handle_search_memory_1): New fn.
13221 (handle_search_memory): New fn.
13222 (handle_query): Process qSearch:memory packets.
13223
13224 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13225
13226 * regcache.c (registers_length): Remove.
13227 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13228 full register packet.
13229 * regcache.h (registers_length): Remove prototype.
13230 * server.h (PBUFSIZ): Define to 16384.
13231
13232 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13233
13234 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13235 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13236 powerpc-64l.o, and powerpc-altivec64l.o.
13237 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13238 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13239 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13240 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13241 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13242 to srv_xmlfiles.
13243
13244 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13245 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13246 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13247 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13248 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13249 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13250 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13251 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13252 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13253 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13254 (clean): Update.
13255
13256 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13257 (init_registers_powerpc_32l): ... this new prototype.
13258 (init_registers_powerpc_32): Remove, replace by ...
13259 (init_registers_powerpc_altivec32l): ... this new prototype.
13260 (init_registers_powerpc_e500): Remove, replace by ...
13261 (init_registers_powerpc_e500l): ... this new prototype.
13262 (init_registers_ppc64): Remove, replace by ...
13263 (init_registers_powerpc_64l): ... this new prototype.
13264 (init_registers_powerpc_64): Remove, replace by ...
13265 (init_registers_powerpc_altivec64l): ... this new prototype.
13266 (ppc_num_regs): Set to 73.
13267 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13268 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13269 (ppc_cannot_store_register): Handle orig_r3 and trap.
13270 (ppc_arch_setup): Update init_registers_... calls.
13271 (ppc_fill_gregset): Handle orig_r3 and trap.
13272
13273 * inferiors.c (clear_inferiors): Reset current_inferior.
13274
13275 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13276
13277 * acinclude.m4: Add override.m4.
13278 * configure: Regenerate.
13279
13280 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13281
13282 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13283 initial call to init_register_ppc64.
13284
13285 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13286
13287 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13288 single powerpc*-*-linux* case.
13289 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13290
13291 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13292
13293 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13294 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13295 from reg_xmlfiles.
13296 * linux-ppc-low.c: Include <elf.h>.
13297 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13298 (ppc_hwcap): New global variable.
13299 (ppc_regmap): Remove __SPE__ #ifdef sections.
13300 (ppc_regmap_e500): New global variable.
13301 (ppc_cannot_store_register): Update __SPE__ special case.
13302 (ppc_get_hwcap): New function.
13303 (ppc_arch_setup): Use it to determine whether inferior supports
13304 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13305 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13306 Do not access registers if target does not support AltiVec.
13307 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13308 Do not access registers if target does not support SPE.
13309 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13310
13311 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13312
13313 * linux-low.c (disabled_regsets, num_regsets): New.
13314 (use_regsets_p): Delete.
13315 (linux_wait_for_process): Clear disabled_regsets.
13316 (regsets_fetch_inferior_registers): Check and set it.
13317 (regsets_store_inferior_registers): Likewise.
13318 (linux_fetch_registers, linux_store_registers): Do not use
13319 use_regsets_p.
13320 (initialize_low): Allocate disabled_regsets.
13321
13322 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13323
13324 * Makefile.in (LIBOBJS): New.
13325 (OBS): Use LIBOBJS.
13326 (memmem.o): New rule.
13327 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13328 * configure: Regenerated.
13329
13330 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13331
13332 * server.c (handle_query): Never return "unsupported" for
13333 qXfer:features:read queries.
13334
13335 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13336
13337 * server.c (get_features_xml): Fix inverted condition.
13338 (handle_query): Always support qXfer:feature:read.
13339
13340 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13341
13342 * server.c (wrapper_argv): New.
13343 (start_inferior): Handle wrapper_argv. If set, expect an extra
13344 trap.
13345 (gdbserver_usage): Document --wrapper.
13346 (main): Parse --wrapper.
13347
13348 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13349
13350 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13351 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13352 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13353 (ppc_set_pc): Likewise.
13354 (ppc_arch_setup): New function.
13355 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13356 of collect_register.
13357 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13358
13359 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13360
13361 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13362 instead of linux-ppc64-low.o.
13363 * linux-ppc64-low.c: Remove file.
13364 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13365 (linux-ppc64-low.o): Remove rule.
13366
13367 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13368 (init_registers_powerpc_64): Likewise.
13369 (ppc_regmap): Conditionally define depending on __powerpc64__.
13370 (ppc_cannot_store_register): Do not special-case "fpscr" when
13371 compiled on __powerpc64__.
13372 (ppc_collect_ptrace_register): New function.
13373 (ppc_supply_ptrace_register): New function.
13374 (ppc_breakpoint): Change type to "unsigned int".
13375 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13376 (the_low_target): Conditionally provide initializers for the
13377 arch_setup member depending on __powerpc64__. Install
13378 collect_ptrace_register and supply_ptrace_register members.
13379
13380 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13381
13382 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13383 * server.c (gdbserver_xmltarget): Define.
13384 (get_features_xml): Use it to replace "target.xml" and arch_string.
13385
13386 * configure.srv: Remove srv_xmltarget. Add XML files that were
13387 mentioned there to srv_xmlfiles instead. Remove conditional tests
13388 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13389 srv_xmlfiles and srv_regobj to include all possible choices.
13390 * configure.ac (srv_xmltarget): Remove.
13391 (srv_xmlfiles): Do not add "target.xml".
13392 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13393 checks for supplementary target information.
13394 * configure: Regenerate.
13395 * Makefile.in (XML_TARGET): Remove.
13396 (target.xml): Remove rule.
13397 (clean): Do not clean up target.xml.
13398 (.PRECIOUS): Do not mention target.xml.
13399
13400 * target.h (struct target_ops): Remove arch_string member.
13401 * linux-low.c (linux_arch_string): Remove.
13402 (linux_target_ops): Remove arch_string initializer.
13403 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13404 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13405 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13406 * spu-low.c (spu_arch_string): Remove.
13407 (spu_target_ops): Remove arch_string initializer.
13408 * win32-low.c (win32_arch_string): Remove.
13409 (win32_target_ops): Remove arch_string initializer.
13410 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13411 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13412 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13413
13414 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13415
13416 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13417 by collect_ptrace_register and supply_ptrace_register hooks.
13418 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13419 instead of checking for the_low_target.left_pad_xfer.
13420 (usr_store_inferior_registers): Use collect_ptrace_register callback
13421 instead of checking for the_low_target.left_pad_xfer.
13422
13423 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13424 (s390_supply_ptrace_register): Likewise.
13425 (s390_fill_gregset): Call s390_collect_ptrace_register.
13426 (the_low_target): Update.
13427
13428 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13429 (ppc_supply_ptrace_register): Likewise.
13430 (the_low_target): Update.
13431
13432 * linux-i386-low.c (the_low_target): Update.
13433 * linux-x86-64-low.c (the_low_target): Update.
13434
13435 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13436
13437 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13438 reg-s390.o and reg-s390x.o.
13439
13440 * linux-low.c (new_inferior): New global variable.
13441 (linux_create_inferior, linux_attach): Set it.
13442 (linux_wait_for_process): Call the_low_target.arch_setup after the
13443 target has stopped for the first time.
13444 (initialize_low): Do not call the_low_target.arch_setup.
13445
13446 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13447 (s390_set_pc): Likewise.
13448 (s390_arch_setup): New function.
13449 (the_low_target): Use s390_arch_setup as arch_setup routine.
13450
13451 * regcache.c (realloc_register_cache): New function.
13452 (set_register_cache): Call it for each existing regcache.
13453
13454 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13455
13456 * server.h (init_registers): Remove prototype.
13457
13458 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13459 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13460 instead of init_registers ().
13461 * linux-arm-low.c (init_registers_arm): Add prototype.
13462 (init_registers_arm_with_iwmmxt): Likewise.
13463 (the_low_target): Add initializer for arch_setup field.
13464 * linux-cris-low.c (init_registers_cris): Add prototype.
13465 (the_low_target): Add initializer for arch_setup field.
13466 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13467 (the_low_target): Add initializer for arch_setup field.
13468 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13469 (the_low_target): Add initializer for arch_setup field.
13470 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13471 (the_low_target): Add initializer for arch_setup field.
13472 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13473 (the_low_target): Add initializer for arch_setup field.
13474 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13475 (the_low_target): Add initializer for arch_setup field.
13476 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13477 (init_registers_mips64_linux): Likewise.
13478 (the_low_target): Add initializer for arch_setup field.
13479 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13480 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13481 (the_low_target): Add initializer for arch_setup field.
13482 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13483 (init_registers_powerpc_64): Likewise.
13484 (the_low_target): Add initializer for arch_setup field.
13485 * linux-s390-low.c (init_registers_s390): Add prototype.
13486 (init_registers_s390x): Likewise.
13487 (the_low_target): Add initializer for arch_setup field.
13488 * linux-sh-low.c (init_registers_sh): Add prototype.
13489 (the_low_target): Add initializer for arch_setup field.
13490 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13491 (the_low_target): Add initializer for arch_setup field.
13492 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13493 (the_low_target): Add initializer for arch_setup field.
13494
13495 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13496 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13497 instead of init_registers ().
13498 * win32-arm-low.c (init_registers_arm): Add prototype.
13499 (the_low_target): Add initializer for arch_setup field.
13500 * win32-i386-low.c (init_registers_i386): Add prototype.
13501 (the_low_target): Add initializer for arch_setup field.
13502
13503 * spu-low.c (init_registers_spu): Add prototype.
13504 (initialize_low): Call initialie_registers_spu () instead of
13505 initialize_registers ().
13506
13507 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13508
13509 * server.c (handle_v_requests): When handling the vRun and vAttach
13510 packets, if already debugging a process, don't kill it. Return an
13511 error instead.
13512
13513 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13514
13515 * server.c (handle_query): Correct length check.
13516
13517 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13518
13519 * win32-low.c (do_initial_child_stuff): Add process handle
13520 parameter. Set current_process_handle and current_process_id from the
13521 parameters. Clear globals.
13522 (win32_create_inferior): Don't set current_process_handle and
13523 current_process_id here. Instead pass them on the call to
13524 do_initial_child_stuff.
13525 (win32_attach): Likewise.
13526 (win32_clear_inferiors): New.
13527 (win32_kill): Don't close the current process handle or the
13528 current thread handle here. Instead call win32_clear_inferiors.
13529 (win32_detach): Don't open a new handle to the process. Call
13530 win32_clear_inferiors.
13531 (win32_join): Don't rely on current_process_handle; open a new
13532 handle using the process id.
13533 (win32_wait): Call win32_clear_inferiors when the inferior process
13534 has exited.
13535
13536 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * server.c (monitor_show_help): Add "exit".
13539
13540 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13541
13542 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13543 (clean): Add reg-xtensa.c.
13544 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13545 * configure.srv (xtensa*-*-linux*) New target.
13546 * linux-xtensa-low.c: New.
13547 * xtensa-xtregs.c: New.
13548
13549 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13550
13551 * hostio.c: Don't include errno.h.
13552 (errno_to_fileio_errno): Move to hostio-errno.
13553 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13554 error number outputting to the target->hostio_last_error callback.
13555 (hostio_packet_error): Use FILEIO_EINVAL directly.
13556 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13557 calls to hostio_error.
13558 * hostio-errno.c: New.
13559 * server.h (hostio_last_error_from_errno): Declare.
13560 * target.h (target_ops): Add hostio_last_error member.
13561 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13562 as hostio_last_error handler.
13563 * spu-low.c (spu_target_ops): Likewise.
13564 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13565 (wince_hostio_last_error): New functions.
13566 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13567 as hostio_last_error handler.
13568 (win32_target_ops) [!_WIN32_WCE]: Register
13569 hostio_last_error_from_errno as hostio_last_error handler.
13570 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13571 (hostio-errno.o): New rule.
13572 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13573 * configure.srv (srv_hostio_err_objs): New variable. Default to
13574 hostio-errno.o.
13575 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13576 * configure: Regenerate.
13577
13578 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13579
13580 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13581 (linux_kill, linux_detach): Clean up the process list.
13582 * remote-utils.c (remote_open): Improve port number parsing.
13583 (putpkt_binary, input_interrupt): Only send interrupts if the target
13584 is running.
13585 * server.c (extended_protocol): Make static.
13586 (attached): Define earlier.
13587 (exit_requested, response_needed, program_argv): New variables.
13588 (target_running): New.
13589 (start_inferior): Clear attached here.
13590 (attach_inferior): Set attached here.
13591 (require_running): Define.
13592 (handle_query): Use require_running and target_running. Implement
13593 "monitor exit".
13594 (handle_v_attach, handle_v_run): New.
13595 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13596 (gdbserver_usage): Update.
13597 (main): Redo argument parsing. Handle --debug and --multi. Handle
13598 --attach along with other options or after the port. Save
13599 program_argv. Support no initial program. Resynchronize
13600 communication with GDB after an error. Handle "monitor exit".
13601 Use require_running and target_running. Always allow the extended
13602 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13603 restart in extended mode.
13604 * README: Refer to the GDB manual. Update --attach usage.
13605
13606 2007-12-20 Andreas Schwab <schwab@suse.de>
13607
13608 * linux-low.c (STACK_SIZE): Define.
13609 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13610 (linux_test_for_tracefork): Likewise.
13611
13612 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13613
13614 * linux-low.c (linux_wait_for_event): Update messages. Do not
13615 reinsert auto-delete breakpoints.
13616 * mem-break.c (struct breakpoint): Change return type of handler to
13617 int.
13618 (set_breakpoint_at): Update handler type.
13619 (reinsert_breakpoint_handler): Return 1 instead of calling
13620 delete_breakpoint.
13621 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13622 setting a new one.
13623 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13624 * mem-break.h (set_breakpoint_at): Update handler type.
13625 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13626 * win32-low.c (auto_delete_breakpoint): New.
13627 (get_child_debug_event): Use it.
13628
13629 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13630
13631 * configure.ac: Check for pread and pwrite.
13632 * hostio.c (handle_pread): Fall back to lseek and read.
13633 (handle_pwrite): Fall back to lseek and write.
13634 * config.in, configure: Regenerated.
13635
13636 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13637
13638 * server.c (myresume): Add own_buf argument.
13639 (main): Update calls.
13640
13641 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13642
13643 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13644 * remote-utils.c (remote_open): Do not call disable_async_io.
13645 (block_async_io): Delete.
13646 (unblock_async_io): Make static.
13647 (initialize_async_io): New.
13648 * server.c (handle_v_cont): Handle async I/O here.
13649 (myresume): Likewise. Move other common resume tasks here...
13650 (main): ... from here. Call initialize_async_io. Disable async
13651 I/O before the main loop.
13652 * server.h (initialize_async_io): Declare.
13653 (block_async_io, unblock_async_io): Delete prototypes.
13654 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13655
13656 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13657
13658 * remote-utils.c (readchar): Allow binary data in received messages.
13659
13660 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13661
13662 * win32-low.c (attaching): New global.
13663 (win32_create_inferior): Clear the `attaching' global.
13664 (win32_attach): Set the `attaching' global.
13665 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13666 attaching. Only set a breakpoint at the entry point if not
13667 attaching.
13668
13669 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13670
13671 * server.c (main): Don't report dll events on the initial
13672 connection on attaches.
13673
13674 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13675
13676 * server.c (main): Relax numerical bases supported for the pid of
13677 the --attach command line argument.
13678
13679 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13680
13681 * win32-low.c (win32_attach): Call OpenProcess before
13682 DebugActiveProcess, not after. Add last error output to error
13683 call.
13684
13685 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13686
13687 * win32-low.c (win32_get_thread_context)
13688 (win32_set_thread_context): New functions.
13689 (thread_rec): Use win32_get_thread_context.
13690 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13691 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13692 field.
13693
13694 2007-12-03 Leo Zayas
13695 Pedro Alves <pedro_alves@portugalmail.pt>
13696
13697 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13698 global variables.
13699 (child_add_thread): Minor cleanup.
13700 (child_continue): Resume artificially suspended threads before
13701 calling ContinueDebugEvent.
13702 (suspend_one_thread): New.
13703 (fake_breakpoint_event): New.
13704 (get_child_debug_event): Change return type to int. Check here if
13705 gdb sent an interrupt request. If a soft interrupt was requested,
13706 fake a breakpoint event. Return 0 if there is no event to handle,
13707 and 1 otherwise.
13708 (win32_wait): Don't check here if gdb sent an interrupt request.
13709 Ensure there is a valid event to handle.
13710 (win32_request_interrupt): Add soft interruption method as last
13711 resort.
13712
13713 2007-12-03 Leo Zayas
13714 Pedro Alves <pedro_alves@portugalmail.pt>
13715
13716 * win32-low.h (win32_thread_info): Add descriptions to the
13717 structure members. Replace `suspend_count' counter by a
13718 `suspended' flag.
13719 * win32-low.c (thread_rec): Update condition of when to get the
13720 context from the inferior. Rely on ContextFlags being set if it
13721 has already been retrieved. Only suspend the inferior thread if
13722 we haven't already. Warn if that fails.
13723 (continue_one_thread): s/suspend_count/suspended/. Only call
13724 ResumeThread once. Warn if that fails.
13725
13726 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13727
13728 * win32-low.c (win32_wait): Don't read from the inferior when it
13729 has already exited.
13730
13731 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13732
13733 * Makefile.in (win32_low_h): New variable.
13734 (win32-low.o): Add dependency on $(win32_low_h).
13735 (win32-arm-low.o, win32-i386-low.o): New rules.
13736
13737 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13738
13739 * hostio.c: Correct copyright year.
13740
13741 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13742
13743 * Makefile.in (OBS): Add hostio.o.
13744 (hostio.o): New rule.
13745 * server.h (handle_vFile): Declare.
13746 * hostio.c: New file.
13747 * server.c (handle_v_requests): Take packet_len and new_packet_len
13748 for binary packets. Call handle_vFile.
13749 (main): Update call to handle_v_requests.
13750
13751 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13752
13753 * linux-low.c: Include <sched.h>.
13754
13755 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13756
13757 * linux-low.c (linux_tracefork_grandchild): New.
13758 (linux_tracefork_child): Use clone.
13759 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13760
13761 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13762
13763 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13764
13765 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13766
13767 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13768
13769 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13770
13771 * inferiors.c (change_inferior_id): Delete.
13772 (add_pid_to_list, pull_pid_from_list): New.
13773 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13774 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13775 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13776 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13777 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13778 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13779 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13780 (using_threads): Always set to 1.
13781 (handle_extended_wait): New.
13782 (add_process): Do not set TID.
13783 (linux_create_inferior): Set must_set_ptrace_flags.
13784 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13785 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13786 (linux_thread_alive): Rename TID argument to LWPID.
13787 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13788 (linux_wait_for_event): Do not use TID or check using_threads. Update
13789 call to dead_thread_notify. Call handle_extended_wait.
13790 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13791 (send_sigstop): Delete sigstop_sent.
13792 (wait_for_sigstop): Avoid TID.
13793 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13794 (linux_test_for_tracefork): New.
13795 (linux_lookup_signals): Use thread_db_active and
13796 linux_supports_tracefork_flag.
13797 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13798 * linux-low.h (get_process_thread): Avoid TID.
13799 (struct process_ifo): Move thread_known and tid to the end. Remove
13800 sigstop_sent.
13801 (linux_attach_lwp, thread_db_init): Update prototypes.
13802 * server.h (change_inferior_id): Delete prototype.
13803 (add_pid_to_list, pull_pid_from_list): New prototypes.
13804 * thread-db.c (thread_db_use_events): New.
13805 (find_first_thread): Rename to...
13806 (find_one_thread): ...this. Update callers and messages. Do not
13807 call fatal. Check thread_db_use_events. Do not call
13808 change_inferior_id or new_thread_notify.
13809 (maybe_attach_thread): Update. Do not call new_thread_notify.
13810 (thread_db_init): Set thread_db_use_events. Check use_events.
13811 * utils.c (fatal, warning): Correct message prefix.
13812
13813 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13814
13815 * Makefile.in (clean): Remove new files.
13816 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13817 (powerpc-64.o, powerpc-64.c): New rules.
13818 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13819 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13820 with SPE.
13821 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13822 SPE targets.
13823 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13824 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13825 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13826 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13827 (target_regsets): Add AltiVec and SPE register sets.
13828 * configure.ac: Check for AltiVec and SPE.
13829 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13830 (ppc_fill_vrregset, ppc_store_vrregset): New.
13831 (target_regsets): Add AltiVec register set.
13832 * configure: Regenerated.
13833
13834 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13835
13836 * linux-low.c (O_LARGEFILE): Define.
13837 (linux_read_memory): Use /proc/PID/mem.
13838 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13839 * configure, config.in: Regenerated.
13840
13841 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13842
13843 * linux-low.c (linux_wait_for_event): Do not pass signals while
13844 single-stepping.
13845
13846 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13847
13848 * win32-low.c (create_process): New.
13849 (win32_create_inferior): Use create_process instead of
13850 CreateProcess. If create_process failed retry appending an ".exe"
13851 suffix. Store the GetLastError result immediatelly after
13852 create_process calls and use it on the call to error.
13853
13854 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13855
13856 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13857
13858 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13859
13860 * configure.ac: Switch license to GPLv3.
13861
13862 2007-08-01 Michael Snyder <msnyder@access-company.com>
13863
13864 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13865
13866 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13867
13868 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13869 typedef.
13870 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13871 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13872 CloseToolhelp32Snapshot.
13873 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13874 CloseToolhelp32Snapshot.
13875
13876 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13877
13878 * server.c (main): Check for inferior exit before main loop.
13879
13880 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13881
13882 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13883 instead of on tmp_desc.
13884
13885 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13886 Daniel Jacobowitz <dan@codesourcery.com>
13887
13888 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13889 (add_thread): Minor cleanups.
13890 (clear_inferiors): Move lower in the file. Clear the DLL
13891 list.
13892 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13893 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13894 (xml_escape_text): New.
13895 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13896 for qSupported.
13897 (handle_v_cont): Report errors.
13898 (gdbserver_version): Update.
13899 (main): Correct size of own_buf. Do not report initial DLL events.
13900 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13901 (unloaded_dll, xml_escape_text): New.
13902 * win32-low.c (enum target_waitkind): Update comments.
13903 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13904 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13905 (win32_EnumProcessModules, win32_GetModuleInformation)
13906 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13907 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13908 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13909 (win32_Module32First, win32_Module32Next, load_toolhelp)
13910 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13911 (get_child_debug_event): Handle DLL events.
13912 (win32_wait): Likewise.
13913
13914 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13915
13916 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13917 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13918
13919 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13920
13921 * win32-low.c (handle_output_debug_string): Ignore event if not
13922 waiting.
13923
13924 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13925
13926 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13927
13928 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13931
13932 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * inferiors.c (change_inferior_id): Add comment.
13935 * linux-low.c (check_removed_breakpoint): Add an early
13936 prototype. Improve debug output.
13937 (linux_attach): Doc update.
13938 (linux_detach_one_process, linux_detach): Clean up before releasing
13939 each process.
13940 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13941 * linux-low.h (struct process_info): Doc improvement.
13942 * mem-break.c (delete_all_breakpoints): New.
13943 * mem-break.h (delete_all_breakpoints): New prototype.
13944 * thread-db.c (find_first_thread): New.
13945 (thread_db_create_event): Call it instead of
13946 thread_db_find_new_threads. Clean up unused variables.
13947 (maybe_attach_thread): Remove first thread handling.
13948 (thread_db_find_new_threads): Use find_first_thread.
13949 (thread_db_get_tls_address): Likewise.
13950
13951 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13952
13953 * thread-db.c (thread_db_find_new_threads): Add prototype.
13954 (thread_db_create_event): Check for the main thread before adding
13955 a new thread.
13956 (maybe_attach_thread): Only enable event reporting if TID == 0.
13957 (thread_db_get_tls_address): Check for new threads.
13958
13959 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13960
13961 * linux-low.c (linux_create_inferior): Try execv before execvp.
13962 * spu-low.c (spu_create_inferior): Likewise.
13963
13964 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13965
13966 * linux-low.c (linux_create_inferior): Change execv to execvp.
13967 * spu-low.c (spu_create_inferior): Likewies.
13968
13969 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13970
13971 * Makefile.in (clean): Clean new files instead of deleted ones.
13972 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13973 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13974 rules.
13975 * configure.srv: Specify XML files and new regformats for MIPS and
13976 MIPS64 GNU/Linux.
13977 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13978 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13979 an entry for the restart register.
13980 (mips_cannot_fetch_register, mips_cannot_store_register)
13981 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13982 register names to match the XML descriptions.
13983 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13984 restart register instead of $0.
13985
13986 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13987 Markus Deuling <deuling@de.ibm.com>
13988
13989 * remote-utils.c (decode_xfer_write): New function.
13990 * server.h (decode_xfer_write): Add prototype.
13991 * server.c (handle_query): Add PACKET_LEN argument. Support
13992 qXfer:spu:read and qXfer:spu:write packets.
13993 (main): Pass packet_len to handle_query.
13994 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13995 * target.h (target_ops): Add qxfer_spu.
13996
13997 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13998
13999 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14000 accessing non-seekable spufs files.
14001
14002 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14003
14004 * server.c (handle_query): Add reply for qC packet.
14005
14006 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14007 Leo Zayas <lerele@champenstudios@com>
14008
14009 * server.h (check_remote_input_interrupt_request): New function.
14010 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14011 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14012 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14013 (check_remote_input_interrupt_request): New function.
14014 * server.h (check_remote_input_interrupt_request): Declare.
14015 * win32-low.c (winapi_DebugBreakProcess,
14016 winapi_GenerateConsoleCtrlEvent): New typedefs.
14017 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14018 to 250 ms.
14019 (win32_wait): Check for remote interrupt request
14020 with check_remote_input_interrupt_request.
14021 (win32_request_interrupt): New function.
14022 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14023
14024 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14025
14026 * win32-low.c (debug_registers_changed,
14027 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14028 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14029 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14030 (thread_rec): Get context using the low target.
14031 (child_add_thread): Call thread_added on the low target,
14032 which does the same thing.
14033 (regptr): Delete.
14034 (do_initial_child_stuff): Remove debug registers references.
14035 Set context using the low target. Resume threads after
14036 setting the contexts.
14037 (child_continue): Remove dead variable. Remove debug
14038 registers references.
14039 (child_fetch_inferior_registers): Go through the low target.
14040 (do_child_store_inferior_registers): Remove.
14041 (child_store_inferior_registers): Go through the low target.
14042 (win32_resume): Remove debug registers references.
14043 Set context using the low target.
14044 (handle_exception): Change return type to void. Don't record
14045 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14046 first chance exception.
14047 (get_child_debug_event): Change return type to void. Remove
14048 goto loop. Always return after waiting for debug event.
14049 (win32_wait): Convert to switch statement. Handle spurious
14050 events.
14051
14052 * win32-i386-low.c (debug_registers_changed,
14053 debug_registers_used): New.
14054 (initial_stuff): Rename to ...
14055 (i386_initial_stuff): ... this. Clear debug registers
14056 state variables.
14057 (store_debug_registers): Delete.
14058 (i386_get_thread_context): New.
14059 (load_debug_registers): Delete.
14060 (i386_set_thread_context): New.
14061 (i386_thread_added): New.
14062 (single_step): Rename to ...
14063 (i386_single_step): ... this.
14064 (do_fetch_inferior_registers): Rename to ...
14065 (i386_fetch_inferior_register): ... this.
14066 (i386_store_inferior_register): New.
14067 (the_low_target): Adapt to new interface.
14068
14069 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14070 (arm_get_thread_context): New.
14071 (arm_set_thread_context): New.
14072 (regptr): New.
14073 (do_fetch_inferior_registers): Rename to ...
14074 (arm_fetch_inferior_register): ... this.
14075 (arm_store_inferior_register): New.
14076 (arm_wince_breakpoint): Reimplement as unsigned long.
14077 (arm_wince_breakpoint_len): Define.
14078 (the_low_target): Adapt to new interface.
14079
14080 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14081 load_debug_registers. Add get_thread_context, set_thread_context,
14082 thread_added and store_inferior_register. Rename
14083 fetch_inferior_registers to fetch_inferior_register.
14084 (regptr): Remove declaration.
14085
14086 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14087
14088 * linux-low.c (linux_detach): Change return type to int. Return 0.
14089 * spu-low.c (spu_detach): Likewise.
14090
14091 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14092
14093 * target.h (target_ops): Change return type of detach to int.
14094 Add join.
14095 (join_inferior): New.
14096 * server.c (main): Don't skip detach support on mingw32.
14097 If the inferior doesn't support detaching return error.
14098 Call join_inferior instead of using waitpid.
14099 * linux-low.c (linux_join): New.
14100 (linux_target_op): Add linux_join.
14101 * spu-low.c (spu_join): New.
14102 (spu_target_ops): Add spu_join.
14103 * win32-low.c (win32_detach): Adapt to new interface.
14104 Reopen current_process_handle before detaching. Issue a child
14105 resume before detaching.
14106 (win32_join): New.
14107 (win32_target_op): Add win32_join.
14108
14109 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14110
14111 * win32-low.c (win32-attach): Fix return value.
14112 * target.h (target_ops): Describe ATTACH return values.
14113
14114 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14115
14116 * win32-low.c (GETPROCADDRESS): Define.
14117 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14118 (winapi_DebugSetProcessKillOnExit): Likewise.
14119 (win32_create_inferior): Force usage of ansi CreateProcessA.
14120 (win32_attach): Use GETPROCADDRESS.
14121 (win32_detach): Likewise.
14122
14123 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14124
14125 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14126
14127 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14128
14129 * win32-low.c: Commit leftover changes from 2007-03-29.
14130
14131 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14132
14133 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14134 fields short instead of int. Add explicit padding.
14135 (i387_cache_to_fsave): Remove unnecessary casts.
14136 (i387_fsave_to_cache): Doc fix.
14137 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14138
14139 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14140
14141 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14142 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14143
14144 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14145
14146 * configure.srv (arm*-*-mingw32ce*): Move near the other
14147 arm targets.
14148
14149 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14150
14151 * configure.ac: Add errno checking.
14152 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14153 sys/file.h and malloc.h.
14154 (AC_CHECK_DECLS): Add perror.
14155 (srv_mingwce): Handle.
14156 * configure.srv (i[34567]86-*-cygwin*): Add
14157 win32-i386-low.o to srv_tgtobj.
14158 (i[34567]86-*-mingw*): Likewise.
14159 (arm*-*-mingw32ce*): Add case.
14160 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14161 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14162 [__MINGW32CE__] (strerror): New function.
14163 [__MINGW32CE__] (errno): Define to GetLastError.
14164 [__MINGW32CE__] (COUNTOF): New macro.
14165 (remote_open): Remove extra close call.
14166 * mem-break.c (delete_breakpoint_at): New function.
14167 * mem-break.h (delete_breakpoint_at): Declare.
14168 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14169 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14170 [USE_WIN32API] (read, write): Add char* casts.
14171 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14172 * server.h: Include wincecompat.h on Windows CE.
14173 [HAVE_ERRNO_H]: Check.
14174 (perror): Declare if not declared.
14175 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14176 (perror_with_name): Remove errno declaration.
14177 * wincecompat.h: New.
14178 * wincecompat.c: New.
14179 * win32-low.h: New.
14180 * win32-arm-low.c: New.
14181 * win32-i386-low.c: New.
14182 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14183 (OUTMSG2): Make it safe.
14184 (_T): New macro.
14185 (COUNTOF): New macro.
14186 (NUM_REGS): Get it from the low target.
14187 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14188 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14189 (thread_rec): Let low target handle debug registers.
14190 (child_add_thread): Likewise.
14191 (child_init_thread_list): Likewise.
14192 (continue_one_thread): Likewise.
14193 (regptr): New.
14194 (do_child_fetch_inferior_registers): Move to ...
14195 * win32-i386-low.c: ... here, and rename to ...
14196 (do_fetch_inferior_registers): ... this.
14197 * win32-low.c (child_fetch_inferior_registers):
14198 Go through the low target.
14199 (do_child_store_inferior_registers): Use regptr.
14200 (strwinerror): New function.
14201 (win32_create_inferior): Handle Windows CE.
14202 Use strwinerror instead of strerror on Windows error
14203 codes. Add program to the error output.
14204 Don't close the main thread handle on Windows CE.
14205 (win32_attach): Use coredll.dll on Windows CE.
14206 (win32_kill): Close current process and current
14207 thread handles.
14208 (win32_detach): Use coredll.dll on Windows CE.
14209 (win32_resume): Let low target handle debug registers, and
14210 step request.
14211 (handle_exception): Add/Remove initial breakpoint. Avoid
14212 non-existant WSTOPSIG on Windows CE.
14213 (win32_read_inferior_memory): Cast to remove warning.
14214 (win32_arch_string): Go through the low target.
14215 (initialize_low): Call set_breakpoint_data with the low
14216 target's breakpoint.
14217 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14218 FOP_REGNUM, mappings): Move to ...
14219 * win32-i386-low.c: ... here.
14220 * win32-low.c (win32_thread_info): Move to ...
14221 * win32-low.h: ... here.
14222 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14223 win32-arm-low.c and wincecompat.c.
14224 (all:): Add $EXEEXT.
14225 (install-only:): Likewise.
14226 (gdbserver:): Likewise.
14227 (gdbreplay:): Likewise.
14228 * config.in: Regenerate.
14229 * configure: Regenerate.
14230
14231 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14232
14233 * win32-low.c: Rename typedef thread_info to
14234 win32_thread_info throughout.
14235
14236 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14237
14238 * win32-i386-low.c: Rename to ...
14239 * win32-low.c: ... this.
14240 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14241 * Makefile.in: Likewise.
14242
14243 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14244
14245 * remote-utils.c (monitor_output): Constify msg parameter.
14246 * server.h (monitor_output): Likewise.
14247 * win32-i386-low.c (handle_output_debug_string): New.
14248 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14249 handle_output_debug_string.
14250 (get_child_debug_event): Likewise.
14251
14252 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14253
14254 * server.c (main): Correct strtoul check.
14255
14256 2007-03-27 Jon Ringle <jon@ringle.org>
14257
14258 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14259
14260 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14261
14262 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14263
14264 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14265
14266 * terminal.h: Check HAVE_SGTTY_H.
14267
14268 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14269
14270 * remote-utils.c (remote_open): Print out the assigned port number.
14271
14272 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14273
14274 * remote-utils.c (monitor_output): New function.
14275 * server.c (debug_threads): Define here.
14276 (monitor_show_help): New function.
14277 (handle_query): Handle qRcmd.
14278 (main): Do not handle 'd' packet.
14279 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14280 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14281 of debug_threads.
14282
14283 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14284
14285 * Makefile.in (EXEEXT): New.
14286 (clean): Use $(EXEEXT).
14287
14288 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14289
14290 * target.h (target_ops): Rename send_signal to request_interrupt,
14291 and remove enum target_signal parameter.
14292 * linux-low.c (linux_request_interrupt): Rename from
14293 linux_send_signal, and always send SIGINT.
14294 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14295 and always send SIGINT.
14296 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14297 of send_signal.
14298 (input_interrupt): Likewise.
14299
14300 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14301
14302 * server.c (get_features_xml): Check if target implemented
14303 arch_string.
14304 * win32-i386-low.c (win32_arch_string): New.
14305 (win32_target_ops): Add win32_arch_string as arch_string member.
14306
14307 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14308
14309 * spu-low.c (spu_arch_string): New.
14310 (spu_target_ops): Add spu_arch_string.
14311
14312 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14313
14314 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14315 * configure.ac: Do not check for terminal.h.
14316 * configure, config.in: Regenerated.
14317
14318 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * Makefile.in (OBS): Add $(XML_BUILTIN).
14321 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14322 (clean): Update.
14323 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14324 (arm-with-iwmmxt.c): New.
14325 * config.in, configure: Regenerate.
14326 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14327 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14328 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14329 (arm*-*-linux*): Add iWMMXt and regset support.
14330 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14331 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14332 (arm_store_wmmxregset, target_regsets): New.
14333 * server.c (get_features_xml): Take annex argument. Check builtin
14334 XML documents.
14335 (handle_query): Handle multiple annexes.
14336
14337 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14338
14339 * remote-utils.c [USE_WIN32API] (read, write): Define.
14340 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14341 write.
14342
14343 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * linux-i386-low.c (the_low_target): Set arch_string.
14346 * linux-x86-64-low.c (the_low_target): Likewise.
14347 * linux-low.c (linux_arch_string): New.
14348 (linux_target_ops): Add it.
14349 * linux-low.h (struct linux_target_ops): Add arch_string.
14350 * server.c (write_qxfer_response): Use const void * for DATA.
14351 (get_features_xml): New.
14352 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14353 * target.h (struct target_ops): Add arch_string method.
14354
14355 2007-01-03 Denis Pilat <denis.pilat@st.com>
14356 Daniel Jacobowitz <dan@codesourcery.com>
14357
14358 * linux-low.c (linux_kill): Handle being called with no threads.
14359 * win32-i386-low.c (win32_kill): Likewise.
14360 (get_child_debug_event): Clear current_process_handle.
14361
14362 2006-12-30 Denis PILAT <denis.pilat@st.com>
14363 Daniel Jacobowitz <dan@codesourcery.com>
14364
14365 * remote-utils.c (remote_open): Check the type of specified
14366 serial port devices before opening them.
14367 * server.c (main): Kill the inferior if an error occurs during
14368 the first remote_open.
14369
14370 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14371
14372 * README: Update supported targets.
14373
14374 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14375
14376 * Makefile.in (clean): Remove reg-mips64.c.
14377 (reg-mips64.c, reg-mips64.o): New rules.
14378 * configure.srv: Handle mips64. Include regset support for mips.
14379 * linux-mips-low.c (union mips_register): New.
14380 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14381 (mips_breakpoint, mips_breakpoint_at): Use int.
14382 (mips_collect_register, mips_supply_register)
14383 (mips_collect_register_32bit, mips_supply_register_32bit)
14384 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14385 (mips_store_fpregset, target_regsets): New.
14386 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14387
14388 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14389
14390 * configure.srv: Add target "spu*-*-*".
14391 * Makefile.in (clean): Remove reg-spu.c.
14392 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14393 * spu-low.c: New file.
14394
14395 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14396
14397 * configure.ac: Correct td_thr_tls_get_addr test.
14398 * configure: Regenerated.
14399
14400 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14401
14402 * linux-low.c (linux_wait_for_event): Reformat. Use the
14403 pass_signals array.
14404 * remote-utils.c (decode_address_to_semicolon): New.
14405 * server.c (pass_signals, handle_general_set): New.
14406 (handle_query): Mention QPassSignals for qSupported.
14407 (main): Call handle_general_set.
14408 * server.h (pass_signals, decode_address_to_semicolon): New.
14409
14410 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14411
14412 * server.c (handle_query): Correct error handling for read_auxv.
14413
14414 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14415
14416 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14417 and srv_linux_thread_db to yes.
14418 * linux-s390-low.c (s390_fill_gregset): New function.
14419 (target_regsets): Define data structure.
14420
14421 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14422
14423 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14424 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14425 * config.in, configure: Regenerated.
14426 * inferiors.c (gdb_id_to_thread): New function.
14427 (gdb_id_to_thread_id): Use it.
14428 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14429 * linux-low.h (struct process_info): Add th member.
14430 (thread_db_get_tls_address): New prototype.
14431 * remote-utils.c (decode_address): Make non-static.
14432 * server.c (handle_query): Handle qGetTLSAddr.
14433 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14434 * target.h (struct target_ops): Add get_tls_address.
14435 * thread-db.c (maybe_attach_thread): Save the thread handle.
14436 (thread_db_get_tls_address): New.
14437
14438 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14439
14440 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14441 (linux_resume_one_process): Take a siginfo_t *. Update all
14442 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14443 (struct pending_signals): Add a siginfo_t.
14444 (linux_wait_for_process): Always set last_status.
14445 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14446 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14447 * linux-low.h (struct process_info): Add last_status.
14448
14449 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14450
14451 * remote-utils.c (try_rle): New function.
14452 (putpkt_binary): Use it.
14453
14454 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14455
14456 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14457 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14458 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14459 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14460 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14461 point registers.
14462
14463 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14464
14465 * server.c (terminal_fd): New variable.
14466 (old_foreground_pgrp): Likewise.
14467 (restore_old_foreground_pgrp): New function.
14468 (start_inferior): Record the terminal file descriptor in terminal_fd
14469 and its original foreground group in old_foreground_pgrp. Register
14470 restore_old_foreground_pgrp with atexit().
14471
14472 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * server.c (handle_query): Correct qPart to qXfer.
14475
14476 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14477
14478 * configure.ac: Check for more headers which are missing on
14479 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14480 * configure.srv: Add Cygwin and mingw32.
14481 * remote-utils.c: Don't include headers unconditionally which
14482 are missing on mingw32. Include <winsock.h> for mingw32.
14483 (remote_open): Adjust for mingw32 support. Flush
14484 standard error after writing to it.
14485 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14486 (unblock_async_io, enable_async_io, disable_async_io)
14487 (readchar, getpkt): Update for Winsock support.
14488 (prepare_resume_reply): Expect a protocol signal number.
14489 * server.c: Disable <sys/wait.h> on mingw32.
14490 (start_inferior): Adjust for mingw32 support. Flush
14491 standard error after writing to it.
14492 (attach_inferior): Likewise. Use protocol signal
14493 numbers.
14494 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14495 and names.
14496 * win32-i386-low.c: New file.
14497 * Makefile.in (XM_CLIBS): Set.
14498 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14499 (win32-i386-low.o): New dependency rule.
14500 * linux-low.c (linux_wait): Use target signal numbers.
14501 * target.h (struct target_ops): Doc fix.
14502 * server.h (target_signal_to_name): New prototype.
14503 * gdbreplay.c: Don't include headers unconditionally which
14504 are missing on mingw32. Include <winsock.h> for mingw32.
14505 (remote_close, remote_open): Adjust for Winsock support.
14506 * configure, config.in: Regenerated.
14507
14508 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14509
14510 * server.c (decode_xfer_read, write_qxfer_response): New.
14511 (handle_query): Take a packet length argument. Handle
14512 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14513 the qSupported response.
14514 (main): Update call to handle_query.
14515
14516 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14517
14518 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14519 (putpkt_binary): Renamed from putpkt and adjusted for binary
14520 data.
14521 (putpkt): New wrapper for putpkt_binary.
14522 (readchar): Don't mask off the high bit.
14523 (decode_X_packet): New function.
14524 * server.c (main): Call putpkt_binary if a handler sets the packet
14525 length. Save the length of the incoming packet. Handle 'X'.
14526 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14527
14528 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14529
14530 * server.c (handle_query): Handle qSupported.
14531
14532 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14533
14534 * remote-utils.c (all_symbols_looked_up): New variable.
14535 (look_up_one_symbol): Check it.
14536 * server.h (look_up_one_symbol): New declaration.
14537 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14538
14539 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14540
14541 * Makefile.in (linux-arm-low.o): Update dependencies.
14542 * linux-arm-low.c: Include "gdb_proc_service.h".
14543 (PTRACE_GET_THREAD_AREA): Define.
14544 (ps_get_thread_area): New function.
14545
14546 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14547
14548 * configure.srv (m68k*-*-uclinux*): New target.
14549 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14550 (linux_resume_one_process): Remove extraneous cast.
14551 (linux_read_offsets): New.
14552 (linux_target_op): Add linux_read_offsets on mmuless systems.
14553 * server.c (handle_query): Add qOffsets logic.
14554 * target.h (struct target_ops): Add read_offsets.
14555
14556 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14557
14558 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14559 (PTRACE_GET_THREAD_AREA): Define.
14560 (ps_get_thread_area): New function.
14561 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14562 (linux-x86-64-low.o): Update.
14563
14564 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14565
14566 * configure.ac: Remove checks for prfpregset_t.
14567 * gdb_proc_service.h: New file.
14568 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14569 new "gdb_proc_service.h".
14570 * proc-service.c: Likewise.
14571 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14572 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14573 * Makefile.in (gdb_proc_service_h): Updated.
14574 * configure, config.in: Regenerated.
14575
14576 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14577
14578 * remote-utils.c (prepare_resume_reply): Move declaration
14579 of gdb_id_from_wait to the top of the block.
14580
14581 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14582
14583 * linux-low.c (regsets_store_inferior_registers): Read the regset
14584 from the target before filling it.
14585
14586 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14587
14588 * server.c (attach_inferior): Return SIGTRAP for a successful
14589 attach.
14590
14591 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * Makefile.in (OBS): Add version.o.
14594 (STAGESTUFF): Delete.
14595 (version.o): Add dependencies.
14596 (version.c): Replace rule.
14597 (clean): Remove version.c.
14598 * server.c (gdbserver_version): New.
14599 (gdbserver_usage): Use printf.
14600 (main): Handle --version and --help.
14601 * server.h (version, host_name): Add declarations.
14602
14603 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14604
14605 * linux-arm-low.c:
14606 * linux-arm-low.c:
14607 * inferiors.c:
14608 * i387-fp.h:
14609 * i387-fp.c:
14610 * gdbreplay.c:
14611 * regcache.c:
14612 * proc-service.c:
14613 * mem-break.h:
14614 * mem-break.c:
14615 * linux-x86-64-low.c:
14616 * linux-sh-low.c:
14617 * linux-s390-low.c:
14618 * linux-ppc64-low.c:
14619 * linux-ppc-low.c:
14620 * linux-mips-low.c:
14621 * linux-m68k-low.c:
14622 * linux-m32r-low.c:
14623 * linux-low.h:
14624 * linux-low.c:
14625 * linux-ia64-low.c:
14626 * linux-i386-low.c:
14627 * linux-crisv32-low.c:
14628 * thread-db.c:
14629 * terminal.h:
14630 * target.h:
14631 * target.c:
14632 * server.h:
14633 * server.c:
14634 * remote-utils.c:
14635 * regcache.h:
14636 * utils.c:
14637 * Makefile.in:
14638 * configure.ac:
14639 * gdbserver.1: Add (C) after Copyright. Update the FSF
14640 address.
14641
14642 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14643
14644 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14645 (arm_breakpoint_at): Recognize both breakpoints.
14646 (the_low_target): Use the correct breakpoint instruction.
14647
14648 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14651 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14652 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14653 (the_low_target): Update.
14654
14655 2005-10-25 Andreas Schwab <schwab@suse.de>
14656
14657 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14658
14659 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14660 (ia64_num_regs): Reduce to 462.
14661
14662 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14663
14664 * acinclude.m4: Correct quoting.
14665 * aclocal.m4: Regenerated.
14666
14667 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14668 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14669 (thread_db_init): Call thread_db_err_str.
14670 * configure.ac: Check for TD_VERSION.
14671 * config.in, configure: Regenerated.
14672
14673 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14674
14675 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14676
14677 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14678
14679 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14680 is not available. Define HAVE_PTRACE_GETREGS if it is.
14681 * config.in, configure: Regenerated.
14682 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14683 * linux-i386-low.c, linux-m68k-low.c: Update to use
14684 HAVE_PTRACE_GETREGS.
14685 * linux-low.c (regsets_fetch_inferior_registers)
14686 (regsets_store_inferior_registers): Only return 0 if we processed
14687 GENERAL_REGS.
14688 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14689 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14690
14691 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14692
14693 * inferiors.c (struct thread_info): Add gdb_id.
14694 (add_thread): Add gdb_id argument.
14695 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14696 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14697 calls to add_thread.
14698 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14699 * server.c (handle_query): Use thread_to_gdb_id.
14700 (handle_v_cont, main): Use gdb_id_to_thread_id.
14701 * server.h (add_thread): Update prototype.
14702 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14703 prototypes.
14704
14705 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14706
14707 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14708 left-padded registers.
14709 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14710 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14711
14712 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14713
14714 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14715 * configure: Regenerate.
14716 * config.in: Regenerate.
14717 * server.h (NEED_DECLARATION_STRERROR):
14718 Replace with !HAVE_DECL_STRERROR.
14719
14720 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14721
14722 * linux-low.c (linux_wait, linux_send_signal): Don't test
14723 an unsigned long variable for > 0 if it could be MAX_ULONG.
14724 * server.c (myresume): Likewise.
14725 * target.c (set_desired_inferior): Likewise.
14726
14727 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14728
14729 * configure.ac: Simplify and improve check for socklen_t.
14730 * configure, config.in: Regenerate.
14731
14732 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14733
14734 * acconfig.h: Remove.
14735 * configure.ac: Add a test for socklen_t. Use three-argument
14736 AC_DEFINE throughout.
14737 * config.in: Regenerated using autoheader 2.59.
14738 * configure: Regenerated.
14739
14740 * gdbreplay.c (socklen_t): Provide a default.
14741 (remote_open): Use socklen_t.
14742 * remote-utils.c (socklen_t): Provide a default.
14743 (remote_open): Use socklen_t.
14744 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14745 unsigned char.
14746
14747 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14748 char for buffers.
14749 * linux-low.c (linux_read_memory, linux_write_memory)
14750 (linux_read_auxv): Likewise.
14751 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14752 (check_mem_write): Likewise.
14753 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14754 Likewise.
14755 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14756 (registers_from_string, register_data): Likewise.
14757 * server.c (handle_query, main): Likewise.
14758 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14759 (decode_M_packet): Likewise.
14760 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14761 * target.h (struct target_ops): Update read_memory, write_memory,
14762 and read_auxv.
14763 (read_inferior_memory, write_inferior_memory): Update.
14764 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14765 to unsigned char *.
14766 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14767 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14768 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14769 linux-s390-low.c, linux-sh-low.c: Update for changes in
14770 read_inferior_memory and the_low_target->breakpoint.
14771
14772 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14775 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14776 * configure.srv: Add powerpc64-*-linux*.
14777 * linux-ppc64-low.c: New file.
14778
14779 2005-05-23 Orjan Friberg <orjanf@axis.com>
14780
14781 * linux-cris-low.c: New file with support for CRIS.
14782 * linux-crisv32-low.c: Ditto for CRISv32.
14783 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14784 (clean): Add reg-cris.c and reg-crisv32.c.
14785 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14786 reg-crisv32.o, and reg-crisv32.c to make rules.
14787 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14788 recognized targets.
14789
14790 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14791
14792 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14793 of sizeof (PTRACE_XFER_TYPE).
14794 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14795
14796 2005-05-12 Orjan Friberg <orjanf@axis.com>
14797
14798 * target.h (struct target_ops): Add insert_watchpoint,
14799 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14800 pointers for hardware watchpoint support.
14801 * linux-low.h (struct linux_target_ops): Ditto.
14802 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14803 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14804 to linux_target_ops.
14805 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14806 reply packet.
14807 * server.c (main): Recognize 'Z' and 'z' packets.
14808
14809 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14810
14811 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14812 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14813 (the_low_target): Add new members.
14814
14815 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14816
14817 * proc-service.c (ps_lgetregs): Search all_processes instead of
14818 all_threads.
14819
14820 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14821
14822 * server.c (start_inferior): Change return type to int.
14823 (attach_inferior): Change sigptr to int *.
14824 (handle_v_cont, handle_v_requests): Change signal to int *.
14825 (main): Change signal to int.
14826
14827 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14828
14829 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14830 * configure.srv: Add m32r*-*-linux*.
14831 * linux-m32r-low.c: New file.
14832
14833 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14834
14835 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14836
14837 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14838
14839 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14840 Take unsigned long arguments for PIDs.
14841 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14842 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14843 (wait_for_sigstop, linux_resume_one_process)
14844 (regsets_fetch_inferior_registers, linux_send_signal)
14845 (linux_read_auxv): Likewise. Update the types of variables holding
14846 PIDs. Update format string specifiers.
14847 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14848 * remote-utils.c (prepare_resume_reply): Likewise.
14849 * server.c (cont_thread, general_thread, step_thread)
14850 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14851 unsigned long.
14852 (handle_query): Update format specifiers.
14853 (handle_v_cont, main): Use strtoul for thread IDs.
14854 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14855 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14856 (general_thread, step_thread, thread_from_wait)
14857 (old_thread_from_wait): Update.
14858 * target.h (struct thread_resume): Use unsigned long for THREAD.
14859 (struct target_ops): Use unsigned long for arguments to attach and
14860 thread_alive.
14861
14862 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14863
14864 * acinclude.m4: Include bfd/bfd.m4 directly.
14865 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14866 <agriffis@toolchain.org>.
14867 * aclocal.m4, configure: Regenerated.
14868
14869 2005-01-07 Andrew Cagney <cagney@gnu.org>
14870
14871 * configure.ac: Rename configure.in, require autoconf 2.59.
14872 * configure: Re-generate.
14873
14874 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14875
14876 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14877 LIBS when finished.
14878 * aclocal.m4: Regenerated.
14879 * configure: Regenerated.
14880
14881 2004-11-21 Andreas Schwab <schwab@suse.de>
14882
14883 * linux-m68k-low.c (m68k_num_gregs): Define.
14884 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14885 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14886 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14887 (m68k_breakpoint_at): New. Add to the_low_target.
14888
14889 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14890 srv_linux_thread_db to yes.
14891
14892 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14893
14894 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14895 (ARCH_SET_FS): Likewise.
14896 (ARCH_GET_FS): Likewise.
14897 (ARCH_GET_GS): Likewise.
14898
14899 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14900
14901 * linux-i386-low.c (ps_get_thread_area): New.
14902 * linux-x86-64-low.c (ps_get_thread_area): New.
14903 * linux-low.c: Include <sys/syscall.h>.
14904 (linux_kill_one_process): Don't kill the first thread here.
14905 (linux_kill): Kill the first thread here.
14906 (kill_lwp): New function.
14907 (send_sigstop, linux_send_signal): Use it.
14908 * proc-service.c: Clean up #ifdefs.
14909 (fpregset_info): Delete.
14910 (ps_lgetregs): Update and enable implementation.
14911 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14912 implementations.
14913 * remote-utils.c (struct sym_cache, symbol_cache): New.
14914 (input_interrupt): Print a clearer message.
14915 (async_io_enabled): New variable.
14916 (enable_async_io, disable_async_io): Use it. Update comments.
14917 (look_up_one_symbol): Use the symbol cache.
14918 * thread-db.c (thread_db_look_up_symbols): New function.
14919 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14920
14921 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14922
14923 * configure.in: Test for -rdynamic.
14924 * configure: Regenerated.
14925 * Makefile (INTERNAL_LDFLAGS): New.
14926 (gdbserver, gdbreplay): Use it.
14927
14928 2004-09-02 Andrew Cagney <cagney@gnu.org>
14929
14930 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14931
14932 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14933
14934 * linux-low.c (linux_wait): Clear all_processes list also.
14935
14936 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14937
14938 * linux-low.c: Include <errno.h>. Remove extern declaration of
14939 errno.
14940
14941 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14942
14943 * gdbreplay.c, server.h, utils.c: Update copyright years.
14944
14945 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14946
14947 * server.c (main): Print child status or termination signal from
14948 variable 'signal', not 'sig'.
14949
14950 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14951
14952 * linux-low.c (linux_read_memory): Change return type to
14953 int. Check for and return error from ptrace().
14954 * target.c (read_inferior_memory): Change return type to int. Pass
14955 back return status from the_target->read_memory().
14956 * target.h (struct target_ops): Adapt *read_memory() prototype.
14957 Update comment.
14958 (read_inferior_memory): Adapt prototype.
14959 * server.c (main): Return an error packet if
14960 read_inferior_memory() returns an error.
14961
14962 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14963
14964 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14965 Unify with other clean targets.
14966
14967 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14968
14969 * server.c (handle_v_cont): Call set_desired_inferior.
14970
14971 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14972
14973 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14974
14975 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14976
14977 * linux-low.c (linux_wait): Unblock async I/O.
14978 (linux_resume): Block and enable async I/O.
14979 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14980 * server.h (block_async_io, unblock_async_io): Add prototypes.
14981
14982 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14983
14984 * remote-utils.c (remote_open): Print a status notice after
14985 opening a TCP port.
14986 * server.c (attach_inferior): Print a status notice after
14987 attaching.
14988
14989 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14990
14991 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14992
14993 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14994
14995 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14996 error packet.
14997 * server.c, target.h: Update copyright years.
14998
14999 2004-02-25 Roland McGrath <roland@redhat.com>
15000
15001 * target.h (struct target_ops): New member `read_auxv'.
15002 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15003 * linux-low.c (linux_read_auxv): New function.
15004 (linux_target_ops): Initialize `read_auxv' member to that.
15005
15006 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15007
15008 Committed by Jim Blandy <jimb@redhat.com>.
15009
15010 * linux-s390-low.c (s390_num_regs): Update.
15011 (s390_regmap): Remove control registers. Use __s390x__ predefine
15012 instead of GPR_SIZE to distiguish s390 and s390x targets.
15013
15014 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15015
15016 * linux-low.c: Update copyright year.
15017 (check_removed_breakpoint): Clear pending_is_breakpoint.
15018 (linux_set_resume_request, linux_queue_one_thread)
15019 (resume_status_pending_p): New functions.
15020 (linux_continue_one_thread): Use process->resume.
15021 (linux_resume): Only resume threads if there are no pending events.
15022 * linux-low.h (struct process_info): Add resume request
15023 pointer.
15024
15025 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15026
15027 * regcache.c (new_register_cache): Clear the allocated register
15028 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15029
15030 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15031
15032 * linux-low.c (linux_resume): Take a struct thread_resume *
15033 argument.
15034 (linux_wait): Update call.
15035 (resume_ptr): New static variable.
15036 (linux_continue_one_thread): Renamed from
15037 linux_continue_one_process. Use resume_ptr.
15038 (linux_resume): Use linux_continue_one_thread.
15039 * server.c (handle_v_cont, handle_v_requests): New functions.
15040 (myresume): New function.
15041 (main): Handle 'v' case.
15042 * target.h (struct thread_resume): New type.
15043 (struct target_ops): Change argument of "resume" to struct
15044 thread_resume *.
15045 (myresume): Delete macro.
15046
15047 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15048
15049 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15050 (uninstall): Support DESTDIR.
15051
15052 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15053
15054 * configure.srv: Add xscale*linux copy of arm*linux entry.
15055
15056 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15057
15058 * linux-arm-low.c (arm_reinsert_addr): New function.
15059 (the_low_target): Add arm_reinsert_addr.
15060
15061 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15062
15063 * mem-break.c: Remove whitespace at end of file.
15064
15065 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15066
15067 * configure.in: Check whether we need to prototype strerror.
15068 * server.h: Optionally prototype strerror.
15069 * gdbreplay.c (perror_with_name): Use strerror.
15070 * linux-low.c (linux_attach_lwp): Use strerror.
15071 * utils.c (perror_with_name): Use strerror.
15072 * config.in, configure: Regenerated.
15073
15074 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15075
15076 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15077 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15078
15079 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15080
15081 * Makefile.in (SFILES): Update.
15082 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15083 low-sun3.c: Remove files.
15084
15085 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15086
15087 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15088 (linux_detach_one_process, linux_detach): New functions.
15089 (linux_target_ops): Add linux_detach.
15090 * server.c (main): Handle 'D' packet.
15091 * target.h (struct target_ops): Add "detach" member.
15092 (detach_inferior): Define.
15093
15094 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15095
15096 From Kelley Cook <kelleycook@wideopenwest.com>:
15097 * configure.srv: Accept i[34567]86 variants.
15098
15099 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15100
15101 * linux-low.c (linux_wait_for_event): Correct comment typos.
15102 (linux_resume_one_process): Call check_removed_breakpoint.
15103 (linux_send_signal): New function.
15104 (linux_target_ops): Add linux_send_signal.
15105 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15106 of kill.
15107 * target.h (struct target_ops): Add send_signal.
15108
15109 2003-05-29 Jim Blandy <jimb@redhat.com>
15110
15111 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15112 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15113 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15114 away part of the register's value.
15115
15116 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15117
15118 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15119 (linux_wait_for_event, linux_init_signals): Likewise.
15120
15121 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15122
15123 * configure.in: Check for stdlib.h.
15124 * configure: Regenerated.
15125 * config.in: Regenerated.
15126
15127 2003-01-04 Andreas Schwab <schwab@suse.de>
15128
15129 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15130
15131 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15132
15133 * Makefile.in: Remove obsolete code.
15134
15135 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15136
15137 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15138 defined(PT_FPR0_HI).
15139
15140 2002-11-17 Stuart Hughes <seh@zee2.com>
15141
15142 * linux-arm-low.c (arm_num_regs): Increase.
15143 (arm_regmap): Include status register.
15144
15145 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15146
15147 * linux-low.c (register_addr): Remove incorrect -1 check.
15148
15149 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15150
15151 * linux-low.c (linux_create_inferior): Call setpgid. Return
15152 the new PID.
15153 (unstopped_p, linux_signal_pid): Remove.
15154 (linux_target_ops): Remove linux_signal_pid.
15155 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15156 global instead of target method.
15157 * target.h (struct target_ops): Remove signal_pid. Update comment
15158 for create_inferior.
15159 * server.c (signal_pid): New variable.
15160 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15161 gdbserver. Set the child to be the foreground process group.
15162 (attach_inferior): Set signal_pid.
15163
15164 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15165
15166 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15167
15168 2002-08-20 Jim Blandy <jimb@redhat.com>
15169
15170 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15171 default for this.
15172
15173 2002-08-01 Andrew Cagney <cagney@redhat.com>
15174
15175 * Makefile.in: Make chill references obsolete.
15176
15177 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15178
15179 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15180 * configure: Regenerate.
15181 * config.in: Regenerate.
15182
15183 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15184
15185 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15186 (perror_with_name, remote_close, remote_open, expect, play): Static.
15187
15188 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15189
15190 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15191 byte offsets instead of an array of indexes.
15192 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15193
15194 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15195
15196 * regcache.c: Add comment.
15197
15198 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15199
15200 * thread-db.c: New file.
15201 * proc-service.c: New file.
15202 * acinclude.m4: New file.
15203 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15204 proc-service.o, and thread-db.o.
15205 (linux-low.o): Add USE_THREAD_DB.
15206 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15207 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15208 * aclocal.m4: Regenerated.
15209 * config.in: Regenerated.
15210 * configure: Regenerated.
15211 * configure.in: Check for proc_service.h, sys/procfs.h,
15212 thread_db.h, and linux/elf.h headrs.
15213 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15214 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15215 Check for -lthread_db and thread support.
15216 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15217 PowerPC, and SuperH.
15218 * i387-fp.c: Constify arguments.
15219 * i387-fp.h: Likewise.
15220 * inferiors.c: (struct thread_info): Renamed from
15221 `struct inferior_info'. Remove PID member. Use generic inferior
15222 list header. All uses updated.
15223 (inferiors, signal_pid): Removed.
15224 (all_threads): New variable.
15225 (get_thread): Define.
15226 (add_inferior_to_list): New function.
15227 (for_each_inferior): New function.
15228 (change_inferior_id): New function.
15229 (add_inferior): Removed.
15230 (remove_inferior): New function.
15231 (add_thread): New function.
15232 (free_one_thread): New function.
15233 (remove_thread): New function.
15234 (clear_inferiors): Use for_each_inferior and free_one_thread.
15235 (find_inferior): New function.
15236 (find_inferior_id): New function.
15237 (inferior_target_data): Update argument type.
15238 (set_inferior_target_data): Likewise.
15239 (inferior_regcache_data): Likewise.
15240 (set_inferior_regcache_data): Likewise.
15241 * linux-low.c (linux_bp_reinsert): Remove.
15242 (all_processes, stopping_threads, using_thrads)
15243 (struct pending_signals, debug_threads, pid_of): New.
15244 (inferior_pid): Replace with macro.
15245 (struct inferior_linux_data): Remove.
15246 (get_stop_pc, add_process): New functions.
15247 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15248 Use add_process and add_thread.
15249 (linux_attach_lwp): New function, based on old linux_attach. Use
15250 add_process and add_thread. Set stop_expected for new threads.
15251 (linux_attach): New function.
15252 (linux_kill_one_process): New function.
15253 (linux_kill): Kill all LWPs.
15254 (linux_thread_alive): Use find_inferior_id.
15255 (check_removed_breakpoints, status_pending_p): New functions.
15256 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15257 Update. Use WNOHANG. Wait for cloned processes also. Update process
15258 struct for the found process.
15259 (linux_wait_for_event): New function.
15260 (linux_wait): Use it. Support LWPs.
15261 (send_sigstop, wait_for_sigstop, stop_all_processes)
15262 (linux_resume_one_process, linux_continue_one_process): New functions.
15263 (linux_resume): Support LWPs.
15264 (REGISTER_RAW_SIZE): Remove.
15265 (fetch_register): Use register_size instead. Call supply_register.
15266 (usr_store_inferior_registers): Likewise. Call collect_register.
15267 Fix recursive case.
15268 (regsets_fetch_inferior_registers): Improve error message.
15269 (regsets_store_inferior_registers): Add debugging.
15270 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15271 (unstopped_p, linux_signal_pid): New functions.
15272 (linux_target_ops): Add linux_signal_pid.
15273 (linux_init_signals): New function.
15274 (initialize_low): Call it. Initialize using_threads.
15275 * regcache.c (inferior_regcache_data): Add valid
15276 flag.
15277 (get_regcache): Fetch registers lazily. Add fetch argument
15278 and update all callers.
15279 (regcache_invalidate_one, regcache_invalidate): New
15280 functions.
15281 (new_register_cache): Renamed from create_register_cache.
15282 Return the new regcache.
15283 (free_register_cache): Change argument to a void *.
15284 (registers_to_string, registers_from_string): Call get_regcache
15285 with fetch flag set.
15286 (register_data): Make static. Pass fetch flag to get_regcache.
15287 (supply_register): Call get_regcache with fetch flag clear.
15288 (collect_register): Call get_regcache with fetch flag set.
15289 (collect_register_as_string): New function.
15290 * regcache.h: Update.
15291 * remote-utils.c (putpkt): Flush after debug output and use
15292 stderr.
15293 Handle input interrupts while waiting for an ACK.
15294 (input_interrupt): Use signal_pid method.
15295 (getpkt): Flush after debug output and use stderr.
15296 (outreg): Use collect_register_as_string.
15297 (new_thread_notify, dead_thread_notify): New functions.
15298 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15299 and general_thread.
15300 (look_up_one_symbol): Flush after debug output.
15301 * server.c (step_thread, server_waiting): New variables.
15302 (start_inferior): Don't use signal_pid. Update call to mywait.
15303 (attach_inferior): Update call to mywait.
15304 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15305 (main): Don't fetch/store registers explicitly. Use
15306 set_desired_inferior. Support proposed ``Hs'' packet. Update
15307 calls to mywait.
15308 * server.h: Update.
15309 (struct inferior_list, struct_inferior_list_entry): New.
15310 * target.c (set_desired_inferior): New.
15311 (write_inferior_memory): Constify.
15312 (mywait): New function.
15313 * target.h: Update.
15314 (struct target_ops): New signal_pid method.
15315 (mywait): Removed macro, added prototype.
15316
15317 * linux-low.h (regset_func): Removed.
15318 (regset_fill_func, regset_store_func): New.
15319 (enum regset_type): New.
15320 (struct regset_info): Add type field. Use new operation types.
15321 (struct linux_target_ops): stop_pc renamed to get_pc.
15322 Add decr_pc_after_break and breakpoint_at.
15323 (get_process, get_thread_proess, get_process_thread)
15324 (strut process_info, all_processes, linux_attach_lwp)
15325 (thread_db_init): New.
15326
15327 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15328 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15329 (the_low_target): Add new members.
15330 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15331 (i386_store_fpxregset): Constify.
15332 (target_regsets): Add new kind identifier.
15333 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15334 (i386_set_pc): Add debugging.
15335 (i386_breakpoint_at): New function.
15336 (the_low_target): Add new members.
15337 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15338 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15339 (mips_breakpoint_at): New.
15340 (the_low_target): Add new members.
15341 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15342 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15343 (the_low_target): Add new members.
15344 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15345 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15346 (the_low_target): Add new members.
15347 * linux-x86-64-low.c (target_regsets): Add new kind
15348 identifier.
15349
15350 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15351
15352 From Martin Pool <mbp@samba.org>:
15353 * server.c (gdbserver_usage): New function.
15354 (main): Call it.
15355
15356 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15357
15358 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15359 stop_at -> stop_pc.
15360
15361 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15362
15363 * Makefile.in: Remove obsolete code.
15364
15365 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15366
15367 * linux-low.c (regsets_fetch_inferior_registers),
15368 (regsets_store_inferior_registers): Removed cast to int from
15369 ptrace() calls.
15370 * regcache.h: Added declaration of struct inferior_info.
15371
15372 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15373
15374 * inferiors.c (struct inferior_info): Add regcache_data.
15375 (add_inferior): Call create_register_cache.
15376 (clear_inferiors): Call free_register_cache.
15377 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15378 * regcache.c (struct inferior_regcache_data): New.
15379 (registers): Remove.
15380 (get_regcache): New function.
15381 (create_register_cache, free_register_cache): New functions.
15382 (set_register_cache): Don't initialize the register cache here.
15383 (registers_to_string, registers_from_string, register_data): Call
15384 get_regcache.
15385 * regcache.h: Add prototypes.
15386 * server.h: Likewise.
15387
15388 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15389
15390 * mem-break.c: New file.
15391 * mem-break.h: New file.
15392 * Makefile.in: Add mem-break.o rule; update server.h
15393 dependencies.
15394 * inferiors.c (struct inferior_info): Add target_data
15395 member.
15396 (clear_inferiors): Free target_data member if set.
15397 (inferior_target_data, set_inferior_target_data): New functions.
15398 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15399 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15400 * linux-low.c (linux_bp_reinsert): New variable.
15401 (struct inferior_linux_data): New.
15402 (linux_create_inferior): Use set_inferior_target_data.
15403 (linux_attach): Likewise. Call add_inferior.
15404 (linux_wait_for_one_inferior): New function.
15405 (linux_wait): Call it.
15406 (linux_write_memory): Add const.
15407 (initialize_low): Call set_breakpoint_data.
15408 * linux-low.h (struct linux_target_ops): Add breakpoint
15409 handling members.
15410 * server.c (attach_inferior): Remove extra add_inferior
15411 call.
15412 * server.h: Include mem-break.h. Update inferior.c
15413 prototypes.
15414 * target.c (read_inferior_memory)
15415 (write_inferior_memory): New functions.
15416 * target.h (read_inferior_memory)
15417 (write_inferior_memory): Change macros to prototypes.
15418 (struct target_ops): Update comments. Add const to write_memory
15419 definition.
15420
15421 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15422
15423 * linux-low.c (usr_store_inferior_registers): Support
15424 registers which are allowed to fail to store.
15425 * linux-low.h (linux_target_ops): Likewise.
15426 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15427 (ppc_cannot_store_register): FPSCR may not be storable.
15428
15429 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15430
15431 * server.h: Include <string.h> if HAVE_STRING_H.
15432 * ChangeLog: Correct paths in last ChangeLog entry.
15433
15434 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15435
15436 * linux-low.h: Remove obsolete prototypes.
15437 (struct linux_target_ops): New.
15438 (extern the_low_target): New.
15439 * linux-low.c (num_regs, regmap): Remove declarations.
15440 (register_addr): Use the_low_target explicitly.
15441 (fetch_register): Likewise.
15442 (usr_fetch_inferior_registers): Likewise.
15443 (usr_store_inferior_registers): Likewise.
15444 * linux-arm-low.c (num_regs): Remove.
15445 (arm_num_regs): Define.
15446 (arm_regmap): Renamed from regmap, made static.
15447 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15448 made static.
15449 (arm_cannot_store_register): Renamed from cannot_store_register,
15450 made static.
15451 (the_low_target): New.
15452 * linux-i386-low.c (num_regs): Remove.
15453 (i386_num_regs): Define.
15454 (i386_regmap): Renamed from regmap, made static.
15455 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15456 made static.
15457 (i386_cannot_store_register): Renamed from cannot_store_register,
15458 made static.
15459 (the_low_target): New.
15460 * linux-ia64-low.c (num_regs): Remove.
15461 (ia64_num_regs): Define.
15462 (ia64_regmap): Renamed from regmap, made static.
15463 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15464 made static.
15465 (ia64_cannot_store_register): Renamed from cannot_store_register,
15466 made static.
15467 (the_low_target): New.
15468 * linux-m68k-low.c (num_regs): Remove.
15469 (m68k_num_regs): Define.
15470 (m68k_regmap): Renamed from regmap, made static.
15471 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15472 made static.
15473 (m68k_cannot_store_register): Renamed from cannot_store_register,
15474 made static.
15475 (the_low_target): New.
15476 * linux-mips-low.c (num_regs): Remove.
15477 (mips_num_regs): Define.
15478 (mips_regmap): Renamed from regmap, made static.
15479 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15480 made static.
15481 (mips_cannot_store_register): Renamed from cannot_store_register,
15482 made static.
15483 (the_low_target): New.
15484 * linux-ppc-low.c (num_regs): Remove.
15485 (ppc_num_regs): Define.
15486 (ppc_regmap): Renamed from regmap, made static.
15487 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15488 made static.
15489 (ppc_cannot_store_register): Renamed from cannot_store_register,
15490 made static.
15491 (the_low_target): New.
15492 * linux-s390-low.c (num_regs): Remove.
15493 (s390_num_regs): Define.
15494 (s390_regmap): Renamed from regmap, made static.
15495 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15496 made static.
15497 (s390_cannot_store_register): Renamed from cannot_store_register,
15498 made static.
15499 (the_low_target): New.
15500 * linux-sh-low.c (num_regs): Remove.
15501 (sh_num_regs): Define.
15502 (sh_regmap): Renamed from regmap, made static.
15503 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15504 made static.
15505 (sh_cannot_store_register): Renamed from cannot_store_register,
15506 made static.
15507 (the_low_target): New.
15508 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15509 (the_low_target): New.
15510
15511 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15512
15513 * Makefile.in: Add stamp-h target.
15514 * configure.in: Create stamp-h.
15515 * configure: Regenerated.
15516
15517 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15518
15519 * inferiors.c: New file.
15520 * target.c: New file.
15521 * target.h: New file.
15522 * Makefile.in: Add target.o and inferiors.o. Update
15523 dependencies.
15524 * linux-low.c (inferior_pid): New static variable,
15525 moved from server.c.
15526 (linux_create_inferior): Renamed from create_inferior.
15527 Call add_inferior. Return 0 on success instead of a PID.
15528 (linux_attach): Renamed from myattach.
15529 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15530 (linux_thread_alive): Renamed from mythread_alive.
15531 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15532 child dies.
15533 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15534 (regsets_store_inferior_registers): Correct error message.
15535 Add missing ``return 0''.
15536 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15537 (linux_store_registers): Renamed from store_inferior_registers.
15538 (linux_read_memory): Renamed from read_inferior_memory.
15539 (linux_write_memory): Renamed from write_inferior_memory.
15540 (linux_target_ops): New structure.
15541 (initialize_low): Call set_target_ops ().
15542 * remote-utils.c (unhexify): New function.
15543 (hexify): New function.
15544 (input_interrupt): Send signals to ``signal_pid''.
15545 * server.c (inferior_pid): Remove.
15546 (start_inferior): Update create_inferior call.
15547 (attach_inferior): Call add_inferior.
15548 (handle_query): New function.
15549 (main): Call handle_query for `q' packets.
15550 * server.h: Include "target.h". Remove obsolete prototypes.
15551 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15552
15553 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15554
15555 * Makefile.in: Add WARN_CFLAGS. Update configury
15556 dependencies.
15557 * configure.in: Check for <string.h>
15558 * configure: Regenerate.
15559 * config.in: Regenerate.
15560 * gdbreplay.c: Include needed system headers.
15561 (remote_open): Remove strchr prototype.
15562 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15563 * regcache.c (supply_register): Change buf argument to const void *.
15564 (supply_register_by_name): Likewise.
15565 (collect_register): Change buf argument to void *.
15566 (collect_register_by_name): Likewise.
15567 * regcache.h: Add missing prototypes.
15568 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15569 * server.c (handle_query): New function.
15570 (attached): New static variable, moved out of main.
15571 (main): Quiet longjmp clobber warnings.
15572 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15573 * utils.c (error): Remove NORETURN.
15574 (fatal): Likewise.
This page took 0.523246 seconds and 4 git commands to generate.