00e789187e78def3907f6fc3095036a8cef67c90
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2
3 * server.c (accumulate_file_name_length): Remove.
4 (emit_dll_description): Adjust to std::string change.
5 (handle_qxfer_libraries): Use std::string to hold document.
6
7 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
8
9 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
10 return type of xml_escape_text.
11 * server.c (emit_dll_description): Likewise.
12
13 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
14
15 * server.c (captured_main): Accept argument for --selftest.
16 Update run_tests call.
17 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
18 when registering selftests.
19
20 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
21
22 * regcache.c (get_thread_regcache): Update code to use "std::vector"
23 instead of "VEC" for "target_desc.reg_defs".
24 (regcache_cpy): Likewise.
25 (registers_to_string): Likewise.
26 (registers_from_string): Likewise.
27 (find_regno): Likewise.
28 (supply_regblock): Likewise.
29 (regcache_raw_read_unsigned): Likewise.
30 * tdesc.c (init_target_desc): Likewise.
31 (tdesc_create_reg): Likewise.
32 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
33 (struct target_desc) <reg_defs>: Convert to "std::vector".
34 (target_desc): Do not initialize "reg_defs".
35 (~target_desc): Update code to use "std::vector" instead of "VEC"
36 for "target_desc.reg_defs".
37 (operator==): Likewise.
38
39 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
40
41 * inferiors.h (thread_to_gdb_id): Remove.
42 * inferiors.c (thread_to_gdb_id): Remove.
43 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
44 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
45 lynx_store_registers, lynx_read_memory, lynx_write_memory):
46 Likewise.
47 * nto-low.c (nto_fetch_registers, nto_store_registers,
48 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
49
50 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
51
52 * inferiors.h (gdb_id_to_thread_id): Remove.
53 * inferiors.c (gdb_id_to_thread_id): Remove.
54 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
55 removal. Move pid declaration closer to where it's used.
56
57 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
58
59 * server.c (handle_detach): New function.
60 (process_serial_event): Move code out, call handle_detach.
61
62 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
63
64 * server.c (require_running): Rename to ...
65 (require_running_or_return): ... this ...
66 (require_running_or_break): ... and this.
67 (handle_query, process_serial_event): Adjust.
68
69 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
70
71 * linux-low.c (linux_set_resume_request): Remove unused
72 variables.
73
74 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
75
76 * server.c (first_thread_of): Remove.
77 (process_serial_event): Replace usage of first_thread_of with
78 find_any_thread_of_pid.
79 * tracepoint.c (same_process_p): Remove.
80 (gdb_agent_about_to_close): Replace usage of same_process_p with
81 find_any_thread_of_pid.
82 * linux-x86-low.c (same_process_callback): Remove.
83 (x86_arch_setup_process_callback): Replace usage of
84 same_process_callback with find_any_thread_of_pid.
85 * thread-db.c (any_thread_of): Remove.
86 (switch_to_process): Replace usage of any_thread_of with
87 find_any_thread_of_pid.
88 * inferiors.c (thread_pid_matches_callback): Remove.
89 (find_thread_process): Adjust to use find_any_thread_of_pid.
90
91 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
92
93 * regcache.c (get_thread_regcache): Guard calls to "memset"
94 with "!VEC_empty".
95
96 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
97
98 * linux-low.c (handle_extended_wait): Use
99 "allocate_target_description" instead of "XNEW".
100 * linux-x86-low.c (initialize_low_arch): Likewise.
101
102 2017-09-05 Yao Qi <yao.qi@linaro.org>
103
104 * configure.srv (srv_i386_regobj): Remove.
105 (srv_amd64_regobj): Remove.
106 (srv_regobj): Set it to "" for x86 non-linux targets.
107 * linux-x86-tdesc.c (i386_linux_read_description):
108 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
109 (init_registers_i386): Remove the declaration.
110 (tdesc_i386): Remove the declaration.
111 (lynx_i386_arch_setup): Call i386_create_target_description.
112 * nto-x86-low.c: Likewise.
113 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
114 [!__x86_64__]: include arch/i386.h.
115 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
116
117 2017-09-05 Yao Qi <yao.qi@linaro.org>
118
119 * configure.srv (srv_amd64_linux_xmlfiles): Remove
120 i386/amd64-XXX-linux from it.
121
122 2017-09-05 Yao Qi <yao.qi@linaro.org>
123
124 * configure.srv: Empty srv_amd64_linux_regobj if $development is
125 false.
126 (ipa_amd64_linux_regobj): Remove.
127 (ipa_x32_linux_regobj): Remove.
128
129 2017-09-05 Yao Qi <yao.qi@linaro.org>
130
131 * Makefile.in (arch-amd64.o): New rule.
132 * configure.srv: Append arch-amd64.o.
133 * linux-amd64-ipa.c: Include common/x86-xstate.h.
134 (get_ipa_tdesc): Call amd64_linux_read_description.
135 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
136 and init_registers_amd64_XXX.
137 * linux-x86-low.c (x86_linux_read_description): Call
138 amd64_linux_read_description.
139 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
140 (initialize_low_arch): Don't call init_registers_x32_XXX and
141 init_registers_amd64_XXX.
142 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
143 and tdesc_amd64_XXX.
144 [__x86_64__] (amd64_tdesc_test): New function.
145 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
146 and init_registers_amd64_XXX.
147 * linux-x86-tdesc.c: Include arch/amd64.h.
148 (xcr0_to_tdesc_idx): New function.
149 (i386_linux_read_description): New function.
150 (amd64_get_ipa_tdesc_idx): New function.
151 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
152 (amd64_get_ipa_tdesc): Declare.
153
154 2017-09-05 Yao Qi <yao.qi@linaro.org>
155
156 * configure.srv (srv_i386_linux_xmlfiles): Remove
157 i386/i386-XXX-linux.xml from it.
158
159 2017-09-05 Yao Qi <yao.qi@linaro.org>
160
161 * configure.srv: Set srv_i386_linux_regobj empty if $development
162 is false.
163 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
164 initialize_low_tdesc.
165 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
166 with #if initialize_low_tdesc.
167 * linux-x86-tdesc-selftest.c: New file.
168 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
169
170 2017-09-05 Yao Qi <yao.qi@linaro.org>
171
172 * Makefile.in (arch-i386.o): New rule.
173 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
174 (x86_64-*-linux*): Likewise.
175 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
176 include arch/i386.h.
177 (i386_linux_read_description): Remove code and call
178 i386_create_target_description.
179 * tdesc.c (allocate_target_description): New function.
180 * tdesc.h (set_tdesc_architecture): Remove declaration.
181 (set_tdesc_osabi): Likewise.
182
183 2017-09-05 Yao Qi <yao.qi@linaro.org>
184
185 * linux-x86-tdesc.c: Don't include <inttypes.h>.
186 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
187 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
188 .xmltarget.
189 * server.c (get_features_xml): Call tdesc_get_features_xml.
190 * tdesc.c (set_tdesc_architecture): New function.
191 (set_tdesc_osabi): New function.
192 (tdesc_get_features_xml): New function.
193 (tdesc_create_feature): Add an argument.
194 * tdesc.h (struct target_desc) <features>: New field.
195 <arch, osabi>: New field.
196 (~target_desc): xfree features, arch, and osabi.
197 (target_desc::oerator==): Don't compare .xmltarget.
198 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
199 (set_tdesc_osabi): Likewise.
200 (tdesc_get_features_xml): Likewise.
201
202 2017-09-05 Yao Qi <yao.qi@linaro.org>
203
204 * linux-x86-tdesc.c: Include selftest.h.
205 (i386_tdesc_test): New function.
206 (initialize_low_tdesc): Call selftests::register_test.
207 * tdesc.h: Include regdef.h.
208 (target_desc): Override operator == and !=.
209
210 2017-09-05 Yao Qi <yao.qi@linaro.org>
211
212 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
213 (ipa_obj): Likewise.
214 * linux-i386-ipa.c: Include common/x86-xstate.h
215 (get_ipa_tdesc): Call i386_linux_read_description.
216 (initialize_low_tracepoint): Don't call init_registers_XXX
217 functions, call initialize_low_tdesc instead.
218 * linux-x86-low.c (x86_linux_read_description): Call
219 i386_linux_read_description.
220 (initialize_low_arch): Don't call init_registers_i386_XXX
221 functions, call initialize_low_tdesc.
222 * linux-x86-tdesc.c: New file.
223 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
224 (i386_get_ipa_tdesc_idx): Declare.
225 (i386_get_ipa_tdesc): Declare.
226 (initialize_low_tdesc): Declare.
227
228 2017-09-05 Yao Qi <yao.qi@linaro.org>
229
230 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
231 instead of 0.
232
233 2017-09-05 Yao Qi <yao.qi@linaro.org>
234
235 * Makefile.in (IPA_OBJS): Add vec-ipa.o
236 * regcache.c (get_thread_regcache): Use VEC_length.
237 (init_register_cache): Likewise.
238 (regcache_cpy): Likewise.
239 (registers_to_string): Iterate reg_defs via VEC_iterate.
240 (find_regno): Likewise.
241 (find_register_by_number): Use VEC_index.
242 (register_size): Call find_register_by_number.
243 (register_data): Call find_register_by_number.
244 (supply_regblock): Use VEC_length.
245 (regcache_raw_read_unsigned): Likewise.
246 * tdesc.c (init_target_desc): Iterate reg_defs via
247 VEC_iterate.
248 (default_description): Update initializer.
249 (copy_target_description): Don't update field num_registers.
250 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
251 <num_registers>: Remove.
252
253 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
254
255 * Makefile.in (.SECONDARY): Define target.
256
257 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
258
259 * linux-low.c (linux_wait_1): Adjust.
260 * server.c (queue_stop_reply_callback): Adjust.
261
262 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
263
264 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
265 QEnvironmentUnset and QEnvironmentReset packets.
266 (handle_query): Inform remote that QEnvironmentHexEncoded,
267 QEnvironmentUnset and QEnvironmentReset are supported.
268
269 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
270
271 * inferiors.h (inferior_target_data): Rename to ...
272 (thread_target_data): ... this.
273 (inferior_regcache_data): Rename to ...
274 (thread_regcache_data): ... this.
275 (set_inferior_regcache_data): Rename to ...
276 (set_thread_regcache_data): ... this.
277 * inferiors.c (inferior_target_data): Rename to ...
278 (thread_target_data): ... this.
279 (inferior_regcache_data): Rename to ...
280 (thread_regcache_data): ... this.
281 (set_inferior_regcache_data): Rename to ...
282 (set_thread_regcache_data): ... this.
283 (free_one_thread): Update.
284 * linux-low.h (get_thread_lwp): Update.
285 * regcache.c (get_thread_regcache): Update.
286 (regcache_invalidate_thread): Update.
287 (free_register_cache_thread): Update.
288 * win32-i386-low.c (update_debug_registers_callback): Update.
289 (win32_get_current_dr): Update.
290 * win32-low.c (thread_rec): Update.
291 (delete_thread_info): Update.
292 (continue_one_thread): Update.
293 (suspend_one_thread): Update.
294
295 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
296
297 * inferiors.c (set_inferior_target_data): Remove.
298 * inferiors.h (set_inferior_target_data): Remove.
299
300 2017-08-18 Yao Qi <yao.qi@linaro.org>
301
302 * Makefile.in (OBS): Add selftest.o.
303 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
304 * configure, config.in: Re-generated.
305 * server.c: Include common/sefltest.h.
306 (captured_main): Handle option --selftest.
307
308 2017-08-09 Yao Qi <yao.qi@linaro.org>
309
310 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
311 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
312 i386-avx-mpx.o and i386-mmx.o.
313 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
314 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
315 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
316 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
317 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
318 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
319 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
320 i386/amd64-avx-mpx.xml.
321
322 2017-08-09 Yao Qi <yao.qi@linaro.org>
323
324 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
325 and x32-avx-avx512.o.
326 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
327 i386/x32-avx-avx512.xml.
328
329 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
330
331 * tracepoint.h (enum class fast_tpoint_collect_result): New
332 enumeration.
333 (fast_tracepoint_collecting): Change return type to
334 fast_tpoint_collect_result.
335 * tracepoint.c (fast_tracepoint_collecting): Likewise.
336 * linux-low.h: Include tracepoint.h.
337 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
338 fast_tpoint_collect_result.
339 * linux-low.c (handle_tracepoints): Adjust.
340 (linux_fast_tracepoint_collecting): Change return type to
341 fast_tpoint_collect_result.
342 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
343 linux_wait_1, stuck_in_jump_pad_callback,
344 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
345 proceed_one_lwp): Adjust to type change.
346
347 2017-07-10 Yao Qi <yao.qi@linaro.org>
348
349 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
350
351 2017-06-29 Yao Qi <yao.qi@linaro.org>
352
353 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
354 Remove.
355 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
356
357 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
358
359 * Makefile.in (IPA_OBJS): Sort and format one item per line.
360
361 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
362
363 * linux-low.c (linux_create_inferior): Adjust code to access the
364 environment information via 'gdb_environ' class.
365 * lynx-low.c (lynx_create_inferior): Likewise.
366 * server.c (our_environ): Make it an instance of 'gdb_environ'.
367 (get_environ): Return a pointer to 'our_environ'.
368 (captured_main): Initialize 'our_environ'.
369 * server.h (get_environ): Adjust prototype.
370 * spu-low.c (spu_create_inferior): Adjust code to access the
371 environment information via 'gdb_environ' class.
372
373 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
374
375 * linux-low.c (linux_read_memory, linux_write_memory): Remove
376 usage of "register" keyword.
377
378 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
379
380 * configure: Re-generate.
381
382 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
383
384 * configure: Re-generate.
385
386 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
387
388 * Makefile.in (COMPILE.pre): Add "-x c++".
389
390 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
391
392 * fork-child.c: Conditionally include <signal.h>.
393
394 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
395
396 * server.c (handle_general_set): Handle new packet
397 "QStartupWithShell".
398 (handle_query): Add "QStartupWithShell" to the list of supported
399 packets.
400 (gdbserver_usage): Add help text explaining the
401 new "--startup-with-shell" and "--no-startup-with-shell" CLI
402 options.
403 (captured_main): Recognize and act upon the presence of the new
404 CLI options.
405
406 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
407 Pedro Alves <palves@redhat.com>
408
409 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
410 * configure: Regenerate.
411 * configure.srv (srv_linux_obj): Add "fork-child.o" and
412 "fork-inferior.o".
413 (i[34567]86-*-lynxos*): Likewise.
414 (spu*-*-*): Likewise.
415 * fork-child.c: New file.
416 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
417 and "environ.h".
418 (linux_ptrace_fun): New function.
419 (linux_create_inferior): Adjust function prototype to reflect
420 change on "target.h". Adjust function code to use
421 "fork_inferior".
422 (linux_request_interrupt): Delete "signal_pid".
423 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
424 (lynx_ptrace_fun): New function.
425 (lynx_create_inferior): Adjust function prototype to reflect
426 change on "target.h". Adjust function code to use
427 "fork_inferior".
428 * nto-low.c (nto_create_inferior): Adjust function prototype and
429 code to reflect change on "target.h". Update comments.
430 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
431 "common-terminal.h" and "environ.h".
432 (terminal_fd): Moved to fork-child.c.
433 (old_foreground_pgrp): Likewise.
434 (restore_old_foreground_pgrp): Likewise.
435 (last_status): Make it global.
436 (last_ptid): Likewise.
437 (our_environ): New variable.
438 (startup_with_shell): Likewise.
439 (program_name): Likewise.
440 (program_argv): Rename to...
441 (program_args): ...this.
442 (wrapper_argv): New variable.
443 (start_inferior): Delete function.
444 (get_exec_wrapper): New function.
445 (get_exec_file): Likewise.
446 (get_environ): Likewise.
447 (prefork_hook): Likewise.
448 (post_fork_inferior): Likewise.
449 (postfork_hook): Likewise.
450 (postfork_child_hook): Likewise.
451 (handle_v_run): Update code to deal with arguments coming from the
452 remote host. Update calls from "start_inferior" to
453 "create_inferior".
454 (captured_main): Likewise. Initialize environment variable. Call
455 "have_job_control".
456 * server.h (post_fork_inferior): New prototype.
457 (get_environ): Likewise.
458 (last_status): Declare.
459 (last_ptid): Likewise.
460 (signal_pid): Likewise.
461 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
462 (spu_ptrace_fun): New function.
463 (spu_create_inferior): Adjust function prototype to reflect change
464 on "target.h". Adjust function code to use "fork_inferior".
465 * target.c (target_terminal_init): New function.
466 (target_terminal_inferior): Likewise.
467 (target_terminal_ours): Likewise.
468 * target.h: Include <vector>.
469 (struct target_ops) <create_inferior>: Update prototype.
470 (create_inferior): Update macro.
471 * utils.c (gdb_flush_out_err): New function.
472 * win32-low.c (win32_create_inferior): Adjust function prototype
473 and code to reflect change on "target.h".
474
475 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
476
477 * inferiors.c (switch_to_thread): New function.
478
479 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
480
481 * Makefile.in (SFILE): Add "common/job-control.c".
482 (OBS): Add "job-control.o".
483
484 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
485
486 * Makefile: Remove "@host_makefile_frag@".
487
488 2017-05-05 Pedro Alves <palves@redhat.com>
489
490 * configure: Regenerate.
491
492 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
493
494 * configure: Regenerate.
495
496 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
497
498 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
499 software_single_step change of return type to
500 std::vector<CORE_ADDR>.
501 * linux-low.c (install_software_single_step_breakpoints):
502 Likewise.
503 * linux-low.h (install_software_single_step_breakpoints):
504 Likewise.
505
506 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
507
508 * remote-utils.c: Include "gdb_termios.h" instead of
509 "terminal.h".
510 * terminal.h: Delete file.
511
512 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
513
514 * server.c: Include <vector>.
515 <program_argv, wrapper_argv>: Convert to std::vector.
516 (start_inferior): Rewrite function to use C++.
517 (handle_v_run): Likewise. Update code that calculates the argv
518 based on the vRun packet; use C++.
519 (captured_main): Likewise.
520
521 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
522
523 * server.c (handle_v_cont): Initialize thread_resume::thread
524 with null_ptid.
525
526 2017-04-05 Pedro Alves <palves@redhat.com>
527
528 * configure: Regenerate.
529
530 2017-04-05 Pedro Alves <palves@redhat.com>
531
532 * gdbreplay.c (sync_error): Constify.
533 * linux-x86-low.c (push_opcode): Constify.
534
535 2017-04-05 Pedro Alves <palves@redhat.com>
536
537 * win32-low.c (get_child_debug_event)
538 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
539 Report TARGET_WAITKIND_SPURIOUS instead.
540
541 2017-04-05 Pedro Alves <palves@redhat.com>
542
543 * remote-utils.c (remote_prepare, remote_open): Constify.
544 * remote-utils.h (remote_prepare, remote_open): Constify.
545 * server.c (captured_main): Constify 'port' handling.
546
547 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
548
549 * Makefile.in (clean): Clear .deps.
550
551 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
552
553 * .gitignore: Remove generated files, replace with wildcard.
554 * (clean): Replace removal of generated files with wildcard.
555 (version.c): Replace with...
556 (version-generated.c): ...this.
557 (xml-builtin.c): Replace with...
558 (xml-builtin-generated.c): ...this.
559 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
560 (%.c: *regformats*): Replace with...
561 (%-generated.c: *regformats*): ...this.
562
563 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
564
565 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
566 (xtensa_fill_gregset): Call collect_register_by_name for
567 threadptr register.
568 (xtensa_store_gregset): Call supply_register_by_name for
569 threadptr register.
570
571 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
572
573 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
574 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
575 (xtensa_store_gregset): Call supply_register for all registers in
576 a0_regnum..a0_regnum + C0_NREGS range.
577
578 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
579
580 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
581 (ax-ipa.o: ax.c): Remove.
582 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
583 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
584 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
585 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
586 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
587
588 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
589
590 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
591 (print-utils-ipa.o: ../common/print-utils.c): Remove.
592 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
593 (errors-ipa.o: ../common/errors.c): Remove.
594 (format-ipa.o: ../common/format.c): Remove.
595 (common-utils-ipa.o: ../common/common-utils.c): Remove.
596
597 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
598
599 * Makefile.in (%-ipa.o: %.c): New rule.
600 (tracepoint-ipa.o: tracepoint.c): Remove.
601 (utils-ipa.o: utils.c): Remove.
602 (remote-utils-ipa.o: remote-utils.c): Remove.
603 (regcache-ipa.o: regcache.c): Remove.
604 (i386-linux-ipa.o: i386-linux.c): Remove.
605 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
606 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
607 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
608 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
609 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
610 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
611 (amd64-linux-ipa.o: amd64-linux.c): Remove.
612 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
613 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
614 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
615 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
616 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
617 (aarch64-ipa.o: aarch64.c): Remove.
618 (s390-linux32-ipa.o: s390-linux32.c): Remove.
619 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
620 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
621 (s390-linux64-ipa.o: s390-linux64.c): Remove.
622 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
623 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
624 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
625 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
626 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
627 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
628 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
629 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
630 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
631 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
632 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
633 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
634 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
635 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
636 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
637 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
638 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
639 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
640 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
641 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
642 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
643 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
644 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
645 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
646 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
647 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
648 (tdesc-ipa.o: tdesc.c): Remove.
649 (x32-linux-ipa.o: x32-linux.c): Remove.
650 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
651 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
652
653 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * Makefile.in (%.o: ../arch/%.c): New rule.
656 (arm.o: ../arch/arm.c): Remove.
657 (arm-linux.o: ../arch/arm-linux.c): Remove.
658 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
659 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
660
661 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
662
663 * Makefile.in (%.o: ../nat/%.c): New rule.
664 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
665 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
666 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
667 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
668 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
669 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
670 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
671 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
672 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
673 (linux-personality.o: ../nat/linux-personality.c): Remove.
674 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
675 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
676 (x86-linux.o: ../nat/x86-linux.c): Remove.
677 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
678 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
679
680 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
681
682 * Makefile.in (%.o: ../common/%.c): New rule.
683 (signals.o: ../common/signals.c): Remove.
684 (print-utils.o: ../common/print-utils.c): Remove.
685 (rsp-low.o: ../common/rsp-low.c): Remove.
686 (common-utils.o: ../common/common-utils.c): Remove.
687 (posix-strerror.o: ../common/posix-strerror.c): Remove.
688 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
689 (vec.o: ../common/vec.c): Remove.
690 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
691 (xml-utils.o: ../common/xml-utils.c): Remove.
692 (ptid.o: ../common/ptid.c): Remove.
693 (buffer.o: ../common/buffer.c): Remove.
694 (format.o: ../common/format.c): Remove.
695 (filestuff.o: ../common/filestuff.c): Remove.
696 (agent.o: ../common/agent.c): Remove.
697 (errors.o: ../common/errors.c): Remove.
698 (environ.o: ../common/environ.c): Remove.
699 (common-debug.o: ../common/common-debug.c): Remove.
700 (cleanups.o: ../common/cleanups.c): Remove.
701 (common-exceptions.o: ../common/common-exceptions.c): Remove.
702 (fileio.o: ../common/fileio.c): Remove.
703 (common-regcache.o: ../common/common-regcache.c): Remove.
704 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
705 (new-op.o: ../common/new-op.c): Remove.
706 (btrace-common.o: ../common/btrace-common.c): Remove.
707
708 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
709
710 * Makefile.in (%.o: ../target/%.c): New rule.
711 (waitstatus.o: ../target/waitstatus.c): Remove.
712
713 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
714
715 * Makefile.in
716 (%.c: ../regformats/%.dat,
717 (%.c: ../regformats/arm/%.dat,
718 (%.c: ../regformats/i386/%.dat,
719 (%.c: ../regformats/rs6000/%.dat): New rules.
720 (aarch64.c): Remove.
721 (reg-arm.c): Remove.
722 (arm-with-iwmmxt.c): Remove.
723 (arm-with-vfpv2.c): Remove.
724 (arm-with-vfpv3.c): Remove.
725 (arm-with-neon.c): Remove.
726 (reg-bfin.c): Remove.
727 (reg-cris.c): Remove.
728 (reg-crisv32.c): Remove.
729 (i386.c): Remove.
730 (i386-linux.c): Remove.
731 (i386-avx.c): Remove.
732 (i386-avx-linux.c): Remove.
733 (i386-avx-avx512.c): Remove.
734 (i386-avx-avx512-linux.c): Remove.
735 (i386-mpx.c): Remove.
736 (i386-mpx-linux.c): Remove.
737 (i386-avx-mpx-avx512-pku.c): Remove.
738 (i386-avx-mpx-avx512-pku-linux.c): Remove.
739 (i386-avx-mpx.c): Remove.
740 (i386-avx-mpx-linux.c): Remove.
741 (i386-mmx.c): Remove.
742 (i386-mmx-linux.c): Remove.
743 (reg-ia64.c): Remove.
744 (reg-m32r.c): Remove.
745 (reg-m68k.c): Remove.
746 (reg-cf.c): Remove.
747 (mips-linux.c): Remove.
748 (mips-dsp-linux.c): Remove.
749 (mips64-linux.c): Remove.
750 (mips64-dsp-linux.c): Remove.
751 (nios2-linux.c): Remove.
752 (powerpc-32.c): Remove.
753 (powerpc-32l.c): Remove.
754 (powerpc-altivec32l.c): Remove.
755 (powerpc-cell32l.c): Remove.
756 (powerpc-vsx32l.c): Remove.
757 (powerpc-isa205-32l.c): Remove.
758 (powerpc-isa205-altivec32l.c): Remove.
759 (powerpc-isa205-vsx32l.c): Remove.
760 (powerpc-e500l.c): Remove.
761 (powerpc-64l.c): Remove.
762 (powerpc-altivec64l.c): Remove.
763 (powerpc-cell64l.c): Remove.
764 (powerpc-vsx64l.c): Remove.
765 (powerpc-isa205-64l.c): Remove.
766 (powerpc-isa205-altivec64l.c): Remove.
767 (powerpc-isa205-vsx64l.c): Remove.
768 (s390-linux32.c): Remove.
769 (s390-linux32v1.c): Remove.
770 (s390-linux32v2.c): Remove.
771 (s390-linux64.c): Remove.
772 (s390-linux64v1.c): Remove.
773 (s390-linux64v2.c): Remove.
774 (s390-te-linux64.c): Remove.
775 (s390-vx-linux64.c): Remove.
776 (s390-tevx-linux64.c): Remove.
777 (s390x-linux64.c): Remove.
778 (s390x-linux64v1.c): Remove.
779 (s390x-linux64v2.c): Remove.
780 (s390x-te-linux64.c): Remove.
781 (s390x-vx-linux64.c): Remove.
782 (s390x-tevx-linux64.c): Remove.
783 (tic6x-c64xp-linux.c): Remove.
784 (tic6x-c64x-linux.c): Remove.
785 (tic6x-c62x-linux.c): Remove.
786 (reg-sh.c): Remove.
787 (reg-sparc64.c): Remove.
788 (reg-spu.c): Remove.
789 (amd64.c): Remove.
790 (amd64-linux.c): Remove.
791 (amd64-avx.c): Remove.
792 (amd64-avx-linux.c): Remove.
793 (amd64-avx-avx512.c): Remove.
794 (amd64-avx-avx512-linux.c): Remove.
795 (amd64-mpx.c): Remove.
796 (amd64-mpx-linux.c): Remove.
797 (amd64-avx-mpx-avx512-pku.c): Remove.
798 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
799 (amd64-avx-mpx.c): Remove.
800 (amd64-avx-mpx-linux.c): Remove.
801 (x32.c): Remove.
802 (x32-linux.c): Remove.
803 (x32-avx.c): Remove.
804 (x32-avx-linux.c): Remove.
805 (x32-avx-avx512.c): Remove.
806 (x32-avx-avx512-linux.c): Remove.
807 (reg-xtensa.c): Remove.
808 (reg-tilegx.c): Remove.
809 (reg-tilegx32.c): Remove.
810
811 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
812
813 * Makefile.in (SFILES): Add "common/environ.c".
814 (OBJS): Add "common/environ.h".
815
816 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
817
818 * configure.ac: Check if the fs_base and gs_base members of
819 `struct user_regs_struct' exist.
820 * config.in: Regenerated.
821 * configure: Likewise.
822
823 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
824
825 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
826 target_read_memory.
827 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
828 (get_next_pcs_syscall_next_pc): Likewise.
829
830 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
831
832 * win32-i386-low.c: Fix incorrect reference to a couple source files.
833 * nto-x86-low.c: Likewise.
834
835 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
836
837 * Makefile.in: Include disable-implicit-rules.mk.
838
839 2016-11-23 Pedro Alves <palves@redhat.com>
840
841 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
842 (debug_vprintf): Use std::chrono::steady_clock instead of
843 gettimeofday. Use '.' instead of ':'.
844 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
845 (get_timestamp): Use std::chrono::steady_clock instead of
846 gettimeofday.
847
848 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
849
850 * Makefile.in: Fix whitespace formatting.
851
852 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
853
854 * Makefile.in (SFILES, OBS): Flatten list and order
855 alphabetically.
856
857 2016-11-23 Pedro Alves <palves@redhat.com>
858
859 * event-loop.c (handle_file_event): Use warning.
860 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
861 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
862 Use warning.
863
864 2016-11-23 Pedro Alves <palves@redhat.com>
865
866 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
867 output.
868 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
869 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
870 debug_printf and debug_flush for debug output.
871 * server.c (handle_general_set): Likewise.
872 * thread-db.c (try_thread_db_load): Use debug_printf for debug
873 output.
874
875 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
876
877 * Makefile.in (.c.o): Replace rule with ...
878 (%.o: %.c): ... this one.
879
880 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
881
882 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
883 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
884 make.
885 * configure.ac: Remove checks for the make program.
886 * configure: Re-generate.
887
888 2016-10-28 Pedro Alves <palves@redhat.com>
889
890 * Makefile.in (CXX_DIALECT): Get from configure.
891 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
892 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
893 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
894 * config.in: Regenerate.
895 * configure: Regenerate.
896
897 2016-10-27 Yao Qi <yao.qi@linaro.org>
898
899 * linux-low.c (linux_supports_range_stepping): Return true if
900 can_software_single_step return true.
901
902 2016-10-27 Yao Qi <yao.qi@linaro.org>
903
904 * inferiors.c (find_inferior_in_random): New function.
905 * inferiors.h (find_inferior_in_random): Declare.
906 * linux-low.c (linux_wait_for_event_filtered): Call
907 find_inferior_in_random instead of find_inferior.
908
909 2016-10-27 Yao Qi <yao.qi@linaro.org>
910
911 * linux-low.c (linux_wait_1): If single-step breakpoints are
912 inserted, remove them.
913
914 2016-10-26 Pedro Alves <palves@redhat.com>
915
916 * linux-low.c (handle_extended_wait): Link parent/child fork
917 threads.
918 (linux_wait_1): Unlink them.
919 (linux_set_resume_request): Ignore resume requests for
920 already-resumed and unhandled fork child threads.
921 * linux-low.h (struct lwp_info) <fork_relative>: New field.
922 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
923 New functions.
924 (handle_v_requests) <vCont>: Don't call require_running.
925 * server.h (in_queued_stop_replies): New declaration.
926
927 2016-10-24 Yao Qi <yao.qi@linaro.org>
928
929 PR server/20733
930 * linux-aarch64-low.c (append_insns): Cast the return value to
931 'uint32_t *'.
932
933 2016-10-10 Yao Qi <yao.qi@linaro.org>
934
935 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
936
937 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
938
939 * target.c (target_supports_multi_process): New function, moved
940 from...
941 * target.h (target_supports_multi_process): ... here. Remove
942 macro.
943
944 2016-10-05 Tom Tromey <tom@tromey.com>
945
946 PR remote/20655:
947 * tracepoint.c (handle_tracepoint_bkpts): Check
948 ipa_error_tracepoint, not ipa_stopping_tracepoint.
949
950 2016-10-05 Yao Qi <yao.qi@linaro.org>
951
952 * configure.srv: Update the path of arm-*.xml files.
953
954 2016-10-05 Terry Guo <terry.guo@arm.com>
955 Yao Qi <yao.qi@linaro.org>
956
957 * Makefile.in: Adjust the path of rules.
958 * configure.srv: Update the path of xml files.
959 * regformats/arm-with-iwmmxt.dat: Regenerated.
960 * regformats/arm-with-neon.dat: Likewise.
961 * regformats/arm-with-vfpv2.dat: Likewise.
962 * regformats/arm-with-vfpv3.dat Likewise.
963
964 2016-09-30 Yao Qi <yao.qi@linaro.org>
965
966 PR gdbserver/20627
967 * target.c (target_stop_and_wait): Don't call
968 target_continue_no_signal, use resume_stop instead.
969
970 2016-09-26 Yao Qi <yao.qi@linaro.org>
971
972 * linux-low.c (linux_wait_1): Call debug_exit.
973
974 2016-09-23 Pedro Alves <palves@redhat.com>
975
976 * Makefile.in (SFILES): Add common/new-op.c.
977 (OBS): Add common/new-op.o.
978 (new-op.o): New rule.
979
980 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
981
982 * .gitinore: Ignore more files.
983
984 2016-09-21 Yao Qi <yao.qi@linaro.org>
985
986 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
987 23.
988
989 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
990
991 * server.c (start_inferior): Call target_mourn_inferior instead of
992 mourn_inferior; pass ptid_t argument to it.
993 (resume): Likewise.
994 (handle_target_event): Likewise.
995 * target.c (target_mourn_inferior): New function.
996 * target.h (mourn_inferior): Delete macro.
997
998 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
999
1000 * linux-low.c (lwp_is_stepping): New function.
1001
1002 2016-09-06 Carl Love <cel@us.ibm.com>
1003
1004 * server.c (start_inferior): Fixed comment, requested comment change
1005 didn't get updated correctly. Removed reference to ptrace () call as
1006 it is only true on Linux systems.
1007
1008 2016-09-06 Carl Love <cel@us.ibm.com>
1009
1010 * server.c (start_inferior): Do not call
1011 function target_post_create_inferior () if the
1012 inferior process has already exited.
1013
1014 2016-09-05 Pedro Alves <palves@redhat.com>
1015
1016 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1017 (COMPILE.pre, CC_LD): Use CXX directly.
1018 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1019 * acinclude.m4: Don't include build-with-cxx.m4.
1020 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1021 * configure: Regenerate.
1022
1023 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1024
1025 PR gdb/19495
1026 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1027 call writing data to own_buf.
1028
1029 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1030
1031 * target.c (mywait): Call target_wait instead of
1032 the_target->wait.
1033 (target_wait): New function.
1034
1035 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1036
1037 * server.c (start_inferior): New variable 'ptid'. Replace calls
1038 to the_target->resume by target_continue{,_no_signal}, depending
1039 on the case.
1040 * target.c (target_stop_and_wait): Call target_continue_no_signal
1041 instead of the_target->resume.
1042 (target_continue): New function.
1043
1044 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1045
1046 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1047
1048 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1049
1050 PR server/20491
1051 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1052 ps_prochandle.
1053 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1054 * linux-arm-low.c (ps_get_thread_area): Likewise.
1055 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1056 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1057 * linux-mips-low.c (ps_get_thread_area): Likewise.
1058 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1059 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1060 * linux-x86-low.c (ps_get_thread_area): Likewise.
1061 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1062
1063 2016-08-19 Pedro Alves <palves@redhat.com>
1064
1065 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1066
1067 2016-08-19 Pedro Alves <palves@redhat.com>
1068
1069 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1070 comment. Use memcpy instead of casting through unsigned long.
1071
1072 2016-08-19 Pedro Alves <palves@redhat.com>
1073
1074 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1075 allocating around 0x80000000.
1076
1077 2016-08-19 Pedro Alves <palves@redhat.com>
1078
1079 PR gdb/20415
1080 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1081 (x32-avx512-linux-ipa.o): New rules.
1082 * configure.ac (x86_64-*-linux*): New x32 check.
1083 * configure.srv (ipa_x32_linux_regobj): New.
1084 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1085 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1086 descriptions.
1087 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1088 descriptions.
1089 * configure: Regenerate.
1090
1091 2016-08-09 Pedro Alves <palves@redhat.com>
1092
1093 PR gdb/18653
1094 * Makefile.in (OBS): Add signals-state-save-restore.o.
1095 (signals-state-save-restore.o): New rule.
1096 * config.in: Regenerate.
1097 * configure: Regenerate.
1098 * linux-low.c: Include "signals-state-save-restore.h".
1099 (linux_create_inferior): Call
1100 restore_original_signals_state.
1101 * server.c: Include "dispositions-save-restore.h".
1102 (captured_main): Call save_original_signals_state.
1103
1104 2016-08-05 Pedro Alves <palves@redhat.com>
1105
1106 * configure: Regenerate.
1107
1108 2016-08-04 Yao Qi <yao.qi@linaro.org>
1109
1110 * linux-low.c (regsets_fetch_inferior_registers): Check
1111 errno is ESRCH or not.
1112
1113 2016-08-02 Yao Qi <yao.qi@linaro.org>
1114
1115 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1116 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1117 (thread_db_load_search): Update.
1118 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1119 td_ta_set_event and td_ta_event_getmsg.
1120
1121 2016-07-26 Pedro Alves <palves@redhat.com>
1122
1123 PR server/20414
1124 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1125 of unsigned long for 64-bit registers and use uint32_t instead of
1126 unsigned int for 32-bit registers.
1127
1128 2016-07-26 Pedro Alves <palves@redhat.com>
1129
1130 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1131 to 'ptrace'.
1132
1133 2016-07-21 Tom Tromey <tom@tromey.com>
1134
1135 * configure: Rebuild.
1136
1137 2016-07-21 Yao Qi <yao.qi@linaro.org>
1138
1139 * mem-break.c (find_gdb_breakpoint): Cast bp to
1140 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1141
1142 2016-07-21 Yao Qi <yao.qi@linaro.org>
1143
1144 * server.c (handle_v_requests): Support s and S actions
1145 if target_supports_software_single_step return true.
1146
1147 2016-07-21 Yao Qi <yao.qi@linaro.org>
1148
1149 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1150 is resume_step, call maybe_hw_step.
1151 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1152 and unstop them.
1153 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1154 breakpoints or not.
1155 (proceed_one_lwp): If resume request is resume_step, install
1156 reinsert breakpoints and call maybe_hw_step.
1157
1158 2016-07-21 Yao Qi <yao.qi@linaro.org>
1159
1160 * linux-low.c (proceed_one_lwp): Declare.
1161 (linux_resume_one_thread): Remove local variable 'step'.
1162 Lift code enqueue signal. Call proceed_one_lwp instead of
1163 linux_resume_one_lwp.
1164
1165 2016-07-21 Yao Qi <yao.qi@linaro.org>
1166
1167 * linux-low.c (linux_resume_one_thread): Call
1168 enqueue_pending_signal.
1169
1170 2016-07-21 Yao Qi <yao.qi@linaro.org>
1171
1172 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1173 * inferiors.c (do_restore_current_thread_cleanup): New function.
1174 (make_cleanup_restore_current_thread): Likewise.
1175 * linux-low.c (install_software_single_step_breakpoints): Call
1176 make_cleanup_restore_current_thread. Switch current_thread to
1177 thread.
1178
1179 2016-07-21 Yao Qi <yao.qi@linaro.org>
1180
1181 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1182 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1183 (clone_one_breakpoint): Likewise.
1184 (delete_reinsert_breakpoints): Change parameter to thread.
1185 Callers updated.
1186 (has_reinsert_breakpoints): Likewise.
1187 (uninsert_reinsert_breakpoints): Likewise.
1188 (reinsert_reinsert_breakpoints): Likewise.
1189 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1190 (delete_reinsert_breakpoints): Likewise.
1191 (reinsert_reinsert_breakpoints): Likewise.
1192 (uninsert_reinsert_breakpoints): Likewise.
1193 (has_reinsert_breakpoints): Likewise.
1194
1195 2016-07-21 Yao Qi <yao.qi@linaro.org>
1196
1197 * inferiors.c (get_thread_process): Make parameter const.
1198 * inferiors.h (get_thread_process): Update declaration.
1199 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1200 Add new parameters child_thread and parent_thread. Callers
1201 updated.
1202 * mem-break.h (clone_all_breakpoints): Update declaration.
1203
1204 2016-07-21 Yao Qi <yao.qi@linaro.org>
1205
1206 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1207 <command_list, handler>: Remove.
1208 (struct gdb_breakpoint): New.
1209 (struct other_breakpoint): New.
1210 (struct reinsert_breakpoint): New.
1211 (is_gdb_breakpoint): New function.
1212 (any_persistent_commands): Update command_list if
1213 is_gdb_breakpoint returns true.
1214 (set_breakpoint): Create breakpoints according to their types.
1215 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1216 (set_gdb_breakpoint_1): Likewise.
1217 (set_gdb_breakpoint): Likewise.
1218 (clear_breakpoint_conditions): Change parameter type to
1219 'struct gdb_breakpoint *'.
1220 (clear_breakpoint_commands): Likewise.
1221 (clear_breakpoint_conditions_and_commands): Likewise.
1222 (add_condition_to_breakpoint): Likewise.
1223 (add_breakpoint_condition): Likewise.
1224 (add_commands_to_breakpoint): Likewise.
1225 (check_breakpoints): Check other_breakpoint.
1226 (clone_one_breakpoint): Clone breakpopint according to its type.
1227 * mem-break.h (struct gdb_breakpoint): Declare.
1228 (set_gdb_breakpoint): Update declaration.
1229 (clear_breakpoint_conditions_and_commands): Likewise.
1230 (add_breakpoint_condition): Likewise.
1231 (add_breakpoint_commands): Likewise.
1232 * server.c (process_point_options): Change parameter type to
1233 'struct gdb_breakpoint *'.
1234
1235 2016-07-21 Yao Qi <yao.qi@linaro.org>
1236
1237 * mem-break.c (set_breakpoint_at): Rename it to ...
1238 (set_breakpoint_type_at): ... it.
1239 (set_breakpoint_at): Call set_breakpoint_type_at.
1240 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1241 * mem-break.h (set_breakpoint_at): Update comments.
1242
1243 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1244
1245 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1246 to buf parameter.
1247 (nios2_store_gregset): Likewise.
1248
1249 2016-07-01 Pedro Alves <palves@redhat.com>
1250 Antoine Tremblay <antoine.tremblay@ericsson.com>
1251
1252 * linux-low.c: Change interface to take the target lwp_info
1253 pointer directly and return void. Handle detaching from a zombie
1254 thread.
1255 (linux_detach_lwp_callback): New function.
1256 (linux_detach): Detach from the leader thread after detaching from
1257 the clone threads.
1258
1259 2016-06-28 Yao Qi <yao.qi@linaro.org>
1260
1261 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1262 for variable new_offset.
1263 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1264 (aarch64_ftrace_insn_reloc_cb): Likewise.
1265 (aarch64_ftrace_insn_reloc_tb): Likewise.
1266 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1267 PRIx64 instead of PRIx32.
1268
1269 2016-06-28 Yao Qi <yao.qi@linaro.org>
1270
1271 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1272 (the_low_target): Install arm_get_syscall_trapinfo.
1273
1274 2016-06-28 Yao Qi <yao.qi@linaro.org>
1275
1276 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1277 function.
1278 (the_low_target): Install aarch64_get_syscall_trapinfo.
1279
1280 2016-06-28 Yao Qi <yao.qi@linaro.org>
1281
1282 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1283 Callers updated.
1284 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1285 Remove parameter sysno.
1286 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1287 sysret.
1288
1289 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1290
1291 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1292 (s390_emit_ne_goto): Likewise.
1293 (s390_emit_lt_goto): Likewise.
1294 (s390_emit_le_goto): Likewise.
1295 (s390_emit_gt_goto): Likewise.
1296 (s390_emit_ge_goto): Likewise.
1297 (s390x_emit_eq_goto): Likewise.
1298 (s390x_emit_ne_goto): Likewise.
1299 (s390x_emit_lt_goto): Likewise.
1300 (s390x_emit_le_goto): Likewise.
1301 (s390x_emit_gt_goto): Likewise.
1302 (s390x_emit_ge_goto): Likewise.
1303 (s390_emit_ops_impl): Mark variable static.
1304 (s390x_emit_ops): Likewise.
1305
1306 2016-06-17 Yao Qi <yao.qi@linaro.org>
1307
1308 * linux-low.c (handle_extended_wait): Call
1309 uninsert_reinsert_breakpoints for the parent process. Remove
1310 reinsert breakpoints from the child process. Reinsert them to
1311 the parent process when vfork is done.
1312 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1313 (reinsert_reinsert_breakpoints): New function.
1314 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1315 (reinsert_reinsert_breakpoints): Declare.
1316
1317 2016-06-17 Yao Qi <yao.qi@linaro.org>
1318
1319 * linux-low.c (handle_extended_wait): If the parent is doing
1320 step-over, remove the reinsert breakpoints from the forked child.
1321
1322 2016-06-17 Yao Qi <yao.qi@linaro.org>
1323
1324 * linux-low.c (unsuspend_all_lwps): Declare.
1325 (linux_low_filter_event): If thread exited, call finish_step_over.
1326 If step-over is finished, unsuspend other threads.
1327
1328 2016-06-17 Yao Qi <yao.qi@linaro.org>
1329
1330 * linux-low.c (linux_resume_one_lwp_throw): Assert
1331 has_reinsert_breakpoints returns false.
1332 * mem-break.c (delete_disabled_breakpoints): Assert
1333 bp type isn't reinsert_breakpoint.
1334
1335 2016-06-17 Yao Qi <yao.qi@linaro.org>
1336
1337 * linux-low.c (maybe_hw_step): New function.
1338 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1339 (finish_step_over): Switch current_thread to lwp temporarily,
1340 and assert has_reinsert_breakpoints returns true.
1341 (proceed_one_lwp): Call maybe_hw_step.
1342 * mem-break.c (has_reinsert_breakpoints): New function.
1343 * mem-break.h (has_reinsert_breakpoints): Declare.
1344
1345 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1346
1347 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1348
1349 2016-05-17 Yao Qi <yao.qi@linaro.org>
1350
1351 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1352 instead of find_inferior.
1353
1354 2016-05-05 Yao Qi <yao.qi@linaro.org>
1355
1356 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1357 Initialize res to zero.
1358
1359 2016-05-05 Yao Qi <yao.qi@linaro.org>
1360
1361 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1362 to uint32_t.
1363
1364 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1365
1366 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1367 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1368 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1369
1370 2016-04-28 Par Olsson <par.olsson@windriver.com>
1371 Simon Marchi <simon.marchi@ericsson.com>
1372
1373 * tracepoint.c (write_inferior_int8): New function.
1374 (cmd_qtenable_disable): Write enable flag using
1375 write_inferior_int8.
1376
1377 2016-04-25 Yao Qi <yao.qi@linaro.org>
1378
1379 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1380 (need_step_over_p): Return zero if the LWP has pending signals
1381 can be delivered on software single step target.
1382
1383 2016-04-25 Yao Qi <yao.qi@linaro.org>
1384
1385 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1386 return instead of error.
1387
1388 2016-04-22 Yao Qi <yao.qi@linaro.org>
1389
1390 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1391 to 23.
1392
1393 2016-04-22 Yao Qi <yao.qi@linaro.org>
1394
1395 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1396 signal when stepping over breakpoint with software single
1397 step.
1398
1399 2016-04-21 Pedro Alves <palves@redhat.com>
1400
1401 * linux-s390-low.c (s390_collect_ptrace_register)
1402 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1403 add casts.
1404 (s390_check_regset): Use void * instead of gdb_byte *.
1405
1406 2016-04-20 Pedro Alves <palves@redhat.com>
1407
1408 * configure: Renegerate.
1409
1410 2016-04-20 Yao Qi <yao.qi@linaro.org>
1411
1412 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1413 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1414 number 16.
1415 (arm_store_gregset): Likewise.
1416
1417 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1418
1419 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1420 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1421 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1422 (amd64-avx-mpx-linux.c): New rules.
1423 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1424 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1425 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1426 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1427 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1428 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1429 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1430 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1431 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1432 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1433 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1434 * linux-x86-low.c (x86_linux_read_description): Add case for
1435 X86_XSTATE_AVX_MPX_MASK.
1436 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1437 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1438 init_registers_i386_avx_mpx_linux.
1439 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1440 (initialize_low_tracepoint): Call
1441 init_registers_i386_avx_mpx_linux.
1442 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1443 (initialize_low_tracepoint): Call
1444 init_registers_amd64_avx_mpx_linux.
1445 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1446 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1447 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1448 declarations.
1449
1450 2016-04-18 Pedro Alves <palves@redhat.com>
1451
1452 * configure: Regenerate.
1453
1454 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1455
1456 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1457 (aarch64_emit_sub): Likewise.
1458
1459 2016-04-12 Pedro Alves <palves@redhat.com>
1460
1461 * utils.c (prepare_to_throw_exception): Delete.
1462
1463 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1464
1465 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1466
1467 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1468
1469 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1470
1471 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1472
1473 * linux-aarch64-ipa.c: Add <elf.h> include.
1474 * linux-ppc-ipa.c: Add <elf.h> include.
1475 * linux-s390-ipa.c: Add <elf.h> include.
1476
1477 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1478
1479 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1480 (get_raw_reg_ptr): Likewise.
1481 (get_trace_state_variable_value_ptr): Likewise.
1482 (set_trace_state_variable_value_ptr): Likewise.
1483 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1484 char *.
1485
1486 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1487 Marcin Kościelnicki <koriakin@0x04.net>
1488
1489 PR/17221
1490 * linux-ppc-low.c (emit_insns): New function.
1491 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1492 (ppc_emit_prologue): New function.
1493 (ppc_emit_epilogue): New function.
1494 (ppc_emit_add): New function.
1495 (ppc_emit_sub): New function.
1496 (ppc_emit_mul): New function.
1497 (ppc_emit_lsh): New function.
1498 (ppc_emit_rsh_signed): New function.
1499 (ppc_emit_rsh_unsigned): New function.
1500 (ppc_emit_ext): New function.
1501 (ppc_emit_zero_ext): New function.
1502 (ppc_emit_log_not): New function.
1503 (ppc_emit_bit_and): New function.
1504 (ppc_emit_bit_or): New function.
1505 (ppc_emit_bit_xor): New function.
1506 (ppc_emit_bit_not): New function.
1507 (ppc_emit_equal): New function.
1508 (ppc_emit_less_signed): New function.
1509 (ppc_emit_less_unsigned): New function.
1510 (ppc_emit_ref): New function.
1511 (ppc_emit_const): New function.
1512 (ppc_emit_reg): New function.
1513 (ppc_emit_pop): New function.
1514 (ppc_emit_stack_flush): New function.
1515 (ppc_emit_swap): New function.
1516 (ppc_emit_stack_adjust): New function.
1517 (ppc_emit_call): New function.
1518 (ppc_emit_int_call_1): New function.
1519 (ppc_emit_void_call_2): New function.
1520 (ppc_emit_if_goto): New function.
1521 (ppc_emit_goto): New function.
1522 (ppc_emit_eq_goto): New function.
1523 (ppc_emit_ne_goto): New function.
1524 (ppc_emit_lt_goto): New function.
1525 (ppc_emit_le_goto): New function.
1526 (ppc_emit_gt_goto): New function.
1527 (ppc_emit_ge_goto): New function.
1528 (ppc_write_goto_address): New function.
1529 (ppc_emit_ops_impl): New static variable.
1530 (ppc64v1_emit_prologue): New function.
1531 (ppc64v2_emit_prologue): New function.
1532 (ppc64_emit_epilogue): New function.
1533 (ppc64_emit_add): New function.
1534 (ppc64_emit_sub): New function.
1535 (ppc64_emit_mul): New function.
1536 (ppc64_emit_lsh): New function.
1537 (ppc64_emit_rsh_signed): New function.
1538 (ppc64_emit_rsh_unsigned): New function.
1539 (ppc64_emit_ext): New function.
1540 (ppc64_emit_zero_ext): New function.
1541 (ppc64_emit_log_not): New function.
1542 (ppc64_emit_bit_and): New function.
1543 (ppc64_emit_bit_or): New function.
1544 (ppc64_emit_bit_xor): New function.
1545 (ppc64_emit_bit_not): New function.
1546 (ppc64_emit_equal): New function.
1547 (ppc64_emit_less_signed): New function.
1548 (ppc64_emit_less_unsigned): New function.
1549 (ppc64_emit_ref): New function.
1550 (ppc64_emit_const): New function.
1551 (ppc64v1_emit_reg): New function.
1552 (ppc64v2_emit_reg): New function.
1553 (ppc64_emit_pop): New function.
1554 (ppc64_emit_stack_flush): New function.
1555 (ppc64_emit_swap): New function.
1556 (ppc64v1_emit_call): New function.
1557 (ppc64v2_emit_call): New function.
1558 (ppc64v1_emit_int_call_1): New function.
1559 (ppc64v2_emit_int_call_1): New function.
1560 (ppc64v1_emit_void_call_2): New function.
1561 (ppc64v2_emit_void_call_2): New function.
1562 (ppc64_emit_if_goto): New function.
1563 (ppc64_emit_eq_goto): New function.
1564 (ppc64_emit_ne_goto): New function.
1565 (ppc64_emit_lt_goto): New function.
1566 (ppc64_emit_le_goto): New function.
1567 (ppc64_emit_gt_goto): New function.
1568 (ppc64_emit_ge_goto): New function.
1569 (ppc64v1_emit_ops_impl): New static variable.
1570 (ppc64v2_emit_ops_impl): New static variable.
1571 (ppc_emit_ops): New function.
1572 (linux_low_target): Wire in ppc_emit_ops.
1573
1574 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1575 Marcin Kościelnicki <koriakin@0x04.net>
1576
1577 PR/17221
1578 * Makefile.in: Add powerpc-*-ipa.o
1579 * configure.srv: Add ipa_obj for powerpc*-linux.
1580 * linux-ppc-ipa.c: New file.
1581 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1582 includes.
1583 (PPC_FIELD): New macro.
1584 (PPC_SEXT): New macro.
1585 (PPC_OP6): New macro.
1586 (PPC_BO): New macro.
1587 (PPC_LI): New macro.
1588 (PPC_BD): New macro.
1589 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1590 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1591 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1592 (ppc_get_thread_area): New function.
1593 (is_elfv2_inferior): New function.
1594 (gen_ds_form): New function.
1595 (GEN_STD): New macro.
1596 (GEN_STDU): New macro.
1597 (GEN_LD): New macro.
1598 (GEN_LDU): New macro.
1599 (gen_d_form): New function.
1600 (GEN_ADDI): New macro.
1601 (GEN_ADDIS): New macro.
1602 (GEN_LI): New macro.
1603 (GEN_LIS): New macro.
1604 (GEN_ORI): New macro.
1605 (GEN_ORIS): New macro.
1606 (GEN_LWZ): New macro.
1607 (GEN_STW): New macro.
1608 (GEN_STWU): New macro.
1609 (gen_xfx_form): New function.
1610 (GEN_MFSPR): New macro.
1611 (GEN_MTSPR): New macro.
1612 (GEN_MFCR): New macro.
1613 (GEN_MTCR): New macro.
1614 (GEN_SYNC): New macro.
1615 (GEN_LWSYNC): New macro.
1616 (gen_x_form): New function.
1617 (GEN_OR): New macro.
1618 (GEN_MR): New macro.
1619 (GEN_LWARX): New macro.
1620 (GEN_STWCX): New macro.
1621 (GEN_CMPW): New macro.
1622 (gen_md_form): New function.
1623 (GEN_RLDICL): New macro.
1624 (GEN_RLDICR): New macro.
1625 (gen_i_form): New function.
1626 (GEN_B): New macro.
1627 (GEN_BL): New macro.
1628 (gen_b_form): New function.
1629 (GEN_BNE): New macro.
1630 (GEN_LOAD): New macro.
1631 (GEN_STORE): New macro.
1632 (gen_limm): New function.
1633 (gen_atomic_xchg): New function.
1634 (gen_call): New function.
1635 (ppc_relocate_instruction): New function.
1636 (ppc_install_fast_tracepoint_jump_pad): New function.
1637 (ppc_get_min_fast_tracepoint_insn_len): New function.
1638 (ppc_get_ipa_tdesc_idx): New function.
1639 (the_low_target): Wire in the new functions.
1640 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1641 tdescs.
1642 * linux-ppc-tdesc.h: New file.
1643
1644 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1645
1646 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1647 (alloc_jump_pad_buffer): New function.
1648 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1649 (alloc_jump_pad_buffer): New function.
1650 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1651 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1652 (alloc_jump_pad_buffer): New function.
1653 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1654 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1655 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1656 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1657
1658 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1659
1660 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1661 * linux-amd64-ipa.c: Likewise.
1662 * linux-i386-ipa.c: Likewise.
1663 * linux-s390-ipa.c: Likewise.
1664 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1665 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1666 set_trace_state_variable_value_ptr.
1667 (struct ipa_sym_addresses): Likewise.
1668 (symbol_list): Likewise.
1669 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1670 accessing gdb_collect directly.
1671 (gdb_collect_ptr_type): New typedef.
1672 (get_raw_reg_ptr_type): New typedef.
1673 (get_trace_state_variable_value_ptr_type): New typedef.
1674 (set_trace_state_variable_value_ptr_type): New typedef.
1675 (gdb_collect_ptr): New global.
1676 (get_raw_reg_ptr): New global.
1677 (get_trace_state_variable_value_ptr): New global.
1678 (set_trace_state_variable_value_ptr): New global.
1679 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1680 accessing get_raw_reg directly.
1681 (get_get_tsv_func_addr): Likewise for
1682 get_trace_state_variable_value_ptr.
1683 (get_set_tsv_func_addr): Likewise for
1684 set_trace_state_variable_value_ptr.
1685 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1686
1687 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1688
1689 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1690
1691 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1692
1693 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1694 packets.
1695 (relocate_instruction): Remove own_buf.
1696 * server.c (own_buf): Make global.
1697 (handle_v_requests): Make global.
1698 * server.h (own_buf): New declaration.
1699 (handle_v_requests): New prototype.
1700
1701 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1702
1703 PR 18377
1704 * linux-s390-low.c (add_insns): New function.
1705 (s390_emit_prologue): New function.
1706 (s390_emit_epilogue): New function.
1707 (s390_emit_add): New function.
1708 (s390_emit_sub): New function.
1709 (s390_emit_mul): New function.
1710 (s390_emit_lsh): New function.
1711 (s390_emit_rsh_signed): New function.
1712 (s390_emit_rsh_unsigned): New function.
1713 (s390_emit_ext): New function.
1714 (s390_emit_log_not): New function.
1715 (s390_emit_bit_and): New function.
1716 (s390_emit_bit_or): New function.
1717 (s390_emit_bit_xor): New function.
1718 (s390_emit_bit_not): New function.
1719 (s390_emit_equal): New function.
1720 (s390_emit_less_signed): New function.
1721 (s390_emit_less_unsigned): New function.
1722 (s390_emit_ref): New function.
1723 (s390_emit_if_goto): New function.
1724 (s390_emit_goto): New function.
1725 (s390_write_goto_address): New function.
1726 (s390_emit_litpool): New function.
1727 (s390_emit_const): New function.
1728 (s390_emit_call): New function.
1729 (s390_emit_reg): New function.
1730 (s390_emit_pop): New function.
1731 (s390_emit_stack_flush): New function.
1732 (s390_emit_zero_ext): New function.
1733 (s390_emit_swap): New function.
1734 (s390_emit_stack_adjust): New function.
1735 (s390_emit_set_r2): New function.
1736 (s390_emit_int_call_1): New function.
1737 (s390_emit_void_call_2): New function.
1738 (s390_emit_eq_goto): New function.
1739 (s390_emit_ne_goto): New function.
1740 (s390_emit_lt_goto): New function.
1741 (s390_emit_le_goto): New function.
1742 (s390_emit_gt_goto): New function.
1743 (s390_emit_ge_goto): New function.
1744 (s390x_emit_prologue): New function.
1745 (s390x_emit_epilogue): New function.
1746 (s390x_emit_add): New function.
1747 (s390x_emit_sub): New function.
1748 (s390x_emit_mul): New function.
1749 (s390x_emit_lsh): New function.
1750 (s390x_emit_rsh_signed): New function.
1751 (s390x_emit_rsh_unsigned): New function.
1752 (s390x_emit_ext): New function.
1753 (s390x_emit_log_not): New function.
1754 (s390x_emit_bit_and): New function.
1755 (s390x_emit_bit_or): New function.
1756 (s390x_emit_bit_xor): New function.
1757 (s390x_emit_bit_not): New function.
1758 (s390x_emit_equal): New function.
1759 (s390x_emit_less_signed): New function.
1760 (s390x_emit_less_unsigned): New function.
1761 (s390x_emit_ref): New function.
1762 (s390x_emit_if_goto): New function.
1763 (s390x_emit_const): New function.
1764 (s390x_emit_call): New function.
1765 (s390x_emit_reg): New function.
1766 (s390x_emit_pop): New function.
1767 (s390x_emit_stack_flush): New function.
1768 (s390x_emit_zero_ext): New function.
1769 (s390x_emit_swap): New function.
1770 (s390x_emit_stack_adjust): New function.
1771 (s390x_emit_int_call_1): New function.
1772 (s390x_emit_void_call_2): New function.
1773 (s390x_emit_eq_goto): New function.
1774 (s390x_emit_ne_goto): New function.
1775 (s390x_emit_lt_goto): New function.
1776 (s390x_emit_le_goto): New function.
1777 (s390x_emit_gt_goto): New function.
1778 (s390x_emit_ge_goto): New function.
1779 (s390_emit_ops): New function.
1780 (struct linux_target_ops): Fill in emit_ops hook.
1781
1782 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1783
1784 PR 18377
1785 * Makefile.in: Add s390 IPA files.
1786 * configure.srv: Build IPA for s390.
1787 * linux-s390-ipa.c: New file.
1788 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1789 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1790 (tdesc_s390_linux32): Likewise.
1791 (init_registers_s390_linux32v1): Likewise.
1792 (tdesc_s390_linux32v1): Likewise.
1793 (init_registers_s390_linux32v2): Likewise.
1794 (tdesc_s390_linux32v2): Likewise.
1795 (init_registers_s390_linux64): Likewise.
1796 (tdesc_s390_linux64): Likewise.
1797 (init_registers_s390_linux64v1): Likewise.
1798 (tdesc_s390_linux64v1): Likewise.
1799 (init_registers_s390_linux64v2): Likewise.
1800 (tdesc_s390_linux64v2): Likewise.
1801 (init_registers_s390_te_linux64): Likewise.
1802 (tdesc_s390_te_linux64): Likewise.
1803 (init_registers_s390_vx_linux64): Likewise.
1804 (tdesc_s390_vx_linux64): Likewise.
1805 (init_registers_s390_tevx_linux64): Likewise.
1806 (tdesc_s390_tevx_linux64): Likewise.
1807 (init_registers_s390x_linux64): Likewise.
1808 (tdesc_s390x_linux64): Likewise.
1809 (init_registers_s390x_linux64v1): Likewise.
1810 (tdesc_s390x_linux64v1): Likewise.
1811 (init_registers_s390x_linux64v2): Likewise.
1812 (tdesc_s390x_linux64v2): Likewise.
1813 (init_registers_s390x_te_linux64): Likewise.
1814 (tdesc_s390x_te_linux64): Likewise.
1815 (init_registers_s390x_vx_linux64): Likewise.
1816 (tdesc_s390x_vx_linux64): Likewise.
1817 (init_registers_s390x_tevx_linux64): Likewise.
1818 (tdesc_s390x_tevx_linux64): Likewise.
1819 (have_hwcap_s390_vx): New static variable.
1820 (s390_arch_setup): Fill have_hwcap_s390_vx.
1821 (s390_get_thread_area): New function.
1822 (s390_ft_entry_gpr_esa): New const.
1823 (s390_ft_entry_gpr_zarch): New const.
1824 (s390_ft_entry_misc): New const.
1825 (s390_ft_entry_fr): New const.
1826 (s390_ft_entry_vr): New const.
1827 (s390_ft_main_31): New const.
1828 (s390_ft_main_64): New const.
1829 (s390_ft_exit_fr): New const.
1830 (s390_ft_exit_vr): New const.
1831 (s390_ft_exit_misc): New const.
1832 (s390_ft_exit_gpr_esa): New const.
1833 (s390_ft_exit_gpr_zarch): New const.
1834 (append_insns): New function.
1835 (s390_relocate_instruction): New function.
1836 (s390_install_fast_tracepoint_jump_pad): New function.
1837 (s390_get_min_fast_tracepoint_insn_len): New function.
1838 (s390_get_ipa_tdesc_idx): New function.
1839 (struct linux_target_ops): Wire in the above functions.
1840 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1841 * linux-s390-tdesc.h: New file.
1842
1843 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1844
1845 * linux-s390-low.c (s390_supports_tracepoints): New function.
1846 (struct linux_target_ops): Fill supports_tracepoints hook.
1847
1848 2016-03-18 Yao Qi <yao.qi@linaro.org>
1849
1850 * linux-low.c (lwp_signal_can_be_delivered): New function.
1851 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1852
1853 2016-03-18 Yao Qi <yao.qi@linaro.org>
1854
1855 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1856 0 if signal is enqueued. Remove 'signal' from one debugging
1857 message. Move one debugging message to some lines below.
1858 Remove code setting 'signal' to 0.
1859
1860 2016-03-18 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-low.c (linux_low_filter_event): Remove redundant
1863 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1864
1865 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1866
1867 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1868 (struct linux_target_ops): Wire in the above.
1869
1870 2016-03-03 Yao Qi <yao.qi@linaro.org>
1871
1872 * linux-low.c: Update comments to start_step_over.
1873
1874 2016-03-03 Yao Qi <yao.qi@linaro.org>
1875
1876 PR server/19736
1877 * linux-low.c (handle_extended_wait): Set child suspended
1878 if event_lwp->bp_reinsert isn't zero.
1879
1880 2016-03-02 Yao Qi <yao.qi@linaro.org>
1881
1882 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1883 enqueue_pending_signal.
1884
1885 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1886
1887 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1888 is actually loaded.
1889
1890 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1891
1892 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1893 (s390_regmap_3264) [!__s390x__]: New global.
1894 (s390_collect_ptrace_register): Skip map entries containing -1.
1895 (s390_supply_ptrace_register): Ditto.
1896 (s390_fill_gprs_high): New function.
1897 (s390_store_gprs_high): New function.
1898 (s390_regsets): Add NT_S390_HIGH_GPRS.
1899 (s390_get_hwcap): Enable on 31-bit.
1900 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1901 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1902 Detect NT_S390_HIGH_GPRS.
1903 (s390_usrregs_info_3264): Enable on 31-bit.
1904 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1905 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1906
1907 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1908
1909 PR gdb/13808
1910 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1911 * configure.srv: Ditto.
1912 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1913 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1914 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1915 (init_registers_amd64_linux): Remove prototype.
1916 (tdesc_amd64_linux): Remove declaration.
1917 (get_ipa_tdesc): New function.
1918 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1919 initialize remaining tdescs.
1920 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1921 (init_registers_i386_linux): Remove prototype.
1922 (tdesc_i386_linux): Remove declaration.
1923 (get_ipa_tdesc): New function.
1924 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1925 initialize remaining tdescs.
1926 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1927 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1928 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1929 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1930 (x86_get_ipa_tdesc_idx): New function.
1931 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1932 * linux-x86-tdesc.h: New file.
1933 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1934 (target_get_ipa_tdesc_idx): New macro.
1935 * tracepoint.c (ipa_tdesc_idx): New macro.
1936 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1937 (symbol_list): Add ipa_tdesc_idx.
1938 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1939 (ipa_tdesc): Remove.
1940 (ipa_tdesc_idx): New variable.
1941 (get_context_regcache): Use get_ipa_tdesc.
1942 (gdb_collect): Ditto.
1943 (gdb_probe): Ditto.
1944 * tracepoint.h (get_ipa_tdesc): New prototype.
1945 (ipa_tdesc): Remove.
1946
1947 2016-02-24 Pedro Alves <palves@redhat.com>
1948
1949 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1950 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1951 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1952 Factor out common code between the USE_SIGTRAP_SIGINFO and
1953 !USE_SIGTRAP_SIGINFO blocks.
1954 (linux_low_filter_event): Call save_stop_reason instead of
1955 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1956 Update comments.
1957 (linux_wait_1): Update comments.
1958
1959 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1960
1961 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1962 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1963 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1964 ppc_insert_point, ppc_remove_point.
1965
1966 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1967
1968 * linux-s390-low.c (s390_supports_z_point_type): New function.
1969 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1970
1971 2016-02-16 Yao Qi <yao.qi@linaro.org>
1972
1973 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1974 PC. Get pc from regcache_read_pc.
1975
1976 2016-02-12 Yao Qi <yao.qi@linaro.org>
1977
1978 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1979 or linux_get_pc_32bit.
1980 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1981
1982 2016-02-12 Yao Qi <yao.qi@linaro.org>
1983
1984 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1985 arm_linux_get_next_pcs_fixup.
1986
1987 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1988
1989 * tracepoint.c (x_tracepoint_action_download): Change
1990 write_inferior_data_ptr to write_inferior_data_pointer.
1991 (cmd_qtstart): Likewise.
1992 (write_inferior_data_ptr): Remove.
1993 (download_agent_expr): Change write_inferior_data_ptr to
1994 write_inferior_data_pointer.
1995 (download_tracepoint_1): Likewise.
1996 (download_tracepoint): Likewise.
1997 (download_trace_state_variables): Likewise.
1998
1999 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2000 Marcin Kościelnicki <koriakin@0x04.net>
2001
2002 * tracepoint.c (struct tracepoint_action_ops): Remove.
2003 (struct tracepoint_action): Remove ops.
2004 (m_tracepoint_action_download, r_tracepoint_action_download)
2005 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2006 size and offset accordingly.
2007 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2008 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2009 (tracepoint_action_send, tracepoint_action_download): New functions.
2010 Helpers for trace action handlers.
2011 (add_tracepoint_action): Remove setup actions ops.
2012 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2013
2014 2016-02-10 Yao Qi <yao.qi@linaro.org>
2015
2016 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2017
2018 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2019
2020 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2021 to AC_OUTPUT.
2022 * configure: Regenerate.
2023
2024 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2025
2026 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2027 void * to gdb_byte *.
2028 * linux-low.c (siginfo_fixup): Likewise.
2029 (linux_xfer_siginfo): Likewise.
2030 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2031 Likewise.
2032 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2033
2034 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2035
2036 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2037 to srv_tgtobj.
2038 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2039 to srv_tgtobj.
2040 * linux-x86-low.c [__x86_64__]: Include
2041 "nat/amd64-linux-siginfo.h".
2042 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2043 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2044 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2045 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2046 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2047 (cpt_si_fd, si_timerid, si_overrun): Move from
2048 nat/amd64-linux-siginfo.c.
2049 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2050
2051 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2052
2053 * server.c (skip_to_semicolon): Remove.
2054 (process_point_options): Use strchrnul instead of
2055 skip_to_semicolon.
2056
2057 2016-01-26 Yao Qi <yao.qi@linaro.org>
2058
2059 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2060 * linux-low.c (install_software_single_step_breakpoints): Don't
2061 call regcache_read_pc.
2062 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2063 argument pc.
2064
2065 2016-01-26 Yao Qi <yao.qi@linaro.org>
2066
2067 * linux-low.c (install_software_single_step_breakpoints): Call
2068 regcache_read_pc instead of get_pc.
2069
2070 2016-01-26 Yao Qi <yao.qi@linaro.org>
2071
2072 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2073 (unblock_async_io): Rename to ...
2074 (block_unblock_async_io): ... it. New function.
2075 (enable_async_io): Don't install SIGIO handler. Unblock it
2076 instead.
2077 (disable_async_io): Don't ignore SIGIO. Block it instead.
2078 (initialize_async_io): Install SIGIO handler. Don't call
2079 unblock_async_io.
2080
2081 2016-01-26 Yao Qi <yao.qi@linaro.org>
2082
2083 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2084 first character is '\003', call *the_target->request_interrupt.
2085
2086 2016-01-25 Yao Qi <yao.qi@linaro.org>
2087
2088 * remote-utils.c (new_thread_notify): Remove.
2089 (dead_thread_notify): Likewise.
2090 * remote-utils.h (new_thread_notify): Remove declaration.
2091 (dead_thread_notify): Likewise.
2092
2093 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2094
2095 * gdb.trace/pending.exp: Fix expected message on continue.
2096
2097 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2098
2099 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2100 it works properly on big-endian machines where sizeof (CORE_ADDR)
2101 != sizeof (void *).
2102
2103 2016-01-21 Pedro Alves <palves@redhat.com>
2104
2105 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2106 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2107 * configure: Regenerate.
2108
2109 2016-01-21 Yao Qi <yao.qi@linaro.org>
2110
2111 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2112 is_thumb and set it according to CPSR saved on the stack.
2113 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2114 arm_sigreturn_next_pc.
2115
2116 2016-01-18 Yao Qi <yao.qi@linaro.org>
2117
2118 * linux-low.c (linux_set_pc_64bit): New function.
2119 (linux_get_pc_64bit): New function.
2120 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2121 Declare.
2122 * linux-sparc-low.c (debug_threads): Remove declaration.
2123 (sparc_get_pc): Remove.
2124 (the_low_target): Use linux_get_pc_64bit instead of
2125 sparc_get_pc.
2126 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2127 (the_low_target): Use linux_get_pc_64bit and
2128 linux_set_pc_64bit.
2129
2130 2016-01-18 Yao Qi <yao.qi@linaro.org>
2131
2132 * linux-arm-low.c (debug_threads): Remove declaration.
2133 (arm_get_pc, arm_set_pc): Remove.
2134 (the_low_target): Use linux_get_pc_32bit and
2135 linux_set_pc_32bit.
2136 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2137 (the_low_target): Use linux_get_pc_32bit and
2138 linux_set_pc_32bit.
2139 * linux-cris-low.c (debug_threads): Remove declaration.
2140 (cris_get_pc, cris_set_pc,): Remove.
2141 (the_low_target): Use linux_get_pc_32bit and
2142 linux_set_pc_32bit.
2143 * linux-crisv32-low.c (debug_threads): Remove declaration.
2144 (cris_get_pc, cris_set_pc): Remove.
2145 (the_low_target): Use linux_get_pc_32bit and
2146 linux_set_pc_32bit.
2147 * linux-low.c: Include inttypes.h.
2148 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2149 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2150 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2151 (the_low_target): Use linux_get_pc_32bit and
2152 linux_set_pc_32bit.
2153 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2154 (the_low_target): Use linux_get_pc_32bit and
2155 linux_set_pc_32bit.
2156 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2157 (the_low_target): Use linux_get_pc_32bit and
2158 linux_set_pc_32bit.
2159 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2160 (the_low_target): Use linux_get_pc_32bit and
2161 linux_set_pc_32bit.
2162 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2163 (the_low_target): Use linux_get_pc_32bit and
2164 linux_set_pc_32bit.
2165
2166 2016-01-18 Gary Benson <gbenson@redhat.com>
2167
2168 * configure.ac (AC_FUNC_FORK): New check.
2169 * config.in: Regenerate.
2170 * configure: Likewise.
2171
2172 2016-01-14 Yao Qi <yao.qi@linaro.org>
2173
2174 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2175 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2176 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2177 arm_get_next_pcs_ctor.
2178
2179 2016-01-12 Josh Stone <jistone@redhat.com>
2180 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2181
2182 * inferiors.h: Include "gdb_vecs.h".
2183 (struct process_info): Add syscalls_to_catch.
2184 * inferiors.c (remove_process): Free syscalls_to_catch.
2185 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2186 syscall_return stops.
2187 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2188 * server.c (handle_general_set): Handle QCatchSyscalls.
2189 (handle_query): Report support for QCatchSyscalls.
2190 * target.h (struct target_ops): Add supports_catch_syscall.
2191 (target_supports_catch_syscall): New macro.
2192 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2193 (struct lwp_info): Add syscall_state.
2194 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2195 Maintain syscall_state and syscalls_to_catch across exec.
2196 (get_syscall_trapinfo): New function, proxy to the_low_target.
2197 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2198 (linux_low_filter_event): Toggle syscall_state entry/return for
2199 syscall traps, and set it ignored for all others.
2200 (gdb_catching_syscalls_p): New function.
2201 (gdb_catch_this_syscall_p): New function.
2202 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2203 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2204 (linux_supports_catch_syscall): New function.
2205 (linux_target_ops): Install it.
2206 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2207 (the_low_target): Install it.
2208
2209 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2210
2211 * acinclude.m4: Include new ../warning.m4 file.
2212 * configure: Regenerated.
2213 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2214
2215 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2216
2217 * ax.c (is_goto_target): Mark static.
2218 * linux-low.c (register_addr): Likewise.
2219 (linux_fetch_registers, linux_store_registers): Likewise.
2220 * mem-break.c (any_persistent_commands): Fix old prototype.
2221 (add_commands_to_breakpoint): Mark static.
2222 * regcache.c (find_register_by_name): Delete unused func.
2223 * remote-utils.c (hex_or_minus_one): Mark static.
2224 * server.c (monitor_show_help): Mark static.
2225 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2226 handle_v_requests): Likewise.
2227
2228 2016-01-12 Pedro Alves <palves@redhat.com>
2229
2230 Remove use of the registered trademark symbol throughout.
2231
2232 2016-01-08 Yao Qi <yao.qi@linaro.org>
2233
2234 * remote-utils.c (getpkt): If c is '\003', call target hook
2235 request_interrupt.
2236
2237 2016-01-06 Yao Qi <yao.qi@linaro.org>
2238
2239 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2240 linux-aarch32-low.c.
2241 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2242 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2243 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2244 (thumb2_breakpoint): Declare.
2245 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2246 linux-aarch32-low.h.
2247 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2248 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2249 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2250
2251 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2252
2253 * gdbreplay.c (gdbreplay_version): Change copyright year in
2254 version message.
2255 * server.c (gdbserver_version): Likewise.
2256
2257 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2258
2259 * server.c (crc32_table): Delete.
2260 (crc32): Use libiberty's xcrc32 function.
2261
2262 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2263
2264 * lynx-low.c (lynx_delete_thread_callback): New function.
2265 (lynx_mourn): Properly delete our process and all of its
2266 threads. Remove call to clear_inferiors.
2267
2268 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2269
2270 * target.c (thread_search_callback): Add check that
2271 the thread_stopped target callback is not NULL before
2272 calling it.
2273
2274 2015-12-21 Yao Qi <yao.qi@linaro.org>
2275
2276 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2277 arm breakpoint.
2278
2279 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2280
2281 * server.c (handle_query): Call target_supports_software_single_step.
2282
2283 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2284
2285 * linux-low.c (single_step): New function.
2286 (linux_resume_one_lwp_throw): Call single_step.
2287 (start_step_over): Likewise.
2288
2289 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2290
2291 * Makefile.in (SFILES): Append arch/arm-linux.c,
2292 arch/arm-get-next-pcs.c.
2293 (arm-linux.o): New rule.
2294 (arm-get-next-pcs.o): New rule.
2295 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2296 arm-linux.o.
2297 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2298 to linux-aarch32-low.c.
2299 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2300 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2301 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2302 (thumb2_breakpoint_len): Likewise.
2303 (arm_is_thumb_mode): Make non-static.
2304 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2305 from linux-aarch32-low.c.
2306 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2307 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2308 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2309 (thumb2_breakpoint_len): Likewise.
2310 (arm_is_thumb_mode): New declaration.
2311 * linux-arm-low.c: Include arch/arm-linux.h
2312 aarch/arm-get-next-pcs.h, sys/syscall.h.
2313 (get_next_pcs_ops): New struct.
2314 (get_next_pcs_addr_bits_remove): New function.
2315 (get_next_pcs_is_thumb): New function.
2316 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2317 (arm_sigreturn_next_pc): Likewise.
2318 (get_next_pcs_syscall_next_pc): Likewise.
2319 (arm_gdbserver_get_next_pcs): Likewise.
2320 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2321 Initialize.
2322 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2323 * server.h: Include gdb_vecs.h.
2324
2325 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2326
2327 * Makefile.in (SFILES): Append common/common-regcache.c.
2328 (OBS): Append common-regcache.o.
2329 (common-regcache.o): New rule.
2330 * regcache.c (init_register_cache): Initialize cache to
2331 REG_UNAVAILABLE.
2332 (regcache_raw_read_unsigned): New function.
2333 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2334 register_status enum.
2335
2336 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2337
2338 * linux-aarch64-low.c (the_low_targets): Rename
2339 breakpoint_reinsert_addr to get_next_pcs.
2340 * linux-arm-low.c (the_low_targets): Likewise.
2341 * linux-bfin-low.c (the_low_targets): Likewise.
2342 * linux-cris-low.c (the_low_targets): Likewise.
2343 * linux-crisv32-low.c (the_low_targets): Likewise.
2344 * linux-low.c (can_software_single_step): Likewise.
2345 (install_software_single_step_breakpoints): New function.
2346 (start_step_over): Use install_software_single_step_breakpoints.
2347 * linux-low.h: New CORE_ADDR vector.
2348 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2349 get_next_pcs.
2350 * linux-mips-low.c (the_low_targets): Likewise.
2351 * linux-nios2-low.c (the_low_targets): Likewise.
2352 * linux-sparc-low.c (the_low_targets): Likewise.
2353
2354 2015-12-17 Pedro Alves <palves@redhat.com>
2355
2356 * linux-low.c (linux_kill_one_lwp): Remove references to
2357 LinuxThreads.
2358 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2359 to 'kill'.
2360 (linux_init_signals): Delete.
2361 (initialize_low): Adjust.
2362 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2363
2364 2015-12-16 Pedro Alves <palves@redhat.com>
2365
2366 * configure.ac (compiler warning flags): When testing a
2367 -Wno-foo option, check whether -Wfoo works instead.
2368 * configure: Regenerate.
2369
2370 2015-12-11 Don Breazeal <donb@codesourcery.com>
2371
2372 * server.c (process_serial_event): Don't exit from gdbserver
2373 in remote mode if there are still active inferiors.
2374
2375 2015-12-11 Yao Qi <yao.qi@linaro.org>
2376
2377 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2378 arm_breakpoint_at if the process is 32-bit.
2379
2380 2015-12-11 Yao Qi <yao.qi@linaro.org>
2381
2382 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2383 arm breakpoint.
2384
2385 2015-12-07 Yao Qi <yao.qi@linaro.org>
2386
2387 * configure.srv: Append arm.o to srv_tgtobj for
2388 aarch64*-*-linux* target.
2389 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2390 from linux-arm-low.c.
2391 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2392 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2393 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2394 (thumb2_breakpoint_len): Likewise.
2395 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2396 (arm_breakpoint_kinds): Likewise.
2397 (arm_breakpoint_kind_from_pc): Likewise.
2398 (arm_sw_breakpoint_from_kind): Likewise.
2399 (arm_breakpoint_kind_from_current_state): Likewise.
2400 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2401 (arm_sw_breakpoint_from_kind): Declare.
2402 (arm_breakpoint_kind_from_current_state): Declare.
2403 (arm_breakpoint_at): Declare.
2404 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2405 arm_sw_breakpoint_from_kind if process is 32-bit.
2406 (aarch64_breakpoint_kind_from_pc): New function.
2407 (aarch64_breakpoint_kind_from_current_state): New function.
2408 (the_low_target): Initialize fields breakpoint_kind_from_pc
2409 and breakpoint_kind_from_current_state.
2410 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2411 linux-aarch32-low.c.
2412 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2413 (arm_breakpoint, arm_breakpoint_len): Likewise.
2414 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2415 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2416 (arm_is_thumb_mode): Likewise.
2417 (arm_breakpoint_at): Likewise.
2418 (arm_breakpoint_kind_from_pc): Likewise.
2419 (arm_sw_breakpoint_from_kind): Likewise.
2420 (arm_breakpoint_kind_from_current_state): Likewise.
2421
2422 Revert:
2423 2015-08-04 Yao Qi <yao.qi@linaro.org>
2424
2425 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2426 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2427 * server.c (extended_protocol): Remove "static".
2428 * server.h (extended_protocol): Declare it.
2429
2430 2015-12-04 Josh Stone <jistone@redhat.com>
2431
2432 * target.h (struct target_ops) <arch_setup>: Rename to ...
2433 (struct target_ops) <post_create_inferior>: ... this.
2434 (target_arch_setup): Rename to ...
2435 (target_post_create_inferior): ... this, calling post_create_inferior.
2436 * server.c (start_inferior): Update target_arch_setup calls to
2437 target_post_create_inferior.
2438 * linux-low.c (linux_low_ptrace_options): Forward declare.
2439 (linux_arch_setup): Update its comment for general use.
2440 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2441 (struct linux_target_ops): Use linux_post_create_inferior.
2442 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2443 to post_create_inferior.
2444 * nto-low.c (struct nto_target_ops): Likewise.
2445 * spu-low.c (struct spu_target_ops): Likewise.
2446 * win32-low.c (struct win32_target_ops): Likewise.
2447
2448 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2449
2450 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2451
2452 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2453
2454 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2455 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2456 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2457 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2458 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2459 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2460 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2461 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2462 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2463 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2464 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2465 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2466
2467 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2468
2469 * linux-low.c (linux_look_up_symbols): Don't call
2470 linux_supports_traceclone.
2471 * linux-low.h (thread_db_init): Remove use_events argument.
2472 * thread-db.c (thread_db_use_event): Remove global variable.
2473 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2474 (struct thread_db) <td_create_bp>: Remove field.
2475 (thread_db_create_event): Remove function.
2476 (thread_db_enable_reporting): Likewise.
2477 (find_one_thread): Don't check for thread_db_use_events.
2478 (attach_thread): Likewise.
2479 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2480 (try_thread_db_load_1): Don't check for thread_db_use_events.
2481 (thread_db_init): Remove use_events argument and thread events
2482 handling.
2483 (remove_thread_event_breakpoints): Remove function.
2484 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2485
2486 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2487
2488 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2489 New function.
2490 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2491 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2492 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2493 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2494 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2495 Initialize.
2496 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2497 New function.
2498 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2499 * linux-low.c (can_hardware_single_step): Use
2500 supports_hardware_single_step.
2501 (can_software_single_step): New function.
2502 (start_step_over): Call can_software_single_step.
2503 (linux_supports_hardware_single_step): New function.
2504 (struct target_ops) <supports_software_single_step>: Initialize.
2505 * linux-low.h (struct linux_target_ops)
2506 <supports_hardware_single_step>: Initialize.
2507 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2508 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2509 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2510 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2511 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2512 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2513 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2514 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2515 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2516 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2517 Initialize.
2518 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2519 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2520 Initialize.
2521 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2522 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2523 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2524 New function.
2525 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2526 * target.h (struct target_ops): <supports_software_single_step>:
2527 New field.
2528 (target_supports_software_single_step): New macro.
2529
2530 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2531
2532 * linux-low.c (linux_wait_1): Fix pc advance condition.
2533 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2534 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2535
2536 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2537
2538 * linux-arm-low.c (arm_is_thumb_mode): New function.
2539 (arm_breakpoint_at): Use arm_is_thumb_mode.
2540 (arm_breakpoint_kind_from_current_state): New function.
2541 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2542 Initialize.
2543 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2544 (linux_breakpoint_kind_from_current_state): New function.
2545 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2546 * linux-low.h (struct linux_target_ops)
2547 <breakpoint_kind_from_current_state>: New field.
2548 * target.h (struct target_ops): Likewise.
2549 (target_breakpoint_kind_from_current_state): New macro.
2550
2551 2015-11-30 Pedro Alves <palves@redhat.com>
2552
2553 * linux-low.c (linux_resume): Wake up the event loop before
2554 returning.
2555
2556 2015-11-30 Pedro Alves <palves@redhat.com>
2557
2558 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2559 check.
2560 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2561 to -1.
2562 * target.c (struct thread_search): New structure.
2563 (thread_search_callback): New function.
2564 (prev_general_thread): New global.
2565 (prepare_to_access_memory, done_accessing_memory): New functions.
2566 * target.h (prepare_to_access_memory, done_accessing_memory):
2567 Replace macros with function declarations.
2568
2569 2015-11-30 Pedro Alves <palves@redhat.com>
2570
2571 PR 14618
2572 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2573 report TARGET_WAITKIND_NO_RESUMED.
2574 * remote-utils.c (prepare_resume_reply): Handle
2575 TARGET_WAITKIND_NO_RESUMED.
2576 * server.c (report_no_resumed): New global.
2577 (handle_query) <qSupported>: Handle "no-resumed+". Report
2578 "no-resumed+" support.
2579 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2580 return error if the client doesn't support no-resumed events.
2581 (push_stop_notification): New function.
2582 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2583 events if the client supports them.
2584
2585 2015-11-30 Pedro Alves <palves@redhat.com>
2586
2587 * linux-low.c (thread_still_has_status_pending_p): Don't check
2588 vCont;t here.
2589 (lwp_resumed): New function.
2590 (status_pending_p_callback): Return early if the LWP is not
2591 supposed to be resumed.
2592
2593 2015-11-30 Pedro Alves <palves@redhat.com>
2594
2595 * linux-low.c (handle_extended_wait): Assert that the LWP's
2596 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2597 thread create events, leave the new child's status pending.
2598 (linux_low_filter_event): If GDB wants to hear about thread exit
2599 events, leave the LWP marked dead and don't delete it.
2600 (linux_wait_for_event_filtered): Don't check for thread exit.
2601 (filter_exit_event): New function.
2602 (linux_wait_1): Use it, when returning an exit event.
2603 (linux_resume_one_lwp_throw): Assert that the LWP's
2604 waitstatus is TARGET_WAITKIND_IGNORE.
2605 * remote-utils.c (prepare_resume_reply): Handle
2606 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2607 * server.c (report_thread_events): New global.
2608 (handle_general_set): Handle QThreadEvents.
2609 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2610 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2611 TARGET_WAITKIND_THREAD_EXITED.
2612 * server.h (report_thread_events): Declare.
2613
2614 2015-11-30 Pedro Alves <palves@redhat.com>
2615
2616 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2617 the thread's last_resume_kind was resume_stop.
2618
2619 2015-11-30 Pedro Alves <palves@redhat.com>
2620
2621 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2622 before returning.
2623
2624 2015-11-30 Pedro Alves <palves@redhat.com>
2625
2626 * server.c (handle_v_requests): Handle vCtrlC.
2627
2628 2015-11-30 Pedro Alves <palves@redhat.com>
2629
2630 * gdbthread.h (find_any_thread_of_pid): Declare.
2631 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2632 functions.
2633 * server.c (handle_query): If current_thread is NULL, look for
2634 another thread of the selected process.
2635
2636 2015-11-26 Daniel Colascione <dancol@dancol.org>
2637 Simon Marchi <simon.marchi@ericsson.com>
2638
2639 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2640 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2641 name in reply.
2642 * target.h (struct target_ops) <thread_name>: New field.
2643 (target_thread_name): New macro.
2644
2645 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2646
2647 * regcache.h (regcache_invalidate_pid): Add declaration.
2648 * regcache.c (regcache_invalidate_pid): New function, extracted
2649 from regcache_invalidate.
2650 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2651 Add trivial documentation comment.
2652 * lynx-low.c: Use regcache_invalidate_pid instead of
2653 regcache_invalidate.
2654
2655 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2656
2657 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2658 and Elf64_auxv_t if the target is Android.
2659
2660 2015-11-22 Doug Evans <xdje42@gmail.com>
2661
2662 * target.h: #include <sys/types.h>.
2663
2664 2015-11-19 Pedro Alves <palves@redhat.com>
2665
2666 * linux-low.c (linux_process_qsupported): Change prototype.
2667 Adjust.
2668 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2669 Change prototype.
2670 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2671 and adjust to loop over all features.
2672 * server.c (handle_query) <qSupported>: Adjust to call
2673 target_process_qsupported once, passing it a vector of unprocessed
2674 features.
2675 * target.h (struct target_ops) <process_qsupported>: Change
2676 prototype.
2677 (target_process_qsupported): Adjust.
2678
2679 2015-11-19 Pedro Alves <palves@redhat.com>
2680
2681 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2682 mode.
2683 * configure: Regenerate.
2684
2685 2015-11-19 Pedro Alves <palves@redhat.com>
2686
2687 * configure: Regenerate.
2688
2689 2015-11-19 Yao Qi <yao.qi@linaro.org>
2690
2691 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2692 type to uint32_t.
2693
2694 2015-11-19 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2697 (struct aarch64_operand): Move enum out.
2698
2699 2015-11-19 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2702 struct user_fpsimd_state *.
2703 (aarch64_store_fpregset): Likewise.
2704
2705 2015-11-19 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2708 struct user_pt_regs *.
2709 (aarch64_store_gregset): Likewise.
2710
2711 2015-11-18 Pedro Alves <palves@redhat.com>
2712
2713 * Makefile.in (all_object_files): Add $IPA_OBJS.
2714
2715 2015-11-17 Pedro Alves <palves@redhat.com>
2716
2717 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2718 GDB_SIGNAL_0 and gdb_signal_to_string.
2719
2720 2015-11-17 Pedro Alves <palves@redhat.com>
2721
2722 * win32-low.c (handle_output_debug_string): Remove parameter.
2723 (win32_kill): Remove our_status local and adjust call to
2724 handle_output_debug_string.
2725 (get_child_debug_event): Adjust call to
2726 handle_output_debug_string.
2727
2728 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2729
2730 * linux-mips-low.c (mips_fill_gregset): Add cast.
2731 (mips_store_gregset): Likewise.
2732 (mips_fill_fpregset): Likewise.
2733 (mips_store_fpregset): Likewise.
2734
2735 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2736
2737 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2738 priv.
2739
2740 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2741
2742 * linux-mips-low.c (mips_linux_new_thread): Change type of
2743 watch_type to enum target_hw_bp_type.
2744
2745 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2746
2747 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2748 Change return type to arm_hwbp_type.
2749
2750 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2751
2752 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2753 (arm_store_gregset): Likewise.
2754 * linux-arm-low.c (arm_get_hwcap): Likewise.
2755 (arm_read_description): Likewise.
2756
2757 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2758
2759 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2760
2761 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2762
2763 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2764 (ppc_fill_vsxregset): Likewise.
2765 (ppc_store_vsxregset): Likewise.
2766 (ppc_fill_vrregset): Likewise.
2767 (ppc_store_vrregset): Likewise.
2768 (ppc_fill_evrregset): Likewise.
2769 (ppc_store_evrregset): Likewise.
2770
2771 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2772
2773 * linux-ppc-low.c (ppc_usrregs_info): Remove
2774 forward-declaration.
2775 (ppc_arch_setup): Move lower in file.
2776
2777 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2778
2779 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2780 (ps_pdwrite): Likewise.
2781
2782 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2783
2784 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2785 to after assert checks.
2786
2787 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2788
2789 * proc-service.c (ps_pdread): Add/adjust casts.
2790 (ps_pdwrite): Add/adjust casts.
2791
2792 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2793
2794 * server.c (handle_search_memory_1): Cast return value of
2795 memmem.
2796
2797 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2798
2799 * server.c (write_qxfer_response): Change type of data to
2800 gdb_byte *.
2801
2802 2015-10-29 Pedro Alves <palves@redhat.com>
2803
2804 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2805
2806 2015-10-29 Pedro Alves <palves@redhat.com>
2807
2808 * tracepoint.c (clear_installed_tracepoints): Add casts.
2809
2810 2015-10-29 Pedro Alves <palves@redhat.com>
2811
2812 * server.c (handle_v_cont, process_serial_event): Add enum
2813 gdb_signal casts to signal parsing code.
2814
2815 2015-10-29 Pedro Alves <palves@redhat.com>
2816
2817 * linux-low.h (NULL_REGSET): Define.
2818 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2819 * linux-arm-low.c (arm_regsets): Likewise.
2820 * linux-crisv32-low.c (cris_regsets): Likewise.
2821 * linux-m68k-low.c (m68k_regsets): Likewise.
2822 * linux-mips-low.c (mips_regsets): Likewise.
2823 * linux-nios2-low.c (nios2_regsets): Likewise.
2824 * linux-ppc-low.c (ppc_regsets): Likewise.
2825 * linux-s390-low.c (s390_regsets): Likewise.
2826 * linux-sh-low.c (sh_regsets): Likewise.
2827 * linux-sparc-low.c (sparc_regsets): Likewise.
2828 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2829 * linux-tile-low.c (tile_regsets): Likewise.
2830 * linux-x86-low.c (x86_regsets): Likewise.
2831 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2832
2833 2015-10-29 Pedro Alves <palves@redhat.com>
2834
2835 * linux-low.h (NULL_REGSET): Define.
2836 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2837 * linux-arm-low.c (arm_regsets): Likewise.
2838 * linux-crisv32-low.c (cris_regsets): Likewise.
2839 * linux-m68k-low.c (m68k_regsets): Likewise.
2840 * linux-mips-low.c (mips_regsets): Likewise.
2841 * linux-nios2-low.c (nios2_regsets): Likewise.
2842 * linux-ppc-low.c (ppc_regsets): Likewise.
2843 * linux-s390-low.c (s390_regsets): Likewise.
2844 * linux-sh-low.c (sh_regsets): Likewise.
2845 * linux-sparc-low.c (sparc_regsets): Likewise.
2846 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2847 * linux-tile-low.c (tile_regsets): Likewise.
2848 * linux-x86-low.c (x86_regsets): Likewise.
2849 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2850
2851 2015-10-26 Doug Evans <dje@google.com>
2852
2853 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2854
2855 2015-10-26 Doug Evans <dje@google.com>
2856
2857 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2858
2859 2015-10-26 Doug Evans <dje@google.com>
2860
2861 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2862 for debug_printf.
2863 (attach_thread, find_new_threads_callback): Ditto.
2864
2865 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2866
2867 * mem-break.h (set_breakpoint_data): Remove.
2868
2869 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2870
2871 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2872 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2873 (initialize_low): Remove set_breakpoint_data call.
2874 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2875 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2876 (initialize_low): Remove set_breakpoint_data call.
2877 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2878 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2879 (initialize_low): Remove set_breakpoint_data call.
2880
2881 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2882
2883 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2884 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2885 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2886 * target.h (target_breakpoint_kind_from_pc): New macro.
2887
2888 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2889
2890 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2891 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2892 the default breakpoint kind.
2893
2894 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2895
2896 * linux-arm-low.c (arm_supports_z_point_type): Add software
2897 breakpoint support.
2898
2899 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2900
2901 * linux-arm-low.c: Refactor breakpoint definitions.
2902 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2903 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2904
2905 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2906
2907 * Makefile.in: Add arm.c/o.
2908 * configure.srv: Likewise.
2909 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2910 (arm_breakpoint_kind_from_pc): New function.
2911 (arm_sw_breakpoint_from_kind): Return proper kind.
2912 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2913
2914 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2915
2916 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2917 removal.
2918 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2919 (struct raw_breakpoint) <size>: Remove.
2920 (struct raw_breakpoint) <kind>: Add.
2921 (bp_size): New function.
2922 (bp_opcode): Likewise.
2923 (find_raw_breakpoint_at): Adjust for kind.
2924 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2925 (remove_memory_breakpoint): Adjust for kind call bp_size.
2926 (set_raw_breakpoint_at): Adjust for kind.
2927 (set_breakpoint): Likewise.
2928 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2929 (delete_raw_breakpoint): Adjust for kind.
2930 (delete_breakpoint): Likewise.
2931 (find_gdb_breakpoint): Likewise.
2932 (set_gdb_breakpoint_1): Likewise.
2933 (set_gdb_breakpoint): Likewise.
2934 (delete_gdb_breakpoint_1): Likewise.
2935 (delete_gdb_breakpoint): Likewise.
2936 (uninsert_raw_breakpoint): Likewise.
2937 (reinsert_raw_breakpoint): Likewise.
2938 (set_breakpoint_data): Remove.
2939 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2940 (check_mem_read): Adjust for kind call bp_size.
2941 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2942 (clone_one_breakpoint): Adjust for kind.
2943 * mem-break.h (set_gdb_breakpoint): Likewise.
2944 (delete_gdb_breakpoint): Likewise.
2945 * server.c (process_serial_event): Likewise.
2946
2947 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2948
2949 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2950 (struct linux_target_ops) <breakpoint>: Remove.
2951 (struct linux_target_ops) <breakpoint_len>: Remove.
2952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2954 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2955 (arm_sw_breakpoint_from_kind): New function.
2956 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2957 (struct linux_target_ops) <breakpoint>: Remove.
2958 (struct linux_target_ops) <breakpoint_len>: Remove.
2959 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2960 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2961 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2962 (struct linux_target_ops) <breakpoint>: Remove.
2963 (struct linux_target_ops) <breakpoint_len>: Remove.
2964 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2965 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2966 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2967 (struct linux_target_ops) <breakpoint>: Remove.
2968 (struct linux_target_ops) <breakpoint_len>: Remove.
2969 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2970 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2971 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2972 and sw_breakpoint_from_kind to increment the pc.
2973 (linux_breakpoint_kind_from_pc): New function.
2974 (linux_sw_breakpoint_from_kind): New function.
2975 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2976 (initialize_low): Call breakpoint_kind_from_pc and
2977 sw_breakpoint_from_kind to replace breakpoint_data/len.
2978 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2979 New field.
2980 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2981 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2982 (struct linux_target_ops) <breakpoint>: Remove.
2983 (struct linux_target_ops) <breakpoint_len>: Remove.
2984 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2985 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2986 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2987 (struct linux_target_ops) <breakpoint>: Remove.
2988 (struct linux_target_ops) <breakpoint_len>: Remove.
2989 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2990 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2991 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2992 (struct linux_target_ops) <breakpoint>: Remove.
2993 (struct linux_target_ops) <breakpoint_len>: Remove.
2994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2995 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2996 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2997 (struct linux_target_ops) <breakpoint>: Remove.
2998 (struct linux_target_ops) <breakpoint_len>: Remove.
2999 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3000 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3001 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3002 (struct linux_target_ops) <breakpoint>: Remove.
3003 (struct linux_target_ops) <breakpoint_len>: Remove.
3004 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3005 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3006 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3007 (struct linux_target_ops) <breakpoint>: Remove.
3008 (struct linux_target_ops) <breakpoint_len>: Remove.
3009 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3010 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3011 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3012 (struct linux_target_ops) <breakpoint>: Remove.
3013 (struct linux_target_ops) <breakpoint_len>: Remove.
3014 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3015 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3016 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3017 (struct linux_target_ops) <breakpoint>: Remove.
3018 (struct linux_target_ops) <breakpoint_len>: Remove.
3019 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3020 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3021 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3022 (struct linux_target_ops) <breakpoint>: Remove.
3023 (struct linux_target_ops) <breakpoint_len>: Remove.
3024 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3025 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3026 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3027 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3028 (struct linux_target_ops) <breakpoint>: Remove.
3029 (struct linux_target_ops) <breakpoint_len>: Remove.
3030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3032 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3033 (struct linux_target_ops) <breakpoint>: Remove.
3034 (struct linux_target_ops) <breakpoint_len>: Remove.
3035 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3036 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3037
3038 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3039
3040 * linux-cris-low.c (cris_get_pc): Remove void arg.
3041
3042 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3043
3044 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3045 variable name.
3046
3047 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3048
3049 * inferiors.c (thread_pid_matches_callback): New function.
3050 (find_thread_process): New function.
3051 (remove_thread): Reset current_thread.
3052 (remove_process): Assert threads have been removed first.
3053
3054 2015-10-15 Yao Qi <yao.qi@linaro.org>
3055
3056 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3057 if it is 3.
3058 (aarch64_remove_point): Likewise.
3059 * regcache.c (regcache_register_size): New function.
3060
3061 2015-10-12 Yao Qi <yao.qi@linaro.org>
3062
3063 * linux-aarch64-low.c: Update all callers as emit_load_store
3064 is renamed to aarch64_emit_load_store.
3065
3066 2015-10-12 Yao Qi <yao.qi@linaro.org>
3067
3068 * linux-aarch64-low.c: Update all callers of function renaming
3069 from emit_insn to aarch64_emit_insn.
3070
3071 2015-10-12 Yao Qi <yao.qi@linaro.org>
3072
3073 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3074 arch/aarch64-insn.h.
3075 (struct aarch64_memory_operand): Likewise.
3076 (ENCODE): Likewise.
3077 (emit_insn): Move to arch/aarch64-insn.c.
3078 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3079 (emit_load_store): Move to arch/aarch64-insn.c.
3080 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3081 (can_encode_int32): Remove.
3082
3083 2015-10-12 Yao Qi <yao.qi@linaro.org>
3084
3085 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3086 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3087 (aarch64_relocate_instruction): Likewise.
3088 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3089 (struct aarch64_insn_visitor): Likewise.
3090
3091 2015-10-12 Yao Qi <yao.qi@linaro.org>
3092
3093 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3094 (struct aarch64_insn_visitor): New.
3095 (struct aarch64_insn_relocation_data): New.
3096 (aarch64_ftrace_insn_reloc_b): New function.
3097 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3098 (aarch64_ftrace_insn_reloc_cb): Likewise.
3099 (aarch64_ftrace_insn_reloc_tb): Likewise.
3100 (aarch64_ftrace_insn_reloc_adr): Likewise.
3101 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3102 (aarch64_ftrace_insn_reloc_others): Likewise.
3103 (visitor): New.
3104 (aarch64_relocate_instruction): Use visitor.
3105
3106 2015-10-12 Yao Qi <yao.qi@linaro.org>
3107
3108 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3109 int. Add argument buf.
3110 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3111 aarch64_relocate_instruction.
3112
3113 2015-10-12 Yao Qi <yao.qi@linaro.org>
3114
3115 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3116 argument insn. Remove local variable insn. Don't call
3117 target_read_uint32.
3118 (aarch64_install_fast_tracepoint_jump_pad): Call
3119 target_read_uint32.
3120
3121 2015-09-30 Yao Qi <yao.qi@linaro.org>
3122
3123 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3124 (emit_load_store_pair): Likewise.
3125
3126 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3127
3128 * dll.c (match_dll): Add cast(s).
3129 (unloaded_dll): Likewise.
3130 * linux-low.c (second_thread_of_pid_p): Likewise.
3131 (delete_lwp_callback): Likewise.
3132 (count_events_callback): Likewise.
3133 (select_event_lwp_callback): Likewise.
3134 (linux_set_resume_request): Likewise.
3135 * server.c (accumulate_file_name_length): Likewise.
3136 (emit_dll_description): Likewise.
3137 (handle_qxfer_threads_worker): Likewise.
3138 (visit_actioned_threads): Likewise.
3139 * thread-db.c (any_thread_of): Likewise.
3140 * tracepoint.c (same_process_p): Likewise.
3141 (match_blocktype): Likewise.
3142 (build_traceframe_info_xml): Likewise.
3143
3144 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3145
3146 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3147 assignment.
3148 (gdb_unparse_agent_expr): Likewise.
3149 * hostio.c (require_data): Likewise.
3150 (handle_pread): Likewise.
3151 * linux-low.c (disable_regset): Likewise.
3152 (fetch_register): Likewise.
3153 (store_register): Likewise.
3154 (get_dynamic): Likewise.
3155 (linux_qxfer_libraries_svr4): Likewise.
3156 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3157 (set_fast_tracepoint_jump): Likewise.
3158 (uninsert_fast_tracepoint_jumps_at): Likewise.
3159 (reinsert_fast_tracepoint_jumps_at): Likewise.
3160 (validate_inserted_breakpoint): Likewise.
3161 (clone_agent_expr): Likewise.
3162 * regcache.c (init_register_cache): Likewise.
3163 * remote-utils.c (putpkt_binary_1): Likewise.
3164 (decode_M_packet): Likewise.
3165 (decode_X_packet): Likewise.
3166 (look_up_one_symbol): Likewise.
3167 (relocate_instruction): Likewise.
3168 (monitor_output): Likewise.
3169 * server.c (handle_search_memory): Likewise.
3170 (handle_qxfer_exec_file): Likewise.
3171 (handle_qxfer_libraries): Likewise.
3172 (handle_qxfer): Likewise.
3173 (handle_query): Likewise.
3174 (handle_v_cont): Likewise.
3175 (handle_v_run): Likewise.
3176 (captured_main): Likewise.
3177 * target.c (write_inferior_memory): Likewise.
3178 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3179 * tracepoint.c (init_trace_buffer): Likewise.
3180 (add_tracepoint_action): Likewise.
3181 (add_traceframe): Likewise.
3182 (add_traceframe_block): Likewise.
3183 (cmd_qtdpsrc): Likewise.
3184 (cmd_qtdv): Likewise.
3185 (cmd_qtstatus): Likewise.
3186 (response_source): Likewise.
3187 (response_tsv): Likewise.
3188 (cmd_qtnotes): Likewise.
3189 (gdb_collect): Likewise.
3190 (initialize_tracepoint): Likewise.
3191
3192 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3193
3194 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3195 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3196 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3197 <NOP>: New.
3198 (enum aarch64_condition_codes): New enum.
3199 (w0): New static global.
3200 (fp): Likewise.
3201 (lr): Likewise.
3202 (struct aarch64_memory_operand) <type>: New
3203 MEMORY_OPERAND_POSTINDEX type.
3204 (postindex_memory_operand): New helper function.
3205 (emit_ret): New function.
3206 (emit_load_store_pair): New function, factored out of emit_stp
3207 with support for MEMORY_OPERAND_POSTINDEX.
3208 (emit_stp): Rewrite using emit_load_store_pair.
3209 (emit_ldp): New function.
3210 (emit_load_store): Likewise.
3211 (emit_ldr): Mention post-index instruction in comment.
3212 (emit_ldrh): New function.
3213 (emit_ldrb): New function.
3214 (emit_ldrsw): Mention post-index instruction in comment.
3215 (emit_str): Likewise.
3216 (emit_subs): New function.
3217 (emit_cmp): Likewise.
3218 (emit_and): Likewise.
3219 (emit_orr): Likewise.
3220 (emit_orn): Likewise.
3221 (emit_eor): Likewise.
3222 (emit_mvn): Likewise.
3223 (emit_lslv): Likewise.
3224 (emit_lsrv): Likewise.
3225 (emit_asrv): Likewise.
3226 (emit_mul): Likewise.
3227 (emit_sbfm): Likewise.
3228 (emit_sbfx): Likewise.
3229 (emit_ubfm): Likewise.
3230 (emit_ubfx): Likewise.
3231 (emit_csinc): Likewise.
3232 (emit_cset): Likewise.
3233 (emit_nop): Likewise.
3234 (emit_ops_insns): New helper function.
3235 (emit_pop): Likewise.
3236 (emit_push): Likewise.
3237 (aarch64_emit_prologue): New function.
3238 (aarch64_emit_epilogue): Likewise.
3239 (aarch64_emit_add): Likewise.
3240 (aarch64_emit_sub): Likewise.
3241 (aarch64_emit_mul): Likewise.
3242 (aarch64_emit_lsh): Likewise.
3243 (aarch64_emit_rsh_signed): Likewise.
3244 (aarch64_emit_rsh_unsigned): Likewise.
3245 (aarch64_emit_ext): Likewise.
3246 (aarch64_emit_log_not): Likewise.
3247 (aarch64_emit_bit_and): Likewise.
3248 (aarch64_emit_bit_or): Likewise.
3249 (aarch64_emit_bit_xor): Likewise.
3250 (aarch64_emit_bit_not): Likewise.
3251 (aarch64_emit_equal): Likewise.
3252 (aarch64_emit_less_signed): Likewise.
3253 (aarch64_emit_less_unsigned): Likewise.
3254 (aarch64_emit_ref): Likewise.
3255 (aarch64_emit_if_goto): Likewise.
3256 (aarch64_emit_goto): Likewise.
3257 (aarch64_write_goto_address): Likewise.
3258 (aarch64_emit_const): Likewise.
3259 (aarch64_emit_call): Likewise.
3260 (aarch64_emit_reg): Likewise.
3261 (aarch64_emit_pop): Likewise.
3262 (aarch64_emit_stack_flush): Likewise.
3263 (aarch64_emit_zero_ext): Likewise.
3264 (aarch64_emit_swap): Likewise.
3265 (aarch64_emit_stack_adjust): Likewise.
3266 (aarch64_emit_int_call_1): Likewise.
3267 (aarch64_emit_void_call_2): Likewise.
3268 (aarch64_emit_eq_goto): Likewise.
3269 (aarch64_emit_ne_goto): Likewise.
3270 (aarch64_emit_lt_goto): Likewise.
3271 (aarch64_emit_le_goto): Likewise.
3272 (aarch64_emit_gt_goto): Likewise.
3273 (aarch64_emit_ge_got): Likewise.
3274 (aarch64_emit_ops_impl): New static global variable.
3275 (aarch64_emit_ops): New target function, return
3276 &aarch64_emit_ops_impl.
3277 (struct linux_target_ops): Install it.
3278
3279 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3280
3281 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3282 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3283 aarch64-ipa.o.
3284 * linux-aarch64-ipa.c: New file.
3285 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3286 and endian.h.
3287 (aarch64_get_thread_area): New target method.
3288 (extract_signed_bitfield): New helper function.
3289 (aarch64_decode_ldr_literal): New function.
3290 (enum aarch64_opcodes): New enum.
3291 (struct aarch64_register): New struct.
3292 (struct aarch64_operand): New struct.
3293 (x0): New static global.
3294 (x1): Likewise.
3295 (x2): Likewise.
3296 (x3): Likewise.
3297 (x4): Likewise.
3298 (w2): Likewise.
3299 (ip0): Likewise.
3300 (sp): Likewise.
3301 (xzr): Likewise.
3302 (aarch64_register): New helper function.
3303 (register_operand): Likewise.
3304 (immediate_operand): Likewise.
3305 (struct aarch64_memory_operand): New struct.
3306 (offset_memory_operand): New helper function.
3307 (preindex_memory_operand): Likewise.
3308 (enum aarch64_system_control_registers): New enum.
3309 (ENCODE): New macro.
3310 (emit_insn): New helper function.
3311 (emit_b): New function.
3312 (emit_bcond): Likewise.
3313 (emit_cb): Likewise.
3314 (emit_tb): Likewise.
3315 (emit_blr): Likewise.
3316 (emit_stp): Likewise.
3317 (emit_ldp_q_offset): Likewise.
3318 (emit_stp_q_offset): Likewise.
3319 (emit_load_store): Likewise.
3320 (emit_ldr): Likewise.
3321 (emit_ldrsw): Likewise.
3322 (emit_str): Likewise.
3323 (emit_ldaxr): Likewise.
3324 (emit_stxr): Likewise.
3325 (emit_stlr): Likewise.
3326 (emit_data_processing_reg): Likewise.
3327 (emit_data_processing): Likewise.
3328 (emit_add): Likewise.
3329 (emit_sub): Likewise.
3330 (emit_mov): Likewise.
3331 (emit_movk): Likewise.
3332 (emit_mov_addr): Likewise.
3333 (emit_mrs): Likewise.
3334 (emit_msr): Likewise.
3335 (emit_sevl): Likewise.
3336 (emit_wfe): Likewise.
3337 (append_insns): Likewise.
3338 (can_encode_int32_in): New helper function.
3339 (aarch64_relocate_instruction): New function.
3340 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3341 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3342 (struct linux_target_ops): Install aarch64_get_thread_area,
3343 aarch64_install_fast_tracepoint_jump_pad and
3344 aarch64_get_min_fast_tracepoint_insn_len.
3345
3346 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3347
3348 * Makefile.in (aarch64-insn.o): New rule.
3349 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3350
3351 2015-09-21 Yao Qi <yao.qi@linaro.org>
3352
3353 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3354
3355 2015-09-21 Yao Qi <yao.qi@linaro.org>
3356
3357 * tracepoint.c (max_jump_pad_size): Remove.
3358
3359 2015-09-18 Yao Qi <yao.qi@linaro.org>
3360
3361 * linux-aarch64-low.c: Don't include sys/uio.h.
3362 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3363
3364 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3365
3366 * tracepoint.c (eval_result_type): Change prototype.
3367 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3368
3369 2015-09-15 Pedro Alves <palves@redhat.com>
3370
3371 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3372 Check whether to report exec events instead of checking whether
3373 multiprocess is enabled.
3374
3375 2015-09-15 Pedro Alves <palves@redhat.com>
3376
3377 PR remote/18965
3378 * remote-utils.c (prepare_resume_reply): Merge
3379 TARGET_WAITKIND_VFORK_DONE switch case with the
3380 TARGET_WAITKIND_FORKED case.
3381
3382 2015-09-15 Yao Qi <yao.qi@linaro.org>
3383
3384 * server.c (handle_query): Check string comparison using
3385 "else if" instead of "if".
3386
3387 2015-09-15 Yao Qi <yao.qi@linaro.org>
3388
3389 * server.c (vCont_supported): New global variable.
3390 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3391 matches. Append ";vContSupported+" to own_buf.
3392 (handle_v_requests): Append ";s;S" to own_buf if target supports
3393 hardware single step or vCont_supported is false.
3394 (capture_main): Set vCont_supported to zero.
3395
3396 2015-09-15 Yao Qi <yao.qi@linaro.org>
3397
3398 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3399 it to ...
3400 (linux_supports_hardware_single_step): ... New function.
3401 (linux_target_ops): Update.
3402 * lynx-low.c (lynx_target_ops): Set field
3403 supports_hardware_single_step to target_can_do_hardware_single_step.
3404 * nto-low.c (nto_target_ops): Likewise.
3405 * spu-low.c (spu_target_ops): Likewise.
3406 * win32-low.c (win32_target_ops): Likewise.
3407 * target.c (target_can_do_hardware_single_step): New function.
3408 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3409 Remove. <supports_hardware_single_step>: New field.
3410 (target_supports_conditional_breakpoints): Remove.
3411 (target_supports_hardware_single_step): New macro.
3412 (target_can_do_hardware_single_step): Declare.
3413 * server.c (handle_query): Use target_supports_hardware_single_step
3414 instead of target_supports_conditional_breakpoints.
3415
3416 2015-09-15 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3419 function.
3420 (struct linux_target_ops the_low_target): Install
3421 aarch64_linux_siginfo_fixup.
3422
3423 2015-09-11 Don Breazeal <donb@codesourcery.com>
3424 Luis Machado <lgustavo@codesourcery.com>
3425
3426 * linux-low.c (linux_mourn): Static declaration.
3427 (linux_arch_setup): Move in front of
3428 handle_extended_wait.
3429 (linux_arch_setup_thread): New function.
3430 (handle_extended_wait): Handle exec events. Call
3431 linux_arch_setup_thread. Make event_lwp argument a
3432 pointer-to-a-pointer.
3433 (check_zombie_leaders): Do not check stopped threads.
3434 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3435 (linux_low_filter_event): Add lwp and thread for exec'ing
3436 non-leader thread if leader thread has been deleted.
3437 Refactor code into linux_arch_setup_thread and call it.
3438 Pass child lwp pointer by reference to handle_extended_wait.
3439 (linux_wait_for_event_filtered): Update comment.
3440 (linux_wait_1): Prevent clobbering exec event status.
3441 (linux_supports_exec_events): New function.
3442 (linux_target_ops) <supports_exec_events>: Initialize new member.
3443 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3444 new member.
3445 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3446 * server.c (report_exec_events): New global variable.
3447 (handle_query): Handle qSupported query for exec-events feature.
3448 (captured_main): Initialize report_exec_events.
3449 * server.h (report_exec_events): Declare new global variable.
3450 * target.h (struct target_ops) <supports_exec_events>: New
3451 member.
3452 (target_supports_exec_events): New macro.
3453 * win32-low.c (win32_target_ops) <supports_exec_events>:
3454 Initialize new member.
3455
3456 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3457
3458 * linux-low.c (linux_low_enable_btrace): Remove.
3459 (linux_target_ops): Replace linux_low_enable_btrace with
3460 linux_enable_btrace.
3461
3462 2015-09-03 Yao Qi <yao.qi@linaro.org>
3463
3464 * linux-aarch64-low.c (aarch64_insert_point): Call
3465 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3466 returns true.
3467
3468 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3469
3470 * linux-low.c (check_stopped_by_breakpoint): Use
3471 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3472
3473 2015-08-27 Pedro Alves <palves@redhat.com>
3474
3475 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3476
3477 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3478
3479 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3480 the XNEW-family equivalent.
3481 (compile_bytecodes): Likewise.
3482 * dll.c (loaded_dll): Likewise.
3483 * event-loop.c (append_callback_event): Likewise.
3484 (create_file_handler): Likewise.
3485 (create_file_event): Likewise.
3486 * hostio.c (handle_open): Likewise.
3487 * inferiors.c (add_thread): Likewise.
3488 (add_process): Likewise.
3489 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3490 * linux-arm-low.c (arm_new_process): Likewise.
3491 (arm_new_thread): Likewise.
3492 * linux-low.c (add_to_pid_list): Likewise.
3493 (linux_add_process): Likewise.
3494 (handle_extended_wait): Likewise.
3495 (add_lwp): Likewise.
3496 (enqueue_one_deferred_signal): Likewise.
3497 (enqueue_pending_signal): Likewise.
3498 (linux_resume_one_lwp_throw): Likewise.
3499 (linux_resume_one_thread): Likewise.
3500 (linux_read_memory): Likewise.
3501 (linux_write_memory): Likewise.
3502 * linux-mips-low.c (mips_linux_new_process): Likewise.
3503 (mips_linux_new_thread): Likewise.
3504 (mips_add_watchpoint): Likewise.
3505 * linux-x86-low.c (initialize_low_arch): Likewise.
3506 * lynx-low.c (lynx_add_process): Likewise.
3507 * mem-break.c (set_raw_breakpoint_at): Likewise.
3508 (set_breakpoint): Likewise.
3509 (add_condition_to_breakpoint): Likewise.
3510 (add_commands_to_breakpoint): Likewise.
3511 (clone_agent_expr): Likewise.
3512 (clone_one_breakpoint): Likewise.
3513 * regcache.c (new_register_cache): Likewise.
3514 * remote-utils.c (look_up_one_symbol): Likewise.
3515 * server.c (queue_stop_reply): Likewise.
3516 (start_inferior): Likewise.
3517 (queue_stop_reply_callback): Likewise.
3518 (handle_target_event): Likewise.
3519 * spu-low.c (fetch_ppc_memory): Likewise.
3520 (store_ppc_memory): Likewise.
3521 * target.c (set_target_ops): Likewise.
3522 * thread-db.c (thread_db_load_search): Likewise.
3523 (try_thread_db_load_1): Likewise.
3524 * tracepoint.c (add_tracepoint): Likewise.
3525 (add_tracepoint_action): Likewise.
3526 (create_trace_state_variable): Likewise.
3527 (cmd_qtdpsrc): Likewise.
3528 (cmd_qtro): Likewise.
3529 (add_while_stepping_state): Likewise.
3530 * win32-low.c (child_add_thread): Likewise.
3531 (get_image_name): Likewise.
3532
3533 2015-08-25 Yao Qi <yao.qi@linaro.org>
3534
3535 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3536
3537 2015-08-25 Yao Qi <yao.qi@linaro.org>
3538
3539 * Makefile.in (aarch64-linux.o): New rule.
3540 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3541 srv_tgtobj.
3542 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3543 (aarch64_init_debug_reg_state): Make it extern.
3544 (aarch64_linux_prepare_to_resume): Remove.
3545
3546 2015-08-25 Yao Qi <yao.qi@linaro.org>
3547
3548 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3549 lwp_arch_private_info and ptid_of_lwp.
3550
3551 2015-08-25 Yao Qi <yao.qi@linaro.org>
3552
3553 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3554 Find proc_info by find_process_pid. All callers updated.
3555
3556 2015-08-25 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3559 Remove.
3560 (debug_reg_change_callback): Remove.
3561 (aarch64_notify_debug_reg_change): Remove.
3562
3563 2015-08-25 Yao Qi <yao.qi@linaro.org>
3564
3565 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3566 Call current_lwp_ptid.
3567
3568 2015-08-25 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-aarch64-low.c (debug_reg_change_callback): Use
3571 debug_printf.
3572
3573 2015-08-25 Yao Qi <yao.qi@linaro.org>
3574
3575 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3576
3577 2015-08-25 Yao Qi <yao.qi@linaro.org>
3578
3579 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3580
3581 2015-08-25 Yao Qi <yao.qi@linaro.org>
3582
3583 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3584 the code.
3585
3586 2015-08-25 Yao Qi <yao.qi@linaro.org>
3587
3588 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3589 Remove.
3590 (debug_reg_change_callback): Remove argument entry and add argument
3591 lwp. Remove local variable thread. Don't print thread id in the
3592 debugging output. Don't check whether pid of thread equals to pid.
3593 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3594 iterate_over_lwps instead find_inferior.
3595
3596 2015-08-24 Pedro Alves <palves@redhat.com>
3597
3598 * inferiors.c (get_first_process): New function.
3599 * inferiors.h (get_first_process): New declaration.
3600 * remote-utils.c (read_ptid): Default to the first process in the
3601 list, instead of to the current thread's process.
3602
3603 2015-08-24 Pedro Alves <palves@redhat.com>
3604
3605 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3606 * event-loop.c: Likewise.
3607 * remote-utils.c: Likewise.
3608 * tracepoint.c: Likewise.
3609
3610 2015-08-24 Pedro Alves <palves@redhat.com>
3611
3612 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3613 ptid_get_lwp.
3614
3615 2015-08-21 Pedro Alves <palves@redhat.com>
3616
3617 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3618 instead of literal 1.
3619
3620 2015-08-21 Pedro Alves <palves@redhat.com>
3621
3622 * tdesc.c (default_description): Explicitly zero-initialize.
3623
3624 2015-08-21 Pedro Alves <palves@redhat.com>
3625
3626 PR gdb/18749
3627 * inferiors.c (remove_thread): Discard any pending stop reply for
3628 this thread.
3629 * server.c (remove_all_on_match_pid): Rename to ...
3630 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3631 instead of a pid.
3632 (discard_queued_stop_replies): Change parameter to a ptid. Now
3633 extern.
3634 (handle_v_kill, kill_inferior_callback, captured_main)
3635 (process_serial_event): Adjust.
3636 * server.h (discard_queued_stop_replies): Declare.
3637
3638 2015-08-21 Pedro Alves <palves@redhat.com>
3639
3640 * linux-low.c (wait_for_sigstop): Always switch to no thread
3641 selected if the previously current thread dies.
3642 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3643 process instead of the current thread's.
3644 * remote-utils.c (input_interrupt): Don't check if there's no
3645 current thread.
3646 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3647 current thread to the general thread fails, error out.
3648 (handle_qxfer_auxv, handle_qxfer_libraries)
3649 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3650 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3651 (handle_query): Check if there's a thread selected instead of
3652 checking whether there's any thread in the thread list.
3653 (handle_qxfer_threads, handle_qxfer_btrace)
3654 (handle_qxfer_btrace_conf): Don't error out early if there's no
3655 thread in the thread list.
3656 (handle_v_cont, myresume): Don't set the current thread to the
3657 continue thread.
3658 (process_serial_event) <Hg handling>: Also set thread_id if the
3659 previous general thread is still alive.
3660 (process_serial_event) <g/G handling>: If setting the current
3661 thread to the general thread fails, error out.
3662 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3663 thread's lwp instead of the current thread's.
3664 * target.c (set_desired_thread): If the desired thread was not
3665 found, leave the current thread pointing to NULL. Return an int
3666 (boolean) indicating success.
3667 * target.h (set_desired_thread): Change return type to int.
3668
3669 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3670
3671 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3672 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3673 #includes.
3674 (ps_get_thread_area): New function.
3675
3676 2015-08-19 Gary Benson <gbenson@redhat.com>
3677
3678 * hostio.c (handle_pread): Do not attempt to read more data
3679 than hostio_reply_with_data can fit in a packet.
3680
3681 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3682
3683 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3684
3685 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3686
3687 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3688
3689 2015-08-06 Pedro Alves <palves@redhat.com>
3690
3691 * tracepoint.c (expr_eval_result): Now an int.
3692
3693 2015-08-06 Pedro Alves <palves@redhat.com>
3694
3695 * gdbthread.h (struct regcache): Forward declare.
3696 (struct thread_info) <regcache_data>: Now a struct regcache
3697 pointer.
3698 * inferiors.c (inferior_regcache_data)
3699 (set_inferior_regcache_data): Now work with struct regcache
3700 pointers.
3701 * inferiors.h (struct regcache): Forward declare.
3702 (inferior_regcache_data, set_inferior_regcache_data): Now work
3703 with struct regcache pointers.
3704 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3705 (free_register_cache_thread): Remove struct regcache pointer
3706 casts.
3707
3708 2015-08-06 Pedro Alves <palves@redhat.com>
3709
3710 * server.c (captured_main): On error, print the exception message
3711 to stderr, and if run_once is set, throw a quit.
3712
3713 2015-08-06 Pedro Alves <palves@redhat.com>
3714
3715 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3716 the current thread.
3717
3718 2015-08-06 Pedro Alves <palves@redhat.com>
3719
3720 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3721 reading beyond the passed in buffer length.
3722
3723 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3724
3725 * tracepoint.c (symbol_list) <required>: Remove.
3726
3727 2015-08-06 Pedro Alves <palves@redhat.com>
3728
3729 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3730 count if stopping and suspending threads.
3731 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3732 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3733 (linux_detach): Complete an ongoing step-over.
3734 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3735 throughout.
3736 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3737 (linux_wait_1): If passing a signal to the inferior after
3738 finishing a step-over, unsuspend and re-resume all lwps. If we
3739 see a single-step event but the thread should be continuing, don't
3740 pass the trap to gdb.
3741 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3742 internal_error instead of gdb_assert.
3743 (enqueue_pending_signal): New function.
3744 (check_ptrace_stopped_lwp_gone): Add debug output.
3745 (start_step_over): Use internal_error instead of gdb_assert.
3746 (complete_ongoing_step_over): New function.
3747 (linux_resume_one_thread): Don't resume a suspended thread.
3748 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3749 it stepping.
3750
3751 2015-08-06 Pedro Alves <palves@redhat.com>
3752
3753 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3754 (linux_thread_alive): Use lwp_is_marked_dead.
3755 (extended_event_reported): Delete.
3756 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3757 instead of extended_event_reported.
3758 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3759 as well.
3760 (lwp_is_marked_dead): New function.
3761 (lwp_running): Use lwp_is_marked_dead.
3762 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3763 comment.
3764
3765 2015-08-06 Pedro Alves <palves@redhat.com>
3766
3767 * linux-low.c (linux_wait_1): Move fork event output out of the
3768 !report_to_gdb check. Pass event_child->waitstatus to
3769 target_waitstatus_to_string instead of ourstatus.
3770
3771 2015-08-04 Yao Qi <yao.qi@linaro.org>
3772
3773 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3774 if current_thread is 32 bit.
3775
3776 2015-08-04 Yao Qi <yao.qi@linaro.org>
3777
3778 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3779 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3780 * server.c (extended_protocol): Remove "static".
3781 * server.h (extended_protocol): Declare it.
3782
3783 2015-08-04 Yao Qi <yao.qi@linaro.org>
3784
3785 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3786 both aarch64 and aarch32.
3787 (aarch64_set_pc): Likewise.
3788
3789 2015-08-04 Yao Qi <yao.qi@linaro.org>
3790
3791 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3792 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3793 arm-with-neon.xml to srv_xmlfiles.
3794 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3795 (is_64bit_tdesc): New function.
3796 (aarch64_linux_read_description): New function.
3797 (aarch64_arch_setup): Call aarch64_linux_read_description.
3798 (regs_info): Rename to regs_info_aarch64.
3799 (aarch64_regs_info): Return right regs_info.
3800 (initialize_low_arch): Call initialize_low_arch_aarch32.
3801
3802 2015-08-04 Yao Qi <yao.qi@linaro.org>
3803
3804 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3805 * linux-aarch32-low.c: New file.
3806 * linux-aarch32-low.h: New file.
3807 * linux-arm-low.c (arm_fill_gregset): Move it to
3808 linux-aarch32-low.c.
3809 (arm_store_gregset): Likewise.
3810 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3811 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3812 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3813 (regs_info): Rename to regs_info_arm.
3814 (arm_regs_info): Return regs_info_aarch32 if
3815 have_ptrace_getregset is 1 and target description is
3816 arm_with_neon or arm_with_vfpv3.
3817 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3818 Call initialize_low_arch_aarch32 instead.
3819
3820 2015-08-04 Yao Qi <yao.qi@linaro.org>
3821
3822 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3823 * linux-low.c: ... here.
3824 * linux-low.h (have_ptrace_getregset): Declare it.
3825
3826 2015-08-04 Pedro Alves <palves@redhat.com>
3827
3828 * thread-db.c (struct thread_db): Use new typedefs.
3829 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3830 CHK calls.
3831 (disable_thread_event_reporting): Cast result of dlsym to
3832 destination function pointer type.
3833 (thread_db_mourn): Use td_ta_delete_ftype.
3834
3835 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3836
3837 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3838 arch variant.
3839 (CDX_BREAKPOINT): Define for R2.
3840 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3841 (the_low_target): Add comments.
3842
3843 2015-07-30 Yao Qi <yao.qi@linaro.org>
3844
3845 * linux-arm-low.c (arm_hwcap): Remove it.
3846 (arm_read_description): New local variable arm_hwcap. Don't
3847 set arm_hwcap to zero.
3848
3849 2015-07-30 Yao Qi <yao.qi@linaro.org>
3850
3851 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3852 Use regcache->tdesc instead.
3853 (arm_store_wmmxregset): Likewise.
3854 (arm_fill_vfpregset): Likewise.
3855 (arm_store_vfpregset): Likewise.
3856
3857 2015-07-30 Yao Qi <yao.qi@linaro.org>
3858
3859 * linux-arm-low.c: Include arch/arm.h.
3860 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3861 (arm_store_gregset): Likewise.
3862
3863 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3864
3865 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3866 ptrace's 4th parameter.
3867
3868 2015-07-27 Yao Qi <yao.qi@linaro.org>
3869
3870 * configure.srv (case aarch64*-*-linux*): Don't set
3871 srv_linux_usrregs.
3872
3873 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3874
3875 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3876 sys/ptrace.h.
3877 * linux-arm-low.c: Likewise.
3878 * linux-cris-low.c: Likewise.
3879 * linux-crisv32-low.c: Likewise.
3880 * linux-low.c: Likewise.
3881 * linux-m68k-low.c: Likewise.
3882 * linux-mips-low.c: Likewise.
3883 * linux-nios2-low.c: Likewise.
3884 * linux-s390-low.c: Likewise.
3885 * linux-sparc-low.c: Likewise.
3886 * linux-tic6x-low.c: Likewise.
3887 * linux-tile-low.c: Likewise.
3888 * linux-x86-low.c: Likewise.
3889
3890 2015-07-24 Pedro Alves <palves@redhat.com>
3891
3892 * config.in: Regenerate.
3893 * configure: Regenerate.
3894
3895 2015-07-24 Pedro Alves <palves@redhat.com>
3896
3897 * acinclude.m4: Include ../ptrace.m4.
3898 * configure.ac: Call GDB_AC_PTRACE.
3899 * config.in, configure: Regenerate.
3900
3901 2015-07-24 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-low.c (linux_create_inferior): Remove setting to
3904 proc->priv->new_inferior.
3905 (linux_attach): Likewise.
3906 (linux_low_filter_event): Likewise.
3907 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3908
3909 2015-07-24 Yao Qi <yao.qi@linaro.org>
3910
3911 * linux-low.c (linux_arch_setup): New function.
3912 (linux_low_filter_event): If proc->tdesc is NULL and
3913 proc->attached is true, call the_low_target.arch_setup.
3914 Otherwise, keep status pending, and return.
3915 (linux_resume_one_lwp_throw): Don't call get_pc if
3916 thread->while_stepping isn't NULL. Don't call
3917 get_thread_regcache if proc->tdesc is NULL.
3918 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3919 (linux_target_ops): Install arch_setup.
3920 * server.c (start_inferior): Call the_target->arch_setup.
3921 * target.h (struct target_ops) <arch_setup>: New field.
3922 (target_arch_setup): New marco.
3923 * lynx-low.c (lynx_target_ops): Update.
3924 * nto-low.c (nto_target_ops): Update.
3925 * spu-low.c (spu_target_ops): Update.
3926 * win32-low.c (win32_target_ops): Update.
3927
3928 2015-07-24 Yao Qi <yao.qi@linaro.org>
3929
3930 * linux-low.c (linux_add_process): Don't set
3931 proc->priv->new_inferior.
3932 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3933 (linux_attach): Likewise.
3934
3935 2015-07-24 Yao Qi <yao.qi@linaro.org>
3936
3937 * server.c (start_inferior): Code refactor.
3938
3939 2015-07-24 Yao Qi <yao.qi@linaro.org>
3940
3941 * server.c (process_serial_event): Set general_thread.
3942
3943 2015-07-21 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3946 aarch64_linux_get_debug_reg_capacity.
3947
3948 2015-07-17 Yao Qi <yao.qi@linaro.org>
3949
3950 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3951 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3952 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3953 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3954 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3955 (AARCH64_HWP_ALIGNMENT): Likewise.
3956 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3957 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3958 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3959 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3960 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3961 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3962 (struct aarch64_debug_reg_state): Likewise.
3963 (struct arch_lwp_info): Likewise.
3964 (aarch64_align_watchpoint): Likewise.
3965 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3966 (aarch64_watchpoint_length): Likewise.
3967 (aarch64_point_encode_ctrl_reg): Likewise
3968 (aarch64_point_is_aligned): Likewise.
3969 (aarch64_align_watchpoint): Likewise.
3970 (aarch64_linux_set_debug_regs):
3971 (aarch64_dr_state_insert_one_point): Likewise.
3972 (aarch64_dr_state_remove_one_point): Likewise.
3973 (aarch64_handle_breakpoint): Likewise.
3974 (aarch64_handle_aligned_watchpoint): Likewise.
3975 (aarch64_handle_unaligned_watchpoint): Likewise.
3976 (aarch64_handle_watchpoint): Likewise.
3977
3978 2015-07-17 Yao Qi <yao.qi@linaro.org>
3979
3980 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3981 and don't aarch64_get_debug_reg_state. All callers update.
3982 (aarch64_handle_aligned_watchpoint): Likewise.
3983 (aarch64_handle_unaligned_watchpoint): Likewise.
3984 (aarch64_handle_watchpoint): Likewise.
3985 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3986 (aarch64_remove_point): Likewise.
3987
3988 2015-07-17 Yao Qi <yao.qi@linaro.org>
3989
3990 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3991 debug_printf.
3992 (aarch64_handle_unaligned_watchpoint): Likewise.
3993
3994 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3995
3996 Revert the previous 3 commits:
3997 Move gdb_regex* to common/
3998 Move linux_find_memory_regions_full & co.
3999 gdbserver build-id attribute generator
4000
4001 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4002 Jan Kratochvil <jan.kratochvil@redhat.com>
4003
4004 gdbserver build-id attribute generator.
4005 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4006 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4007 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4008 (find_phdr): New.
4009 (get_dynamic): Use find_pdhr to traverse program headers.
4010 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4011 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4012 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4013 (get_hex_build_id): New.
4014 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4015 to reply XML document.
4016
4017 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4018 Jan Kratochvil <jan.kratochvil@redhat.com>
4019
4020 * target.c: Include target/target-utils.h and fcntl.h.
4021 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4022 (target_fileio_read_stralloc): New functions.
4023
4024 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4025
4026 * Makefile.in (OBS): Add gdb_regex.o.
4027 (gdb_regex.o): New.
4028 * config.in: Rebuilt.
4029 * configure: Rebuilt.
4030
4031 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4032 Jan Kratochvil <jan.kratochvil@redhat.com>
4033
4034 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4035 * Makefile.in (OBS): Add target-utils.o.
4036 (linux-maps.o, target-utils.o): New.
4037 * configure.srv (srv_linux_obj): Add linux-maps.o.
4038
4039 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4040
4041 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4042 function, return 1.
4043 (the_low_target): Install it.
4044
4045 2015-07-14 Pedro Alves <palves@redhat.com>
4046
4047 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4048 Instead, ignore ECHILD, and throw an error for other errnos.
4049
4050 2015-07-10 Pedro Alves <palves@redhat.com>
4051
4052 * event-loop.c (struct callback_event) <data>: Change type to
4053 gdb_client_data instance instead of gdb_client_data pointer.
4054 (append_callback_event): Adjust.
4055
4056 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4057
4058 * linux-aarch64-low.c: Add comments for each linux_target_ops
4059 method. Remove comments already covered in target_ops and
4060 linux_target_ops definitions.
4061 (the_low_target): Add comments for each unimplemented method.
4062
4063 2015-07-09 Yao Qi <yao.qi@linaro.org>
4064
4065 * linux-aarch64-low.c (aarch64_regmap): Remove.
4066 (aarch64_usrregs_info): Remove.
4067 (regs_info): Set field usrregs to NULL.
4068
4069 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4070
4071 * linux-low.c: Include "rsp-low.h"
4072 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4073 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4074 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4075 (handle_btrace_enable_pt): New.
4076 (handle_btrace_general_set): Support "pt".
4077 (handle_btrace_conf_general_set): Support "pt:size".
4078
4079 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4080
4081 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4082 Z_PACKET_SW_BP.
4083
4084 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4085
4086 * linux-aarch64-low.c: Remove comment about endianness.
4087 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4088 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4089 memcmp.
4090
4091 2015-06-24 Gary Benson <gbenson@redhat.com>
4092
4093 * linux-i386-ipa.c (stdint.h): Do not include.
4094 * lynx-i386-low.c (stdint.h): Likewise.
4095 * lynx-ppc-low.c (stdint.h): Likewise.
4096 * mem-break.c (stdint.h): Likewise.
4097 * thread-db.c (stdint.h): Likewise.
4098 * tracepoint.c (stdint.h): Likewise.
4099 * win32-low.c (stdint.h): Likewise.
4100
4101 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4102
4103 * server.c (write_qxfer_response): Update call to
4104 remote_escape_output.
4105
4106 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4107 Jan Kratochvil <jan.kratochvil@redhat.com>
4108
4109 Merge multiple hex conversions.
4110 * gdbreplay.c (tohex): Rename to 'fromhex'.
4111 (logchar): Use fromhex.
4112
4113 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4114
4115 * server.c (handle_qxfer_libraries): Set `version' attribute for
4116 <library-list>.
4117
4118 2015-06-10 Gary Benson <gbenson@redhat.com>
4119
4120 * target.h (struct target_ops) <multifs_open>: New field.
4121 <multifs_unlink>: Likewise.
4122 <multifs_readlink>: Likewise.
4123 * linux-low.c (nat/linux-namespaces.h): New include.
4124 (linux_target_ops): Initialize the_target->multifs_open,
4125 the_target->multifs_unlink and the_target->multifs_readlink.
4126 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4127 * hostio.c (hostio_fs_pid): New static variable.
4128 (hostio_handle_new_gdb_connection): New function.
4129 (handle_setfs): Likewise.
4130 (handle_open): Use the_target->multifs_open as appropriate.
4131 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4132 (handle_readlink): Use the_target->multifs_readlink as
4133 appropriate.
4134 (handle_vFile): Handle vFile:setfs packets.
4135 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4136 after target_handle_new_gdb_connection.
4137
4138 2015-06-10 Gary Benson <gbenson@redhat.com>
4139
4140 * configure.ac (AC_CHECK_FUNCS): Add setns.
4141 * config.in: Regenerate.
4142 * configure: Likewise.
4143 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4144 (linux-namespaces.o): New rule.
4145 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4146
4147 2015-06-09 Gary Benson <gbenson@redhat.com>
4148
4149 * hostio.c (handle_open): Process mode argument with
4150 fileio_to_host_mode.
4151
4152 2015-06-01 Yao Qi <yao.qi@linaro.org>
4153
4154 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4155 * linux-x86-low.c: Likewise.
4156
4157 2015-05-28 Don Breazeal <donb@codesourcery.com>
4158
4159 * linux-low.c (handle_extended_wait): Initialize
4160 thread_info.last_resume_kind for new fork children.
4161
4162 2015-05-15 Pedro Alves <palves@redhat.com>
4163
4164 * target.h (target_handle_new_gdb_connection): Rewrite using if
4165 wrapped in do/while.
4166
4167 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4168
4169 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4170 * configure, config.in: Regenerate.
4171 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4172 Declare typedef.
4173
4174 2015-05-12 Don Breazeal <donb@codesourcery.com>
4175
4176 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4177 PTRACE_EVENT_VFORK_DONE.
4178 (linux_low_ptrace_options, extended_event_reported): Add vfork
4179 events.
4180 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4181 and "vforkdone" for RSP 'T' Stop Reply Packet.
4182 * server.h (report_vfork_events): Declare
4183 global variable.
4184
4185 2015-05-12 Don Breazeal <donb@codesourcery.com>
4186
4187 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4188 (the_low_target) <new_fork>: Initialize new member.
4189 * linux-arm-low.c (arm_new_fork): New function.
4190 (the_low_target) <new_fork>: Initialize new member.
4191 * linux-low.c (handle_extended_wait): Call new target function
4192 new_fork.
4193 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4194 * linux-mips-low.c (mips_add_watchpoint): New function
4195 extracted from mips_insert_point.
4196 (the_low_target) <new_fork>: Initialize new member.
4197 (mips_linux_new_fork): New function.
4198 (mips_insert_point): Call mips_add_watchpoint.
4199 * linux-x86-low.c (x86_linux_new_fork): New function.
4200 (the_low_target) <new_fork>: Initialize new member.
4201
4202 2015-05-12 Don Breazeal <donb@codesourcery.com>
4203
4204 * linux-low.c (handle_extended_wait): Implement return value,
4205 rename argument 'event_child' to 'event_lwp', handle
4206 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4207 (linux_low_ptrace_options): New function.
4208 (linux_low_filter_event): Call linux_low_ptrace_options,
4209 use different argument fo linux_enable_event_reporting,
4210 use return value from handle_extended_wait.
4211 (extended_event_reported): New function.
4212 (linux_wait_1): Call extended_event_reported and set
4213 status to report fork events.
4214 (linux_write_memory): Add pid to debug message.
4215 (reset_lwp_ptrace_options_callback): New function.
4216 (linux_handle_new_gdb_connection): New function.
4217 (linux_target_ops): Initialize new structure member.
4218 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4219 * lynx-low.c: Initialize new structure member.
4220 * remote-utils.c (prepare_resume_reply): Implement stop reason
4221 "fork" for "T" stop message.
4222 * server.c (handle_query): Call handle_new_gdb_connection.
4223 * server.h (report_fork_events): Declare global flag.
4224 * target.h (struct target_ops) <handle_new_gdb_connection>:
4225 New member.
4226 (target_handle_new_gdb_connection): New macro.
4227 * win32-low.c: Initialize new structure member.
4228
4229 2015-05-12 Don Breazeal <donb@codesourcery.com>
4230
4231 * mem-break.c (APPEND_TO_LIST): Define macro.
4232 (clone_agent_expr): New function.
4233 (clone_one_breakpoint): New function.
4234 (clone_all_breakpoints): New function.
4235 * mem-break.h: Declare new functions.
4236
4237 2015-05-12 Don Breazeal <donb@codesourcery.com>
4238
4239 * linux-low.c (linux_supports_fork_events): New function.
4240 (linux_supports_vfork_events): New function.
4241 (linux_target_ops): Initialize new structure members.
4242 (initialize_low): Call linux_check_ptrace_features.
4243 * lynx-low.c (lynx_target_ops): Initialize new structure
4244 members.
4245 * server.c (report_fork_events, report_vfork_events):
4246 New global flags.
4247 (handle_query): Add new features to qSupported packet and
4248 response.
4249 (captured_main): Initialize new global variables.
4250 * target.h (struct target_ops) <supports_fork_events>:
4251 New member.
4252 <supports_vfork_events>: New member.
4253 (target_supports_fork_events): New macro.
4254 (target_supports_vfork_events): New macro.
4255 * win32-low.c (win32_target_ops): Initialize new structure
4256 members.
4257
4258 2015-05-12 Gary Benson <gbenson@redhat.com>
4259
4260 * server.c (handle_qxfer_exec_file): Use current process
4261 if annex is empty.
4262
4263 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4264
4265 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4266 Remove HAVE_PTRACE_GETREGS conditionals.
4267 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4268 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4269
4270 2015-05-08 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-low.c (linux_supports_conditional_breakpoints): New
4273 function.
4274 (linux_target_ops): Install new target method.
4275 * lynx-low.c (lynx_target_ops): Install NULL hook for
4276 supports_conditional_breakpoints.
4277 * nto-low.c (nto_target_ops): Likewise.
4278 * spu-low.c (spu_target_ops): Likewise.
4279 * win32-low.c (win32_target_ops): Likewise.
4280 * server.c (handle_query): Check
4281 target_supports_conditional_breakpoints.
4282 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4283 New field.
4284 (target_supports_conditional_breakpoints): New macro.
4285
4286 2015-05-06 Pedro Alves <palves@redhat.com>
4287
4288 PR server/18081
4289 * server.c (start_inferior): If the process exits, mourn it.
4290
4291 2015-04-21 Gary Benson <gbenson@redhat.com>
4292
4293 * hostio.c (fileio_open_flags_to_host): Factored out to
4294 fileio_to_host_openflags in common/fileio.c. Single use
4295 updated.
4296
4297 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4298
4299 * linux-xtensa-low.c (xtensa_fill_gregset)
4300 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4301 XCHAL_HAVE_LOOP.
4302
4303 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4304
4305 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4306 (regs_info): Replace usrregs pointer with NULL.
4307
4308 2015-04-17 Gary Benson <gbenson@redhat.com>
4309
4310 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4311 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4312 * server.c (handle_qxfer_exec_file): New function.
4313 (qxfer_packets): Add exec-file entry.
4314 (handle_query): Report qXfer:exec-file:read as supported packet.
4315
4316 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4317
4318 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4319
4320 2015-04-09 Gary Benson <gbenson@redhat.com>
4321
4322 * hostio-errno.c (errno_to_fileio_error): Remove function.
4323 Update caller to use remote_fileio_to_fio_error.
4324
4325 2015-04-09 Yao Qi <yao.qi@linaro.org>
4326
4327 * linux-low.c (linux_insert_point): Call
4328 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4329 (linux_remove_point): Call remove_memory_breakpoint if type is
4330 raw_bkpt_type_sw.
4331 * linux-x86-low.c (x86_insert_point): Don't call
4332 insert_memory_breakpoint.
4333 (x86_remove_point): Don't call remove_memory_breakpoint.
4334
4335 2015-04-01 Pedro Alves <palves@redhat.com>
4336 Cleber Rosa <crosa@redhat.com>
4337
4338 * server.c (gdbserver_usage): Reorganize and extend the usage
4339 message.
4340
4341 2015-03-24 Pedro Alves <palves@redhat.com>
4342
4343 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4344 output. Also dump TRAP_TRACE.
4345 (linux_low_filter_event): In debug output, distinguish a
4346 resume_stop SIGSTOP from a delayed SIGSTOP.
4347
4348 2015-03-24 Gary Benson <gbenson@redhat.com>
4349
4350 * linux-x86-low.c (x86_linux_new_thread): Moved to
4351 nat/x86-linux.c.
4352 (x86_linux_prepare_to_resume): Likewise.
4353
4354 2015-03-24 Gary Benson <gbenson@redhat.com>
4355
4356 * Makefile.in (x86-linux-dregs.o): New rule.
4357 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4358 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4359 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4360 (x86_linux_dr_get): Likewise.
4361 (x86_linux_dr_set): Likewise.
4362 (update_debug_registers_callback): Likewise.
4363 (x86_linux_dr_set_addr): Likewise.
4364 (x86_linux_dr_get_addr): Likewise.
4365 (x86_linux_dr_set_control): Likewise.
4366 (x86_linux_dr_get_control): Likewise.
4367 (x86_linux_dr_get_status): Likewise.
4368 (x86_linux_update_debug_registers): Likewise.
4369
4370 2015-03-24 Gary Benson <gbenson@redhat.com>
4371
4372 * linux-x86-low.c (x86_linux_update_debug_registers):
4373 New function, factored out from...
4374 (x86_linux_prepare_to_resume): ...this.
4375
4376 2015-03-24 Gary Benson <gbenson@redhat.com>
4377
4378 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4379 (x86_linux_dr_set): Likewise.
4380 (update_debug_registers_callback): Likewise.
4381 (x86_linux_dr_set_addr): Likewise.
4382 (x86_linux_dr_get_addr): Likewise.
4383 (x86_linux_dr_set_control): Likewise.
4384 (x86_linux_dr_get_control): Likewise.
4385 (x86_linux_dr_get_status): Likewise.
4386 (x86_linux_prepare_to_resume): Likewise.
4387
4388 2015-03-24 Gary Benson <gbenson@redhat.com>
4389
4390 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4391 Use perror_with_name. Pass string through gettext.
4392 (x86_linux_dr_set): Likewise.
4393
4394 2015-03-24 Gary Benson <gbenson@redhat.com>
4395
4396 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4397 (x86_linux_dr_set_addr): ...this.
4398 (x86_dr_low_get_addr): Rename to...
4399 (x86_linux_dr_get_addr): ...this.
4400 (x86_dr_low_set_control): Rename to...
4401 (x86_linux_dr_set_control): ...this.
4402 (x86_dr_low_get_control): Rename to...
4403 (x86_linux_dr_get_control): ...this.
4404 (x86_dr_low_get_status): Rename to...
4405 (x86_linux_dr_get_status): ...this.
4406 (x86_dr_low): Update with new function names.
4407
4408 2015-03-24 Gary Benson <gbenson@redhat.com>
4409
4410 * Makefile.in (x86-linux.o): New rule.
4411 * configure.srv: Add x86-linux.o to relevant targets.
4412 * linux-low.c (lwp_set_arch_private_info): New function.
4413 (lwp_arch_private_info): Likewise.
4414 * linux-x86-low.c: Include nat/x86-linux.h.
4415 (arch_lwp_info): Removed structure.
4416 (update_debug_registers_callback):
4417 Use lwp_set_debug_registers_changed.
4418 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4419 and lwp_set_debug_registers_changed.
4420 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4421
4422 2015-03-24 Gary Benson <gbenson@redhat.com>
4423
4424 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4425 * linux-arm-low.c (arm_new_thread): Likewise.
4426 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4427 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4428 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4429 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4430
4431 2015-03-24 Gary Benson <gbenson@redhat.com>
4432
4433 * linux-low.c (ptid_of_lwp): New function.
4434 (lwp_is_stopped): Likewise.
4435 (lwp_stop_reason): Likewise.
4436 * linux-x86-low.c (update_debug_registers_callback):
4437 Use lwp_is_stopped.
4438 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4439 lwp_stop_reason.
4440
4441 2015-03-24 Gary Benson <gbenson@redhat.com>
4442
4443 * linux-low.h (linux_stop_lwp): Remove declaration.
4444
4445 2015-03-24 Gary Benson <gbenson@redhat.com>
4446
4447 * linux-low.h: Include nat/linux-nat.h.
4448 * linux-low.c (iterate_over_lwps_args): New structure.
4449 (iterate_over_lwps_filter): New function.
4450 (iterate_over_lwps): Likewise.
4451 * linux-x86-low.c (update_debug_registers_callback):
4452 Update signature to what iterate_over_lwps expects.
4453 Remove PID check that iterate_over_lwps now performs.
4454 (x86_dr_low_set_addr): Use iterate_over_lwps.
4455 (x86_dr_low_set_control): Likewise.
4456
4457 2015-03-24 Gary Benson <gbenson@redhat.com>
4458
4459 * linux-x86-low.c (x86_debug_reg_state): New function.
4460 (x86_linux_prepare_to_resume): Use the above.
4461
4462 2015-03-24 Gary Benson <gbenson@redhat.com>
4463
4464 * linux-low.c (current_lwp_ptid): New function.
4465 * linux-x86-low.c: Include nat/linux-nat.h.
4466 (x86_dr_low_get_addr): Use current_lwp_ptid.
4467 (x86_dr_low_get_control): Likewise.
4468 (x86_dr_low_get_status): Likewise.
4469
4470 2015-03-20 Pedro Alves <palves@redhat.com>
4471
4472 * tracepoint.c (cmd_qtstatus): Make "str" const.
4473
4474 2015-03-20 Pedro Alves <palves@redhat.com>
4475
4476 * server.c (handle_general_set): Make "req_str" const.
4477
4478 2015-03-19 Pedro Alves <palves@redhat.com>
4479
4480 * linux-low.c (linux_resume_one_lwp): Rename to ...
4481 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4482 instead call perror_with_name.
4483 (check_ptrace_stopped_lwp_gone): New function.
4484 (linux_resume_one_lwp): Reimplement as wrapper around
4485 linux_resume_one_lwp_throw that swallows errors if the LWP is
4486 gone.
4487
4488 2015-03-19 Pedro Alves <palves@redhat.com>
4489
4490 * linux-low.c (count_events_callback, select_event_lwp_callback):
4491 No longer check whether the thread has resume_stop as last resume
4492 kind.
4493
4494 2015-03-19 Pedro Alves <palves@redhat.com>
4495
4496 * linux-low.c (count_events_callback, select_event_lwp_callback):
4497 Use the lwp's status_pending_p field, not the thread's.
4498
4499 2015-03-19 Pedro Alves <palves@redhat.com>
4500
4501 * linux-low.c (select_event_lwp_callback): Update comments to
4502 no longer mention SIGTRAP.
4503
4504 2015-03-18 Gary Benson <gbenson@redhat.com>
4505
4506 * server.c (handle_query): Do not report vFile:fstat as supported.
4507
4508 2015-03-11 Gary Benson <gbenson@redhat.com>
4509
4510 * hostio.c (sys/types.h): New include.
4511 (sys/stat.h): Likewise.
4512 (common-remote-fileio.h): Likewise.
4513 (handle_fstat): New function.
4514 (handle_vFile): Handle vFile:fstat packets.
4515
4516 2015-03-11 Gary Benson <gbenson@redhat.com>
4517
4518 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4519 struct stat.st_blocks and struct stat.st_blksize.
4520 * configure: Regenerate.
4521 * config.in: Likewise.
4522 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4523 (OBS): Add common-remote-fileio.o.
4524 (common-remote-fileio.o): New rule.
4525
4526 2015-03-09 Pedro Alves <palves@redhat.com>
4527
4528 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4529 'struct sockaddr' pointer in 'accept' call.
4530
4531 2015-03-09 Pedro Alves <palves@redhat.com>
4532
4533 Revert:
4534 2015-03-07 Pedro Alves <palves@redhat.com>
4535 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4536 or <winsock2.h> here. Instead include "gdb_socket.h".
4537 (remote_open): Use union gdb_sockaddr_u.
4538 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4539 or <winsock2.h> here. Instead include "gdb_socket.h".
4540 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4541 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4542 or <sys/un.h>.
4543 (init_named_socket, gdb_agent_helper_thread): Use union
4544 gdb_sockaddr_u.
4545
4546 2015-03-07 Pedro Alves <palves@redhat.com>
4547
4548 * configure.ac (build_warnings): Move
4549 -Wdeclaration-after-statement to the C-specific set.
4550 * configure: Regenerate.
4551
4552 2015-03-07 Pedro Alves <palves@redhat.com>
4553
4554 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4555 or <winsock2.h> here. Instead include "gdb_socket.h".
4556 (remote_open): Use union gdb_sockaddr_u.
4557 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4558 or <winsock2.h> here. Instead include "gdb_socket.h".
4559 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4560 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4561 or <sys/un.h>.
4562 (init_named_socket, gdb_agent_helper_thread): Use union
4563 gdb_sockaddr_u.
4564
4565 2015-03-07 Pedro Alves <palves@redhat.com>
4566
4567 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4568 instead.
4569
4570 2015-03-06 Yao Qi <yao.qi@linaro.org>
4571
4572 * linux-aarch64-low.c (aarch64_insert_point): Use
4573 show_debug_regs as a boolean.
4574 (aarch64_remove_point): Likewise.
4575
4576 2015-03-05 Pedro Alves <palves@redhat.com>
4577
4578 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4579 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4580 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4581 * nto-low.c (nto_target_ops): Likewise.
4582 * spu-low.c (spu_target_ops): Likewise.
4583 * win32-low.c (win32_target_ops): Likewise.
4584
4585 2015-03-04 Pedro Alves <palves@redhat.com>
4586
4587 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4588 Decide whether a breakpoint triggered based on the SIGTRAP's
4589 siginfo.si_code.
4590 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4591 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4592 (linux_low_filter_event): Check for breakpoints before checking
4593 watchpoints.
4594 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4595 siginfo.si_code.
4596 (linux_stopped_by_sw_breakpoint)
4597 (linux_supports_stopped_by_sw_breakpoint)
4598 (linux_stopped_by_hw_breakpoint)
4599 (linux_supports_stopped_by_hw_breakpoint): New functions.
4600 (linux_target_ops): Install new target methods.
4601
4602 2015-03-04 Pedro Alves <palves@redhat.com>
4603
4604 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4605 * server.c (swbreak_feature, hwbreak_feature): New globals.
4606 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4607 (captured_main): Clear swbreak_feature and hwbreak_feature.
4608 * server.h (swbreak_feature, hwbreak_feature): Declare.
4609 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4610 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4611 supports_stopped_by_hw_breakpoint>: New fields.
4612 (target_supports_stopped_by_sw_breakpoint)
4613 (target_stopped_by_sw_breakpoint)
4614 (target_supports_stopped_by_hw_breakpoint)
4615 (target_stopped_by_hw_breakpoint): Declare.
4616
4617 2015-03-04 Pedro Alves <palves@redhat.com>
4618
4619 enum lwp_stop_reason -> enum target_stop_reason
4620 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4621 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4622 (linux_wait_1, stuck_in_jump_pad_callback)
4623 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4624 (linux_stopped_by_watchpoint):
4625 * linux-low.h (enum lwp_stop_reason): Delete.
4626 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4627 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4628
4629 2015-03-04 Yao Qi <yao.qi@linaro.org>
4630
4631 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4632
4633 2015-03-03 Gary Benson <gbenson@redhat.com>
4634
4635 * hostio.c (handle_vFile): Fix prefix lengths.
4636
4637 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4638
4639 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4640 ptr_bits.
4641
4642 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4643
4644 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4645 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4646 (clean): Add "rm -f" for above C files.
4647 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4648 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4649 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4650 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4651 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4652 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4653 (init_registers_s390x_vx_linux64)
4654 (init_registers_s390x_tevx_linux64)
4655 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4656 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4657 declarations.
4658 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4659 (s390_store_vxrs_high): New functions.
4660 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4661 NT_S390_VXRS_HIGH.
4662 (s390_arch_setup): Add logic for selecting one of the new target
4663 descriptions. Activate the new vector regsets if applicable.
4664 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4665 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4666 and init_registers_s390x_tevx_linux64.
4667
4668 2015-03-01 Pedro Alves <palves@redhat.com>
4669
4670 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4671 parameter.
4672
4673 2015-02-27 Pedro Alves <palves@redhat.com>
4674
4675 * linux-x86-low.c (u_debugreg_offset): New function.
4676 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4677
4678 2015-02-27 Pedro Alves <palves@redhat.com>
4679
4680 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4681 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4682 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4683 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4684 (ps_lsetfpregs, ps_getpid)
4685 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4686 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4687 (ps_lsetxregs, ps_plog): Declare.
4688
4689 2015-02-27 Pedro Alves <palves@redhat.com>
4690
4691 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4692 IP_AGENT_EXPORT_FUNC.
4693 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4694 IP_AGENT_EXPORT_FUNC.
4695 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4696 (IP_AGENT_EXPORT): Delete.
4697 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4698 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4699 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4700 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4701 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4702 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4703 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4704 (traceframe_read_count, traceframe_write_count)
4705 (traceframes_created, trace_state_variables, get_raw_reg)
4706 (get_trace_state_variable_value, set_trace_state_variable_value)
4707 (ust_loaded, helper_thread_id, cmd_buf): Use
4708 IPA_SYM_EXPORTED_NAME.
4709 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4710 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4711 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4712 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4713 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4714 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4715 EXTERN_C_PUSH/EXTERN_C_POP.
4716 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4717 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4718 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4719 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4720 (traceframe_write_count, traceframe_read_count)
4721 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4722 (about_to_request_buffer_space, get_trace_state_variable_value)
4723 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4724 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4725 EXTERN_C_PUSH/EXTERN_C_POP.
4726 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4727 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4728 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4729 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4730 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4731 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4732 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4733 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4734 Define.
4735 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4736 (IP_AGENT_EXPORT_VAR_DECL): Define.
4737 (tracing): Declare.
4738 (gdb_agent_get_raw_reg): Declare.
4739
4740 2015-02-27 Tom Tromey <tromey@redhat.com>
4741 Pedro Alves <palves@redhat.com>
4742
4743 Rename symbols whose names are reserved C++ keywords throughout.
4744
4745 2015-02-27 Pedro Alves <palves@redhat.com>
4746
4747 * Makefile.in (COMPILER): New, get it from autoconf.
4748 (CXX): Get from autoconf instead.
4749 (COMPILE.pre): Use COMPILER.
4750 (CC-LD): Rename to ...
4751 (CC_LD): ... this. Use COMPILER.
4752 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4753 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4754 * acinclude.m4: Include build-with-cxx.m4.
4755 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4756 Disable -Werror by default if building in C++ mode.
4757 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4758 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4759 the C++ compiler. Save/restore CXXFLAGS too.
4760 * configure: Regenerate.
4761
4762 2015-02-27 Pedro Alves <palves@redhat.com>
4763
4764 * acinclude.m4: Include libiberty.m4.
4765 * configure.ac: Call libiberty_INIT.
4766 * config.in, configure: Regenerate.
4767
4768 2015-02-26 Pedro Alves <palves@redhat.com>
4769
4770 * linux-low.c (linux_wait_1): When incrementing the PC past a
4771 program breakpoint always use the_low_target.breakpoint_len as
4772 increment, rather than the maximum between that and
4773 the_low_target.decr_pc_after_break.
4774
4775 2015-02-23 Pedro Alves <palves@redhat.com>
4776
4777 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4778 thread was doing a step-over; always adjust the PC if
4779 we stepped over a permanent breakpoint.
4780 (linux_wait_1): If we stepped over breakpoint that was on top of a
4781 permanent breakpoint, manually advance the PC past it.
4782
4783 2015-02-23 Pedro Alves <palves@redhat.com>
4784
4785 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4786 modes.
4787 (x86_fill_gregset, x86_store_gregset): Use it when handling
4788 $orig_eax.
4789
4790 2015-02-20 Pedro Alves <palves@redhat.com>
4791
4792 * thread-db.c: Include "nat/linux-procfs.h".
4793 (thread_db_init): Skip listing new threads if the kernel supports
4794 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4795
4796 2015-02-20 Pedro Alves <palves@redhat.com>
4797
4798 * linux-low.c (status_pending_p_callback): Use ptid_match.
4799
4800 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4801
4802 PR breakpoints/16812
4803 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4804 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4805 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4806
4807 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4808
4809 PR breakpoints/15956
4810 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4811
4812 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4813
4814 * linux-low.c (linux_low_btrace_conf): Print size.
4815 * server.c (handle_btrace_conf_general_set): New.
4816 (hanle_general_set): Call handle_btrace_conf_general_set.
4817 (handle_query): Report Qbtrace-conf:bts:size as supported.
4818
4819 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4820
4821 * linux-low.c (linux_low_enable_btrace): Update parameters.
4822 (linux_low_btrace_conf): New.
4823 (linux_target_ops)<to_btrace_conf>: Initialize.
4824 * server.c (current_btrace_conf): New.
4825 (handle_btrace_enable): Rename to ...
4826 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4827 to target_enable_btrace. Update comment. Update users.
4828 (handle_qxfer_btrace_conf): New.
4829 (qxfer_packets): Add btrace-conf entry.
4830 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4831 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4832 (target_ops)<read_btrace_conf>: New.
4833 (target_enable_btrace): Update parameters.
4834 (target_read_btrace_conf): New.
4835
4836 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4837
4838 * server.c (handle_btrace_general_set): Remove call to
4839 target_supports_btrace.
4840 (supported_btrace_packets): New.
4841 (handle_query): Call supported_btrace_packets.
4842 * target.h: include btrace-common.h.
4843 (btrace_target_info): Removed.
4844 (supports_btrace, target_supports_btrace): Update parameters.
4845
4846 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4847
4848 * Makefile.in (SFILES): Add common/btrace-common.c.
4849 (OBS): Add common/btrace-common.o.
4850 (btrace-common.o): Add build rules.
4851 * linux-low: Include btrace-common.h.
4852 (linux_low_read_btrace): Use struct btrace_data. Call
4853 btrace_data_init and btrace_data_fini.
4854
4855 2015-02-06 Pedro Alves <palves@redhat.com>
4856
4857 * thread-db.c (find_new_threads_callback): Add debug output.
4858
4859 2015-02-04 Pedro Alves <palves@redhat.com>
4860
4861 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4862 (resume_stopped_resumed_lwps): New function.
4863 (linux_wait_for_event_filtered): Use it.
4864
4865 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4866
4867 * Makefile.in (SFILES): Add linux-personality.c.
4868 (linux-personality.o): New rule.
4869 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4870 list of objects to be built.
4871 * linux-low.c: Include nat/linux-personality.h.
4872 (linux_create_inferior): Remove code to disable address space
4873 randomization (moved to ../nat/linux-personality.c). Create
4874 cleanup to disable address space randomization.
4875
4876 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4877
4878 * Makefile.in (posix-strerror.o): New rule.
4879 (mingw-strerror.o): Likewise.
4880 * configure: Regenerated.
4881 * configure.ac: Source file ../common/common.host. Initialize new
4882 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4883
4884 2015-01-14 Yao Qi <yao@codesourcery.com>
4885
4886 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4887 (ppc-linux.o): New rule.
4888 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4889 * configure.ac: AC_CHECK_FUNCS(getauxval).
4890 * config.in: Re-generated.
4891 * configure: Re-generated.
4892 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4893 ppc64_64bit_inferior_p
4894
4895 2015-01-14 Yao Qi <yao@codesourcery.com>
4896
4897 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4898 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4899 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4900 (PT_ORIG_R3, PT_TRAP): Likewise.
4901 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4902 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4903 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4904
4905 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4906
4907 * i387-fp.c (i387_cache_to_xsave): In look over
4908 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4909 zmmh_low_space field by use of zmmh_high_space.
4910
4911 2015-01-09 Pedro Alves <palves@redhat.com>
4912
4913 * linux-low.c (step_over_bkpt): Move higher up in the file.
4914 (handle_extended_wait): Don't store the stop_pc here.
4915 (get_stop_pc): Adjust comments and rename to ...
4916 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4917 stopped for a software breakpoint or hardware breakpoint.
4918 (thread_still_has_status_pending_p): New function.
4919 (status_pending_p_callback): Use
4920 thread_still_has_status_pending_p. If the event is no longer
4921 interesting, resume the LWP.
4922 (handle_tracepoints): Add assert.
4923 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4924 (wstatus_maybe_breakpoint): New function.
4925 (cancel_breakpoint): Delete function.
4926 (check_stopped_by_watchpoint): New function, factored out from
4927 linux_low_filter_event.
4928 (lp_status_maybe_breakpoint): Delete function.
4929 (linux_low_filter_event): Remove filter_ptid argument.
4930 Leave thread group exits pending here. Store the LWP's stop PC.
4931 Always leave events pending.
4932 (linux_wait_for_event_filtered): Pull all events out of the
4933 kernel, and leave them all pending.
4934 (count_events_callback, select_event_lwp_callback): Consider all
4935 events.
4936 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4937 (select_event_lwp): Only give preference to the stepping LWP in
4938 all-stop mode. Adjust comments.
4939 (ignore_event): New function.
4940 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4941 references to cancel_breakpoints. Adjust to renames. Also give
4942 equal priority to all LWPs that have had events in non-stop mode.
4943 If reporting a software breakpoint event, unadjust the LWP's PC.
4944 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4945 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4946 Adjust.
4947 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4948 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4949 (linux_stopped_by_watchpoint): Adjust.
4950 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4951 * linux-low.h (enum lwp_stop_reason): New.
4952 (struct lwp_info) <stop_pc>: Adjust comment.
4953 <stopped_by_watchpoint>: Delete field.
4954 <stop_reason>: New field.
4955 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4956 * mem-break.c (software_breakpoint_inserted_here)
4957 (hardware_breakpoint_inserted_here): New function.
4958 * mem-break.h (software_breakpoint_inserted_here)
4959 (hardware_breakpoint_inserted_here): Declare.
4960 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4961 (cancel_breakpoints): Delete.
4962 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4963 (upload_fast_traceframes): Remove references to
4964 cancel_breakpoints.
4965
4966 2015-01-09 Pedro Alves <palves@redhat.com>
4967
4968 * thread-db.c (find_new_threads_callback): Ignore thread if the
4969 kernel thread ID is -1.
4970
4971 2015-01-09 Pedro Alves <palves@redhat.com>
4972
4973 * linux-low.c (linux_attach_fail_reason_string): Move to
4974 nat/linux-ptrace.c, and rename.
4975 (linux_attach_lwp): Update comment.
4976 (attach_proc_task_lwp_callback): New function.
4977 (linux_attach): Adjust to rename and use
4978 linux_proc_attach_tgid_threads.
4979 (linux_attach_fail_reason_string): Delete declaration.
4980
4981 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4982
4983 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4984 * server.c (gdbserver_version): Likewise.
4985
4986 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4987
4988 * remote-utils.c: Include ctype.h.
4989 (input_interrupt): Explicitly handle the case when the char
4990 received is the NUL byte. Improve the printing of non-ASCII
4991 characters.
4992
4993 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4994
4995 * linux-low.c (linux_low_filter_event): Update call to
4996 linux_enable_event_reporting following the addition of
4997 a new parameter to that function.
4998
4999 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5000
5001 PR server/17457
5002 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5003 (AARCH64_FPCR_REGNO): Likewise.
5004 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5005 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5006 (aarch64_store_fpregset): Likewise.
5007
5008 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5009
5010 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5011 Remove FIXME comment about assumption about N.
5012
5013 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5014
5015 * configure.ac: If large-file support is disabled in GDBserver,
5016 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5017 * configure: Regenerate.
5018
5019 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5020
5021 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5022 warning upon ENODATA from ptrace.
5023 * linux-s390-low.c (s390_store_tdb): New.
5024 (s390_regsets): Add regset for NT_S390_TDB.
5025
5026 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5027
5028 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5029 without a fill_function.
5030 * linux-s390-low.c (s390_fill_last_break): Remove.
5031 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5032 (s390_arch_setup): Use regset's size instead of fill_function for
5033 loop end condition.
5034
5035 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5036
5037 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5038 the regset's store function when ptrace returned an error.
5039 * regcache.c (get_thread_regcache): Invalidate register cache
5040 before fetching inferior's registers.
5041
5042 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5043
5044 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5045 while-loop as for-loop.
5046 (regsets_store_inferior_registers): Likewise.
5047
5048 2014-11-28 Yao Qi <yao@codesourcery.com>
5049
5050 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5051 * config.in, configure: Re-generate.
5052 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5053 is defined.
5054
5055 2014-11-21 Yao Qi <yao@codesourcery.com>
5056
5057 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5058 (AC_CHECK_HEADERS): Remove malloc.h.
5059 * configure: Re-generated.
5060 * config.in: Re-generated.
5061 * server.h: Don't include alloca.h and malloc.h.
5062 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5063 Don't include malloc.h.
5064
5065 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5066
5067 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5068 corresponding ERRNO check in same block.
5069
5070 2014-11-12 Pedro Alves <palves@redhat.com>
5071
5072 * server.c (cont_thread): Update comment.
5073 (start_inferior, attach_inferior): No longer clear cont_thread.
5074 (handle_v_cont): No longer set cont_thread.
5075 (captured_main): Clear cont_thread each time a GDB connects.
5076
5077 2014-11-12 Pedro Alves <palves@redhat.com>
5078
5079 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5080 thread, and don't resume all threads if the Hc thread has exited.
5081
5082 2014-11-12 Pedro Alves <palves@redhat.com>
5083
5084 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5085 the process group instead of to a specific LWP.
5086
5087 2014-10-15 Pedro Alves <palves@redhat.com>
5088
5089 PR server/17487
5090 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5091 parameter.
5092 (arm_set_thread_context): Delete.
5093 (the_low_target): Adjust.
5094 * win32-i386-low.c (debug_registers_changed)
5095 (debug_registers_used): Delete.
5096 (update_debug_registers_callback): New function.
5097 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5098 needing to update their debug registers.
5099 (win32_get_current_dr): New function.
5100 (x86_dr_low_get_addr, x86_dr_low_get_control)
5101 (x86_dr_low_get_status): Fetch the debug register from the thread
5102 record's context.
5103 (i386_initial_stuff): Adjust.
5104 (i386_get_thread_context): Remove current_event parameter. Don't
5105 clear debug_registers_changed nor copy DR values to
5106 debug_reg_state.
5107 (i386_set_thread_context): Delete.
5108 (i386_prepare_to_resume): New function.
5109 (i386_thread_added): Mark the thread as needing to update irs
5110 debug registers.
5111 (the_low_target): Remove i386_set_thread_context and install
5112 i386_prepare_to_resume.
5113 * win32-low.c (win32_get_thread_context): Adjust.
5114 (win32_set_thread_context): Use SetThreadContext
5115 directly.
5116 (win32_prepare_to_resume): New function.
5117 (win32_require_context): New function, factored out from ...
5118 (thread_rec): ... this.
5119 (continue_one_thread): Call win32_prepare_to_resume on each thread
5120 we're about to continue.
5121 (win32_resume): Call win32_prepare_to_resume on the event thread.
5122 * win32-low.h (struct win32_thread_info)
5123 <debug_registers_changed>: New field.
5124 (struct win32_target_ops): Change prototype of set_thread_context,
5125 delete set_thread_context and add prepare_to_resume.
5126 (win32_require_context): New declaration.
5127
5128 2014-10-08 Gary Benson <gbenson@redhat.com>
5129
5130 * server.h: Do not include common-exceptions.h.
5131
5132 2014-10-08 Gary Benson <gbenson@redhat.com>
5133
5134 * server.h: Do not include cleanups.h.
5135
5136 2014-09-30 James Hogan <james.hogan@imgtec.com>
5137
5138 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5139 mips64-dsp-linux.c.
5140
5141 2014-09-23 Yao Qi <yao@codesourcery.com>
5142
5143 * linux-low.c (lp_status_maybe_breakpoint): New function.
5144 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5145 (count_events_callback): Likewise.
5146 (select_event_lwp_callback): Likewise.
5147 (cancel_breakpoints_callback): Likewise.
5148
5149 2014-09-19 Don Breazeal <donb@codesourcery.com>
5150
5151 * linux-low.c (handle_extended_wait): Call
5152 linux_ptrace_get_extended_event.
5153 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5154 linux_is_extended_waitstatus.
5155
5156 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5157
5158 * Makefile.in (CPPFLAGS): Define.
5159 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5160 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5161
5162 2014-09-16 Gary Benson <gbenson@redhat.com>
5163
5164 * inferiors.h (current_inferior): Renamed as...
5165 (current_thread): New variable. All uses updated.
5166 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5167 (maybe_move_out_of_jump_pad): Likewise.
5168 (cancel_breakpoint): Likewise.
5169 (linux_low_filter_event): Likewise.
5170 (wait_for_sigstop): Likewise.
5171 (linux_resume_one_lwp): Likewise.
5172 (need_step_over_p): Likewise.
5173 (start_step_over): Likewise.
5174 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5175 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5176 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5177 and save_inferior as saved_thread.
5178 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5179 saved_thread.
5180 (regcache_invalidate_thread): Likewise.
5181 * remote-utils.c (prepare_resume_reply): Likewise.
5182 * thread-db.c (thread_db_get_tls_address): Likewise.
5183 (disable_thread_event_reporting): Likewise.
5184 (remove_thread_event_breakpoints): Likewise.
5185 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5186 as saved_thread.
5187 * target.h (set_desired_inferior): Renamed as...
5188 (set_desired_thread): New declaration. All uses updated.
5189 * server.c (myresume): Updated comment to reference thread instead
5190 of inferior.
5191 (handle_serial_event): Likewise.
5192 (handle_target_event): Likewise.
5193
5194 2014-09-12 Tom Tromey <tromey@redhat.com>
5195 Gary Benson <gbenson@redhat.com>
5196
5197 * regcache.h: Include common-regcache.h.
5198 (regcache_read_pc): Don't declare.
5199 * regcache.c (get_thread_regcache_for_ptid): New function.
5200
5201 2014-09-11 Tom Tromey <tromey@redhat.com>
5202 Gary Benson <gbenson@redhat.com>
5203
5204 * symbol.c: New file.
5205 * Makefile.in (SFILES): Add symbol.c.
5206 (OBS): Add symbol.o.
5207
5208 2014-09-11 Gary Benson <gbenson@redhat.com>
5209
5210 * target.c (target_stop_ptid, target_continue_ptid): New
5211 functions.
5212
5213 2014-09-11 Tom Tromey <tromey@redhat.com>
5214 Gary Benson <gbenson@redhat.com>
5215
5216 * target.h: Include target/target.h.
5217 * target.c (target_read_memory, target_read_uint32)
5218 (target_write_memory): New functions.
5219
5220 2014-09-11 Gary Benson <gbenson@redhat.com>
5221
5222 * server.h (debug_hw_points): Don't declare.
5223 * server.c (debug_hw_points): Don't define. Replace all uses
5224 with show_debug_regs.
5225 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5226 all uses with show_debug_regs.
5227
5228 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5229
5230 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5231 endianness into account.
5232 (ppc_supply_ptrace_register): Likewise.
5233
5234 2014-09-03 James Hogan <james.hogan@imgtec.com>
5235
5236 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5237 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5238
5239 2014-09-03 Gary Benson <gbenson@redhat.com>
5240
5241 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5242 ALL_DEBUG_ADDRESS_REGISTERS.
5243
5244 2014-09-02 Gary Benson <gbenson@redhat.com>
5245
5246 * i386-low.h: Renamed as...
5247 * x86-low.h: New file. All type, function and variable name
5248 prefixes changed from "i386_" to "x86_". All references updated.
5249 * i386-low.c: Renamed as...
5250 * x86-low.c: New file. All type, function and variable name
5251 prefixes changed from "i386_" to "x86_". All references updated.
5252
5253 2014-09-02 Gary Benson <gbenson@redhat.com>
5254
5255 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5256 (x86_linux_new_thread): Likewise.
5257
5258 2014-08-29 Gary Benson <gbenson@redhat.com>
5259
5260 * server.h (setjmp.h): Do not include.
5261 (toplevel): Do not declare.
5262 (common-exceptions.h): Include.
5263 (cleanups.h): Likewise.
5264 * server.c (toplevel): Do not define.
5265 (exit_code): New static global.
5266 (detach_or_kill_for_exit_cleanup): New function.
5267 (main): New function. Original main renamed to...
5268 (captured_main): New function.
5269 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5270
5271 2014-08-29 Gary Benson <gbenson@redhat.com>
5272
5273 * Makefile.in (SFILES): Add common/common-exceptions.c.
5274 (OBS): Add common-exceptions.o.
5275 (common-exceptions.o): New rule.
5276 * utils.c (prepare_to_throw_exception): New function.
5277
5278 2014-08-29 Gary Benson <gbenson@redhat.com>
5279
5280 * config.in: Regenerate.
5281 * configure: Likewise.
5282
5283 2014-08-29 Gary Benson <gbenson@redhat.com>
5284
5285 * Makefile.in (SFILES): Add common/cleanups.c.
5286 (OBS): cleanups.o.
5287 (cleanups.o): New rule.
5288
5289 2014-08-29 Gary Benson <gbenson@redhat.com>
5290
5291 * utils.c (internal_vwarning): New function.
5292
5293 2014-08-28 Gary Benson <gbenson@redhat.com>
5294
5295 * utils.h (fatal): Remove declaration.
5296 * utils.c (fatal): Remove function.
5297
5298 2014-08-28 Gary Benson <gbenson@redhat.com>
5299
5300 * tracepoint.c (gdb_agent_init): Replace fatal with
5301 perror_with_name.
5302 (initialize_tracepoint): Likewise.
5303
5304 2014-08-28 Gary Benson <gbenson@redhat.com>
5305
5306 * remote-utils.c (remote_prepare): Replace fatal with error.
5307
5308 2014-08-28 Gary Benson <gbenson@redhat.com>
5309
5310 * linux-low.c (linux_async): Replace fatal with warning.
5311 Tidy up and return.
5312 (linux_start_non_stop): Return -1 if linux_async failed.
5313
5314 2014-08-28 Gary Benson <gbenson@redhat.com>
5315
5316 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5317 gdb_assert.
5318 (i386_dr_low_get_addr): Remove vague comment.
5319 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5320 gdb_assert.
5321
5322 2014-08-28 Gary Benson <gbenson@redhat.com>
5323
5324 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5325 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5326 internal_error.
5327 (linux_resume_one_lwp): Likewise.
5328 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5329 gdb_assert.
5330 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5331 with internal_error.
5332 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5333 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5334 (find_register_by_name): Replace fatal with internal_error.
5335 (find_regno): Likewise.
5336 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5337 * thread-db.c (thread_db_create_event): Likewise.
5338 (thread_db_load_search): Likewise.
5339 (try_thread_db_load_1): Likewise.
5340 * tracepoint.c (get_jump_space_head): Replace fatal with
5341 internal_error.
5342 (claim_trampoline_space): Likewise.
5343 (have_fast_tracepoint_trampoline_buffer): Likewise.
5344 (cmd_qtstart): Likewise.
5345 (stop_tracing): Likewise.
5346 (fast_tracepoint_collecting): Likewise.
5347 (target_malloc): Likewise.
5348 (download_tracepoint): Likewise.
5349 (download_trace_state_variables): Replace check with gdb_assert.
5350 (upload_fast_traceframes): Replace fatal with internal_error.
5351
5352 2014-08-19 Tom Tromey <tromey@redhat.com>
5353 Gary Benson <gbenson@redhat.com>
5354
5355 * Makefile.in (SFILES): Add common/common-debug.c.
5356 (OBS): Add common-debug.o.
5357 (common-debug.o): New rule.
5358 * debug.h (debug_printf): Don't declare.
5359 * debug.c (debug_printf): Renamed and rewritten as...
5360 (debug_vprintf): New function.
5361
5362 2014-08-19 Gary Benson <gbenson@redhat.com>
5363
5364 * utils.h: Do not include print-utils.h.
5365
5366 2014-08-19 Tom Tromey <tromey@redhat.com>
5367 Gary Benson <gbenson@redhat.com>
5368
5369 * server.h: Add static assertion.
5370 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5371
5372 2014-08-19 Tom Tromey <tromey@redhat.com>
5373 Gary Benson <gbenson@redhat.com>
5374
5375 * Makefile.in (SFILES): Add common/errors.c.
5376 (OBS): Add errors.o.
5377 (IPA_OBS): Add errors-ipa.o.
5378 (errors.o): New rule.
5379 (errors-ipa.o): Likewise.
5380 * utils.h (perror_with_name, error, warning): Don't declare.
5381 * utils.c (warning): Renamed and rewritten as...
5382 (vwarning): New function.
5383 (error): Renamed and rewritten as...
5384 (verror): New function.
5385 (internal_error): Renamed and rewritten as...
5386 (internal_verror): New function.
5387
5388 2014-08-07 Gary Benson <gbenson@redhat.com>
5389
5390 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5391 * configure: Regenerate.
5392 * config.in: Likewise.
5393 * server.h: Do not include errno.h.
5394 * event-loop.c: Likewise.
5395 * hostio-errno.c: Likewise.
5396 * linux-low.c: Likewise.
5397 * remote-utils.c: Likewise.
5398 * spu-low.c: Likewise.
5399 * utils.c: Likewise.
5400 * gdbreplay.c: Unconditionally include errno.h.
5401
5402 2014-08-07 Gary Benson <gbenson@redhat.com>
5403
5404 * server.h: Do not include string.h.
5405 * event-loop.c: Likewise.
5406 * linux-low.c: Likewise.
5407 * regcache.c: Likewise.
5408 * remote-utils.c: Likewise.
5409 * spu-low.c: Likewise.
5410 * utils.c: Likewise.
5411
5412 2014-08-07 Gary Benson <gbenson@redhat.com>
5413
5414 * server.h: Do not include gdb_assert.h.
5415
5416 2014-08-07 Gary Benson <gbenson@redhat.com>
5417
5418 * server.h: Do not include common-utils.h.
5419
5420 2014-08-07 Gary Benson <gbenson@redhat.com>
5421
5422 * server.h: Do not include ptid.h.
5423 * notif.h: Likewise.
5424
5425 2014-08-07 Gary Benson <gbenson@redhat.com>
5426
5427 * server.h: Do not include gdb_locale.h.
5428
5429 2014-08-07 Gary Benson <gbenson@redhat.com>
5430
5431 * server.h: Do not include gdb/signals.h.
5432 * win32-low.c: Likewise.
5433
5434 2014-08-07 Gary Benson <gbenson@redhat.com>
5435
5436 * server.h: Do not include pathmax.h.
5437
5438 2014-08-07 Gary Benson <gbenson@redhat.com>
5439
5440 * server.h: Do not include libiberty.h.
5441 * linux-bfin-low.c: Likewise.
5442
5443 2014-08-07 Gary Benson <gbenson@redhat.com>
5444
5445 * server.h: Do not include ansidecl.h.
5446
5447 2014-08-07 Gary Benson <gbenson@redhat.com>
5448
5449 * linux-x86-low.c: Do not include stddef.h.
5450 * lynx-ppc-low.c: Likewise.
5451 * tracepoint.c: Likewise.
5452
5453 2014-08-07 Gary Benson <gbenson@redhat.com>
5454
5455 * server.h: Do not include stdarg.h.
5456 * nto-low.c: Likewise.
5457
5458 2014-08-07 Gary Benson <gbenson@redhat.com>
5459
5460 * server.h: Do not include stdlib.h.
5461 * inferiors.c: Likewise.
5462 * linux-low.c: Likewise.
5463 * regcache.c: Likewise.
5464 * spu-low.c: Likewise.
5465 * tracepoint.c: Likewise.
5466 * utils.c: Likewise.
5467
5468 2014-08-07 Gary Benson <gbenson@redhat.com>
5469
5470 * server.h: Do not include stdio.h.
5471 * linux-low.c: Likewise.
5472 * remote-utils.c: Likewise.
5473 * spu-low.c: Likewise.
5474 * utils.c: Likewise.
5475 * wincecompat.c: Likewise.
5476
5477 2014-08-06 Gary Benson <gbenson@redhat.com>
5478
5479 * regcache.c (init_register_cache): Move conditionals inside if.
5480
5481 2014-08-06 Gary Benson <gbenson@redhat.com>
5482
5483 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5484
5485 2014-07-31 Gary Benson <gbenson@redhat.com>
5486
5487 * ax.h: Do not include server.h.
5488 * gdbthread.h: Likewise.
5489 * lynx-low.h: Likewise.
5490 * notif.h: Likewise.
5491
5492 2014-07-30 Gary Benson <gbenson@redhat.com>
5493
5494 * server.h: Include common-defs.h.
5495 Do not include config.h or build-gnulib-gdbserver/config.h.
5496
5497 2014-07-30 Gary Benson <gbenson@redhat.com>
5498
5499 * hostio-errno.c: Move server.h to top of includes list.
5500 * inferiors.c: Likewise.
5501 * linux-x86-low.c: Likewise.
5502 * notif.c: Include server.h.
5503
5504 2014-07-24 Tom Tromey <tromey@redhat.com>
5505 Gary Benson <gbenson@redhat.com>
5506
5507 * server.h (CORE_ADDR): Now unsigned.
5508
5509 2014-07-16 Pedro Alves <palves@redhat.com>
5510
5511 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5512
5513 2014-07-15 Pedro Alves <palves@redhat.com>
5514
5515 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5516 copy.
5517
5518 2014-07-11 Pedro Alves <palves@redhat.com>
5519
5520 * linux-low.c (kill_wait_lwp): New function, based on
5521 kill_one_lwp_callback, but use my_waitpid directly.
5522 (kill_one_lwp_callback, linux_kill): Use it.
5523
5524 2014-06-23 Pedro Alves <palves@redhat.com>
5525
5526 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5527 before setting DR0..DR3.
5528
5529 2014-06-20 Gary Benson <gbenson@redhat.com>
5530
5531 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5532 * configure: Regenerated.
5533 * config.in: Likewise.
5534
5535 2014-06-20 Gary Benson <gbenson@redhat.com>
5536
5537 * Makefile.in (SFILES): Update locations for files moved
5538 from common to nat.
5539 (object file files): Reordered.
5540
5541 2014-06-20 Gary Benson <gbenson@redhat.com>
5542
5543 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5544 (i386_dr_low_set_addr): Likewise.
5545 (i386_dr_low_get_addr): Likewise.
5546 (i386_dr_low_can_set_control): Likewise.
5547 (i386_dr_low_set_control): Likewise.
5548 (i386_dr_low_get_control): Likewise.
5549 (i386_dr_low_get_status): Likewise.
5550 (i386_get_debug_register_length): Likewise.
5551 * linux-x86-low.c (i386_dr_low_set_addr):
5552 Changed signature. Made static.
5553 (i386_dr_low_get_addr): Likewise.
5554 (i386_dr_low_set_control): Likewise.
5555 (i386_dr_low_get_control): Likewise.
5556 (i386_dr_low_get_status): Likewise.
5557 (i386_dr_low): New global variable.
5558 * win32-i386-low.c (i386_dr_low_set_addr):
5559 Changed signature. Made static.
5560 (i386_dr_low_get_addr): Likewise.
5561 (i386_dr_low_set_control): Likewise.
5562 (i386_dr_low_get_control): Likewise.
5563 (i386_dr_low_get_status): Likewise.
5564 (i386_dr_low): New global variable.
5565
5566 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5567
5568 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5569 * Makefile.in (AR, AR_FLAGS): Define.
5570 * configure: Regenerate.
5571
5572 2014-06-19 Gary Benson <gbenson@redhat.com>
5573
5574 * Makefile.in (i386-dregs.o): New rule.
5575 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5576 * i386-low.c (target.h): Remove include.
5577 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5578 (DR_CONTROL_SHIFT): Likewise.
5579 (DR_CONTROL_SIZE): Likewise.
5580 (DR_RW_EXECUTE): Likewise.
5581 (DR_RW_WRITE): Likewise.
5582 (DR_RW_READ): Likewise.
5583 (DR_RW_IORW): Likewise.
5584 (DR_LEN_1): Likewise.
5585 (DR_LEN_2): Likewise.
5586 (DR_LEN_4): Likewise.
5587 (DR_LEN_8): Likewise.
5588 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5589 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5590 (DR_ENABLE_SIZE): Likewise.
5591 (DR_LOCAL_SLOWDOWN): Likewise.
5592 (DR_GLOBAL_SLOWDOWN): Likewise.
5593 (DR_CONTROL_RESERVED): Likewise.
5594 (I386_DR_CONTROL_MASK): Likewise.
5595 (I386_DR_VACANT): Likewise.
5596 (I386_DR_LOCAL_ENABLE): Likewise.
5597 (I386_DR_GLOBAL_ENABLE): Likewise.
5598 (I386_DR_DISABLE): Likewise.
5599 (I386_DR_SET_RW_LEN): Likewise.
5600 (I386_DR_GET_RW_LEN): Likewise.
5601 (I386_DR_WATCH_HIT): Likewise.
5602 (i386_wp_op_t): Likewise.
5603 (i386_show_dr): Likewise.
5604 (i386_length_and_rw_bits): Likewise.
5605 (i386_insert_aligned_watchpoint): Likewise.
5606 (i386_remove_aligned_watchpoint): Likewise.
5607 (i386_handle_nonaligned_watchpoint): Likewise.
5608 i386_update_inferior_debug_regs(): Likewise.
5609 (i386_dr_insert_watchpoint): Likewise.
5610 (i386_dr_remove_watchpoint): Likewise.
5611 (i386_dr_region_ok_for_watchpoint): Likewise.
5612 (i386_dr_stopped_data_address): Likewise.
5613 (i386_dr_stopped_by_watchpoint): Likewise.
5614
5615 2014-06-19 Gary Benson <gbenson@redhat.com>
5616
5617 * i386-low.c (i386_dr_show): Renamed to
5618 i386_show_dr and made static. All uses updated.
5619 (i386_dr_length_and_rw_bits): Renamed to
5620 i386_length_and_rw_bits and made static.
5621 All uses updated.
5622 (i386_dr_insert_aligned_watchpoint): Renamed to
5623 i386_insert_aligned_watchpoint and made static.
5624 All uses updated.
5625 (i386_dr_remove_aligned_watchpoint): Renamed to
5626 i386_remove_aligned_watchpoint and made static.
5627 All uses updated.
5628 (i386_dr_update_inferior_debug_regs): Renamed to
5629 i386_update_inferior_debug_regs and made static.
5630 All uses updated.
5631
5632 2014-06-18 Gary Benson <gbenson@redhat.com>
5633
5634 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5635 (i386_dr_low_can_set_control): Likewise.
5636 (i386_get_debug_register_length): Likewise.
5637 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5638 (i386_dr_low_can_set_control): Likewise.
5639 (i386_get_debug_register_length): Likewise.
5640
5641 2014-06-17 Gary Benson <gbenson@redhat.com>
5642
5643 * i386-low.h (i386-dregs.h): New include.
5644 (DR_FIRSTADDR): Now in i386-dregs.h.
5645 (DR_LASTADDR): Likewise.
5646 (DR_NADDR): Likewise.
5647 (DR_STATUS): Likewise.
5648 (DR_CONTROL): Likewise.
5649 (i386_debug_reg_state): Likewise.
5650 (i386_dr_insert_watchpoint): Likewise.
5651 (i386_dr_remove_watchpoint): Likewise.
5652 (i386_dr_region_ok_for_watchpoint): Likewise.
5653 (i386_dr_stopped_data_address): Likewise.
5654 (i386_dr_stopped_by_watchpoint): Likewise.
5655 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5656
5657 2014-06-18 Gary Benson <gbenson@redhat.com>
5658
5659 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5660 i386_dr_insert_watchpoint.
5661 (i386_low_remove_watchpoint): Renamed to
5662 i386_dr_remove_watchpoint.
5663 (i386_low_region_ok_for_watchpoint): Renamed to
5664 i386_dr_region_ok_for_watchpoint.
5665 (i386_low_stopped_data_address): Renamed to
5666 i386_dr_stopped_data_address.
5667 (i386_low_stopped_by_watchpoint): Renamed to
5668 i386_dr_stopped_by_watchpoint.
5669 * i386-low.c (i386_show_dr): Renamed to
5670 i386_dr_show and made nonstatic. All uses updated.
5671 (i386_length_and_rw_bits): Renamed to
5672 i386_dr_length_and_rw_bits and made nonstatic.
5673 All uses updated.
5674 (i386_insert_aligned_watchpoint): Renamed to
5675 i386_dr_insert_aligned_watchpoint and made nonstatic.
5676 All uses updated.
5677 (i386_remove_aligned_watchpoint): Renamed to
5678 i386_dr_remove_aligned_watchpoint and made nonstatic.
5679 All uses updated.
5680 (i386_update_inferior_debug_regs): Renamed to
5681 i386_dr_update_inferior_debug_regs and made nonstatic.
5682 All uses updated.
5683 (i386_low_insert_watchpoint): Renamed to
5684 i386_dr_insert_watchpoint. All uses updated.
5685 (i386_low_remove_watchpoint): Renamed to
5686 i386_dr_remove_watchpoint. All uses updated.
5687 (i386_low_region_ok_for_watchpoint): Renamed to
5688 i386_dr_region_ok_for_watchpoint. All uses updated.
5689 (i386_low_stopped_data_address): Renamed to
5690 i386_dr_stopped_data_address. All uses updated.
5691 (i386_low_stopped_by_watchpoint): Renamed to
5692 i386_dr_stopped_by_watchpoint. All uses updated.
5693
5694 2014-06-18 Gary Benson <gbenson@redhat.com>
5695
5696 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5697 (i386_dr_low_can_set_control): Likewise.
5698 (i386_insert_aligned_watchpoint): New check.
5699
5700 2014-06-18 Gary Benson <gbenson@redhat.com>
5701
5702 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5703 Renamed to state.
5704
5705 2014-06-18 Gary Benson <gbenson@redhat.com>
5706
5707 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5708 instead of fatal and error.
5709 (i386_handle_nonaligned_watchpoint): Likewise.
5710
5711 2014-06-18 Gary Benson <gbenson@redhat.com>
5712
5713 * i386-low.c (i386_get_debug_register_length): New macro.
5714 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5715 (i386_show_dr): Use debug_printf instead of fprintf. Use
5716 phex to format values.
5717
5718 2014-06-18 Gary Benson <gbenson@redhat.com>
5719
5720 * i386-low.h: Comment changes.
5721 * i386-low.c: Likewise.
5722
5723 2014-06-18 Gary Benson <gbenson@redhat.com>
5724
5725 * i386-low.c: Whitespace changes.
5726
5727 2014-06-12 Tom Tromey <tromey@redhat.com>
5728
5729 * utils.c (freeargv): Remove.
5730
5731 2014-06-12 Tom Tromey <tromey@redhat.com>
5732
5733 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5734 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5735 (parse_debug_format_options): Likewise.
5736 (gdbserver_usage): Likewise.
5737 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5738 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5739 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5740 against libiberty.
5741 ($(LIBGNU)): Depend on libiberty.
5742 (all-lib): Recurse into all subdirs.
5743 (install-only): Invoke "install" target in subdirs.
5744 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5745 targets.
5746 * configure: Rebuild.
5747 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5748 for vasprintf, vsnprintf, or gettimeofday.
5749 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5750 srv_tgtobj.
5751
5752 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5753
5754 * development.sh: Delete.
5755 * Makefile.in (config.status): Adjust dependency on development.sh.
5756 * configure.ac: Adjust development.sh source call.
5757 * configure: Regenerate.
5758
5759 2014-06-02 Pedro Alves <palves@redhat.com>
5760
5761 * ax.c (gdb_free_agent_expr): New function.
5762 * ax.h (gdb_free_agent_expr): New declaration.
5763 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5764 list.
5765 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5766 static.
5767 (clear_breakpoint_conditions_and_commands): New function.
5768 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5769 (clear_breakpoint_conditions_and_commands): New declaration.
5770
5771 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5772
5773 * linux-aarch64-low.c (asm/ptrace.h): Include.
5774
5775 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5776
5777 Fix TLS access for -static -pthread.
5778 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5779 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5780 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5781
5782 2014-05-20 Pedro Alves <palves@redhat.com>
5783
5784 * linux-aarch64-low.c (aarch64_insert_point)
5785 (aarch64_remove_point): No longer check whether the type is
5786 supported here. Adjust to new interface.
5787 (the_low_target): Install aarch64_supports_z_point_type as
5788 supports_z_point_type method.
5789 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5790 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5791 instead of a Z packet char. Adjust.
5792 (arm_supports_z_point_type): New function.
5793 (arm_insert_point, arm_remove_point): Adjust to new interface.
5794 (the_low_target): Install arm_supports_z_point_type.
5795 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5796 (cris_insert_point, cris_remove_point): Adjust to new interface.
5797 Don't check whether the type is supported here.
5798 (the_low_target): Install cris_supports_z_point_type.
5799 * linux-low.c (linux_supports_z_point_type): New function.
5800 (linux_insert_point, linux_remove_point): Adjust to new interface.
5801 * linux-low.h (struct linux_target_ops) <insert_point,
5802 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5803 raw_breakpoint pointer parameter.
5804 <supports_z_point_type>: New method.
5805 * linux-mips-low.c (mips_supports_z_point_type): New function.
5806 (mips_insert_point, mips_remove_point): Adjust to new interface.
5807 Use mips_supports_z_point_type.
5808 (the_low_target): Install mips_supports_z_point_type.
5809 * linux-ppc-low.c (the_low_target): Install NULL as
5810 supports_z_point_type method.
5811 * linux-s390-low.c (the_low_target): Install NULL as
5812 supports_z_point_type method.
5813 * linux-sparc-low.c (the_low_target): Install NULL as
5814 supports_z_point_type method.
5815 * linux-x86-low.c (x86_supports_z_point_type): New function.
5816 (x86_insert_point): Adjust to new insert_point interface. Use
5817 insert_memory_breakpoint. Adjust to new
5818 i386_low_insert_watchpoint interface.
5819 (x86_remove_point): Adjust to remove_point interface. Use
5820 remove_memory_breakpoint. Adjust to new
5821 i386_low_remove_watchpoint interface.
5822 (the_low_target): Install x86_supports_z_point_type.
5823 * lynx-low.c (lynx_target_ops): Install NULL as
5824 supports_z_point_type callback.
5825 * nto-low.c (nto_supports_z_point_type): New.
5826 (nto_insert_point, nto_remove_point): Adjust to new interface.
5827 (nto_target_ops): Install nto_supports_z_point_type.
5828 * mem-break.c: Adjust intro comment.
5829 (struct raw_breakpoint) <raw_type, size>: New fields.
5830 <inserted>: Update comment.
5831 <shlib_disabled>: Delete field.
5832 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5833 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5834 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5835 (raw_bkpt_type_to_target_hw_bp_type): New function.
5836 (find_enabled_raw_code_breakpoint_at): New function.
5837 (find_raw_breakpoint_at): New type and size parameters. Use them.
5838 (insert_memory_breakpoint): New function, based off
5839 set_raw_breakpoint_at.
5840 (remove_memory_breakpoint): New function.
5841 (set_raw_breakpoint_at): Reimplement.
5842 (set_breakpoint): New, based on set_breakpoint_at.
5843 (set_breakpoint_at): Reimplement.
5844 (delete_raw_breakpoint): Go through the_target->remove_point
5845 instead of assuming memory breakpoints.
5846 (find_gdb_breakpoint_at): Delete.
5847 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5848 (find_gdb_breakpoint): New function.
5849 (set_gdb_breakpoint_at): Delete.
5850 (z_type_supported): New function.
5851 (set_gdb_breakpoint_1): New function, loosely based off
5852 set_gdb_breakpoint_at.
5853 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5854 (delete_gdb_breakpoint_at): Delete.
5855 (delete_gdb_breakpoint_1): New function, loosely based off
5856 delete_gdb_breakpoint_at.
5857 (delete_gdb_breakpoint): New function.
5858 (clear_gdb_breakpoint_conditions): Rename to ...
5859 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5860 breakpoint.
5861 (add_condition_to_breakpoint): Make static.
5862 (add_breakpoint_condition): Take a struct breakpoint pointer
5863 instead of an address. Adjust.
5864 (gdb_condition_true_at_breakpoint): Rename to ...
5865 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5866 z_type parameter.
5867 (gdb_condition_true_at_breakpoint): Reimplement.
5868 (add_breakpoint_commands): Take a struct breakpoint pointer
5869 instead of an address. Adjust.
5870 (gdb_no_commands_at_breakpoint): Rename to ...
5871 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5872 parameter. Return true if no breakpoint was found. Change debug
5873 output.
5874 (gdb_no_commands_at_breakpoint): Reimplement.
5875 (run_breakpoint_commands): Rename to ...
5876 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5877 and change return type to boolean.
5878 (run_breakpoint_commands): New function.
5879 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5880 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5881 breakpoint. Go through the_target->remove_point instead of
5882 assuming memory breakpoint.
5883 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5884 software and hardware breakpoints.
5885 (reinsert_raw_breakpoint): Go through the_target->insert_point
5886 instead of assuming memory breakpoint.
5887 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5888 software and hardware breakpoints.
5889 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5890 Check both software and hardware breakpoints.
5891 (validate_inserted_breakpoint): Assert the breakpoint is a
5892 software breakpoint. Set the inserted flag to -1 instead of
5893 setting shlib_disabled.
5894 (delete_disabled_breakpoints): Adjust.
5895 (validate_breakpoints): Only validate software breakpoints.
5896 Adjust to inserted flag change.
5897 (check_mem_read, check_mem_write): Skip breakpoint types other
5898 than software breakpoints. Adjust to inserted flag change.
5899 * mem-break.h (enum raw_bkpt_type): New enum.
5900 (raw_breakpoint, struct process_info): Forward declare.
5901 (Z_packet_to_target_hw_bp_type): Delete declaration.
5902 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5903 (set_gdb_breakpoint, delete_gdb_breakpoint)
5904 (clear_breakpoint_conditions): New declarations.
5905 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5906 (breakpoint_inserted_here): Update comment.
5907 (add_breakpoint_condition, add_breakpoint_commands): Replace
5908 address parameter with a breakpoint pointer parameter.
5909 (gdb_breakpoint_here): Update comment.
5910 (delete_gdb_breakpoint_at): Delete.
5911 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5912 * server.c (process_point_options): Take a struct breakpoint
5913 pointer instead of an address. Adjust.
5914 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5915 delete_gdb_breakpoint.
5916 * spu-low.c (spu_target_ops): Install NULL as
5917 supports_z_point_type method.
5918 * target.h: Include mem-break.h.
5919 (struct target_ops) <prepare_to_access_memory>: Update comment.
5920 <supports_z_point_type>: New field.
5921 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5922 instead of a char. Also take a raw breakpoint pointer.
5923 * win32-arm-low.c (the_low_target): Install NULL as
5924 supports_z_point_type.
5925 * win32-i386-low.c (i386_supports_z_point_type): New function.
5926 (i386_insert_point, i386_remove_point): Adjust to new interface.
5927 (the_low_target): Install i386_supports_z_point_type.
5928 * win32-low.c (win32_supports_z_point_type): New function.
5929 (win32_insert_point, win32_remove_point): Adjust to new interface.
5930 (win32_target_ops): Install win32_supports_z_point_type.
5931 * win32-low.h (struct win32_target_ops):
5932 <supports_z_point_type>: New method.
5933 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5934 instead of a char. Also take a raw breakpoint pointer.
5935
5936 2014-05-20 Pedro Alves <palves@redhat.com>
5937
5938 * mem-break.h: Include break-common.h.
5939 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5940 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5941 (Z_packet_to_target_hw_bp_type): New declaration.
5942 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5943 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5944 (Z_PACKET_ACCESS_WP): Delete macros.
5945 (Z_packet_to_hw_type): Delete function.
5946 * i386-low.h: Don't include break-common.h here.
5947 (Z_packet_to_hw_type): Delete declaration.
5948 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5949 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5950 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5951 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5952 * linux-aarch64-low.c: Don't include break-common.h here.
5953 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5954 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5955 (Z_packet_to_target_hw_bp_type): Delete function.
5956 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5957 function.
5958 (mips_insert_point, mips_remove_point): Use
5959 Z_packet_to_target_hw_bp_type.
5960
5961 2014-05-20 Pedro Alves <palves@redhat.com>
5962
5963 * linux-aarch64-low.c: Include break-common.h.
5964 (enum target_point_type): Delete.
5965 (Z_packet_to_point_type): Rename to ...
5966 (Z_packet_to_target_hw_bp_type): ... this, and return a
5967 target_hw_bp_type instead.
5968 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5969 instead of an enum target_point_type.
5970 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5971 breakpoint type.
5972 (aarch64_dr_state_insert_one_point)
5973 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5974 (aarch64_handle_aligned_watchpoint)
5975 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5976 Take an enum target_hw_bp_type instead of an enum
5977 target_point_type.
5978 (aarch64_supports_z_point_type): New function.
5979 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5980 use Z_packet_to_target_hw_bp_type.
5981
5982 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5983
5984 * configure.ac: Only use -Werror by default when DEVELOPMENT
5985 is true.
5986 * configure: Regenerate.
5987
5988 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5989
5990 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5991 * linux-x86-low.c (X86_64_USER_REGS): New.
5992 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5993
5994 2014-04-28 Yao Qi <yao@codesourcery.com>
5995
5996 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5997 name.
5998
5999 2014-04-25 Pedro Alves <palves@redhat.com>
6000
6001 PR server/16255
6002 * linux-low.c (linux_attach_fail_reason_string): New function.
6003 (linux_attach_lwp): Delete.
6004 (linux_attach_lwp_1): Rename to ...
6005 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6006 argument. Remove "initial" parameter. Return int instead of
6007 void. Don't error or warn here.
6008 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6009 failure to attach to the tgid. Call warning when failing to
6010 attach to an lwp.
6011 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6012 argument. Remove "initial" parameter. Return int instead of
6013 void. Don't error or warn here.
6014 (linux_attach_fail_reason_string): New declaration.
6015 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6016 interface change. Use linux_attach_fail_reason_string.
6017
6018 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6019 Walfred Tedeschi <walfred.tedeschi@intel.com>
6020
6021 * Makefile.in: Added rules to handle new files
6022 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6023 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6024 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6025 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6026 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6027 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6028 x32-avx512-linux.o.
6029 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6030 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6031 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6032 i386/x32-avx512.xml.
6033 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6034 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6035 i386/x32-avx512-linux.xml.
6036 * i387-fp.c (num_avx512_k_registers): New constant for number
6037 of K registers.
6038 (num_avx512_zmmh_low_registers): New constant for number of
6039 lower ZMM registers (0-15).
6040 (num_avx512_zmmh_high_registers): New constant for number of
6041 higher ZMM registers (16-31).
6042 (num_avx512_ymmh_registers): New contant for number of higher
6043 YMM registers (ymm16-31 added by avx521 on x86_64).
6044 (num_avx512_xmm_registers): New constant for number of higher
6045 XMM registers (xmm16-31 added by AVX512 on x86_64).
6046 (struct i387_xsave): Add space for AVX512 registers.
6047 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6048 Add code to handle AVX512 registers.
6049 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6050 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6051 prototypei from generated file.
6052 (tdesc_amd64_avx512_linux): Likewise.
6053 (init_registers_x32_avx512_linux): Likewise.
6054 (tdesc_x32_avx512_linux): Likewise.
6055 (init_registers_i386_avx512_linux): Likewise.
6056 (tdesc_i386_avx512_linux): Likewise.
6057 (x86_64_regmap): Add AVX512 registers.
6058 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6059 mask.
6060 (initialize_low_arch): Add code to initialize AVX512 registers.
6061
6062 2014-04-23 Pedro Alves <palves@redhat.com>
6063
6064 * mem-break.c (find_gdb_breakpoint_at): Make static.
6065 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6066
6067 2014-04-23 Pedro Alves <palves@redhat.com>
6068
6069 * i386-low.c: Don't include break-common.h here.
6070 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6071 prototype to take target_hw_bp_type as argument instead of a Z
6072 packet char.
6073 * i386-low.h: Include break-common.h here.
6074 (Z_packet_to_hw_type): Declare.
6075 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6076 prototypes.
6077 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6078 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6079 (x86_remove_point): Convert the packet number to a
6080 target_hw_bp_type before calling i386_low_remove_watchpoint.
6081 * win32-i386-low.c (i386_insert_point): Convert the packet number
6082 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6083 (i386_remove_point): Convert the packet number to a
6084 target_hw_bp_type before calling i386_low_remove_watchpoint.
6085
6086 2014-04-23 Pedro Alves <palves@redhat.com>
6087
6088 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6089
6090 2014-04-10 Pedro Alves <palves@redhat.com>
6091
6092 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6093 Check if the condition or command is NULL before checking if the
6094 breakpoint is known. On success, return true.
6095 * mem-break.h (add_breakpoint_condition): Document return.
6096 (add_breakpoint_commands): Add describing comment.
6097 * server.c (skip_to_semicolon): New function.
6098 (process_point_options): Use it.
6099
6100 2014-04-09 Pedro Alves <palves@redhat.com>
6101
6102 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6103 to lwpid_of.
6104
6105 2014-02-27 Pedro Alves <palves@redhat.com>
6106
6107 PR 12702
6108 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6109 macros.
6110 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6111 output.
6112 (last_thread_of_process_p): Take a PID argument instead of a
6113 thread pointer.
6114 (linux_wait_for_lwp): Delete.
6115 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6116 functions.
6117 (linux_low_filter_event): New function, party factored out from
6118 linux_wait_for_event.
6119 (linux_wait_for_event): Rename to ...
6120 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6121 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6122 sigsuspend. Check for zombie leaders.
6123 (linux_wait_for_event): Reimplement as wrapper around
6124 linux_wait_for_event_filtered.
6125 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6126 a normal or signal exit is seen, it's the whole process exiting.
6127 (wait_for_sigstop): No longer a for_each_inferior callback.
6128 Rewrite on top of linux_wait_for_event_filtered.
6129 (stop_all_lwps): Call wait_for_sigstop directly.
6130 * server.c (resume, handle_target_event): Handle
6131 TARGET_WAITKIND_NO_RESUMED.
6132
6133 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6134
6135 * win32-low.c (psapi_get_dll_name,
6136 * win32_CreateToolhelp32Snapshot): Delete.
6137 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6138 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6139 Delete.
6140 (handle_load_dll): Add function description.
6141 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6142
6143 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6144
6145 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6146 Add comment.
6147 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6148 base address when calling win32_add_one_solib.
6149 (handle_load_dll): Delete local variable load_addr.
6150 Remove 0x1000 offset applied to DLL base address when calling
6151 win32_add_one_solib.
6152 (handle_unload_dll): Add comment.
6153
6154 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6155
6156 * win32-low.c (win32_add_all_dlls): Renames
6157 win32_ensure_ntdll_loaded. Rewrite function documentation.
6158 Adjust implementation to always load all DLLs.
6159 Add 0x1000 offset to DLL base address when calling
6160 win32_add_one_solib.
6161 (child_initialization_done): New static global.
6162 (do_initial_child_stuff): Set child_initialization_done to
6163 zero during child initialization, and 1 after. Replace call
6164 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6165 Add comment.
6166 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6167 (handle_unload_dll): Add function documentation.
6168 (get_child_debug_event): Ignore load and unload DLL events
6169 during child initialization.
6170
6171 2014-02-20 Doug Evans <dje@google.com>
6172
6173 Remove global all_lwps.
6174 * inferiors.h (ptid_of): Move here from linux-low.h.
6175 (pid_of, lwpid_of): Ditto.
6176 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6177 parameter is a struct thread_info * now.
6178 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6179 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6180 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6181 directly.
6182 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6183 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6184 * linux-arm-low.c (update_registers_callback): Update, "entry"
6185 parameter is a struct thread_info * now.
6186 Fetch lwpid from current_inferior directly.
6187 (arm_insert_point): Pass &all_threads to find_inferior instead of
6188 &all_lwps.
6189 (arm_remove_point): Ditto.
6190 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6191 (arm_prepare_to_resume): Fetch pid from thread.
6192 (arm_read_description): Fetch lwpid from current_inferior directly.
6193 * linux-low.c (all_lwps): Delete.
6194 (delete_lwp): Delete call to remove_inferior.
6195 (handle_extended_wait): Fetch lwpid from thread.
6196 (add_lwp): Don't set lwp->entry.id. Remove call to
6197 add_inferior_to_list.
6198 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6199 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6200 (kill_one_lwp_callback): Ditto.
6201 (linux_kill): Don't dereference NULL pointer.
6202 Fetch ptid,lwpid from thread.
6203 (get_detach_signal): Fetch ptid from thread.
6204 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6205 Simplify call to regcache_invalidate_thread.
6206 (delete_lwp_callback): Update, "entry" parameter is a
6207 struct thread_info * now. Fetch pid from thread.
6208 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6209 (status_pending_p_callback): Update, "entry" parameter is a
6210 struct thread_info * now. Fetch ptid from thread.
6211 (find_lwp_pid): Update, "entry" parameter is a
6212 struct thread_info * now.
6213 (linux_wait_for_lwp): Fetch pid from thread.
6214 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6215 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6216 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6217 (dequeue_one_deferred_signal): Ditto.
6218 (cancel_breakpoint): Fetch ptid from current_inferior.
6219 (linux_wait_for_event): Pass &all_threads to find_inferior,
6220 not &all_lwps. Fetch ptid, lwpid from thread.
6221 (count_events_callback): Update, "entry" parameter is a
6222 struct thread_info * now.
6223 (select_singlestep_lwp_callback): Ditto.
6224 (select_event_lwp_callback): Ditto.
6225 (cancel_breakpoints_callback): Ditto.
6226 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6227 not &all_lwps.
6228 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6229 (unsuspend_one_lwp): Update, "entry" parameter is a
6230 struct thread_info * now.
6231 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6232 not &all_lwps.
6233 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6234 Fetch lwpid from thread, not lwp.
6235 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6236 Pass &all_threads to find_inferior, not &all_lwps.
6237 (send_sigstop): Fetch lwpid from thread, not lwp.
6238 (send_sigstop_callback): Update, "entry" parameter is a
6239 struct thread_info * now.
6240 (suspend_and_send_sigstop_callback): Ditto.
6241 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6242 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6243 struct thread_info * now.
6244 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6245 from thread, lwp.
6246 (lwp_running): Update, "entry" parameter is a
6247 struct thread_info * now.
6248 (stop_all_lwps): Fetch ptid from thread.
6249 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6250 (linux_resume_one_lwp): Fetch lwpid from thread.
6251 (linux_set_resume_request): Update, "entry" parameter is a
6252 struct thread_info * now. Fetch pid, lwpid from thread.
6253 (resume_status_pending_p): Update, "entry" parameter is a
6254 struct thread_info * now.
6255 (need_step_over_p): Ditto. Fetch lwpid from thread.
6256 (start_step_over): Fetch lwpid from thread.
6257 (linux_resume_one_thread): Update, "entry" parameter is a
6258 struct thread_info * now. Fetch lwpid from thread.
6259 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6260 (proceed_one_lwp): Update, "entry" parameter is a
6261 struct thread_info * now. Fetch lwpid from thread.
6262 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6263 struct thread_info * now.
6264 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6265 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6266 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6267 directly.
6268 (regsets_store_inferior_registers): Ditto.
6269 (fetch_register, store_register): Ditto.
6270 (linux_read_memory, linux_write_memory): Ditto.
6271 (linux_request_interrupt): Ditto.
6272 (linux_read_auxv): Ditto.
6273 (linux_xfer_siginfo): Ditto.
6274 (linux_qxfer_spu): Ditto.
6275 (linux_qxfer_libraries_svr4): Ditto.
6276 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6277 moved to inferiors.h.
6278 (get_lwp): Delete.
6279 (get_thread_lwp): Update.
6280 (struct lwp_info): Delete member "entry". Simplify comment for
6281 member "thread".
6282 (all_lwps): Delete.
6283 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6284 current_inferior directly.
6285 (update_watch_registers_callback): Update, "entry" parameter is a
6286 struct thread_info * now. Fetch pid from thread.
6287 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6288 (mips_insert_point): Fetch lwpid from current_inferior.
6289 Pass &all_threads to find_inferior, not &all_lwps.
6290 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6291 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6292 directly.
6293 (mips_stopped_data_address): Ditto.
6294 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6295 directly.
6296 * linux-tile-low.c (tile_arch_setup): Ditto.
6297 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6298 (update_debug_registers_callback): Update, "entry" parameter is a
6299 struct thread_info * now. Fetch pid from thread.
6300 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6301 Pass &all_threads to find_inferior, not &all_lwps.
6302 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6303 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6304 Pass &all_threads to find_inferior, not &all_lwps.
6305 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6306 (i386_dr_low_get_status): Ditto.
6307 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6308 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6309 (x86_linux_read_description): Ditto.
6310 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6311
6312 2014-02-20 Doug Evans <dje@google.com>
6313
6314 * inferiors.c (get_first_inferior): Fix buglet.
6315
6316 2014-02-19 Doug Evans <dje@google.com>
6317
6318 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6319 * inferiors.c (add_thread): Change result type to struct thread_info *.
6320 All callers updated.
6321 (add_lwp): Call add_thread here instead of in callers.
6322 All callers updated.
6323 * linux-low.h (get_lwp_thread): Rewrite.
6324 (struct lwp_info): New member "thread".
6325
6326 2014-02-19 Doug Evans <dje@google.com>
6327
6328 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6329 All callers updated.
6330
6331 2014-02-19 Doug Evans <dje@google.com>
6332
6333 * inferiors.c (add_thread): Fix whitespace.
6334
6335 2014-02-19 Doug Evans <dje@google.com>
6336
6337 * dll.c (clear_dlls): Replace accessing list implemention details
6338 with API function.
6339 * gdbthread.h (get_first_thread): Declare.
6340 * inferiors.c (for_each_inferior_with_data): New function.
6341 (get_first_thread): New function.
6342 (find_thread_ptid): Simplify.
6343 (get_first_inferior): New function.
6344 (clear_list): Delete.
6345 (one_inferior_p): New function.
6346 (clear_inferior_list): New function.
6347 (clear_inferiors): Update.
6348 * inferiors.h (for_each_inferior_with_data): Declare.
6349 (clear_inferior_list): Declare.
6350 (one_inferior_p): Declare.
6351 (get_first_inferior): Declare.
6352 * linux-low.c (linux_wait_for_event): Replace accessing list
6353 implemention details with API function.
6354 * server.c (target_running): Ditto.
6355 (accumulate_file_name_length): New function.
6356 (emit_dll_description): New function.
6357 (handle_qxfer_libraries): Replace accessing list implemention
6358 details with API function.
6359 (handle_qxfer_threads_worker): New function.
6360 (handle_qxfer_threads_proper): Replace accessing list implemention
6361 details with API function.
6362 (handle_query): Ditto.
6363 (visit_actioned_threads_callback_ftype): New typedef.
6364 (visit_actioned_threads_data): New struct.
6365 (visit_actioned_threads): Rewrite to be find_inferior callback.
6366 (resume): Call find_inferior.
6367 (handle_status): Replace accessing list implemention
6368 details with API function.
6369 (process_serial_event): Replace accessing list implemention details
6370 with API function.
6371 * target.c (set_desired_inferior): Replace accessing list implemention
6372 details with API function.
6373 * tracepoint.c (same_process_p): New function.
6374 (gdb_agent_about_to_close): Replace accessing list implemention
6375 details with API function.
6376 * win32-low.c (child_delete_thread): Replace accessing list
6377 implemention details with API function.
6378 (match_dll_by_basename): New function.
6379 (dll_is_loaded_by_basename): New function.
6380 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6381 details call to dll_is_loaded_by_basename.
6382
6383 2014-02-19 Doug Evans <dje@google.com>
6384
6385 * dll.h (struct dll_info): Add comment.
6386 * gdbthread.h (struct thread_info): Add comment.
6387 (current_ptid): Simplify.
6388 * inferiors.c (add_process): Update.
6389 (remove_process): Update.
6390 * inferiors.h (struct process_info): Rename member "head" to "entry".
6391 * linux-low.c (delete_lwp): Update.
6392 (add_lwp): Update.
6393 (last_thread_of_process_p): Update.
6394 (kill_one_lwp_callback, linux_kill): Update.
6395 (status_pending_p_callback): Update.
6396 (wait_for_sigstop): Update. Simplify read of ptid.
6397 (start_step_over): Update.
6398 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6399 (get_lwp_thread): Update.
6400 (struct lwp_info): Rename member "head" to "entry".
6401 * regcache.h (inferior_list_entry): Delete.
6402 * server.c (kill_inferior_callback): Update.
6403 (detach_or_kill_inferior_callback): Update.
6404 (print_started_pid): Update.
6405 (print_attached_pid): Update.
6406 (process_serial_event): Simplify read of ptid.
6407 * thread-db.c (thread_db_create_event): Update.
6408 (thread_db_get_tls_address): Update.
6409 * win32-low.c (current_inferior_ptid): Simplify.
6410
6411 2014-02-19 Tom Tromey <tromey@redhat.com>
6412
6413 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6414 argument.
6415 (target_supports_btrace): Update.
6416
6417 2014-02-14 Yao Qi <yao@codesourcery.com>
6418
6419 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6420 (rsp-low-ipa.o): New target.
6421
6422 2014-02-12 Tom Tromey <tromey@redhat.com>
6423
6424 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6425 convert_ascii_to_int.
6426 * regcache.c (registers_to_string): Likewise.
6427 * remote-utils.c (decode_M_packet): Likewise.
6428 * server.c (process_serial_event): Likewise.
6429
6430 2014-02-12 Tom Tromey <tromey@redhat.com>
6431
6432 * server.c (handle_query, handle_v_run): Use hex2bin, not
6433 unhexify.
6434 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6435
6436 2014-02-12 Tom Tromey <tromey@redhat.com>
6437
6438 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6439 convert_int_to_ascii.
6440 * regcache.c (registers_to_string, collect_register_as_string):
6441 Likewise.
6442 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6443 Likewise.
6444 * server.c (process_serial_event): Likewise.
6445 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6446 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6447
6448 2014-02-12 Tom Tromey <tromey@redhat.com>
6449
6450 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6451 bin2hex, not hexify.
6452 * tracepoint.c (cmd_qtstatus): Likewise.
6453
6454 2014-02-12 Tom Tromey <tromey@redhat.com>
6455
6456 * remote-utils.c (monitor_output): Pass explicit length to
6457 hexify.
6458
6459 2014-02-12 Tom Tromey <tromey@redhat.com>
6460
6461 * tracepoint.c: Include rsp-low.h.
6462 * server.c: Include rsp-low.h.
6463 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6464 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6465 declare.
6466 * remote-utils.c: Include rsp-low.h.
6467 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6468 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6469 (convert_int_to_ascii, convert_ascii_to_int): Move to
6470 common/rsp-low.c.
6471 * regcache.c: Include rsp-low.h.
6472 * ax.c: Include rsp-low.h.
6473 * Makefile.in (SFILES): Add common/rsp-low.c.
6474 (OBS): Add rsp-low.o.
6475 (rsp-low.o): New target.
6476
6477 2014-02-12 Tom Tromey <tromey@redhat.com>
6478
6479 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6480 Include print-utils.h.
6481 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6482 (plongest, thirty_two, phex_nz): Remove.
6483 * Makefile.in (SFILES): Add common/print-utils.c.
6484 (OBS): Add print-utils.o.
6485 (print-utils-ipa.o): New target.
6486 (print-utils.o): New target.
6487 (IPA_OBJS): Add print-utils-ipa.o.
6488
6489 2014-02-06 Tom Tromey <tromey@redhat.com>
6490
6491 * Makefile.in (SFILES): Fix indentation.
6492
6493 2014-02-05 Doug Evans <dje@google.com>
6494
6495 * linux-low.c (linux_wait_for_event): Improve comment.
6496 (linux_wait_1): Keep current_inferior in sync with event_child.
6497
6498 2014-01-22 Doug Evans <dje@google.com>
6499
6500 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6501
6502 2014-01-22 Doug Evans <dje@google.com>
6503
6504 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6505 * configure: Regenerate.
6506 * config.in: Regenerate.
6507 * Makefile.in (SFILES): Add debug.c.
6508 (OBS): Add debug.o.
6509 * debug.c: New file.
6510 * debug.h: New file.
6511 * linux-aarch64-low.c (*): Update all debugging printfs to use
6512 debug_printf instead of fprintf.
6513 * linux-arm-low.c (*): Ditto.
6514 * linux-cris-low.c (*): Ditto.
6515 * linux-crisv32-low.c (*): Ditto.
6516 * linux-m32r-low.c (*): Ditto.
6517 * linux-sparc-low.c (*): Ditto.
6518 * linux-x86.c (*): Ditto.
6519 * linux-low.c (*): Ditto.
6520 (linux_wait_1): Add calls to debug_enter, debug_exit.
6521 (linux_wait): Remove redundant debugging printf.
6522 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6523 (linux_resume, unstop_all_lwps): Ditto.
6524 * mem-break.c (*): Update all debugging printfs to use
6525 debug_printf instead of fprintf.
6526 * remote-utils.c (*): Ditto.
6527 * thread-db.c (*): Ditto.
6528 * server.c #include <ctype.h>, "gdb_vecs.h".
6529 (debug_threads): Moved to debug.c.
6530 (*): Update all debugging printfs to use debug_printf instead of
6531 fprintf.
6532 (start_inferior): Replace call to fflush with call to debug_flush.
6533 (monitor_show_help): Mention set debug-format.
6534 (parse_debug_format_options): New function.
6535 (handle_monitor_command): Handle "monitor set debug-format".
6536 (gdbserver_usage): Mention --debug-format.
6537 (main): Parse --debug-format.
6538 * server.h (debug_threads): Declaration moved to debug.h.
6539 #include "debug.h".
6540 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6541 trace_debug_1 that uses debug_printf.
6542 (tracepoint_look_up_symbols): Update all debugging printfs to use
6543 debug_printf instead of fprintf.
6544
6545 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6546
6547 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6548 sys/ptrace.h.
6549
6550 2014-01-17 Pedro Alves <palves@redhat.com>
6551
6552 PR build/16445
6553 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6554 defined after including gdb_proc_service.h.
6555
6556 2014-01-16 Doug Evans <dje@google.com>
6557
6558 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6559 (match_dll): Use it.
6560
6561 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6562
6563 * target.h (target_ops) <read_btrace>: Change parameters and
6564 return type to allow error reporting.
6565 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6566 trace reading errors on.
6567 * linux-low.c (linux_low_read_btrace): Pass trace reading
6568 errors on.
6569 (linux_low_disable_btrace): New.
6570
6571 2014-01-15 Doug Evans <dje@google.com>
6572
6573 * inferiors.c (thread_id_to_gdb_id): Delete.
6574 * inferiors.h (thread_id_to_gdb_id): Delete.
6575
6576 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6577
6578 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6579 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6580 versions.
6581
6582 2014-01-08 Pedro Alves <palves@redhat.com>
6583
6584 * server.c (handle_status): Don't discard previous queued stop
6585 replies or thread's pending status here.
6586 (main) <disconnection>: Do it here instead.
6587
6588 2014-01-08 Pedro Alves <palves@redhat.com>
6589
6590 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6591 * server.c (visit_actioned_threads, handle_pending_status): New
6592 function.
6593 (handle_v_cont): Factor out parts to ...
6594 (resume): ... this new function. If in all-stop, and a thread
6595 being resumed has a pending status, report it without actually
6596 resuming.
6597 (myresume): Adjust to use the new 'resume' function.
6598 (clear_pending_status_callback, set_pending_status_callback)
6599 (find_status_pending_thread_callback): New functions.
6600 (handle_status): Handle the case of multiple threads having
6601 interesting statuses to report. Report threads' real last signal
6602 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6603 with an interesting thread to report the status for, instead of
6604 always reporting the status of the first thread.
6605
6606 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6607
6608 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6609 * gdbreplay.c (gdbreplay_version): Likewise.
6610
6611 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6612
6613 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6614 iov.iov_len with the real length in use.
6615
6616 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6617
6618 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6619 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6620 for all targets that use win32-low.c.
6621 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6622 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6623
6624 2013-12-13 Pedro Alves <palves@redhat.com>
6625
6626 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6627 if equal to TARGET_WAITKIND_LOADED.
6628 * win32-low.c (cached_status): New static global.
6629 (win32_wait): Add declaration.
6630 (do_initial_child_stuff): Flush all initial pending debug events
6631 up to the initial breakpoint.
6632 (win32_wait): If CACHED_STATUS was set, return that instead
6633 of doing a real wait. Remove the code resuming the execution
6634 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6635 during the initial phase. Also remove the code changing
6636 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6637 TARGET_WAITKIND_STOPPED.
6638
6639 2013-12-11 Yao Qi <yao@codesourcery.com>
6640
6641 * notif.c (handle_notif_ack): Return 0 if no notification
6642 matches.
6643
6644 2013-11-20 Doug Evans <dje@google.com>
6645
6646 * linux-low.c (linux_set_resume_request): Fix comment.
6647
6648 2013-11-20 Doug Evans <dje@google.com>
6649
6650 * linux-low.c (resume_status_pending_p): Tweak comment.
6651
6652 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6653
6654 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6655 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6656 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6657 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6658 (srv_amd64_regobj): Add amd64-mpx.o.
6659 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6660 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6661 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6662 * i387-fp.c (num_pl_bnd_register) Added constant.
6663 (num_pl_bnd_cfg_registers) Added constant.
6664 (struct i387_xsave) Added reserved area and MPX fields.
6665 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6666 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6667 function.
6668 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6669 (init_registers_amd64_mpx_linux): Declare new function.
6670 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6671 (x86_64_regmap): Add MPX registers.
6672 (x86_linux_read_description): Add MPX case.
6673 (initialize_low_arch): Initialize MPX targets.
6674
6675 2013-11-18 Tom Tromey <tromey@redhat.com>
6676
6677 * configure: Rebuild.
6678 * configure.ac: Don't check for stdlib.h.
6679 * gdbreplay.c: Unconditionally include stdlib.h.
6680
6681 2013-11-18 Tom Tromey <tromey@redhat.com>
6682
6683 * config.in: Rebuild.
6684 * configure: Rebuild.
6685 * configure.ac: Don't use AC_HEADER_DIRENT.
6686
6687 2013-11-18 Tom Tromey <tromey@redhat.com>
6688
6689 * server.h: Don't check HAVE_STRING_H.
6690 * gdbreplay.c: Don't check HAVE_STRING_H.
6691 * configure: Rebuild.
6692
6693 2013-11-18 Tom Tromey <tromey@redhat.com>
6694
6695 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6696 LIBGNU.
6697
6698 2013-11-08 Tom Tromey <tromey@redhat.com>
6699
6700 * configure, config.in: Rebuild.
6701 * configure.ac: Remove unused configury.
6702
6703 2013-11-08 Tom Tromey <tromey@redhat.com>
6704
6705 * acinclude.m4: Include common.m4, codeset.m4.
6706 * configure, config.in: Rebuild.
6707 * configure.ac: Use GDB_AC_COMMON.
6708
6709 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6710
6711 * linux-s390-low.c (HWCAP_S390_TE): New define.
6712 (s390_arch_setup): Consider the TE field in the HWCAP for
6713 determining 'have_regset_tdb'.
6714
6715 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6716
6717 PR gdb/16014
6718 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6719 call to sizeof.
6720
6721 2013-10-02 Pedro Alves <palves@redhat.com>
6722
6723 * server.c (process_serial_event): Don't output "GDBserver
6724 exiting" if GDB is connected through stdio.
6725 * target.c (mywait): Likewise, be silent if GDB is connected
6726 through stdio.
6727
6728 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6729
6730 * lynx-low.c (lynx_add_threads_after_attach): New function.
6731 (lynx_attach): Remove call to add_thread. Add call to
6732 lynx_add_threads_after_attach instead.
6733
6734 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6735
6736 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6737 * config.in, configure: Regenerated.
6738
6739 2013-09-18 Yao Qi <yao@codesourcery.com>
6740
6741 PR server/15959
6742 * server.c (start_inferior): Clear 'resume_info'.
6743
6744 2013-09-16 Jiong Wang <jiwang@tilera.com>
6745
6746 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6747 for each register.
6748
6749 2013-09-16 Jiong Wang <jiwang@tilera.com>
6750
6751 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6752 linux-tile-low.o to srv_tgtobj.
6753
6754 2013-09-16 Will Newton <will.newton@linaro.org>
6755
6756 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6757 out regs.
6758
6759 2013-09-06 Pedro Alves <palves@redhat.com>
6760
6761 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6762 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6763 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6764 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6765 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6766 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6767
6768 2013-09-06 Pedro Alves <palves@redhat.com>
6769
6770 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6771 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6772
6773 2013-09-06 Pedro Alves <palves@redhat.com>
6774
6775 * linux-amd64-ipa.c: Include tracepoint.h.
6776 * linux-i386-ipa.c: Include tracepoint.h.
6777
6778 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6779
6780 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6781 (ps_get_thread_area): New function.
6782
6783 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6784
6785 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6786 (initialize_low_arch): Call init_registers_crisv32 rather than
6787 init_register_crisv32.
6788
6789 2013-09-05 Pedro Alves <palves@redhat.com>
6790
6791 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6792 to ...
6793 * hostio.h: ... this new file.
6794 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6795 win32-low.c: Include hostio.h.
6796
6797 2013-09-05 Pedro Alves <palves@redhat.com>
6798
6799 * server.h (gdb_client_data, handler_func, callback_handler_func)
6800 (delete_file_handler, add_file_handler, append_callback_event)
6801 (delete_callback_event, start_event_loop, initialize_event_loop):
6802 Move to event-loop.h and include it.
6803 * event-loop.h: New file.
6804
6805 2013-09-05 Pedro Alves <palves@redhat.com>
6806
6807 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6808 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6809 (loaded_dll, unloaded_dll): Move to ...
6810 * dll.h: ... this new file.
6811 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6812
6813 2013-09-05 Pedro Alves <palves@redhat.com>
6814
6815 * server.h (current_process, get_thread_process, all_processes)
6816 (add_inferior_to_list, for_each_inferior, current_inferior)
6817 (remove_inferior, add_process, remove_process, find_process_pid)
6818 (have_started_inferiors_p, have_attached_inferiors_p)
6819 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6820 (clear_inferiors, find_inferior, find_inferior_id)
6821 (inferior_target_data, set_inferior_target_data)
6822 (inferior_regcache_data, set_inferior_regcache_data): Move to
6823 inferiors.h, and include it.
6824 * inferiors.h: New file.
6825
6826 2013-09-05 Pedro Alves <palves@redhat.com>
6827
6828 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6829 Move ...
6830 * ax.h: ... here.
6831
6832 2013-09-05 Pedro Alves <palves@redhat.com>
6833
6834 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6835 tracepoint.h.
6836 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6837 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6838 (handle_tracepoint_general_set, handle_tracepoint_query)
6839 (tracepoint_finished_step, tracepoint_was_hit)
6840 (release_while_stepping_state_list, current_traceframe)
6841 (in_readonly_region, traceframe_read_mem)
6842 (fetch_traceframe_registers, traceframe_read_sdata)
6843 (traceframe_read_info, struct fast_tpoint_collect_status)
6844 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6845 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6846 (supply_fast_tracepoint_registers)
6847 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6848 (ipa_tdesc, claim_trampoline_space)
6849 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6850 (agent_mem_read, agent_get_trace_state_variable_value)
6851 (agent_set_trace_state_variable_value, agent_tsv_read)
6852 (agent_mem_read_string, get_raw_reg_func_addr)
6853 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6854 * tracepoint.h: ... this new file.
6855
6856 2013-09-05 Pedro Alves <palves@redhat.com>
6857
6858 * server.h (perror_with_name, error, fatal, warning, paddress)
6859 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6860 include it.
6861 * utils.h: New file.
6862
6863 2013-09-05 Pedro Alves <palves@redhat.com>
6864
6865 * server.h (remote_debug, noack_mode, transport_is_reliable)
6866 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6867 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6868 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6869 (write_enn, initialize_async_io, enable_async_io)
6870 (disable_async_io, check_remote_input_interrupt_request)
6871 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6872 (dead_thread_notify, prepare_resume_reply)
6873 (decode_address_to_semicolon, decode_address, decode_m_packet)
6874 (decode_M_packet, decode_X_packet, decode_xfer_write)
6875 (decode_search_memory_packet, unhexify, hexify)
6876 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6877 (look_up_one_symbol, relocate_instruction)
6878 (monitor_output): Move to remote-utils.h, and include it.
6879 * remote-utils.h: New file.
6880
6881 2013-09-05 Pedro Alves <palves@redhat.com>
6882
6883 * server.h (_): Delete.
6884
6885 2013-09-02 Pedro Alves <palves@redhat.com>
6886
6887 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6888 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6889 allocated.
6890 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6891
6892 2013-09-02 Pierre Muller <muller@sourceware.org>
6893
6894 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6895 or WriteProcessMemory complete successfully and handle
6896 ERROR_PARTIAL_COPY error.
6897
6898 2013-09-02 Pedro Alves <palves@redhat.com>
6899
6900 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6901 error instead of EIO.
6902
6903 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6904
6905 PR server/15604
6906 * linux-low.c: Include filestuff.h.
6907 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6908 * lynx-low.c: Include filestuff.h.
6909 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6910 * server.c: Include filestuff.h.
6911 (main): Call notice_open_fds.
6912 * spu-low.c: Include filestuff.h.
6913 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6914
6915 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6916
6917 * Makefile.in: Explain why ../target and ../nat are not
6918 listed as include file search paths.
6919 (linux-waitpid.o): New object file rule.
6920 * configure.srv (srv_native_linux_obj): New variable.
6921 Replace all occurrences of linux native object files with
6922 $srv_native_linux_obj.
6923 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6924 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6925 (linux_enable_event_reporting): Remove declaration.
6926 (my_waitpid): Moved to common/linux-waitpid.c.
6927 (linux_wait_for_event): Pass ptid when calling
6928 linux_enable_event_reporting.
6929 (linux_supports_tracefork_flag): Remove.
6930 (linux_enable_event_reporting): Likewise.
6931 (linux_tracefork_grandchild): Remove.
6932 (STACK_SIZE): Moved to common/linux-ptrace.c.
6933 (linux_tracefork_child): Remove.
6934 (linux_test_for_tracefork): Remove.
6935 (linux_look_up_symbols): Call linux_supports_traceclone.
6936 (initialize_low): Remove call to linux_test_for_tracefork.
6937 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6938 common/linux-ptrace.h.
6939 (PTRACE_TYPE_ARG4): Likewise.
6940 Include linux-ptrace.h.
6941
6942 2013-08-21 Pedro Alves <palves@redhat.com>
6943
6944 * config.in: Renegerate.
6945
6946 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6947
6948 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6949 (SFILES): Remove $(srcdir)/common/target-common.c and
6950 add $(srcdir)/target/waitstatus.c.
6951 (OBS): Remove target-common.o and add waitstatus.o.
6952 (server_h): Remove $(srcdir)/../common/target-common.h and
6953 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6954 and $(srcdir)/../target/waitstatus.h.
6955 (target-common.o): Remove.
6956 (waitstatus.o): New target object file.
6957 * target.h: Do not include target-common.h and
6958 include target/resume.h, target/wait.h and
6959 target/waitstatus.h.
6960
6961 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6962
6963 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6964 to PTRACE_TYPE_ARG3.
6965 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6966 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6967 PTRACE_TYPE_ARG4.
6968 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6969 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6970
6971 2013-07-27 Jie Zhang <jie@codesourcery.com>
6972 Daniel Jacobowitz <dan@codesourcery.com>
6973 Yao Qi <yao@codesourcery.com>
6974
6975 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6976 (mips-linux-watch.o): New rule.
6977 (mips_linux_watch_h): New variable.
6978 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6979 srv_tgtobj.
6980 * linux-mips-low.c: Include mips-linux-watch.h.
6981 (struct arch_process_info, struct arch_lwp_info): New.
6982 (update_watch_registers_callback): New function.
6983 (mips_linux_new_process, mips_linux_new_thread) New functions.
6984 (mips_linux_prepare_to_resume, mips_insert_point): New
6985 functions.
6986 (mips_remove_point, mips_stopped_by_watchpoint): New
6987 functions.
6988 (rsp_bp_type_to_target_hw_bp_type): New function.
6989 (mips_stopped_data_address): New function.
6990 (the_low_target): Add watchpoint support functions.
6991
6992 2013-07-27 Yao Qi <yao@codesourcery.com>
6993
6994 * i386-low.c: Include break-common.h.
6995 (enum target_hw_bp_type): Remove.
6996
6997 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6998
6999 * Makefile.in (SFILES): /common/target-common.c.
7000 (OBS): Add target-common.o.
7001 (server_h): Add $(srcdir)/../common/target-common.h.
7002 (target-common.o): New target.
7003 * server.c (queue_stop_reply_callback): Free
7004 status string after use.
7005 * target.c (target_waitstatus_to_string): Remove.
7006 * target.h: Include target-common.h.
7007 (resume_kind): Likewise.
7008 (target_waitkind): Likewise.
7009 (target_waitstatus): Likewise.
7010 (TARGET_WNOHANG): Likewise.
7011
7012 2013-07-04 Yao Qi <yao@codesourcery.com>
7013
7014 * Makefile.in (host_alias): Use @host_noncanonical@.
7015 (target_alias): Use @target_noncanonical@.
7016 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7017 ACX_NONCANONICAL_HOST.
7018 * configure: Regenerated.
7019
7020 Revert:
7021 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7022
7023 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7024 * configure: Rebuild.
7025 * Makefile.in (version_host, version_target): Get from configure.
7026 (version.c): Use $(version_host) and $(version_target).
7027
7028 2013-07-03 Pedro Alves <palves@redhat.com>
7029
7030 * Makefile.in (config.status): Depend on development.sh.
7031 * acinclude.m4: Include libmcheck.m4.
7032 * configure: Regenerate.
7033
7034 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7035
7036 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7037 attribute inside the parentheses.
7038 (winapi_DebugSetProcessKillOnExit): Ditto.
7039 (winapi_DebugBreakProcess): Ditto.
7040 (winapi_GenerateConsoleCtrlEvent): Ditto.
7041
7042 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7043
7044 * notif.h (notif_event): Add a dummy member to avoid compiler
7045 errors.
7046
7047 2013-07-01 Pedro Alves <palves@redhat.com>
7048
7049 * hostio.c (HOSTIO_PATH_MAX): Define.
7050 (require_filename, handle_open, handle_unlink, handle_readlink):
7051 Use it.
7052
7053 2013-07-01 Pedro Alves <palves@redhat.com>
7054
7055 * server.h: Include "pathmax.h".
7056 * linux-low.c: Don't include sys/param.h.
7057 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7058 MAXPATHLEN.
7059 * win32-low.c: Don't include sys/param.h.
7060 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7061
7062 2013-07-01 Pedro Alves <palves@redhat.com>
7063
7064 * event-loop.c: Don't check HAVE_UNISTD_H before including
7065 <unistd.h>.
7066 * gdbreplay.c: Likewise.
7067 * remote-utils.c: Likewise.
7068 * server.c: Likewise.
7069 * configure.ac: Don't check for unistd.h.
7070 * configure: Regenerate.
7071
7072 2013-06-28 Tom Tromey <tromey@redhat.com>
7073
7074 * Makefile.in (version.c): Use version.in, not
7075 common/version.in.
7076
7077 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7078
7079 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7080 * configure: Rebuild.
7081 * Makefile.in (version_host, version_target): Get from configure.
7082 (version.c): Use $(version_host) and $(version_target).
7083
7084 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7085
7086 Fix trace-status to output user name without trailing colon.
7087 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7088
7089 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7090
7091 Fix trace-status to output proper start-time and stop-time.
7092 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7093 output start time and stop time in hex as gdb expects.
7094
7095 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7096
7097 * tracepoint.c (build_traceframe_info_xml): Output trace state
7098 variables present in the trace buffer.
7099
7100 2013-06-24 Tom Tromey <tromey@redhat.com>
7101
7102 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7103 create-version.sh.
7104 (version.o): Remove.
7105 * gdbreplay.c: Include version.h.
7106 (version, host_name): Don't declare.
7107 * server.h: Include version.h.
7108 (version, host_name): Don't declare.
7109
7110 2013-06-12 Pedro Alves <palves@redhat.com>
7111
7112 * linux-x86-low.c (linux_is_elf64): Delete global.
7113 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7114 with local linux_pid_exe_is_elf_64_file use.
7115
7116 2013-06-11 Pedro Alves <palves@redhat.com>
7117
7118 * linux-low.c (regset_disabled, disable_regset): New functions.
7119 (regsets_fetch_inferior_registers)
7120 (regsets_store_inferior_registers): Use them.
7121 (initialize_regsets_info); Don't allocate the disabled_regsets
7122 array here.
7123 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7124 comment.
7125
7126 2013-06-11 Pedro Alves <palves@redhat.com>
7127
7128 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7129 xmalloc.
7130
7131 2013-06-11 Pedro Alves <palves@redhat.com>
7132
7133 * linux-x86-low.c (initialize_low_arch): Call
7134 init_registers_x32_avx_linux.
7135
7136 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7137
7138 Fix compatibility with Android Bionic.
7139 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7140 it is not empty.
7141
7142 2013-06-07 Pedro Alves <palves@redhat.com>
7143
7144 PR server/14823
7145 * Makefile.in (OBS): Add tdesc.o.
7146 (IPA_OBJS): Add tdesc-ipa.o.
7147 (tdesc-ipa.o): New rule.
7148 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7149 interface.
7150 * linux-low.c (new_inferior): Delete.
7151 (disabled_regsets, num_regsets): Delete.
7152 (linux_add_process): Adjust to set the new per-process
7153 new_inferior flag.
7154 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7155 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7156 was a stop. When calling arch_setup, switch the current inferior
7157 to the thread that got an event.
7158 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7159 (regsets_fetch_inferior_registers)
7160 (regsets_store_inferior_registers): New regsets_info parameter.
7161 Adjust to use it.
7162 (linux_register_in_regsets): New regs_info parameter. Adjust to
7163 use it.
7164 (register_addr, fetch_register, store_register): New usrregs_info
7165 parameter. Adjust to use it.
7166 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7167 parameter regs_info. Adjust to use it.
7168 (linux_fetch_registers): Get the current inferior's regs_info, and
7169 adjust to use it.
7170 (linux_store_registers): Ditto.
7171 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7172 (initialize_low): Don't initialize the target_regsets here. Call
7173 initialize_low_arch.
7174 * linux-low.h (target_regsets): Delete declaration.
7175 (struct regsets_info): New.
7176 (struct usrregs_info): New.
7177 (struct regs_info): New.
7178 (struct process_info_private) <new_inferior>: New field.
7179 (struct linux_target_ops): Delete the num_regs, regmap, and
7180 regset_bitmap fields. New field regs_info.
7181 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7182 * i387-fp.c (num_xmm_registers): Delete.
7183 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7184 calls to new interface.
7185 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7186 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7187 Infer the number of xmm registers from the regcache's target
7188 description.
7189 * i387-fp.h (num_xmm_registers): Delete.
7190 * inferiors.c (add_thread): Don't install the thread's regcache
7191 here.
7192 * proc-service.c (gregset_info): Fetch the current inferior's
7193 regs_info. Adjust to use it.
7194 * regcache.c: Include tdesc.h.
7195 (register_bytes, reg_defs, num_registers)
7196 (gdbserver_expedite_regs): Delete.
7197 (get_thread_regcache): If the thread doesn't have a regcache yet,
7198 create one, instead of aborting gdbserver.
7199 (regcache_invalidate_one): Rename to ...
7200 (regcache_invalidate_thread): ... this.
7201 (regcache_invalidate_one): New.
7202 (regcache_invalidate): Only invalidate registers of the current
7203 process.
7204 (init_register_cache): Add target_desc parameter, and use it.
7205 (new_register_cache): Ditto. Assert the target description has a
7206 non zero registers_size.
7207 (regcache_cpy): Add assertions. Adjust.
7208 (realloc_register_cache, set_register_cache): Delete.
7209 (registers_to_string, registers_from_string): Adjust.
7210 (find_register_by_name, find_regno, find_register_by_number)
7211 (register_cache_size): Add target_desc parameter, and use it.
7212 (free_register_cache_thread, free_register_cache_thread_one)
7213 (regcache_release, register_cache_size): New.
7214 (register_size): Add target_desc parameter, and use it.
7215 (register_data, supply_register, supply_register_zeroed)
7216 (supply_regblock, supply_register_by_name, collect_register)
7217 (collect_register_as_string, collect_register_by_name): Adjust.
7218 * regcache.h (struct target_desc): Forward declare.
7219 (struct regcache) <tdesc>: New field.
7220 (init_register_cache, new_register_cache): Add target_desc
7221 parameter.
7222 (regcache_invalidate_thread): Declare.
7223 (regcache_invalidate_one): Delete declaration.
7224 (regcache_release): Declare.
7225 (find_register_by_number, register_cache_size, register_size)
7226 (find_regno): Add target_desc parameter.
7227 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7228 declarations.
7229 * remote-utils.c: Include tdesc.h.
7230 (outreg, prepare_resume_reply): Adjust.
7231 * server.c: Include tdesc.h.
7232 (gdbserver_xmltarget): Delete declaration.
7233 (get_features_xml, process_serial_event): Adjust.
7234 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7235 declare.
7236 (struct process_info) <tdesc>: New field.
7237 (ipa_tdesc): Declare.
7238 * tdesc.c: New file.
7239 * tdesc.h: New file.
7240 * tracepoint.c: Include tdesc.h.
7241 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7242 (get_context_regcache): Adjust to pass ipa_tdesc down.
7243 (do_action_at_tracepoint): Adjust to get the register cache size
7244 from the context regcache's description.
7245 (traceframe_walk_blocks): Adjust to get the register cache size
7246 from the current trace frame's description.
7247 (traceframe_get_pc): Adjust to get current trace frame's
7248 description and pass it down.
7249 (gdb_collect): Adjust to get the register cache size from the
7250 IPA's description.
7251 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7252 (gdbserver_xmltarget): Delete.
7253 (initialize_low_tracepoint): Set the ipa's target description.
7254 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7255 (initialize_low_tracepoint): Set the ipa's target description.
7256 * linux-x86-low.c: Include tdesc.h.
7257 [__x86_64__] (is_64bit_tdesc): New.
7258 (ps_get_thread_area, x86_get_thread_area): Use it.
7259 (i386_cannot_store_register): Rename to ...
7260 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7261 (i386_cannot_fetch_register): Rename to ...
7262 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7263 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7264 to new interface.
7265 (target_regsets): Rename to ...
7266 (x86_regsets): ... this.
7267 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7268 interface.
7269 (x86_siginfo_fixup): Use is_64bit_tdesc.
7270 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7271 (tdesc_x32_avx_linux, tdesc_x32_linux)
7272 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7273 Declare.
7274 (x86_linux_update_xmltarget): Delete.
7275 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7276 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7277 (AMD64_LINUX_USER64_CS): New.
7278 (x86_linux_read_description): New, based on
7279 x86_linux_update_xmltarget.
7280 (same_process_callback): New.
7281 (x86_arch_setup_process_callback): New.
7282 (x86_linux_update_xmltarget): New.
7283 (x86_regsets_info): New.
7284 (amd64_linux_regs_info): New.
7285 (i386_linux_usrregs_info): New.
7286 (i386_linux_regs_info): New.
7287 (x86_linux_regs_info): New.
7288 (x86_arch_setup): Reimplement.
7289 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7290 (x86_emit_ops): Ditto.
7291 (the_low_target): Adjust. Install x86_linux_regs_info,
7292 x86_cannot_fetch_register, and x86_cannot_store_register.
7293 (initialize_low_arch): New.
7294 * linux-ia64-low.c (tdesc_ia64): Declare.
7295 (ia64_fetch_register): Adjust.
7296 (ia64_usrregs_info, regs_info): New globals.
7297 (ia64_regs_info): New function.
7298 (the_low_target): Adjust.
7299 (initialize_low_arch): New function.
7300 * linux-sparc-low.c (tdesc_sparc64): Declare.
7301 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7302 Adjust.
7303 (sparc_arch_setup): New function.
7304 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7305 (the_low_target): Adjust.
7306 (initialize_low_arch): New function.
7307 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7308 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7309 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7310 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7311 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7312 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7313 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7314 (tdesc_powerpc_isa205_vsx64l): Declare.
7315 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7316 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7317 (ppc_set_pc, ppc_get_hwcap): Adjust.
7318 (ppc_usrregs_info): Forward declare.
7319 (!__powerpc64__) ppc_regmap_adjusted: New global.
7320 (ppc_arch_setup): Adjust to the current process'es target
7321 description.
7322 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7323 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7324 (ppc_store_evrregset): Adjust.
7325 (target_regsets): Rename to ...
7326 (ppc_regsets): ... this, and make static.
7327 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7328 (ppc_regs_info): New function.
7329 (the_low_target): Adjust.
7330 (initialize_low_arch): New function.
7331 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7332 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7333 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7334 (tdesc_s390x_linux64v2): Declare.
7335 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7336 (s390_fill_gregset, s390_store_last_break): Adjust.
7337 (target_regsets): Rename to ...
7338 (s390_regsets): ... this, and make static.
7339 (s390_get_pc, s390_set_pc): Adjust.
7340 (s390_get_hwcap): New target_desc parameter, and use it.
7341 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7342 (s390_arch_setup): Adjust to set the current process'es target
7343 description. Don't adjust the regmap.
7344 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7345 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7346 (regs_info_3264): New globals.
7347 (s390_regs_info): New function.
7348 (the_low_target): Adjust.
7349 (initialize_low_arch): New function.
7350 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7351 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7352 [__mips64] (init_registers_mips_linux)
7353 (init_registers_mips_dsp_linux): Delete defines.
7354 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7355 (have_dsp): New global.
7356 (mips_read_description): New, based on mips_arch_setup.
7357 (mips_arch_setup): Reimplement.
7358 (get_usrregs_info): New function.
7359 (mips_cannot_fetch_register, mips_cannot_store_register)
7360 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7361 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7362 (target_regsets): Rename to ...
7363 (mips_regsets): ... this, and make static.
7364 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7365 (dsp_regs_info, regs_info): New globals.
7366 (mips_regs_info): New function.
7367 (the_low_target): Adjust.
7368 (initialize_low_arch): New function.
7369 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7370 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7371 Declare.
7372 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7373 (arm_read_description): New, with bits factored from
7374 arm_arch_setup.
7375 (arm_arch_setup): Reimplement.
7376 (target_regsets): Rename to ...
7377 (arm_regsets): ... this, and make static.
7378 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7379 (arm_regs_info): New function.
7380 (the_low_target): Adjust.
7381 (initialize_low_arch): New function.
7382 * linux-m68k-low.c (tdesc_m68k): Declare.
7383 (target_regsets): Rename to ...
7384 (m68k_regsets): ... this, and make static.
7385 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7386 (m68k_regs_info): New function.
7387 (m68k_arch_setup): New function.
7388 (the_low_target): Adjust.
7389 (initialize_low_arch): New function.
7390 * linux-sh-low.c (tdesc_sharch): Declare.
7391 (target_regsets): Rename to ...
7392 (sh_regsets): ... this, and make static.
7393 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7394 (sh_regs_info, sh_arch_setup): New functions.
7395 (the_low_target): Adjust.
7396 (initialize_low_arch): New function.
7397 * linux-bfin-low.c (tdesc_bfin): Declare.
7398 (bfin_arch_setup): New function.
7399 (bfin_usrregs_info, regs_info): New globals.
7400 (bfin_regs_info): New function.
7401 (the_low_target): Adjust.
7402 (initialize_low_arch): New function.
7403 * linux-cris-low.c (tdesc_cris): Declare.
7404 (cris_arch_setup): New function.
7405 (cris_usrregs_info, regs_info): New globals.
7406 (cris_regs_info): New function.
7407 (the_low_target): Adjust.
7408 (initialize_low_arch): New function.
7409 * linux-cris-low.c (tdesc_crisv32): Declare.
7410 (cris_arch_setup): New function.
7411 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7412 (cris_regs_info): New function.
7413 (the_low_target): Adjust.
7414 (initialize_low_arch): New function.
7415 * linux-m32r-low.c (tdesc_m32r): Declare.
7416 (m32r_arch_setup): New function.
7417 (m32r_usrregs_info, regs_info): New globals.
7418 (m32r_regs_info): Adjust.
7419 (initialize_low_arch): New function.
7420 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7421 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7422 (tic6x_usrregs_info): Forward declare.
7423 (tic6x_read_description): New function, based on ...
7424 (tic6x_arch_setup): ... this. Reimplement.
7425 (target_regsets): Rename to ...
7426 (tic6x_regsets): ... this, and make static.
7427 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7428 (tic6x_regs_info): New function.
7429 (the_low_target): Adjust.
7430 (initialize_low_arch): New function.
7431 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7432 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7433 (target_regsets): Rename to ...
7434 (xtensa_regsets): ... this, and make static.
7435 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7436 globals.
7437 (xtensa_arch_setup, xtensa_regs_info): New functions.
7438 (the_low_target): Adjust.
7439 (initialize_low_arch): New function.
7440 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7441 (nios2_arch_setup): Set the current process'es tdesc.
7442 (target_regsets): Rename to ...
7443 (nios2_regsets): ... this.
7444 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7445 (nios2_regs_info): New function.
7446 (the_low_target): Adjust.
7447 (initialize_low_arch): New function.
7448 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7449 (aarch64_arch_setup): Set the current process'es tdesc.
7450 (target_regsets): Rename to ...
7451 (aarch64_regsets): ... this.
7452 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7453 (aarch64_regs_info): New function.
7454 (the_low_target): Adjust.
7455 (initialize_low_arch): New function.
7456 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7457 globals.
7458 (target_regsets): Rename to ...
7459 (tile_regsets): ... this.
7460 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7461 (tile_regs_info): New function.
7462 (tile_arch_setup): Set the current process'es tdesc.
7463 (the_low_target): Adjust.
7464 (initialize_low_arch): New function.
7465 * spu-low.c (tdesc_spu): Declare.
7466 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7467 * win32-arm-low.c (tdesc_arm): Declare.
7468 (arm_arch_setup): New function.
7469 (the_low_target): Install arm_arch_setup instead of
7470 init_registers_arm.
7471 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7472 (init_windows_x86): Rename to ...
7473 (i386_arch_setup): ... this. Set `win32_tdesc'.
7474 (the_low_target): Adjust.
7475 * win32-low.c (win32_tdesc): New global.
7476 (child_add_thread): Don't create the thread cache here.
7477 (do_initial_child_stuff): Set the new process'es tdesc.
7478 * win32-low.h (struct target_desc): Forward declare.
7479 (win32_tdesc): Declare.
7480 * lynx-i386-low.c (tdesc_i386): Declare global.
7481 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7482 * lynx-low.c (lynx_tdesc): New global.
7483 (lynx_add_process): Set the new process'es tdesc.
7484 * lynx-low.h (struct target_desc): Forward declare.
7485 (lynx_tdesc): Declare global.
7486 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7487 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7488 * nto-low.c (nto_tdesc): New global.
7489 (do_attach): Set the new process'es tdesc.
7490 * nto-low.h (struct target_desc): Forward declare.
7491 (nto_tdesc): Declare.
7492 * nto-x86-low.c (tdesc_i386): Declare.
7493 (nto_x86_arch_setup): Set `nto_tdesc'.
7494
7495 2013-06-04 Gary Benson <gbenson@redhat.com>
7496
7497 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7498 to qSupported response when appropriate.
7499 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7500 with nonzero-length annex.
7501 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7502 arguments supplied in annex.
7503
7504 2013-05-31 Doug Evans <dje@google.com>
7505
7506 PR server/15594
7507 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7508 64 bits in 64-cross-32 environment.
7509
7510 2013-05-28 Pedro Alves <palves@redhat.com>
7511
7512 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7513 (aarch64-without-fpu.c): Delete rule.
7514 * configure.srv (aarch64*-*-linux*): Remove references to
7515 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7516 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7517 declaration.
7518
7519 2013-05-24 Pedro Alves <palves@redhat.com>
7520
7521 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7522 instead of strchr/decode_address. Error if the range isn't split
7523 with a ','. Don't assume there's be a ':' in the action.
7524
7525 2013-05-23 Yao Qi <yao@codesourcery.com>
7526 Pedro Alves <palves@redhat.com>
7527
7528 * linux-low.c (lwp_in_step_range): New function.
7529 (linux_wait_1): If the thread was range stepping and stopped
7530 outside the stepping range, report the stop to GDB. Otherwise,
7531 continue stepping. Add range stepping debug output.
7532 (linux_set_resume_request): Copy the step range from the resume
7533 request to the lwp.
7534 (linux_supports_range_stepping): New.
7535 (linux_target_ops) <supports_range_stepping>: Set to
7536 linux_supports_range_stepping.
7537 * linux-low.h (struct linux_target_ops)
7538 <supports_range_stepping>: New field.
7539 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7540 * linux-x86-low.c (x86_supports_range_stepping): New.
7541 (the_low_target) <supports_range_stepping>: Set to
7542 x86_supports_range_stepping.
7543 * server.c (handle_v_cont): Handle 'r' action.
7544 (handle_v_requests): Append ";r" if the target supports range
7545 stepping.
7546 * target.h (struct thread_resume) <step_range_start,
7547 step_range_end>: New fields.
7548 (struct target_ops) <supports_range_stepping>:
7549 New field.
7550 (target_supports_range_stepping): New macro.
7551
7552 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7553
7554 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7555 confusion in comment.
7556
7557 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7558
7559 * lynx-low.c (struct process_info_private): New type.
7560 (lynx_add_process): New function.
7561 (lynx_create_inferior, lynx_attach): Replace calls to
7562 add_process by calls to lynx_add_process.
7563 (lynx_resume): If PTID is null, then try using
7564 current_process()->private->last_wait_event_ptid.
7565 Add comments.
7566 (lynx_clear_inferiors): Delete. The contents of that function
7567 has been inlined in lynx_mourn;
7568 (lynx_wait_1): Save the ptid in the process's private data.
7569 (lynx_mourn): Free the process' private data. Replace call
7570 to lynx_clear_inferiors by call to clear_inferiors.
7571
7572 2013-05-17 Yao Qi <yao@codesourcery.com>
7573
7574 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7575 the right place.
7576
7577 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7578
7579 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7580 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7581 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7582 PT_TEXT_END_ADDR guards. Update comments.
7583 (linux_target_op) <read_offsets>: Conditionally define to
7584 linux_read_offsets if the target is UCLIBC and if it defines
7585 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7586
7587 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7588 Andrew Jenner <andrew@codesourcery.com>
7589
7590 * Makefile.in (SFILES): Add linux-nios2-low.c.
7591 (clean): Add action to delete nios2-linux.c.
7592 (nios2-linux.c): New rule.
7593 * configure.srv: Add nios2*-*-linux*.
7594 * linux-nios2-low.c: New.
7595
7596 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7597
7598 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7599
7600 2013-04-25 Hui Zhu <hui@codesourcery.com>
7601
7602 PR gdb/15186
7603 * ax.c (ax_printf): Add fflush.
7604
7605 2013-04-22 Tom Tromey <tromey@redhat.com>
7606
7607 * Makefile.in (SFILES): Add filestuff.c.
7608 (OBS): Add filestuff.o.
7609 (filestuff.o): New target.
7610 * config.in, configure: Rebuild.
7611 * configure.ac: Check for fdwalk, pipe2.
7612
7613 2013-04-17 Pedro Alves <palves@redhat.com>
7614
7615 * configure.ac (USE_THREAD_DB): Delete variable.
7616 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7617 Don't AC_SUBST USE_THREAD_DB.
7618 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7619 * config.in, configure: Regenerate.
7620
7621 2013-04-16 Pedro Alves <palves@redhat.com>
7622
7623 * linux-low.h (struct lwp_info) <thread_known>: Move under
7624 the USE_THREAD_DB #ifdef.
7625
7626 2013-04-16 Pedro Alves <palves@redhat.com>
7627
7628 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7629 (linux-low.o): Delete rule.
7630 * linux-low.h: Always include "gdb_thread_db.h" instead of
7631 conditionally including thread_db.h.
7632 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7633 HAVE_THREAD_DB_H.
7634
7635 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7636
7637 * Makefile.in (install-only): Fix make install regression.
7638
7639 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7640
7641 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7642 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7643 installation.
7644 * gdbserver.1: Remove.
7645
7646 2013-03-22 Pedro Alves <palves@redhat.com>
7647
7648 * linux-low.c (handle_extended_wait): Don't call
7649 linux_enable_event_reporting.
7650
7651 2013-03-15 Tony Theodore <tonyt@logyst.com>
7652
7653 PR build/9098:
7654 * Makefile.in (SHELL): Use @SHELL@.
7655
7656 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7657
7658 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7659 compiler warning.
7660
7661 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7662
7663 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7664 Remove extraneous NULL element.
7665
7666 2013-03-13 Yao Qi <yao@codesourcery.com>
7667
7668 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7669 'V' block in trace frame.
7670
7671 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7672
7673 * target.h (struct target_ops): Add btrace ops.
7674 (target_supports_btrace): New macro.
7675 (target_enable_btrace): New macro.
7676 (target_disable_btrace): New macro.
7677 (target_read_btrace): New macro.
7678 * gdbthread.h (struct thread_info): Add btrace field.
7679 * server.c: Include btrace-common.h.
7680 (handle_btrace_general_set): New function.
7681 (handle_btrace_enable): New function.
7682 (handle_btrace_disable): New function.
7683 (handle_general_set): Call handle_btrace_general_set.
7684 (handle_qxfer_btrace): New function.
7685 (struct qxfer qxfer_packets[]): Add btrace entry.
7686 * inferiors.c (remove_thread): Disable btrace.
7687 * linux-low: Include linux-btrace.h.
7688 (linux_low_enable_btrace): New function.
7689 (linux_low_read_btrace): New function.
7690 (linux_target_ops): Add btrace ops.
7691 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7692 Add srv_linux_btrace=yes.
7693 (x86_64-*-linux*): Add linux-btrace.o.
7694 Add srv_linux_btrace=yes.
7695 * configure.ac: Define HAVE_LINUX_BTRACE.
7696 * config.in: Regenerated.
7697 * configure: Regenerated.
7698
7699 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7700
7701 * server.c (handle_qxfer): Preserve error message if -3 is
7702 returned.
7703 (qxfer): Document the -3 return value.
7704
7705 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7706
7707 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7708 (linux_btrace_h): New variable.
7709 (linux-btrace.o): New rule.
7710
7711 2013-03-08 Stan Shebs <stan@codesourcery.com>
7712 Hafiz Abid Qadeer <abidh@codesourcery.com>
7713
7714 * tracepoint.c (trace_buffer_size): New global.
7715 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7716 (init_trace_buffer): Change to one-argument function. Allocate
7717 trace buffer memory.
7718 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7719 handle QTBuffer:size packet.
7720 (cmd_bigqtbuffer_size): New function.
7721 (initialize_tracepoint): Call init_trace_buffer with
7722 DEFAULT_TRACE_BUFFER_SIZE.
7723 * server.c (handle_query): Add QTBuffer:size in the
7724 supported packets.
7725
7726 2013-03-07 Yao Qi <yao@codesourcery.com>
7727
7728 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7729 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7730 of -1.
7731 (cmd_qtsp): Adjust condition. Do post increment.
7732 Set cur_action and cur_step_action back to 0.
7733
7734 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7735
7736 PR server/15236
7737 * linux-low.c (linux_write_memory): Return early success if LEN is
7738 zero.
7739
7740 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7741
7742 * configure.srv: Add x86_64-*-cygwin* as target.
7743
7744 2013-02-28 Tom Tromey <tromey@redhat.com>
7745
7746 * configure.ac: Invoke AC_SYS_LARGEFILE.
7747 * configure, config.in: Rebuild.
7748
7749 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7750
7751 * win32-low.c: Throughout, fix format strings and casts of
7752 printf-like functions to avoid type related warnings on all
7753 platforms.
7754 (get_child_debug_event): Print dwDebugEventCode as hex since
7755 that's how it's usually documented.
7756
7757 2013-02-28 Yao Qi <yao@codesourcery.com>
7758
7759 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7760 pulongest.
7761
7762 2013-02-27 Jiong Wang <jiwang@tilera.com>
7763
7764 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7765 (reg-tilegx32.c): New rule.
7766 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7767 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7768 different register info initializer according to elf class.
7769 (init_registers_tilgx32): New function. The tilegx32 register info
7770 initializer.
7771 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7772 (tile_store_gregset): Likewise.
7773
7774 2013-02-27 Yao Qi <yao@codesourcery.com>
7775
7776 * server.c (process_point_options): Print debug message when
7777 debug_threads is true.
7778
7779 2013-02-26 Yao Qi <yao@codesourcery.com>
7780
7781 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7782
7783 2013-02-19 Pedro Alves <palves@redhat.com>
7784 Kai Tietz <ktietz@redhat.com>
7785
7786 PR gdb/15161
7787
7788 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7789 instead of strtoul to extract address from packet.
7790 (process_serial_event) <'z'>: Likewise.
7791
7792 2013-02-18 Yao Qi <yao@codesourcery.com>
7793
7794 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7795
7796 2013-02-14 Pedro Alves <palves@redhat.com>
7797
7798 Plug memory leak.
7799
7800 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7801 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7802
7803 2013-02-14 Pedro Alves <palves@redhat.com>
7804
7805 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7806
7807 2013-02-14 Pedro Alves <palves@redhat.com>
7808
7809 * tracepoint.c (save_string): Delete.
7810 (add_tracepoint_action): Use savestring instead of save_string.
7811
7812 2013-02-12 Pedro Alves <palves@redhat.com>
7813
7814 * linux-xtensa-low.c: Ditto.
7815 * xtensa-xtregs.c: Ditto.
7816
7817 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7818
7819 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7820 thread_db.
7821
7822 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7823
7824 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7825 aarch64_num_wp_regs and aarch64_num_bp_regs to
7826 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7827
7828 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7829
7830 * linux-aarch64-low.c (ps_get_thread_area): Replace
7831 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7832
7833 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7834 Marcus Shawcroft <marcus.shawcroft@arm.com>
7835 Nigel Stephens <nigel.stephens@arm.com>
7836 Yufeng Zhang <yufeng.zhang@arm.com>
7837
7838 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7839 (aarch64.c, aarch64-without-fpu.c): New targets.
7840 * configure.srv (aarch64*-*-linux*): New.
7841 * linux-aarch64-low.c: New file.
7842
7843 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7844
7845 * linux-low.c (handle_extended_wait, linux_create_inferior)
7846 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7847 (dequeue_one_deferred_signal, linux_resume_one_thread)
7848 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7849 (linux_tracefork_grandchild, linux_test_for_tracefork)
7850 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7851 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7852 where the argument is 0.
7853
7854 2013-01-25 Yao Qi <yao@codesourcery.com>
7855
7856 * event-loop.c: Include "queue.h".
7857 (gdb_event_p): New typedef.
7858 (struct gdb_event) <next_event>: Remove.
7859 (event_queue): Change to QUEUE(gdb_event_p).
7860 (async_queue_event): Remove.
7861 (gdb_event_xfree): New.
7862 (initialize_event_loop): New.
7863 (process_event): Use API from QUEUE.
7864 (wait_for_event): Likewise.
7865 * server.c (main): Call initialize_event_loop.
7866 * server.h (initialize_event_loop): Declare.
7867
7868 2013-01-18 Yao Qi <yao@codesourcery.com>
7869
7870 * ax.h (struct eval_agent_expr_context): New.
7871 (gdb_eval_agent_expr): Update declaration.
7872 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7873 TFRAME. Add new argument CTX.
7874 * server.h (struct eval_agent_expr_context): Declare.
7875 (agent_mem_read, agent_tsv_read): Update declaration.
7876 (agent_mem_read_string): Likewise.
7877 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7878 (add_traceframe_block): Add new argument TPOINT.
7879 Increase TPOINT->traceframe_usage.
7880 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7881 eval_tracepoint_agent_expr.
7882 (condition_true_at_tracepoint): Likewise.
7883 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7884 (agent_mem_read_string, agent_tsv_read): Likewise.
7885
7886 2013-01-16 Yao Qi <yao@codesourcery.com>
7887
7888 * linux-low.c (linux_resume_one_lwp): Don't check
7889 'lwp->bp_reinsert != 0'.
7890
7891 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7892 Pedro Alves <palves@redhat.com>
7893
7894 * lynx-low.c (ptrace_request_to_str): Define a temporary
7895 macro and use it to simplify this function's implementation.
7896
7897 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7898
7899 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7900 sets errno.
7901
7902 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7903
7904 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7905
7906 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7907
7908 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7909
7910 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7911
7912 * lynx-low.c (lynx_resume): Use the resume_info parameter
7913 to determine the ptid for the lynx_ptrace call, unless
7914 it is equal to minus_one_ptid, in which case we use the
7915 ptid of the current_inferior.
7916 (lynx_wait_1): After having received a thread create/exit
7917 event, resume the inferior's execution using the signaling
7918 thread's ptid, rather than the old ptid.
7919
7920 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7921
7922 * lynx-low.c (lynx_resume): Delete variable ret.
7923
7924 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7925
7926 * gdbreplay.c (gdbreplay_version): Update copyright year.
7927 * server.c (gdbserver_version): Likewise.
7928
7929 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7930
7931 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7932 new thread.
7933
7934 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7935
7936 * lynx-low.c (ptrace_request_to_str): Add handling for
7937 PTRACE_GETTRACESIG.
7938
7939 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7940
7941 * lynx-low.c (lynx_attach): Delete variable new_process.
7942
7943 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7944
7945 * lynx-low.c (lynx_create_inferior): Delete variable
7946 new_process.
7947
7948 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7949
7950 * lynx-low.c (ptrace_request_to_str): Do not handle
7951 PTRACE_GETTHREADLIST if this macro does not exist.
7952
7953 2012-12-15 Yao Qi <yao@codesourcery.com>
7954
7955 * Makefile.in (OBS): Add notif.o.
7956 * notif.c, notif.h: New.
7957 * server.c: Include "notif.h".
7958 (struct vstop_notif) <next>: Remove.
7959 <base>: New field.
7960 (queue_stop_reply): Update.
7961 (push_event, send_next_stop_reply): Remove.
7962 (discard_queued_stop_replies): Update.
7963 (notif_stop): New variable.
7964 (handle_v_stopped): Remove.
7965 (handle_v_requests): Don't call handle_v_stopped. Call
7966 handle_ack_notif instead.
7967 (queue_stop_reply_callback): Call notif_event_enque instead
7968 of queue_stop_reply.
7969 (handle_status): Don't call send_next_stop_reply, call
7970 notif_write_event instead.
7971 (kill_inferior_callback): Likewise.
7972 (detach_or_kill_inferior_callback): Likewise.
7973 (main): Call initialize_notif.
7974 (process_serial_event): Call QUEUE_is_empty.
7975 (handle_target_event): Call notif_push instead of push event.
7976 * server.h (push_event): Remove declaration.
7977
7978 2012-12-10 Tom Tromey <tromey@redhat.com>
7979
7980 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7981 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7982 macros.
7983 (.c.o): Rewrite.
7984 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7985 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7986 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7987 (amd64-linux-ipa.o, ax.o): Rewrite.
7988 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7989 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7990 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7991 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7992 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7993 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7994 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7995 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7996 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7997 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7998 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7999 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8000 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8001 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8002 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8003 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8004 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8005 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8006 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8007 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8008 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8009 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8010 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8011 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8012 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8013 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8014 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8015 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8016 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8017 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8018 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8019 (reg-tilegx.o): Remove.
8020 (all_object_files): New macro.
8021 Include .deps files.
8022 * aclocal.m4, configure: Rebuild.
8023 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8024 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8025 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8026
8027 2012-12-05 Tom Tromey <tromey@redhat.com>
8028
8029 PR gdb/14917:
8030 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8031
8032 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8033
8034 * configure.ac: Check for linux/perf_event.h.
8035 * config.in: Regenerated.
8036 * configure: Regenerated.
8037
8038 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8039
8040 * hostio.c (handle_readlink): Decrease buffer size
8041 parameter passed to readlink by one byte.
8042
8043 2012-11-26 Yao Qi <yao@codesourcery.com>
8044
8045 * configure.ac (build_warnings): Append '-Wempty-body'.
8046 * configure: Regenerated.
8047 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8048 body.
8049
8050 2012-11-15 Pierre Muller <muller@sourceware.org>
8051
8052 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8053 * config.in: Regenerate.
8054 * configure: Regenerate.
8055 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8056 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8057 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8058 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8059 header.
8060 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8061 instead of <sys/wait.h> header.
8062 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8063
8064 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8065
8066 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8067 (various make rules): Remove -DGDBSERVER
8068
8069 2012-11-09 Yao Qi <yao@codesourcery.com>
8070
8071 * spu-low.c (current_ptid): Move it to ..
8072 * gdbthread.h: ... here. New.
8073 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8074 * server.c (myresume, process_serial_event): Likewise.
8075 * thread-db.c (thread_db_find_new_threads): Likewise.
8076 * tracepoint.c (run_inferior_command): Likewise.
8077
8078 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8079
8080 * server.c (handle_search_memory_1): Include access length in
8081 warning message.
8082
8083 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8084
8085 * linux-crisv32-low.c: Fix compile errors.
8086
8087 2012-09-04 Yao Qi <yao@codesourcery.com>
8088
8089 * tracepoint.c (cmd_qtsv): Adjust debug message.
8090 Don't check CUR_TPOINT.
8091
8092 2012-08-28 Yao Qi <yao@codesourcery.com>
8093
8094 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8095 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8096 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8097 Remove declarations of xmalloc, xreallloc, xstrdup and
8098 freeargv.
8099 * Makefile.in (libiberty_h): New.
8100 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8101 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8102
8103 2012-08-23 Yao Qi <yao@codesourcery.com>
8104
8105 * server.h: Remove declaration of 'xsnprintf'.
8106
8107 2012-08-22 Keith Seitz <keiths@redhat.com>
8108
8109 * server.h: Include build-gnulib-gbserver/config.h.
8110 * gdbreplay.c: Likewise.
8111
8112 2012-08-08 Doug Evans <dje@google.com>
8113
8114 * Makefile.in (SFILES): Add gdb_vecs.c.
8115 (OBS): Add gdb_vecs.o.
8116 (gdb_vecs_h, host_defs_h): New variables.
8117 (thread-db.o): Add $(gdb_vecs_h) dependency.
8118 (gdb_vecs.o): New rule.
8119 * thread-db.c: #include "gdb_vecs.h".
8120 (thread_db_load_search): Use a vector to iterate over path elements.
8121 Handle text appearing after "$pdir".
8122
8123 * configure.ac: Add check for strstr.
8124 * config.in: Regenerate.
8125 * configure: Regenerate.
8126
8127 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8128
8129 * hostio.c (handle_pread): If pread fails, fall back to attempting
8130 lseek/read.
8131 (handle_pwrite): Likewise for pwrite.
8132
8133 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8134
8135 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8136 between unsupported TYPE and unimplementable ADDR/LEN combination.
8137 (arm_insert_point): Act on new return value.
8138
8139 2012-07-31 Pedro Alves <palves@redhat.com>
8140
8141 * server.c (process_point_options): Only skip tokens if we find
8142 one that is unrecognized. Don't treat 'X' specially while
8143 skipping unrecognized tokens.
8144
8145 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8146
8147 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8148 to 4-byte-align HW breakpoint addresses for Thumb.
8149
8150 2012-07-27 Yao Qi <yao@codesourcery.com>
8151
8152 PR remote/14161.
8153
8154 * server.h: Declare gdb_agent_about_to_close.
8155 * target.c (kill_inferior): Include "agent.h".
8156 New. Send command 'kill'.
8157 * target.h (kill_inferior): Removed macro.
8158 * tracepoint.c (gdb_agent_about_to_close): New.
8159 (gdb_agent_helper_thread): Handle command 'close'.
8160 Wait endlessly until the inferior stops.
8161 Install gdb_agent_remove_socket to atexit hook.
8162 (agent_socket_name): New static variable.
8163 (gdb_agent_socket_init): Replace local variable 'name' with
8164 'agent_socket_name'.
8165 (gdb_agent_remove_socket): New.
8166
8167 2012-07-27 Yao Qi <yao@codesourcery.com>
8168
8169 * server.c (process_point_options): Stop at 'X' when parsing.
8170
8171 2012-07-19 Michael Eager <eager@eagercon.com>
8172
8173 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8174 to hw_execute.
8175 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8176 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8177 hardware breakpoint.
8178
8179 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8180
8181 * gdbserver/linux-low.c (initialize_low): Call
8182 linux_ptrace_init_warnings.
8183
8184 2012-07-02 Doug Evans <dje@google.com>
8185
8186 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8187 pointer to int.
8188
8189 2012-07-02 Stan Shebs <stan@codesourcery.com>
8190
8191 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8192 (ax.o): Add it to build rule.
8193 (ax-ipa.o): Ditto.
8194 (OBS): Add format.o.
8195 (IPA_OBS): Add format.o.
8196 * server.c (handle_query): Claim support for breakpoint commands.
8197 (process_point_options): Add command case.
8198 (process_serial_event): Leave running if there are printfs in
8199 effect.
8200 * mem-break.h (any_persistent_commands): Declare.
8201 (add_breakpoint_commands): Declare.
8202 (gdb_no_commands_at_breakpoint): Declare.
8203 (run_breakpoint_commands): Declare.
8204 * mem-break.c (struct point_command_list): New struct.
8205 (struct breakpoint): New field command_list.
8206 (any_persistent_commands): New function.
8207 (add_commands_to_breakpoint): New function.
8208 (add_breakpoint_commands): New function.
8209 (gdb_no_commands_at_breakpoint): New function.
8210 (run_breakpoint_commands): New function.
8211 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8212 locally.
8213 * ax.c: Include format.h.
8214 (ax_printf): New function.
8215 (gdb_eval_agent_expr): Add printf opcode.
8216
8217 2012-06-13 Yao Qi <yao@codesourcery.com>
8218
8219 * server.c (start_inferior): Remove duplicated writes to fields
8220 'last_resume_kind' and 'last_status' of 'current_inferior'.
8221
8222 2012-06-12 Yao Qi <yao@codesourcery.com>
8223 Pedro Alves <palves@redhat.com>
8224
8225 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8226 comment.
8227 * server.c (handle_v_cont): Extend comment.
8228
8229 2012-06-11 Yao Qi <yao@codesourcery.com>
8230
8231 * linux-low.c (linux_attach): Add 'static'.
8232
8233 2012-06-06 Yao Qi <yao@codesourcery.com>
8234
8235 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8236
8237 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8238
8239 Fix gcc -flto compilation warning.
8240 * server.c (main): Make variable multi_mode and attach volatile.
8241
8242 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8243
8244 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8245 if the platform doesn't know about it.
8246
8247 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8248
8249 * Makefile.in (SFILES): Add linux-tile-low.c.
8250 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8251 * configure.srv: Handle tilegx-*-linux*.
8252 * linux-tile-low.c: New file.
8253
8254 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8255
8256 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8257
8258 2012-05-24 Pedro Alves <palves@redhat.com>
8259
8260 PR gdb/7205
8261
8262 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8263
8264 2012-05-24 Pedro Alves <palves@redhat.com>
8265
8266 PR gdb/7205
8267
8268 Replace target_signal with gdb_signal throughout.
8269
8270 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8271
8272 * linux-low.c (linux_store_registers): Avoid the copying sequence
8273 when no data has been retrieved by ptrace.
8274
8275 2012-05-22 Will Deacon <will.deacon@arm.com>
8276
8277 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8278 Include asm/ptrace.h.
8279 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8280 already defined.
8281
8282 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8283
8284 * linux-low.c (linux_store_registers): Don't re-retrieve data
8285 with ptrace that has already been obtained from /proc. Always
8286 copy any data retrieved with ptrace to the buffer supplied.
8287
8288 2012-05-11 Yao Qi <yao@codesourcery.com>
8289 Pedro Alves <palves@redhat.com>
8290
8291 * linux-low.c (enum stopping_threads_kind): New.
8292 (stopping_threads): Change type to `enum stopping_threads_kind'.
8293 (handle_extended_wait): If stopping and suspending threads, leave
8294 the new_lwp suspended too.
8295 (linux_wait_for_event): Adjust.
8296 (stop_all_lwps): Set `stopping_threads' to
8297 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8298 whether we're suspending threads or just stopping them. Assert no
8299 recursion happens.
8300
8301 2012-04-29 Yao Qi <yao@codesourcery.com>
8302
8303 * server.h: Move some code to ...
8304 * gdbthread.h: ... here. New.
8305 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8306 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8307 (nto-low.o, win32-low.o): Likewise.
8308 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8309 * regcache.c, remote-utils.c, server.c: Likewise.
8310 * target.c, tracepoint.c, win32-low.c: Likewise.
8311
8312 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8313
8314 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8315 (PTRACE_ARG4_TYPE): Likewise.
8316 (PTRACE_XFER_TYPE): Likewise.
8317 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8318 ptrace to PTRACE_ARG3_TYPE.
8319 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8320 (PTRACE_ARG4_TYPE): Likewise.
8321 (PTRACE_XFER_TYPE): Likewise.
8322 (linux_detach_one_lwp): Cast fourth argument of
8323 ptrace to long then PTRACE_ARG4_TYPE.
8324 (regsets_fetch_inferior_registers): Cast third argument of
8325 ptrace to long then PTRACE_ARG3_TYPE.
8326 (regsets_store_inferior_registers): Likewise.
8327
8328 2012-04-20 Pedro Alves <palves@redhat.com>
8329
8330 * configure: Regenerate.
8331
8332 2012-04-19 Pedro Alves <palves@redhat.com>
8333
8334 * Makefile.in (GNULIB_BUILDDIR): New.
8335 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8336 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8337 (all, install-only, uninstall, clean-info, all-lib, clean): No
8338 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8339 (maintainer-clean realclean distclean): Use subdir_do.
8340 (subdir_do): New.
8341 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8342 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8343 * acinclude.m4: Include acx_configure_dir.m4.
8344 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8345 calls. Call AC_PROG_RANLIB. Configure gnulib using
8346 ACX_CONFIGURE_DIR.
8347 (GNULIB): New.
8348 (GNULIB_STDINT_H): Adjust.
8349 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8350 * gdbreplay.c: Include build-gnulib/config.h.
8351 * server.h: Likewise.
8352 * aclocal.m4: Regenerate.
8353 * config.in: Regenerate.
8354 * configure: Regenerate.
8355
8356 2012-04-19 Pedro Alves <palves@redhat.com>
8357
8358 * Makefile.in (LIBGNU, INCGNU): Adjust.
8359 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8360 (all, install-only, uninstall, clean-info, all-lib, clean)
8361 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8362 * configure.ac: Adjust AC_OUTPUT output.
8363 * aclocal.m4: Regenerate.
8364 * configure: Regenerate.
8365
8366 2012-04-19 Pedro Alves <palves@redhat.com>
8367
8368 * Makefile.in (generated_files): New.
8369 (server_h): Remove the explicit dependency on config.h, and depend
8370 on $generated_files.
8371
8372 2012-04-19 Pedro Alves <palves@redhat.com>
8373
8374 * Makefile.in (INCGNU): Add -Ignulib.
8375
8376 2012-04-19 Pedro Alves <palves@redhat.com>
8377
8378 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8379 (INCGNU): ... this, and spell out -I here.
8380 (GNULIB_LIB): Rename to ...
8381 (LIBGNU): ... this.
8382 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8383
8384 2012-04-19 Pedro Alves <palves@redhat.com>
8385
8386 * config.in: Regenerate.
8387
8388 2012-04-19 Pedro Alves <palves@redhat.com>
8389
8390 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8391 * server.h (memmem): Remove declaration.
8392 * config.in: Regenerate.
8393 * configure: Regenerate.
8394
8395 2012-04-19 Yao Qi <yao@codesourcery.com>
8396
8397 * Makefile.in (SFILES): Add common/vec.c.
8398 (OBS): Add vec.o.
8399 (vec.o): New rule.
8400
8401 2012-04-19 Yao Qi <yao@codesourcery.com>
8402
8403 * remote-utils.c (prepare_resume_reply): Replace with macro
8404 target_core_of_thread.
8405 * server.c (handle_qxfer_threads_proper): Likewise.
8406 * target.h (traget_core_of_thread): New macro.
8407
8408 2012-04-18 Pedro Alves <palves@redhat.com>
8409
8410 * aclocal.m4: Regenerate.
8411 * configure: Regenerate.
8412
8413 2012-04-16 Yao Qi <yao@codesourcery.com>
8414
8415 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8416 duplicated on address.
8417
8418 2012-04-16 Yao Qi <yao@codesourcery.com>
8419
8420 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8421 (struct tracepoint_action_ops) <send>: New field.
8422 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8423 (agent_expr_send, x_tracepoint_action_send): New.
8424 (l_tracepoint_action_send): New.
8425 (cmd_qtdp): Download and install tracepoint
8426 according to `use_agent'.
8427 (run_inferior_command): Add one more parameter `len'.
8428 Update callers.
8429 (tracepoint_send_agent): New.
8430 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8431
8432 2012-04-16 Yao Qi <yao@codesourcery.com>
8433
8434 * tracepoint.c (download_tracepoints): Moved to ...
8435 (cmd_qtstart): ... here.
8436
8437 2012-04-14 Yao Qi <yao@codesourcery.com>
8438
8439 * tracepoint.c: Include inttypes.h.
8440 (struct collect_memory_action): Use sized types.
8441 (struct tracepoint): Likewise.
8442 (cmd_qtdp, stop_tracing): Update print specifiers.
8443 (cmd_qtp, response_tracepoint): Likewise.
8444 (collect_data_at_tracepoint): Likewise.
8445 (collect_data_at_step): Likewise.
8446
8447 2012-04-14 Yao Qi <yao@codesourcery.com>
8448
8449 Import gnulib module inttypes.
8450 * aclocal.m4, config.in, configure: Regenerated.
8451
8452 2012-04-14 Yao Qi <yao@codesourcery.com>
8453
8454 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8455 Makefile and config.status at last.
8456
8457 2012-04-13 Yao Qi <yao@codesourcery.com>
8458
8459 * tracepoint.c: Include stdint.h unconditionally.
8460
8461 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8462
8463 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8464 on BFD_HAVE_SYS_PROCFS_TYPE.
8465 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8466 * configure: Regenerate.
8467 * config.in: Likewise.
8468
8469 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8470
8471 * Makefile.in (clean): Also remove x32.c x32-linux.c
8472 x32-avx.c x32-avx-linux.c.
8473 (x32.o): New target.
8474 (x32.c): Likewise.
8475 (x32-linux.o): Likewise.
8476 (x32-linux.c): Likewise.
8477 (x32-avx.o): Likewise.
8478 (x32-avx.c): Likewise.
8479 (x32-avx-linux.o): Likewise.
8480 (x32-avx-linux.c): Likewise.
8481
8482 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8483 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8484 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8485 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8486 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8487 i386/x32-avx-linux.xml.
8488
8489 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8490 (init_registers_x32_avx_linux): Likwise.
8491 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8492 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8493
8494 2012-04-13 Pedro Alves <palves@redhat.com>
8495
8496 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8497 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8498 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8499 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8500 the sub-make.
8501
8502 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8503
8504 * linux-x86-low.c (compat_x32_clock_t): New.
8505 (compat_x32_siginfo_t): Likewise.
8506 (compat_x32_siginfo_from_siginfo): Likewise.
8507 (siginfo_from_compat_x32_siginfo): Likewise.
8508 (linux_is_elf64): Likewise.
8509 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8510 and siginfo_from_compat_x32_siginfo for x32.
8511 (x86_arch_setup): Set linux_is_elf64.
8512
8513 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8514
8515 PR gdb/13969
8516 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8517 e_machine field.
8518 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8519 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8520 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8521 compatible with process.
8522
8523 2012-04-12 Yao Qi <yao@codesourcery.com>
8524
8525 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8526 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8527 (install-only, install-info, clean): Handle sub dir gnulib.
8528 (all-lib, am--refresh): New targets.
8529 (memmem.o): Remove target.
8530 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8531 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8532 (AC_REPLACE_FUNCS): Remove memmem.
8533 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8534 (AC_OUTPUT): Generate Makefile in gnulib/.
8535 * aclocal.m4, config.in, configure: Regenerated.
8536
8537 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8538
8539 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8540
8541 2012-04-05 Pedro Alves <palves@redhat.com>
8542
8543 -Werror=strict-aliasing
8544
8545 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8546 pointer.
8547
8548 2012-04-04 Pedro Alves <palves@redhat.com>
8549
8550 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8551 (sparc_store_gregset_from_stack, sparc_store_gregset)
8552 (sparc_breakpoint_at): Fix formatting.
8553
8554 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8555
8556 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8557 are available.
8558 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8559 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8560 * config.in: Regenerate.
8561 * configure: Likewise.
8562
8563 2012-03-29 Pedro Alves <palves@redhat.com>
8564
8565 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8566 Correct ptrace arguments.
8567
8568 2012-03-28 Pedro Alves <palves@redhat.com>
8569
8570 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8571 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8572 (IA64_FR1_REGNUM): New defines.
8573 (ia64_fetch_register): New.
8574 (the_low_target): Install it.
8575 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8576 field.
8577 * linux-low.c (linux_fetch_registers): Try the
8578 the_low_target.fetch_register hook first.
8579
8580 * linux-arm-low.c (the_low_target): Adjust.
8581 * linux-bfin-low.c (the_low_target): Adjust.
8582 * linux-cris-low.c (the_low_target): Adjust.
8583 * linux-crisv32-low.c (the_low_target): Adjust.
8584 * linux-m32r-low.c (the_low_target): Adjust.
8585 * linux-m68k-low.c (the_low_target): Adjust.
8586 * linux-mips-low.c (the_low_target): Adjust.
8587 * linux-ppc-low.c (the_low_target): Adjust.
8588 * linux-s390-low.c (the_low_target): Adjust.
8589 * linux-sh-low.c (the_low_target): Adjust.
8590 * linux-sparc-low.c (the_low_target): Adjust.
8591 * linux-tic6x-low.c (the_low_target): Adjust.
8592 * linux-x86-low.c (the_low_target): Adjust.
8593 * linux-xtensa-low.c (the_low_target): Adjust.
8594
8595 2012-03-26 Pedro Alves <palves@redhat.com>
8596
8597 * server.c (handle_qxfer_libraries): Don't bail early if
8598 the_target->qxfer_libraries_svr4 is not NULL.
8599
8600 2012-03-26 Pedro Alves <palves@redhat.com>
8601
8602 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8603
8604 2012-03-23 Pedro Alves <palves@redhat.com>
8605
8606 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8607 "library-list-svr4" element's start tag when the the DSO list is
8608 empty.
8609
8610 2012-03-23 Pedro Alves <palves@redhat.com>
8611
8612 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8613 a variable whose type size is the same as the inferior's pointer
8614 size.
8615
8616 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8617
8618 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8619 struct siginfo.
8620 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8621 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8622 * linux-low.h: Include <signal.h>.
8623 (struct siginfo): Remove forward declaration.
8624 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8625 struct siginfo.
8626
8627 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8628
8629 * .gitignore: Ignore more files.
8630
8631 2012-03-19 Pedro Alves <palves@redhat.com>
8632 Jan Kratochvil <jan.kratochvil@redhat.com>
8633
8634 * server.c (cont_thread, general_thread): Add describing comments.
8635 (start_inferior): Clear `cont_thread'.
8636 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8637 of a process.
8638
8639 2012-03-15 Yao Qi <yao@codesourcery.com>
8640
8641 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8642 handling to ...
8643 (cmd_qtdp): ... here.
8644
8645 2012-03-15 Yao Qi <yao@codesourcery.com>
8646
8647 * tracepoint.c (struct tracepoint_action_ops): New.
8648 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8649 (m_tracepoint_action_download): New.
8650 (r_tracepoint_action_download): New.
8651 (x_tracepoint_action_download): New.
8652 (l_tracepoint_action_download): New.
8653 (add_tracepoint_action): Install `action->ops' according type.
8654 (download_tracepoint_1): Move code `download' function pointer
8655 of various tracepoint_action_ops.
8656
8657 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8658
8659 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8660 linux_ptrace_attach_warnings.
8661
8662 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8663
8664 * Makefile.in (linux-ptrace.o): New.
8665 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8666 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8667 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8668 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8669 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8670 of these targets.
8671 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8672
8673 2012-03-08 Yao Qi <yao@codesourcery.com>
8674 Pedro Alves <palves@redhat.com>
8675
8676 Fix PR server/13392.
8677 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8678 offset of JMP insn.
8679 * tracepoint.c (remove_tracepoint): New.
8680 (cmd_qtdp): Call remove_tracepoint when failed to install.
8681
8682 2012-03-07 Pedro Alves <palves@redhat.com>
8683
8684 * linux-low.c (get_detach_signal): New.
8685 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8686 Pass on pending signals to PTRACE_DETACH. Check the result of the
8687 ptrace call.
8688 * server.c (program_signals, program_signals_p): New.
8689 (handle_general_set): Handle QProgramSignals.
8690 * server.h (program_signals, program_signals_p): Declare.
8691
8692 2012-03-05 Pedro Alves <palves@redhat.com>
8693 Jan Kratochvil <jan.kratochvil@redhat.com>
8694
8695 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8696 New comment why.
8697
8698 2012-03-03 Yao Qi <yao@codesourcery.com>
8699
8700 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8701 agent_look_up_symbols.
8702
8703 2012-03-03 Yao Qi <yao@codesourcery.com>
8704
8705 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8706 (linux-x86-low.o): Likewise.
8707 * server.h: Remove in_process_agent_loaded.
8708 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8709 common/agent.c.
8710 Update callers.
8711
8712 2012-03-03 Yao Qi <yao@codesourcery.com>
8713
8714 * tracepoint.c (gdb_agent_capability): New global.
8715 (in_process_agent_loaded_ust): Renamed to
8716 `in_process_agent_supports_ust'.
8717 Update callers.
8718 (in_process_agent_supports_ust): Call agent_capability_check.
8719 (clear_installed_tracepoints): Assert that agent supports
8720 agent.
8721
8722 2012-03-03 Yao Qi <yao@codesourcery.com>
8723
8724 * linux-low.c (linux_supports_agent): New.
8725 (linux_target_ops): Initialize field `supports_agent' with
8726 linux_supports_agent.
8727 * target.h (struct target_ops) <supports_agent>: New.
8728 (target_supports_agent): New macro.
8729 * server.c (handle_general_set): Handle packet 'QAgent'.
8730 (handle_query): Send `QAgent+'.
8731 * Makefile.in (server.o): Depends on agent.h.
8732
8733 2012-03-03 Yao Qi <yao@codesourcery.com>
8734
8735 * Makefile.in (OBS): Add agent.o.
8736 Add new rule for agent.o.
8737 Track dependence of tracepoint.c on agent.h.
8738 * tracepoint.c (run_inferior_command_1):
8739 (run_inferior_command): Call agent_run_command.
8740 (gdb_ust_connect_sync_socket): Deleted. Move it to
8741 common/agent.c.
8742 (resume_thread, stop_thread): Likewise.
8743 (gdb_ust_socket_init): Renamed to ...
8744 (gdb_agent_socket_init): ... New.
8745 (gdb_ust_thread): Renamed to ...
8746 (gdb_agent_helper_thread): ... New.
8747 (gdb_ust_init): Move some code to ...
8748 (gdb_agent_init): ... here. New.
8749 [HAVE_UST]: Call gdb_ust_init.
8750 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8751 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8752 * config.in, configure: Regenerated.
8753
8754 2012-03-02 Pedro Alves <palves@redhat.com>
8755
8756 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8757 * linux-low.c (struct simple_pid_list): New.
8758 (stopped_pids): New a struct simple_pid_list pointer.
8759 (add_to_pid_list, pull_pid_from_list): New.
8760 (handle_extended_wait): Don't assume the first signal new children
8761 report is SIGSTOP. Adjust call to pull_pid_from_list.
8762 (linux_wait_for_lwp): Adjust.
8763
8764 2012-03-02 Yao Qi <yao@codesourcery.com>
8765
8766 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8767 debug log.
8768
8769 2012-03-02 Yao Qi <yao@codesourcery.com>
8770
8771 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8772 `stop_pc' and `tpoint'. Update caller.
8773
8774 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8775
8776 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8777 * linux-low.c (use_linux_regsets): New macro.
8778 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8779 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8780 (linux_register_in_regsets): New function.
8781 (usr_fetch_inferior_registers): Skip registers covered by
8782 regsets.
8783 (usr_store_inferior_registers): Likewise.
8784 (usr_fetch_inferior_registers): New macro.
8785 (usr_store_inferior_registers): Likewise.
8786 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8787 (linux_store_registers): Likewise.
8788 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8789 prototype.
8790 (init_registers_mips64_dsp_linux): Likewise.
8791 (init_registers_mips_linux): New macro.
8792 (init_registers_mips_dsp_linux): Likewise.
8793 (mips_dsp_num_regs): Likewise.
8794 (DSP_BASE, DSP_CONTROL): New fallback macros.
8795 (mips_base_regs): New macro.
8796 (mips_regmap): Use it. Fix the size.
8797 (mips_dsp_regmap): New variable.
8798 (mips_dsp_regset_bitmap): Likewise.
8799 (mips_arch_setup): New function.
8800 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8801 than mips_regmap.
8802 (mips_cannot_store_register): Likewise.
8803 (the_low_target): Update .arch_setup, .num_regs and .regmap
8804 initializers. Add .regset_bitmap initializer.
8805 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8806 initializer.
8807 * linux-bfin-low.c (the_low_target): Likewise.
8808 * linux-cris-low.c (the_low_target): Likewise.
8809 * linux-crisv32-low.c (the_low_target): Likewise.
8810 * linux-ia64-low.c (the_low_target): Likewise.
8811 * linux-m32r-low.c (the_low_target): Likewise.
8812 * linux-m68k-low.c (the_low_target): Likewise.
8813 * linux-ppc-low.c (the_low_target): Likewise.
8814 * linux-s390-low.c (the_low_target): Likewise.
8815 * linux-sh-low.c (the_low_target): Likewise.
8816 * linux-sparc-low.c (the_low_target): Likewise.
8817 * linux-tic6x-low.c (the_low_target): Likewise.
8818 * linux-x86-low.c (the_low_target): Likewise.
8819 * linux-xtensa-low.c (the_low_target): Likewise.
8820 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8821 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8822 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8823 srv_xmlfiles.
8824 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8825 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8826
8827 2012-02-29 Yao Qi <yao@codesourcery.com>
8828 Pedro Alves <palves@redhat.com>
8829
8830 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8831 `step_over_finished' is true.
8832
8833 2012-02-27 Pedro Alves <palves@redhat.com>
8834
8835 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8836 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8837
8838 2012-02-27 Pedro Alves <palves@redhat.com>
8839
8840 PR server/9684
8841 * linux-low.c (pid_is_stopped): New.
8842 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8843
8844 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8845
8846 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8847 of conditions.
8848
8849 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8850
8851 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8852
8853 2012-02-24 Luis Machado <lgustavo@codesourcery>
8854
8855 * server.c (handle_query): Advertise support for target-side
8856 breakpoint condition evaluation.
8857 (process_point_options): New function.
8858 (process_serial_event): When inserting a breakpoint, check for
8859 a target-side condition that should be evaluated.
8860
8861 * mem-break.c: Include regcache.h and ax.h.
8862 (point_cond_list_t): New data structure.
8863 (breakpoint) <cond_list>: New field.
8864 (find_gdb_breakpoint_at): Make non-static.
8865 (delete_gdb_breakpoint_at): Clear any target-side
8866 conditions.
8867 (clear_gdb_breakpoint_conditions): New function.
8868 (add_condition_to_breakpoint): Likewise.
8869 (add_breakpoint_condition): Likewise.
8870 (gdb_condition_true_at_breakpoint): Likewise.
8871 (gdb_breakpoint_here): Return result directly instead
8872 of going through a local variable.
8873
8874 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8875 (clear_gdb_breakpoint_conditions): Likewise.
8876 (add_breakpoint_condition): Likewise.
8877 (gdb_condition_true_at_breakpoint): Likewise.
8878
8879 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8880 (need_step_over_p): Take target-side breakpoint condition into
8881 consideration.
8882
8883 2012-02-24 Luis Machado <lgustavo@codesourcery>
8884
8885 * server.h: Include tracepoint.h.
8886 (agent_mem_read, agent_get_trace_state_variable_value,
8887 agent_set_trace_state_variable_value,
8888 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8889 get_set_tsv_func_addr): New prototypes.
8890
8891 * ax.h: New include file.
8892 * ax.c: New source file.
8893
8894 * tracepoint.c: Include ax.h.
8895 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8896 agent_expr, eval_result_type): Move to ax.h.
8897 (parse_agent_expr): Rename to ...
8898 (gdb_parse_agent_expr): ... this, make it non-static and move
8899 to ax.h.
8900 (unparse_agent_expr) Rename to ...
8901 (gdb_unparse_agent_expr): ... this, make it non-static and move
8902 to ax.h.
8903 (eval_agent_expr): Rename to ...
8904 (eval_tracepoint_agent_expr): ... this.
8905 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8906 forward declarations.
8907 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8908 (agent_get_trace_state_variable_value): New function.
8909 (agent_set_trace_state_variable_value): New function.
8910 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8911 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8912 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8913 (condition_true_at_tracepoint): Likewise.
8914 (parse_agent_expr): Rename to ...
8915 (gdb_parse_agent_expr): ... this and move to ax.c.
8916 (unparse_agent_expr): Rename to ...
8917 (gdb_unparse_agent_expr): ... this and move to ax.c.
8918 (gdb_agent_op_name): Move to ax.c.
8919 (eval_agent_expr): Rename to ...
8920 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8921 and move to ax.c.
8922 (eval_tracepoint_agent_expr): New function.
8923 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8924 non-static.
8925 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8926 ax.c.
8927 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8928 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8929 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8930 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8931 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8932 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8933 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8934 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8935 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8936 (compile_bytecodes): Remove forward declaration.
8937 (is_goto_target): Move to ax.c.
8938 (compile_bytecodes): Move to ax.c and call
8939 agent_get_trace_state_variable_value (...) and
8940 agent_set_trace_state_variable_value (...).
8941
8942 * Makefile.in: Update ax.c and IPA dependencies.
8943
8944 2012-02-24 Pedro Alves <palves@redhat.com>
8945
8946 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8947 (cmd_bigqtbuffer_circular): ... this. Only handle
8948 'QTBuffer:circular:'.
8949 (handle_tracepoint_general_set): Adjust.
8950
8951 2012-02-16 Yao Qi <yao@codesourcery.com>
8952
8953 * inferiors.c: Move code to ...
8954 * dll.c: .... here. New.
8955 * server.h: Declare clear_dlls.
8956 * Makefile.in (SFILES): Add dll.c.
8957 (OBS): Add dll.o
8958 (dll.o): New rule.
8959
8960 2012-02-11 Yao Qi <yao@codesourcery.com>
8961
8962 * server.c: (handle_monitor_command): Add a new parameter
8963 `own_buf'.
8964 (handle_query): Update caller.
8965
8966 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8967
8968 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8969 * configure, config.in: Regenerate.
8970 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8971 is not defined.
8972
8973 2012-02-02 Pedro Alves <palves@redhat.com>
8974
8975 Try SIGKILL first, then PTRACE_KILL.
8976 * linux-low.c (linux_kill_one_lwp): New.
8977 (linux_kill_one_lwp): Rename to ...
8978 (kill_one_lwp_callback): ... this. Use the new
8979 linux_kill_one_lwp.
8980
8981 2012-02-02 Pedro Alves <palves@redhat.com>
8982
8983 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8984 inferior.
8985
8986 2012-01-27 Pedro Alves <palves@redhat.com>
8987
8988 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8989 (elf_64_file_p): Make static.
8990 (linux_pid_exe_is_elf_64_file): New.
8991 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8992 Delete declarations.
8993 (linux_pid_exe_is_elf_64_file): Declare.
8994 * linux-x86-low.c (x86_arch_setup): Use
8995 linux_pid_exe_is_elf_64_file.
8996
8997 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8998
8999 * linux-low.c (linux_wait_for_event_1): Rename to ...
9000 (linux_wait_for_event): ... here and merge it with former
9001 linux_wait_for_event - new variable wait_ptid, use it.
9002 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9003
9004 2012-01-23 Pedro Alves <palves@redhat.com>
9005
9006 * server.c (main): Avoid yet another case of infinite loop while
9007 detaching/killing after a longjmp.
9008
9009 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9010
9011 Code cleanup.
9012 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9013
9014 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9015
9016 * hostio.c (handle_readlink): New function.
9017 (handle_vFile): Call it to handle "vFile:readlink" packets.
9018
9019 2012-01-20 Pedro Alves <palves@redhat.com>
9020 Ulrich Weigand <ulrich.weigand@linaro.org>
9021
9022 * server.c (handle_v_requests): Only support vAttach and vRun to
9023 start multiple processes when in extended protocol mode.
9024
9025 2012-01-17 Pedro Alves <palves@redhat.com>
9026
9027 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9028 memalign plus mprotect to allocate the scratch buffer.
9029
9030 2012-01-13 Pedro Alves <palves@redhat.com>
9031
9032 * server.c (attach_inferior): Clear `cont_thread'.
9033
9034 2012-01-13 Pedro Alves <palves@redhat.com>
9035
9036 * server.c (main): Avoid infinite loop while detaching/killing
9037 after a longjmp.
9038
9039 2012-01-09 Doug Evans <dje@google.com>
9040
9041 * server.c (start_inferior): Set last_ptid in --wrapper case.
9042
9043 2012-01-06 Yao Qi <yao@codesourcery.com>
9044
9045 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9046 defined.
9047 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9048
9049 2012-01-04 Yao Qi <yao@codesourcery.com>
9050
9051 * tracepoint.c (cmd_qtdp): Print debug message
9052 for static tracepoint.
9053
9054 2012-01-04 Yao Qi <yao@codesourcery.com>
9055
9056 * tracepoint.c (trace_vdebug): Differentiate debug message
9057 between gdbserver and IPA.
9058
9059 2012-01-03 Yao Qi <yao@codesourcery.com>
9060
9061 * tracepoint.c (tracepoint_was_hit): Don't collect for
9062 static tracepoint.
9063
9064 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9065
9066 * terminal.h: Reformat copyright header.
9067
9068 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9069
9070 * server.c (gdbserver_version): Update copyright year.
9071 * gdbreplay.c (gdbreplay_version): Likewise.
9072
9073 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9074
9075 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9076
9077 Revert:
9078 2011-12-18 Hui Zhu <teawater@gmail.com>
9079 * linux-low.c (linux_create_inferior): Save return value to ret.
9080
9081 2011-12-18 Hui Zhu <teawater@gmail.com>
9082
9083 * linux-low.c (linux_create_inferior): Save return value to ret.
9084
9085 2011-12-16 Doug Evans <dje@google.com>
9086
9087 * linux-low.c (linux_create_inferior): If stdio connection,
9088 redirect stdin from /dev/null, stdout to stderr.
9089 * remote-utils.c (remote_is_stdio): New static global.
9090 (remote_connection_is_stdio): New function.
9091 (remote_prepare): Handle stdio connection.
9092 (remote_open): Ditto.
9093 (remote_close): Don't close stdin for stdio connections.
9094 (read_prim,write_prim): New functions. Replace all calls to
9095 read/write to these.
9096 * server.c (main): Watch for "-" argument. Move call to
9097 remote_prepare before start_inferior.
9098 * server.h (STDIO_CONNECTION_NAME): New macro.
9099 (remote_connection_is_stdio): Declare.
9100
9101 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9102 in debugging output.
9103
9104 2011-12-15 Yao Qi <yao@codesourcery.com>
9105
9106 * tracepoint.c: Include sys/syscall.h.
9107 (gdb_ust_thread): Remove preprocessor conditional.
9108
9109 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9110
9111 * linux-low.c (linux_detach_one_lwp): Call
9112 the_low_target.prepare_to_resume before detaching.
9113
9114 2011-12-14 Yao Qi <yao@codesourcery.com>
9115
9116 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9117 of write.
9118
9119 2011-12-14 Yao Qi <yao@codesourcery.com>
9120
9121 * i386-low.c (i386_low_stopped_data_address): Initialize local
9122 variable `control'.
9123
9124 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9125
9126 PR remote/13492
9127
9128 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9129 DR_CONTROL unless necessary. Extend comments.
9130 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9131 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9132
9133 2011-12-13 Yao Qi <yao@codesourcery.com>
9134
9135 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9136 macros.
9137 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9138
9139 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9140
9141 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9142 Print new debug message for such case.
9143
9144 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9145
9146 Fix overlapping memcpy.
9147 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9148 the read_inferior_memory transfer.
9149 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9150 write_inferior_memory transfer.
9151 (set_fast_tracepoint_jump): New variable buf. Use it for the
9152 read_inferior_memory and write_inferior_memory transfers.
9153 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9154 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9155 Use it for the write_inferior_memory transfer.
9156 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9157 buffers.
9158
9159 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9160
9161 * linux-low.c (fetch_register, store_register): Make code
9162 consistent, fix formatting.
9163
9164 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9165
9166 * linux-low.c (usr_store_inferior_registers): Factor out code
9167 to handle individual registers into...
9168 (store_register): ... this new function.
9169
9170 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9171
9172 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9173 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9174 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9175 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9176 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9177 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9178 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9179 (srv_xmlfiles): Add new XML files.
9180
9181 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9182 and <sys/uio.h>.
9183 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9184 (init_registers_s390_linux32v1): Add prototype.
9185 (init_registers_s390_linux32v2): Likewise.
9186 (init_registers_s390_linux64v1): Likewise.
9187 (init_registers_s390_linux64v2): Likewise.
9188 (init_registers_s390x_linux64v1): Likewise.
9189 (init_registers_s390x_linux64v2): Likewise.
9190 (s390_num_regs): Increment to 52.
9191 (s390_regmap): Add orig_r2 register.
9192 (s390_num_regs_3264): Increment to 68.
9193 (s390_regmap_3264): Add orig_r2 register.
9194 (s390_collect_ptrace_register): Handle orig_r2 register.
9195 (s390_supply_ptrace_register): Likewise.
9196 (s390_fill_last_break): New function.
9197 (s390_store_last_break): Likewise.
9198 (s390_fill_system_call): New function.
9199 (s390_store_system_call): Likewise.
9200 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9201 register sets.
9202 (s390_check_regset): New function.
9203 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9204 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9205 Update target_regsets for available register sets.
9206
9207 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9208 Jan Kratochvil <jan.kratochvil@redhat.com>
9209
9210 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9211 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9212 New.
9213 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9214 * linux-low.h (struct process_info_private): New member r_debug.
9215 * server.c (handle_qxfer_libraries): Call
9216 the_target->qxfer_libraries_svr4.
9217 (handle_qxfer_libraries_svr4): New function.
9218 (qxfer_packets): New entry "libraries-svr4".
9219 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9220 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9221 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9222 PACKET_qXfer_libraries_svr4.
9223
9224 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9225
9226 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9227 PSW address/mask between 8-byte and 16-byte formats.
9228 (s390_supply_ptrace_register): Likewise.
9229 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9230 basic addressing mode bit.
9231
9232 2011-11-24 Stan Shebs <stan@codesourcery.com>
9233
9234 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9235
9236 2011-11-17 Stan Shebs <stan@codesourcery.com>
9237
9238 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9239 (tracing_start_time): New global.
9240 (tracing_stop_time): New global.
9241 (tracing_user_name): New global.
9242 (tracing_notes): New global.
9243 (tracing_stop_note): New global.
9244 (cmd_qtstart): Set traceframe_usage, start_time.
9245 (stop_tracing): Set stop_time.
9246 (cmd_qtstatus): Report additional status.
9247 (cmd_qtp): New function.
9248 (handle_tracepoint_query): Call it.
9249 (cmd_qtnotes): New function.
9250 (handle_tracepoint_general_set): Call it.
9251 (get_timestamp): Rename from tsv_get_timestamp.
9252
9253 2011-11-14 Stan Shebs <stan@codesourcery.com>
9254 Kwok Cheung Yeung <kcy@codesourcery.com>
9255
9256 * linux-x86-low.c (small_jump_insn): New.
9257 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9258 trampoline and error message, build a trampoline and issue a small
9259 jump instruction to it.
9260 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9261 trampoline and error message.
9262 (x86_get_min_fast_tracepoint_insn_len): New.
9263 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9264 * linux-low.h (struct linux_target_ops): Add arguments to
9265 install_fast_tracepoint_jump_pad operation, add new operation.
9266 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9267 arguments.
9268 (linux_get_min_fast_tracepoint_insn_len): New function.
9269 (linux_target_op): Add new operation.
9270 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9271 (gdb_trampoline_buffer_end): Ditto.
9272 (gdb_trampoline_buffer_error): Ditto.
9273 (struct ipa_sym_addresses): Add fields for new IPA variables.
9274 (symbol_list): Add entries for new IPA variables.
9275 (struct tracepoint): Add fields to hold the address range of the
9276 trampoline used by the tracepoint.
9277 (trampoline_buffer_head): New static variable.
9278 (trampoline_buffer_tail): Ditto.
9279 (claim_trampoline_space): New function.
9280 (have_fast_tracepoint_trampoline_buffer): New function.
9281 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9282 structure.
9283 (install_fast_tracepoint): Ditto, also add error buffer argument.
9284 (cmd_qtminftpilen): New function.
9285 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9286 (fast_tracepoint_from_trampoline_address): New function.
9287 (fast_tracepoint_collecting): Handle trampoline as part of jump
9288 pad space.
9289 (set_trampoline_buffer_space): New function.
9290 (initialize_tracepoint): Initialize new IPA variables.
9291 * target.h (struct target_ops): Add arguments to
9292 install_fast_tracepoint_jump_pad operation, add new
9293 get_min_fast_tracepoint_insn_len operation.
9294 (target_get_min_fast_tracepoint_insn_len): New.
9295 (install_fast_tracepoint_jump_pad): Add arguments.
9296 * server.h (IPA_BUFSIZ): Define.
9297 * linux-i386-ipa.c: Include extra header files.
9298 (initialize_fast_tracepoint_trampoline_buffer): New function.
9299 (initialize_low_tracepoint): Call it.
9300 * server.h (set_trampoline_buffer_space): Declare.
9301 (claim_trampoline_space): Ditto.
9302 (have_fast_tracepoint_trampoline_buffer): Ditto.
9303
9304 2011-11-14 Yao Qi <yao@codesourcery.com>
9305
9306 * server.c (handle_query): Handle InstallInTrace for qSupported.
9307 * tracepoint.c (add_tracepoint): Sort list.
9308 (install_tracepoint, download_tracepoint): New.
9309 (cmd_qtdp): Call them to install and download tracepoints.
9310 (sort_tracepoints): Removed.
9311 (cmd_qtstart): Update.
9312
9313 2011-11-14 Yao Qi <yao@codesourcery.com>
9314
9315 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9316 * mem-break.h: Declare.
9317 * tracepoint.c (cmd_qtstart): Move some code to ...
9318 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9319 New.
9320 (download_tracepoints): Move some code to ...
9321 (download_tracepoint_1): ... here. New.
9322
9323 2011-11-08 Yao Qi <yao@codesourcery.com>
9324
9325 * remote-utils.c (relocate_instruction): A comment fix.
9326
9327 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9328
9329 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9330 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9331 dr_status_mirror and dr_control_mirror from debug_reg_state.
9332 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9333 (i386_initial_stuff): Remove use of deleted globals.
9334 (i386_get_thread_context, i386_set_thread_context,
9335 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9336 from debug_reg_state.
9337
9338 2011-11-05 Yao Qi <yao@codesourcery.com>
9339
9340 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9341 address as TPOINT's.
9342
9343 2011-11-02 Stan Shebs <stan@codesourcery.com>
9344
9345 * tracepoint.c (agent_mem_read_string): New function.
9346 (eval_agent_expr): Call it for tracenz.
9347 * server.c (handle_query): Report support for tracenz.
9348
9349 2011-11-02 Yao Qi <yao@codesourcery.com>
9350
9351 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9352
9353 2011-11-02 Yao Qi <yao@codesourcery.com>
9354
9355 * target.h: Fix a typo in comment.
9356
9357 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9358
9359 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9360 clobber the breakpoints' shadows with fast tracepoint jumps.
9361 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9362 * target.c (write_inferior_memory): Also pass MYADDR down to
9363 check_mem_write.
9364
9365 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9366
9367 * configure.ac: Check support for personality routine.
9368 * configure: Regenerate.
9369 * config.in: Likewise.
9370 * linux-low.c: Include <sys/personality.h>.
9371 Define ADDR_NO_RANDOMIZE if necessary.
9372 (linux_create_inferior): Disable address space randomization when
9373 forking inferior, if requested.
9374 (linux_supports_disable_randomization): New function.
9375 (linux_target_ops): Install it.
9376 * server.h (disable_randomization): Declare.
9377 * server.c (disable_randomization): New global variable.
9378 (handle_general_set): Handle QDisableRandomization.
9379 (handle_query): Likewise for qSupported.
9380 (main): Support --disable-randomization and --no-disable-randomization
9381 command line arguments.
9382 * target.h (struct target_ops): Add supports_disable_randomization.
9383 (target_supports_disable_randomization): New macro.
9384
9385 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9386
9387 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9388 ifdef check.
9389 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9390 [!PT_GETDSBT] (target_loadmap): New definition.
9391 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9392 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9393 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9394 and PT_GETDSBT to LINUX_LOADMAP.
9395 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9396 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9397
9398 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9399
9400 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9401 (arm_linux_hwbp_cap): New static variable.
9402 (arm_linux_get_hwbp_cap): Replace by ...
9403 (arm_linux_init_hwbp_cap): ... this new function.
9404 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9405 (arm_linux_get_hw_watchpoint_count): Likewise.
9406 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9407 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9408 (arm_prepare_to_resume): Use perror_with_name instead of error.
9409
9410 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9411
9412 * linux-arm-low.c: Include <signal.h>.
9413 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9414 (struct arm_linux_hwbp_cap): New data type.
9415 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9416 (struct arm_linux_hw_breakpoint): New data type.
9417 (MAX_BPTS, MAX_WPTS): Define.
9418 (struct arch_process_info, struct arch_lwp_info): New data types.
9419 (arm_linux_get_hwbp_cap): New function.
9420 (arm_linux_get_hw_breakpoint_count): Likewise.
9421 (arm_linux_get_hw_watchpoint_count): Likewise.
9422 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9423 (arm_hwbp_control_initialize): Likewise.
9424 (arm_hwbp_control_is_enabled): Likewise.
9425 (arm_hwbp_control_is_initialized): Likewise.
9426 (arm_hwbp_control_disable): Likewise.
9427 (arm_linux_hw_breakpoint_equal): Likewise.
9428 (arm_linux_hw_point_initialize): Likewise.
9429 (struct update_registers_data): New data structure.
9430 (update_registers_callback: New function.
9431 (arm_insert_point): Likewise.
9432 (arm_remove_point): Likewise.
9433 (arm_stopped_by_watchpoint): Likewise.
9434 (arm_stopped_data_address): Likewise.
9435 (arm_new_process): Likewise.
9436 (arm_new_thread): Likewise.
9437 (arm_prepare_to_resume): Likewise.
9438 (the_low_target): Register arm_insert_point, arm_remove_point,
9439 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9440 arm_new_thread, and arm_prepare_to_resume.
9441
9442 2011-09-15 Stan Shebs <stan@codesourcery.com>
9443
9444 * server.h (struct emit_ops): Add compare-goto fields.
9445 * tracepoint.c (gdb_agent_op_sizes): New table.
9446 (emit_eq_goto): New function.
9447 (emit_ne_goto): New function.
9448 (emit_lt_goto): New function.
9449 (emit_le_goto): New function.
9450 (emit_gt_goto): New function.
9451 (emit_ge_goto): New function.
9452 (is_goto_target): New function.
9453 (compile_bytecodes): Recognize special cases of compare-goto
9454 combinations and call specialized emitters for them.
9455 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9456 (amd64_emit_ne_goto): New function.
9457 (amd64_emit_lt_goto): New function.
9458 (amd64_emit_le_goto): New function.
9459 (amd64_emit_gt_goto): New function.
9460 (amd64_emit_ge_goto): New function.
9461 (amd64_emit_ops): Add the new functions.
9462 (i386_emit_eq_goto): New function.
9463 (i386_emit_ne_goto): New function.
9464 (i386_emit_lt_goto): New function.
9465 (i386_emit_le_goto): New function.
9466 (i386_emit_gt_goto): New function.
9467 (i386_emit_ge_goto): New function.
9468 (i386_emit_ops): Add the new functions.
9469
9470 2011-09-08 Stan Shebs <stan@codesourcery.com>
9471
9472 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9473 (i386_emit_epilogue): Restore %ebx.
9474
9475 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9476
9477 * server.c (step_thread): Remove definition.
9478 (process_serial_event): Don't handle Hs.
9479 * server.h (step_thread): Remove declaration.
9480 * target.c (set_desired_inferior): Remove use of step_thread.
9481
9482 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9483
9484 * linux-low.c: Include linux-procfs.h.
9485 (linux_attach_lwp_1): Update comments.
9486 (linux_attach): Scan for existing threads when attaching to a
9487 process that is the tgid.
9488 * Makefile.in: Update dependencies.
9489
9490 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9491
9492 * configure.srv: Add linux-procfs.o dependencies.
9493
9494 2011-08-14 Yao Qi <yao@codesourcery.com>
9495
9496 * target.h (struct target_ops): Fix indent.
9497 * win32-low.c (win32_target_ops): Fix comment.
9498
9499 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9500 Yao Qi <yao@codesourcery.com>
9501
9502 * Makefile.in (clean): Remove tic6x-*.c files.
9503 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9504 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9505 (tic6x-c64xp-linux.c): Likewise.
9506 * configure.srv: Add support for tic6x-*-uclinux.
9507 * linux-tic6x-low.c: New.
9508 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9509
9510 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9511 Yao Qi <yao@codesourcery.com>
9512
9513 * target.h (struct target_ops): Add read_loadmap.
9514 * linux-low.c (struct target_loadseg): New type.
9515 (struct target_loadmap): New type.
9516 (linux_read_loadmap): New function.
9517 (linux_target_ops): Add linux_read_loadmap.
9518 * server.c (handle_query): Support qXfer:fdpic:read packet.
9519 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9520 to NULL.
9521
9522 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9523
9524 * win32-low.c: Include <stdint.h>.
9525
9526 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9527
9528 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9529 to the inferior here.
9530 (i386_remove_aligned_watchpoint): Ditto.
9531 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9532 fit part of the watchpoint in the debug registers.
9533 (i386_update_inferior_debug_regs): New.
9534 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9535 registers, and only update the inferior on success.
9536 (i386_low_remove_watchpoint): Ditto.
9537
9538 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9539
9540 * linux-low.c (compare_ints, unique, list_threads, show_process,
9541 linux_core_of_thread): Delete.
9542 (linux_target_ops): Change linux_core_of_thread to
9543 linux_common_core_of_thread.
9544 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9545 * utils.c (malloc_failure): Change type of argument.
9546 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9547 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9548 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9549 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9550 (IPA_OBJS): Add common-utils-ipa.o.
9551 (ptid_h, linux_osdata_h): New macros.
9552 (server_h): Add common/common-utils.h, common/xml-utils.h,
9553 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9554 common/ptid.h.
9555 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9556 ptid.o, buffer.o): New rules.
9557 (linux-low.o): Add common/linux-osdata.h as a dependency.
9558 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9559 * configure.ac: Add AC_HEADER_DIRENT check.
9560 * config.in: Regenerate.
9561 * configure: Regenerate.
9562 * remote-utils.c (xml_escape_text): Delete.
9563 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9564 buffer_xml_printf): Move to common/buffer.c.
9565 * server.c (main): Remove call to initialize_inferiors.
9566 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9567 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9568 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9569 internal_error, gdb_assert, gdb_assert_fail): Delete.
9570 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9571 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9572 common/buffer.h.
9573 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9574 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9575 initialize_inferiors): Delete.
9576
9577 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9578
9579 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9580 symbol error.
9581
9582 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9583
9584 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9585 assertion.
9586 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9587
9588 2011-05-26 Yao Qi <yao@codesourcery.com>
9589
9590 * Makefile.in (thread-db.o): Track dependence to
9591 common/gdb_thread_db.h.
9592 * thread-db.c: include gdb_thread_db.h from right place.
9593
9594 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9595
9596 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9597 __FILE__ and __LINE__ to internal_error.
9598
9599 2011-05-13 Doug Evans <dje@google.com>
9600
9601 * thread-db.c (try_thread_db_load_from_sdir): New function.
9602 (try_thread_db_load_from_dir): New function.
9603 (thread_db_load_search): Handle $sdir, ignore $pdir.
9604 Remove trying of system directories if search of
9605 libthread-db-search-path fails, that is now done via $sdir.
9606
9607 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9608
9609 * server.c (handle_query): Add EnableDisableTracepoints to the list
9610 of supported features.
9611 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9612 tracepoints.
9613 (cmd_qtenable_disable): New.
9614 (cmd_qtstart): Install tracepoints even if disabled.
9615 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9616 receiving a QTEnable or QTDisable packet.
9617 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9618 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9619 tracepoints.
9620 (gdb_probe): Skip data collection if static tracepoint is disabled.
9621
9622 2011-05-10 Doug Evans <dje@google.com>
9623
9624 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9625
9626 2011-05-04 Doug Evans <dje@google.com>
9627
9628 * linux-low.c (linux_join): Skip process lookup.
9629 * spu-low.c (spu_join): Ditto.
9630 * server.c (join_inferiors_callback): Delete.
9631 (process_serial_event): For 'D' packet (detach) call join_inferior
9632 directly.
9633
9634 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9635
9636 * README: Don't mention xscale*-*-linux*.
9637 * configure.srv (xscale*-*-linux*): Don't handle target.
9638
9639 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9640
9641 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9642 casting pointers.
9643 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9644 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9645 (i386_emit_void_call_2): Likewise.
9646
9647 2011-04-26 Yao Qi <yao@codesourcery.com>
9648
9649 * linux-low.c: Move common macros to linux-ptrace.h.
9650 Include linux-ptrace.h.
9651 * Makefile.in (linux_ptrace_h): New.
9652 (linux-low.o): Depends on linux-ptrace.h.
9653
9654 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9655
9656 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9657 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9658 (remote_prepare): New function with most of the TCP code from ...
9659 (remote_open): ... here. Detect PORT here unconditionally. Move also
9660 setting transport_is_reliable.
9661 * server.c (run_once): New variable.
9662 (gdbserver_usage): Document it.
9663 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9664 the first run if RUN_ONCE.
9665 * server.h (run_once, remote_prepare): New declarations.
9666
9667 2011-04-19 Tom Tromey <tromey@redhat.com>
9668
9669 * win32-low.c (handle_load_dll): Remove duplicate "the".
9670
9671 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9672
9673 Remove support for old Cygwin 1.5 versions.
9674 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9675 function to avoid warning.
9676 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9677 warning.
9678
9679 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9680
9681 * gdbserver/server.h (Macro _): Define it if not available.
9682
9683 2011-03-14 Michael Snyder <msnyder@vmware.com>
9684
9685 * hostio.c (handle_close): Remove unnecessary null test.
9686
9687 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9688
9689 * Makefile.in (maintainer-clean realclean distclean): Remove
9690 "make ... subdir_do" command.
9691
9692 2011-03-10 Michael Snyder <msnyder@vmware.com>
9693
9694 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9695
9696 * server.c (handle_v_run): Free alloced buffer on early return.
9697
9698 2011-03-09 Yao Qi <yao@codesourcery.com>
9699
9700 Revert:
9701 2011-03-04 Yao Qi <yao@codesourcery.com>
9702
9703 * Makefile.in: Remove GNU make feature --directory.
9704
9705 2011-03-05 Yao Qi <yao@codesourcery.com>
9706
9707 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9708 (subdir_do): New make target. Copied from gdb/Makefile.
9709 (maintainer-clean, realclean, distclean, clean): Call corresponding
9710 make targets in common/Makefile.
9711
9712 2011-02-11 Yao Qi <yao@codesourcery.com>
9713
9714 * configure.ac: Call AC_PROG_RANLIB.
9715 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9716 * configure: Regenerate.
9717
9718 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9719
9720 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9721
9722 2011-03-06 Yao Qi <yao@codesourcery.com>
9723
9724 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9725
9726 2011-03-05 Yao Qi <yao@codesourcery.com>
9727
9728 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9729 (subdir_do): New make target. Copied from gdb/Makefile.
9730 (maintainer-clean, realclean, distclean, clean): Call corresponding
9731 make targets in common/Makefile.
9732
9733 2011-03-04 Yao Qi <yao@codesourcery.com>
9734
9735 * Makefile.in: Remove GNU make feature --directory.
9736
9737 2011-03-04 Michael Snyder <msnyder@vmware.com>
9738
9739 * server.c (queue_stop_reply): Call xmalloc not malloc.
9740
9741 2011-03-02 Michael Snyder <msnyder@vmware.com>
9742
9743 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9744
9745 2011-02-28 Michael Snyder <msnyder@vmware.com>
9746
9747 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9748 (cmd_qtframe): Ditto.
9749 (cmd_qtbuffer): Ditto.
9750 (cmd_bigqtbuffer): Ditto.
9751
9752 * utils.c (decimal2str): Initialize 'width' to nine, then
9753 don't mess with it.
9754
9755 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9756
9757 * hostio.c (require_data): Free *data, not data.
9758
9759 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9760
9761 * hostio.c (require_data): Use free, not xfree.
9762
9763 2011-02-27 Michael Snyder <msnyder@vmware.com>
9764
9765 * server.c (handle_query): Discard unused value.
9766
9767 * hostio.c (require_data): Free malloc memory before returning
9768 error.
9769
9770 2011-02-26 Michael Snyder <msnyder@vmware.com>
9771
9772 * linux-low.c (list_threads): Call closedir for dirent.
9773
9774 2011-02-27 Michael Snyder <msnyder@vmware.com>
9775
9776 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9777 a case statement falls through.
9778
9779 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9780
9781 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9782 in comparison.
9783
9784 2011-02-26 Michael Snyder <msnyder@vmware.com>
9785
9786 * utils.c (decimal2str): Eliminate dead code and dead param.
9787 (pulongest): Drop dead param from call to decimal2str.
9788 (plongest): Ditto.
9789
9790 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9791
9792 Revert the following patch (not approved yet):
9793 2011-02-21 Hui Zhu <teawater@gmail.com>
9794 * tracepoint.c (tp_printf): New function.
9795 (eval_agent_expr): Handle gdb_agent_op_printf.
9796
9797 2011-02-21 Hui Zhu <teawater@gmail.com>
9798
9799 * tracepoint.c (tp_printf): New function.
9800 (eval_agent_expr): Handle gdb_agent_op_printf.
9801
9802 2011-02-18 Tom Tromey <tromey@redhat.com>
9803
9804 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9805 (tracepoint.o): Likewise.
9806 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9807 (gdb_agent_op_names): Likewise.
9808
9809 2011-02-18 Tom Tromey <tromey@redhat.com>
9810
9811 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9812 gdb_agent_op_rot>: New constants.
9813 (gdb_agent_op_names): Add pick and roll.
9814 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9815 cases.
9816
9817 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9818
9819 * aclocal.m4: Regenerated with aclocal-1.11.1.
9820
9821 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9822
9823 * server.c (handle_qxfer_traceframe_info): New.
9824 (qxfer_packets): Register "traceframe-info".
9825 (handle_query): Report support for qXfer:traceframe-info:read+.
9826 * tracepoint.c (match_blocktype): New.
9827 (traceframe_find_block_type): Rename to ...
9828 (traceframe_walk_blocks): ... this. Add callback filter argument,
9829 and use it.
9830 (traceframe_find_block_type): New, reimplemented on top of
9831 traceframe_walk_blocks.
9832 (build_traceframe_info_xml): New.
9833 (traceframe_read_info): New.
9834 * server.h (traceframe_read_info): Declare.
9835
9836 2011-02-11 Yao Qi <yao@codesourcery.com>
9837
9838 * configure.ac: Call AC_PROG_RANLIB.
9839 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9840 * configure: Regenerate.
9841
9842 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9843
9844 * server.c (gdb_read_memory): Change return semantics to allow
9845 partial transfers.
9846 (handle_search_memory_1): Adjust.
9847 (process_serial_event) <'m' packet>: Handle partial transfers.
9848 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9849
9850 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9851
9852 * regcache.c (init_register_cache): Initialize
9853 regcache->register_status.
9854 (free_register_cache): Release regcache->register_status.
9855 (regcache_cpy): Copy register_status.
9856 (registers_to_string): Print 'x's for unavailable registers.
9857 (supply_register): Mark the register's status valid or
9858 unavailable, depending on whether a buffer was passed in or not.
9859 (supply_register_zeroed): New.
9860 (supply_regblock): Mark the registers' status valid or
9861 unavailable, depending on whether a buffer was passed in or not.
9862 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9863 (struct regcache): New `register_status' field.
9864 (supply_register_zeroed): Declare.
9865 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9866 supply_register_zeroed, rather than passing a NULL buffer to
9867 supply_register.
9868 * tracepoint.c (fetch_traceframe_registers): Update comment.
9869
9870 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9871
9872 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9873 buffer explicit.
9874
9875 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9876
9877 * server.h (decode_xfer_write): Change prototype.
9878 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9879 and don't extract the annex here.
9880 * server.c (decode_xfer_read): Remove `annex' parameter,
9881 and don't extract the annex here.
9882 (decode_xfer): New.
9883 (struct qxfer): New.
9884 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9885 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9886 (handle_qxfer_statictrace): New functions, abstracted out from
9887 handle_query, and made to use the struct qxfer interface.
9888 (handle_threads_qxfer_proper): Rename to ...
9889 (handle_qxfer_threads_proper): ... this.
9890 (handle_threads_qxfer): Rename to ...
9891 (handle_qxfer_threads): ... this. Adjust.
9892 (qxfer_packets): New array.
9893 (handle_qxfer): New function.
9894 (handle_query): Use handle_qxfer.
9895
9896 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9897
9898 * gdbreplay.c: Shorten lines of >= 80 columns.
9899 * linux-low.c: Ditto.
9900 * linux-ppc-low.c: Ditto.
9901 * linux-s390-low.c: Ditto.
9902 * linux-sparc-low.c: Ditto.
9903 * linux-x86-low.c: Ditto.
9904 * linux-xtensa-low.c: Ditto.
9905 * mem-break.c: Ditto.
9906 * nto-low.c: Ditto.
9907 * regcache.h: Ditto.
9908 * remote-utils.c: Ditto.
9909 * server.c: Ditto.
9910 * server.h: Ditto.
9911 * thread-db.c: Ditto.
9912 * tracepoint.c: Ditto.
9913 * utils.c: Ditto.
9914 * win32-low.h: Ditto.
9915
9916 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9917
9918 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9919 update.
9920
9921 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9922
9923 * server.c (gdbserver_version): Update copyright year in version
9924 output.
9925 * gdbreplay.c (gdbreplay_version): Ditto.
9926
9927 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9928
9929 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9930 * linux-bfin-low.c: New file.
9931 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9932 PT_DATA_ADDR for BFIN targets.
9933 * Makefile.in (SFILES): Add linux-bfin-low.c.
9934 (clean): Remove reg-bfin.c.
9935 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9936 * README: Mention supported Blackfin targets.
9937
9938 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9939
9940 * .gitignore: New file.
9941
9942 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9943
9944 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9945
9946 2010-10-22 Jie Zhang <jie@codesourcery.com>
9947
9948 * Makefile.in: Add FLAGS_TO_PASS variable.
9949 (install): Remove dependency of install-only and recursively
9950 invoke make for install-only.
9951
9952 2010-10-04 Doug Evans <dje@google.com>
9953
9954 * Makefile.in (uninstall): Use $(DESTDIR).
9955
9956 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9957
9958 PR gdb/11842
9959
9960 * linux-x86-low.c (compat_siginfo_from_siginfo)
9961 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9962 si_code is < 0. Check for si_code == SI_TIMER before checking for
9963 si_code < 0.
9964
9965 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9966
9967 * lynx-i386-low.c: New file.
9968 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9969
9970 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9971
9972 * lynx-low.c (ptrace_request_to_str): Remove handling for
9973 request values that have been removed in LynxOS 5.x.
9974
9975 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9976
9977 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9978 <ptrace.h>
9979
9980 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9981
9982 * configure.ac: Add --enable-inprocess-agent option.
9983 * configure: Rebuilt.
9984
9985 2010-09-06 Yao Qi <yao@codesourcery.com>
9986
9987 * linux-low.c (linux_kill): Remove unused variable.
9988 (linux_stabilize_threads): Likewise.
9989 * server.c (start_inferior): Likewise.
9990 (queue_stop_reply_callback): Likewise.
9991 * tracepoint.c (do_action_at_tracepoint): Likewise.
9992
9993 2010-09-06 Yao Qi <yao@codesourcery.com>
9994
9995 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9996 on return.
9997
9998 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9999
10000 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10001
10002 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10003
10004 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10005 "$(IPA_DEPFILES)".
10006
10007 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10008
10009 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10010 gdbserver/lynx-ppc-low.c: New files.
10011 * Makefile.in (lynx_low_h): New variable.
10012 (lynx-low.o, lynx-ppc-low.o): New rules.
10013 * configure.ac: On LynxOS, link with -lnetinet.
10014 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10015 * configure: regenerate.
10016
10017 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10018
10019 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10020 * configure.ac: Add check for vasprintf and vsnprintf.
10021 * configure, config.in: Regenerate.
10022 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10023
10024 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10025
10026 * gdbreplay.c: Move include of alloca.h up, next to include of
10027 malloc.h.
10028 * server.h: Add include of malloc.h.
10029 * mem-break.c: Remove include of malloc.h.
10030 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10031
10032 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10033
10034 * Makefile.in (memmem.o): Build with -Wno-error.
10035
10036 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10037
10038 * utils.c (xsnprintf): Make non-static.
10039 * server.h: Add xsnprintf declaration.
10040 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10041 replace calls to snprintf by calls to xsnprintf throughout.
10042
10043 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10044
10045 * configure.ac: Add configure check for alloca.
10046 * configure, config.in: Regenerate.
10047 * server.h: Include alloca.h if it exists.
10048 * gdbreplay.c: Include alloca.h if it exists.
10049
10050 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10051
10052 * linux-low.c (__SIGRTMIN): Define if not already defined.
10053 (linux_create_inferior): Check for __ANDROID__ rather than
10054 __SIGRTMIN.
10055 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10056 are already deferred.
10057 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10058 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10059 stopped and already has a pending signal to report.
10060 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10061 a pending signal to report or is moving out of a jump pad.
10062 (linux_init_signals): Check for __ANDROID__ rather than
10063 __SIGRTMIN.
10064
10065 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10066
10067 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10068 debug_threads check. Avoid a linear search when not doing debug
10069 output.
10070
10071 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10072
10073 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10074 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10075 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10076 (process_event): Change local fd's type to gdb_fildes_t.
10077 (create_file_handler): Adjust prototype.
10078 (delete_file_handler): Adjust prototype.
10079 (handle_file_event): Adjust prototype. Use pfildes.
10080 (create_file_event): Adjsut prototype.
10081 * remote-utils.c (remote_desc, listen_desc): Change type to
10082 gdb_fildes_t.
10083 * server.h: New gdb_fildes_t typedef.
10084 [USE_WIN32API]: Include winsock2.h.
10085 (delete_file_handler, add_file_handler): Adjust prototypes.
10086 (pfildes): Declare.
10087 * utils.c (pfildes): New.
10088
10089 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10090
10091 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10092 * configure: Regenerate.
10093
10094 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10095
10096 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10097 (linux_done_accessing_memory): ... this.
10098 (linux_target_ops): Adjust.
10099 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10100 * nto-low.c (nto_target_ops): Adjust comment.
10101 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10102 * spu-low.c (spu_target_ops): Adjust comment.
10103 * target.h (target_ops): Rename unprepare_to_access_memory field
10104 to done_accessing_memory.
10105 (unprepare_to_access_memory): Rename to ...
10106 (done_accessing_memory): ... this.
10107
10108 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10109
10110 * linux-low.c (linux_prepare_to_access_memory): New.
10111 (linux_unprepare_to_access_memory): New.
10112 (linux_target_ops): Install them.
10113 * server.c (read_memory): Rename to ...
10114 (gdb_read_memory): ... this. Use
10115 prepare_to_access_memory/prepare_to_access_memory.
10116 (write_memory): Rename to ...
10117 (gdb_write_memory): ... this. Use
10118 prepare_to_access_memory/prepare_to_access_memory.
10119 (handle_search_memory_1): Adjust.
10120 (process_serial_event): Adjust.
10121 * target.h (struct target_ops): New fields
10122 prepare_to_access_memory and unprepare_to_access_memory.
10123 (prepare_to_access_memory, unprepare_to_access_memory): New.
10124 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10125 prepare_to_access_memory/prepare_to_access_memory.
10126 * nto-low.c (nto_target_ops): Adjust.
10127 * spu-low.c (spu_target_ops): Adjust.
10128 * win32-low.c (win32_target_ops): Adjust.
10129
10130 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10131
10132 * Makefile.in (WARN_CFLAGS): Get it from configure.
10133 (WERROR_CFLAGS): New.
10134 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10135 * configure.ac: Introduce --enable-werror, which adds -Werror to
10136 the compiler command line. Enabled by default. Disable with
10137 --disable-werror. Add -Wdeclaration-after-statement
10138 Wpointer-arith and -Wformat-nonliteral to warning flags.
10139 * configure: Regenerate.
10140
10141 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10142
10143 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10144
10145 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10146
10147 * gdbreplay.c (remote_error): New.
10148 (gdbchar): New.
10149 (expect): Use gdbchar. Check for error reading from GDB.
10150 Clarify sync error output.
10151 (play): Check for errors writing to GDB.
10152 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10153 * remote-utils.c (getpkt): Check for errors writing to the remote
10154 descriptor.
10155
10156 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10157
10158 * linux-low.c (linux_wait_1): Move non-debugging code out of
10159 `debug_threads' control.
10160
10161 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10162
10163 * linux-low.c (linux_wait_1): Don't set last_status here.
10164 * server.c (push_event, queue_stop_reply_callback): Assert we're
10165 not pushing a TARGET_WAITKIND_IGNORE event.
10166 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10167 (myresume, handle_target_event): Set the thread's last_resume_kind
10168 and last_status from the target returned status.
10169
10170 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10171
10172 PR threads/10729
10173
10174 * linux-x86-low.c (update_debug_registers_callback): New.
10175 (i386_dr_low_set_addr): Use it.
10176 (i386_dr_low_get_addr): New.
10177 (i386_dr_low_set_control): Use update_debug_registers_callback.
10178 (i386_dr_low_get_control): New.
10179 (i386_dr_low_get_status): Adjust.
10180 * linux-low.c (linux_stop_lwp): New.
10181 * linux-low.h (linux_stop_lwp): Declare.
10182
10183 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10184 argument instead of a i386_debug_reg_state.
10185 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10186 a i386_debug_reg_state.
10187 (i386_insert_aligned_watchpoint): Adjust.
10188 (i386_remove_aligned_watchpoint): Adjust.
10189 (i386_low_stopped_data_address): Read the debug registers from the
10190 inferior instead of from the mirrors.
10191 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10192 (i386_dr_low_get_addr): Declare.
10193 (i386_dr_low_get_control): Declare.
10194 (i386_dr_low_get_status): Change prototype.
10195
10196 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10197 (i386_dr_low_get_addr): New.
10198 (i386_dr_low_get_control): New.
10199 (i386_dr_low_get_status): Adjust prototype. Return
10200 dr_status_mirror.
10201 (i386_initial_stuff): Clear dr_status_mirror and
10202 dr_control_mirror.
10203 (i386_get_thread_context): Adjust.
10204 (i386_set_thread_context): Adjust.
10205 (i386_thread_added): Adjust.
10206
10207 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10208
10209 * linux-low.h (linux_thread_area): Delete declaration.
10210
10211 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10212
10213 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10214 after its termination.
10215
10216 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10217
10218 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10219 (gdb_wants_all_stopped): Delete.
10220 (linux_wait_1): Don't call them.
10221 * server.c (handle_v_cont): Tag all threads as want-stopped.
10222 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10223 stopped as "client-wants-stopped".
10224
10225 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10226
10227 * Makefile.in (signals_h): New.
10228 (server_h): Depend on it.
10229 (server.o): Don't depend on $(signals_def).
10230 (signals.o): Depend on $(signals_def).
10231
10232 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10233
10234 * Makefile.in (signals_def): New.
10235 (server_h): Append include/gdb/signals.h and signals_def.
10236 (server.o): Append signals_def.
10237
10238 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10239
10240 * server.c (handle_target_event): Use target_signal_to_host for
10241 resume_info.sig initialization.
10242 * target.h (struct thread_resume) <sig>: New comment.
10243
10244 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10245
10246 * server.c (handle_query): strcpy() the returned string from paddress()
10247 instead of sprintf().
10248 * utils.c (paddress): Return phex_nz().
10249
10250 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10251
10252 * server.c (handle_v_cont): Call mourn_inferior if process
10253 just exited.
10254 (myresume): Likewise.
10255
10256 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10257
10258 Static tracepoints, and integration with UST.
10259
10260 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10261 * mem-break.c (uninsert_all_breakpoints)
10262 (reinsert_all_breakpoints): New.
10263 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10264 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10265 (gdb_agent_ust_loaded, helper_thread_id)
10266 (gdb_agent_helper_thread_id): New macros.
10267 (struct ipa_sym_addresses): Add addr_ust_loaded,
10268 addr_helper_thread_id, addr_cmd_buf.
10269 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10270 (in_process_agent_loaded_ust): New.
10271 (write_e_ust_not_loaded): New.
10272 (maybe_write_ipa_ust_not_loaded): New.
10273 (struct collect_static_trace_data_action): New.
10274 (enum tracepoint_type) <static_tracepoint>: New.
10275 (struct tracepoint) <handle>: Mention static tracepoints.
10276 (struct static_tracepoint_ctx): New.
10277 (CMD_BUF_SIZE): New.
10278 (add_tracepoint_action): Handle static tracepoint actions.
10279 (unprobe_marker_at): New.
10280 (clear_installed_tracepoints): Handle static tracepoints.
10281 (cmd_qtdp): Handle static tracepoints.
10282 (probe_marker_at): New.
10283 (cmd_qtstart): Handle static tracepoints.
10284 (response_tracepoint): Handle static tracepoints.
10285 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10286 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10287 (get_context_regcache): Handle static tracepoints.
10288 (do_action_at_tracepoint): Handle static tracepoint actions.
10289 (traceframe_find_block_type): Handle static trace data blocks.
10290 (traceframe_read_sdata): New.
10291 (download_tracepoints): Download static tracepoint actions.
10292 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10293 (GDB_PROBE_NAME): New.
10294 (ust_ops): New.
10295 (GET_UST_SYM): New.
10296 (USTF): New.
10297 (dlsym_ust): New.
10298 (ust_marker_to_static_tracepoint): New.
10299 (gdb_probe): New.
10300 (collect_ust_data_at_tracepoint): New.
10301 (gdb_ust_probe): New.
10302 (UNIX_PATH_MAX, SOCK_DIR): New.
10303 (gdb_ust_connect_sync_socket): New.
10304 (resume_thread, stop_thread): New.
10305 (run_inferior_command): New.
10306 (init_named_socket): New.
10307 (gdb_ust_socket_init): New.
10308 (cstr_to_hexstr): New.
10309 (next_st): New.
10310 (first_marker, next_marker): New.
10311 (response_ust_marker): New.
10312 (cmd_qtfstm, cmd_qtsstm): New.
10313 (unprobe_marker_at, probe_marker_at): New.
10314 (cmd_qtstmat, gdb_ust_thread): New.
10315 (gdb_ust_init): New.
10316 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10317 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10318 (ST_REGENTRY): New.
10319 (x86_64_st_collect_regmap): New.
10320 (X86_64_NUM_ST_COLLECT_GREGS): New.
10321 (AMD64_RIP_REGNUM): New.
10322 (supply_static_tracepoint_registers): New.
10323 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10324 (ST_REGENTRY): New.
10325 (i386_st_collect_regmap): New.
10326 (i386_NUM_ST_COLLECT_GREGS): New.
10327 (supply_static_tracepoint_registers): New.
10328 * server.c (handle_query): Handle qXfer:statictrace:read.
10329 <qSupported>: Report support for StaticTracepoints, and
10330 qXfer:statictrace:read features.
10331 * server.h (traceframe_read_sdata)
10332 (supply_static_tracepoint_registers): Declare.
10333 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10334 (unpack_varlen_hex): Include in IPA build.
10335 * Makefile.in (ustlibs, ustinc): New.
10336 (IPA_OBJS): Add remote-utils-ipa.o.
10337 ($(IPA_LIB)): Link -ldl and -lpthread.
10338 (UST_CFLAGS): New.
10339 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10340 * config.in, configure: Regenerate.
10341
10342 2010-06-20 Ian Lance Taylor <iant@google.com>
10343 Pedro Alves <pedro@codesourcery.com>
10344
10345 * linux-x86-low.c (always_true): Delete.
10346 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10347 trying to fool the compiler with always_true.
10348
10349 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10350
10351 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10352 conditions in gdbserver.
10353
10354 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10355
10356 * spu-low.c (spu_read_memory): Wrap around local store limit.
10357 (spu_write_memory): Likewise.
10358
10359 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10360
10361 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10362 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10363 LONGEST uses.
10364 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10365 uses.
10366 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10367 uses with LONGEST uses.
10368
10369 2010-06-14 Stan Shebs <stan@codesourcery.com>
10370 Pedro Alves <pedro@codesourcery.com>
10371
10372 Bytecode compiler.
10373
10374 * linux-x86-low.c: Include limits.h.
10375 (add_insns): New.
10376 (always_true): New.
10377 (EMIT_ASM): New.
10378 (EMIT_ASM32): New.
10379 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10380 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10381 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10382 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10383 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10384 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10385 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10386 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10387 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10388 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10389 (amd64_emit_void_call_2): New.
10390 (amd64_emit_ops): New.
10391 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10392 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10393 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10394 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10395 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10396 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10397 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10398 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10399 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10400 (i386_emit_stack_adjust, i386_emit_int_call_1)
10401 (i386_emit_void_call_2): New.
10402 (i386_emit_ops): New.
10403 (x86_emit_ops): New.
10404 (the_low_target): Install x86_emit_ops.
10405 * server.h (struct emit_ops): New.
10406 (get_raw_reg_func_addr): Declare.
10407 (current_insn_ptr, emit_error): Declare.
10408 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10409 (set_trace_state_variable_value): New defines.
10410 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10411 addr_get_trace_state_variable_value and
10412 addr_set_trace_state_variable_value.
10413 (symbol_list): New fields for get_raw_reg,
10414 get_trace_state_variable_value and set_trace_state_variable_value.
10415 (condfn): New typedef.
10416 (struct tracepoint): New field `compiled_cond'.
10417 (do_action_at_tracepoint): Clear compiled_cond.
10418 (get_trace_state_variable_value, set_trace_state_variable_value):
10419 Export in the IPA.
10420 (condition_true_at_tracepoint): If there's a compiled condition,
10421 run that.
10422 (current_insn_ptr, emit_error): New globals.
10423 (struct bytecode_address): New.
10424 (get_raw_reg_func_addr): New.
10425 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10426 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10427 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10428 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10429 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10430 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10431 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10432 (compile_tracepoint_condition, compile_bytecodes): New.
10433 * target.h (emit_ops): Forward declare.
10434 (struct target_ops): New field emit_ops.
10435 (target_emit_ops): New.
10436 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10437 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10438 * linux-low.c (linux_emit_ops): New.
10439 (linux_target_ops): Install it.
10440 * linux-low.h (struct linux_target_ops): New field emit_ops.
10441
10442 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10443
10444 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10445 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10446
10447 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10448 Stan Shebs <stan@codesourcery.com>
10449
10450 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10451 (all): Depend on $(extra_libraries).
10452 (install-only): Install the IPA.
10453 (IPA_OBJS, IPA_LIB): New.
10454 (clean): Remove the IPA lib.
10455 (IPAGENT_CFLAGS): New.
10456 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10457 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10458 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10459 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10460 * configure.ac: Check for atomic builtins support in the compiler.
10461 (IPA_DEPFILES, extra_libraries): Define.
10462 * configure.srv (ipa_obj): Add description.
10463 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10464 (i[34567]86-*-linux*): Set ipa_obj.
10465 (x86_64-*-linux*): Set ipa_obj.
10466 * linux-low.c (stabilizing_threads): New.
10467 (supports_fast_tracepoints): New.
10468 (linux_detach): Stabilize threads before detaching.
10469 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10470 the lwp is either not stabilizing, or is moving out of a jump pad.
10471 (linux_fast_tracepoint_collecting): New.
10472 (maybe_move_out_of_jump_pad): New.
10473 (enqueue_one_deferred_signal): New.
10474 (dequeue_one_deferred_signal): New.
10475 (linux_wait_for_event_1): If moving out of a jump pad, defer
10476 pending signals to later.
10477 (linux_stabilize_threads): New.
10478 (linux_wait_1): Check if threads need moving out of jump pads, and
10479 do it if so.
10480 (stuck_in_jump_pad_callback): New.
10481 (move_out_of_jump_pad_callback): New.
10482 (lwp_running): New.
10483 (linux_resume_one_lwp): Handle moving out of jump pads.
10484 (linux_set_resume_request): Dequeue deferred signals.
10485 (need_step_over_p): Also step over fast tracepoint jumps.
10486 (start_step_over): Also uninsert fast tracepoint jumps.
10487 (finish_step_over): Also reinsert fast tracepoint jumps.
10488 (linux_install_fast_tracepoint_jump): New.
10489 (linux_target_ops): Install linux_stabilize_threads and
10490 linux_install_fast_tracepoint_jump_pad.
10491 * linux-low.h (linux_target_ops) <get_thread_area,
10492 install_fast_tracepoint_jump_pad>: New fields.
10493 (struct lwp_info) <collecting_fast_tracepoint,
10494 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10495 (linux_get_thread_area): Declare.
10496 * linux-x86-low.c (jump_insn): New.
10497 (x86_get_thread_area): New.
10498 (append_insns): New.
10499 (push_opcode): New.
10500 (amd64_install_fast_tracepoint_jump_pad): New.
10501 (i386_install_fast_tracepoint_jump_pad): New.
10502 (x86_install_fast_tracepoint_jump_pad): New.
10503 (the_low_target): Install x86_get_thread_area and
10504 x86_install_fast_tracepoint_jump_pad.
10505 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10506 (struct fast_tracepoint_jump): New.
10507 (fast_tracepoint_jump_insn): New.
10508 (fast_tracepoint_jump_shadow): New.
10509 (find_fast_tracepoint_jump_at): New.
10510 (fast_tracepoint_jump_here): New.
10511 (delete_fast_tracepoint_jump): New.
10512 (set_fast_tracepoint_jump): New.
10513 (uninsert_fast_tracepoint_jumps_at): New.
10514 (reinsert_fast_tracepoint_jumps_at): New.
10515 (set_breakpoint_at): Use write_inferior_memory.
10516 (uninsert_raw_breakpoint): Use write_inferior_memory.
10517 (check_mem_read): Mask out fast tracepoint jumps.
10518 (check_mem_write): Mask out fast tracepoint jumps.
10519 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10520 (set_fast_tracepoint_jump): Declare.
10521 (delete_fast_tracepoint_jump)
10522 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10523 (reinsert_fast_tracepoint_jumps_at): Declare.
10524 * regcache.c: Don't compile many functions when building the
10525 in-process agent library.
10526 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10527 the register buffer in the heap.
10528 (free_register_cache): If the register buffer isn't owned by the
10529 regcache, don't free it.
10530 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10531 pre-existing register caches.
10532 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10533 type.
10534 (convert_ascii_to_int): : Constify `from' parameter type.
10535 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10536 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10537 the needed buffer in-place.
10538 (relocate_instruction): New.
10539 * server.c (handle_query) <qSymbols>: If the target supports
10540 tracepoints, give it a chance of looking up symbols. Report
10541 support for fast tracepoints.
10542 (handle_status): Stabilize threads.
10543 (process_serial_event): Adjust.
10544 * server.h (struct fast_tracepoint_jump): Forward declare.
10545 (struct process_info) <fast_tracepoint_jumps>: New field.
10546 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10547 (decode_X_packet, decode_M_packet): Adjust.
10548 (relocate_instruction): Declare.
10549 (in_process_agent_loaded): Declare.
10550 (tracepoint_look_up_symbols): Declare.
10551 (struct fast_tpoint_collect_status): Declare.
10552 (fast_tracepoint_collecting): Declare.
10553 (force_unlock_trace_buffer): Declare.
10554 (handle_tracepoint_bkpts): Declare.
10555 (initialize_low_tracepoint)
10556 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10557 * target.h (struct target_ops) <stabilize_threads,
10558 install_fast_tracepoint_jump_pad>: New fields.
10559 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10560 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10561 [HAVE_STDINT_H]: Include stdint.h.
10562 (trace_debug_1): Rename to ...
10563 (trace_vdebug): ... this.
10564 (trace_debug): Rename to ...
10565 (trace_debug_1): ... this. Add `level' parameter.
10566 (trace_debug): New.
10567 (ATTR_USED, ATTR_NOINLINE): New.
10568 (IP_AGENT_EXPORT): New.
10569 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10570 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10571 (about_to_request_buffer_space, trace_buffer_is_full)
10572 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10573 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10574 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10575 (traceframe_write_count, traceframes_created)
10576 (trace_state_variables)
10577 New renaming defines.
10578 (struct ipa_sym_addresses): New.
10579 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10580 (symbol_list): New.
10581 (ipa_sym_addrs): New.
10582 (all_tracepoint_symbols_looked_up): New.
10583 (in_process_agent_loaded): New.
10584 (write_e_ipa_not_loaded): New.
10585 (maybe_write_ipa_not_loaded): New.
10586 (tracepoint_look_up_symbols): New.
10587 (debug_threads) [IN_PROCESS_AGENT]: New.
10588 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10589 (UNKNOWN_SIDE_EFFECTS): New.
10590 (stop_tracing): New.
10591 (flush_trace_buffer): New.
10592 (stop_tracing_bkpt): New.
10593 (flush_trace_buffer_bkpt): New.
10594 (read_inferior_integer): New.
10595 (read_inferior_uinteger): New.
10596 (read_inferior_data_pointer): New.
10597 (write_inferior_data_pointer): New.
10598 (write_inferior_integer): New.
10599 (write_inferior_uinteger): New.
10600 (struct collect_static_trace_data_action): Delete.
10601 (enum tracepoint_type): New.
10602 (struct tracepoint) <type>: New field `type'.
10603 <actions_str, step_actions, step_actions_str>: Only include in
10604 GDBserver.
10605 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10606 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10607 (tracepoints): Use IP_AGENT_EXPORT.
10608 (last_tracepoint): Don't include in the IPA.
10609 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10610 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10611 (alloced_trace_state_variables): New.
10612 (trace_state_variables): Use IP_AGENT_EXPORT.
10613 (traceframe_t): Delete unused variable.
10614 (circular_trace_buffer): Don't include in the IPA.
10615 (trace_buffer_start): Delete.
10616 (struct trace_buffer_control): New.
10617 (trace_buffer_free): Delete.
10618 (struct ipa_trace_buffer_control): New.
10619 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10620 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10621 New.
10622 (trace_buffer_ctrl): New.
10623 (TRACE_BUFFER_CTRL_CURR): New.
10624 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10625 Reimplement as macros.
10626 (trace_buffer_wrap): Delete.
10627 (traceframe_write_count, traceframe_read_count)
10628 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10629 (struct tracepoint_hit_ctx) <type>: New field.
10630 (struct fast_tracepoint_ctx): New.
10631 (memory_barrier): New.
10632 (cmpxchg): New.
10633 (record_tracepoint_error): Update atomically in the IPA.
10634 (clear_inferior_trace_buffer): New.
10635 (about_to_request_buffer_space): New.
10636 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10637 updating the same buffer.
10638 (add_tracepoint): Default the tracepoint's type to trap
10639 tracepoint, and orig_size to -1.
10640 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10641 internal variables.
10642 (create_trace_state_variable): New parameter `gdb'. Handle it.
10643 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10644 (cmd_qtdp): Handle fast tracepoints.
10645 (cmd_qtdv): Adjust.
10646 (max_jump_pad_size): New.
10647 (gdb_jump_pad_head): New.
10648 (get_jump_space_head): New.
10649 (claim_jump_space): New.
10650 (sort_tracepoints): New.
10651 (MAX_JUMP_SIZE): New.
10652 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10653 IPA.
10654 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10655 support. Upload fast traceframes, and delete internal IPA
10656 breakpoints.
10657 (stop_tracing_handler): New.
10658 (flush_trace_buffer_handler): New.
10659 (cmd_qtstop): Upload fast tracepoints.
10660 (response_tracepoint): Handle fast tracepoints.
10661 (tracepoint_finished_step): Upload fast traceframes. Set the
10662 tracepoint hit context's tracepoint type.
10663 (handle_tracepoint_bkpts): New.
10664 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10665 type. Add comment about fast tracepoints.
10666 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10667 non-existing action_str field.
10668 (get_context_regcache): Handle fast tracepoints.
10669 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10670 to the regcache.
10671 (fast_tracepoint_from_jump_pad_address): New.
10672 (fast_tracepoint_from_ipa_tpoint_address): New.
10673 (collecting_t): New.
10674 (force_unlock_trace_buffer): New.
10675 (fast_tracepoint_collecting): New.
10676 (collecting): New.
10677 (gdb_collect): New.
10678 (write_inferior_data_ptr): New.
10679 (target_tp_heap): New.
10680 (target_malloc): New.
10681 (download_agent_expr): New.
10682 (UALIGN): New.
10683 (download_tracepoints): New.
10684 (download_trace_state_variables): New.
10685 (upload_fast_traceframes): New.
10686 (IPA_FIRST_TRACEFRAME): New.
10687 (IPA_NEXT_TRACEFRAME_1): New.
10688 (IPA_NEXT_TRACEFRAME): New.
10689 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10690 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10691 (gdb_jump_pad_buffer_end): New.
10692 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10693 (initialize_tracepoint): Adjust.
10694 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10695 buffer. Initialize the low module.
10696 * utils.c (PREFIX, TOOLNAME): New.
10697 (malloc_failure): Use PREFIX.
10698 (error): In the IPA, an error causes an exit.
10699 (fatal, warning): Use PREFIX.
10700 (internal_error): Use TOOLNAME.
10701 (NUMCELLS): Increase to 10.
10702 * configure, config.in: Regenerate.
10703
10704 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10705
10706 * server.c (handle_query) <qSupported>: Do two passes over the
10707 qSupported string to avoid nesting strtok.
10708
10709 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10710
10711 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10712 (CDEPS): New.
10713 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10714 -Wl,--dynamic-list.
10715 * configure: Regenerate.
10716 * proc-service.list: New.
10717
10718 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10719
10720 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10721 New comment.
10722
10723 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10724
10725 * gdbreplay.c (remote_open): Check error return from socket() call by
10726 its equality to -1 not by it being negative.
10727 * remote-utils.c (remote_open): Likewise.
10728
10729 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10730
10731 * config.h: Regenerate.
10732
10733 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10734
10735 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10736 doesn't provide PTRACE_GET_THREAD_AREA.
10737
10738 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10739
10740 * linux-m68k-low.c: Include <asm/ptrace.h>
10741 (ps_get_thread_area): Implement.
10742
10743 2010-05-03 Doug Evans <dje@google.com>
10744
10745 * event-loop.c (struct callback_event): New struct.
10746 (callback_list): New global.
10747 (append_callback_event, delete_callback_event): New functions.
10748 (process_callback): New function.
10749 (start_event_loop): Call it.
10750 * remote-utils.c (NOT_SCHEDULED): Define.
10751 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10752 moved out of readchar.
10753 (readchar): Rewrite. Call reschedule before returning.
10754 (reset_readchar): New function.
10755 (remote_close): Call it.
10756 (process_remaining, reschedule): New functions.
10757 * server.h (callback_handler_func): New typedef.
10758 (append_callback_event, delete_callback_event): Declare.
10759
10760 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10761
10762 * proc-service.c (ps_pglobal_lookup): Use
10763 thread_db_look_up_one_symbol.
10764 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10765 parameter. Use it instead of all_symbols_looked_up.
10766 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10767 field.
10768 (all_symbols_looked_up): Don't declare.
10769 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10770 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10771 field.
10772 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10773 Set all_symbols_looked_up here.
10774 (thread_db_look_up_one_symbol): New.
10775 (thread_db_get_tls_address): Adjust.
10776 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10777 thread_db object on the heap, and tentatively set it in the
10778 process structure.
10779 (thread_db_init): Don't set all_symbols_looked_up here.
10780 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10781
10782 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10783
10784 * linux-low.c (linux_kill, linux_detach): Adjust.
10785 (status_pending_p_callback): Remove redundant statement. Check
10786 for !TARGET_WAITIKIND_IGNORE, instead of
10787 TARGET_WAITKIND_STOPPED.
10788 (handle_tracepoints): Make sure LWP is locked. Adjust.
10789 (linux_wait_for_event_1): Adjust.
10790 (linux_cancel_breakpoints): New.
10791 (unsuspend_one_lwp): New.
10792 (unsuspend_all_lwps): New.
10793 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10794 (send_sigstop_callback): Change return type to int, add new
10795 `except' parameter and handle it.
10796 (suspend_and_send_sigstop_callback): New.
10797 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10798 pass them down. If SUSPEND, also increment the lwp's suspend
10799 count.
10800 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10801 (need_step_over_p): Don't consider suspended LWPs.
10802 (start_step_over): Adjust.
10803 (proceed_one_lwp): Change return type to int, add new `except'
10804 parameter and handle it.
10805 (unsuspend_and_proceed_one_lwp): New.
10806 (proceed_all_lwps): Use find_inferior instead of
10807 for_each_inferior.
10808 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10809 also decrement the suspend count of LWPs. Pass `except' down,
10810 instead of hacking its suspend count.
10811 (linux_pause_all): Add `freeze' parameter. Adjust.
10812 (linux_unpause_all): New.
10813 (linux_target_ops): Install linux_unpause_all.
10814 * server.c (handle_status): Adjust.
10815 * target.h (struct target_ops): New fields `unpause_all' and
10816 `cancel_breakpoints'. Add new parameter to `pause_all'.
10817 (pause_all): Add new `freeze' parameter.
10818 (unpause_all): New.
10819 (cancel_breakpoints): New.
10820 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10821 cancel breakpoints.
10822 (cmd_qtstart): Pause threads.
10823 (stop_tracing): Pause threads, and cancel breakpoints.
10824 * win32-low.c (win32_target_ops): Adjust.
10825
10826 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10827
10828 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10829 the inferior right away from here...
10830 (linux_wait_1): ... to here, and adjust to check the thread's
10831 last_resume_kind instead of the lwp's step or stop_expected flags.
10832
10833 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10834
10835 * README: Use consistent `GDB' and `GDBserver' spellings.
10836
10837 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10838
10839 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10840 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10841 (linux_detach_one_lwp): Assume the lwp is stopped.
10842 (any_thread_of): Delete.
10843 (linux_detach): Stop all lwps here. Don't blindly delete all
10844 breakpoints.
10845 (delete_lwp_callback): New.
10846 (linux_mourn): Delete all lwps of the process that is gone.
10847 (linux_wait_1): Don't delete the last lwp of the process here.
10848 * mem-break.h (mark_breakpoints_out): Declare.
10849 * mem-break.c (mark_breakpoints_out): New.
10850 (free_all_breakpoints): Use it.
10851 * server.c (handle_target_event): If the process is gone, mark
10852 breakpoints out.
10853 * thread-db.c (struct thread_db) <create_bp>: New field.
10854 (thread_db_enable_reporting): Fix prototype. Store a thread event
10855 breakpoint reference in the thread_db struct.
10856 (thread_db_load_search): Clear the thread_db object.
10857 (try_thread_db_load_1): Ditto.
10858 (switch_to_process): New.
10859 (disable_thread_event_reporting): Use it.
10860 (remove_thread_event_breakpoints): New.
10861 (thread_db_detach, thread_db_mourn): Use it.
10862
10863 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10864
10865 * linux-low.c (linux_enable_event_reporting): New.
10866 (linux_wait_for_event_1, handle_extended_wait): Use it.
10867
10868 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10869
10870 * linux-low.c (linux_kill_one_lwp, linux_kill)
10871 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10872 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10873 SIGSTOP even if the LWP is stopped.
10874 (send_sigstop_callback): New.
10875 (stop_all_lwps): Use send_sigstop_callback instead.
10876 (linux_resume_one_thread): Adjust.
10877 (proceed_one_lwp): Still proceed an LWP that the client has
10878 requested to stop, if we haven't reported it as stopped yet. Make
10879 sure that LWPs the client want stopped, have a pending SIGSTOP.
10880
10881 2010-04-26 Doug Evans <dje@google.com>
10882
10883 * server.c (handle_general_set): Make static.
10884
10885 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10886 Print received char after testing for error/eof instead of before.
10887 (input_interrupt): Tweak comment.
10888
10889 2010-04-23 Doug Evans <dje@google.com>
10890
10891 * server.c (start_inferior): Print inferior argv if --debug.
10892
10893 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10894
10895 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10896 * nto-x86-low.c: Include server.h
10897
10898 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10899
10900 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10901 be consistent with other sources of this directory.
10902 (init_registers_amd64): Correct name of source file of this function
10903 in the comment.
10904
10905 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10906
10907 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10908 64-bit executables.
10909
10910 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10911
10912 * win32-i386-low.c: Add 64-bit support.
10913 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10914 (init_registers_amd64): Declare.
10915 (mappings): Add 64-bit version of array.
10916 (init_windows_x86): New function.
10917 (the_low_target): Change init_arch field to init_windows_x86.
10918
10919 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10920
10921 * win32-low.c: Adapt to support also 64-bit architecture.
10922 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10923 (get_image_name): Use SIZE_T type for local variable `done'.
10924 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10925 (toolhelp_get_dll_name): Idem.
10926 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10927 Use uintptr_t typecast to avoid warning.
10928 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10929 (handle_exception): Use phex_nz to avoid warning.
10930 (win32_wait): Remove unused local variable `process'.
10931
10932 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10933
10934 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10935 `amd64-avx.o'.
10936
10937 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10938
10939 * configure.ac: Use `ws2_32' library for srv_mingw.
10940 * configure: Regenerate.
10941 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10942 * remote-utils.c: Likewise.
10943
10944 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10945
10946 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10947 if __x86_64__ is defined.
10948
10949 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10950
10951 * configure: Regenerate.
10952
10953 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10954
10955 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10956 * target.h (target_ops): New get_tib_address field.
10957 * win32-low.h (win32_thread_info): Add thread_local_base field.
10958 * win32-low.c (child_add_thread): Add tlb argument.
10959 Set thread_local_base field to TLB.
10960 (get_child_debug_event): Adapt to child_add_thread change.
10961 (win32_get_tib_address): New function.
10962 (win32_target_ops): Set get_tib_address field to
10963 win32_get_tib_address.
10964 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10965
10966 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10967
10968 * linux-low.c (linux_mourn): Also remove the process.
10969 * server.c (handle_target_event): Don't remove the process here.
10970 * nto-low.c (nto_mourn): New.
10971 (nto_target_ops): Install it.
10972 * spu-low.c (spu_mourn): New.
10973 (spu_target_ops): Install it.
10974 * win32-low.c (win32_mourn): New.
10975 (win32_target_ops): Install it.
10976
10977 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10978
10979 * server.h (buffer_xml_printf): Remove redundant `;'.
10980
10981 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10982
10983 * regcache.c (set_register_cache): Invalidate regcaches before
10984 changing the register cache layout.
10985 (regcache_invalidate_one): Allow a NULL regcache.
10986 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10987 regcaches before changing the register cache layout or the target
10988 regsets.
10989
10990 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10991
10992 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10993 variable warning on Linux/x86-64.
10994
10995 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10996
10997 GDBserver disconnected tracing support.
10998
10999 * linux-low.c (linux_remove_process): Delete.
11000 (add_lwp): Don't set last_resume_kind here.
11001 (linux_kill): Use `mourn'.
11002 (linux_detach): Use `thread_db_detach', and `mourn'.
11003 (linux_mourn): New.
11004 (linux_attach_lwp_1): Adjust comment.
11005 (linux_attach): last_resume_kind moved the thread_info; adjust.
11006 (status_pending_p_callback): Adjust.
11007 (linux_wait_for_event_1): Adjust.
11008 (count_events_callback, select_singlestep_lwp_callback)
11009 (select_event_lwp_callback, cancel_breakpoints_callback)
11010 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11011 (proceed_one_lwp): Adjust.
11012 (linux_async): Add debug output.
11013 (linux_thread_stopped): New.
11014 (linux_pause_all): New.
11015 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11016 linux_pause_all.
11017 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11018 (thread_db_free): Delete declaration.
11019 (thread_db_detach, thread_db_mourn): Declare.
11020 * thread-db.c (thread_db_init): Use thread_db_mourn.
11021 (thread_db_free): Delete, split in two.
11022 (disable_thread_event_reporting): New.
11023 (thread_db_detach): New.
11024 (thread_db_mourn): New.
11025
11026 * server.h (struct thread_info) <last_resume_kind>: New field.
11027 <attached>: Add comment.
11028 <gdb_detached>: New field.
11029 (handler_func): Change return type to int.
11030 (handle_serial_event, handle_target_event): Ditto.
11031 (gdb_connected): Declare.
11032 (tracing): Delete.
11033 (disconnected_tracing): Declare.
11034 (stop_tracing): Declare.
11035
11036 * server.c (handle_query) <qSupported>: Report support for
11037 disconnected tracing.
11038 (queue_stop_reply_callback): Account for running threads.
11039 (gdb_wants_thread_stopped): New.
11040 (gdb_wants_all_threads_stopped): New.
11041 (gdb_reattached_process): New.
11042 (handle_status): Clear the `gdb_detached' flag of all processes.
11043 In all-stop, stop all threads.
11044 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11045 (process_serial_event): If the remote connection breaks, or if an
11046 exit was forced with "monitor exit", force an event loop exit.
11047 Handle disconnected tracing on detach.
11048 (handle_serial_event): Adjust.
11049 (handle_target_event): If GDB isn't connected, forward events back
11050 to the inferior, unless the last process exited, in which case,
11051 exit gdbserver. Adjust interface.
11052
11053 * remote-utils.c (remote_open): Don't block in accept. Instead
11054 register an event loop source on the listen socket file
11055 descriptor. Refactor bits into ...
11056 (listen_desc): ... this new global.
11057 (gdb_connected): ... this new function.
11058 (enable_async_notification): ... this new function.
11059 (handle_accept_event): ... this new function.
11060 (remote_close): Clear remote_desc.
11061
11062 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11063
11064 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11065 New fields.
11066 (mourn_inferior): Define.
11067 (target_process_qsupported): Avoid the dangling else problem.
11068 (thread_stopped): Define.
11069 (pause_all): Define.
11070 (target_waitstatus_to_string): Declare.
11071 * target.c (target_waitstatus_to_string): New.
11072
11073 * tracepoint.c (tracing): Make extern.
11074 (disconnected_tracing): New.
11075 (stop_tracing): Make extern. Handle tracing stops due to GDB
11076 disconnecting.
11077 (cmd_qtdisconnected): New.
11078 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11079 (handle_tracepoint_general_set): Handle QTDisconnected.
11080
11081 * event-loop.c (event_handler_func): Change return type to int.
11082 (process_event): Bail out if the event handler wants the event
11083 loop to stop.
11084 (handle_file_event): Ditto.
11085 (start_event_loop): Bail out if the event handler wants the event
11086 loop to stop.
11087
11088 * nto-low.c (nto_target_ops): Adjust.
11089 * spu-low.c (spu_wait): Don't remove the process here.
11090 (spu_target_ops): Adjust.
11091 * win32-low.c (win32_wait): Don't remove the process here.
11092 (win32_target_ops): Adjust.
11093
11094 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11095
11096 * regcache.c (realloc_register_cache): Invalidate inferior's
11097 regcache before recreating it.
11098
11099 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11100
11101 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11102
11103 2010-04-09 Stan Shebs <stan@codesourcery.com>
11104 Pedro Alves <pedro@codesourcery.com>
11105
11106 * server.h (LONGEST): New.
11107 (struct thread_info) <while_stepping>: New field.
11108 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11109 Declare.
11110 (initialize_tracepoint, handle_tracepoint_general_set)
11111 (handle_tracepoint_query, tracepoint_finished_step)
11112 (tracepoint_was_hit, release_while_stepping_state_list):
11113 (current_traceframe): Declare.
11114 * server.c (handle_general_set): Handle tracepoint packets.
11115 (read_memory): New.
11116 (write_memory): New.
11117 (handle_search_memory_1): Use read_memory.
11118 (handle_query): Report support for conditional tracepoints, trace
11119 state variables, and tracepoint sources. Handle tracepoint
11120 queries.
11121 (main): Initialize the tracepoints module.
11122 (process_serial_event): Handle traceframe reads/writes.
11123
11124 * linux-low.c (handle_tracepoints): New.
11125 (linux_wait_1): Call it.
11126 (linux_resume_one_lwp): Handle while-stepping.
11127 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11128 (linux_target_ops): Install them.
11129 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11130 New field.
11131 * linux-x86-low.c (x86_supports_tracepoints): New.
11132 (the_low_target). Install it.
11133
11134 * mem-break.h (delete_breakpoint): Declare.
11135 * mem-break.c (delete_breakpoint): Make external.
11136
11137 * target.h (struct target_ops): Add `supports_tracepoints',
11138 `read_pc', and `write_pc' fields.
11139 (target_supports_tracepoints): Define.
11140 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11141 (phex_nz): New.
11142
11143 * regcache.h (struct regcache) <registers_owned>: New field.
11144 (init_register_cache, regcache_cpy): Declare.
11145 (regcache_read_pc, regcache_write_pc): Declare.
11146 (register_cache_size): Declare.
11147 (supply_regblock): Declare.
11148 * regcache.c (init_register_cache): New.
11149 (new_register_cache): Use it.
11150 (regcache_cpy): New.
11151 (register_cache_size): New.
11152 (supply_regblock): New.
11153 (regcache_read_pc, regcache_write_pc): New.
11154
11155 * tracepoint.c: New.
11156
11157 * Makefile.in (OBS): Add tracepoint.o.
11158 (tracepoint.o): New rule.
11159
11160 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11161
11162 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11163 (i386-mmx.o): New.
11164 (i386-mmx.c): Likewise.
11165 (i386-mmx-linux.o): Likewise.
11166 (i386-mmx-linux.c): Likewise.
11167
11168 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11169 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11170 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11171 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11172
11173 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11174 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11175 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11176
11177 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11178
11179 * Makefile.in (clean): Updated.
11180 (i386-avx.o): New.
11181 (i386-avx.c): Likewise.
11182 (i386-avx-linux.o): Likewise.
11183 (i386-avx-linux.c): Likewise.
11184 (amd64-avx.o): Likewise.
11185 (amd64-avx.c): Likewise.
11186 (amd64-avx-linux.o): Likewise.
11187 (amd64-avx-linux.c): Likewise.
11188
11189 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11190 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11191 (srv_amd64_regobj): Add amd64-avx.o.
11192 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11193 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11194 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11195 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11196 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11197 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11198 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11199
11200 * i387-fp.c: Include "i386-xstate.h".
11201 (i387_xsave): New.
11202 (i387_cache_to_xsave): Likewise.
11203 (i387_xsave_to_cache): Likewise.
11204 (x86_xcr0): Likewise.
11205
11206 * i387-fp.h (i387_cache_to_xsave): Likewise.
11207 (i387_xsave_to_cache): Likewise.
11208 (x86_xcr0): Likewise.
11209
11210 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11211 * linux-crisv32-low.c (target_regsets): Likewise.
11212 * linux-m68k-low.c (target_regsets): Likewise.
11213 * linux-mips-low.c (target_regsets): Likewise.
11214 * linux-ppc-low.c (target_regsets): Likewise.
11215 * linux-s390-low.c (target_regsets): Likewise.
11216 * linux-sh-low.c (target_regsets): Likewise.
11217 * linux-sparc-low.c (target_regsets): Likewise.
11218 * linux-xtensa-low.c (target_regsets): Likewise.
11219
11220 * linux-low.c: Include <sys/uio.h>.
11221 (regsets_fetch_inferior_registers): Support nt_type.
11222 (regsets_store_inferior_registers): Likewise.
11223 (linux_process_qsupported): New.
11224 (linux_target_ops): Add linux_process_qsupported.
11225
11226 * linux-low.h (regset_info): Add nt_type.
11227 (linux_target_ops): Add process_qsupported.
11228
11229 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11230 and <sys/uio.h>.
11231 (init_registers_i386_avx_linux): New.
11232 (init_registers_amd64_avx_linux): Likewise.
11233 (xmltarget_i386_linux_no_xml): Likewise.
11234 (xmltarget_amd64_linux_no_xml): Likewise.
11235 (PTRACE_GETREGSET): Likewise.
11236 (PTRACE_SETREGSET): Likewise.
11237 (x86_fill_xstateregset): Likewise.
11238 (x86_store_xstateregset): Likewise.
11239 (use_xml): Likewise.
11240 (x86_linux_update_xmltarget): Likewise.
11241 (x86_linux_process_qsupported): Likewise.
11242 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11243 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11244 init_registers_i386_linux here. Call
11245 x86_linux_update_xmltarget.
11246 (the_low_target): Add x86_linux_process_qsupported.
11247
11248 * server.c (handle_query): Call target_process_qsupported.
11249
11250 * target.h (target_ops): Add process_qsupported.
11251 (target_process_qsupported): New.
11252
11253 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11254
11255 * inferiors.c (add_thread): Set last_status kind to
11256 TARGET_WAITKIND_IGNORE.
11257 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11258 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11259 (linux_wait_1): Move `thread' local definition to block that uses
11260 it. Don't NULL initialize `event_child'.
11261 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11262 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11263 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11264
11265 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11266
11267 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11268 an extended waitstatus, or by a watchpoint.
11269 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11270 thread was stepping or has been stopped by a watchpoint.
11271
11272 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11273
11274 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11275 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11276 of another, then delete the previous, and validate all
11277 breakpoints.
11278 (validate_inserted_breakpoint): New.
11279 (delete_disabled_breakpoints): New.
11280 (validate_breakpoints): New.
11281 (check_mem_read): Validate breakpoints before trusting their
11282 shadow. Delete disabled breakpoints.
11283 (check_mem_write): Validate breakpoints before trusting they
11284 should be inserted. Delete disabled breakpoints.
11285 * mem-break.h (validate_breakpoints):
11286 * server.c (handle_query): Validate breakpoints when we see a
11287 qSymbol query.
11288
11289 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11290
11291 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11292 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11293 if we could tell there's a GDB breakpoint at stop_pc.
11294 (need_step_over_p): Don't do a step over if we find a GDB
11295 breakpoint at the resume PC.
11296
11297 * mem-break.c (struct raw_breakpoint): New.
11298 (enum bkpt_type): New type `gdb_breakpoint'.
11299 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11300 fields. New field `raw'.
11301 (find_raw_breakpoint_at): New.
11302 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11303 breakpoint instead.
11304 (set_breakpoint_at): Adjust.
11305 (delete_raw_breakpoint): New.
11306 (release_breakpoint): New.
11307 (delete_breakpoint): Rename to...
11308 (delete_breakpoint_1): ... this. Add proc parameter. Use
11309 release_breakpoint. Return ENOENT.
11310 (delete_breakpoint): Reimplement.
11311 (find_breakpoint_at): Delete.
11312 (find_gdb_breakpoint_at): New.
11313 (delete_breakpoint_at): Delete.
11314 (set_gdb_breakpoint_at): New.
11315 (delete_gdb_breakpoint_at): New.
11316 (gdb_breakpoint_here): New.
11317 (set_reinsert_breakpoint): Use release_breakpoint.
11318 (uninsert_breakpoint): Rename to ...
11319 (uninsert_raw_breakpoint): ... this.
11320 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11321 (reinsert_raw_breakpoint): Change parameter type to
11322 raw_breakpoint.
11323 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11324 instead.
11325 (check_breakpoints): Adjust. Use release_breakpoint.
11326 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11327 (breakpoint_inserted_here): Ditto.
11328 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11329 Don't trust the breakpoint's shadow if it is not inserted.
11330 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11331 (delete_all_breakpoints): Adjust.
11332 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11333 use delete_breakpoint_1.
11334
11335 * mem-break.h (breakpoints_supported): Delete declaration.
11336 (set_gdb_breakpoint_at): Declare.
11337 (gdb_breakpoint_here): Declare.
11338 (delete_breakpoint_at): Delete.
11339 (delete_gdb_breakpoint_at): Declare.
11340
11341 * server.h (struct raw_breakpoint): Forward declare.
11342 (struct process_info): New field `raw_breakpoints'.
11343
11344 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11345 breakpoints.
11346
11347 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11348
11349 * linux-low.c (status_pending_p_callback): Fix comment.
11350 (linux_wait_for_event_1): Move most of the internal breakpoint
11351 handling from here...
11352 (linux_wait_1): ... to here.
11353 (count_events_callback): New.
11354 (select_singlestep_lwp_callback): New.
11355 (select_event_lwp_callback): New.
11356 (cancel_breakpoints_callback): New.
11357 (select_event_lwp): New.
11358 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11359 priority to all LWPs that have had events that should be reported
11360 to the client. Cancel breakpoints when about to reporting the
11361 event to the client, not while stopping lwps. No longer cancel
11362 finished single-steps here.
11363 (cancel_finished_single_step): Delete.
11364 (cancel_finished_single_steps): Delete.
11365
11366 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11367
11368 * mem-break.c (enum bkpt_type): New.
11369 (struct breakpoint): New field `type'.
11370 (set_breakpoint_at): Change return type to struct breakpoint
11371 pointer. Set type to `other_breakpoint' by default.
11372 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11373 in the breakpoint list.
11374 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11375 (reinsert_breakpoint): Rename to ...
11376 (reinsert_raw_breakpoint): ... this.
11377 (reinsert_breakpoints_at): Adjust.
11378 * mem-break.h (struct breakpoint): Declare.
11379 (set_breakpoint_at): Change return type to struct breakpoint
11380 pointer.
11381
11382 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11383
11384 * server.c (handle_query): Assign, not compare.
11385
11386 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11387
11388 Teach linux gdbserver to step-over-breakpoints.
11389
11390 * linux-low.c (can_hardware_single_step): New.
11391 (supports_breakpoints): New.
11392 (handle_extended_wait): If stopping threads, read the stop pc of
11393 the new cloned LWP.
11394 (get_pc): New.
11395 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11396 low target doesn't support retrieving the PC.
11397 (add_lwp): Set last_resume_kind to resume_continue.
11398 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11399 (linux_attach): Don't clear stop_expected. Set the lwp's
11400 last_resume_kind to resume_stop.
11401 (linux_detach_one_lwp): Don't check for removed breakpoints.
11402 (check_removed_breakpoint): Delete.
11403 (status_pending_p): Rename to ...
11404 (status_pending_p_callback): ... this. Don't check for removed
11405 breakpoints. Don't consider threads that are stopped from GDB's
11406 perspective.
11407 (linux_wait_for_lwp): Always read the stop_pc here.
11408 (cancel_breakpoint): New.
11409 (step_over_bkpt): New global.
11410 (linux_wait_for_event_1): Implement stepping over breakpoints.
11411 (gdb_wants_lwp_stopped): New.
11412 (gdb_wants_all_stopped): New.
11413 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11414 single-step traps here. Store the thread's last reported target
11415 wait status.
11416 (send_sigstop): Don't clear stop_expected. Always set it,
11417 instead.
11418 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11419 (cancel_finished_single_step): New.
11420 (cancel_finished_single_steps): New.
11421 (wait_for_sigstop): Don't cancel finished single-step traps here.
11422 (linux_resume_one_lwp): Don't check for removed breakpoints.
11423 Don't set `step' on non-hardware step archs.
11424 (linux_set_resume_request): Ignore resume_stop requests if already
11425 stopping or stopped. Set the lwp's last_resume_kind.
11426 (resume_status_pending_p): Don't check for removed breakpoints.
11427 (need_step_over_p): New.
11428 (start_step_over): New.
11429 (finish_step_over): New.
11430 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11431 requests. Clear the thread's last reported target waitstatus.
11432 Don't use the `suspended' flag. Don't consider pending breakpoints.
11433 (linux_resume): Start a step-over if necessary.
11434 (proceed_one_lwp): New.
11435 (proceed_all_lwps): New.
11436 (unstop_all_lwps): New.
11437 * linux-low.h (struct lwp_info): Rewrite comment for the
11438 `suspended' flag. Add the `stop_pc' field. Delete the
11439 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11440 Add `'last_resume_kind' and `need_step_over' fields.
11441 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11442 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11443 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11444 (set_raw_breakpoint_at): New.
11445 (set_breakpoint_at): Rewrite to use it.
11446 (reinsert_breakpoint_handler): Delete.
11447 (set_reinsert_breakpoint): New.
11448 (reinsert_breakpoint_by_bp): Delete.
11449 (delete_reinsert_breakpoints): New.
11450 (uninsert_breakpoint): Rewrite.
11451 (uninsert_breakpoints_at): New.
11452 (reinsert_breakpoint): Rewrite.
11453 (reinsert_breakpoints_at): New.
11454 (check_breakpoints): Rewrite.
11455 (breakpoint_here): New.
11456 (breakpoint_inserted_here): New.
11457 (check_mem_read): Adjust.
11458 * mem-break.h (breakpoints_supported, breakpoint_here)
11459 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11460 (reinsert_breakpoint_by_bp): Delete declaration.
11461 (delete_reinsert_breakpoints): Declare.
11462 (reinsert_breakpoint): Delete declaration.
11463 (reinsert_breakpoints_at): Declare.
11464 (uninsert_breakpoint): Delete declaration.
11465 (uninsert_breakpoints_at): Declare.
11466 (check_breakpoints): Adjust prototype.
11467 * server.h: Adjust include order.
11468 (struct thread_info): Declare here. Add a `last_status' field.
11469
11470 2010-03-23 Michael Snyder <msnyder@vmware.com>
11471
11472 * server.c (crc32): New function.
11473 (handle_query): Add handling for 'qCRC:' request.
11474
11475 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11476
11477 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11478 lwp had been stopped by a watchpoint.
11479
11480 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11481
11482 * server.h (internal_error): Declare.
11483 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11484 * utils.c (internal_error): New function.
11485
11486 2010-03-15 Andreas Schwab <schwab@redhat.com>
11487
11488 * configure.srv: Fix typo setting srv_regobj.
11489
11490 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11491
11492 * linux-low.c (fetch_register): Avoid passing a non string literal
11493 format to `error'.
11494 (usr_store_inferior_registers): Ditto.
11495
11496 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11497
11498 * linux-low.c (linux_write_memory): Bail out early if peeking
11499 memory failed.
11500
11501 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11502
11503 * linux-low.h (struct lwp_info): New fields
11504 `stopped_by_watchpoint' and `stopped_data_address'.
11505 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11506 here, and cache them in the lwp object.
11507 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11508 directly.
11509 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11510 field.
11511 (linux_stopped_by_watchpoint): Rewrite.
11512 (linux_stopped_data_address): Rewrite.
11513
11514 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11515
11516 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11517 switching the current inferior, not before.
11518
11519 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11520
11521 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11522 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11523 i386-linux.c and amd64-linux.c.
11524 (reg-i386.o): Removed.
11525 (reg-i386.c): Likewise.
11526 (reg-i386-linux.o): Likewise.
11527 (reg-i386-linux.c): Likewise.
11528 (reg-x86-64.o): Likewise.
11529 (reg-x86-64.c): Likewise.
11530 (reg-x86-64-linux.o): Likewise.
11531 (reg-x86-64-linux.c): Likewise.
11532 (i386.o): New.
11533 (i386.c): Likewise.
11534 (i386-linux.o): Likewise.
11535 (i386-linux.c): Likewise.
11536 (amd64.o): Likewise.
11537 (amd64.c): Likewise.
11538 (amd64-linux.o): Likewise.
11539 (amd64-linux.c): Likewise.
11540
11541 * configure.srv (srv_i386_regobj): New.
11542 (srv_i386_linux_regobj): Likewise.
11543 (srv_amd64_regobj): Likewise.
11544 (srv_amd64_linux_regobj): Likewise.
11545 (srv_i386_32bit_xmlfiles): Likewise.
11546 (srv_i386_64bit_xmlfiles): Likewise.
11547 (srv_i386_xmlfiles): Likewise.
11548 (srv_amd64_xmlfiles): Likewise.
11549 (srv_i386_linux_xmlfiles): Likewise.
11550 (srv_amd64_linux_xmlfiles): Likewise.
11551 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11552 srv_xmlfiles to $srv_i386_xmlfiles.
11553 (i[34567]86-*-mingw32ce*): Likewise.
11554 (i[34567]86-*-mingw*): Likewise.
11555 (i[34567]86-*-nto*): Likewise.
11556 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11557 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11558 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11559 (x86_64-*-linux*): Likewise.
11560
11561 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11562 (init_registers_amd64_linux): New.
11563 (x86_arch_setup): Replace init_registers_x86_64_linux with
11564 init_registers_amd64_linux.
11565
11566 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11567
11568 * configure.ac: Check for libdl. If it is not available link against
11569 static libthread_db.
11570 * configure: Regenerate.
11571
11572 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11573
11574 PR9605
11575
11576 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11577 handing a read watchpoint.
11578 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11579
11580 2010-02-12 Doug Evans <dje@google.com>
11581
11582 * linux-low.c (linux_supports_tracefork_flag): Document.
11583 (linux_look_up_symbols): Add comment.
11584
11585 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11586
11587 * regcache.c (supply_register): Clear regcache if buf is NULL.
11588
11589 2010-02-02 Nicolas Roche <roche@sourceware.org>
11590 Joel Brobecker <brobecker@adacore.com>
11591
11592 * inferiors.c (find_inferior): Add function documentation.
11593 (unloaded_dll): Handle the case where the unloaded dll has not
11594 been previously registered in the dll list.
11595
11596 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11597
11598 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11599 (thumb2_breakpoint): New.
11600 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11601
11602 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11603
11604 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11605 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11606 breakpoints.
11607
11608 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11609
11610 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11611
11612 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11613
11614 * linux-s390-low.c (s390_collect_ptrace_register)
11615 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11616
11617 2010-01-21 Doug Evans <dje@google.com>
11618
11619 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11620 (PTRACE_ARG4_TYPE): New macro.
11621 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11622 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11623 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11624 (usr_store_inferior_registers): Ditto.
11625 (linux_read_memory, linux_write_memory): Ditto.
11626 (linux_test_for_tracefork): Ditto.
11627
11628 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11629 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11630
11631 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11632
11633 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11634 target.
11635
11636 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11637
11638 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11639 prototype to take a regcache. Adjust.
11640
11641 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11642
11643 * regcache.h (struct thread_info): Forward declare.
11644 (struct regcache): New.
11645 (new_register_cache): Adjust prototype.
11646 (get_thread_regcache): Declare.
11647 (free_register_cache): Adjust prototype.
11648 (registers_to_string, registers_from_string): Ditto.
11649 (supply_register, supply_register_by_name, collect_register)
11650 (collect_register_as_string, collect_register_by_name): Ditto.
11651 * regcache.c (struct inferior_regcache_data): Delete.
11652 (get_regcache): Rename to ...
11653 (get_thread_regcache): ... this. Adjust. Switch inferior before
11654 fetching registers.
11655 (regcache_invalidate_one): Adjust.
11656 (regcache_invalidate): Fix prototype.
11657 (new_register_cache): Return the new register cache.
11658 (free_register_cache): Change prototype.
11659 (realloc_register_cache): Adjust.
11660 (registers_to_string): Change prototype to take a regcache. Adjust.
11661 (registers_from_string): Ditto.
11662 (register_data): Ditto.
11663 (supply_register): Ditto.
11664 (supply_register_by_name): Ditto.
11665 (collect_register): Ditto.
11666 (collect_register_as_string): Ditto.
11667 (collect_register_by_name): Ditto.
11668 * server.c (process_serial_event): Adjust.
11669 * linux-low.h (regset_fill_func, regset_store_func): Change
11670 prototype.
11671 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11672 Change prototype.
11673 * linux-low.c (get_stop_pc): Adjust.
11674 (check_removed_breakpoint): Adjust.
11675 (linux_wait_for_event): Adjust.
11676 (linux_resume_one_lwp): Adjust.
11677 (fetch_register): Add regcache parameter. Adjust.
11678 (usr_store_inferior_registers): Ditto.
11679 (regsets_fetch_inferior_registers): Ditto.
11680 (regsets_store_inferior_registers): Ditto.
11681 (linux_fetch_registers, linux_store_registers): Ditto.
11682 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11683 regcache. Adjust.
11684 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11685 Ditto.
11686 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11687 prototype to take a regcache.
11688 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11689 * remote-utils.c (convert_ascii_to_int, outreg)
11690 (prepare_resume_reply): Change prototype to take a regcache.
11691 Adjust.
11692 * target.h (struct target_ops) <fetch_registers, store_registers>:
11693 Change prototype to take a regcache.
11694 (fetch_inferior_registers, store_inferior_registers): Change
11695 prototype to take a regcache. Adjust.
11696 * proc-service.c (ps_lgetregs): Adjust.
11697 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11698 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11699 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11700 take a regcache. Adjust.
11701 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11702 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11703 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11704 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11705 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11706 (cris_cannot_fetch_register):
11707 (cris_breakpoint_at): Change prototype to take a regcache.
11708 Adjust.
11709 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11710 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11711 to take a regcache. Adjust.
11712 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11713 Adjust.
11714 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11715 take a regcache. Adjust.
11716 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11717 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11718 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11719 * linux-mips-low.c (mips_get_pc):
11720 (mips_set_pc): Change prototype to take a regcache. Adjust.
11721 (mips_reinsert_addr): Adjust.
11722 (mips_collect_register): Change prototype to take a regcache.
11723 Adjust.
11724 (mips_supply_register):
11725 (mips_collect_register_32bit, mips_supply_register_32bit)
11726 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11727 (mips_store_fpregset): Ditto.
11728 * linux-ppc-low.c (ppc_supply_ptrace_register)
11729 (ppc_supply_ptrace_register): Ditto.
11730 (parse_spufs_run): Adjust.
11731 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11732 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11733 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11734 take a regcache. Adjust.
11735 * linux-s390-low.c (s390_collect_ptrace_register)
11736 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11737 (s390_set_pc): Change prototype to take a regcache. Adjust.
11738 (s390_arch_setup): Adjust.
11739 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11740 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11741 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11742 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11743 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11744 regcache. Adjust.
11745 (sparc_breakpoint_at): Adjust.
11746 * linux-xtensa-low.c (xtensa_fill_gregset):
11747 (xtensa_store_gregset):
11748 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11749 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11750 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11751 prototype to take a regcache. Adjust.
11752 * win32-arm-low.c (arm_fetch_inferior_register)
11753 (arm_store_inferior_register): Change prototype to take a
11754 regcache. Adjust.
11755 * win32-i386-low.c (i386_fetch_inferior_register)
11756 (i386_store_inferior_register): Change prototype to take a
11757 regcache. Adjust.
11758 * win32-low.c (child_fetch_inferior_registers)
11759 (child_store_inferior_registers): Change prototype to take a
11760 regcache. Adjust.
11761 (win32_wait): Adjust.
11762 (win32_fetch_inferior_registers): Change prototype to take a
11763 regcache. Adjust.
11764 (win32_store_inferior_registers): Adjust.
11765 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11766 store_inferior_register>: Change prototype to take a regcache.
11767
11768 2010-01-20 Doug Evans <dje@google.com>
11769
11770 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11771 #ifdef.
11772 (linux_wait_for_event1, linux_init_signals): Ditto.
11773 (W_STOPCODE): Provide definition if missing.
11774
11775 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11776
11777 * linux-low.c (linux_core_of_thread): New.
11778 (compare_ints, show_process, list_threads): New.
11779 (linux_qxfer_osdata): Report threads and cores.
11780 (linux_target_op): Register linux_core_of_thread.
11781 * remote-utils.c (prepare_resume_reply): Report the core.
11782 (buffer_xml_printf): Support %d specifier.
11783 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11784 New.
11785 (handle_query): Handle qXfer:threads. Announce availability
11786 thereof.
11787 * target.h (struct target_ops): New field core_of_thread.
11788
11789 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11790
11791 * Makefile.in (clean): Remove new generated files.
11792 (reg-s390.o, reg-s390.c): Remove rules.
11793 (reg-s390x.o, reg-s390x.c): Likewise.
11794 (s390-linux32.o, s390-linux32.c): Add rules.
11795 (s390-linux64.o, s390-linux64.c): Likewise.
11796 (s390x-linux64.o, s390x-linux64.c): Likewise.
11797 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11798 * linux-s390-low.c: Include <elf.h>.
11799 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11800 (init_registers_s390): Remove prototype.
11801 (init_registers_s390x): Likewise.
11802 (init_registers_s390_linux32): Add prototype.
11803 (init_registers_s390_linux64): Likewise.
11804 (init_registers_s390x_linux64): Likewise.
11805 (s390_num_regs_3264): New define.
11806 (s390_regmap_3264): New global variable.
11807 (s390_cannot_fetch_register): Remove obsolete check.
11808 (s390_cannot_store_register): Likewise.
11809 (s390_collect_ptrace_register): Handle upper/lower register halves.
11810 (s390_supply_ptrace_register): Likewise.
11811 (s390_fill_gregset): Update to register number changes.
11812 (s390_get_hwcap): New routine.
11813 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11814 Install appropriate regmap and register set.
11815
11816 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11817
11818 * server.c (gdbserver_version): Update copyright year to 2010.
11819 * gdbreplay.c (gdbreplay_version): Likewise.
11820
11821 2009-12-28 Doug Evans <dje@google.com>
11822
11823 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11824 elf/external.h. Include <elf.h> instead but only if necessary.
11825
11826 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11827
11828 * linux-low.c (linux_remove_process): Remove `detaching'
11829 parameter. Don't release/detach from thread_db here.
11830 (linux_kill): Release/detach from thread_db here, ...
11831 (linux_detach): ... and here, before actually detaching.
11832 (linux_wait_1): ... and here, when a process exits.
11833 * thread-db.c (any_thread_of): New.
11834 (thread_db_free): Switch the current inferior to a thread of the
11835 passed in process.
11836
11837 2009-12-21 Doug Evans <dje@google.com>
11838
11839 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11840
11841 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11842 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11843 warning ifndef __NR_tkill. Move setting of errno there too.
11844 Delete unnecessary resetting of errno after syscall.
11845 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11846
11847 * configure.ac: Check for dladdr.
11848 * config.in: Regenerate.
11849 * configure: Regenerate.
11850 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11851 (try_thread_db_load): Update.
11852
11853 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11854
11855 2009-12-18 Doug Evans <dje@google.com>
11856
11857 * event-loop.c: Include unistd.h if it exists.
11858
11859 * linux-low.c (my_waitpid): Move definition away from being in
11860 between linux_tracefork_child/linux_test_for_tracefork.
11861
11862 * gdb_proc_service.h (psaddr_t): Fix type.
11863 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11864 signature to match glibc.
11865
11866 2009-12-16 Doug Evans <dje@google.com>
11867
11868 * linux-low.c (linux_read_memory): Fix argument to read.
11869
11870 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11871
11872 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11873 events, don't leave current_inferior pointing at null.
11874
11875 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11876
11877 * win32-low.c (LOG): Delete.
11878 (OUTMSG): Output to stderr.
11879 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11880 on compile time LOG macro.
11881 (win32_wait): Fix debug output.
11882
11883 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11884
11885 * win32-low.c (win32_add_one_solib): If the dll name is
11886 "ntdll.dll", prepend the system directory to the dll path.
11887
11888 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11889
11890 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11891
11892 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11893 Vladimir Prus <vladimir@codesourcery.com>
11894
11895 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11896 * configure.ac: Check for __mcoldfire__ and set
11897 gdb_cv_m68k_is_coldfire.
11898 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11899 reg-cf.o and reg-m68k.o.
11900 * configure: Regenerated.
11901
11902 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11903
11904 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11905 Pass it to thread_db_free.
11906 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11907 proper `detaching' argument to linux_remove_process.
11908 * linux-low.h (thread_db_free): Add `detaching' parameter.
11909 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11910 to thread_db_free.
11911 (thread_db_free): Add `detaching' parameter. Only
11912 call td_ta_clear_event if detaching from process.
11913
11914 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11915
11916 * thread-db.c (thread_db_free): Fix typo.
11917
11918 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11919
11920 PR gdb/10838
11921 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11922
11923 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11924
11925 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11926 with an i686 compiler.
11927 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11928 needed.
11929 * configure: Rebuilt.
11930
11931 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11932
11933 PR gdb/10783
11934
11935 * server.c (handle_search_memory_1): Correct read_addr initialization
11936 in loop for searching subsequent chunks.
11937
11938 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11939
11940 * configure.ac: New --with-libthread-db option.
11941 * thread-db.c: Allow direct dependence on libthread_db.
11942 (thread_db_free): Adjust.
11943 * config.in: Regenerate.
11944 * configure: Likewise.
11945
11946 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11947
11948 PR gdb/10757
11949 * thread-db.c (attach_thread): New function.
11950 (maybe_attach_thread): Return success/failure.
11951 (find_new_threads_callback): Adjust.
11952 (thread_db_find_new_threads): Loop until no new threads.
11953
11954 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11955
11956 * proc-service.c (ps_lgetregs): Formatting.
11957
11958 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11959
11960 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11961 * configure.ac: Adjust.
11962 * linux-low.h (struct process_info_private): Move members to struct
11963 thread_db.
11964 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11965 * linux-low.c (linux_remove_process): Adjust.
11966 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11967 * server.c (handle_query): Move code ...
11968 (handle_monitor_command): ... here. New function.
11969 * target.h (struct target_ops): New member.
11970 * thread-db.c (struct thread_db): New.
11971 (libthread_db_search_path): New variable.
11972 (thread_db_create_event, thread_db_enable_reporting)
11973 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11974 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11975 (try_thread_db_load_1, dladdr_to_soname): New functions.
11976 (try_thread_db_load, thread_db_load_search): New functions.
11977 (thread_db_init): Search for libthread_db.
11978 (thread_db_free): New function.
11979 (thread_db_handle_monitor_command): Likewise.
11980 * config.in: Regenerate.
11981 * configure: Regenerate.
11982
11983 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11984
11985 * spu-low.c (spu_kill): Wait for inferior to terminate.
11986 Call clear_inferiors.
11987 (spu_detach): Call clear_inferiors.
11988
11989 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11990
11991 * aclocal.m4: Regenerate.
11992 * config.in: Likewise.
11993 * configure: Likewise.
11994
11995 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11996
11997 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11998 (parse_spufs_run): New function.
11999 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12000 (ppc_breakpoint_at): Handle SPU breakpoints.
12001
12002 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12003
12004 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12005 (SPUFS_MAGIC): Define.
12006 (spu_enumerate_spu_ids): New function.
12007 (linux_qxfer_spu): New function.
12008 (linux_target_ops): Install linux_qxfer_spu.
12009
12010 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12011
12012 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12013 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12014 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12015 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12016 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12017 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12018 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12019 (init_registers_powerpc_cell32l): Add prototype.
12020 (init_registers_powerpc_cell64l): Likewise.
12021 (ppc_arch_setup): Detect Cell/B.E. architecture.
12022
12023 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12024
12025 * Makefile.in (datarootdir): New variable.
12026
12027 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12028
12029 * linux-low.c (linux_write_memory): Update debugging output.
12030 * Makefile.in (clean): Add new descriptions.
12031 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12032 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12033 * configure.srv: Add new files for arm*-*-linux*.
12034 * linux-arm-low.c: Add new declarations.
12035 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12036 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12037 (HWCAP_VFPv3D16): New.
12038 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12039 instead of __IWMMXT__.
12040 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12041 (arm_arch_setup): New.
12042 (target_regsets): Remove #ifdef. Add VFP regset.
12043 (the_low_target): Use arm_arch_setup.
12044
12045 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12046
12047 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12048 the main thread again.
12049
12050 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12051
12052 Adding Neutrino gdbserver.
12053 * configure: Regenerated.
12054 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12055 * configure.srv (i[34567]86-*-nto*): New target.
12056 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12057 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12058 (nto_comctrl) [__QNX__]: New function.
12059 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12060
12061 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12062
12063 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12064 srv_tgtobj.
12065
12066 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12067 Pedro Alves <pedro@codesourcery.com>
12068
12069 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12070 don't support CONTEXT_EXTENDED_REGISTERS.
12071 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12072 (the_low_target): Install them.
12073 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12074 failing with ERROR_PIPE_NOT_CONNECTED.
12075
12076 2009-06-30 Doug Evans <dje@google.com>
12077 Pierre Muller <muller@ics.u-strasbg.fr>
12078
12079 Add h/w watchpoint support to x86-linux, win32-i386.
12080 * Makefile.in (SFILES): Add i386-low.c
12081 (i386_low_h): Define.
12082 (i386-low.o): Add dependencies.
12083 (linux-x86-low.o): Add i386-low.h dependency.
12084 (win32-i386-low.o): Ditto.
12085 * i386-low.c: New file.
12086 * i386-low.h: New file.
12087 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12088 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12089 * linux-low.c (linux_add_process): Initialize arch_private.
12090 (linux_remove_process): Free arch_private.
12091 (add_lwp): Initialize arch_private.
12092 (delete_lwp): Free arch_private.
12093 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12094 provided.
12095 * linux-low.h (process_info_private): New member arch_private.
12096 (lwp_info): New member arch_private.
12097 (linux_target_ops): New members new_process, new_thread,
12098 prepare_to_resume.
12099 (ptid_of): New macro.
12100 * linux-x86-low.c: Include stddef.h, i386-low.h.
12101 (arch_process_info): New struct.
12102 (arch_lwp_info): New struct.
12103 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12104 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12105 (i386_dr_low_get_status): New function.
12106 (x86_insert_point, x86_remove_point): New functions.
12107 (x86_stopped_by_watchpoint): New function.
12108 (x86_stopped_data_address): New function.
12109 (x86_linux_new_process, x86_linux_new_thread): New functions.
12110 (x86_linux_prepare_to_resume): New function.
12111 (the_low_target): Add entries for insert_point, remove_point,
12112 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12113 prepare_to_resume.
12114 * server.c (debug_hw_points): New global.
12115 (monitor_show_help): Document set debug-hw-points.
12116 (handle_query): Process "set debug-hw-points".
12117 * server.h (debug_hw_points): Declare.
12118 (paddress): Declare.
12119 * utils.c (NUMCELLS, CELLSIZE): New macros.
12120 (get_sell, xsnprintf, paddress): New functions.
12121 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12122 remove_point, stopped_by_watchpoint, stopped_data_address.
12123 * win32-i386-low.c: Include i386-low.h.
12124 (debug_reg_state): Replaces dr.
12125 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12126 (i386_dr_low_get_status): New function.
12127 (i386_insert_point, i386_remove_point): New functions.
12128 (i386_stopped_by_watchpoint): New function.
12129 (i386_stopped_data_address): New function.
12130 (i386_initial_stuff): Update.
12131 (get_thread_context,set_thread_context,i386_thread_added): Update.
12132 (the_low_target): Add entries for insert_point,
12133 remove_point, stopped_by_watchpoint, stopped_data_address.
12134 * win32-low.c (win32_insert_watchpoint): New function.
12135 (win32_remove_watchpoint): New function.
12136 (win32_stopped_by_watchpoint): New function.
12137 (win32_stopped_data_address): New function.
12138 (win32_target_ops): Add entries for insert_watchpoint,
12139 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12140 * win32-low.h (win32_target_ops): New members insert_point,
12141 remove_point, stopped_by_watchpoint, stopped_data_address.
12142
12143 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12144
12145 * server.c (process_serial_event): Re-return unsupported, not
12146 error, if the type isn't recognized. Re-allow supporting only
12147 insert or remove packets. Also call require_running for
12148 breakpoints. Add missing break statement to default case. Tidy.
12149 * target.h (struct target_ops): Rename insert_watchpoint to
12150 insert_point, and remove_watchpoint to remove_point.
12151
12152 * linux-low.h (struct linux_target_ops): Likewise.
12153 * linux-low.c (linux_insert_watchpoint): Rename to ...
12154 (linux_insert_point): ... this. Adjust.
12155 (linux_remove_watchpoint): Rename to ...
12156 (linux_remove_point): ... this. Adjust.
12157 (linux_target_ops): Adjust.
12158 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12159 (cris_insert_point): ... this.
12160 (cris_remove_watchpoint): Rename to ...
12161 (cris_remove_point): ... this.
12162 (the_low_target): Adjust.
12163
12164 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12165
12166 * server.c (handle_v_kill): Pass signal_pid to
12167 kill_inferior if multi_process is zero.
12168
12169 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12170
12171 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12172 * target.h (target_ops): Comment for *_watchpoint to make it clear
12173 the functions can get types '0' and '1'.
12174
12175 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12176
12177 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12178 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12179 * regcache.c (get_regcache): Likewise.
12180 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12181 * win32-low.c (child_fetch_inferior_registers): Remove check for
12182 regno 0.
12183
12184 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12185 Pedro Alves <pedro@codesourcery.com>
12186
12187 * target.h (struct target_ops) <supports_multi_process>: New
12188 callback.
12189 (target_supports_multi_process): New.
12190 * server.c (handle_query): Even if GDB reports support, only
12191 enable multi-process if the target also supports it. Report
12192 multi-process support only if the target backend supports it.
12193 * linux-low.c (linux_supports_multi_process): New function.
12194 (linux_target_ops): Install it as target_supports_multi_process
12195 callback.
12196
12197 2009-05-24 Doug Evans <dje@google.com>
12198
12199 Global renaming of find_thread_pid to find_thread_ptid.
12200 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12201 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12202 All callers updated.
12203
12204 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12205 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12206 directly.
12207
12208 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12209 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12210 (linux_resume_one_lwp): Ditto.
12211
12212 2009-05-23 Doug Evans <dje@google.com>
12213
12214 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12215 from struct inferior_list_entry * to struct lwp_info *.
12216 All callers updated.
12217
12218 2009-05-13 Doug Evans <dje@google.com>
12219
12220 * linux-x86-low.c: Don't include assert.h.
12221 (x86_siginfo_fixup): Use fatal, not assert.
12222 (x86_arch_setup): Fix comment.
12223
12224 2009-05-12 Doug Evans <dje@google.com>
12225
12226 Biarch support for i386/amd64 gdbserver.
12227 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12228 Add linux-x86-low.c.
12229 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12230 (linux-x86-low.o): Add.
12231 * linux-x86-64-low.c: Delete.
12232 * linux-i386-low.c: Delete.
12233 * linux-x86-low.c: New file.
12234 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12235 linux-x86-low.o.
12236 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12237 linux-x86-low.o.
12238 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12239 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12240 (linux_child_pid_to_exec_file): New function.
12241 (elf_64_header_p, elf_64_file_p): New functions.
12242 (siginfo_fixup): New function.
12243 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12244 give target a chance to convert layout.
12245 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12246 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12247
12248 2009-05-07 Doug Evans <dje@google.com>
12249
12250 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12251 (regsets_store_inferior_registers): Ditto.
12252
12253 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12254
12255 PR server/10048
12256
12257 * linux-low.c (must_set_ptrace_flags): Delete.
12258 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12259 of the global.
12260 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12261 `lwp->must_set_ptrace_flags' instead.
12262 (linux_wait_for_event_1): Set ptrace options here.
12263 (linux_wait_1): ... not here.
12264
12265 2009-04-30 Doug Evans <dje@google.com>
12266
12267 * inferiors.c (started_inferior_callback): New function.
12268 (attached_inferior_callback): New function.
12269 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12270 * server.c (print_started_pid, print_attached_pid): New functions.
12271 (detach_or_kill_for_exit): New function.
12272 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12273 * server.h (have_started_inferiors_p): Declare.
12274 (have_attached_inferiors_p): Declare.
12275
12276 * inferiors.c (remove_process): Fix memory leak, free process.
12277 * linux-low.c (linux_remove_process): New function.
12278 (linux_kill): Call it instead of remove_process.
12279 (linux_detach, linux_wait_1): Ditto.
12280
12281 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12282
12283 * configure.srv: Add x86 Windows CE target.
12284
12285 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12286
12287 * inferiors.c (get_thread_process): Make global.
12288 * server.h (get_thread_process): Add prototype.
12289 * thread-db.c (find_one_thread): Use get_thread_process
12290 instead of current_process.
12291 (thread_db_get_tls_address): Do not crash if called when
12292 thread layer is not yet initialized.
12293
12294 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12295
12296 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12297 * spu-low.c (current_tid): Rename to ...
12298 (current_ptid): ... this.
12299 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12300 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12301 ptid_get_lwp (current_ptid) instead of current_tid.
12302 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12303 instead of current_tid. Use find_process_pid to verify pid
12304 argument is valid. Pass proper argument to remove_process.
12305 (spu_thread_alive): Compare current_ptid instead of current_tid.
12306 (spu_resume): Likewise.
12307
12308 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12309
12310 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12311 variable.
12312
12313 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12314
12315 Implement the multiprocess extensions, and add linux multiprocess
12316 support.
12317
12318 * server.h (ULONGEST): Declare.
12319 (struct ptid, ptid_t): New.
12320 (minus_one_ptid, null_ptid): Declare.
12321 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12322 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12323 (struct inferior_list_entry): Change `id' type from unsigned from
12324 to ptid_t.
12325 (struct sym_cache, struct breakpoint, struct
12326 process_info_private): Forward declare.
12327 (struct process_info): Declare.
12328 (current_process): Declare.
12329 (all_processes): Declare.
12330 (initialize_inferiors): Declare.
12331 (add_thread): Adjust to use ptid_t.
12332 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12333 (add_process, remove_process, find_thread_pid): Declare.
12334 (find_inferior_id): Adjust to use ptid_t.
12335 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12336 (multi_process): Declare.
12337 (push_event): Adjust to use ptid_t.
12338 (read_ptid, write_ptid): Declare.
12339 (prepare_resume_reply): Adjust to use ptid_t.
12340 (clear_symbol_cache): Declare.
12341 * inferiors.c (all_processes): New.
12342 (null_ptid, minus_one_ptid): New.
12343 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12344 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12345 (add_thread): Change unsigned long to ptid. Remove gdb_id
12346 parameter. Adjust.
12347 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12348 (gdb_id_to_thread): Rename to ...
12349 (find_thread_pid): ... this. Change unsigned long to ptid.
12350 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12351 (loaded_dll, pull_pid_from_list): Adjust.
12352 (add_process, remove_process, find_process_pid)
12353 (get_thread_process, current_process, initialize_inferiors): New.
12354 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12355 (struct target_waitstatus) <related_pid>: Ditto.
12356 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12357 return type to int.
12358 (struct target_ops) <join>: Add `pid' argument.
12359 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12360 (struct target_ops) <wait>: Add `ptid' field. Change return type
12361 to ptid.
12362 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12363 (mywait): Add `ptid' argument. Change return type to ptid_t.
12364 (target_pid_to_str): Declare.
12365 * target.c (set_desired_inferior): Adjust to use ptids.
12366 (mywait): Add new `ptid' argument. Adjust.
12367 (target_pid_to_str): New.
12368 * mem-break.h (free_all_breakpoints): Declare.
12369 * mem-break.c (breakpoints): Delelete.
12370 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12371 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12372 to use per-process breakpoint list.
12373 (free_all_breakpoints): New.
12374 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12375 (symbol_cache, all_symbols_looked_up): Delete.
12376 (hexchars): New.
12377 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12378 read_ptid): New.
12379 (prepare_resume_reply): Change ptid argument's type from unsigned
12380 long to ptid_t. Adjust. Implement W;process and X;process.
12381 (free_sym_cache, clear_symbol_cache): New.
12382 (look_up_one_symbol): Adjust to per-process symbol cache. *
12383 * server.c (cont_thread, general_thread, step_thread): Change type
12384 to ptid_t.
12385 (attached): Delete.
12386 (multi_process): New.
12387 (last_ptid): Change type to ptid_t.
12388 (struct vstop_notif) <ptid>: Change type to ptid_t.
12389 (queue_stop_reply, push_event): Change `ptid' argument's type to
12390 ptid_t.
12391 (discard_queued_stop_replies): Add `pid' argument.
12392 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12393 changes. Don't reference the `attached' global.
12394 (attach_inferior): Adjust to mywait interface changes.
12395 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12396 features. Handle and report "multiprocess+". Handle
12397 "qAttached:PID".
12398 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12399 changes.
12400 (handle_v_kill): New.
12401 (handle_v_stopped): Adjust to use target_pid_to_str.
12402 (handle_v_requests): Allow multiple attaches and runs when
12403 multiprocess extensions are in effect. Handle "vKill".
12404 (myresume): Adjust to use ptids.
12405 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12406 (handle_status): Adjust to discard_queued_stop_replies interface
12407 change.
12408 (first_thread_of, kill_inferior_callback)
12409 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12410 (main): Call initialize_inferiors. Adjust to use ptids, killing
12411 and detaching from all inferiors. Handle multiprocess packet
12412 variants.
12413 * linux-low.h: Include gdb_proc_service.h.
12414 (struct process_info_private): New.
12415 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12416 <lwpid_of>: Use ptid_get_lwp.
12417 (get_lwp_thread): Adjust.
12418 (struct lwp_info): Add `dead' member.
12419 (find_lwp_pid): Declare.
12420 * linux-low.c (thread_db_active): Delete.
12421 (new_inferior): Adjust comment.
12422 (inferior_pid): Delete.
12423 (linux_add_process): New.
12424 (handle_extended_wait): Adjust.
12425 (add_lwp): Change unsigned long to ptid.
12426 (linux_create_inferior): Add process to processes table. Adjust
12427 to use ptids. Don't set new_inferior here.
12428 (linux_attach_lwp): Rename to ...
12429 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12430 it. Adjust to use ptids.
12431 (linux_attach_lwp): New.
12432 (linux_attach): Add process to processes table. Don't set
12433 new_inferior here.
12434 (struct counter): New.
12435 (second_thread_of_pid_p, last_thread_of_process_p): New.
12436 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12437 multiple processes.
12438 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12439 processes. Remove process from process table.
12440 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12441 to multiple processes.
12442 (any_thread_of): New.
12443 (linux_detach): Add `pid' argument, and handle it. Remove process
12444 from processes table.
12445 (linux_join): Add `pid' argument. Handle it.
12446 (linux_thread_alive): Change unsighed long argument to ptid_t.
12447 Consider dead lwps as not being alive.
12448 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12449 threads we're not interested in.
12450 (same_lwp, find_lwp_pid): New.
12451 (linux_wait_for_lwp): Change `pid' argument's type from int to
12452 ptid_t. Adjust.
12453 (linux_wait_for_event): Rename to ...
12454 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12455 from int to ptid_t. Adjust.
12456 (linux_wait_for_event): New.
12457 (linux_wait_1): Add `ptid' argument. Change return type to
12458 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12459 that exit from the process table.
12460 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12461 Adjust.
12462 (mark_lwp_dead): New.
12463 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12464 stopping all threads, mark its main lwp as dead.
12465 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12466 ptids.
12467 (fetch_register, usr_store_inferior_registers)
12468 (regsets_fetch_inferior_registers)
12469 (regsets_store_inferior_registers, linux_read_memory)
12470 (linux_write_memory): Inline `inferior_pid'.
12471 (linux_look_up_symbols): Adjust to use per-process
12472 `thread_db_active'.
12473 (linux_request_interrupt): Adjust to use ptids.
12474 (linux_read_auxv): Inline `inferior_pid'.
12475 (initialize_low): Don't reference thread_db_active.
12476 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12477 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12478 (ps_getpid): Return the pid of the current inferior.
12479 * thread-db.c (proc_handle, thread_agent): Delete.
12480 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12481 per-process data.
12482 (find_one_thread): Change argument type to ptid_t. Adjust to
12483 per-process data.
12484 (maybe_attach_thread): Adjust to per-process data and ptids.
12485 (thread_db_find_new_threads): Ditto.
12486 (thread_db_init): Ditto.
12487 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12488 processes table. Adjust to use ptids.
12489 (spu_kill, spu_detach): Adjust interface. Remove process from
12490 processes table.
12491 (spu_join, spu_thread_alive): Adjust interface.
12492 (spu_wait): Adjust interface. Remove process from processes
12493 table. Adjust to use ptids.
12494 * win32-low.c (current_inferior_tid): Delete.
12495 (current_inferior_ptid): New.
12496 (debug_event_ptid): New.
12497 (thread_rec): Take a ptid. Adjust.
12498 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12499 (child_delete_thread): Ditto.
12500 (do_initial_child_stuff): Add `attached' argument. Add process to
12501 processes table.
12502 (child_fetch_inferior_registers, child_store_inferior_registers):
12503 Adjust.
12504 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12505 (win32_attach): Pass 1 to do_initial_child_stuff.
12506 (win32_kill): Adjust interface. Remove process from processes
12507 table.
12508 (win32_detach): Ditto.
12509 (win32_join): Adjust interface.
12510 (win32_thread_alive): Take a ptid.
12511 (win32_resume): Adjust to use ptids.
12512 (get_child_debug_event): Ditto.
12513 (win32_wait): Adjust interface. Remove exiting process from
12514 processes table.
12515
12516 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12517
12518 Non-stop mode support.
12519
12520 * server.h (non_stop): Declare.
12521 (gdb_client_data, handler_func): Declare.
12522 (delete_file_handler, add_file_handler, start_event_loop):
12523 Declare.
12524 (handle_serial_event, handle_target_event, push_event)
12525 (putpkt_notif): Declare.
12526 * target.h (enum resume_kind): New.
12527 (struct thread_resume): Replace `step' field by `kind' field.
12528 (TARGET_WNOHANG): Define.
12529 (struct target_ops) <wait>: Add `options' argument.
12530 <supports_non_stop, async, start_non_stop>: New fields.
12531 (target_supports_non_stop, target_async): New.
12532 (start_non_stop): Declare.
12533 (mywait): Add `options' argument.
12534 * target.c (mywait): Add `options' argument. Print child exit
12535 notifications here.
12536 (start_non_stop): New.
12537 * server.c (non_stop, own_buf, mem_buf): New globals.
12538 (struct vstop_notif): New.
12539 (notif_queue): New global.
12540 (queue_stop_reply, push_event, discard_queued_stop_replies)
12541 (send_next_stop_reply): New.
12542 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12543 interface changes.
12544 (attach_inferior): In non-stop mode, don't wait for the target
12545 here.
12546 (handle_general_set): Handle QNonStop.
12547 (handle_query): When handling qC, return the current general
12548 thread, instead of the first thread of the list.
12549 (handle_query): If the backend supports non-stop mode, include
12550 QNonStop+ in the qSupported query response.
12551 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12552 and non-stop mode.
12553 (handle_v_attach, handle_v_run): Handle non-stop mode.
12554 (handle_v_stopped): New.
12555 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12556 (myresume): Adjust to use resume_kind. Handle non-stop.
12557 (queue_stop_reply_callback): New.
12558 (handle_status): Handle non-stop mode.
12559 (main): Clear non_stop flag on reconnection. Use the event-loop.
12560 Refactor serial protocol handling from here ...
12561 (process_serial_event): ... to this new function. When GDB
12562 selects any thread, select one here. In non-stop mode, wait until
12563 GDB acks all pending events before exiting.
12564 (handle_serial_event, handle_target_event): New.
12565 * remote-utils.c (remote_open): Install remote_desc in the event
12566 loop.
12567 (remote_close): Remove remote_desc from the event loop.
12568 (putpkt_binary): Rename to...
12569 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12570 (putpkt_binary): New as wrapper around putpkt_binary_1.
12571 (putpkt_notif): New.
12572 (prepare_resume_reply): In non-stop mode, don't change the
12573 general_thread.
12574 * event-loop.c: New.
12575 * Makefile.in (OBJ): Add event-loop.o.
12576 (event-loop.o): New rule.
12577
12578 * linux-low.h (pid_of): Moved here.
12579 (lwpid_of): New.
12580 (get_lwp_thread): Use lwpid_of.
12581 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12582 * linux-low.c (pid_of): Delete.
12583 (inferior_pid): Use lwpid_of.
12584 (linux_event_pipe): New.
12585 (target_is_async_p): New.
12586 (delete_lwp): New.
12587 (handle_extended_wait): Use lwpid_of.
12588 (add_lwp): Don't set lwpid field.
12589 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12590 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12591 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12592 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12593 first. Adjust to linux_wait_for_event interface changes. Use
12594 lwpid_of.
12595 (linux_detach): Don't delete the main lwp here.
12596 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12597 (status_pending_p): Don't consider explicitly suspended lwps.
12598 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12599 pointer. Add OPTIONS argument. Change return type to int. Use
12600 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12601 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12602 pointer. Add status pointer argument. Return a pid instead of a
12603 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12604 changes. In non-stop mode, don't switch to a random thread.
12605 (linux_wait): Rename to...
12606 (linux_wait_1): ... this. Add target_options argument, and handle
12607 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12608 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12609 clean exit and signal exit code. Don't stop all threads in
12610 non-stop mode. In all-stop mode, only stop all threads when
12611 reporting a stop to GDB. Handle explicit thread stop requests.
12612 (async_file_flush, async_file_mark): New.
12613 (linux_wait): New.
12614 (send_sigstop): Use lwpid_of.
12615 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12616 interface changes. In non-stop mode, don't switch to a random
12617 thread.
12618 (linux_resume_one_lwp): Use lwpid_of.
12619 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12620 (linux_resume_one_thread): ... this. Handle resume_stop. In
12621 non-stop mode, don't look for pending flag in all threads.
12622 (resume_status_pending_p): Don't consider explicitly suspended
12623 threads.
12624 (my_waitpid): Reimplement. Emulate __WALL.
12625 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12626 Use lwpid_of.
12627 (sigchld_handler, linux_supports_non_stop, linux_async)
12628 (linux_start_non_stop): New.
12629 (linux_target_ops): Register linux_supports_non_stop, linux_async
12630 and linux_start_non_stop.
12631 (initialize_low): Install SIGCHLD handler.
12632 * thread-db.c (thread_db_create_event, find_one_thread)
12633 (thread_db_get_tls_address): Use lwpid_of.
12634 * win32-low.c (win32_detach): Adjust to use resume_kind.
12635 (win32_wait): Add `options' argument.
12636 * spu-low.c (spu_resume): Adjust to use resume_kind.
12637 (spu_wait): Add `options' argument.
12638
12639 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12640
12641 Decouple target code from remote protocol.
12642
12643 * target.h (enum target_waitkind): New.
12644 (struct target_waitstatus): New.
12645 (struct target_ops) <wait>: Return an unsigned long. Take a
12646 target_waitstatus pointer instead of a char pointer.
12647 (mywait): Likewise.
12648 * target.c (mywait): Change prototype to return an unsigned long.
12649 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12650 * server.h (thread_from_wait, old_thread_from_wait): Delete
12651 declarations.
12652 (prepare_resume_reply): Change prototype to take a
12653 target_waitstatus.
12654 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12655 (last_status, last_ptid): New.
12656 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12657 pid instead of a signal.
12658 (attach_inferior): Remove "status" and "signal" parameters.
12659 Adjust.
12660 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12661 not as an address.
12662 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12663 (handle_v_requests, myresume): Remove "status" and "signal"
12664 parameters. Adjust.
12665 (handle_status): New.
12666 (main): Delete local `status'. Adjust.
12667 * remote-utils.c: Include target.h.
12668 (prepare_resume_reply): Change prototype to take a
12669 target_waitstatus. Adjust.
12670
12671 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12672 interface.
12673 * spu-low.c (spu_wait): Adjust.
12674 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12675 Delete.
12676 (win32_wait): Adjust.
12677
12678 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12679
12680 * target.h (struct thread_resume): Delete leave_stopped member.
12681 (struct target_ops): Add a `n' argument to the `resume' callback.
12682 * server.c (start_inferior): Adjust.
12683 (handle_v_cont, myresume): Adjust.
12684 * linux-low.c (check_removed_breakpoint): Adjust to resume
12685 interface change, and to removed leave_stopped field.
12686 (resume_ptr): Delete.
12687 (struct thread_resume_array): New.
12688 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12689 resume interface change.
12690 (linux_continue_one_thread, linux_queue_one_thread)
12691 (resume_status_pending_p): Check if the resume field is NULL
12692 instead of checking the leave_stopped member.
12693 (linux_resume): Adjust to the target resume interface change.
12694 * spu-low.c (spu_resume): Adjust to the target resume interface
12695 change.
12696 * win32-low.c (win32_detach, win32_resume): Ditto.
12697
12698 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12699
12700 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12701 flag.
12702 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12703 pending.
12704 (linux_continue_one_thread): Only preserve the stepping flag if
12705 there's a pending breakpoint.
12706
12707 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12708
12709 * server.c (main): After the inferior having exited, call
12710 remote_close before exiting gdbserver.
12711
12712 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12713
12714 Fix size of FPSCR in Power 7 processors.
12715 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12716 (PPC_FEATURE_HAS_DFP): New #define.
12717 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12718 size of the FPSCR.
12719
12720 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12721
12722 * server.c (handle_query) Whitespace and formatting.
12723
12724 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12725
12726 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12727 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12728 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12729 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12730 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12731 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12732 Makefile.in, configure.ac: Fix whitespace throughout.
12733 * configure: Regenerate.
12734
12735 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12736
12737 * inferiors.c (find_inferior): Make it safe for the callback
12738 function to delete the currently iterated inferior.
12739
12740 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12741
12742 * Makefile.in (linuw_low_h): Move higher.
12743 (thread-db.o): Depend on $(linux_low_h).
12744
12745 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12746
12747 Rename "process" to "lwp" throughout.
12748
12749 * linux-low.c (all_processes): Rename to...
12750 (all_lwps): ... this.
12751 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12752 (add_process): Rename to ...
12753 (add_lwp): ... this. Adjust.
12754 (linux_create_inferior): Adjust.
12755 (linux_attach_lwp): Adjust.
12756 (linux_attach): Adjust.
12757 (linux_kill_one_process): Rename to ...
12758 (linux_kill_one_lwp): ... this. Adjust.
12759 (linux_kill): Adjust.
12760 (linux_detach_one_process): Rename to ...
12761 (linux_detach_one_lwp): ... this. Adjust.
12762 (linux_detach): Adjust.
12763 (check_removed_breakpoint): Adjust.
12764 (status_pending_p): Adjust.
12765 (linux_wait_for_process): Rename to ...
12766 (linux_wait_for_lwp): ... this. Adjust.
12767 (linux_wait_for_event): Adjust.
12768 (send_sigstop): Adjust.
12769 (wait_for_sigstop): Adjust.
12770 (stop_all_processes): Rename to ...
12771 (stop_all_lwps): ... this.
12772 (linux_resume_one_process): Rename to ...
12773 (linux_resume_one_lwp): ... this. Adjust.
12774 (linux_set_resume_request, linux_continue_one_thread)
12775 (linux_queue_one_thread, resume_status_pending_p)
12776 (usr_store_inferior_registers, regsets_store_inferior_registers)
12777 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12778 Adjust.
12779 * linux-low.h (get_process): Rename to ...
12780 (get_lwp): ... this. Adjust.
12781 (get_thread_process): Rename to ...
12782 (get_thread_lwp): ... this. Adjust.
12783 (get_process_thread): Rename to ...
12784 (get_lwp_thread): ... this. Adjust.
12785 (struct process_info): Rename to ...
12786 (struct lwp_info): ... this.
12787 (all_processes): Rename to ...
12788 (all_lwps): ... this.
12789 * proc-service.c (ps_lgetregs): Adjust.
12790 * thread-db.c (thread_db_create_event, find_one_thread)
12791 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12792
12793 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12794
12795 * server.c (handle_query): Handle "qAttached".
12796
12797 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12798
12799 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12800 GPLv3, update license URL.
12801
12802 2009-03-01 Doug Evans <dje@google.com>
12803
12804 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12805 (server_h): Add gdb_signals.h.
12806 (signals.o): Update.
12807 * server.h (target_signal_from_host,target_signal_to_host_p)
12808 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12809
12810 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12811
12812 * remote-utils.c (getpkt): Also generate remote-debug
12813 information if noack_mode is set.
12814
12815 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12816
12817 * server.c (handle_query): Report qXfer:siginfo:read and
12818 qXfer:siginfo:write as supported and handle them.
12819 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12820 * linux-low.c (linux_xfer_siginfo): New.
12821 (linux_target_ops): Set it.
12822
12823 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12824
12825 * server.c (gdbserver_usage): Mention --remote-debug.
12826 (main): Accept '--remote-debug' switch.
12827
12828 2009-01-18 Doug Evans <dje@google.com>
12829
12830 * regcache.c (new_register_cache): No need to check result of xcalloc.
12831 * server.c (handle_search_memory): Back out calls to xmalloc,
12832 result is checked and error is returned to user upon failure.
12833 (handle_query): Ditto. Add more checks for result of malloc.
12834 (handle_v_cont): Check result of malloc, report error back to
12835 user upon failure.
12836 (handle_v_run): Ditto. Call freeargv.
12837 * server.h (freeargv): Declare.
12838 * utils.c (freeargv): New fn.
12839
12840 2009-01-15 Doug Evans <dje@google.com>
12841
12842 * gdbreplay.c (perror_with_name): Make arg const char *.
12843 * server.h (target_signal_to_name): Make return type const char *.
12844 * thread-db.c (thread_db_err_str): Make return type const char *.
12845 * utils.c (perror_with_name): Make arg const char *.
12846
12847 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12848
12849 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12850 when handling a EXIT_PROCESS_DEBUG_EVENT.
12851
12852 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12853
12854 * gdbreplay.c (gdbreplay_version): Update copyright year.
12855 * server.c (gdbserver_version): Likewise.
12856
12857 2009-01-05 Doug Evans <dje@google.com>
12858
12859 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12860 (handle_extended_wait): Improve comment.
12861
12862 2008-12-13 Doug Evans <dje@google.com>
12863
12864 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12865 * server.h (ATTR_MALLOC): New macro.
12866 (xmalloc,xcalloc,xstrdup): Declare.
12867 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12868 * inferiors.c: Ditto.
12869 * linux-low.c: Ditto.
12870 * mem-break.c: Ditto.
12871 * regcache.c: Ditto.
12872 * remote-utils.c: Ditto.
12873 * server.c: Ditto.
12874 * target.c: Ditto.
12875 * win32-low.c: Ditto.
12876
12877 2008-12-12 Doug Evans <dje@google.com>
12878
12879 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12880 in debugging printf.
12881
12882 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12883
12884 2008-12-09 Doug Evans <dje@google.com>
12885
12886 * linux-low.h (struct process_info): Delete member tid, unused.
12887 * thread-db.c (find_one_thread): Update.
12888 (maybe_attach_thread): Update.
12889
12890 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12891
12892 * target.h (struct target_ops): Add qxfer_osdata member.
12893 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12894 and dirent.h.
12895 (linux_qxfer_osdata): New functions.
12896 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12897 callback.
12898 * server.c (handle_query): Handle "qXfer:osdata:read:".
12899 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12900 (buffer_xml_printf): New functions.
12901 * server.h (struct buffer): New.
12902 (buffer_grow_str, buffer_grow_str0): New macros.
12903 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12904 (buffer_xml_printf): Declare.
12905
12906 2008-11-24 Doug Evans <dje@google.com>
12907
12908 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12909
12910 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12911
12912 * server.c (handle_v_run): Always use the supplied argument list.
12913
12914 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12915
12916 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12917 (xtensa_regmap_table): Add entry for scompare1.
12918
12919 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12920
12921 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12922 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12923 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12924 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12925 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12926 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12927 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12928 XML target descriptions.
12929 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12930 when inferior is running on an ISA 2.05 or later processor. Add
12931 special case to return offset for full 64-bit slot of FPSCR when
12932 in 32-bits.
12933
12934 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12935
12936 * Makefile.in (SFILES, clean): Added sparc64 files.
12937 (reg-sparc64.o, reg-sparc64.c): New.
12938 * configure.srv (sparc*-*-linux*): New configuration.
12939 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12940 syscall arguments for SPARC.
12941 (regsets_store_inferior_registers): Likewise.
12942 * linux-sparc-low.c: New file.
12943
12944 2008-10-21 Doug Evans <dje@google.com>
12945
12946 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12947 (READLINE_DIR,READLINE_DEP): Delete.
12948 (INTERNAL_CFLAGS): Update.
12949 (LINTFLAGS): Update.
12950
12951 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12952
12953 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12954 whole argv from the last run, not just argv[0].
12955
12956 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12957
12958 * regcache.c (new_register_cache): Return NULL if the register
12959 cache size isn't known yet.
12960 (free_register_cache): Avoid dereferencing a NULL regcache.
12961
12962 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12963
12964 * configure.srv: Merge MIPS and MIPS64.
12965
12966 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12967
12968 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12969
12970 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12971
12972 * Makefile.in: Add required vsx dependencies.
12973
12974 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12975 Declare init_registers_powerpc_vsx32l.
12976 Declare init_registers_powerpc_vsx64l.
12977 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12978 (ppc_arch_setup): Check for VSX in hwcap.
12979 (ppc_fill_vsxregset): New function.
12980 (ppc_store_vsxregset): New function.
12981 Add new VSX entry in regset_info target_regsets.
12982
12983 * configure.srv: Add new VSX dependencies.
12984
12985 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12986
12987 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12988 (remote_open): Set or clear transport_is_reliable.
12989 (putpkt_binary): Don't expect acks in noack mode.
12990 (getpkt): Don't send ack/nac in noack mode.
12991 * server.c (handle_general_set): Handle QStartNoAckMode.
12992 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12993 qSupported.
12994 (main): Reset noack_mode on every connection.
12995 * server.h (noack_mode): Declare.
12996
12997 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12998
12999 * Makefile.in (GDBREPLAY_OBS): New variable.
13000 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13001
13002 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13003 Daniel Jacobowitz <dan@codesourcery.com>
13004
13005 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13006 (usr_store_inferior_registers): Likewise.
13007 (regsets_store_inferior_registers): Likewise.
13008
13009 2008-07-31 Rolf Jansen <rj@surtec.com>
13010 Pedro Alves <pedro@codesourcery.com>
13011
13012 * configure.ac: Check for memmem declaration.
13013 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13014 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13015 (disable_packet_qfThreadInfo): Unconditionally compile.
13016 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13017 * configure, config.in: Regenerate.
13018
13019 2008-07-28 Doug Kwan <dougkwan@google.com>
13020
13021 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13022 (linux_write_memory): Remove declaration of errno.
13023
13024 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13025
13026 * linux-low.c (handle_extended_wait): Do not use "status"
13027 variable uninitialized.
13028
13029 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13030
13031 * server.c (handle_v_attach): Inhibit reporting dll changes.
13032
13033 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13034
13035 * remote-utils.c (prepare_resume_reply): If requested, don't
13036 output "thread:TID" in the T stop reply.
13037
13038 * server.c (disable_packet_vCont, disable_packet_Tthread)
13039 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13040 (handle_query): If requested, disable support for qC, qfThreadInfo
13041 and qsThreadInfo.
13042 (handle_v_requests): If requested, disable support for vCont.
13043 (gdbserver_show_disableable): New.
13044 (main): Handle --disable-packet and --disable-packet=LIST.
13045
13046 * server.h (disable_packet_vCont, disable_packet_Tthread)
13047 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13048
13049 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13050
13051 * server.c (gdbserver_usage): Mention --version.
13052
13053 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13054
13055 * Makefile.in (gdbreplay.o): New rule.
13056
13057 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13058
13059 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13060 message, not gdbserver.
13061
13062 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13063 Nathan Sidwell <nathan@codesourcery.com>
13064 Joseph Myers <joseph@codesourcery.com>
13065
13066 * acinclude.m4: Include ../../config/acx.m4.
13067 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13068 * configure, config.in: Regenerate.
13069 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13070 * server.c (gdbserver_version): Print PKGVERSION.
13071 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13072 (main): Adjust gdbserver_usage calls.
13073 * gdbreplay.c (version, host_name): Add declarations.
13074 (gdbreplay_version, gdbreplay_usage): New.
13075 (main): Accept --version and --help options.
13076
13077 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13078
13079 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13080 (arm_breakpoint_at): Handle Thumb.
13081 (the_low_target): Add comment.
13082
13083 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13084
13085 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13086
13087 2008-05-09 Doug Evans <dje@google.com>
13088
13089 * server.h (decode_search_memory_packet): Declare.
13090 * remote-utils.c (decode_search_memory_packet): New fn.
13091 * server.c (handle_search_memory_1): New fn.
13092 (handle_search_memory): New fn.
13093 (handle_query): Process qSearch:memory packets.
13094
13095 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13096
13097 * regcache.c (registers_length): Remove.
13098 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13099 full register packet.
13100 * regcache.h (registers_length): Remove prototype.
13101 * server.h (PBUFSIZ): Define to 16384.
13102
13103 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13104
13105 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13106 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13107 powerpc-64l.o, and powerpc-altivec64l.o.
13108 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13109 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13110 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13111 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13112 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13113 to srv_xmlfiles.
13114
13115 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13116 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13117 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13118 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13119 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13120 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13121 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13122 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13123 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13124 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13125 (clean): Update.
13126
13127 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13128 (init_registers_powerpc_32l): ... this new prototype.
13129 (init_registers_powerpc_32): Remove, replace by ...
13130 (init_registers_powerpc_altivec32l): ... this new prototype.
13131 (init_registers_powerpc_e500): Remove, replace by ...
13132 (init_registers_powerpc_e500l): ... this new prototype.
13133 (init_registers_ppc64): Remove, replace by ...
13134 (init_registers_powerpc_64l): ... this new prototype.
13135 (init_registers_powerpc_64): Remove, replace by ...
13136 (init_registers_powerpc_altivec64l): ... this new prototype.
13137 (ppc_num_regs): Set to 73.
13138 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13139 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13140 (ppc_cannot_store_register): Handle orig_r3 and trap.
13141 (ppc_arch_setup): Update init_registers_... calls.
13142 (ppc_fill_gregset): Handle orig_r3 and trap.
13143
13144 * inferiors.c (clear_inferiors): Reset current_inferior.
13145
13146 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13147
13148 * acinclude.m4: Add override.m4.
13149 * configure: Regenerate.
13150
13151 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13152
13153 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13154 initial call to init_register_ppc64.
13155
13156 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13157
13158 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13159 single powerpc*-*-linux* case.
13160 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13161
13162 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13163
13164 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13165 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13166 from reg_xmlfiles.
13167 * linux-ppc-low.c: Include <elf.h>.
13168 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13169 (ppc_hwcap): New global variable.
13170 (ppc_regmap): Remove __SPE__ #ifdef sections.
13171 (ppc_regmap_e500): New global variable.
13172 (ppc_cannot_store_register): Update __SPE__ special case.
13173 (ppc_get_hwcap): New function.
13174 (ppc_arch_setup): Use it to determine whether inferior supports
13175 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13176 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13177 Do not access registers if target does not support AltiVec.
13178 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13179 Do not access registers if target does not support SPE.
13180 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13181
13182 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13183
13184 * linux-low.c (disabled_regsets, num_regsets): New.
13185 (use_regsets_p): Delete.
13186 (linux_wait_for_process): Clear disabled_regsets.
13187 (regsets_fetch_inferior_registers): Check and set it.
13188 (regsets_store_inferior_registers): Likewise.
13189 (linux_fetch_registers, linux_store_registers): Do not use
13190 use_regsets_p.
13191 (initialize_low): Allocate disabled_regsets.
13192
13193 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13194
13195 * Makefile.in (LIBOBJS): New.
13196 (OBS): Use LIBOBJS.
13197 (memmem.o): New rule.
13198 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13199 * configure: Regenerated.
13200
13201 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13202
13203 * server.c (handle_query): Never return "unsupported" for
13204 qXfer:features:read queries.
13205
13206 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13207
13208 * server.c (get_features_xml): Fix inverted condition.
13209 (handle_query): Always support qXfer:feature:read.
13210
13211 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13212
13213 * server.c (wrapper_argv): New.
13214 (start_inferior): Handle wrapper_argv. If set, expect an extra
13215 trap.
13216 (gdbserver_usage): Document --wrapper.
13217 (main): Parse --wrapper.
13218
13219 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13220
13221 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13222 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13223 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13224 (ppc_set_pc): Likewise.
13225 (ppc_arch_setup): New function.
13226 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13227 of collect_register.
13228 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13229
13230 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13231
13232 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13233 instead of linux-ppc64-low.o.
13234 * linux-ppc64-low.c: Remove file.
13235 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13236 (linux-ppc64-low.o): Remove rule.
13237
13238 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13239 (init_registers_powerpc_64): Likewise.
13240 (ppc_regmap): Conditionally define depending on __powerpc64__.
13241 (ppc_cannot_store_register): Do not special-case "fpscr" when
13242 compiled on __powerpc64__.
13243 (ppc_collect_ptrace_register): New function.
13244 (ppc_supply_ptrace_register): New function.
13245 (ppc_breakpoint): Change type to "unsigned int".
13246 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13247 (the_low_target): Conditionally provide initializers for the
13248 arch_setup member depending on __powerpc64__. Install
13249 collect_ptrace_register and supply_ptrace_register members.
13250
13251 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13252
13253 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13254 * server.c (gdbserver_xmltarget): Define.
13255 (get_features_xml): Use it to replace "target.xml" and arch_string.
13256
13257 * configure.srv: Remove srv_xmltarget. Add XML files that were
13258 mentioned there to srv_xmlfiles instead. Remove conditional tests
13259 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13260 srv_xmlfiles and srv_regobj to include all possible choices.
13261 * configure.ac (srv_xmltarget): Remove.
13262 (srv_xmlfiles): Do not add "target.xml".
13263 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13264 checks for supplementary target information.
13265 * configure: Regenerate.
13266 * Makefile.in (XML_TARGET): Remove.
13267 (target.xml): Remove rule.
13268 (clean): Do not clean up target.xml.
13269 (.PRECIOUS): Do not mention target.xml.
13270
13271 * target.h (struct target_ops): Remove arch_string member.
13272 * linux-low.c (linux_arch_string): Remove.
13273 (linux_target_ops): Remove arch_string initializer.
13274 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13275 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13276 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13277 * spu-low.c (spu_arch_string): Remove.
13278 (spu_target_ops): Remove arch_string initializer.
13279 * win32-low.c (win32_arch_string): Remove.
13280 (win32_target_ops): Remove arch_string initializer.
13281 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13282 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13283 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13284
13285 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13286
13287 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13288 by collect_ptrace_register and supply_ptrace_register hooks.
13289 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13290 instead of checking for the_low_target.left_pad_xfer.
13291 (usr_store_inferior_registers): Use collect_ptrace_register callback
13292 instead of checking for the_low_target.left_pad_xfer.
13293
13294 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13295 (s390_supply_ptrace_register): Likewise.
13296 (s390_fill_gregset): Call s390_collect_ptrace_register.
13297 (the_low_target): Update.
13298
13299 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13300 (ppc_supply_ptrace_register): Likewise.
13301 (the_low_target): Update.
13302
13303 * linux-i386-low.c (the_low_target): Update.
13304 * linux-x86-64-low.c (the_low_target): Update.
13305
13306 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13307
13308 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13309 reg-s390.o and reg-s390x.o.
13310
13311 * linux-low.c (new_inferior): New global variable.
13312 (linux_create_inferior, linux_attach): Set it.
13313 (linux_wait_for_process): Call the_low_target.arch_setup after the
13314 target has stopped for the first time.
13315 (initialize_low): Do not call the_low_target.arch_setup.
13316
13317 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13318 (s390_set_pc): Likewise.
13319 (s390_arch_setup): New function.
13320 (the_low_target): Use s390_arch_setup as arch_setup routine.
13321
13322 * regcache.c (realloc_register_cache): New function.
13323 (set_register_cache): Call it for each existing regcache.
13324
13325 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13326
13327 * server.h (init_registers): Remove prototype.
13328
13329 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13330 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13331 instead of init_registers ().
13332 * linux-arm-low.c (init_registers_arm): Add prototype.
13333 (init_registers_arm_with_iwmmxt): Likewise.
13334 (the_low_target): Add initializer for arch_setup field.
13335 * linux-cris-low.c (init_registers_cris): Add prototype.
13336 (the_low_target): Add initializer for arch_setup field.
13337 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13338 (the_low_target): Add initializer for arch_setup field.
13339 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13340 (the_low_target): Add initializer for arch_setup field.
13341 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13342 (the_low_target): Add initializer for arch_setup field.
13343 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13344 (the_low_target): Add initializer for arch_setup field.
13345 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13346 (the_low_target): Add initializer for arch_setup field.
13347 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13348 (init_registers_mips64_linux): Likewise.
13349 (the_low_target): Add initializer for arch_setup field.
13350 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13351 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13352 (the_low_target): Add initializer for arch_setup field.
13353 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13354 (init_registers_powerpc_64): Likewise.
13355 (the_low_target): Add initializer for arch_setup field.
13356 * linux-s390-low.c (init_registers_s390): Add prototype.
13357 (init_registers_s390x): Likewise.
13358 (the_low_target): Add initializer for arch_setup field.
13359 * linux-sh-low.c (init_registers_sh): Add prototype.
13360 (the_low_target): Add initializer for arch_setup field.
13361 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13362 (the_low_target): Add initializer for arch_setup field.
13363 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13364 (the_low_target): Add initializer for arch_setup field.
13365
13366 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13367 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13368 instead of init_registers ().
13369 * win32-arm-low.c (init_registers_arm): Add prototype.
13370 (the_low_target): Add initializer for arch_setup field.
13371 * win32-i386-low.c (init_registers_i386): Add prototype.
13372 (the_low_target): Add initializer for arch_setup field.
13373
13374 * spu-low.c (init_registers_spu): Add prototype.
13375 (initialize_low): Call initialie_registers_spu () instead of
13376 initialize_registers ().
13377
13378 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13379
13380 * server.c (handle_v_requests): When handling the vRun and vAttach
13381 packets, if already debugging a process, don't kill it. Return an
13382 error instead.
13383
13384 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13385
13386 * server.c (handle_query): Correct length check.
13387
13388 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13389
13390 * win32-low.c (do_initial_child_stuff): Add process handle
13391 parameter. Set current_process_handle and current_process_id from the
13392 parameters. Clear globals.
13393 (win32_create_inferior): Don't set current_process_handle and
13394 current_process_id here. Instead pass them on the call to
13395 do_initial_child_stuff.
13396 (win32_attach): Likewise.
13397 (win32_clear_inferiors): New.
13398 (win32_kill): Don't close the current process handle or the
13399 current thread handle here. Instead call win32_clear_inferiors.
13400 (win32_detach): Don't open a new handle to the process. Call
13401 win32_clear_inferiors.
13402 (win32_join): Don't rely on current_process_handle; open a new
13403 handle using the process id.
13404 (win32_wait): Call win32_clear_inferiors when the inferior process
13405 has exited.
13406
13407 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13408
13409 * server.c (monitor_show_help): Add "exit".
13410
13411 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13412
13413 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13414 (clean): Add reg-xtensa.c.
13415 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13416 * configure.srv (xtensa*-*-linux*) New target.
13417 * linux-xtensa-low.c: New.
13418 * xtensa-xtregs.c: New.
13419
13420 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13421
13422 * hostio.c: Don't include errno.h.
13423 (errno_to_fileio_errno): Move to hostio-errno.
13424 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13425 error number outputting to the target->hostio_last_error callback.
13426 (hostio_packet_error): Use FILEIO_EINVAL directly.
13427 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13428 calls to hostio_error.
13429 * hostio-errno.c: New.
13430 * server.h (hostio_last_error_from_errno): Declare.
13431 * target.h (target_ops): Add hostio_last_error member.
13432 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13433 as hostio_last_error handler.
13434 * spu-low.c (spu_target_ops): Likewise.
13435 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13436 (wince_hostio_last_error): New functions.
13437 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13438 as hostio_last_error handler.
13439 (win32_target_ops) [!_WIN32_WCE]: Register
13440 hostio_last_error_from_errno as hostio_last_error handler.
13441 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13442 (hostio-errno.o): New rule.
13443 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13444 * configure.srv (srv_hostio_err_objs): New variable. Default to
13445 hostio-errno.o.
13446 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13447 * configure: Regenerate.
13448
13449 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13450
13451 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13452 (linux_kill, linux_detach): Clean up the process list.
13453 * remote-utils.c (remote_open): Improve port number parsing.
13454 (putpkt_binary, input_interrupt): Only send interrupts if the target
13455 is running.
13456 * server.c (extended_protocol): Make static.
13457 (attached): Define earlier.
13458 (exit_requested, response_needed, program_argv): New variables.
13459 (target_running): New.
13460 (start_inferior): Clear attached here.
13461 (attach_inferior): Set attached here.
13462 (require_running): Define.
13463 (handle_query): Use require_running and target_running. Implement
13464 "monitor exit".
13465 (handle_v_attach, handle_v_run): New.
13466 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13467 (gdbserver_usage): Update.
13468 (main): Redo argument parsing. Handle --debug and --multi. Handle
13469 --attach along with other options or after the port. Save
13470 program_argv. Support no initial program. Resynchronize
13471 communication with GDB after an error. Handle "monitor exit".
13472 Use require_running and target_running. Always allow the extended
13473 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13474 restart in extended mode.
13475 * README: Refer to the GDB manual. Update --attach usage.
13476
13477 2007-12-20 Andreas Schwab <schwab@suse.de>
13478
13479 * linux-low.c (STACK_SIZE): Define.
13480 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13481 (linux_test_for_tracefork): Likewise.
13482
13483 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13484
13485 * linux-low.c (linux_wait_for_event): Update messages. Do not
13486 reinsert auto-delete breakpoints.
13487 * mem-break.c (struct breakpoint): Change return type of handler to
13488 int.
13489 (set_breakpoint_at): Update handler type.
13490 (reinsert_breakpoint_handler): Return 1 instead of calling
13491 delete_breakpoint.
13492 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13493 setting a new one.
13494 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13495 * mem-break.h (set_breakpoint_at): Update handler type.
13496 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13497 * win32-low.c (auto_delete_breakpoint): New.
13498 (get_child_debug_event): Use it.
13499
13500 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13501
13502 * configure.ac: Check for pread and pwrite.
13503 * hostio.c (handle_pread): Fall back to lseek and read.
13504 (handle_pwrite): Fall back to lseek and write.
13505 * config.in, configure: Regenerated.
13506
13507 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13508
13509 * server.c (myresume): Add own_buf argument.
13510 (main): Update calls.
13511
13512 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13513
13514 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13515 * remote-utils.c (remote_open): Do not call disable_async_io.
13516 (block_async_io): Delete.
13517 (unblock_async_io): Make static.
13518 (initialize_async_io): New.
13519 * server.c (handle_v_cont): Handle async I/O here.
13520 (myresume): Likewise. Move other common resume tasks here...
13521 (main): ... from here. Call initialize_async_io. Disable async
13522 I/O before the main loop.
13523 * server.h (initialize_async_io): Declare.
13524 (block_async_io, unblock_async_io): Delete prototypes.
13525 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13526
13527 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13528
13529 * remote-utils.c (readchar): Allow binary data in received messages.
13530
13531 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13532
13533 * win32-low.c (attaching): New global.
13534 (win32_create_inferior): Clear the `attaching' global.
13535 (win32_attach): Set the `attaching' global.
13536 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13537 attaching. Only set a breakpoint at the entry point if not
13538 attaching.
13539
13540 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13541
13542 * server.c (main): Don't report dll events on the initial
13543 connection on attaches.
13544
13545 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13546
13547 * server.c (main): Relax numerical bases supported for the pid of
13548 the --attach command line argument.
13549
13550 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13551
13552 * win32-low.c (win32_attach): Call OpenProcess before
13553 DebugActiveProcess, not after. Add last error output to error
13554 call.
13555
13556 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13557
13558 * win32-low.c (win32_get_thread_context)
13559 (win32_set_thread_context): New functions.
13560 (thread_rec): Use win32_get_thread_context.
13561 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13562 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13563 field.
13564
13565 2007-12-03 Leo Zayas
13566 Pedro Alves <pedro_alves@portugalmail.pt>
13567
13568 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13569 global variables.
13570 (child_add_thread): Minor cleanup.
13571 (child_continue): Resume artificially suspended threads before
13572 calling ContinueDebugEvent.
13573 (suspend_one_thread): New.
13574 (fake_breakpoint_event): New.
13575 (get_child_debug_event): Change return type to int. Check here if
13576 gdb sent an interrupt request. If a soft interrupt was requested,
13577 fake a breakpoint event. Return 0 if there is no event to handle,
13578 and 1 otherwise.
13579 (win32_wait): Don't check here if gdb sent an interrupt request.
13580 Ensure there is a valid event to handle.
13581 (win32_request_interrupt): Add soft interruption method as last
13582 resort.
13583
13584 2007-12-03 Leo Zayas
13585 Pedro Alves <pedro_alves@portugalmail.pt>
13586
13587 * win32-low.h (win32_thread_info): Add descriptions to the
13588 structure members. Replace `suspend_count' counter by a
13589 `suspended' flag.
13590 * win32-low.c (thread_rec): Update condition of when to get the
13591 context from the inferior. Rely on ContextFlags being set if it
13592 has already been retrieved. Only suspend the inferior thread if
13593 we haven't already. Warn if that fails.
13594 (continue_one_thread): s/suspend_count/suspended/. Only call
13595 ResumeThread once. Warn if that fails.
13596
13597 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13598
13599 * win32-low.c (win32_wait): Don't read from the inferior when it
13600 has already exited.
13601
13602 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13603
13604 * Makefile.in (win32_low_h): New variable.
13605 (win32-low.o): Add dependency on $(win32_low_h).
13606 (win32-arm-low.o, win32-i386-low.o): New rules.
13607
13608 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13609
13610 * hostio.c: Correct copyright year.
13611
13612 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13613
13614 * Makefile.in (OBS): Add hostio.o.
13615 (hostio.o): New rule.
13616 * server.h (handle_vFile): Declare.
13617 * hostio.c: New file.
13618 * server.c (handle_v_requests): Take packet_len and new_packet_len
13619 for binary packets. Call handle_vFile.
13620 (main): Update call to handle_v_requests.
13621
13622 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13623
13624 * linux-low.c: Include <sched.h>.
13625
13626 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13627
13628 * linux-low.c (linux_tracefork_grandchild): New.
13629 (linux_tracefork_child): Use clone.
13630 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13631
13632 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13633
13634 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13635
13636 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13637
13638 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13639
13640 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13641
13642 * inferiors.c (change_inferior_id): Delete.
13643 (add_pid_to_list, pull_pid_from_list): New.
13644 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13645 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13646 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13647 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13648 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13649 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13650 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13651 (using_threads): Always set to 1.
13652 (handle_extended_wait): New.
13653 (add_process): Do not set TID.
13654 (linux_create_inferior): Set must_set_ptrace_flags.
13655 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13656 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13657 (linux_thread_alive): Rename TID argument to LWPID.
13658 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13659 (linux_wait_for_event): Do not use TID or check using_threads. Update
13660 call to dead_thread_notify. Call handle_extended_wait.
13661 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13662 (send_sigstop): Delete sigstop_sent.
13663 (wait_for_sigstop): Avoid TID.
13664 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13665 (linux_test_for_tracefork): New.
13666 (linux_lookup_signals): Use thread_db_active and
13667 linux_supports_tracefork_flag.
13668 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13669 * linux-low.h (get_process_thread): Avoid TID.
13670 (struct process_ifo): Move thread_known and tid to the end. Remove
13671 sigstop_sent.
13672 (linux_attach_lwp, thread_db_init): Update prototypes.
13673 * server.h (change_inferior_id): Delete prototype.
13674 (add_pid_to_list, pull_pid_from_list): New prototypes.
13675 * thread-db.c (thread_db_use_events): New.
13676 (find_first_thread): Rename to...
13677 (find_one_thread): ...this. Update callers and messages. Do not
13678 call fatal. Check thread_db_use_events. Do not call
13679 change_inferior_id or new_thread_notify.
13680 (maybe_attach_thread): Update. Do not call new_thread_notify.
13681 (thread_db_init): Set thread_db_use_events. Check use_events.
13682 * utils.c (fatal, warning): Correct message prefix.
13683
13684 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * Makefile.in (clean): Remove new files.
13687 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13688 (powerpc-64.o, powerpc-64.c): New rules.
13689 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13690 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13691 with SPE.
13692 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13693 SPE targets.
13694 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13695 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13696 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13697 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13698 (target_regsets): Add AltiVec and SPE register sets.
13699 * configure.ac: Check for AltiVec and SPE.
13700 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13701 (ppc_fill_vrregset, ppc_store_vrregset): New.
13702 (target_regsets): Add AltiVec register set.
13703 * configure: Regenerated.
13704
13705 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13706
13707 * linux-low.c (O_LARGEFILE): Define.
13708 (linux_read_memory): Use /proc/PID/mem.
13709 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13710 * configure, config.in: Regenerated.
13711
13712 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13713
13714 * linux-low.c (linux_wait_for_event): Do not pass signals while
13715 single-stepping.
13716
13717 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13718
13719 * win32-low.c (create_process): New.
13720 (win32_create_inferior): Use create_process instead of
13721 CreateProcess. If create_process failed retry appending an ".exe"
13722 suffix. Store the GetLastError result immediatelly after
13723 create_process calls and use it on the call to error.
13724
13725 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13726
13727 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13728
13729 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13730
13731 * configure.ac: Switch license to GPLv3.
13732
13733 2007-08-01 Michael Snyder <msnyder@access-company.com>
13734
13735 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13736
13737 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13738
13739 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13740 typedef.
13741 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13742 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13743 CloseToolhelp32Snapshot.
13744 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13745 CloseToolhelp32Snapshot.
13746
13747 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13748
13749 * server.c (main): Check for inferior exit before main loop.
13750
13751 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13752
13753 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13754 instead of on tmp_desc.
13755
13756 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13757 Daniel Jacobowitz <dan@codesourcery.com>
13758
13759 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13760 (add_thread): Minor cleanups.
13761 (clear_inferiors): Move lower in the file. Clear the DLL
13762 list.
13763 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13764 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13765 (xml_escape_text): New.
13766 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13767 for qSupported.
13768 (handle_v_cont): Report errors.
13769 (gdbserver_version): Update.
13770 (main): Correct size of own_buf. Do not report initial DLL events.
13771 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13772 (unloaded_dll, xml_escape_text): New.
13773 * win32-low.c (enum target_waitkind): Update comments.
13774 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13775 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13776 (win32_EnumProcessModules, win32_GetModuleInformation)
13777 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13778 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13779 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13780 (win32_Module32First, win32_Module32Next, load_toolhelp)
13781 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13782 (get_child_debug_event): Handle DLL events.
13783 (win32_wait): Likewise.
13784
13785 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13786
13787 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13788 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13789
13790 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13791
13792 * win32-low.c (handle_output_debug_string): Ignore event if not
13793 waiting.
13794
13795 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13796
13797 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13798
13799 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13800
13801 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13802
13803 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * inferiors.c (change_inferior_id): Add comment.
13806 * linux-low.c (check_removed_breakpoint): Add an early
13807 prototype. Improve debug output.
13808 (linux_attach): Doc update.
13809 (linux_detach_one_process, linux_detach): Clean up before releasing
13810 each process.
13811 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13812 * linux-low.h (struct process_info): Doc improvement.
13813 * mem-break.c (delete_all_breakpoints): New.
13814 * mem-break.h (delete_all_breakpoints): New prototype.
13815 * thread-db.c (find_first_thread): New.
13816 (thread_db_create_event): Call it instead of
13817 thread_db_find_new_threads. Clean up unused variables.
13818 (maybe_attach_thread): Remove first thread handling.
13819 (thread_db_find_new_threads): Use find_first_thread.
13820 (thread_db_get_tls_address): Likewise.
13821
13822 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13823
13824 * thread-db.c (thread_db_find_new_threads): Add prototype.
13825 (thread_db_create_event): Check for the main thread before adding
13826 a new thread.
13827 (maybe_attach_thread): Only enable event reporting if TID == 0.
13828 (thread_db_get_tls_address): Check for new threads.
13829
13830 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13831
13832 * linux-low.c (linux_create_inferior): Try execv before execvp.
13833 * spu-low.c (spu_create_inferior): Likewise.
13834
13835 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13836
13837 * linux-low.c (linux_create_inferior): Change execv to execvp.
13838 * spu-low.c (spu_create_inferior): Likewies.
13839
13840 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13841
13842 * Makefile.in (clean): Clean new files instead of deleted ones.
13843 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13844 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13845 rules.
13846 * configure.srv: Specify XML files and new regformats for MIPS and
13847 MIPS64 GNU/Linux.
13848 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13849 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13850 an entry for the restart register.
13851 (mips_cannot_fetch_register, mips_cannot_store_register)
13852 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13853 register names to match the XML descriptions.
13854 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13855 restart register instead of $0.
13856
13857 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13858 Markus Deuling <deuling@de.ibm.com>
13859
13860 * remote-utils.c (decode_xfer_write): New function.
13861 * server.h (decode_xfer_write): Add prototype.
13862 * server.c (handle_query): Add PACKET_LEN argument. Support
13863 qXfer:spu:read and qXfer:spu:write packets.
13864 (main): Pass packet_len to handle_query.
13865 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13866 * target.h (target_ops): Add qxfer_spu.
13867
13868 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13869
13870 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13871 accessing non-seekable spufs files.
13872
13873 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13874
13875 * server.c (handle_query): Add reply for qC packet.
13876
13877 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13878 Leo Zayas <lerele@champenstudios@com>
13879
13880 * server.h (check_remote_input_interrupt_request): New function.
13881 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13882 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13883 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13884 (check_remote_input_interrupt_request): New function.
13885 * server.h (check_remote_input_interrupt_request): Declare.
13886 * win32-low.c (winapi_DebugBreakProcess,
13887 winapi_GenerateConsoleCtrlEvent): New typedefs.
13888 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13889 to 250 ms.
13890 (win32_wait): Check for remote interrupt request
13891 with check_remote_input_interrupt_request.
13892 (win32_request_interrupt): New function.
13893 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13894
13895 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13896
13897 * win32-low.c (debug_registers_changed,
13898 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13899 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13900 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13901 (thread_rec): Get context using the low target.
13902 (child_add_thread): Call thread_added on the low target,
13903 which does the same thing.
13904 (regptr): Delete.
13905 (do_initial_child_stuff): Remove debug registers references.
13906 Set context using the low target. Resume threads after
13907 setting the contexts.
13908 (child_continue): Remove dead variable. Remove debug
13909 registers references.
13910 (child_fetch_inferior_registers): Go through the low target.
13911 (do_child_store_inferior_registers): Remove.
13912 (child_store_inferior_registers): Go through the low target.
13913 (win32_resume): Remove debug registers references.
13914 Set context using the low target.
13915 (handle_exception): Change return type to void. Don't record
13916 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13917 first chance exception.
13918 (get_child_debug_event): Change return type to void. Remove
13919 goto loop. Always return after waiting for debug event.
13920 (win32_wait): Convert to switch statement. Handle spurious
13921 events.
13922
13923 * win32-i386-low.c (debug_registers_changed,
13924 debug_registers_used): New.
13925 (initial_stuff): Rename to ...
13926 (i386_initial_stuff): ... this. Clear debug registers
13927 state variables.
13928 (store_debug_registers): Delete.
13929 (i386_get_thread_context): New.
13930 (load_debug_registers): Delete.
13931 (i386_set_thread_context): New.
13932 (i386_thread_added): New.
13933 (single_step): Rename to ...
13934 (i386_single_step): ... this.
13935 (do_fetch_inferior_registers): Rename to ...
13936 (i386_fetch_inferior_register): ... this.
13937 (i386_store_inferior_register): New.
13938 (the_low_target): Adapt to new interface.
13939
13940 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13941 (arm_get_thread_context): New.
13942 (arm_set_thread_context): New.
13943 (regptr): New.
13944 (do_fetch_inferior_registers): Rename to ...
13945 (arm_fetch_inferior_register): ... this.
13946 (arm_store_inferior_register): New.
13947 (arm_wince_breakpoint): Reimplement as unsigned long.
13948 (arm_wince_breakpoint_len): Define.
13949 (the_low_target): Adapt to new interface.
13950
13951 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13952 load_debug_registers. Add get_thread_context, set_thread_context,
13953 thread_added and store_inferior_register. Rename
13954 fetch_inferior_registers to fetch_inferior_register.
13955 (regptr): Remove declaration.
13956
13957 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13958
13959 * linux-low.c (linux_detach): Change return type to int. Return 0.
13960 * spu-low.c (spu_detach): Likewise.
13961
13962 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13963
13964 * target.h (target_ops): Change return type of detach to int.
13965 Add join.
13966 (join_inferior): New.
13967 * server.c (main): Don't skip detach support on mingw32.
13968 If the inferior doesn't support detaching return error.
13969 Call join_inferior instead of using waitpid.
13970 * linux-low.c (linux_join): New.
13971 (linux_target_op): Add linux_join.
13972 * spu-low.c (spu_join): New.
13973 (spu_target_ops): Add spu_join.
13974 * win32-low.c (win32_detach): Adapt to new interface.
13975 Reopen current_process_handle before detaching. Issue a child
13976 resume before detaching.
13977 (win32_join): New.
13978 (win32_target_op): Add win32_join.
13979
13980 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13981
13982 * win32-low.c (win32-attach): Fix return value.
13983 * target.h (target_ops): Describe ATTACH return values.
13984
13985 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13986
13987 * win32-low.c (GETPROCADDRESS): Define.
13988 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13989 (winapi_DebugSetProcessKillOnExit): Likewise.
13990 (win32_create_inferior): Force usage of ansi CreateProcessA.
13991 (win32_attach): Use GETPROCADDRESS.
13992 (win32_detach): Likewise.
13993
13994 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13995
13996 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13997
13998 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13999
14000 * win32-low.c: Commit leftover changes from 2007-03-29.
14001
14002 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14003
14004 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14005 fields short instead of int. Add explicit padding.
14006 (i387_cache_to_fsave): Remove unnecessary casts.
14007 (i387_fsave_to_cache): Doc fix.
14008 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14009
14010 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14011
14012 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14013 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14014
14015 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14016
14017 * configure.srv (arm*-*-mingw32ce*): Move near the other
14018 arm targets.
14019
14020 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14021
14022 * configure.ac: Add errno checking.
14023 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14024 sys/file.h and malloc.h.
14025 (AC_CHECK_DECLS): Add perror.
14026 (srv_mingwce): Handle.
14027 * configure.srv (i[34567]86-*-cygwin*): Add
14028 win32-i386-low.o to srv_tgtobj.
14029 (i[34567]86-*-mingw*): Likewise.
14030 (arm*-*-mingw32ce*): Add case.
14031 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14032 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14033 [__MINGW32CE__] (strerror): New function.
14034 [__MINGW32CE__] (errno): Define to GetLastError.
14035 [__MINGW32CE__] (COUNTOF): New macro.
14036 (remote_open): Remove extra close call.
14037 * mem-break.c (delete_breakpoint_at): New function.
14038 * mem-break.h (delete_breakpoint_at): Declare.
14039 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14040 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14041 [USE_WIN32API] (read, write): Add char* casts.
14042 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14043 * server.h: Include wincecompat.h on Windows CE.
14044 [HAVE_ERRNO_H]: Check.
14045 (perror): Declare if not declared.
14046 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14047 (perror_with_name): Remove errno declaration.
14048 * wincecompat.h: New.
14049 * wincecompat.c: New.
14050 * win32-low.h: New.
14051 * win32-arm-low.c: New.
14052 * win32-i386-low.c: New.
14053 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14054 (OUTMSG2): Make it safe.
14055 (_T): New macro.
14056 (COUNTOF): New macro.
14057 (NUM_REGS): Get it from the low target.
14058 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14059 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14060 (thread_rec): Let low target handle debug registers.
14061 (child_add_thread): Likewise.
14062 (child_init_thread_list): Likewise.
14063 (continue_one_thread): Likewise.
14064 (regptr): New.
14065 (do_child_fetch_inferior_registers): Move to ...
14066 * win32-i386-low.c: ... here, and rename to ...
14067 (do_fetch_inferior_registers): ... this.
14068 * win32-low.c (child_fetch_inferior_registers):
14069 Go through the low target.
14070 (do_child_store_inferior_registers): Use regptr.
14071 (strwinerror): New function.
14072 (win32_create_inferior): Handle Windows CE.
14073 Use strwinerror instead of strerror on Windows error
14074 codes. Add program to the error output.
14075 Don't close the main thread handle on Windows CE.
14076 (win32_attach): Use coredll.dll on Windows CE.
14077 (win32_kill): Close current process and current
14078 thread handles.
14079 (win32_detach): Use coredll.dll on Windows CE.
14080 (win32_resume): Let low target handle debug registers, and
14081 step request.
14082 (handle_exception): Add/Remove initial breakpoint. Avoid
14083 non-existant WSTOPSIG on Windows CE.
14084 (win32_read_inferior_memory): Cast to remove warning.
14085 (win32_arch_string): Go through the low target.
14086 (initialize_low): Call set_breakpoint_data with the low
14087 target's breakpoint.
14088 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14089 FOP_REGNUM, mappings): Move to ...
14090 * win32-i386-low.c: ... here.
14091 * win32-low.c (win32_thread_info): Move to ...
14092 * win32-low.h: ... here.
14093 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14094 win32-arm-low.c and wincecompat.c.
14095 (all:): Add $EXEEXT.
14096 (install-only:): Likewise.
14097 (gdbserver:): Likewise.
14098 (gdbreplay:): Likewise.
14099 * config.in: Regenerate.
14100 * configure: Regenerate.
14101
14102 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14103
14104 * win32-low.c: Rename typedef thread_info to
14105 win32_thread_info throughout.
14106
14107 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14108
14109 * win32-i386-low.c: Rename to ...
14110 * win32-low.c: ... this.
14111 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14112 * Makefile.in: Likewise.
14113
14114 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14115
14116 * remote-utils.c (monitor_output): Constify msg parameter.
14117 * server.h (monitor_output): Likewise.
14118 * win32-i386-low.c (handle_output_debug_string): New.
14119 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14120 handle_output_debug_string.
14121 (get_child_debug_event): Likewise.
14122
14123 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14124
14125 * server.c (main): Correct strtoul check.
14126
14127 2007-03-27 Jon Ringle <jon@ringle.org>
14128
14129 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14130
14131 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14132
14133 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14134
14135 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14136
14137 * terminal.h: Check HAVE_SGTTY_H.
14138
14139 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14140
14141 * remote-utils.c (remote_open): Print out the assigned port number.
14142
14143 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * remote-utils.c (monitor_output): New function.
14146 * server.c (debug_threads): Define here.
14147 (monitor_show_help): New function.
14148 (handle_query): Handle qRcmd.
14149 (main): Do not handle 'd' packet.
14150 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14151 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14152 of debug_threads.
14153
14154 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14155
14156 * Makefile.in (EXEEXT): New.
14157 (clean): Use $(EXEEXT).
14158
14159 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14160
14161 * target.h (target_ops): Rename send_signal to request_interrupt,
14162 and remove enum target_signal parameter.
14163 * linux-low.c (linux_request_interrupt): Rename from
14164 linux_send_signal, and always send SIGINT.
14165 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14166 and always send SIGINT.
14167 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14168 of send_signal.
14169 (input_interrupt): Likewise.
14170
14171 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14172
14173 * server.c (get_features_xml): Check if target implemented
14174 arch_string.
14175 * win32-i386-low.c (win32_arch_string): New.
14176 (win32_target_ops): Add win32_arch_string as arch_string member.
14177
14178 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14179
14180 * spu-low.c (spu_arch_string): New.
14181 (spu_target_ops): Add spu_arch_string.
14182
14183 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14186 * configure.ac: Do not check for terminal.h.
14187 * configure, config.in: Regenerated.
14188
14189 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14190
14191 * Makefile.in (OBS): Add $(XML_BUILTIN).
14192 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14193 (clean): Update.
14194 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14195 (arm-with-iwmmxt.c): New.
14196 * config.in, configure: Regenerate.
14197 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14198 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14199 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14200 (arm*-*-linux*): Add iWMMXt and regset support.
14201 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14202 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14203 (arm_store_wmmxregset, target_regsets): New.
14204 * server.c (get_features_xml): Take annex argument. Check builtin
14205 XML documents.
14206 (handle_query): Handle multiple annexes.
14207
14208 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * remote-utils.c [USE_WIN32API] (read, write): Define.
14211 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14212 write.
14213
14214 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14215
14216 * linux-i386-low.c (the_low_target): Set arch_string.
14217 * linux-x86-64-low.c (the_low_target): Likewise.
14218 * linux-low.c (linux_arch_string): New.
14219 (linux_target_ops): Add it.
14220 * linux-low.h (struct linux_target_ops): Add arch_string.
14221 * server.c (write_qxfer_response): Use const void * for DATA.
14222 (get_features_xml): New.
14223 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14224 * target.h (struct target_ops): Add arch_string method.
14225
14226 2007-01-03 Denis Pilat <denis.pilat@st.com>
14227 Daniel Jacobowitz <dan@codesourcery.com>
14228
14229 * linux-low.c (linux_kill): Handle being called with no threads.
14230 * win32-i386-low.c (win32_kill): Likewise.
14231 (get_child_debug_event): Clear current_process_handle.
14232
14233 2006-12-30 Denis PILAT <denis.pilat@st.com>
14234 Daniel Jacobowitz <dan@codesourcery.com>
14235
14236 * remote-utils.c (remote_open): Check the type of specified
14237 serial port devices before opening them.
14238 * server.c (main): Kill the inferior if an error occurs during
14239 the first remote_open.
14240
14241 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14242
14243 * README: Update supported targets.
14244
14245 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14246
14247 * Makefile.in (clean): Remove reg-mips64.c.
14248 (reg-mips64.c, reg-mips64.o): New rules.
14249 * configure.srv: Handle mips64. Include regset support for mips.
14250 * linux-mips-low.c (union mips_register): New.
14251 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14252 (mips_breakpoint, mips_breakpoint_at): Use int.
14253 (mips_collect_register, mips_supply_register)
14254 (mips_collect_register_32bit, mips_supply_register_32bit)
14255 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14256 (mips_store_fpregset, target_regsets): New.
14257 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14258
14259 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14260
14261 * configure.srv: Add target "spu*-*-*".
14262 * Makefile.in (clean): Remove reg-spu.c.
14263 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14264 * spu-low.c: New file.
14265
14266 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14267
14268 * configure.ac: Correct td_thr_tls_get_addr test.
14269 * configure: Regenerated.
14270
14271 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14272
14273 * linux-low.c (linux_wait_for_event): Reformat. Use the
14274 pass_signals array.
14275 * remote-utils.c (decode_address_to_semicolon): New.
14276 * server.c (pass_signals, handle_general_set): New.
14277 (handle_query): Mention QPassSignals for qSupported.
14278 (main): Call handle_general_set.
14279 * server.h (pass_signals, decode_address_to_semicolon): New.
14280
14281 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * server.c (handle_query): Correct error handling for read_auxv.
14284
14285 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14286
14287 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14288 and srv_linux_thread_db to yes.
14289 * linux-s390-low.c (s390_fill_gregset): New function.
14290 (target_regsets): Define data structure.
14291
14292 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14293
14294 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14295 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14296 * config.in, configure: Regenerated.
14297 * inferiors.c (gdb_id_to_thread): New function.
14298 (gdb_id_to_thread_id): Use it.
14299 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14300 * linux-low.h (struct process_info): Add th member.
14301 (thread_db_get_tls_address): New prototype.
14302 * remote-utils.c (decode_address): Make non-static.
14303 * server.c (handle_query): Handle qGetTLSAddr.
14304 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14305 * target.h (struct target_ops): Add get_tls_address.
14306 * thread-db.c (maybe_attach_thread): Save the thread handle.
14307 (thread_db_get_tls_address): New.
14308
14309 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14312 (linux_resume_one_process): Take a siginfo_t *. Update all
14313 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14314 (struct pending_signals): Add a siginfo_t.
14315 (linux_wait_for_process): Always set last_status.
14316 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14317 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14318 * linux-low.h (struct process_info): Add last_status.
14319
14320 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14321
14322 * remote-utils.c (try_rle): New function.
14323 (putpkt_binary): Use it.
14324
14325 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14326
14327 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14328 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14329 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14330 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14331 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14332 point registers.
14333
14334 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14335
14336 * server.c (terminal_fd): New variable.
14337 (old_foreground_pgrp): Likewise.
14338 (restore_old_foreground_pgrp): New function.
14339 (start_inferior): Record the terminal file descriptor in terminal_fd
14340 and its original foreground group in old_foreground_pgrp. Register
14341 restore_old_foreground_pgrp with atexit().
14342
14343 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * server.c (handle_query): Correct qPart to qXfer.
14346
14347 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * configure.ac: Check for more headers which are missing on
14350 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14351 * configure.srv: Add Cygwin and mingw32.
14352 * remote-utils.c: Don't include headers unconditionally which
14353 are missing on mingw32. Include <winsock.h> for mingw32.
14354 (remote_open): Adjust for mingw32 support. Flush
14355 standard error after writing to it.
14356 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14357 (unblock_async_io, enable_async_io, disable_async_io)
14358 (readchar, getpkt): Update for Winsock support.
14359 (prepare_resume_reply): Expect a protocol signal number.
14360 * server.c: Disable <sys/wait.h> on mingw32.
14361 (start_inferior): Adjust for mingw32 support. Flush
14362 standard error after writing to it.
14363 (attach_inferior): Likewise. Use protocol signal
14364 numbers.
14365 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14366 and names.
14367 * win32-i386-low.c: New file.
14368 * Makefile.in (XM_CLIBS): Set.
14369 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14370 (win32-i386-low.o): New dependency rule.
14371 * linux-low.c (linux_wait): Use target signal numbers.
14372 * target.h (struct target_ops): Doc fix.
14373 * server.h (target_signal_to_name): New prototype.
14374 * gdbreplay.c: Don't include headers unconditionally which
14375 are missing on mingw32. Include <winsock.h> for mingw32.
14376 (remote_close, remote_open): Adjust for Winsock support.
14377 * configure, config.in: Regenerated.
14378
14379 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14380
14381 * server.c (decode_xfer_read, write_qxfer_response): New.
14382 (handle_query): Take a packet length argument. Handle
14383 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14384 the qSupported response.
14385 (main): Update call to handle_query.
14386
14387 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14388
14389 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14390 (putpkt_binary): Renamed from putpkt and adjusted for binary
14391 data.
14392 (putpkt): New wrapper for putpkt_binary.
14393 (readchar): Don't mask off the high bit.
14394 (decode_X_packet): New function.
14395 * server.c (main): Call putpkt_binary if a handler sets the packet
14396 length. Save the length of the incoming packet. Handle 'X'.
14397 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14398
14399 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14400
14401 * server.c (handle_query): Handle qSupported.
14402
14403 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14404
14405 * remote-utils.c (all_symbols_looked_up): New variable.
14406 (look_up_one_symbol): Check it.
14407 * server.h (look_up_one_symbol): New declaration.
14408 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14409
14410 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14411
14412 * Makefile.in (linux-arm-low.o): Update dependencies.
14413 * linux-arm-low.c: Include "gdb_proc_service.h".
14414 (PTRACE_GET_THREAD_AREA): Define.
14415 (ps_get_thread_area): New function.
14416
14417 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14418
14419 * configure.srv (m68k*-*-uclinux*): New target.
14420 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14421 (linux_resume_one_process): Remove extraneous cast.
14422 (linux_read_offsets): New.
14423 (linux_target_op): Add linux_read_offsets on mmuless systems.
14424 * server.c (handle_query): Add qOffsets logic.
14425 * target.h (struct target_ops): Add read_offsets.
14426
14427 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14428
14429 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14430 (PTRACE_GET_THREAD_AREA): Define.
14431 (ps_get_thread_area): New function.
14432 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14433 (linux-x86-64-low.o): Update.
14434
14435 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14436
14437 * configure.ac: Remove checks for prfpregset_t.
14438 * gdb_proc_service.h: New file.
14439 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14440 new "gdb_proc_service.h".
14441 * proc-service.c: Likewise.
14442 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14443 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14444 * Makefile.in (gdb_proc_service_h): Updated.
14445 * configure, config.in: Regenerated.
14446
14447 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14448
14449 * remote-utils.c (prepare_resume_reply): Move declaration
14450 of gdb_id_from_wait to the top of the block.
14451
14452 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14453
14454 * linux-low.c (regsets_store_inferior_registers): Read the regset
14455 from the target before filling it.
14456
14457 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14458
14459 * server.c (attach_inferior): Return SIGTRAP for a successful
14460 attach.
14461
14462 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14463
14464 * Makefile.in (OBS): Add version.o.
14465 (STAGESTUFF): Delete.
14466 (version.o): Add dependencies.
14467 (version.c): Replace rule.
14468 (clean): Remove version.c.
14469 * server.c (gdbserver_version): New.
14470 (gdbserver_usage): Use printf.
14471 (main): Handle --version and --help.
14472 * server.h (version, host_name): Add declarations.
14473
14474 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14475
14476 * linux-arm-low.c:
14477 * linux-arm-low.c:
14478 * inferiors.c:
14479 * i387-fp.h:
14480 * i387-fp.c:
14481 * gdbreplay.c:
14482 * regcache.c:
14483 * proc-service.c:
14484 * mem-break.h:
14485 * mem-break.c:
14486 * linux-x86-64-low.c:
14487 * linux-sh-low.c:
14488 * linux-s390-low.c:
14489 * linux-ppc64-low.c:
14490 * linux-ppc-low.c:
14491 * linux-mips-low.c:
14492 * linux-m68k-low.c:
14493 * linux-m32r-low.c:
14494 * linux-low.h:
14495 * linux-low.c:
14496 * linux-ia64-low.c:
14497 * linux-i386-low.c:
14498 * linux-crisv32-low.c:
14499 * thread-db.c:
14500 * terminal.h:
14501 * target.h:
14502 * target.c:
14503 * server.h:
14504 * server.c:
14505 * remote-utils.c:
14506 * regcache.h:
14507 * utils.c:
14508 * Makefile.in:
14509 * configure.ac:
14510 * gdbserver.1: Add (C) after Copyright. Update the FSF
14511 address.
14512
14513 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14514
14515 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14516 (arm_breakpoint_at): Recognize both breakpoints.
14517 (the_low_target): Use the correct breakpoint instruction.
14518
14519 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14520
14521 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14522 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14523 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14524 (the_low_target): Update.
14525
14526 2005-10-25 Andreas Schwab <schwab@suse.de>
14527
14528 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14529
14530 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14531 (ia64_num_regs): Reduce to 462.
14532
14533 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * acinclude.m4: Correct quoting.
14536 * aclocal.m4: Regenerated.
14537
14538 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14539 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14540 (thread_db_init): Call thread_db_err_str.
14541 * configure.ac: Check for TD_VERSION.
14542 * config.in, configure: Regenerated.
14543
14544 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14545
14546 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14547
14548 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14549
14550 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14551 is not available. Define HAVE_PTRACE_GETREGS if it is.
14552 * config.in, configure: Regenerated.
14553 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14554 * linux-i386-low.c, linux-m68k-low.c: Update to use
14555 HAVE_PTRACE_GETREGS.
14556 * linux-low.c (regsets_fetch_inferior_registers)
14557 (regsets_store_inferior_registers): Only return 0 if we processed
14558 GENERAL_REGS.
14559 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14560 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14561
14562 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14563
14564 * inferiors.c (struct thread_info): Add gdb_id.
14565 (add_thread): Add gdb_id argument.
14566 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14567 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14568 calls to add_thread.
14569 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14570 * server.c (handle_query): Use thread_to_gdb_id.
14571 (handle_v_cont, main): Use gdb_id_to_thread_id.
14572 * server.h (add_thread): Update prototype.
14573 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14574 prototypes.
14575
14576 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14577
14578 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14579 left-padded registers.
14580 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14581 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14582
14583 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14584
14585 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14586 * configure: Regenerate.
14587 * config.in: Regenerate.
14588 * server.h (NEED_DECLARATION_STRERROR):
14589 Replace with !HAVE_DECL_STRERROR.
14590
14591 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * linux-low.c (linux_wait, linux_send_signal): Don't test
14594 an unsigned long variable for > 0 if it could be MAX_ULONG.
14595 * server.c (myresume): Likewise.
14596 * target.c (set_desired_inferior): Likewise.
14597
14598 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14599
14600 * configure.ac: Simplify and improve check for socklen_t.
14601 * configure, config.in: Regenerate.
14602
14603 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14604
14605 * acconfig.h: Remove.
14606 * configure.ac: Add a test for socklen_t. Use three-argument
14607 AC_DEFINE throughout.
14608 * config.in: Regenerated using autoheader 2.59.
14609 * configure: Regenerated.
14610
14611 * gdbreplay.c (socklen_t): Provide a default.
14612 (remote_open): Use socklen_t.
14613 * remote-utils.c (socklen_t): Provide a default.
14614 (remote_open): Use socklen_t.
14615 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14616 unsigned char.
14617
14618 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14619 char for buffers.
14620 * linux-low.c (linux_read_memory, linux_write_memory)
14621 (linux_read_auxv): Likewise.
14622 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14623 (check_mem_write): Likewise.
14624 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14625 Likewise.
14626 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14627 (registers_from_string, register_data): Likewise.
14628 * server.c (handle_query, main): Likewise.
14629 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14630 (decode_M_packet): Likewise.
14631 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14632 * target.h (struct target_ops): Update read_memory, write_memory,
14633 and read_auxv.
14634 (read_inferior_memory, write_inferior_memory): Update.
14635 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14636 to unsigned char *.
14637 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14638 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14639 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14640 linux-s390-low.c, linux-sh-low.c: Update for changes in
14641 read_inferior_memory and the_low_target->breakpoint.
14642
14643 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14644
14645 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14646 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14647 * configure.srv: Add powerpc64-*-linux*.
14648 * linux-ppc64-low.c: New file.
14649
14650 2005-05-23 Orjan Friberg <orjanf@axis.com>
14651
14652 * linux-cris-low.c: New file with support for CRIS.
14653 * linux-crisv32-low.c: Ditto for CRISv32.
14654 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14655 (clean): Add reg-cris.c and reg-crisv32.c.
14656 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14657 reg-crisv32.o, and reg-crisv32.c to make rules.
14658 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14659 recognized targets.
14660
14661 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14662
14663 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14664 of sizeof (PTRACE_XFER_TYPE).
14665 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14666
14667 2005-05-12 Orjan Friberg <orjanf@axis.com>
14668
14669 * target.h (struct target_ops): Add insert_watchpoint,
14670 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14671 pointers for hardware watchpoint support.
14672 * linux-low.h (struct linux_target_ops): Ditto.
14673 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14674 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14675 to linux_target_ops.
14676 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14677 reply packet.
14678 * server.c (main): Recognize 'Z' and 'z' packets.
14679
14680 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14681
14682 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14683 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14684 (the_low_target): Add new members.
14685
14686 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14687
14688 * proc-service.c (ps_lgetregs): Search all_processes instead of
14689 all_threads.
14690
14691 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14692
14693 * server.c (start_inferior): Change return type to int.
14694 (attach_inferior): Change sigptr to int *.
14695 (handle_v_cont, handle_v_requests): Change signal to int *.
14696 (main): Change signal to int.
14697
14698 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14699
14700 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14701 * configure.srv: Add m32r*-*-linux*.
14702 * linux-m32r-low.c: New file.
14703
14704 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14707
14708 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14709
14710 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14711 Take unsigned long arguments for PIDs.
14712 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14713 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14714 (wait_for_sigstop, linux_resume_one_process)
14715 (regsets_fetch_inferior_registers, linux_send_signal)
14716 (linux_read_auxv): Likewise. Update the types of variables holding
14717 PIDs. Update format string specifiers.
14718 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14719 * remote-utils.c (prepare_resume_reply): Likewise.
14720 * server.c (cont_thread, general_thread, step_thread)
14721 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14722 unsigned long.
14723 (handle_query): Update format specifiers.
14724 (handle_v_cont, main): Use strtoul for thread IDs.
14725 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14726 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14727 (general_thread, step_thread, thread_from_wait)
14728 (old_thread_from_wait): Update.
14729 * target.h (struct thread_resume): Use unsigned long for THREAD.
14730 (struct target_ops): Use unsigned long for arguments to attach and
14731 thread_alive.
14732
14733 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14734
14735 * acinclude.m4: Include bfd/bfd.m4 directly.
14736 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14737 <agriffis@toolchain.org>.
14738 * aclocal.m4, configure: Regenerated.
14739
14740 2005-01-07 Andrew Cagney <cagney@gnu.org>
14741
14742 * configure.ac: Rename configure.in, require autoconf 2.59.
14743 * configure: Re-generate.
14744
14745 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14746
14747 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14748 LIBS when finished.
14749 * aclocal.m4: Regenerated.
14750 * configure: Regenerated.
14751
14752 2004-11-21 Andreas Schwab <schwab@suse.de>
14753
14754 * linux-m68k-low.c (m68k_num_gregs): Define.
14755 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14756 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14757 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14758 (m68k_breakpoint_at): New. Add to the_low_target.
14759
14760 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14761 srv_linux_thread_db to yes.
14762
14763 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14764
14765 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14766 (ARCH_SET_FS): Likewise.
14767 (ARCH_GET_FS): Likewise.
14768 (ARCH_GET_GS): Likewise.
14769
14770 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14771
14772 * linux-i386-low.c (ps_get_thread_area): New.
14773 * linux-x86-64-low.c (ps_get_thread_area): New.
14774 * linux-low.c: Include <sys/syscall.h>.
14775 (linux_kill_one_process): Don't kill the first thread here.
14776 (linux_kill): Kill the first thread here.
14777 (kill_lwp): New function.
14778 (send_sigstop, linux_send_signal): Use it.
14779 * proc-service.c: Clean up #ifdefs.
14780 (fpregset_info): Delete.
14781 (ps_lgetregs): Update and enable implementation.
14782 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14783 implementations.
14784 * remote-utils.c (struct sym_cache, symbol_cache): New.
14785 (input_interrupt): Print a clearer message.
14786 (async_io_enabled): New variable.
14787 (enable_async_io, disable_async_io): Use it. Update comments.
14788 (look_up_one_symbol): Use the symbol cache.
14789 * thread-db.c (thread_db_look_up_symbols): New function.
14790 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14791
14792 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14793
14794 * configure.in: Test for -rdynamic.
14795 * configure: Regenerated.
14796 * Makefile (INTERNAL_LDFLAGS): New.
14797 (gdbserver, gdbreplay): Use it.
14798
14799 2004-09-02 Andrew Cagney <cagney@gnu.org>
14800
14801 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14802
14803 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14804
14805 * linux-low.c (linux_wait): Clear all_processes list also.
14806
14807 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14808
14809 * linux-low.c: Include <errno.h>. Remove extern declaration of
14810 errno.
14811
14812 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14813
14814 * gdbreplay.c, server.h, utils.c: Update copyright years.
14815
14816 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14817
14818 * server.c (main): Print child status or termination signal from
14819 variable 'signal', not 'sig'.
14820
14821 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14822
14823 * linux-low.c (linux_read_memory): Change return type to
14824 int. Check for and return error from ptrace().
14825 * target.c (read_inferior_memory): Change return type to int. Pass
14826 back return status from the_target->read_memory().
14827 * target.h (struct target_ops): Adapt *read_memory() prototype.
14828 Update comment.
14829 (read_inferior_memory): Adapt prototype.
14830 * server.c (main): Return an error packet if
14831 read_inferior_memory() returns an error.
14832
14833 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14834
14835 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14836 Unify with other clean targets.
14837
14838 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14839
14840 * server.c (handle_v_cont): Call set_desired_inferior.
14841
14842 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14843
14844 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14845
14846 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14847
14848 * linux-low.c (linux_wait): Unblock async I/O.
14849 (linux_resume): Block and enable async I/O.
14850 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14851 * server.h (block_async_io, unblock_async_io): Add prototypes.
14852
14853 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14854
14855 * remote-utils.c (remote_open): Print a status notice after
14856 opening a TCP port.
14857 * server.c (attach_inferior): Print a status notice after
14858 attaching.
14859
14860 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14861
14862 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14863
14864 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14865
14866 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14867 error packet.
14868 * server.c, target.h: Update copyright years.
14869
14870 2004-02-25 Roland McGrath <roland@redhat.com>
14871
14872 * target.h (struct target_ops): New member `read_auxv'.
14873 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14874 * linux-low.c (linux_read_auxv): New function.
14875 (linux_target_ops): Initialize `read_auxv' member to that.
14876
14877 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14878
14879 Committed by Jim Blandy <jimb@redhat.com>.
14880
14881 * linux-s390-low.c (s390_num_regs): Update.
14882 (s390_regmap): Remove control registers. Use __s390x__ predefine
14883 instead of GPR_SIZE to distiguish s390 and s390x targets.
14884
14885 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14886
14887 * linux-low.c: Update copyright year.
14888 (check_removed_breakpoint): Clear pending_is_breakpoint.
14889 (linux_set_resume_request, linux_queue_one_thread)
14890 (resume_status_pending_p): New functions.
14891 (linux_continue_one_thread): Use process->resume.
14892 (linux_resume): Only resume threads if there are no pending events.
14893 * linux-low.h (struct process_info): Add resume request
14894 pointer.
14895
14896 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14897
14898 * regcache.c (new_register_cache): Clear the allocated register
14899 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14900
14901 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14902
14903 * linux-low.c (linux_resume): Take a struct thread_resume *
14904 argument.
14905 (linux_wait): Update call.
14906 (resume_ptr): New static variable.
14907 (linux_continue_one_thread): Renamed from
14908 linux_continue_one_process. Use resume_ptr.
14909 (linux_resume): Use linux_continue_one_thread.
14910 * server.c (handle_v_cont, handle_v_requests): New functions.
14911 (myresume): New function.
14912 (main): Handle 'v' case.
14913 * target.h (struct thread_resume): New type.
14914 (struct target_ops): Change argument of "resume" to struct
14915 thread_resume *.
14916 (myresume): Delete macro.
14917
14918 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14919
14920 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14921 (uninstall): Support DESTDIR.
14922
14923 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14924
14925 * configure.srv: Add xscale*linux copy of arm*linux entry.
14926
14927 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14928
14929 * linux-arm-low.c (arm_reinsert_addr): New function.
14930 (the_low_target): Add arm_reinsert_addr.
14931
14932 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14933
14934 * mem-break.c: Remove whitespace at end of file.
14935
14936 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14937
14938 * configure.in: Check whether we need to prototype strerror.
14939 * server.h: Optionally prototype strerror.
14940 * gdbreplay.c (perror_with_name): Use strerror.
14941 * linux-low.c (linux_attach_lwp): Use strerror.
14942 * utils.c (perror_with_name): Use strerror.
14943 * config.in, configure: Regenerated.
14944
14945 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14946
14947 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14948 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14949
14950 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14951
14952 * Makefile.in (SFILES): Update.
14953 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14954 low-sun3.c: Remove files.
14955
14956 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14957
14958 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14959 (linux_detach_one_process, linux_detach): New functions.
14960 (linux_target_ops): Add linux_detach.
14961 * server.c (main): Handle 'D' packet.
14962 * target.h (struct target_ops): Add "detach" member.
14963 (detach_inferior): Define.
14964
14965 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14966
14967 From Kelley Cook <kelleycook@wideopenwest.com>:
14968 * configure.srv: Accept i[34567]86 variants.
14969
14970 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14971
14972 * linux-low.c (linux_wait_for_event): Correct comment typos.
14973 (linux_resume_one_process): Call check_removed_breakpoint.
14974 (linux_send_signal): New function.
14975 (linux_target_ops): Add linux_send_signal.
14976 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14977 of kill.
14978 * target.h (struct target_ops): Add send_signal.
14979
14980 2003-05-29 Jim Blandy <jimb@redhat.com>
14981
14982 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14983 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14984 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14985 away part of the register's value.
14986
14987 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14988
14989 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14990 (linux_wait_for_event, linux_init_signals): Likewise.
14991
14992 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14993
14994 * configure.in: Check for stdlib.h.
14995 * configure: Regenerated.
14996 * config.in: Regenerated.
14997
14998 2003-01-04 Andreas Schwab <schwab@suse.de>
14999
15000 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15001
15002 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15003
15004 * Makefile.in: Remove obsolete code.
15005
15006 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15007
15008 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15009 defined(PT_FPR0_HI).
15010
15011 2002-11-17 Stuart Hughes <seh@zee2.com>
15012
15013 * linux-arm-low.c (arm_num_regs): Increase.
15014 (arm_regmap): Include status register.
15015
15016 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15017
15018 * linux-low.c (register_addr): Remove incorrect -1 check.
15019
15020 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15021
15022 * linux-low.c (linux_create_inferior): Call setpgid. Return
15023 the new PID.
15024 (unstopped_p, linux_signal_pid): Remove.
15025 (linux_target_ops): Remove linux_signal_pid.
15026 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15027 global instead of target method.
15028 * target.h (struct target_ops): Remove signal_pid. Update comment
15029 for create_inferior.
15030 * server.c (signal_pid): New variable.
15031 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15032 gdbserver. Set the child to be the foreground process group.
15033 (attach_inferior): Set signal_pid.
15034
15035 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15036
15037 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15038
15039 2002-08-20 Jim Blandy <jimb@redhat.com>
15040
15041 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15042 default for this.
15043
15044 2002-08-01 Andrew Cagney <cagney@redhat.com>
15045
15046 * Makefile.in: Make chill references obsolete.
15047
15048 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15049
15050 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15051 * configure: Regenerate.
15052 * config.in: Regenerate.
15053
15054 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15055
15056 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15057 (perror_with_name, remote_close, remote_open, expect, play): Static.
15058
15059 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15060
15061 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15062 byte offsets instead of an array of indexes.
15063 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15064
15065 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15066
15067 * regcache.c: Add comment.
15068
15069 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15070
15071 * thread-db.c: New file.
15072 * proc-service.c: New file.
15073 * acinclude.m4: New file.
15074 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15075 proc-service.o, and thread-db.o.
15076 (linux-low.o): Add USE_THREAD_DB.
15077 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15078 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15079 * aclocal.m4: Regenerated.
15080 * config.in: Regenerated.
15081 * configure: Regenerated.
15082 * configure.in: Check for proc_service.h, sys/procfs.h,
15083 thread_db.h, and linux/elf.h headrs.
15084 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15085 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15086 Check for -lthread_db and thread support.
15087 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15088 PowerPC, and SuperH.
15089 * i387-fp.c: Constify arguments.
15090 * i387-fp.h: Likewise.
15091 * inferiors.c: (struct thread_info): Renamed from
15092 `struct inferior_info'. Remove PID member. Use generic inferior
15093 list header. All uses updated.
15094 (inferiors, signal_pid): Removed.
15095 (all_threads): New variable.
15096 (get_thread): Define.
15097 (add_inferior_to_list): New function.
15098 (for_each_inferior): New function.
15099 (change_inferior_id): New function.
15100 (add_inferior): Removed.
15101 (remove_inferior): New function.
15102 (add_thread): New function.
15103 (free_one_thread): New function.
15104 (remove_thread): New function.
15105 (clear_inferiors): Use for_each_inferior and free_one_thread.
15106 (find_inferior): New function.
15107 (find_inferior_id): New function.
15108 (inferior_target_data): Update argument type.
15109 (set_inferior_target_data): Likewise.
15110 (inferior_regcache_data): Likewise.
15111 (set_inferior_regcache_data): Likewise.
15112 * linux-low.c (linux_bp_reinsert): Remove.
15113 (all_processes, stopping_threads, using_thrads)
15114 (struct pending_signals, debug_threads, pid_of): New.
15115 (inferior_pid): Replace with macro.
15116 (struct inferior_linux_data): Remove.
15117 (get_stop_pc, add_process): New functions.
15118 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15119 Use add_process and add_thread.
15120 (linux_attach_lwp): New function, based on old linux_attach. Use
15121 add_process and add_thread. Set stop_expected for new threads.
15122 (linux_attach): New function.
15123 (linux_kill_one_process): New function.
15124 (linux_kill): Kill all LWPs.
15125 (linux_thread_alive): Use find_inferior_id.
15126 (check_removed_breakpoints, status_pending_p): New functions.
15127 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15128 Update. Use WNOHANG. Wait for cloned processes also. Update process
15129 struct for the found process.
15130 (linux_wait_for_event): New function.
15131 (linux_wait): Use it. Support LWPs.
15132 (send_sigstop, wait_for_sigstop, stop_all_processes)
15133 (linux_resume_one_process, linux_continue_one_process): New functions.
15134 (linux_resume): Support LWPs.
15135 (REGISTER_RAW_SIZE): Remove.
15136 (fetch_register): Use register_size instead. Call supply_register.
15137 (usr_store_inferior_registers): Likewise. Call collect_register.
15138 Fix recursive case.
15139 (regsets_fetch_inferior_registers): Improve error message.
15140 (regsets_store_inferior_registers): Add debugging.
15141 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15142 (unstopped_p, linux_signal_pid): New functions.
15143 (linux_target_ops): Add linux_signal_pid.
15144 (linux_init_signals): New function.
15145 (initialize_low): Call it. Initialize using_threads.
15146 * regcache.c (inferior_regcache_data): Add valid
15147 flag.
15148 (get_regcache): Fetch registers lazily. Add fetch argument
15149 and update all callers.
15150 (regcache_invalidate_one, regcache_invalidate): New
15151 functions.
15152 (new_register_cache): Renamed from create_register_cache.
15153 Return the new regcache.
15154 (free_register_cache): Change argument to a void *.
15155 (registers_to_string, registers_from_string): Call get_regcache
15156 with fetch flag set.
15157 (register_data): Make static. Pass fetch flag to get_regcache.
15158 (supply_register): Call get_regcache with fetch flag clear.
15159 (collect_register): Call get_regcache with fetch flag set.
15160 (collect_register_as_string): New function.
15161 * regcache.h: Update.
15162 * remote-utils.c (putpkt): Flush after debug output and use
15163 stderr.
15164 Handle input interrupts while waiting for an ACK.
15165 (input_interrupt): Use signal_pid method.
15166 (getpkt): Flush after debug output and use stderr.
15167 (outreg): Use collect_register_as_string.
15168 (new_thread_notify, dead_thread_notify): New functions.
15169 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15170 and general_thread.
15171 (look_up_one_symbol): Flush after debug output.
15172 * server.c (step_thread, server_waiting): New variables.
15173 (start_inferior): Don't use signal_pid. Update call to mywait.
15174 (attach_inferior): Update call to mywait.
15175 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15176 (main): Don't fetch/store registers explicitly. Use
15177 set_desired_inferior. Support proposed ``Hs'' packet. Update
15178 calls to mywait.
15179 * server.h: Update.
15180 (struct inferior_list, struct_inferior_list_entry): New.
15181 * target.c (set_desired_inferior): New.
15182 (write_inferior_memory): Constify.
15183 (mywait): New function.
15184 * target.h: Update.
15185 (struct target_ops): New signal_pid method.
15186 (mywait): Removed macro, added prototype.
15187
15188 * linux-low.h (regset_func): Removed.
15189 (regset_fill_func, regset_store_func): New.
15190 (enum regset_type): New.
15191 (struct regset_info): Add type field. Use new operation types.
15192 (struct linux_target_ops): stop_pc renamed to get_pc.
15193 Add decr_pc_after_break and breakpoint_at.
15194 (get_process, get_thread_proess, get_process_thread)
15195 (strut process_info, all_processes, linux_attach_lwp)
15196 (thread_db_init): New.
15197
15198 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15199 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15200 (the_low_target): Add new members.
15201 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15202 (i386_store_fpxregset): Constify.
15203 (target_regsets): Add new kind identifier.
15204 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15205 (i386_set_pc): Add debugging.
15206 (i386_breakpoint_at): New function.
15207 (the_low_target): Add new members.
15208 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15209 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15210 (mips_breakpoint_at): New.
15211 (the_low_target): Add new members.
15212 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15213 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15214 (the_low_target): Add new members.
15215 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15216 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15217 (the_low_target): Add new members.
15218 * linux-x86-64-low.c (target_regsets): Add new kind
15219 identifier.
15220
15221 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15222
15223 From Martin Pool <mbp@samba.org>:
15224 * server.c (gdbserver_usage): New function.
15225 (main): Call it.
15226
15227 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15228
15229 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15230 stop_at -> stop_pc.
15231
15232 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15233
15234 * Makefile.in: Remove obsolete code.
15235
15236 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15237
15238 * linux-low.c (regsets_fetch_inferior_registers),
15239 (regsets_store_inferior_registers): Removed cast to int from
15240 ptrace() calls.
15241 * regcache.h: Added declaration of struct inferior_info.
15242
15243 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15244
15245 * inferiors.c (struct inferior_info): Add regcache_data.
15246 (add_inferior): Call create_register_cache.
15247 (clear_inferiors): Call free_register_cache.
15248 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15249 * regcache.c (struct inferior_regcache_data): New.
15250 (registers): Remove.
15251 (get_regcache): New function.
15252 (create_register_cache, free_register_cache): New functions.
15253 (set_register_cache): Don't initialize the register cache here.
15254 (registers_to_string, registers_from_string, register_data): Call
15255 get_regcache.
15256 * regcache.h: Add prototypes.
15257 * server.h: Likewise.
15258
15259 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15260
15261 * mem-break.c: New file.
15262 * mem-break.h: New file.
15263 * Makefile.in: Add mem-break.o rule; update server.h
15264 dependencies.
15265 * inferiors.c (struct inferior_info): Add target_data
15266 member.
15267 (clear_inferiors): Free target_data member if set.
15268 (inferior_target_data, set_inferior_target_data): New functions.
15269 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15270 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15271 * linux-low.c (linux_bp_reinsert): New variable.
15272 (struct inferior_linux_data): New.
15273 (linux_create_inferior): Use set_inferior_target_data.
15274 (linux_attach): Likewise. Call add_inferior.
15275 (linux_wait_for_one_inferior): New function.
15276 (linux_wait): Call it.
15277 (linux_write_memory): Add const.
15278 (initialize_low): Call set_breakpoint_data.
15279 * linux-low.h (struct linux_target_ops): Add breakpoint
15280 handling members.
15281 * server.c (attach_inferior): Remove extra add_inferior
15282 call.
15283 * server.h: Include mem-break.h. Update inferior.c
15284 prototypes.
15285 * target.c (read_inferior_memory)
15286 (write_inferior_memory): New functions.
15287 * target.h (read_inferior_memory)
15288 (write_inferior_memory): Change macros to prototypes.
15289 (struct target_ops): Update comments. Add const to write_memory
15290 definition.
15291
15292 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15293
15294 * linux-low.c (usr_store_inferior_registers): Support
15295 registers which are allowed to fail to store.
15296 * linux-low.h (linux_target_ops): Likewise.
15297 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15298 (ppc_cannot_store_register): FPSCR may not be storable.
15299
15300 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15301
15302 * server.h: Include <string.h> if HAVE_STRING_H.
15303 * ChangeLog: Correct paths in last ChangeLog entry.
15304
15305 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15306
15307 * linux-low.h: Remove obsolete prototypes.
15308 (struct linux_target_ops): New.
15309 (extern the_low_target): New.
15310 * linux-low.c (num_regs, regmap): Remove declarations.
15311 (register_addr): Use the_low_target explicitly.
15312 (fetch_register): Likewise.
15313 (usr_fetch_inferior_registers): Likewise.
15314 (usr_store_inferior_registers): Likewise.
15315 * linux-arm-low.c (num_regs): Remove.
15316 (arm_num_regs): Define.
15317 (arm_regmap): Renamed from regmap, made static.
15318 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15319 made static.
15320 (arm_cannot_store_register): Renamed from cannot_store_register,
15321 made static.
15322 (the_low_target): New.
15323 * linux-i386-low.c (num_regs): Remove.
15324 (i386_num_regs): Define.
15325 (i386_regmap): Renamed from regmap, made static.
15326 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15327 made static.
15328 (i386_cannot_store_register): Renamed from cannot_store_register,
15329 made static.
15330 (the_low_target): New.
15331 * linux-ia64-low.c (num_regs): Remove.
15332 (ia64_num_regs): Define.
15333 (ia64_regmap): Renamed from regmap, made static.
15334 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15335 made static.
15336 (ia64_cannot_store_register): Renamed from cannot_store_register,
15337 made static.
15338 (the_low_target): New.
15339 * linux-m68k-low.c (num_regs): Remove.
15340 (m68k_num_regs): Define.
15341 (m68k_regmap): Renamed from regmap, made static.
15342 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15343 made static.
15344 (m68k_cannot_store_register): Renamed from cannot_store_register,
15345 made static.
15346 (the_low_target): New.
15347 * linux-mips-low.c (num_regs): Remove.
15348 (mips_num_regs): Define.
15349 (mips_regmap): Renamed from regmap, made static.
15350 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15351 made static.
15352 (mips_cannot_store_register): Renamed from cannot_store_register,
15353 made static.
15354 (the_low_target): New.
15355 * linux-ppc-low.c (num_regs): Remove.
15356 (ppc_num_regs): Define.
15357 (ppc_regmap): Renamed from regmap, made static.
15358 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15359 made static.
15360 (ppc_cannot_store_register): Renamed from cannot_store_register,
15361 made static.
15362 (the_low_target): New.
15363 * linux-s390-low.c (num_regs): Remove.
15364 (s390_num_regs): Define.
15365 (s390_regmap): Renamed from regmap, made static.
15366 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15367 made static.
15368 (s390_cannot_store_register): Renamed from cannot_store_register,
15369 made static.
15370 (the_low_target): New.
15371 * linux-sh-low.c (num_regs): Remove.
15372 (sh_num_regs): Define.
15373 (sh_regmap): Renamed from regmap, made static.
15374 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15375 made static.
15376 (sh_cannot_store_register): Renamed from cannot_store_register,
15377 made static.
15378 (the_low_target): New.
15379 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15380 (the_low_target): New.
15381
15382 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15383
15384 * Makefile.in: Add stamp-h target.
15385 * configure.in: Create stamp-h.
15386 * configure: Regenerated.
15387
15388 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15389
15390 * inferiors.c: New file.
15391 * target.c: New file.
15392 * target.h: New file.
15393 * Makefile.in: Add target.o and inferiors.o. Update
15394 dependencies.
15395 * linux-low.c (inferior_pid): New static variable,
15396 moved from server.c.
15397 (linux_create_inferior): Renamed from create_inferior.
15398 Call add_inferior. Return 0 on success instead of a PID.
15399 (linux_attach): Renamed from myattach.
15400 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15401 (linux_thread_alive): Renamed from mythread_alive.
15402 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15403 child dies.
15404 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15405 (regsets_store_inferior_registers): Correct error message.
15406 Add missing ``return 0''.
15407 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15408 (linux_store_registers): Renamed from store_inferior_registers.
15409 (linux_read_memory): Renamed from read_inferior_memory.
15410 (linux_write_memory): Renamed from write_inferior_memory.
15411 (linux_target_ops): New structure.
15412 (initialize_low): Call set_target_ops ().
15413 * remote-utils.c (unhexify): New function.
15414 (hexify): New function.
15415 (input_interrupt): Send signals to ``signal_pid''.
15416 * server.c (inferior_pid): Remove.
15417 (start_inferior): Update create_inferior call.
15418 (attach_inferior): Call add_inferior.
15419 (handle_query): New function.
15420 (main): Call handle_query for `q' packets.
15421 * server.h: Include "target.h". Remove obsolete prototypes.
15422 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15423
15424 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15425
15426 * Makefile.in: Add WARN_CFLAGS. Update configury
15427 dependencies.
15428 * configure.in: Check for <string.h>
15429 * configure: Regenerate.
15430 * config.in: Regenerate.
15431 * gdbreplay.c: Include needed system headers.
15432 (remote_open): Remove strchr prototype.
15433 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15434 * regcache.c (supply_register): Change buf argument to const void *.
15435 (supply_register_by_name): Likewise.
15436 (collect_register): Change buf argument to void *.
15437 (collect_register_by_name): Likewise.
15438 * regcache.h: Add missing prototypes.
15439 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15440 * server.c (handle_query): New function.
15441 (attached): New static variable, moved out of main.
15442 (main): Quiet longjmp clobber warnings.
15443 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15444 * utils.c (error): Remove NORETURN.
15445 (fatal): Likewise.
This page took 0.395128 seconds and 4 git commands to generate.