Fix build breakage on GNU/Linux AArch64
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * linux-low.c (handle_extended_wait): Use
4 "allocate_target_description" instead of "XNEW".
5 * linux-x86-low.c (initialize_low_arch): Likewise.
6
7 2017-09-05 Yao Qi <yao.qi@linaro.org>
8
9 * configure.srv (srv_i386_regobj): Remove.
10 (srv_amd64_regobj): Remove.
11 (srv_regobj): Set it to "" for x86 non-linux targets.
12 * linux-x86-tdesc.c (i386_linux_read_description):
13 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
14 (init_registers_i386): Remove the declaration.
15 (tdesc_i386): Remove the declaration.
16 (lynx_i386_arch_setup): Call i386_create_target_description.
17 * nto-x86-low.c: Likewise.
18 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
19 [!__x86_64__]: include arch/i386.h.
20 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
21
22 2017-09-05 Yao Qi <yao.qi@linaro.org>
23
24 * configure.srv (srv_amd64_linux_xmlfiles): Remove
25 i386/amd64-XXX-linux from it.
26
27 2017-09-05 Yao Qi <yao.qi@linaro.org>
28
29 * configure.srv: Empty srv_amd64_linux_regobj if $development is
30 false.
31 (ipa_amd64_linux_regobj): Remove.
32 (ipa_x32_linux_regobj): Remove.
33
34 2017-09-05 Yao Qi <yao.qi@linaro.org>
35
36 * Makefile.in (arch-amd64.o): New rule.
37 * configure.srv: Append arch-amd64.o.
38 * linux-amd64-ipa.c: Include common/x86-xstate.h.
39 (get_ipa_tdesc): Call amd64_linux_read_description.
40 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
41 and init_registers_amd64_XXX.
42 * linux-x86-low.c (x86_linux_read_description): Call
43 amd64_linux_read_description.
44 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
45 (initialize_low_arch): Don't call init_registers_x32_XXX and
46 init_registers_amd64_XXX.
47 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
48 and tdesc_amd64_XXX.
49 [__x86_64__] (amd64_tdesc_test): New function.
50 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
51 and init_registers_amd64_XXX.
52 * linux-x86-tdesc.c: Include arch/amd64.h.
53 (xcr0_to_tdesc_idx): New function.
54 (i386_linux_read_description): New function.
55 (amd64_get_ipa_tdesc_idx): New function.
56 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
57 (amd64_get_ipa_tdesc): Declare.
58
59 2017-09-05 Yao Qi <yao.qi@linaro.org>
60
61 * configure.srv (srv_i386_linux_xmlfiles): Remove
62 i386/i386-XXX-linux.xml from it.
63
64 2017-09-05 Yao Qi <yao.qi@linaro.org>
65
66 * configure.srv: Set srv_i386_linux_regobj empty if $development
67 is false.
68 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
69 initialize_low_tdesc.
70 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
71 with #if initialize_low_tdesc.
72 * linux-x86-tdesc-selftest.c: New file.
73 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
74
75 2017-09-05 Yao Qi <yao.qi@linaro.org>
76
77 * Makefile.in (arch-i386.o): New rule.
78 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
79 (x86_64-*-linux*): Likewise.
80 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
81 include arch/i386.h.
82 (i386_linux_read_description): Remove code and call
83 i386_create_target_description.
84 * tdesc.c (allocate_target_description): New function.
85 * tdesc.h (set_tdesc_architecture): Remove declaration.
86 (set_tdesc_osabi): Likewise.
87
88 2017-09-05 Yao Qi <yao.qi@linaro.org>
89
90 * linux-x86-tdesc.c: Don't include <inttypes.h>.
91 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
92 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
93 .xmltarget.
94 * server.c (get_features_xml): Call tdesc_get_features_xml.
95 * tdesc.c (set_tdesc_architecture): New function.
96 (set_tdesc_osabi): New function.
97 (tdesc_get_features_xml): New function.
98 (tdesc_create_feature): Add an argument.
99 * tdesc.h (struct target_desc) <features>: New field.
100 <arch, osabi>: New field.
101 (~target_desc): xfree features, arch, and osabi.
102 (target_desc::oerator==): Don't compare .xmltarget.
103 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
104 (set_tdesc_osabi): Likewise.
105 (tdesc_get_features_xml): Likewise.
106
107 2017-09-05 Yao Qi <yao.qi@linaro.org>
108
109 * linux-x86-tdesc.c: Include selftest.h.
110 (i386_tdesc_test): New function.
111 (initialize_low_tdesc): Call selftests::register_test.
112 * tdesc.h: Include regdef.h.
113 (target_desc): Override operator == and !=.
114
115 2017-09-05 Yao Qi <yao.qi@linaro.org>
116
117 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
118 (ipa_obj): Likewise.
119 * linux-i386-ipa.c: Include common/x86-xstate.h
120 (get_ipa_tdesc): Call i386_linux_read_description.
121 (initialize_low_tracepoint): Don't call init_registers_XXX
122 functions, call initialize_low_tdesc instead.
123 * linux-x86-low.c (x86_linux_read_description): Call
124 i386_linux_read_description.
125 (initialize_low_arch): Don't call init_registers_i386_XXX
126 functions, call initialize_low_tdesc.
127 * linux-x86-tdesc.c: New file.
128 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
129 (i386_get_ipa_tdesc_idx): Declare.
130 (i386_get_ipa_tdesc): Declare.
131 (initialize_low_tdesc): Declare.
132
133 2017-09-05 Yao Qi <yao.qi@linaro.org>
134
135 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
136 instead of 0.
137
138 2017-09-05 Yao Qi <yao.qi@linaro.org>
139
140 * Makefile.in (IPA_OBJS): Add vec-ipa.o
141 * regcache.c (get_thread_regcache): Use VEC_length.
142 (init_register_cache): Likewise.
143 (regcache_cpy): Likewise.
144 (registers_to_string): Iterate reg_defs via VEC_iterate.
145 (find_regno): Likewise.
146 (find_register_by_number): Use VEC_index.
147 (register_size): Call find_register_by_number.
148 (register_data): Call find_register_by_number.
149 (supply_regblock): Use VEC_length.
150 (regcache_raw_read_unsigned): Likewise.
151 * tdesc.c (init_target_desc): Iterate reg_defs via
152 VEC_iterate.
153 (default_description): Update initializer.
154 (copy_target_description): Don't update field num_registers.
155 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
156 <num_registers>: Remove.
157
158 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
159
160 * Makefile.in (.SECONDARY): Define target.
161
162 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
163
164 * linux-low.c (linux_wait_1): Adjust.
165 * server.c (queue_stop_reply_callback): Adjust.
166
167 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
168
169 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
170 QEnvironmentUnset and QEnvironmentReset packets.
171 (handle_query): Inform remote that QEnvironmentHexEncoded,
172 QEnvironmentUnset and QEnvironmentReset are supported.
173
174 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
175
176 * inferiors.h (inferior_target_data): Rename to ...
177 (thread_target_data): ... this.
178 (inferior_regcache_data): Rename to ...
179 (thread_regcache_data): ... this.
180 (set_inferior_regcache_data): Rename to ...
181 (set_thread_regcache_data): ... this.
182 * inferiors.c (inferior_target_data): Rename to ...
183 (thread_target_data): ... this.
184 (inferior_regcache_data): Rename to ...
185 (thread_regcache_data): ... this.
186 (set_inferior_regcache_data): Rename to ...
187 (set_thread_regcache_data): ... this.
188 (free_one_thread): Update.
189 * linux-low.h (get_thread_lwp): Update.
190 * regcache.c (get_thread_regcache): Update.
191 (regcache_invalidate_thread): Update.
192 (free_register_cache_thread): Update.
193 * win32-i386-low.c (update_debug_registers_callback): Update.
194 (win32_get_current_dr): Update.
195 * win32-low.c (thread_rec): Update.
196 (delete_thread_info): Update.
197 (continue_one_thread): Update.
198 (suspend_one_thread): Update.
199
200 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
201
202 * inferiors.c (set_inferior_target_data): Remove.
203 * inferiors.h (set_inferior_target_data): Remove.
204
205 2017-08-18 Yao Qi <yao.qi@linaro.org>
206
207 * Makefile.in (OBS): Add selftest.o.
208 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
209 * configure, config.in: Re-generated.
210 * server.c: Include common/sefltest.h.
211 (captured_main): Handle option --selftest.
212
213 2017-08-09 Yao Qi <yao.qi@linaro.org>
214
215 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
216 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
217 i386-avx-mpx.o and i386-mmx.o.
218 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
219 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
220 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
221 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
222 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
223 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
224 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
225 i386/amd64-avx-mpx.xml.
226
227 2017-08-09 Yao Qi <yao.qi@linaro.org>
228
229 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
230 and x32-avx-avx512.o.
231 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
232 i386/x32-avx-avx512.xml.
233
234 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
235
236 * tracepoint.h (enum class fast_tpoint_collect_result): New
237 enumeration.
238 (fast_tracepoint_collecting): Change return type to
239 fast_tpoint_collect_result.
240 * tracepoint.c (fast_tracepoint_collecting): Likewise.
241 * linux-low.h: Include tracepoint.h.
242 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
243 fast_tpoint_collect_result.
244 * linux-low.c (handle_tracepoints): Adjust.
245 (linux_fast_tracepoint_collecting): Change return type to
246 fast_tpoint_collect_result.
247 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
248 linux_wait_1, stuck_in_jump_pad_callback,
249 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
250 proceed_one_lwp): Adjust to type change.
251
252 2017-07-10 Yao Qi <yao.qi@linaro.org>
253
254 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
255
256 2017-06-29 Yao Qi <yao.qi@linaro.org>
257
258 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
259 Remove.
260 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
261
262 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
263
264 * Makefile.in (IPA_OBJS): Sort and format one item per line.
265
266 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
267
268 * linux-low.c (linux_create_inferior): Adjust code to access the
269 environment information via 'gdb_environ' class.
270 * lynx-low.c (lynx_create_inferior): Likewise.
271 * server.c (our_environ): Make it an instance of 'gdb_environ'.
272 (get_environ): Return a pointer to 'our_environ'.
273 (captured_main): Initialize 'our_environ'.
274 * server.h (get_environ): Adjust prototype.
275 * spu-low.c (spu_create_inferior): Adjust code to access the
276 environment information via 'gdb_environ' class.
277
278 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
279
280 * linux-low.c (linux_read_memory, linux_write_memory): Remove
281 usage of "register" keyword.
282
283 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
284
285 * configure: Re-generate.
286
287 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
288
289 * configure: Re-generate.
290
291 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
292
293 * Makefile.in (COMPILE.pre): Add "-x c++".
294
295 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
296
297 * fork-child.c: Conditionally include <signal.h>.
298
299 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
300
301 * server.c (handle_general_set): Handle new packet
302 "QStartupWithShell".
303 (handle_query): Add "QStartupWithShell" to the list of supported
304 packets.
305 (gdbserver_usage): Add help text explaining the
306 new "--startup-with-shell" and "--no-startup-with-shell" CLI
307 options.
308 (captured_main): Recognize and act upon the presence of the new
309 CLI options.
310
311 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
312 Pedro Alves <palves@redhat.com>
313
314 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
315 * configure: Regenerate.
316 * configure.srv (srv_linux_obj): Add "fork-child.o" and
317 "fork-inferior.o".
318 (i[34567]86-*-lynxos*): Likewise.
319 (spu*-*-*): Likewise.
320 * fork-child.c: New file.
321 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
322 and "environ.h".
323 (linux_ptrace_fun): New function.
324 (linux_create_inferior): Adjust function prototype to reflect
325 change on "target.h". Adjust function code to use
326 "fork_inferior".
327 (linux_request_interrupt): Delete "signal_pid".
328 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
329 (lynx_ptrace_fun): New function.
330 (lynx_create_inferior): Adjust function prototype to reflect
331 change on "target.h". Adjust function code to use
332 "fork_inferior".
333 * nto-low.c (nto_create_inferior): Adjust function prototype and
334 code to reflect change on "target.h". Update comments.
335 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
336 "common-terminal.h" and "environ.h".
337 (terminal_fd): Moved to fork-child.c.
338 (old_foreground_pgrp): Likewise.
339 (restore_old_foreground_pgrp): Likewise.
340 (last_status): Make it global.
341 (last_ptid): Likewise.
342 (our_environ): New variable.
343 (startup_with_shell): Likewise.
344 (program_name): Likewise.
345 (program_argv): Rename to...
346 (program_args): ...this.
347 (wrapper_argv): New variable.
348 (start_inferior): Delete function.
349 (get_exec_wrapper): New function.
350 (get_exec_file): Likewise.
351 (get_environ): Likewise.
352 (prefork_hook): Likewise.
353 (post_fork_inferior): Likewise.
354 (postfork_hook): Likewise.
355 (postfork_child_hook): Likewise.
356 (handle_v_run): Update code to deal with arguments coming from the
357 remote host. Update calls from "start_inferior" to
358 "create_inferior".
359 (captured_main): Likewise. Initialize environment variable. Call
360 "have_job_control".
361 * server.h (post_fork_inferior): New prototype.
362 (get_environ): Likewise.
363 (last_status): Declare.
364 (last_ptid): Likewise.
365 (signal_pid): Likewise.
366 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
367 (spu_ptrace_fun): New function.
368 (spu_create_inferior): Adjust function prototype to reflect change
369 on "target.h". Adjust function code to use "fork_inferior".
370 * target.c (target_terminal_init): New function.
371 (target_terminal_inferior): Likewise.
372 (target_terminal_ours): Likewise.
373 * target.h: Include <vector>.
374 (struct target_ops) <create_inferior>: Update prototype.
375 (create_inferior): Update macro.
376 * utils.c (gdb_flush_out_err): New function.
377 * win32-low.c (win32_create_inferior): Adjust function prototype
378 and code to reflect change on "target.h".
379
380 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
381
382 * inferiors.c (switch_to_thread): New function.
383
384 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
385
386 * Makefile.in (SFILE): Add "common/job-control.c".
387 (OBS): Add "job-control.o".
388
389 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
390
391 * Makefile: Remove "@host_makefile_frag@".
392
393 2017-05-05 Pedro Alves <palves@redhat.com>
394
395 * configure: Regenerate.
396
397 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
398
399 * configure: Regenerate.
400
401 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
402
403 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
404 software_single_step change of return type to
405 std::vector<CORE_ADDR>.
406 * linux-low.c (install_software_single_step_breakpoints):
407 Likewise.
408 * linux-low.h (install_software_single_step_breakpoints):
409 Likewise.
410
411 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
412
413 * remote-utils.c: Include "gdb_termios.h" instead of
414 "terminal.h".
415 * terminal.h: Delete file.
416
417 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
418
419 * server.c: Include <vector>.
420 <program_argv, wrapper_argv>: Convert to std::vector.
421 (start_inferior): Rewrite function to use C++.
422 (handle_v_run): Likewise. Update code that calculates the argv
423 based on the vRun packet; use C++.
424 (captured_main): Likewise.
425
426 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
427
428 * server.c (handle_v_cont): Initialize thread_resume::thread
429 with null_ptid.
430
431 2017-04-05 Pedro Alves <palves@redhat.com>
432
433 * configure: Regenerate.
434
435 2017-04-05 Pedro Alves <palves@redhat.com>
436
437 * gdbreplay.c (sync_error): Constify.
438 * linux-x86-low.c (push_opcode): Constify.
439
440 2017-04-05 Pedro Alves <palves@redhat.com>
441
442 * win32-low.c (get_child_debug_event)
443 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
444 Report TARGET_WAITKIND_SPURIOUS instead.
445
446 2017-04-05 Pedro Alves <palves@redhat.com>
447
448 * remote-utils.c (remote_prepare, remote_open): Constify.
449 * remote-utils.h (remote_prepare, remote_open): Constify.
450 * server.c (captured_main): Constify 'port' handling.
451
452 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
453
454 * Makefile.in (clean): Clear .deps.
455
456 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
457
458 * .gitignore: Remove generated files, replace with wildcard.
459 * (clean): Replace removal of generated files with wildcard.
460 (version.c): Replace with...
461 (version-generated.c): ...this.
462 (xml-builtin.c): Replace with...
463 (xml-builtin-generated.c): ...this.
464 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
465 (%.c: *regformats*): Replace with...
466 (%-generated.c: *regformats*): ...this.
467
468 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
469
470 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
471 (xtensa_fill_gregset): Call collect_register_by_name for
472 threadptr register.
473 (xtensa_store_gregset): Call supply_register_by_name for
474 threadptr register.
475
476 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
477
478 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
479 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
480 (xtensa_store_gregset): Call supply_register for all registers in
481 a0_regnum..a0_regnum + C0_NREGS range.
482
483 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
484
485 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
486 (ax-ipa.o: ax.c): Remove.
487 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
488 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
489 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
490 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
491 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
492
493 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
494
495 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
496 (print-utils-ipa.o: ../common/print-utils.c): Remove.
497 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
498 (errors-ipa.o: ../common/errors.c): Remove.
499 (format-ipa.o: ../common/format.c): Remove.
500 (common-utils-ipa.o: ../common/common-utils.c): Remove.
501
502 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
503
504 * Makefile.in (%-ipa.o: %.c): New rule.
505 (tracepoint-ipa.o: tracepoint.c): Remove.
506 (utils-ipa.o: utils.c): Remove.
507 (remote-utils-ipa.o: remote-utils.c): Remove.
508 (regcache-ipa.o: regcache.c): Remove.
509 (i386-linux-ipa.o: i386-linux.c): Remove.
510 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
511 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
512 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
513 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
514 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
515 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
516 (amd64-linux-ipa.o: amd64-linux.c): Remove.
517 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
518 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
519 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
520 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
521 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
522 (aarch64-ipa.o: aarch64.c): Remove.
523 (s390-linux32-ipa.o: s390-linux32.c): Remove.
524 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
525 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
526 (s390-linux64-ipa.o: s390-linux64.c): Remove.
527 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
528 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
529 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
530 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
531 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
532 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
533 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
534 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
535 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
536 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
537 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
538 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
539 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
540 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
541 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
542 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
543 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
544 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
545 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
546 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
547 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
548 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
549 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
550 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
551 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
552 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
553 (tdesc-ipa.o: tdesc.c): Remove.
554 (x32-linux-ipa.o: x32-linux.c): Remove.
555 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
556 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
557
558 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
559
560 * Makefile.in (%.o: ../arch/%.c): New rule.
561 (arm.o: ../arch/arm.c): Remove.
562 (arm-linux.o: ../arch/arm-linux.c): Remove.
563 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
564 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
565
566 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
567
568 * Makefile.in (%.o: ../nat/%.c): New rule.
569 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
570 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
571 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
572 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
573 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
574 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
575 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
576 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
577 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
578 (linux-personality.o: ../nat/linux-personality.c): Remove.
579 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
580 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
581 (x86-linux.o: ../nat/x86-linux.c): Remove.
582 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
583 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
584
585 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
586
587 * Makefile.in (%.o: ../common/%.c): New rule.
588 (signals.o: ../common/signals.c): Remove.
589 (print-utils.o: ../common/print-utils.c): Remove.
590 (rsp-low.o: ../common/rsp-low.c): Remove.
591 (common-utils.o: ../common/common-utils.c): Remove.
592 (posix-strerror.o: ../common/posix-strerror.c): Remove.
593 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
594 (vec.o: ../common/vec.c): Remove.
595 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
596 (xml-utils.o: ../common/xml-utils.c): Remove.
597 (ptid.o: ../common/ptid.c): Remove.
598 (buffer.o: ../common/buffer.c): Remove.
599 (format.o: ../common/format.c): Remove.
600 (filestuff.o: ../common/filestuff.c): Remove.
601 (agent.o: ../common/agent.c): Remove.
602 (errors.o: ../common/errors.c): Remove.
603 (environ.o: ../common/environ.c): Remove.
604 (common-debug.o: ../common/common-debug.c): Remove.
605 (cleanups.o: ../common/cleanups.c): Remove.
606 (common-exceptions.o: ../common/common-exceptions.c): Remove.
607 (fileio.o: ../common/fileio.c): Remove.
608 (common-regcache.o: ../common/common-regcache.c): Remove.
609 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
610 (new-op.o: ../common/new-op.c): Remove.
611 (btrace-common.o: ../common/btrace-common.c): Remove.
612
613 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
614
615 * Makefile.in (%.o: ../target/%.c): New rule.
616 (waitstatus.o: ../target/waitstatus.c): Remove.
617
618 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
619
620 * Makefile.in
621 (%.c: ../regformats/%.dat,
622 (%.c: ../regformats/arm/%.dat,
623 (%.c: ../regformats/i386/%.dat,
624 (%.c: ../regformats/rs6000/%.dat): New rules.
625 (aarch64.c): Remove.
626 (reg-arm.c): Remove.
627 (arm-with-iwmmxt.c): Remove.
628 (arm-with-vfpv2.c): Remove.
629 (arm-with-vfpv3.c): Remove.
630 (arm-with-neon.c): Remove.
631 (reg-bfin.c): Remove.
632 (reg-cris.c): Remove.
633 (reg-crisv32.c): Remove.
634 (i386.c): Remove.
635 (i386-linux.c): Remove.
636 (i386-avx.c): Remove.
637 (i386-avx-linux.c): Remove.
638 (i386-avx-avx512.c): Remove.
639 (i386-avx-avx512-linux.c): Remove.
640 (i386-mpx.c): Remove.
641 (i386-mpx-linux.c): Remove.
642 (i386-avx-mpx-avx512-pku.c): Remove.
643 (i386-avx-mpx-avx512-pku-linux.c): Remove.
644 (i386-avx-mpx.c): Remove.
645 (i386-avx-mpx-linux.c): Remove.
646 (i386-mmx.c): Remove.
647 (i386-mmx-linux.c): Remove.
648 (reg-ia64.c): Remove.
649 (reg-m32r.c): Remove.
650 (reg-m68k.c): Remove.
651 (reg-cf.c): Remove.
652 (mips-linux.c): Remove.
653 (mips-dsp-linux.c): Remove.
654 (mips64-linux.c): Remove.
655 (mips64-dsp-linux.c): Remove.
656 (nios2-linux.c): Remove.
657 (powerpc-32.c): Remove.
658 (powerpc-32l.c): Remove.
659 (powerpc-altivec32l.c): Remove.
660 (powerpc-cell32l.c): Remove.
661 (powerpc-vsx32l.c): Remove.
662 (powerpc-isa205-32l.c): Remove.
663 (powerpc-isa205-altivec32l.c): Remove.
664 (powerpc-isa205-vsx32l.c): Remove.
665 (powerpc-e500l.c): Remove.
666 (powerpc-64l.c): Remove.
667 (powerpc-altivec64l.c): Remove.
668 (powerpc-cell64l.c): Remove.
669 (powerpc-vsx64l.c): Remove.
670 (powerpc-isa205-64l.c): Remove.
671 (powerpc-isa205-altivec64l.c): Remove.
672 (powerpc-isa205-vsx64l.c): Remove.
673 (s390-linux32.c): Remove.
674 (s390-linux32v1.c): Remove.
675 (s390-linux32v2.c): Remove.
676 (s390-linux64.c): Remove.
677 (s390-linux64v1.c): Remove.
678 (s390-linux64v2.c): Remove.
679 (s390-te-linux64.c): Remove.
680 (s390-vx-linux64.c): Remove.
681 (s390-tevx-linux64.c): Remove.
682 (s390x-linux64.c): Remove.
683 (s390x-linux64v1.c): Remove.
684 (s390x-linux64v2.c): Remove.
685 (s390x-te-linux64.c): Remove.
686 (s390x-vx-linux64.c): Remove.
687 (s390x-tevx-linux64.c): Remove.
688 (tic6x-c64xp-linux.c): Remove.
689 (tic6x-c64x-linux.c): Remove.
690 (tic6x-c62x-linux.c): Remove.
691 (reg-sh.c): Remove.
692 (reg-sparc64.c): Remove.
693 (reg-spu.c): Remove.
694 (amd64.c): Remove.
695 (amd64-linux.c): Remove.
696 (amd64-avx.c): Remove.
697 (amd64-avx-linux.c): Remove.
698 (amd64-avx-avx512.c): Remove.
699 (amd64-avx-avx512-linux.c): Remove.
700 (amd64-mpx.c): Remove.
701 (amd64-mpx-linux.c): Remove.
702 (amd64-avx-mpx-avx512-pku.c): Remove.
703 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
704 (amd64-avx-mpx.c): Remove.
705 (amd64-avx-mpx-linux.c): Remove.
706 (x32.c): Remove.
707 (x32-linux.c): Remove.
708 (x32-avx.c): Remove.
709 (x32-avx-linux.c): Remove.
710 (x32-avx-avx512.c): Remove.
711 (x32-avx-avx512-linux.c): Remove.
712 (reg-xtensa.c): Remove.
713 (reg-tilegx.c): Remove.
714 (reg-tilegx32.c): Remove.
715
716 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
717
718 * Makefile.in (SFILES): Add "common/environ.c".
719 (OBJS): Add "common/environ.h".
720
721 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
722
723 * configure.ac: Check if the fs_base and gs_base members of
724 `struct user_regs_struct' exist.
725 * config.in: Regenerated.
726 * configure: Likewise.
727
728 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
729
730 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
731 target_read_memory.
732 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
733 (get_next_pcs_syscall_next_pc): Likewise.
734
735 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
736
737 * win32-i386-low.c: Fix incorrect reference to a couple source files.
738 * nto-x86-low.c: Likewise.
739
740 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
741
742 * Makefile.in: Include disable-implicit-rules.mk.
743
744 2016-11-23 Pedro Alves <palves@redhat.com>
745
746 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
747 (debug_vprintf): Use std::chrono::steady_clock instead of
748 gettimeofday. Use '.' instead of ':'.
749 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
750 (get_timestamp): Use std::chrono::steady_clock instead of
751 gettimeofday.
752
753 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
754
755 * Makefile.in: Fix whitespace formatting.
756
757 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
758
759 * Makefile.in (SFILES, OBS): Flatten list and order
760 alphabetically.
761
762 2016-11-23 Pedro Alves <palves@redhat.com>
763
764 * event-loop.c (handle_file_event): Use warning.
765 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
766 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
767 Use warning.
768
769 2016-11-23 Pedro Alves <palves@redhat.com>
770
771 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
772 output.
773 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
774 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
775 debug_printf and debug_flush for debug output.
776 * server.c (handle_general_set): Likewise.
777 * thread-db.c (try_thread_db_load): Use debug_printf for debug
778 output.
779
780 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
781
782 * Makefile.in (.c.o): Replace rule with ...
783 (%.o: %.c): ... this one.
784
785 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
786
787 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
788 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
789 make.
790 * configure.ac: Remove checks for the make program.
791 * configure: Re-generate.
792
793 2016-10-28 Pedro Alves <palves@redhat.com>
794
795 * Makefile.in (CXX_DIALECT): Get from configure.
796 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
797 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
798 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
799 * config.in: Regenerate.
800 * configure: Regenerate.
801
802 2016-10-27 Yao Qi <yao.qi@linaro.org>
803
804 * linux-low.c (linux_supports_range_stepping): Return true if
805 can_software_single_step return true.
806
807 2016-10-27 Yao Qi <yao.qi@linaro.org>
808
809 * inferiors.c (find_inferior_in_random): New function.
810 * inferiors.h (find_inferior_in_random): Declare.
811 * linux-low.c (linux_wait_for_event_filtered): Call
812 find_inferior_in_random instead of find_inferior.
813
814 2016-10-27 Yao Qi <yao.qi@linaro.org>
815
816 * linux-low.c (linux_wait_1): If single-step breakpoints are
817 inserted, remove them.
818
819 2016-10-26 Pedro Alves <palves@redhat.com>
820
821 * linux-low.c (handle_extended_wait): Link parent/child fork
822 threads.
823 (linux_wait_1): Unlink them.
824 (linux_set_resume_request): Ignore resume requests for
825 already-resumed and unhandled fork child threads.
826 * linux-low.h (struct lwp_info) <fork_relative>: New field.
827 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
828 New functions.
829 (handle_v_requests) <vCont>: Don't call require_running.
830 * server.h (in_queued_stop_replies): New declaration.
831
832 2016-10-24 Yao Qi <yao.qi@linaro.org>
833
834 PR server/20733
835 * linux-aarch64-low.c (append_insns): Cast the return value to
836 'uint32_t *'.
837
838 2016-10-10 Yao Qi <yao.qi@linaro.org>
839
840 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
841
842 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
843
844 * target.c (target_supports_multi_process): New function, moved
845 from...
846 * target.h (target_supports_multi_process): ... here. Remove
847 macro.
848
849 2016-10-05 Tom Tromey <tom@tromey.com>
850
851 PR remote/20655:
852 * tracepoint.c (handle_tracepoint_bkpts): Check
853 ipa_error_tracepoint, not ipa_stopping_tracepoint.
854
855 2016-10-05 Yao Qi <yao.qi@linaro.org>
856
857 * configure.srv: Update the path of arm-*.xml files.
858
859 2016-10-05 Terry Guo <terry.guo@arm.com>
860 Yao Qi <yao.qi@linaro.org>
861
862 * Makefile.in: Adjust the path of rules.
863 * configure.srv: Update the path of xml files.
864 * regformats/arm-with-iwmmxt.dat: Regenerated.
865 * regformats/arm-with-neon.dat: Likewise.
866 * regformats/arm-with-vfpv2.dat: Likewise.
867 * regformats/arm-with-vfpv3.dat Likewise.
868
869 2016-09-30 Yao Qi <yao.qi@linaro.org>
870
871 PR gdbserver/20627
872 * target.c (target_stop_and_wait): Don't call
873 target_continue_no_signal, use resume_stop instead.
874
875 2016-09-26 Yao Qi <yao.qi@linaro.org>
876
877 * linux-low.c (linux_wait_1): Call debug_exit.
878
879 2016-09-23 Pedro Alves <palves@redhat.com>
880
881 * Makefile.in (SFILES): Add common/new-op.c.
882 (OBS): Add common/new-op.o.
883 (new-op.o): New rule.
884
885 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
886
887 * .gitinore: Ignore more files.
888
889 2016-09-21 Yao Qi <yao.qi@linaro.org>
890
891 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
892 23.
893
894 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
895
896 * server.c (start_inferior): Call target_mourn_inferior instead of
897 mourn_inferior; pass ptid_t argument to it.
898 (resume): Likewise.
899 (handle_target_event): Likewise.
900 * target.c (target_mourn_inferior): New function.
901 * target.h (mourn_inferior): Delete macro.
902
903 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
904
905 * linux-low.c (lwp_is_stepping): New function.
906
907 2016-09-06 Carl Love <cel@us.ibm.com>
908
909 * server.c (start_inferior): Fixed comment, requested comment change
910 didn't get updated correctly. Removed reference to ptrace () call as
911 it is only true on Linux systems.
912
913 2016-09-06 Carl Love <cel@us.ibm.com>
914
915 * server.c (start_inferior): Do not call
916 function target_post_create_inferior () if the
917 inferior process has already exited.
918
919 2016-09-05 Pedro Alves <palves@redhat.com>
920
921 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
922 (COMPILE.pre, CC_LD): Use CXX directly.
923 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
924 * acinclude.m4: Don't include build-with-cxx.m4.
925 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
926 * configure: Regenerate.
927
928 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
929
930 PR gdb/19495
931 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
932 call writing data to own_buf.
933
934 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
935
936 * target.c (mywait): Call target_wait instead of
937 the_target->wait.
938 (target_wait): New function.
939
940 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
941
942 * server.c (start_inferior): New variable 'ptid'. Replace calls
943 to the_target->resume by target_continue{,_no_signal}, depending
944 on the case.
945 * target.c (target_stop_and_wait): Call target_continue_no_signal
946 instead of the_target->resume.
947 (target_continue): New function.
948
949 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
950
951 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
952
953 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
954
955 PR server/20491
956 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
957 ps_prochandle.
958 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
959 * linux-arm-low.c (ps_get_thread_area): Likewise.
960 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
961 * linux-m68k-low.c (ps_get_thread_area): Likewise.
962 * linux-mips-low.c (ps_get_thread_area): Likewise.
963 * linux-nios2-low.c (ps_get_thread_area): Likewise.
964 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
965 * linux-x86-low.c (ps_get_thread_area): Likewise.
966 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
967
968 2016-08-19 Pedro Alves <palves@redhat.com>
969
970 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
971
972 2016-08-19 Pedro Alves <palves@redhat.com>
973
974 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
975 comment. Use memcpy instead of casting through unsigned long.
976
977 2016-08-19 Pedro Alves <palves@redhat.com>
978
979 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
980 allocating around 0x80000000.
981
982 2016-08-19 Pedro Alves <palves@redhat.com>
983
984 PR gdb/20415
985 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
986 (x32-avx512-linux-ipa.o): New rules.
987 * configure.ac (x86_64-*-linux*): New x32 check.
988 * configure.srv (ipa_x32_linux_regobj): New.
989 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
990 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
991 descriptions.
992 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
993 descriptions.
994 * configure: Regenerate.
995
996 2016-08-09 Pedro Alves <palves@redhat.com>
997
998 PR gdb/18653
999 * Makefile.in (OBS): Add signals-state-save-restore.o.
1000 (signals-state-save-restore.o): New rule.
1001 * config.in: Regenerate.
1002 * configure: Regenerate.
1003 * linux-low.c: Include "signals-state-save-restore.h".
1004 (linux_create_inferior): Call
1005 restore_original_signals_state.
1006 * server.c: Include "dispositions-save-restore.h".
1007 (captured_main): Call save_original_signals_state.
1008
1009 2016-08-05 Pedro Alves <palves@redhat.com>
1010
1011 * configure: Regenerate.
1012
1013 2016-08-04 Yao Qi <yao.qi@linaro.org>
1014
1015 * linux-low.c (regsets_fetch_inferior_registers): Check
1016 errno is ESRCH or not.
1017
1018 2016-08-02 Yao Qi <yao.qi@linaro.org>
1019
1020 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1021 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1022 (thread_db_load_search): Update.
1023 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1024 td_ta_set_event and td_ta_event_getmsg.
1025
1026 2016-07-26 Pedro Alves <palves@redhat.com>
1027
1028 PR server/20414
1029 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1030 of unsigned long for 64-bit registers and use uint32_t instead of
1031 unsigned int for 32-bit registers.
1032
1033 2016-07-26 Pedro Alves <palves@redhat.com>
1034
1035 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1036 to 'ptrace'.
1037
1038 2016-07-21 Tom Tromey <tom@tromey.com>
1039
1040 * configure: Rebuild.
1041
1042 2016-07-21 Yao Qi <yao.qi@linaro.org>
1043
1044 * mem-break.c (find_gdb_breakpoint): Cast bp to
1045 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1046
1047 2016-07-21 Yao Qi <yao.qi@linaro.org>
1048
1049 * server.c (handle_v_requests): Support s and S actions
1050 if target_supports_software_single_step return true.
1051
1052 2016-07-21 Yao Qi <yao.qi@linaro.org>
1053
1054 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1055 is resume_step, call maybe_hw_step.
1056 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1057 and unstop them.
1058 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1059 breakpoints or not.
1060 (proceed_one_lwp): If resume request is resume_step, install
1061 reinsert breakpoints and call maybe_hw_step.
1062
1063 2016-07-21 Yao Qi <yao.qi@linaro.org>
1064
1065 * linux-low.c (proceed_one_lwp): Declare.
1066 (linux_resume_one_thread): Remove local variable 'step'.
1067 Lift code enqueue signal. Call proceed_one_lwp instead of
1068 linux_resume_one_lwp.
1069
1070 2016-07-21 Yao Qi <yao.qi@linaro.org>
1071
1072 * linux-low.c (linux_resume_one_thread): Call
1073 enqueue_pending_signal.
1074
1075 2016-07-21 Yao Qi <yao.qi@linaro.org>
1076
1077 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1078 * inferiors.c (do_restore_current_thread_cleanup): New function.
1079 (make_cleanup_restore_current_thread): Likewise.
1080 * linux-low.c (install_software_single_step_breakpoints): Call
1081 make_cleanup_restore_current_thread. Switch current_thread to
1082 thread.
1083
1084 2016-07-21 Yao Qi <yao.qi@linaro.org>
1085
1086 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1087 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1088 (clone_one_breakpoint): Likewise.
1089 (delete_reinsert_breakpoints): Change parameter to thread.
1090 Callers updated.
1091 (has_reinsert_breakpoints): Likewise.
1092 (uninsert_reinsert_breakpoints): Likewise.
1093 (reinsert_reinsert_breakpoints): Likewise.
1094 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1095 (delete_reinsert_breakpoints): Likewise.
1096 (reinsert_reinsert_breakpoints): Likewise.
1097 (uninsert_reinsert_breakpoints): Likewise.
1098 (has_reinsert_breakpoints): Likewise.
1099
1100 2016-07-21 Yao Qi <yao.qi@linaro.org>
1101
1102 * inferiors.c (get_thread_process): Make parameter const.
1103 * inferiors.h (get_thread_process): Update declaration.
1104 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1105 Add new parameters child_thread and parent_thread. Callers
1106 updated.
1107 * mem-break.h (clone_all_breakpoints): Update declaration.
1108
1109 2016-07-21 Yao Qi <yao.qi@linaro.org>
1110
1111 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1112 <command_list, handler>: Remove.
1113 (struct gdb_breakpoint): New.
1114 (struct other_breakpoint): New.
1115 (struct reinsert_breakpoint): New.
1116 (is_gdb_breakpoint): New function.
1117 (any_persistent_commands): Update command_list if
1118 is_gdb_breakpoint returns true.
1119 (set_breakpoint): Create breakpoints according to their types.
1120 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1121 (set_gdb_breakpoint_1): Likewise.
1122 (set_gdb_breakpoint): Likewise.
1123 (clear_breakpoint_conditions): Change parameter type to
1124 'struct gdb_breakpoint *'.
1125 (clear_breakpoint_commands): Likewise.
1126 (clear_breakpoint_conditions_and_commands): Likewise.
1127 (add_condition_to_breakpoint): Likewise.
1128 (add_breakpoint_condition): Likewise.
1129 (add_commands_to_breakpoint): Likewise.
1130 (check_breakpoints): Check other_breakpoint.
1131 (clone_one_breakpoint): Clone breakpopint according to its type.
1132 * mem-break.h (struct gdb_breakpoint): Declare.
1133 (set_gdb_breakpoint): Update declaration.
1134 (clear_breakpoint_conditions_and_commands): Likewise.
1135 (add_breakpoint_condition): Likewise.
1136 (add_breakpoint_commands): Likewise.
1137 * server.c (process_point_options): Change parameter type to
1138 'struct gdb_breakpoint *'.
1139
1140 2016-07-21 Yao Qi <yao.qi@linaro.org>
1141
1142 * mem-break.c (set_breakpoint_at): Rename it to ...
1143 (set_breakpoint_type_at): ... it.
1144 (set_breakpoint_at): Call set_breakpoint_type_at.
1145 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1146 * mem-break.h (set_breakpoint_at): Update comments.
1147
1148 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1149
1150 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1151 to buf parameter.
1152 (nios2_store_gregset): Likewise.
1153
1154 2016-07-01 Pedro Alves <palves@redhat.com>
1155 Antoine Tremblay <antoine.tremblay@ericsson.com>
1156
1157 * linux-low.c: Change interface to take the target lwp_info
1158 pointer directly and return void. Handle detaching from a zombie
1159 thread.
1160 (linux_detach_lwp_callback): New function.
1161 (linux_detach): Detach from the leader thread after detaching from
1162 the clone threads.
1163
1164 2016-06-28 Yao Qi <yao.qi@linaro.org>
1165
1166 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1167 for variable new_offset.
1168 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1169 (aarch64_ftrace_insn_reloc_cb): Likewise.
1170 (aarch64_ftrace_insn_reloc_tb): Likewise.
1171 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1172 PRIx64 instead of PRIx32.
1173
1174 2016-06-28 Yao Qi <yao.qi@linaro.org>
1175
1176 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1177 (the_low_target): Install arm_get_syscall_trapinfo.
1178
1179 2016-06-28 Yao Qi <yao.qi@linaro.org>
1180
1181 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1182 function.
1183 (the_low_target): Install aarch64_get_syscall_trapinfo.
1184
1185 2016-06-28 Yao Qi <yao.qi@linaro.org>
1186
1187 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1188 Callers updated.
1189 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1190 Remove parameter sysno.
1191 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1192 sysret.
1193
1194 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1195
1196 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1197 (s390_emit_ne_goto): Likewise.
1198 (s390_emit_lt_goto): Likewise.
1199 (s390_emit_le_goto): Likewise.
1200 (s390_emit_gt_goto): Likewise.
1201 (s390_emit_ge_goto): Likewise.
1202 (s390x_emit_eq_goto): Likewise.
1203 (s390x_emit_ne_goto): Likewise.
1204 (s390x_emit_lt_goto): Likewise.
1205 (s390x_emit_le_goto): Likewise.
1206 (s390x_emit_gt_goto): Likewise.
1207 (s390x_emit_ge_goto): Likewise.
1208 (s390_emit_ops_impl): Mark variable static.
1209 (s390x_emit_ops): Likewise.
1210
1211 2016-06-17 Yao Qi <yao.qi@linaro.org>
1212
1213 * linux-low.c (handle_extended_wait): Call
1214 uninsert_reinsert_breakpoints for the parent process. Remove
1215 reinsert breakpoints from the child process. Reinsert them to
1216 the parent process when vfork is done.
1217 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1218 (reinsert_reinsert_breakpoints): New function.
1219 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1220 (reinsert_reinsert_breakpoints): Declare.
1221
1222 2016-06-17 Yao Qi <yao.qi@linaro.org>
1223
1224 * linux-low.c (handle_extended_wait): If the parent is doing
1225 step-over, remove the reinsert breakpoints from the forked child.
1226
1227 2016-06-17 Yao Qi <yao.qi@linaro.org>
1228
1229 * linux-low.c (unsuspend_all_lwps): Declare.
1230 (linux_low_filter_event): If thread exited, call finish_step_over.
1231 If step-over is finished, unsuspend other threads.
1232
1233 2016-06-17 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-low.c (linux_resume_one_lwp_throw): Assert
1236 has_reinsert_breakpoints returns false.
1237 * mem-break.c (delete_disabled_breakpoints): Assert
1238 bp type isn't reinsert_breakpoint.
1239
1240 2016-06-17 Yao Qi <yao.qi@linaro.org>
1241
1242 * linux-low.c (maybe_hw_step): New function.
1243 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1244 (finish_step_over): Switch current_thread to lwp temporarily,
1245 and assert has_reinsert_breakpoints returns true.
1246 (proceed_one_lwp): Call maybe_hw_step.
1247 * mem-break.c (has_reinsert_breakpoints): New function.
1248 * mem-break.h (has_reinsert_breakpoints): Declare.
1249
1250 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1251
1252 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1253
1254 2016-05-17 Yao Qi <yao.qi@linaro.org>
1255
1256 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1257 instead of find_inferior.
1258
1259 2016-05-05 Yao Qi <yao.qi@linaro.org>
1260
1261 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1262 Initialize res to zero.
1263
1264 2016-05-05 Yao Qi <yao.qi@linaro.org>
1265
1266 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1267 to uint32_t.
1268
1269 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1270
1271 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1272 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1273 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1274
1275 2016-04-28 Par Olsson <par.olsson@windriver.com>
1276 Simon Marchi <simon.marchi@ericsson.com>
1277
1278 * tracepoint.c (write_inferior_int8): New function.
1279 (cmd_qtenable_disable): Write enable flag using
1280 write_inferior_int8.
1281
1282 2016-04-25 Yao Qi <yao.qi@linaro.org>
1283
1284 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1285 (need_step_over_p): Return zero if the LWP has pending signals
1286 can be delivered on software single step target.
1287
1288 2016-04-25 Yao Qi <yao.qi@linaro.org>
1289
1290 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1291 return instead of error.
1292
1293 2016-04-22 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1296 to 23.
1297
1298 2016-04-22 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1301 signal when stepping over breakpoint with software single
1302 step.
1303
1304 2016-04-21 Pedro Alves <palves@redhat.com>
1305
1306 * linux-s390-low.c (s390_collect_ptrace_register)
1307 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1308 add casts.
1309 (s390_check_regset): Use void * instead of gdb_byte *.
1310
1311 2016-04-20 Pedro Alves <palves@redhat.com>
1312
1313 * configure: Renegerate.
1314
1315 2016-04-20 Yao Qi <yao.qi@linaro.org>
1316
1317 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1318 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1319 number 16.
1320 (arm_store_gregset): Likewise.
1321
1322 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1323
1324 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1325 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1326 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1327 (amd64-avx-mpx-linux.c): New rules.
1328 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1329 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1330 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1331 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1332 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1333 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1334 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1335 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1336 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1337 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1338 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1339 * linux-x86-low.c (x86_linux_read_description): Add case for
1340 X86_XSTATE_AVX_MPX_MASK.
1341 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1342 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1343 init_registers_i386_avx_mpx_linux.
1344 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1345 (initialize_low_tracepoint): Call
1346 init_registers_i386_avx_mpx_linux.
1347 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1348 (initialize_low_tracepoint): Call
1349 init_registers_amd64_avx_mpx_linux.
1350 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1351 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1352 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1353 declarations.
1354
1355 2016-04-18 Pedro Alves <palves@redhat.com>
1356
1357 * configure: Regenerate.
1358
1359 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1360
1361 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1362 (aarch64_emit_sub): Likewise.
1363
1364 2016-04-12 Pedro Alves <palves@redhat.com>
1365
1366 * utils.c (prepare_to_throw_exception): Delete.
1367
1368 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1369
1370 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1371
1372 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1373
1374 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1375
1376 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1377
1378 * linux-aarch64-ipa.c: Add <elf.h> include.
1379 * linux-ppc-ipa.c: Add <elf.h> include.
1380 * linux-s390-ipa.c: Add <elf.h> include.
1381
1382 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1383
1384 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1385 (get_raw_reg_ptr): Likewise.
1386 (get_trace_state_variable_value_ptr): Likewise.
1387 (set_trace_state_variable_value_ptr): Likewise.
1388 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1389 char *.
1390
1391 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1392 Marcin Kościelnicki <koriakin@0x04.net>
1393
1394 PR/17221
1395 * linux-ppc-low.c (emit_insns): New function.
1396 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1397 (ppc_emit_prologue): New function.
1398 (ppc_emit_epilogue): New function.
1399 (ppc_emit_add): New function.
1400 (ppc_emit_sub): New function.
1401 (ppc_emit_mul): New function.
1402 (ppc_emit_lsh): New function.
1403 (ppc_emit_rsh_signed): New function.
1404 (ppc_emit_rsh_unsigned): New function.
1405 (ppc_emit_ext): New function.
1406 (ppc_emit_zero_ext): New function.
1407 (ppc_emit_log_not): New function.
1408 (ppc_emit_bit_and): New function.
1409 (ppc_emit_bit_or): New function.
1410 (ppc_emit_bit_xor): New function.
1411 (ppc_emit_bit_not): New function.
1412 (ppc_emit_equal): New function.
1413 (ppc_emit_less_signed): New function.
1414 (ppc_emit_less_unsigned): New function.
1415 (ppc_emit_ref): New function.
1416 (ppc_emit_const): New function.
1417 (ppc_emit_reg): New function.
1418 (ppc_emit_pop): New function.
1419 (ppc_emit_stack_flush): New function.
1420 (ppc_emit_swap): New function.
1421 (ppc_emit_stack_adjust): New function.
1422 (ppc_emit_call): New function.
1423 (ppc_emit_int_call_1): New function.
1424 (ppc_emit_void_call_2): New function.
1425 (ppc_emit_if_goto): New function.
1426 (ppc_emit_goto): New function.
1427 (ppc_emit_eq_goto): New function.
1428 (ppc_emit_ne_goto): New function.
1429 (ppc_emit_lt_goto): New function.
1430 (ppc_emit_le_goto): New function.
1431 (ppc_emit_gt_goto): New function.
1432 (ppc_emit_ge_goto): New function.
1433 (ppc_write_goto_address): New function.
1434 (ppc_emit_ops_impl): New static variable.
1435 (ppc64v1_emit_prologue): New function.
1436 (ppc64v2_emit_prologue): New function.
1437 (ppc64_emit_epilogue): New function.
1438 (ppc64_emit_add): New function.
1439 (ppc64_emit_sub): New function.
1440 (ppc64_emit_mul): New function.
1441 (ppc64_emit_lsh): New function.
1442 (ppc64_emit_rsh_signed): New function.
1443 (ppc64_emit_rsh_unsigned): New function.
1444 (ppc64_emit_ext): New function.
1445 (ppc64_emit_zero_ext): New function.
1446 (ppc64_emit_log_not): New function.
1447 (ppc64_emit_bit_and): New function.
1448 (ppc64_emit_bit_or): New function.
1449 (ppc64_emit_bit_xor): New function.
1450 (ppc64_emit_bit_not): New function.
1451 (ppc64_emit_equal): New function.
1452 (ppc64_emit_less_signed): New function.
1453 (ppc64_emit_less_unsigned): New function.
1454 (ppc64_emit_ref): New function.
1455 (ppc64_emit_const): New function.
1456 (ppc64v1_emit_reg): New function.
1457 (ppc64v2_emit_reg): New function.
1458 (ppc64_emit_pop): New function.
1459 (ppc64_emit_stack_flush): New function.
1460 (ppc64_emit_swap): New function.
1461 (ppc64v1_emit_call): New function.
1462 (ppc64v2_emit_call): New function.
1463 (ppc64v1_emit_int_call_1): New function.
1464 (ppc64v2_emit_int_call_1): New function.
1465 (ppc64v1_emit_void_call_2): New function.
1466 (ppc64v2_emit_void_call_2): New function.
1467 (ppc64_emit_if_goto): New function.
1468 (ppc64_emit_eq_goto): New function.
1469 (ppc64_emit_ne_goto): New function.
1470 (ppc64_emit_lt_goto): New function.
1471 (ppc64_emit_le_goto): New function.
1472 (ppc64_emit_gt_goto): New function.
1473 (ppc64_emit_ge_goto): New function.
1474 (ppc64v1_emit_ops_impl): New static variable.
1475 (ppc64v2_emit_ops_impl): New static variable.
1476 (ppc_emit_ops): New function.
1477 (linux_low_target): Wire in ppc_emit_ops.
1478
1479 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1480 Marcin Kościelnicki <koriakin@0x04.net>
1481
1482 PR/17221
1483 * Makefile.in: Add powerpc-*-ipa.o
1484 * configure.srv: Add ipa_obj for powerpc*-linux.
1485 * linux-ppc-ipa.c: New file.
1486 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1487 includes.
1488 (PPC_FIELD): New macro.
1489 (PPC_SEXT): New macro.
1490 (PPC_OP6): New macro.
1491 (PPC_BO): New macro.
1492 (PPC_LI): New macro.
1493 (PPC_BD): New macro.
1494 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1495 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1496 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1497 (ppc_get_thread_area): New function.
1498 (is_elfv2_inferior): New function.
1499 (gen_ds_form): New function.
1500 (GEN_STD): New macro.
1501 (GEN_STDU): New macro.
1502 (GEN_LD): New macro.
1503 (GEN_LDU): New macro.
1504 (gen_d_form): New function.
1505 (GEN_ADDI): New macro.
1506 (GEN_ADDIS): New macro.
1507 (GEN_LI): New macro.
1508 (GEN_LIS): New macro.
1509 (GEN_ORI): New macro.
1510 (GEN_ORIS): New macro.
1511 (GEN_LWZ): New macro.
1512 (GEN_STW): New macro.
1513 (GEN_STWU): New macro.
1514 (gen_xfx_form): New function.
1515 (GEN_MFSPR): New macro.
1516 (GEN_MTSPR): New macro.
1517 (GEN_MFCR): New macro.
1518 (GEN_MTCR): New macro.
1519 (GEN_SYNC): New macro.
1520 (GEN_LWSYNC): New macro.
1521 (gen_x_form): New function.
1522 (GEN_OR): New macro.
1523 (GEN_MR): New macro.
1524 (GEN_LWARX): New macro.
1525 (GEN_STWCX): New macro.
1526 (GEN_CMPW): New macro.
1527 (gen_md_form): New function.
1528 (GEN_RLDICL): New macro.
1529 (GEN_RLDICR): New macro.
1530 (gen_i_form): New function.
1531 (GEN_B): New macro.
1532 (GEN_BL): New macro.
1533 (gen_b_form): New function.
1534 (GEN_BNE): New macro.
1535 (GEN_LOAD): New macro.
1536 (GEN_STORE): New macro.
1537 (gen_limm): New function.
1538 (gen_atomic_xchg): New function.
1539 (gen_call): New function.
1540 (ppc_relocate_instruction): New function.
1541 (ppc_install_fast_tracepoint_jump_pad): New function.
1542 (ppc_get_min_fast_tracepoint_insn_len): New function.
1543 (ppc_get_ipa_tdesc_idx): New function.
1544 (the_low_target): Wire in the new functions.
1545 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1546 tdescs.
1547 * linux-ppc-tdesc.h: New file.
1548
1549 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1550
1551 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1552 (alloc_jump_pad_buffer): New function.
1553 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1554 (alloc_jump_pad_buffer): New function.
1555 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1556 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1557 (alloc_jump_pad_buffer): New function.
1558 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1559 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1560 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1561 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1562
1563 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1564
1565 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1566 * linux-amd64-ipa.c: Likewise.
1567 * linux-i386-ipa.c: Likewise.
1568 * linux-s390-ipa.c: Likewise.
1569 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1570 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1571 set_trace_state_variable_value_ptr.
1572 (struct ipa_sym_addresses): Likewise.
1573 (symbol_list): Likewise.
1574 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1575 accessing gdb_collect directly.
1576 (gdb_collect_ptr_type): New typedef.
1577 (get_raw_reg_ptr_type): New typedef.
1578 (get_trace_state_variable_value_ptr_type): New typedef.
1579 (set_trace_state_variable_value_ptr_type): New typedef.
1580 (gdb_collect_ptr): New global.
1581 (get_raw_reg_ptr): New global.
1582 (get_trace_state_variable_value_ptr): New global.
1583 (set_trace_state_variable_value_ptr): New global.
1584 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1585 accessing get_raw_reg directly.
1586 (get_get_tsv_func_addr): Likewise for
1587 get_trace_state_variable_value_ptr.
1588 (get_set_tsv_func_addr): Likewise for
1589 set_trace_state_variable_value_ptr.
1590 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1591
1592 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1593
1594 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1595
1596 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1597
1598 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1599 packets.
1600 (relocate_instruction): Remove own_buf.
1601 * server.c (own_buf): Make global.
1602 (handle_v_requests): Make global.
1603 * server.h (own_buf): New declaration.
1604 (handle_v_requests): New prototype.
1605
1606 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1607
1608 PR 18377
1609 * linux-s390-low.c (add_insns): New function.
1610 (s390_emit_prologue): New function.
1611 (s390_emit_epilogue): New function.
1612 (s390_emit_add): New function.
1613 (s390_emit_sub): New function.
1614 (s390_emit_mul): New function.
1615 (s390_emit_lsh): New function.
1616 (s390_emit_rsh_signed): New function.
1617 (s390_emit_rsh_unsigned): New function.
1618 (s390_emit_ext): New function.
1619 (s390_emit_log_not): New function.
1620 (s390_emit_bit_and): New function.
1621 (s390_emit_bit_or): New function.
1622 (s390_emit_bit_xor): New function.
1623 (s390_emit_bit_not): New function.
1624 (s390_emit_equal): New function.
1625 (s390_emit_less_signed): New function.
1626 (s390_emit_less_unsigned): New function.
1627 (s390_emit_ref): New function.
1628 (s390_emit_if_goto): New function.
1629 (s390_emit_goto): New function.
1630 (s390_write_goto_address): New function.
1631 (s390_emit_litpool): New function.
1632 (s390_emit_const): New function.
1633 (s390_emit_call): New function.
1634 (s390_emit_reg): New function.
1635 (s390_emit_pop): New function.
1636 (s390_emit_stack_flush): New function.
1637 (s390_emit_zero_ext): New function.
1638 (s390_emit_swap): New function.
1639 (s390_emit_stack_adjust): New function.
1640 (s390_emit_set_r2): New function.
1641 (s390_emit_int_call_1): New function.
1642 (s390_emit_void_call_2): New function.
1643 (s390_emit_eq_goto): New function.
1644 (s390_emit_ne_goto): New function.
1645 (s390_emit_lt_goto): New function.
1646 (s390_emit_le_goto): New function.
1647 (s390_emit_gt_goto): New function.
1648 (s390_emit_ge_goto): New function.
1649 (s390x_emit_prologue): New function.
1650 (s390x_emit_epilogue): New function.
1651 (s390x_emit_add): New function.
1652 (s390x_emit_sub): New function.
1653 (s390x_emit_mul): New function.
1654 (s390x_emit_lsh): New function.
1655 (s390x_emit_rsh_signed): New function.
1656 (s390x_emit_rsh_unsigned): New function.
1657 (s390x_emit_ext): New function.
1658 (s390x_emit_log_not): New function.
1659 (s390x_emit_bit_and): New function.
1660 (s390x_emit_bit_or): New function.
1661 (s390x_emit_bit_xor): New function.
1662 (s390x_emit_bit_not): New function.
1663 (s390x_emit_equal): New function.
1664 (s390x_emit_less_signed): New function.
1665 (s390x_emit_less_unsigned): New function.
1666 (s390x_emit_ref): New function.
1667 (s390x_emit_if_goto): New function.
1668 (s390x_emit_const): New function.
1669 (s390x_emit_call): New function.
1670 (s390x_emit_reg): New function.
1671 (s390x_emit_pop): New function.
1672 (s390x_emit_stack_flush): New function.
1673 (s390x_emit_zero_ext): New function.
1674 (s390x_emit_swap): New function.
1675 (s390x_emit_stack_adjust): New function.
1676 (s390x_emit_int_call_1): New function.
1677 (s390x_emit_void_call_2): New function.
1678 (s390x_emit_eq_goto): New function.
1679 (s390x_emit_ne_goto): New function.
1680 (s390x_emit_lt_goto): New function.
1681 (s390x_emit_le_goto): New function.
1682 (s390x_emit_gt_goto): New function.
1683 (s390x_emit_ge_goto): New function.
1684 (s390_emit_ops): New function.
1685 (struct linux_target_ops): Fill in emit_ops hook.
1686
1687 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1688
1689 PR 18377
1690 * Makefile.in: Add s390 IPA files.
1691 * configure.srv: Build IPA for s390.
1692 * linux-s390-ipa.c: New file.
1693 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1694 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1695 (tdesc_s390_linux32): Likewise.
1696 (init_registers_s390_linux32v1): Likewise.
1697 (tdesc_s390_linux32v1): Likewise.
1698 (init_registers_s390_linux32v2): Likewise.
1699 (tdesc_s390_linux32v2): Likewise.
1700 (init_registers_s390_linux64): Likewise.
1701 (tdesc_s390_linux64): Likewise.
1702 (init_registers_s390_linux64v1): Likewise.
1703 (tdesc_s390_linux64v1): Likewise.
1704 (init_registers_s390_linux64v2): Likewise.
1705 (tdesc_s390_linux64v2): Likewise.
1706 (init_registers_s390_te_linux64): Likewise.
1707 (tdesc_s390_te_linux64): Likewise.
1708 (init_registers_s390_vx_linux64): Likewise.
1709 (tdesc_s390_vx_linux64): Likewise.
1710 (init_registers_s390_tevx_linux64): Likewise.
1711 (tdesc_s390_tevx_linux64): Likewise.
1712 (init_registers_s390x_linux64): Likewise.
1713 (tdesc_s390x_linux64): Likewise.
1714 (init_registers_s390x_linux64v1): Likewise.
1715 (tdesc_s390x_linux64v1): Likewise.
1716 (init_registers_s390x_linux64v2): Likewise.
1717 (tdesc_s390x_linux64v2): Likewise.
1718 (init_registers_s390x_te_linux64): Likewise.
1719 (tdesc_s390x_te_linux64): Likewise.
1720 (init_registers_s390x_vx_linux64): Likewise.
1721 (tdesc_s390x_vx_linux64): Likewise.
1722 (init_registers_s390x_tevx_linux64): Likewise.
1723 (tdesc_s390x_tevx_linux64): Likewise.
1724 (have_hwcap_s390_vx): New static variable.
1725 (s390_arch_setup): Fill have_hwcap_s390_vx.
1726 (s390_get_thread_area): New function.
1727 (s390_ft_entry_gpr_esa): New const.
1728 (s390_ft_entry_gpr_zarch): New const.
1729 (s390_ft_entry_misc): New const.
1730 (s390_ft_entry_fr): New const.
1731 (s390_ft_entry_vr): New const.
1732 (s390_ft_main_31): New const.
1733 (s390_ft_main_64): New const.
1734 (s390_ft_exit_fr): New const.
1735 (s390_ft_exit_vr): New const.
1736 (s390_ft_exit_misc): New const.
1737 (s390_ft_exit_gpr_esa): New const.
1738 (s390_ft_exit_gpr_zarch): New const.
1739 (append_insns): New function.
1740 (s390_relocate_instruction): New function.
1741 (s390_install_fast_tracepoint_jump_pad): New function.
1742 (s390_get_min_fast_tracepoint_insn_len): New function.
1743 (s390_get_ipa_tdesc_idx): New function.
1744 (struct linux_target_ops): Wire in the above functions.
1745 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1746 * linux-s390-tdesc.h: New file.
1747
1748 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1749
1750 * linux-s390-low.c (s390_supports_tracepoints): New function.
1751 (struct linux_target_ops): Fill supports_tracepoints hook.
1752
1753 2016-03-18 Yao Qi <yao.qi@linaro.org>
1754
1755 * linux-low.c (lwp_signal_can_be_delivered): New function.
1756 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1757
1758 2016-03-18 Yao Qi <yao.qi@linaro.org>
1759
1760 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1761 0 if signal is enqueued. Remove 'signal' from one debugging
1762 message. Move one debugging message to some lines below.
1763 Remove code setting 'signal' to 0.
1764
1765 2016-03-18 Yao Qi <yao.qi@linaro.org>
1766
1767 * linux-low.c (linux_low_filter_event): Remove redundant
1768 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1769
1770 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1771
1772 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1773 (struct linux_target_ops): Wire in the above.
1774
1775 2016-03-03 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-low.c: Update comments to start_step_over.
1778
1779 2016-03-03 Yao Qi <yao.qi@linaro.org>
1780
1781 PR server/19736
1782 * linux-low.c (handle_extended_wait): Set child suspended
1783 if event_lwp->bp_reinsert isn't zero.
1784
1785 2016-03-02 Yao Qi <yao.qi@linaro.org>
1786
1787 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1788 enqueue_pending_signal.
1789
1790 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1791
1792 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1793 is actually loaded.
1794
1795 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1796
1797 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1798 (s390_regmap_3264) [!__s390x__]: New global.
1799 (s390_collect_ptrace_register): Skip map entries containing -1.
1800 (s390_supply_ptrace_register): Ditto.
1801 (s390_fill_gprs_high): New function.
1802 (s390_store_gprs_high): New function.
1803 (s390_regsets): Add NT_S390_HIGH_GPRS.
1804 (s390_get_hwcap): Enable on 31-bit.
1805 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1806 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1807 Detect NT_S390_HIGH_GPRS.
1808 (s390_usrregs_info_3264): Enable on 31-bit.
1809 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1810 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1811
1812 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1813
1814 PR gdb/13808
1815 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1816 * configure.srv: Ditto.
1817 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1818 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1819 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1820 (init_registers_amd64_linux): Remove prototype.
1821 (tdesc_amd64_linux): Remove declaration.
1822 (get_ipa_tdesc): New function.
1823 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1824 initialize remaining tdescs.
1825 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1826 (init_registers_i386_linux): Remove prototype.
1827 (tdesc_i386_linux): Remove declaration.
1828 (get_ipa_tdesc): New function.
1829 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1830 initialize remaining tdescs.
1831 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1832 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1833 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1834 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1835 (x86_get_ipa_tdesc_idx): New function.
1836 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1837 * linux-x86-tdesc.h: New file.
1838 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1839 (target_get_ipa_tdesc_idx): New macro.
1840 * tracepoint.c (ipa_tdesc_idx): New macro.
1841 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1842 (symbol_list): Add ipa_tdesc_idx.
1843 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1844 (ipa_tdesc): Remove.
1845 (ipa_tdesc_idx): New variable.
1846 (get_context_regcache): Use get_ipa_tdesc.
1847 (gdb_collect): Ditto.
1848 (gdb_probe): Ditto.
1849 * tracepoint.h (get_ipa_tdesc): New prototype.
1850 (ipa_tdesc): Remove.
1851
1852 2016-02-24 Pedro Alves <palves@redhat.com>
1853
1854 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1855 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1856 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1857 Factor out common code between the USE_SIGTRAP_SIGINFO and
1858 !USE_SIGTRAP_SIGINFO blocks.
1859 (linux_low_filter_event): Call save_stop_reason instead of
1860 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1861 Update comments.
1862 (linux_wait_1): Update comments.
1863
1864 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1865
1866 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1867 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1868 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1869 ppc_insert_point, ppc_remove_point.
1870
1871 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1872
1873 * linux-s390-low.c (s390_supports_z_point_type): New function.
1874 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1875
1876 2016-02-16 Yao Qi <yao.qi@linaro.org>
1877
1878 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1879 PC. Get pc from regcache_read_pc.
1880
1881 2016-02-12 Yao Qi <yao.qi@linaro.org>
1882
1883 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1884 or linux_get_pc_32bit.
1885 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1886
1887 2016-02-12 Yao Qi <yao.qi@linaro.org>
1888
1889 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1890 arm_linux_get_next_pcs_fixup.
1891
1892 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1893
1894 * tracepoint.c (x_tracepoint_action_download): Change
1895 write_inferior_data_ptr to write_inferior_data_pointer.
1896 (cmd_qtstart): Likewise.
1897 (write_inferior_data_ptr): Remove.
1898 (download_agent_expr): Change write_inferior_data_ptr to
1899 write_inferior_data_pointer.
1900 (download_tracepoint_1): Likewise.
1901 (download_tracepoint): Likewise.
1902 (download_trace_state_variables): Likewise.
1903
1904 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1905 Marcin Kościelnicki <koriakin@0x04.net>
1906
1907 * tracepoint.c (struct tracepoint_action_ops): Remove.
1908 (struct tracepoint_action): Remove ops.
1909 (m_tracepoint_action_download, r_tracepoint_action_download)
1910 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1911 size and offset accordingly.
1912 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1913 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1914 (tracepoint_action_send, tracepoint_action_download): New functions.
1915 Helpers for trace action handlers.
1916 (add_tracepoint_action): Remove setup actions ops.
1917 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1918
1919 2016-02-10 Yao Qi <yao.qi@linaro.org>
1920
1921 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1922
1923 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1926 to AC_OUTPUT.
1927 * configure: Regenerate.
1928
1929 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1932 void * to gdb_byte *.
1933 * linux-low.c (siginfo_fixup): Likewise.
1934 (linux_xfer_siginfo): Likewise.
1935 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1936 Likewise.
1937 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1938
1939 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1940
1941 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1942 to srv_tgtobj.
1943 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1944 to srv_tgtobj.
1945 * linux-x86-low.c [__x86_64__]: Include
1946 "nat/amd64-linux-siginfo.h".
1947 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1948 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1949 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1950 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1951 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1952 (cpt_si_fd, si_timerid, si_overrun): Move from
1953 nat/amd64-linux-siginfo.c.
1954 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1955
1956 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1957
1958 * server.c (skip_to_semicolon): Remove.
1959 (process_point_options): Use strchrnul instead of
1960 skip_to_semicolon.
1961
1962 2016-01-26 Yao Qi <yao.qi@linaro.org>
1963
1964 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1965 * linux-low.c (install_software_single_step_breakpoints): Don't
1966 call regcache_read_pc.
1967 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1968 argument pc.
1969
1970 2016-01-26 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-low.c (install_software_single_step_breakpoints): Call
1973 regcache_read_pc instead of get_pc.
1974
1975 2016-01-26 Yao Qi <yao.qi@linaro.org>
1976
1977 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1978 (unblock_async_io): Rename to ...
1979 (block_unblock_async_io): ... it. New function.
1980 (enable_async_io): Don't install SIGIO handler. Unblock it
1981 instead.
1982 (disable_async_io): Don't ignore SIGIO. Block it instead.
1983 (initialize_async_io): Install SIGIO handler. Don't call
1984 unblock_async_io.
1985
1986 2016-01-26 Yao Qi <yao.qi@linaro.org>
1987
1988 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1989 first character is '\003', call *the_target->request_interrupt.
1990
1991 2016-01-25 Yao Qi <yao.qi@linaro.org>
1992
1993 * remote-utils.c (new_thread_notify): Remove.
1994 (dead_thread_notify): Likewise.
1995 * remote-utils.h (new_thread_notify): Remove declaration.
1996 (dead_thread_notify): Likewise.
1997
1998 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1999
2000 * gdb.trace/pending.exp: Fix expected message on continue.
2001
2002 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2003
2004 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2005 it works properly on big-endian machines where sizeof (CORE_ADDR)
2006 != sizeof (void *).
2007
2008 2016-01-21 Pedro Alves <palves@redhat.com>
2009
2010 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2011 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2012 * configure: Regenerate.
2013
2014 2016-01-21 Yao Qi <yao.qi@linaro.org>
2015
2016 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2017 is_thumb and set it according to CPSR saved on the stack.
2018 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2019 arm_sigreturn_next_pc.
2020
2021 2016-01-18 Yao Qi <yao.qi@linaro.org>
2022
2023 * linux-low.c (linux_set_pc_64bit): New function.
2024 (linux_get_pc_64bit): New function.
2025 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2026 Declare.
2027 * linux-sparc-low.c (debug_threads): Remove declaration.
2028 (sparc_get_pc): Remove.
2029 (the_low_target): Use linux_get_pc_64bit instead of
2030 sparc_get_pc.
2031 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2032 (the_low_target): Use linux_get_pc_64bit and
2033 linux_set_pc_64bit.
2034
2035 2016-01-18 Yao Qi <yao.qi@linaro.org>
2036
2037 * linux-arm-low.c (debug_threads): Remove declaration.
2038 (arm_get_pc, arm_set_pc): Remove.
2039 (the_low_target): Use linux_get_pc_32bit and
2040 linux_set_pc_32bit.
2041 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2042 (the_low_target): Use linux_get_pc_32bit and
2043 linux_set_pc_32bit.
2044 * linux-cris-low.c (debug_threads): Remove declaration.
2045 (cris_get_pc, cris_set_pc,): Remove.
2046 (the_low_target): Use linux_get_pc_32bit and
2047 linux_set_pc_32bit.
2048 * linux-crisv32-low.c (debug_threads): Remove declaration.
2049 (cris_get_pc, cris_set_pc): Remove.
2050 (the_low_target): Use linux_get_pc_32bit and
2051 linux_set_pc_32bit.
2052 * linux-low.c: Include inttypes.h.
2053 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2054 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2055 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2056 (the_low_target): Use linux_get_pc_32bit and
2057 linux_set_pc_32bit.
2058 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2059 (the_low_target): Use linux_get_pc_32bit and
2060 linux_set_pc_32bit.
2061 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2062 (the_low_target): Use linux_get_pc_32bit and
2063 linux_set_pc_32bit.
2064 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2065 (the_low_target): Use linux_get_pc_32bit and
2066 linux_set_pc_32bit.
2067 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2068 (the_low_target): Use linux_get_pc_32bit and
2069 linux_set_pc_32bit.
2070
2071 2016-01-18 Gary Benson <gbenson@redhat.com>
2072
2073 * configure.ac (AC_FUNC_FORK): New check.
2074 * config.in: Regenerate.
2075 * configure: Likewise.
2076
2077 2016-01-14 Yao Qi <yao.qi@linaro.org>
2078
2079 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2080 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2081 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2082 arm_get_next_pcs_ctor.
2083
2084 2016-01-12 Josh Stone <jistone@redhat.com>
2085 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2086
2087 * inferiors.h: Include "gdb_vecs.h".
2088 (struct process_info): Add syscalls_to_catch.
2089 * inferiors.c (remove_process): Free syscalls_to_catch.
2090 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2091 syscall_return stops.
2092 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2093 * server.c (handle_general_set): Handle QCatchSyscalls.
2094 (handle_query): Report support for QCatchSyscalls.
2095 * target.h (struct target_ops): Add supports_catch_syscall.
2096 (target_supports_catch_syscall): New macro.
2097 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2098 (struct lwp_info): Add syscall_state.
2099 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2100 Maintain syscall_state and syscalls_to_catch across exec.
2101 (get_syscall_trapinfo): New function, proxy to the_low_target.
2102 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2103 (linux_low_filter_event): Toggle syscall_state entry/return for
2104 syscall traps, and set it ignored for all others.
2105 (gdb_catching_syscalls_p): New function.
2106 (gdb_catch_this_syscall_p): New function.
2107 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2108 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2109 (linux_supports_catch_syscall): New function.
2110 (linux_target_ops): Install it.
2111 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2112 (the_low_target): Install it.
2113
2114 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2115
2116 * acinclude.m4: Include new ../warning.m4 file.
2117 * configure: Regenerated.
2118 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2119
2120 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2121
2122 * ax.c (is_goto_target): Mark static.
2123 * linux-low.c (register_addr): Likewise.
2124 (linux_fetch_registers, linux_store_registers): Likewise.
2125 * mem-break.c (any_persistent_commands): Fix old prototype.
2126 (add_commands_to_breakpoint): Mark static.
2127 * regcache.c (find_register_by_name): Delete unused func.
2128 * remote-utils.c (hex_or_minus_one): Mark static.
2129 * server.c (monitor_show_help): Mark static.
2130 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2131 handle_v_requests): Likewise.
2132
2133 2016-01-12 Pedro Alves <palves@redhat.com>
2134
2135 Remove use of the registered trademark symbol throughout.
2136
2137 2016-01-08 Yao Qi <yao.qi@linaro.org>
2138
2139 * remote-utils.c (getpkt): If c is '\003', call target hook
2140 request_interrupt.
2141
2142 2016-01-06 Yao Qi <yao.qi@linaro.org>
2143
2144 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2145 linux-aarch32-low.c.
2146 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2147 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2148 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2149 (thumb2_breakpoint): Declare.
2150 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2151 linux-aarch32-low.h.
2152 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2153 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2154 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2155
2156 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2157
2158 * gdbreplay.c (gdbreplay_version): Change copyright year in
2159 version message.
2160 * server.c (gdbserver_version): Likewise.
2161
2162 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2163
2164 * server.c (crc32_table): Delete.
2165 (crc32): Use libiberty's xcrc32 function.
2166
2167 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2168
2169 * lynx-low.c (lynx_delete_thread_callback): New function.
2170 (lynx_mourn): Properly delete our process and all of its
2171 threads. Remove call to clear_inferiors.
2172
2173 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2174
2175 * target.c (thread_search_callback): Add check that
2176 the thread_stopped target callback is not NULL before
2177 calling it.
2178
2179 2015-12-21 Yao Qi <yao.qi@linaro.org>
2180
2181 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2182 arm breakpoint.
2183
2184 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2185
2186 * server.c (handle_query): Call target_supports_software_single_step.
2187
2188 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2189
2190 * linux-low.c (single_step): New function.
2191 (linux_resume_one_lwp_throw): Call single_step.
2192 (start_step_over): Likewise.
2193
2194 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2195
2196 * Makefile.in (SFILES): Append arch/arm-linux.c,
2197 arch/arm-get-next-pcs.c.
2198 (arm-linux.o): New rule.
2199 (arm-get-next-pcs.o): New rule.
2200 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2201 arm-linux.o.
2202 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2203 to linux-aarch32-low.c.
2204 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2205 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2206 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2207 (thumb2_breakpoint_len): Likewise.
2208 (arm_is_thumb_mode): Make non-static.
2209 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2210 from linux-aarch32-low.c.
2211 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2212 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2213 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2214 (thumb2_breakpoint_len): Likewise.
2215 (arm_is_thumb_mode): New declaration.
2216 * linux-arm-low.c: Include arch/arm-linux.h
2217 aarch/arm-get-next-pcs.h, sys/syscall.h.
2218 (get_next_pcs_ops): New struct.
2219 (get_next_pcs_addr_bits_remove): New function.
2220 (get_next_pcs_is_thumb): New function.
2221 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2222 (arm_sigreturn_next_pc): Likewise.
2223 (get_next_pcs_syscall_next_pc): Likewise.
2224 (arm_gdbserver_get_next_pcs): Likewise.
2225 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2226 Initialize.
2227 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2228 * server.h: Include gdb_vecs.h.
2229
2230 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2231
2232 * Makefile.in (SFILES): Append common/common-regcache.c.
2233 (OBS): Append common-regcache.o.
2234 (common-regcache.o): New rule.
2235 * regcache.c (init_register_cache): Initialize cache to
2236 REG_UNAVAILABLE.
2237 (regcache_raw_read_unsigned): New function.
2238 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2239 register_status enum.
2240
2241 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2242
2243 * linux-aarch64-low.c (the_low_targets): Rename
2244 breakpoint_reinsert_addr to get_next_pcs.
2245 * linux-arm-low.c (the_low_targets): Likewise.
2246 * linux-bfin-low.c (the_low_targets): Likewise.
2247 * linux-cris-low.c (the_low_targets): Likewise.
2248 * linux-crisv32-low.c (the_low_targets): Likewise.
2249 * linux-low.c (can_software_single_step): Likewise.
2250 (install_software_single_step_breakpoints): New function.
2251 (start_step_over): Use install_software_single_step_breakpoints.
2252 * linux-low.h: New CORE_ADDR vector.
2253 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2254 get_next_pcs.
2255 * linux-mips-low.c (the_low_targets): Likewise.
2256 * linux-nios2-low.c (the_low_targets): Likewise.
2257 * linux-sparc-low.c (the_low_targets): Likewise.
2258
2259 2015-12-17 Pedro Alves <palves@redhat.com>
2260
2261 * linux-low.c (linux_kill_one_lwp): Remove references to
2262 LinuxThreads.
2263 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2264 to 'kill'.
2265 (linux_init_signals): Delete.
2266 (initialize_low): Adjust.
2267 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2268
2269 2015-12-16 Pedro Alves <palves@redhat.com>
2270
2271 * configure.ac (compiler warning flags): When testing a
2272 -Wno-foo option, check whether -Wfoo works instead.
2273 * configure: Regenerate.
2274
2275 2015-12-11 Don Breazeal <donb@codesourcery.com>
2276
2277 * server.c (process_serial_event): Don't exit from gdbserver
2278 in remote mode if there are still active inferiors.
2279
2280 2015-12-11 Yao Qi <yao.qi@linaro.org>
2281
2282 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2283 arm_breakpoint_at if the process is 32-bit.
2284
2285 2015-12-11 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2288 arm breakpoint.
2289
2290 2015-12-07 Yao Qi <yao.qi@linaro.org>
2291
2292 * configure.srv: Append arm.o to srv_tgtobj for
2293 aarch64*-*-linux* target.
2294 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2295 from linux-arm-low.c.
2296 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2297 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2298 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2299 (thumb2_breakpoint_len): Likewise.
2300 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2301 (arm_breakpoint_kinds): Likewise.
2302 (arm_breakpoint_kind_from_pc): Likewise.
2303 (arm_sw_breakpoint_from_kind): Likewise.
2304 (arm_breakpoint_kind_from_current_state): Likewise.
2305 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2306 (arm_sw_breakpoint_from_kind): Declare.
2307 (arm_breakpoint_kind_from_current_state): Declare.
2308 (arm_breakpoint_at): Declare.
2309 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2310 arm_sw_breakpoint_from_kind if process is 32-bit.
2311 (aarch64_breakpoint_kind_from_pc): New function.
2312 (aarch64_breakpoint_kind_from_current_state): New function.
2313 (the_low_target): Initialize fields breakpoint_kind_from_pc
2314 and breakpoint_kind_from_current_state.
2315 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2316 linux-aarch32-low.c.
2317 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2318 (arm_breakpoint, arm_breakpoint_len): Likewise.
2319 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2320 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2321 (arm_is_thumb_mode): Likewise.
2322 (arm_breakpoint_at): Likewise.
2323 (arm_breakpoint_kind_from_pc): Likewise.
2324 (arm_sw_breakpoint_from_kind): Likewise.
2325 (arm_breakpoint_kind_from_current_state): Likewise.
2326
2327 Revert:
2328 2015-08-04 Yao Qi <yao.qi@linaro.org>
2329
2330 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2331 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2332 * server.c (extended_protocol): Remove "static".
2333 * server.h (extended_protocol): Declare it.
2334
2335 2015-12-04 Josh Stone <jistone@redhat.com>
2336
2337 * target.h (struct target_ops) <arch_setup>: Rename to ...
2338 (struct target_ops) <post_create_inferior>: ... this.
2339 (target_arch_setup): Rename to ...
2340 (target_post_create_inferior): ... this, calling post_create_inferior.
2341 * server.c (start_inferior): Update target_arch_setup calls to
2342 target_post_create_inferior.
2343 * linux-low.c (linux_low_ptrace_options): Forward declare.
2344 (linux_arch_setup): Update its comment for general use.
2345 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2346 (struct linux_target_ops): Use linux_post_create_inferior.
2347 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2348 to post_create_inferior.
2349 * nto-low.c (struct nto_target_ops): Likewise.
2350 * spu-low.c (struct spu_target_ops): Likewise.
2351 * win32-low.c (struct win32_target_ops): Likewise.
2352
2353 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2354
2355 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2356
2357 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2358
2359 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2360 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2361 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2362 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2363 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2364 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2365 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2366 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2367 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2368 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2369 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2370 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2371
2372 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2373
2374 * linux-low.c (linux_look_up_symbols): Don't call
2375 linux_supports_traceclone.
2376 * linux-low.h (thread_db_init): Remove use_events argument.
2377 * thread-db.c (thread_db_use_event): Remove global variable.
2378 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2379 (struct thread_db) <td_create_bp>: Remove field.
2380 (thread_db_create_event): Remove function.
2381 (thread_db_enable_reporting): Likewise.
2382 (find_one_thread): Don't check for thread_db_use_events.
2383 (attach_thread): Likewise.
2384 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2385 (try_thread_db_load_1): Don't check for thread_db_use_events.
2386 (thread_db_init): Remove use_events argument and thread events
2387 handling.
2388 (remove_thread_event_breakpoints): Remove function.
2389 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2390
2391 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2392
2393 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2394 New function.
2395 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2396 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2397 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2398 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2399 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2400 Initialize.
2401 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2402 New function.
2403 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2404 * linux-low.c (can_hardware_single_step): Use
2405 supports_hardware_single_step.
2406 (can_software_single_step): New function.
2407 (start_step_over): Call can_software_single_step.
2408 (linux_supports_hardware_single_step): New function.
2409 (struct target_ops) <supports_software_single_step>: Initialize.
2410 * linux-low.h (struct linux_target_ops)
2411 <supports_hardware_single_step>: Initialize.
2412 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2413 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2414 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2415 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2416 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2417 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2418 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2419 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2420 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2421 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2422 Initialize.
2423 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2424 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2425 Initialize.
2426 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2427 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2428 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2429 New function.
2430 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2431 * target.h (struct target_ops): <supports_software_single_step>:
2432 New field.
2433 (target_supports_software_single_step): New macro.
2434
2435 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2436
2437 * linux-low.c (linux_wait_1): Fix pc advance condition.
2438 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2439 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2440
2441 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2442
2443 * linux-arm-low.c (arm_is_thumb_mode): New function.
2444 (arm_breakpoint_at): Use arm_is_thumb_mode.
2445 (arm_breakpoint_kind_from_current_state): New function.
2446 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2447 Initialize.
2448 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2449 (linux_breakpoint_kind_from_current_state): New function.
2450 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2451 * linux-low.h (struct linux_target_ops)
2452 <breakpoint_kind_from_current_state>: New field.
2453 * target.h (struct target_ops): Likewise.
2454 (target_breakpoint_kind_from_current_state): New macro.
2455
2456 2015-11-30 Pedro Alves <palves@redhat.com>
2457
2458 * linux-low.c (linux_resume): Wake up the event loop before
2459 returning.
2460
2461 2015-11-30 Pedro Alves <palves@redhat.com>
2462
2463 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2464 check.
2465 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2466 to -1.
2467 * target.c (struct thread_search): New structure.
2468 (thread_search_callback): New function.
2469 (prev_general_thread): New global.
2470 (prepare_to_access_memory, done_accessing_memory): New functions.
2471 * target.h (prepare_to_access_memory, done_accessing_memory):
2472 Replace macros with function declarations.
2473
2474 2015-11-30 Pedro Alves <palves@redhat.com>
2475
2476 PR 14618
2477 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2478 report TARGET_WAITKIND_NO_RESUMED.
2479 * remote-utils.c (prepare_resume_reply): Handle
2480 TARGET_WAITKIND_NO_RESUMED.
2481 * server.c (report_no_resumed): New global.
2482 (handle_query) <qSupported>: Handle "no-resumed+". Report
2483 "no-resumed+" support.
2484 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2485 return error if the client doesn't support no-resumed events.
2486 (push_stop_notification): New function.
2487 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2488 events if the client supports them.
2489
2490 2015-11-30 Pedro Alves <palves@redhat.com>
2491
2492 * linux-low.c (thread_still_has_status_pending_p): Don't check
2493 vCont;t here.
2494 (lwp_resumed): New function.
2495 (status_pending_p_callback): Return early if the LWP is not
2496 supposed to be resumed.
2497
2498 2015-11-30 Pedro Alves <palves@redhat.com>
2499
2500 * linux-low.c (handle_extended_wait): Assert that the LWP's
2501 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2502 thread create events, leave the new child's status pending.
2503 (linux_low_filter_event): If GDB wants to hear about thread exit
2504 events, leave the LWP marked dead and don't delete it.
2505 (linux_wait_for_event_filtered): Don't check for thread exit.
2506 (filter_exit_event): New function.
2507 (linux_wait_1): Use it, when returning an exit event.
2508 (linux_resume_one_lwp_throw): Assert that the LWP's
2509 waitstatus is TARGET_WAITKIND_IGNORE.
2510 * remote-utils.c (prepare_resume_reply): Handle
2511 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2512 * server.c (report_thread_events): New global.
2513 (handle_general_set): Handle QThreadEvents.
2514 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2515 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2516 TARGET_WAITKIND_THREAD_EXITED.
2517 * server.h (report_thread_events): Declare.
2518
2519 2015-11-30 Pedro Alves <palves@redhat.com>
2520
2521 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2522 the thread's last_resume_kind was resume_stop.
2523
2524 2015-11-30 Pedro Alves <palves@redhat.com>
2525
2526 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2527 before returning.
2528
2529 2015-11-30 Pedro Alves <palves@redhat.com>
2530
2531 * server.c (handle_v_requests): Handle vCtrlC.
2532
2533 2015-11-30 Pedro Alves <palves@redhat.com>
2534
2535 * gdbthread.h (find_any_thread_of_pid): Declare.
2536 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2537 functions.
2538 * server.c (handle_query): If current_thread is NULL, look for
2539 another thread of the selected process.
2540
2541 2015-11-26 Daniel Colascione <dancol@dancol.org>
2542 Simon Marchi <simon.marchi@ericsson.com>
2543
2544 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2545 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2546 name in reply.
2547 * target.h (struct target_ops) <thread_name>: New field.
2548 (target_thread_name): New macro.
2549
2550 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2551
2552 * regcache.h (regcache_invalidate_pid): Add declaration.
2553 * regcache.c (regcache_invalidate_pid): New function, extracted
2554 from regcache_invalidate.
2555 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2556 Add trivial documentation comment.
2557 * lynx-low.c: Use regcache_invalidate_pid instead of
2558 regcache_invalidate.
2559
2560 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2561
2562 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2563 and Elf64_auxv_t if the target is Android.
2564
2565 2015-11-22 Doug Evans <xdje42@gmail.com>
2566
2567 * target.h: #include <sys/types.h>.
2568
2569 2015-11-19 Pedro Alves <palves@redhat.com>
2570
2571 * linux-low.c (linux_process_qsupported): Change prototype.
2572 Adjust.
2573 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2574 Change prototype.
2575 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2576 and adjust to loop over all features.
2577 * server.c (handle_query) <qSupported>: Adjust to call
2578 target_process_qsupported once, passing it a vector of unprocessed
2579 features.
2580 * target.h (struct target_ops) <process_qsupported>: Change
2581 prototype.
2582 (target_process_qsupported): Adjust.
2583
2584 2015-11-19 Pedro Alves <palves@redhat.com>
2585
2586 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2587 mode.
2588 * configure: Regenerate.
2589
2590 2015-11-19 Pedro Alves <palves@redhat.com>
2591
2592 * configure: Regenerate.
2593
2594 2015-11-19 Yao Qi <yao.qi@linaro.org>
2595
2596 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2597 type to uint32_t.
2598
2599 2015-11-19 Yao Qi <yao.qi@linaro.org>
2600
2601 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2602 (struct aarch64_operand): Move enum out.
2603
2604 2015-11-19 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2607 struct user_fpsimd_state *.
2608 (aarch64_store_fpregset): Likewise.
2609
2610 2015-11-19 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2613 struct user_pt_regs *.
2614 (aarch64_store_gregset): Likewise.
2615
2616 2015-11-18 Pedro Alves <palves@redhat.com>
2617
2618 * Makefile.in (all_object_files): Add $IPA_OBJS.
2619
2620 2015-11-17 Pedro Alves <palves@redhat.com>
2621
2622 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2623 GDB_SIGNAL_0 and gdb_signal_to_string.
2624
2625 2015-11-17 Pedro Alves <palves@redhat.com>
2626
2627 * win32-low.c (handle_output_debug_string): Remove parameter.
2628 (win32_kill): Remove our_status local and adjust call to
2629 handle_output_debug_string.
2630 (get_child_debug_event): Adjust call to
2631 handle_output_debug_string.
2632
2633 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2634
2635 * linux-mips-low.c (mips_fill_gregset): Add cast.
2636 (mips_store_gregset): Likewise.
2637 (mips_fill_fpregset): Likewise.
2638 (mips_store_fpregset): Likewise.
2639
2640 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2641
2642 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2643 priv.
2644
2645 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2646
2647 * linux-mips-low.c (mips_linux_new_thread): Change type of
2648 watch_type to enum target_hw_bp_type.
2649
2650 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2651
2652 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2653 Change return type to arm_hwbp_type.
2654
2655 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2656
2657 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2658 (arm_store_gregset): Likewise.
2659 * linux-arm-low.c (arm_get_hwcap): Likewise.
2660 (arm_read_description): Likewise.
2661
2662 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2663
2664 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2665
2666 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2667
2668 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2669 (ppc_fill_vsxregset): Likewise.
2670 (ppc_store_vsxregset): Likewise.
2671 (ppc_fill_vrregset): Likewise.
2672 (ppc_store_vrregset): Likewise.
2673 (ppc_fill_evrregset): Likewise.
2674 (ppc_store_evrregset): Likewise.
2675
2676 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2677
2678 * linux-ppc-low.c (ppc_usrregs_info): Remove
2679 forward-declaration.
2680 (ppc_arch_setup): Move lower in file.
2681
2682 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2683
2684 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2685 (ps_pdwrite): Likewise.
2686
2687 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2688
2689 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2690 to after assert checks.
2691
2692 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2693
2694 * proc-service.c (ps_pdread): Add/adjust casts.
2695 (ps_pdwrite): Add/adjust casts.
2696
2697 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2698
2699 * server.c (handle_search_memory_1): Cast return value of
2700 memmem.
2701
2702 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2703
2704 * server.c (write_qxfer_response): Change type of data to
2705 gdb_byte *.
2706
2707 2015-10-29 Pedro Alves <palves@redhat.com>
2708
2709 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2710
2711 2015-10-29 Pedro Alves <palves@redhat.com>
2712
2713 * tracepoint.c (clear_installed_tracepoints): Add casts.
2714
2715 2015-10-29 Pedro Alves <palves@redhat.com>
2716
2717 * server.c (handle_v_cont, process_serial_event): Add enum
2718 gdb_signal casts to signal parsing code.
2719
2720 2015-10-29 Pedro Alves <palves@redhat.com>
2721
2722 * linux-low.h (NULL_REGSET): Define.
2723 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2724 * linux-arm-low.c (arm_regsets): Likewise.
2725 * linux-crisv32-low.c (cris_regsets): Likewise.
2726 * linux-m68k-low.c (m68k_regsets): Likewise.
2727 * linux-mips-low.c (mips_regsets): Likewise.
2728 * linux-nios2-low.c (nios2_regsets): Likewise.
2729 * linux-ppc-low.c (ppc_regsets): Likewise.
2730 * linux-s390-low.c (s390_regsets): Likewise.
2731 * linux-sh-low.c (sh_regsets): Likewise.
2732 * linux-sparc-low.c (sparc_regsets): Likewise.
2733 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2734 * linux-tile-low.c (tile_regsets): Likewise.
2735 * linux-x86-low.c (x86_regsets): Likewise.
2736 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2737
2738 2015-10-29 Pedro Alves <palves@redhat.com>
2739
2740 * linux-low.h (NULL_REGSET): Define.
2741 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2742 * linux-arm-low.c (arm_regsets): Likewise.
2743 * linux-crisv32-low.c (cris_regsets): Likewise.
2744 * linux-m68k-low.c (m68k_regsets): Likewise.
2745 * linux-mips-low.c (mips_regsets): Likewise.
2746 * linux-nios2-low.c (nios2_regsets): Likewise.
2747 * linux-ppc-low.c (ppc_regsets): Likewise.
2748 * linux-s390-low.c (s390_regsets): Likewise.
2749 * linux-sh-low.c (sh_regsets): Likewise.
2750 * linux-sparc-low.c (sparc_regsets): Likewise.
2751 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2752 * linux-tile-low.c (tile_regsets): Likewise.
2753 * linux-x86-low.c (x86_regsets): Likewise.
2754 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2755
2756 2015-10-26 Doug Evans <dje@google.com>
2757
2758 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2759
2760 2015-10-26 Doug Evans <dje@google.com>
2761
2762 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2763
2764 2015-10-26 Doug Evans <dje@google.com>
2765
2766 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2767 for debug_printf.
2768 (attach_thread, find_new_threads_callback): Ditto.
2769
2770 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2771
2772 * mem-break.h (set_breakpoint_data): Remove.
2773
2774 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2775
2776 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2777 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2778 (initialize_low): Remove set_breakpoint_data call.
2779 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2780 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2781 (initialize_low): Remove set_breakpoint_data call.
2782 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2783 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2784 (initialize_low): Remove set_breakpoint_data call.
2785
2786 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2787
2788 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2789 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2790 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2791 * target.h (target_breakpoint_kind_from_pc): New macro.
2792
2793 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2794
2795 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2796 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2797 the default breakpoint kind.
2798
2799 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2800
2801 * linux-arm-low.c (arm_supports_z_point_type): Add software
2802 breakpoint support.
2803
2804 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2805
2806 * linux-arm-low.c: Refactor breakpoint definitions.
2807 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2808 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2809
2810 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2811
2812 * Makefile.in: Add arm.c/o.
2813 * configure.srv: Likewise.
2814 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2815 (arm_breakpoint_kind_from_pc): New function.
2816 (arm_sw_breakpoint_from_kind): Return proper kind.
2817 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2818
2819 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2820
2821 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2822 removal.
2823 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2824 (struct raw_breakpoint) <size>: Remove.
2825 (struct raw_breakpoint) <kind>: Add.
2826 (bp_size): New function.
2827 (bp_opcode): Likewise.
2828 (find_raw_breakpoint_at): Adjust for kind.
2829 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2830 (remove_memory_breakpoint): Adjust for kind call bp_size.
2831 (set_raw_breakpoint_at): Adjust for kind.
2832 (set_breakpoint): Likewise.
2833 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2834 (delete_raw_breakpoint): Adjust for kind.
2835 (delete_breakpoint): Likewise.
2836 (find_gdb_breakpoint): Likewise.
2837 (set_gdb_breakpoint_1): Likewise.
2838 (set_gdb_breakpoint): Likewise.
2839 (delete_gdb_breakpoint_1): Likewise.
2840 (delete_gdb_breakpoint): Likewise.
2841 (uninsert_raw_breakpoint): Likewise.
2842 (reinsert_raw_breakpoint): Likewise.
2843 (set_breakpoint_data): Remove.
2844 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2845 (check_mem_read): Adjust for kind call bp_size.
2846 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2847 (clone_one_breakpoint): Adjust for kind.
2848 * mem-break.h (set_gdb_breakpoint): Likewise.
2849 (delete_gdb_breakpoint): Likewise.
2850 * server.c (process_serial_event): Likewise.
2851
2852 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2853
2854 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2855 (struct linux_target_ops) <breakpoint>: Remove.
2856 (struct linux_target_ops) <breakpoint_len>: Remove.
2857 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2858 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2859 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2860 (arm_sw_breakpoint_from_kind): New function.
2861 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2862 (struct linux_target_ops) <breakpoint>: Remove.
2863 (struct linux_target_ops) <breakpoint_len>: Remove.
2864 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2865 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2866 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2867 (struct linux_target_ops) <breakpoint>: Remove.
2868 (struct linux_target_ops) <breakpoint_len>: Remove.
2869 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2870 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2871 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2872 (struct linux_target_ops) <breakpoint>: Remove.
2873 (struct linux_target_ops) <breakpoint_len>: Remove.
2874 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2875 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2876 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2877 and sw_breakpoint_from_kind to increment the pc.
2878 (linux_breakpoint_kind_from_pc): New function.
2879 (linux_sw_breakpoint_from_kind): New function.
2880 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2881 (initialize_low): Call breakpoint_kind_from_pc and
2882 sw_breakpoint_from_kind to replace breakpoint_data/len.
2883 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2884 New field.
2885 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2886 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2887 (struct linux_target_ops) <breakpoint>: Remove.
2888 (struct linux_target_ops) <breakpoint_len>: Remove.
2889 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2890 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2891 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2892 (struct linux_target_ops) <breakpoint>: Remove.
2893 (struct linux_target_ops) <breakpoint_len>: Remove.
2894 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2895 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2896 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2897 (struct linux_target_ops) <breakpoint>: Remove.
2898 (struct linux_target_ops) <breakpoint_len>: Remove.
2899 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2900 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2901 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2902 (struct linux_target_ops) <breakpoint>: Remove.
2903 (struct linux_target_ops) <breakpoint_len>: Remove.
2904 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2905 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2906 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2907 (struct linux_target_ops) <breakpoint>: Remove.
2908 (struct linux_target_ops) <breakpoint_len>: Remove.
2909 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2910 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2911 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2912 (struct linux_target_ops) <breakpoint>: Remove.
2913 (struct linux_target_ops) <breakpoint_len>: Remove.
2914 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2915 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2916 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2917 (struct linux_target_ops) <breakpoint>: Remove.
2918 (struct linux_target_ops) <breakpoint_len>: Remove.
2919 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2920 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2921 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2922 (struct linux_target_ops) <breakpoint>: Remove.
2923 (struct linux_target_ops) <breakpoint_len>: Remove.
2924 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2925 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2926 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2927 (struct linux_target_ops) <breakpoint>: Remove.
2928 (struct linux_target_ops) <breakpoint_len>: Remove.
2929 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2931 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2932 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2933 (struct linux_target_ops) <breakpoint>: Remove.
2934 (struct linux_target_ops) <breakpoint_len>: Remove.
2935 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2936 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2937 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2938 (struct linux_target_ops) <breakpoint>: Remove.
2939 (struct linux_target_ops) <breakpoint_len>: Remove.
2940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2942
2943 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2944
2945 * linux-cris-low.c (cris_get_pc): Remove void arg.
2946
2947 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2948
2949 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2950 variable name.
2951
2952 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2953
2954 * inferiors.c (thread_pid_matches_callback): New function.
2955 (find_thread_process): New function.
2956 (remove_thread): Reset current_thread.
2957 (remove_process): Assert threads have been removed first.
2958
2959 2015-10-15 Yao Qi <yao.qi@linaro.org>
2960
2961 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2962 if it is 3.
2963 (aarch64_remove_point): Likewise.
2964 * regcache.c (regcache_register_size): New function.
2965
2966 2015-10-12 Yao Qi <yao.qi@linaro.org>
2967
2968 * linux-aarch64-low.c: Update all callers as emit_load_store
2969 is renamed to aarch64_emit_load_store.
2970
2971 2015-10-12 Yao Qi <yao.qi@linaro.org>
2972
2973 * linux-aarch64-low.c: Update all callers of function renaming
2974 from emit_insn to aarch64_emit_insn.
2975
2976 2015-10-12 Yao Qi <yao.qi@linaro.org>
2977
2978 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2979 arch/aarch64-insn.h.
2980 (struct aarch64_memory_operand): Likewise.
2981 (ENCODE): Likewise.
2982 (emit_insn): Move to arch/aarch64-insn.c.
2983 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2984 (emit_load_store): Move to arch/aarch64-insn.c.
2985 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2986 (can_encode_int32): Remove.
2987
2988 2015-10-12 Yao Qi <yao.qi@linaro.org>
2989
2990 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2991 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2992 (aarch64_relocate_instruction): Likewise.
2993 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2994 (struct aarch64_insn_visitor): Likewise.
2995
2996 2015-10-12 Yao Qi <yao.qi@linaro.org>
2997
2998 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2999 (struct aarch64_insn_visitor): New.
3000 (struct aarch64_insn_relocation_data): New.
3001 (aarch64_ftrace_insn_reloc_b): New function.
3002 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3003 (aarch64_ftrace_insn_reloc_cb): Likewise.
3004 (aarch64_ftrace_insn_reloc_tb): Likewise.
3005 (aarch64_ftrace_insn_reloc_adr): Likewise.
3006 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3007 (aarch64_ftrace_insn_reloc_others): Likewise.
3008 (visitor): New.
3009 (aarch64_relocate_instruction): Use visitor.
3010
3011 2015-10-12 Yao Qi <yao.qi@linaro.org>
3012
3013 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3014 int. Add argument buf.
3015 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3016 aarch64_relocate_instruction.
3017
3018 2015-10-12 Yao Qi <yao.qi@linaro.org>
3019
3020 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3021 argument insn. Remove local variable insn. Don't call
3022 target_read_uint32.
3023 (aarch64_install_fast_tracepoint_jump_pad): Call
3024 target_read_uint32.
3025
3026 2015-09-30 Yao Qi <yao.qi@linaro.org>
3027
3028 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3029 (emit_load_store_pair): Likewise.
3030
3031 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3032
3033 * dll.c (match_dll): Add cast(s).
3034 (unloaded_dll): Likewise.
3035 * linux-low.c (second_thread_of_pid_p): Likewise.
3036 (delete_lwp_callback): Likewise.
3037 (count_events_callback): Likewise.
3038 (select_event_lwp_callback): Likewise.
3039 (linux_set_resume_request): Likewise.
3040 * server.c (accumulate_file_name_length): Likewise.
3041 (emit_dll_description): Likewise.
3042 (handle_qxfer_threads_worker): Likewise.
3043 (visit_actioned_threads): Likewise.
3044 * thread-db.c (any_thread_of): Likewise.
3045 * tracepoint.c (same_process_p): Likewise.
3046 (match_blocktype): Likewise.
3047 (build_traceframe_info_xml): Likewise.
3048
3049 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3050
3051 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3052 assignment.
3053 (gdb_unparse_agent_expr): Likewise.
3054 * hostio.c (require_data): Likewise.
3055 (handle_pread): Likewise.
3056 * linux-low.c (disable_regset): Likewise.
3057 (fetch_register): Likewise.
3058 (store_register): Likewise.
3059 (get_dynamic): Likewise.
3060 (linux_qxfer_libraries_svr4): Likewise.
3061 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3062 (set_fast_tracepoint_jump): Likewise.
3063 (uninsert_fast_tracepoint_jumps_at): Likewise.
3064 (reinsert_fast_tracepoint_jumps_at): Likewise.
3065 (validate_inserted_breakpoint): Likewise.
3066 (clone_agent_expr): Likewise.
3067 * regcache.c (init_register_cache): Likewise.
3068 * remote-utils.c (putpkt_binary_1): Likewise.
3069 (decode_M_packet): Likewise.
3070 (decode_X_packet): Likewise.
3071 (look_up_one_symbol): Likewise.
3072 (relocate_instruction): Likewise.
3073 (monitor_output): Likewise.
3074 * server.c (handle_search_memory): Likewise.
3075 (handle_qxfer_exec_file): Likewise.
3076 (handle_qxfer_libraries): Likewise.
3077 (handle_qxfer): Likewise.
3078 (handle_query): Likewise.
3079 (handle_v_cont): Likewise.
3080 (handle_v_run): Likewise.
3081 (captured_main): Likewise.
3082 * target.c (write_inferior_memory): Likewise.
3083 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3084 * tracepoint.c (init_trace_buffer): Likewise.
3085 (add_tracepoint_action): Likewise.
3086 (add_traceframe): Likewise.
3087 (add_traceframe_block): Likewise.
3088 (cmd_qtdpsrc): Likewise.
3089 (cmd_qtdv): Likewise.
3090 (cmd_qtstatus): Likewise.
3091 (response_source): Likewise.
3092 (response_tsv): Likewise.
3093 (cmd_qtnotes): Likewise.
3094 (gdb_collect): Likewise.
3095 (initialize_tracepoint): Likewise.
3096
3097 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3098
3099 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3100 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3101 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3102 <NOP>: New.
3103 (enum aarch64_condition_codes): New enum.
3104 (w0): New static global.
3105 (fp): Likewise.
3106 (lr): Likewise.
3107 (struct aarch64_memory_operand) <type>: New
3108 MEMORY_OPERAND_POSTINDEX type.
3109 (postindex_memory_operand): New helper function.
3110 (emit_ret): New function.
3111 (emit_load_store_pair): New function, factored out of emit_stp
3112 with support for MEMORY_OPERAND_POSTINDEX.
3113 (emit_stp): Rewrite using emit_load_store_pair.
3114 (emit_ldp): New function.
3115 (emit_load_store): Likewise.
3116 (emit_ldr): Mention post-index instruction in comment.
3117 (emit_ldrh): New function.
3118 (emit_ldrb): New function.
3119 (emit_ldrsw): Mention post-index instruction in comment.
3120 (emit_str): Likewise.
3121 (emit_subs): New function.
3122 (emit_cmp): Likewise.
3123 (emit_and): Likewise.
3124 (emit_orr): Likewise.
3125 (emit_orn): Likewise.
3126 (emit_eor): Likewise.
3127 (emit_mvn): Likewise.
3128 (emit_lslv): Likewise.
3129 (emit_lsrv): Likewise.
3130 (emit_asrv): Likewise.
3131 (emit_mul): Likewise.
3132 (emit_sbfm): Likewise.
3133 (emit_sbfx): Likewise.
3134 (emit_ubfm): Likewise.
3135 (emit_ubfx): Likewise.
3136 (emit_csinc): Likewise.
3137 (emit_cset): Likewise.
3138 (emit_nop): Likewise.
3139 (emit_ops_insns): New helper function.
3140 (emit_pop): Likewise.
3141 (emit_push): Likewise.
3142 (aarch64_emit_prologue): New function.
3143 (aarch64_emit_epilogue): Likewise.
3144 (aarch64_emit_add): Likewise.
3145 (aarch64_emit_sub): Likewise.
3146 (aarch64_emit_mul): Likewise.
3147 (aarch64_emit_lsh): Likewise.
3148 (aarch64_emit_rsh_signed): Likewise.
3149 (aarch64_emit_rsh_unsigned): Likewise.
3150 (aarch64_emit_ext): Likewise.
3151 (aarch64_emit_log_not): Likewise.
3152 (aarch64_emit_bit_and): Likewise.
3153 (aarch64_emit_bit_or): Likewise.
3154 (aarch64_emit_bit_xor): Likewise.
3155 (aarch64_emit_bit_not): Likewise.
3156 (aarch64_emit_equal): Likewise.
3157 (aarch64_emit_less_signed): Likewise.
3158 (aarch64_emit_less_unsigned): Likewise.
3159 (aarch64_emit_ref): Likewise.
3160 (aarch64_emit_if_goto): Likewise.
3161 (aarch64_emit_goto): Likewise.
3162 (aarch64_write_goto_address): Likewise.
3163 (aarch64_emit_const): Likewise.
3164 (aarch64_emit_call): Likewise.
3165 (aarch64_emit_reg): Likewise.
3166 (aarch64_emit_pop): Likewise.
3167 (aarch64_emit_stack_flush): Likewise.
3168 (aarch64_emit_zero_ext): Likewise.
3169 (aarch64_emit_swap): Likewise.
3170 (aarch64_emit_stack_adjust): Likewise.
3171 (aarch64_emit_int_call_1): Likewise.
3172 (aarch64_emit_void_call_2): Likewise.
3173 (aarch64_emit_eq_goto): Likewise.
3174 (aarch64_emit_ne_goto): Likewise.
3175 (aarch64_emit_lt_goto): Likewise.
3176 (aarch64_emit_le_goto): Likewise.
3177 (aarch64_emit_gt_goto): Likewise.
3178 (aarch64_emit_ge_got): Likewise.
3179 (aarch64_emit_ops_impl): New static global variable.
3180 (aarch64_emit_ops): New target function, return
3181 &aarch64_emit_ops_impl.
3182 (struct linux_target_ops): Install it.
3183
3184 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3185
3186 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3187 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3188 aarch64-ipa.o.
3189 * linux-aarch64-ipa.c: New file.
3190 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3191 and endian.h.
3192 (aarch64_get_thread_area): New target method.
3193 (extract_signed_bitfield): New helper function.
3194 (aarch64_decode_ldr_literal): New function.
3195 (enum aarch64_opcodes): New enum.
3196 (struct aarch64_register): New struct.
3197 (struct aarch64_operand): New struct.
3198 (x0): New static global.
3199 (x1): Likewise.
3200 (x2): Likewise.
3201 (x3): Likewise.
3202 (x4): Likewise.
3203 (w2): Likewise.
3204 (ip0): Likewise.
3205 (sp): Likewise.
3206 (xzr): Likewise.
3207 (aarch64_register): New helper function.
3208 (register_operand): Likewise.
3209 (immediate_operand): Likewise.
3210 (struct aarch64_memory_operand): New struct.
3211 (offset_memory_operand): New helper function.
3212 (preindex_memory_operand): Likewise.
3213 (enum aarch64_system_control_registers): New enum.
3214 (ENCODE): New macro.
3215 (emit_insn): New helper function.
3216 (emit_b): New function.
3217 (emit_bcond): Likewise.
3218 (emit_cb): Likewise.
3219 (emit_tb): Likewise.
3220 (emit_blr): Likewise.
3221 (emit_stp): Likewise.
3222 (emit_ldp_q_offset): Likewise.
3223 (emit_stp_q_offset): Likewise.
3224 (emit_load_store): Likewise.
3225 (emit_ldr): Likewise.
3226 (emit_ldrsw): Likewise.
3227 (emit_str): Likewise.
3228 (emit_ldaxr): Likewise.
3229 (emit_stxr): Likewise.
3230 (emit_stlr): Likewise.
3231 (emit_data_processing_reg): Likewise.
3232 (emit_data_processing): Likewise.
3233 (emit_add): Likewise.
3234 (emit_sub): Likewise.
3235 (emit_mov): Likewise.
3236 (emit_movk): Likewise.
3237 (emit_mov_addr): Likewise.
3238 (emit_mrs): Likewise.
3239 (emit_msr): Likewise.
3240 (emit_sevl): Likewise.
3241 (emit_wfe): Likewise.
3242 (append_insns): Likewise.
3243 (can_encode_int32_in): New helper function.
3244 (aarch64_relocate_instruction): New function.
3245 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3246 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3247 (struct linux_target_ops): Install aarch64_get_thread_area,
3248 aarch64_install_fast_tracepoint_jump_pad and
3249 aarch64_get_min_fast_tracepoint_insn_len.
3250
3251 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3252
3253 * Makefile.in (aarch64-insn.o): New rule.
3254 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3255
3256 2015-09-21 Yao Qi <yao.qi@linaro.org>
3257
3258 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3259
3260 2015-09-21 Yao Qi <yao.qi@linaro.org>
3261
3262 * tracepoint.c (max_jump_pad_size): Remove.
3263
3264 2015-09-18 Yao Qi <yao.qi@linaro.org>
3265
3266 * linux-aarch64-low.c: Don't include sys/uio.h.
3267 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3268
3269 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3270
3271 * tracepoint.c (eval_result_type): Change prototype.
3272 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3273
3274 2015-09-15 Pedro Alves <palves@redhat.com>
3275
3276 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3277 Check whether to report exec events instead of checking whether
3278 multiprocess is enabled.
3279
3280 2015-09-15 Pedro Alves <palves@redhat.com>
3281
3282 PR remote/18965
3283 * remote-utils.c (prepare_resume_reply): Merge
3284 TARGET_WAITKIND_VFORK_DONE switch case with the
3285 TARGET_WAITKIND_FORKED case.
3286
3287 2015-09-15 Yao Qi <yao.qi@linaro.org>
3288
3289 * server.c (handle_query): Check string comparison using
3290 "else if" instead of "if".
3291
3292 2015-09-15 Yao Qi <yao.qi@linaro.org>
3293
3294 * server.c (vCont_supported): New global variable.
3295 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3296 matches. Append ";vContSupported+" to own_buf.
3297 (handle_v_requests): Append ";s;S" to own_buf if target supports
3298 hardware single step or vCont_supported is false.
3299 (capture_main): Set vCont_supported to zero.
3300
3301 2015-09-15 Yao Qi <yao.qi@linaro.org>
3302
3303 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3304 it to ...
3305 (linux_supports_hardware_single_step): ... New function.
3306 (linux_target_ops): Update.
3307 * lynx-low.c (lynx_target_ops): Set field
3308 supports_hardware_single_step to target_can_do_hardware_single_step.
3309 * nto-low.c (nto_target_ops): Likewise.
3310 * spu-low.c (spu_target_ops): Likewise.
3311 * win32-low.c (win32_target_ops): Likewise.
3312 * target.c (target_can_do_hardware_single_step): New function.
3313 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3314 Remove. <supports_hardware_single_step>: New field.
3315 (target_supports_conditional_breakpoints): Remove.
3316 (target_supports_hardware_single_step): New macro.
3317 (target_can_do_hardware_single_step): Declare.
3318 * server.c (handle_query): Use target_supports_hardware_single_step
3319 instead of target_supports_conditional_breakpoints.
3320
3321 2015-09-15 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3324 function.
3325 (struct linux_target_ops the_low_target): Install
3326 aarch64_linux_siginfo_fixup.
3327
3328 2015-09-11 Don Breazeal <donb@codesourcery.com>
3329 Luis Machado <lgustavo@codesourcery.com>
3330
3331 * linux-low.c (linux_mourn): Static declaration.
3332 (linux_arch_setup): Move in front of
3333 handle_extended_wait.
3334 (linux_arch_setup_thread): New function.
3335 (handle_extended_wait): Handle exec events. Call
3336 linux_arch_setup_thread. Make event_lwp argument a
3337 pointer-to-a-pointer.
3338 (check_zombie_leaders): Do not check stopped threads.
3339 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3340 (linux_low_filter_event): Add lwp and thread for exec'ing
3341 non-leader thread if leader thread has been deleted.
3342 Refactor code into linux_arch_setup_thread and call it.
3343 Pass child lwp pointer by reference to handle_extended_wait.
3344 (linux_wait_for_event_filtered): Update comment.
3345 (linux_wait_1): Prevent clobbering exec event status.
3346 (linux_supports_exec_events): New function.
3347 (linux_target_ops) <supports_exec_events>: Initialize new member.
3348 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3349 new member.
3350 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3351 * server.c (report_exec_events): New global variable.
3352 (handle_query): Handle qSupported query for exec-events feature.
3353 (captured_main): Initialize report_exec_events.
3354 * server.h (report_exec_events): Declare new global variable.
3355 * target.h (struct target_ops) <supports_exec_events>: New
3356 member.
3357 (target_supports_exec_events): New macro.
3358 * win32-low.c (win32_target_ops) <supports_exec_events>:
3359 Initialize new member.
3360
3361 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3362
3363 * linux-low.c (linux_low_enable_btrace): Remove.
3364 (linux_target_ops): Replace linux_low_enable_btrace with
3365 linux_enable_btrace.
3366
3367 2015-09-03 Yao Qi <yao.qi@linaro.org>
3368
3369 * linux-aarch64-low.c (aarch64_insert_point): Call
3370 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3371 returns true.
3372
3373 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3374
3375 * linux-low.c (check_stopped_by_breakpoint): Use
3376 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3377
3378 2015-08-27 Pedro Alves <palves@redhat.com>
3379
3380 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3381
3382 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3383
3384 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3385 the XNEW-family equivalent.
3386 (compile_bytecodes): Likewise.
3387 * dll.c (loaded_dll): Likewise.
3388 * event-loop.c (append_callback_event): Likewise.
3389 (create_file_handler): Likewise.
3390 (create_file_event): Likewise.
3391 * hostio.c (handle_open): Likewise.
3392 * inferiors.c (add_thread): Likewise.
3393 (add_process): Likewise.
3394 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3395 * linux-arm-low.c (arm_new_process): Likewise.
3396 (arm_new_thread): Likewise.
3397 * linux-low.c (add_to_pid_list): Likewise.
3398 (linux_add_process): Likewise.
3399 (handle_extended_wait): Likewise.
3400 (add_lwp): Likewise.
3401 (enqueue_one_deferred_signal): Likewise.
3402 (enqueue_pending_signal): Likewise.
3403 (linux_resume_one_lwp_throw): Likewise.
3404 (linux_resume_one_thread): Likewise.
3405 (linux_read_memory): Likewise.
3406 (linux_write_memory): Likewise.
3407 * linux-mips-low.c (mips_linux_new_process): Likewise.
3408 (mips_linux_new_thread): Likewise.
3409 (mips_add_watchpoint): Likewise.
3410 * linux-x86-low.c (initialize_low_arch): Likewise.
3411 * lynx-low.c (lynx_add_process): Likewise.
3412 * mem-break.c (set_raw_breakpoint_at): Likewise.
3413 (set_breakpoint): Likewise.
3414 (add_condition_to_breakpoint): Likewise.
3415 (add_commands_to_breakpoint): Likewise.
3416 (clone_agent_expr): Likewise.
3417 (clone_one_breakpoint): Likewise.
3418 * regcache.c (new_register_cache): Likewise.
3419 * remote-utils.c (look_up_one_symbol): Likewise.
3420 * server.c (queue_stop_reply): Likewise.
3421 (start_inferior): Likewise.
3422 (queue_stop_reply_callback): Likewise.
3423 (handle_target_event): Likewise.
3424 * spu-low.c (fetch_ppc_memory): Likewise.
3425 (store_ppc_memory): Likewise.
3426 * target.c (set_target_ops): Likewise.
3427 * thread-db.c (thread_db_load_search): Likewise.
3428 (try_thread_db_load_1): Likewise.
3429 * tracepoint.c (add_tracepoint): Likewise.
3430 (add_tracepoint_action): Likewise.
3431 (create_trace_state_variable): Likewise.
3432 (cmd_qtdpsrc): Likewise.
3433 (cmd_qtro): Likewise.
3434 (add_while_stepping_state): Likewise.
3435 * win32-low.c (child_add_thread): Likewise.
3436 (get_image_name): Likewise.
3437
3438 2015-08-25 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3441
3442 2015-08-25 Yao Qi <yao.qi@linaro.org>
3443
3444 * Makefile.in (aarch64-linux.o): New rule.
3445 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3446 srv_tgtobj.
3447 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3448 (aarch64_init_debug_reg_state): Make it extern.
3449 (aarch64_linux_prepare_to_resume): Remove.
3450
3451 2015-08-25 Yao Qi <yao.qi@linaro.org>
3452
3453 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3454 lwp_arch_private_info and ptid_of_lwp.
3455
3456 2015-08-25 Yao Qi <yao.qi@linaro.org>
3457
3458 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3459 Find proc_info by find_process_pid. All callers updated.
3460
3461 2015-08-25 Yao Qi <yao.qi@linaro.org>
3462
3463 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3464 Remove.
3465 (debug_reg_change_callback): Remove.
3466 (aarch64_notify_debug_reg_change): Remove.
3467
3468 2015-08-25 Yao Qi <yao.qi@linaro.org>
3469
3470 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3471 Call current_lwp_ptid.
3472
3473 2015-08-25 Yao Qi <yao.qi@linaro.org>
3474
3475 * linux-aarch64-low.c (debug_reg_change_callback): Use
3476 debug_printf.
3477
3478 2015-08-25 Yao Qi <yao.qi@linaro.org>
3479
3480 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3481
3482 2015-08-25 Yao Qi <yao.qi@linaro.org>
3483
3484 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3485
3486 2015-08-25 Yao Qi <yao.qi@linaro.org>
3487
3488 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3489 the code.
3490
3491 2015-08-25 Yao Qi <yao.qi@linaro.org>
3492
3493 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3494 Remove.
3495 (debug_reg_change_callback): Remove argument entry and add argument
3496 lwp. Remove local variable thread. Don't print thread id in the
3497 debugging output. Don't check whether pid of thread equals to pid.
3498 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3499 iterate_over_lwps instead find_inferior.
3500
3501 2015-08-24 Pedro Alves <palves@redhat.com>
3502
3503 * inferiors.c (get_first_process): New function.
3504 * inferiors.h (get_first_process): New declaration.
3505 * remote-utils.c (read_ptid): Default to the first process in the
3506 list, instead of to the current thread's process.
3507
3508 2015-08-24 Pedro Alves <palves@redhat.com>
3509
3510 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3511 * event-loop.c: Likewise.
3512 * remote-utils.c: Likewise.
3513 * tracepoint.c: Likewise.
3514
3515 2015-08-24 Pedro Alves <palves@redhat.com>
3516
3517 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3518 ptid_get_lwp.
3519
3520 2015-08-21 Pedro Alves <palves@redhat.com>
3521
3522 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3523 instead of literal 1.
3524
3525 2015-08-21 Pedro Alves <palves@redhat.com>
3526
3527 * tdesc.c (default_description): Explicitly zero-initialize.
3528
3529 2015-08-21 Pedro Alves <palves@redhat.com>
3530
3531 PR gdb/18749
3532 * inferiors.c (remove_thread): Discard any pending stop reply for
3533 this thread.
3534 * server.c (remove_all_on_match_pid): Rename to ...
3535 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3536 instead of a pid.
3537 (discard_queued_stop_replies): Change parameter to a ptid. Now
3538 extern.
3539 (handle_v_kill, kill_inferior_callback, captured_main)
3540 (process_serial_event): Adjust.
3541 * server.h (discard_queued_stop_replies): Declare.
3542
3543 2015-08-21 Pedro Alves <palves@redhat.com>
3544
3545 * linux-low.c (wait_for_sigstop): Always switch to no thread
3546 selected if the previously current thread dies.
3547 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3548 process instead of the current thread's.
3549 * remote-utils.c (input_interrupt): Don't check if there's no
3550 current thread.
3551 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3552 current thread to the general thread fails, error out.
3553 (handle_qxfer_auxv, handle_qxfer_libraries)
3554 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3555 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3556 (handle_query): Check if there's a thread selected instead of
3557 checking whether there's any thread in the thread list.
3558 (handle_qxfer_threads, handle_qxfer_btrace)
3559 (handle_qxfer_btrace_conf): Don't error out early if there's no
3560 thread in the thread list.
3561 (handle_v_cont, myresume): Don't set the current thread to the
3562 continue thread.
3563 (process_serial_event) <Hg handling>: Also set thread_id if the
3564 previous general thread is still alive.
3565 (process_serial_event) <g/G handling>: If setting the current
3566 thread to the general thread fails, error out.
3567 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3568 thread's lwp instead of the current thread's.
3569 * target.c (set_desired_thread): If the desired thread was not
3570 found, leave the current thread pointing to NULL. Return an int
3571 (boolean) indicating success.
3572 * target.h (set_desired_thread): Change return type to int.
3573
3574 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3575
3576 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3577 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3578 #includes.
3579 (ps_get_thread_area): New function.
3580
3581 2015-08-19 Gary Benson <gbenson@redhat.com>
3582
3583 * hostio.c (handle_pread): Do not attempt to read more data
3584 than hostio_reply_with_data can fit in a packet.
3585
3586 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3587
3588 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3589
3590 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3591
3592 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3593
3594 2015-08-06 Pedro Alves <palves@redhat.com>
3595
3596 * tracepoint.c (expr_eval_result): Now an int.
3597
3598 2015-08-06 Pedro Alves <palves@redhat.com>
3599
3600 * gdbthread.h (struct regcache): Forward declare.
3601 (struct thread_info) <regcache_data>: Now a struct regcache
3602 pointer.
3603 * inferiors.c (inferior_regcache_data)
3604 (set_inferior_regcache_data): Now work with struct regcache
3605 pointers.
3606 * inferiors.h (struct regcache): Forward declare.
3607 (inferior_regcache_data, set_inferior_regcache_data): Now work
3608 with struct regcache pointers.
3609 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3610 (free_register_cache_thread): Remove struct regcache pointer
3611 casts.
3612
3613 2015-08-06 Pedro Alves <palves@redhat.com>
3614
3615 * server.c (captured_main): On error, print the exception message
3616 to stderr, and if run_once is set, throw a quit.
3617
3618 2015-08-06 Pedro Alves <palves@redhat.com>
3619
3620 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3621 the current thread.
3622
3623 2015-08-06 Pedro Alves <palves@redhat.com>
3624
3625 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3626 reading beyond the passed in buffer length.
3627
3628 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3629
3630 * tracepoint.c (symbol_list) <required>: Remove.
3631
3632 2015-08-06 Pedro Alves <palves@redhat.com>
3633
3634 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3635 count if stopping and suspending threads.
3636 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3637 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3638 (linux_detach): Complete an ongoing step-over.
3639 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3640 throughout.
3641 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3642 (linux_wait_1): If passing a signal to the inferior after
3643 finishing a step-over, unsuspend and re-resume all lwps. If we
3644 see a single-step event but the thread should be continuing, don't
3645 pass the trap to gdb.
3646 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3647 internal_error instead of gdb_assert.
3648 (enqueue_pending_signal): New function.
3649 (check_ptrace_stopped_lwp_gone): Add debug output.
3650 (start_step_over): Use internal_error instead of gdb_assert.
3651 (complete_ongoing_step_over): New function.
3652 (linux_resume_one_thread): Don't resume a suspended thread.
3653 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3654 it stepping.
3655
3656 2015-08-06 Pedro Alves <palves@redhat.com>
3657
3658 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3659 (linux_thread_alive): Use lwp_is_marked_dead.
3660 (extended_event_reported): Delete.
3661 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3662 instead of extended_event_reported.
3663 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3664 as well.
3665 (lwp_is_marked_dead): New function.
3666 (lwp_running): Use lwp_is_marked_dead.
3667 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3668 comment.
3669
3670 2015-08-06 Pedro Alves <palves@redhat.com>
3671
3672 * linux-low.c (linux_wait_1): Move fork event output out of the
3673 !report_to_gdb check. Pass event_child->waitstatus to
3674 target_waitstatus_to_string instead of ourstatus.
3675
3676 2015-08-04 Yao Qi <yao.qi@linaro.org>
3677
3678 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3679 if current_thread is 32 bit.
3680
3681 2015-08-04 Yao Qi <yao.qi@linaro.org>
3682
3683 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3684 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3685 * server.c (extended_protocol): Remove "static".
3686 * server.h (extended_protocol): Declare it.
3687
3688 2015-08-04 Yao Qi <yao.qi@linaro.org>
3689
3690 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3691 both aarch64 and aarch32.
3692 (aarch64_set_pc): Likewise.
3693
3694 2015-08-04 Yao Qi <yao.qi@linaro.org>
3695
3696 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3697 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3698 arm-with-neon.xml to srv_xmlfiles.
3699 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3700 (is_64bit_tdesc): New function.
3701 (aarch64_linux_read_description): New function.
3702 (aarch64_arch_setup): Call aarch64_linux_read_description.
3703 (regs_info): Rename to regs_info_aarch64.
3704 (aarch64_regs_info): Return right regs_info.
3705 (initialize_low_arch): Call initialize_low_arch_aarch32.
3706
3707 2015-08-04 Yao Qi <yao.qi@linaro.org>
3708
3709 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3710 * linux-aarch32-low.c: New file.
3711 * linux-aarch32-low.h: New file.
3712 * linux-arm-low.c (arm_fill_gregset): Move it to
3713 linux-aarch32-low.c.
3714 (arm_store_gregset): Likewise.
3715 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3716 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3717 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3718 (regs_info): Rename to regs_info_arm.
3719 (arm_regs_info): Return regs_info_aarch32 if
3720 have_ptrace_getregset is 1 and target description is
3721 arm_with_neon or arm_with_vfpv3.
3722 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3723 Call initialize_low_arch_aarch32 instead.
3724
3725 2015-08-04 Yao Qi <yao.qi@linaro.org>
3726
3727 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3728 * linux-low.c: ... here.
3729 * linux-low.h (have_ptrace_getregset): Declare it.
3730
3731 2015-08-04 Pedro Alves <palves@redhat.com>
3732
3733 * thread-db.c (struct thread_db): Use new typedefs.
3734 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3735 CHK calls.
3736 (disable_thread_event_reporting): Cast result of dlsym to
3737 destination function pointer type.
3738 (thread_db_mourn): Use td_ta_delete_ftype.
3739
3740 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3741
3742 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3743 arch variant.
3744 (CDX_BREAKPOINT): Define for R2.
3745 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3746 (the_low_target): Add comments.
3747
3748 2015-07-30 Yao Qi <yao.qi@linaro.org>
3749
3750 * linux-arm-low.c (arm_hwcap): Remove it.
3751 (arm_read_description): New local variable arm_hwcap. Don't
3752 set arm_hwcap to zero.
3753
3754 2015-07-30 Yao Qi <yao.qi@linaro.org>
3755
3756 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3757 Use regcache->tdesc instead.
3758 (arm_store_wmmxregset): Likewise.
3759 (arm_fill_vfpregset): Likewise.
3760 (arm_store_vfpregset): Likewise.
3761
3762 2015-07-30 Yao Qi <yao.qi@linaro.org>
3763
3764 * linux-arm-low.c: Include arch/arm.h.
3765 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3766 (arm_store_gregset): Likewise.
3767
3768 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3769
3770 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3771 ptrace's 4th parameter.
3772
3773 2015-07-27 Yao Qi <yao.qi@linaro.org>
3774
3775 * configure.srv (case aarch64*-*-linux*): Don't set
3776 srv_linux_usrregs.
3777
3778 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3779
3780 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3781 sys/ptrace.h.
3782 * linux-arm-low.c: Likewise.
3783 * linux-cris-low.c: Likewise.
3784 * linux-crisv32-low.c: Likewise.
3785 * linux-low.c: Likewise.
3786 * linux-m68k-low.c: Likewise.
3787 * linux-mips-low.c: Likewise.
3788 * linux-nios2-low.c: Likewise.
3789 * linux-s390-low.c: Likewise.
3790 * linux-sparc-low.c: Likewise.
3791 * linux-tic6x-low.c: Likewise.
3792 * linux-tile-low.c: Likewise.
3793 * linux-x86-low.c: Likewise.
3794
3795 2015-07-24 Pedro Alves <palves@redhat.com>
3796
3797 * config.in: Regenerate.
3798 * configure: Regenerate.
3799
3800 2015-07-24 Pedro Alves <palves@redhat.com>
3801
3802 * acinclude.m4: Include ../ptrace.m4.
3803 * configure.ac: Call GDB_AC_PTRACE.
3804 * config.in, configure: Regenerate.
3805
3806 2015-07-24 Yao Qi <yao.qi@linaro.org>
3807
3808 * linux-low.c (linux_create_inferior): Remove setting to
3809 proc->priv->new_inferior.
3810 (linux_attach): Likewise.
3811 (linux_low_filter_event): Likewise.
3812 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3813
3814 2015-07-24 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-low.c (linux_arch_setup): New function.
3817 (linux_low_filter_event): If proc->tdesc is NULL and
3818 proc->attached is true, call the_low_target.arch_setup.
3819 Otherwise, keep status pending, and return.
3820 (linux_resume_one_lwp_throw): Don't call get_pc if
3821 thread->while_stepping isn't NULL. Don't call
3822 get_thread_regcache if proc->tdesc is NULL.
3823 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3824 (linux_target_ops): Install arch_setup.
3825 * server.c (start_inferior): Call the_target->arch_setup.
3826 * target.h (struct target_ops) <arch_setup>: New field.
3827 (target_arch_setup): New marco.
3828 * lynx-low.c (lynx_target_ops): Update.
3829 * nto-low.c (nto_target_ops): Update.
3830 * spu-low.c (spu_target_ops): Update.
3831 * win32-low.c (win32_target_ops): Update.
3832
3833 2015-07-24 Yao Qi <yao.qi@linaro.org>
3834
3835 * linux-low.c (linux_add_process): Don't set
3836 proc->priv->new_inferior.
3837 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3838 (linux_attach): Likewise.
3839
3840 2015-07-24 Yao Qi <yao.qi@linaro.org>
3841
3842 * server.c (start_inferior): Code refactor.
3843
3844 2015-07-24 Yao Qi <yao.qi@linaro.org>
3845
3846 * server.c (process_serial_event): Set general_thread.
3847
3848 2015-07-21 Yao Qi <yao.qi@linaro.org>
3849
3850 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3851 aarch64_linux_get_debug_reg_capacity.
3852
3853 2015-07-17 Yao Qi <yao.qi@linaro.org>
3854
3855 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3856 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3857 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3858 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3859 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3860 (AARCH64_HWP_ALIGNMENT): Likewise.
3861 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3862 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3863 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3864 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3865 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3866 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3867 (struct aarch64_debug_reg_state): Likewise.
3868 (struct arch_lwp_info): Likewise.
3869 (aarch64_align_watchpoint): Likewise.
3870 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3871 (aarch64_watchpoint_length): Likewise.
3872 (aarch64_point_encode_ctrl_reg): Likewise
3873 (aarch64_point_is_aligned): Likewise.
3874 (aarch64_align_watchpoint): Likewise.
3875 (aarch64_linux_set_debug_regs):
3876 (aarch64_dr_state_insert_one_point): Likewise.
3877 (aarch64_dr_state_remove_one_point): Likewise.
3878 (aarch64_handle_breakpoint): Likewise.
3879 (aarch64_handle_aligned_watchpoint): Likewise.
3880 (aarch64_handle_unaligned_watchpoint): Likewise.
3881 (aarch64_handle_watchpoint): Likewise.
3882
3883 2015-07-17 Yao Qi <yao.qi@linaro.org>
3884
3885 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3886 and don't aarch64_get_debug_reg_state. All callers update.
3887 (aarch64_handle_aligned_watchpoint): Likewise.
3888 (aarch64_handle_unaligned_watchpoint): Likewise.
3889 (aarch64_handle_watchpoint): Likewise.
3890 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3891 (aarch64_remove_point): Likewise.
3892
3893 2015-07-17 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3896 debug_printf.
3897 (aarch64_handle_unaligned_watchpoint): Likewise.
3898
3899 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3900
3901 Revert the previous 3 commits:
3902 Move gdb_regex* to common/
3903 Move linux_find_memory_regions_full & co.
3904 gdbserver build-id attribute generator
3905
3906 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3907 Jan Kratochvil <jan.kratochvil@redhat.com>
3908
3909 gdbserver build-id attribute generator.
3910 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3911 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3912 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3913 (find_phdr): New.
3914 (get_dynamic): Use find_pdhr to traverse program headers.
3915 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3916 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3917 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3918 (get_hex_build_id): New.
3919 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3920 to reply XML document.
3921
3922 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3923 Jan Kratochvil <jan.kratochvil@redhat.com>
3924
3925 * target.c: Include target/target-utils.h and fcntl.h.
3926 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3927 (target_fileio_read_stralloc): New functions.
3928
3929 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3930
3931 * Makefile.in (OBS): Add gdb_regex.o.
3932 (gdb_regex.o): New.
3933 * config.in: Rebuilt.
3934 * configure: Rebuilt.
3935
3936 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3937 Jan Kratochvil <jan.kratochvil@redhat.com>
3938
3939 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3940 * Makefile.in (OBS): Add target-utils.o.
3941 (linux-maps.o, target-utils.o): New.
3942 * configure.srv (srv_linux_obj): Add linux-maps.o.
3943
3944 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3945
3946 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3947 function, return 1.
3948 (the_low_target): Install it.
3949
3950 2015-07-14 Pedro Alves <palves@redhat.com>
3951
3952 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3953 Instead, ignore ECHILD, and throw an error for other errnos.
3954
3955 2015-07-10 Pedro Alves <palves@redhat.com>
3956
3957 * event-loop.c (struct callback_event) <data>: Change type to
3958 gdb_client_data instance instead of gdb_client_data pointer.
3959 (append_callback_event): Adjust.
3960
3961 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3962
3963 * linux-aarch64-low.c: Add comments for each linux_target_ops
3964 method. Remove comments already covered in target_ops and
3965 linux_target_ops definitions.
3966 (the_low_target): Add comments for each unimplemented method.
3967
3968 2015-07-09 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-aarch64-low.c (aarch64_regmap): Remove.
3971 (aarch64_usrregs_info): Remove.
3972 (regs_info): Set field usrregs to NULL.
3973
3974 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3975
3976 * linux-low.c: Include "rsp-low.h"
3977 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3978 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3979 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3980 (handle_btrace_enable_pt): New.
3981 (handle_btrace_general_set): Support "pt".
3982 (handle_btrace_conf_general_set): Support "pt:size".
3983
3984 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3985
3986 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3987 Z_PACKET_SW_BP.
3988
3989 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3990
3991 * linux-aarch64-low.c: Remove comment about endianness.
3992 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3993 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3994 memcmp.
3995
3996 2015-06-24 Gary Benson <gbenson@redhat.com>
3997
3998 * linux-i386-ipa.c (stdint.h): Do not include.
3999 * lynx-i386-low.c (stdint.h): Likewise.
4000 * lynx-ppc-low.c (stdint.h): Likewise.
4001 * mem-break.c (stdint.h): Likewise.
4002 * thread-db.c (stdint.h): Likewise.
4003 * tracepoint.c (stdint.h): Likewise.
4004 * win32-low.c (stdint.h): Likewise.
4005
4006 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4007
4008 * server.c (write_qxfer_response): Update call to
4009 remote_escape_output.
4010
4011 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4012 Jan Kratochvil <jan.kratochvil@redhat.com>
4013
4014 Merge multiple hex conversions.
4015 * gdbreplay.c (tohex): Rename to 'fromhex'.
4016 (logchar): Use fromhex.
4017
4018 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4019
4020 * server.c (handle_qxfer_libraries): Set `version' attribute for
4021 <library-list>.
4022
4023 2015-06-10 Gary Benson <gbenson@redhat.com>
4024
4025 * target.h (struct target_ops) <multifs_open>: New field.
4026 <multifs_unlink>: Likewise.
4027 <multifs_readlink>: Likewise.
4028 * linux-low.c (nat/linux-namespaces.h): New include.
4029 (linux_target_ops): Initialize the_target->multifs_open,
4030 the_target->multifs_unlink and the_target->multifs_readlink.
4031 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4032 * hostio.c (hostio_fs_pid): New static variable.
4033 (hostio_handle_new_gdb_connection): New function.
4034 (handle_setfs): Likewise.
4035 (handle_open): Use the_target->multifs_open as appropriate.
4036 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4037 (handle_readlink): Use the_target->multifs_readlink as
4038 appropriate.
4039 (handle_vFile): Handle vFile:setfs packets.
4040 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4041 after target_handle_new_gdb_connection.
4042
4043 2015-06-10 Gary Benson <gbenson@redhat.com>
4044
4045 * configure.ac (AC_CHECK_FUNCS): Add setns.
4046 * config.in: Regenerate.
4047 * configure: Likewise.
4048 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4049 (linux-namespaces.o): New rule.
4050 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4051
4052 2015-06-09 Gary Benson <gbenson@redhat.com>
4053
4054 * hostio.c (handle_open): Process mode argument with
4055 fileio_to_host_mode.
4056
4057 2015-06-01 Yao Qi <yao.qi@linaro.org>
4058
4059 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4060 * linux-x86-low.c: Likewise.
4061
4062 2015-05-28 Don Breazeal <donb@codesourcery.com>
4063
4064 * linux-low.c (handle_extended_wait): Initialize
4065 thread_info.last_resume_kind for new fork children.
4066
4067 2015-05-15 Pedro Alves <palves@redhat.com>
4068
4069 * target.h (target_handle_new_gdb_connection): Rewrite using if
4070 wrapped in do/while.
4071
4072 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4073
4074 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4075 * configure, config.in: Regenerate.
4076 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4077 Declare typedef.
4078
4079 2015-05-12 Don Breazeal <donb@codesourcery.com>
4080
4081 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4082 PTRACE_EVENT_VFORK_DONE.
4083 (linux_low_ptrace_options, extended_event_reported): Add vfork
4084 events.
4085 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4086 and "vforkdone" for RSP 'T' Stop Reply Packet.
4087 * server.h (report_vfork_events): Declare
4088 global variable.
4089
4090 2015-05-12 Don Breazeal <donb@codesourcery.com>
4091
4092 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4093 (the_low_target) <new_fork>: Initialize new member.
4094 * linux-arm-low.c (arm_new_fork): New function.
4095 (the_low_target) <new_fork>: Initialize new member.
4096 * linux-low.c (handle_extended_wait): Call new target function
4097 new_fork.
4098 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4099 * linux-mips-low.c (mips_add_watchpoint): New function
4100 extracted from mips_insert_point.
4101 (the_low_target) <new_fork>: Initialize new member.
4102 (mips_linux_new_fork): New function.
4103 (mips_insert_point): Call mips_add_watchpoint.
4104 * linux-x86-low.c (x86_linux_new_fork): New function.
4105 (the_low_target) <new_fork>: Initialize new member.
4106
4107 2015-05-12 Don Breazeal <donb@codesourcery.com>
4108
4109 * linux-low.c (handle_extended_wait): Implement return value,
4110 rename argument 'event_child' to 'event_lwp', handle
4111 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4112 (linux_low_ptrace_options): New function.
4113 (linux_low_filter_event): Call linux_low_ptrace_options,
4114 use different argument fo linux_enable_event_reporting,
4115 use return value from handle_extended_wait.
4116 (extended_event_reported): New function.
4117 (linux_wait_1): Call extended_event_reported and set
4118 status to report fork events.
4119 (linux_write_memory): Add pid to debug message.
4120 (reset_lwp_ptrace_options_callback): New function.
4121 (linux_handle_new_gdb_connection): New function.
4122 (linux_target_ops): Initialize new structure member.
4123 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4124 * lynx-low.c: Initialize new structure member.
4125 * remote-utils.c (prepare_resume_reply): Implement stop reason
4126 "fork" for "T" stop message.
4127 * server.c (handle_query): Call handle_new_gdb_connection.
4128 * server.h (report_fork_events): Declare global flag.
4129 * target.h (struct target_ops) <handle_new_gdb_connection>:
4130 New member.
4131 (target_handle_new_gdb_connection): New macro.
4132 * win32-low.c: Initialize new structure member.
4133
4134 2015-05-12 Don Breazeal <donb@codesourcery.com>
4135
4136 * mem-break.c (APPEND_TO_LIST): Define macro.
4137 (clone_agent_expr): New function.
4138 (clone_one_breakpoint): New function.
4139 (clone_all_breakpoints): New function.
4140 * mem-break.h: Declare new functions.
4141
4142 2015-05-12 Don Breazeal <donb@codesourcery.com>
4143
4144 * linux-low.c (linux_supports_fork_events): New function.
4145 (linux_supports_vfork_events): New function.
4146 (linux_target_ops): Initialize new structure members.
4147 (initialize_low): Call linux_check_ptrace_features.
4148 * lynx-low.c (lynx_target_ops): Initialize new structure
4149 members.
4150 * server.c (report_fork_events, report_vfork_events):
4151 New global flags.
4152 (handle_query): Add new features to qSupported packet and
4153 response.
4154 (captured_main): Initialize new global variables.
4155 * target.h (struct target_ops) <supports_fork_events>:
4156 New member.
4157 <supports_vfork_events>: New member.
4158 (target_supports_fork_events): New macro.
4159 (target_supports_vfork_events): New macro.
4160 * win32-low.c (win32_target_ops): Initialize new structure
4161 members.
4162
4163 2015-05-12 Gary Benson <gbenson@redhat.com>
4164
4165 * server.c (handle_qxfer_exec_file): Use current process
4166 if annex is empty.
4167
4168 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4169
4170 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4171 Remove HAVE_PTRACE_GETREGS conditionals.
4172 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4173 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4174
4175 2015-05-08 Yao Qi <yao.qi@linaro.org>
4176
4177 * linux-low.c (linux_supports_conditional_breakpoints): New
4178 function.
4179 (linux_target_ops): Install new target method.
4180 * lynx-low.c (lynx_target_ops): Install NULL hook for
4181 supports_conditional_breakpoints.
4182 * nto-low.c (nto_target_ops): Likewise.
4183 * spu-low.c (spu_target_ops): Likewise.
4184 * win32-low.c (win32_target_ops): Likewise.
4185 * server.c (handle_query): Check
4186 target_supports_conditional_breakpoints.
4187 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4188 New field.
4189 (target_supports_conditional_breakpoints): New macro.
4190
4191 2015-05-06 Pedro Alves <palves@redhat.com>
4192
4193 PR server/18081
4194 * server.c (start_inferior): If the process exits, mourn it.
4195
4196 2015-04-21 Gary Benson <gbenson@redhat.com>
4197
4198 * hostio.c (fileio_open_flags_to_host): Factored out to
4199 fileio_to_host_openflags in common/fileio.c. Single use
4200 updated.
4201
4202 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4203
4204 * linux-xtensa-low.c (xtensa_fill_gregset)
4205 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4206 XCHAL_HAVE_LOOP.
4207
4208 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4209
4210 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4211 (regs_info): Replace usrregs pointer with NULL.
4212
4213 2015-04-17 Gary Benson <gbenson@redhat.com>
4214
4215 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4216 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4217 * server.c (handle_qxfer_exec_file): New function.
4218 (qxfer_packets): Add exec-file entry.
4219 (handle_query): Report qXfer:exec-file:read as supported packet.
4220
4221 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4222
4223 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4224
4225 2015-04-09 Gary Benson <gbenson@redhat.com>
4226
4227 * hostio-errno.c (errno_to_fileio_error): Remove function.
4228 Update caller to use remote_fileio_to_fio_error.
4229
4230 2015-04-09 Yao Qi <yao.qi@linaro.org>
4231
4232 * linux-low.c (linux_insert_point): Call
4233 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4234 (linux_remove_point): Call remove_memory_breakpoint if type is
4235 raw_bkpt_type_sw.
4236 * linux-x86-low.c (x86_insert_point): Don't call
4237 insert_memory_breakpoint.
4238 (x86_remove_point): Don't call remove_memory_breakpoint.
4239
4240 2015-04-01 Pedro Alves <palves@redhat.com>
4241 Cleber Rosa <crosa@redhat.com>
4242
4243 * server.c (gdbserver_usage): Reorganize and extend the usage
4244 message.
4245
4246 2015-03-24 Pedro Alves <palves@redhat.com>
4247
4248 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4249 output. Also dump TRAP_TRACE.
4250 (linux_low_filter_event): In debug output, distinguish a
4251 resume_stop SIGSTOP from a delayed SIGSTOP.
4252
4253 2015-03-24 Gary Benson <gbenson@redhat.com>
4254
4255 * linux-x86-low.c (x86_linux_new_thread): Moved to
4256 nat/x86-linux.c.
4257 (x86_linux_prepare_to_resume): Likewise.
4258
4259 2015-03-24 Gary Benson <gbenson@redhat.com>
4260
4261 * Makefile.in (x86-linux-dregs.o): New rule.
4262 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4263 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4264 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4265 (x86_linux_dr_get): Likewise.
4266 (x86_linux_dr_set): Likewise.
4267 (update_debug_registers_callback): Likewise.
4268 (x86_linux_dr_set_addr): Likewise.
4269 (x86_linux_dr_get_addr): Likewise.
4270 (x86_linux_dr_set_control): Likewise.
4271 (x86_linux_dr_get_control): Likewise.
4272 (x86_linux_dr_get_status): Likewise.
4273 (x86_linux_update_debug_registers): Likewise.
4274
4275 2015-03-24 Gary Benson <gbenson@redhat.com>
4276
4277 * linux-x86-low.c (x86_linux_update_debug_registers):
4278 New function, factored out from...
4279 (x86_linux_prepare_to_resume): ...this.
4280
4281 2015-03-24 Gary Benson <gbenson@redhat.com>
4282
4283 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4284 (x86_linux_dr_set): Likewise.
4285 (update_debug_registers_callback): Likewise.
4286 (x86_linux_dr_set_addr): Likewise.
4287 (x86_linux_dr_get_addr): Likewise.
4288 (x86_linux_dr_set_control): Likewise.
4289 (x86_linux_dr_get_control): Likewise.
4290 (x86_linux_dr_get_status): Likewise.
4291 (x86_linux_prepare_to_resume): Likewise.
4292
4293 2015-03-24 Gary Benson <gbenson@redhat.com>
4294
4295 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4296 Use perror_with_name. Pass string through gettext.
4297 (x86_linux_dr_set): Likewise.
4298
4299 2015-03-24 Gary Benson <gbenson@redhat.com>
4300
4301 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4302 (x86_linux_dr_set_addr): ...this.
4303 (x86_dr_low_get_addr): Rename to...
4304 (x86_linux_dr_get_addr): ...this.
4305 (x86_dr_low_set_control): Rename to...
4306 (x86_linux_dr_set_control): ...this.
4307 (x86_dr_low_get_control): Rename to...
4308 (x86_linux_dr_get_control): ...this.
4309 (x86_dr_low_get_status): Rename to...
4310 (x86_linux_dr_get_status): ...this.
4311 (x86_dr_low): Update with new function names.
4312
4313 2015-03-24 Gary Benson <gbenson@redhat.com>
4314
4315 * Makefile.in (x86-linux.o): New rule.
4316 * configure.srv: Add x86-linux.o to relevant targets.
4317 * linux-low.c (lwp_set_arch_private_info): New function.
4318 (lwp_arch_private_info): Likewise.
4319 * linux-x86-low.c: Include nat/x86-linux.h.
4320 (arch_lwp_info): Removed structure.
4321 (update_debug_registers_callback):
4322 Use lwp_set_debug_registers_changed.
4323 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4324 and lwp_set_debug_registers_changed.
4325 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4326
4327 2015-03-24 Gary Benson <gbenson@redhat.com>
4328
4329 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4330 * linux-arm-low.c (arm_new_thread): Likewise.
4331 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4332 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4333 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4334 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4335
4336 2015-03-24 Gary Benson <gbenson@redhat.com>
4337
4338 * linux-low.c (ptid_of_lwp): New function.
4339 (lwp_is_stopped): Likewise.
4340 (lwp_stop_reason): Likewise.
4341 * linux-x86-low.c (update_debug_registers_callback):
4342 Use lwp_is_stopped.
4343 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4344 lwp_stop_reason.
4345
4346 2015-03-24 Gary Benson <gbenson@redhat.com>
4347
4348 * linux-low.h (linux_stop_lwp): Remove declaration.
4349
4350 2015-03-24 Gary Benson <gbenson@redhat.com>
4351
4352 * linux-low.h: Include nat/linux-nat.h.
4353 * linux-low.c (iterate_over_lwps_args): New structure.
4354 (iterate_over_lwps_filter): New function.
4355 (iterate_over_lwps): Likewise.
4356 * linux-x86-low.c (update_debug_registers_callback):
4357 Update signature to what iterate_over_lwps expects.
4358 Remove PID check that iterate_over_lwps now performs.
4359 (x86_dr_low_set_addr): Use iterate_over_lwps.
4360 (x86_dr_low_set_control): Likewise.
4361
4362 2015-03-24 Gary Benson <gbenson@redhat.com>
4363
4364 * linux-x86-low.c (x86_debug_reg_state): New function.
4365 (x86_linux_prepare_to_resume): Use the above.
4366
4367 2015-03-24 Gary Benson <gbenson@redhat.com>
4368
4369 * linux-low.c (current_lwp_ptid): New function.
4370 * linux-x86-low.c: Include nat/linux-nat.h.
4371 (x86_dr_low_get_addr): Use current_lwp_ptid.
4372 (x86_dr_low_get_control): Likewise.
4373 (x86_dr_low_get_status): Likewise.
4374
4375 2015-03-20 Pedro Alves <palves@redhat.com>
4376
4377 * tracepoint.c (cmd_qtstatus): Make "str" const.
4378
4379 2015-03-20 Pedro Alves <palves@redhat.com>
4380
4381 * server.c (handle_general_set): Make "req_str" const.
4382
4383 2015-03-19 Pedro Alves <palves@redhat.com>
4384
4385 * linux-low.c (linux_resume_one_lwp): Rename to ...
4386 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4387 instead call perror_with_name.
4388 (check_ptrace_stopped_lwp_gone): New function.
4389 (linux_resume_one_lwp): Reimplement as wrapper around
4390 linux_resume_one_lwp_throw that swallows errors if the LWP is
4391 gone.
4392
4393 2015-03-19 Pedro Alves <palves@redhat.com>
4394
4395 * linux-low.c (count_events_callback, select_event_lwp_callback):
4396 No longer check whether the thread has resume_stop as last resume
4397 kind.
4398
4399 2015-03-19 Pedro Alves <palves@redhat.com>
4400
4401 * linux-low.c (count_events_callback, select_event_lwp_callback):
4402 Use the lwp's status_pending_p field, not the thread's.
4403
4404 2015-03-19 Pedro Alves <palves@redhat.com>
4405
4406 * linux-low.c (select_event_lwp_callback): Update comments to
4407 no longer mention SIGTRAP.
4408
4409 2015-03-18 Gary Benson <gbenson@redhat.com>
4410
4411 * server.c (handle_query): Do not report vFile:fstat as supported.
4412
4413 2015-03-11 Gary Benson <gbenson@redhat.com>
4414
4415 * hostio.c (sys/types.h): New include.
4416 (sys/stat.h): Likewise.
4417 (common-remote-fileio.h): Likewise.
4418 (handle_fstat): New function.
4419 (handle_vFile): Handle vFile:fstat packets.
4420
4421 2015-03-11 Gary Benson <gbenson@redhat.com>
4422
4423 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4424 struct stat.st_blocks and struct stat.st_blksize.
4425 * configure: Regenerate.
4426 * config.in: Likewise.
4427 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4428 (OBS): Add common-remote-fileio.o.
4429 (common-remote-fileio.o): New rule.
4430
4431 2015-03-09 Pedro Alves <palves@redhat.com>
4432
4433 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4434 'struct sockaddr' pointer in 'accept' call.
4435
4436 2015-03-09 Pedro Alves <palves@redhat.com>
4437
4438 Revert:
4439 2015-03-07 Pedro Alves <palves@redhat.com>
4440 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4441 or <winsock2.h> here. Instead include "gdb_socket.h".
4442 (remote_open): Use union gdb_sockaddr_u.
4443 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4444 or <winsock2.h> here. Instead include "gdb_socket.h".
4445 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4446 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4447 or <sys/un.h>.
4448 (init_named_socket, gdb_agent_helper_thread): Use union
4449 gdb_sockaddr_u.
4450
4451 2015-03-07 Pedro Alves <palves@redhat.com>
4452
4453 * configure.ac (build_warnings): Move
4454 -Wdeclaration-after-statement to the C-specific set.
4455 * configure: Regenerate.
4456
4457 2015-03-07 Pedro Alves <palves@redhat.com>
4458
4459 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4460 or <winsock2.h> here. Instead include "gdb_socket.h".
4461 (remote_open): Use union gdb_sockaddr_u.
4462 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4463 or <winsock2.h> here. Instead include "gdb_socket.h".
4464 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4465 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4466 or <sys/un.h>.
4467 (init_named_socket, gdb_agent_helper_thread): Use union
4468 gdb_sockaddr_u.
4469
4470 2015-03-07 Pedro Alves <palves@redhat.com>
4471
4472 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4473 instead.
4474
4475 2015-03-06 Yao Qi <yao.qi@linaro.org>
4476
4477 * linux-aarch64-low.c (aarch64_insert_point): Use
4478 show_debug_regs as a boolean.
4479 (aarch64_remove_point): Likewise.
4480
4481 2015-03-05 Pedro Alves <palves@redhat.com>
4482
4483 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4484 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4485 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4486 * nto-low.c (nto_target_ops): Likewise.
4487 * spu-low.c (spu_target_ops): Likewise.
4488 * win32-low.c (win32_target_ops): Likewise.
4489
4490 2015-03-04 Pedro Alves <palves@redhat.com>
4491
4492 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4493 Decide whether a breakpoint triggered based on the SIGTRAP's
4494 siginfo.si_code.
4495 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4496 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4497 (linux_low_filter_event): Check for breakpoints before checking
4498 watchpoints.
4499 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4500 siginfo.si_code.
4501 (linux_stopped_by_sw_breakpoint)
4502 (linux_supports_stopped_by_sw_breakpoint)
4503 (linux_stopped_by_hw_breakpoint)
4504 (linux_supports_stopped_by_hw_breakpoint): New functions.
4505 (linux_target_ops): Install new target methods.
4506
4507 2015-03-04 Pedro Alves <palves@redhat.com>
4508
4509 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4510 * server.c (swbreak_feature, hwbreak_feature): New globals.
4511 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4512 (captured_main): Clear swbreak_feature and hwbreak_feature.
4513 * server.h (swbreak_feature, hwbreak_feature): Declare.
4514 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4515 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4516 supports_stopped_by_hw_breakpoint>: New fields.
4517 (target_supports_stopped_by_sw_breakpoint)
4518 (target_stopped_by_sw_breakpoint)
4519 (target_supports_stopped_by_hw_breakpoint)
4520 (target_stopped_by_hw_breakpoint): Declare.
4521
4522 2015-03-04 Pedro Alves <palves@redhat.com>
4523
4524 enum lwp_stop_reason -> enum target_stop_reason
4525 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4526 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4527 (linux_wait_1, stuck_in_jump_pad_callback)
4528 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4529 (linux_stopped_by_watchpoint):
4530 * linux-low.h (enum lwp_stop_reason): Delete.
4531 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4532 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4533
4534 2015-03-04 Yao Qi <yao.qi@linaro.org>
4535
4536 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4537
4538 2015-03-03 Gary Benson <gbenson@redhat.com>
4539
4540 * hostio.c (handle_vFile): Fix prefix lengths.
4541
4542 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4543
4544 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4545 ptr_bits.
4546
4547 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4548
4549 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4550 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4551 (clean): Add "rm -f" for above C files.
4552 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4553 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4554 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4555 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4556 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4557 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4558 (init_registers_s390x_vx_linux64)
4559 (init_registers_s390x_tevx_linux64)
4560 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4561 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4562 declarations.
4563 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4564 (s390_store_vxrs_high): New functions.
4565 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4566 NT_S390_VXRS_HIGH.
4567 (s390_arch_setup): Add logic for selecting one of the new target
4568 descriptions. Activate the new vector regsets if applicable.
4569 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4570 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4571 and init_registers_s390x_tevx_linux64.
4572
4573 2015-03-01 Pedro Alves <palves@redhat.com>
4574
4575 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4576 parameter.
4577
4578 2015-02-27 Pedro Alves <palves@redhat.com>
4579
4580 * linux-x86-low.c (u_debugreg_offset): New function.
4581 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4582
4583 2015-02-27 Pedro Alves <palves@redhat.com>
4584
4585 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4586 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4587 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4588 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4589 (ps_lsetfpregs, ps_getpid)
4590 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4591 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4592 (ps_lsetxregs, ps_plog): Declare.
4593
4594 2015-02-27 Pedro Alves <palves@redhat.com>
4595
4596 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4597 IP_AGENT_EXPORT_FUNC.
4598 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4599 IP_AGENT_EXPORT_FUNC.
4600 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4601 (IP_AGENT_EXPORT): Delete.
4602 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4603 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4604 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4605 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4606 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4607 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4608 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4609 (traceframe_read_count, traceframe_write_count)
4610 (traceframes_created, trace_state_variables, get_raw_reg)
4611 (get_trace_state_variable_value, set_trace_state_variable_value)
4612 (ust_loaded, helper_thread_id, cmd_buf): Use
4613 IPA_SYM_EXPORTED_NAME.
4614 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4615 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4616 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4617 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4618 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4619 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4620 EXTERN_C_PUSH/EXTERN_C_POP.
4621 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4622 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4623 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4624 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4625 (traceframe_write_count, traceframe_read_count)
4626 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4627 (about_to_request_buffer_space, get_trace_state_variable_value)
4628 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4629 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4630 EXTERN_C_PUSH/EXTERN_C_POP.
4631 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4632 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4633 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4634 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4635 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4636 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4637 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4638 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4639 Define.
4640 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4641 (IP_AGENT_EXPORT_VAR_DECL): Define.
4642 (tracing): Declare.
4643 (gdb_agent_get_raw_reg): Declare.
4644
4645 2015-02-27 Tom Tromey <tromey@redhat.com>
4646 Pedro Alves <palves@redhat.com>
4647
4648 Rename symbols whose names are reserved C++ keywords throughout.
4649
4650 2015-02-27 Pedro Alves <palves@redhat.com>
4651
4652 * Makefile.in (COMPILER): New, get it from autoconf.
4653 (CXX): Get from autoconf instead.
4654 (COMPILE.pre): Use COMPILER.
4655 (CC-LD): Rename to ...
4656 (CC_LD): ... this. Use COMPILER.
4657 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4658 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4659 * acinclude.m4: Include build-with-cxx.m4.
4660 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4661 Disable -Werror by default if building in C++ mode.
4662 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4663 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4664 the C++ compiler. Save/restore CXXFLAGS too.
4665 * configure: Regenerate.
4666
4667 2015-02-27 Pedro Alves <palves@redhat.com>
4668
4669 * acinclude.m4: Include libiberty.m4.
4670 * configure.ac: Call libiberty_INIT.
4671 * config.in, configure: Regenerate.
4672
4673 2015-02-26 Pedro Alves <palves@redhat.com>
4674
4675 * linux-low.c (linux_wait_1): When incrementing the PC past a
4676 program breakpoint always use the_low_target.breakpoint_len as
4677 increment, rather than the maximum between that and
4678 the_low_target.decr_pc_after_break.
4679
4680 2015-02-23 Pedro Alves <palves@redhat.com>
4681
4682 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4683 thread was doing a step-over; always adjust the PC if
4684 we stepped over a permanent breakpoint.
4685 (linux_wait_1): If we stepped over breakpoint that was on top of a
4686 permanent breakpoint, manually advance the PC past it.
4687
4688 2015-02-23 Pedro Alves <palves@redhat.com>
4689
4690 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4691 modes.
4692 (x86_fill_gregset, x86_store_gregset): Use it when handling
4693 $orig_eax.
4694
4695 2015-02-20 Pedro Alves <palves@redhat.com>
4696
4697 * thread-db.c: Include "nat/linux-procfs.h".
4698 (thread_db_init): Skip listing new threads if the kernel supports
4699 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4700
4701 2015-02-20 Pedro Alves <palves@redhat.com>
4702
4703 * linux-low.c (status_pending_p_callback): Use ptid_match.
4704
4705 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4706
4707 PR breakpoints/16812
4708 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4709 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4710 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4711
4712 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4713
4714 PR breakpoints/15956
4715 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4716
4717 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4718
4719 * linux-low.c (linux_low_btrace_conf): Print size.
4720 * server.c (handle_btrace_conf_general_set): New.
4721 (hanle_general_set): Call handle_btrace_conf_general_set.
4722 (handle_query): Report Qbtrace-conf:bts:size as supported.
4723
4724 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4725
4726 * linux-low.c (linux_low_enable_btrace): Update parameters.
4727 (linux_low_btrace_conf): New.
4728 (linux_target_ops)<to_btrace_conf>: Initialize.
4729 * server.c (current_btrace_conf): New.
4730 (handle_btrace_enable): Rename to ...
4731 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4732 to target_enable_btrace. Update comment. Update users.
4733 (handle_qxfer_btrace_conf): New.
4734 (qxfer_packets): Add btrace-conf entry.
4735 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4736 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4737 (target_ops)<read_btrace_conf>: New.
4738 (target_enable_btrace): Update parameters.
4739 (target_read_btrace_conf): New.
4740
4741 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4742
4743 * server.c (handle_btrace_general_set): Remove call to
4744 target_supports_btrace.
4745 (supported_btrace_packets): New.
4746 (handle_query): Call supported_btrace_packets.
4747 * target.h: include btrace-common.h.
4748 (btrace_target_info): Removed.
4749 (supports_btrace, target_supports_btrace): Update parameters.
4750
4751 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4752
4753 * Makefile.in (SFILES): Add common/btrace-common.c.
4754 (OBS): Add common/btrace-common.o.
4755 (btrace-common.o): Add build rules.
4756 * linux-low: Include btrace-common.h.
4757 (linux_low_read_btrace): Use struct btrace_data. Call
4758 btrace_data_init and btrace_data_fini.
4759
4760 2015-02-06 Pedro Alves <palves@redhat.com>
4761
4762 * thread-db.c (find_new_threads_callback): Add debug output.
4763
4764 2015-02-04 Pedro Alves <palves@redhat.com>
4765
4766 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4767 (resume_stopped_resumed_lwps): New function.
4768 (linux_wait_for_event_filtered): Use it.
4769
4770 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4771
4772 * Makefile.in (SFILES): Add linux-personality.c.
4773 (linux-personality.o): New rule.
4774 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4775 list of objects to be built.
4776 * linux-low.c: Include nat/linux-personality.h.
4777 (linux_create_inferior): Remove code to disable address space
4778 randomization (moved to ../nat/linux-personality.c). Create
4779 cleanup to disable address space randomization.
4780
4781 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4782
4783 * Makefile.in (posix-strerror.o): New rule.
4784 (mingw-strerror.o): Likewise.
4785 * configure: Regenerated.
4786 * configure.ac: Source file ../common/common.host. Initialize new
4787 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4788
4789 2015-01-14 Yao Qi <yao@codesourcery.com>
4790
4791 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4792 (ppc-linux.o): New rule.
4793 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4794 * configure.ac: AC_CHECK_FUNCS(getauxval).
4795 * config.in: Re-generated.
4796 * configure: Re-generated.
4797 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4798 ppc64_64bit_inferior_p
4799
4800 2015-01-14 Yao Qi <yao@codesourcery.com>
4801
4802 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4803 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4804 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4805 (PT_ORIG_R3, PT_TRAP): Likewise.
4806 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4807 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4808 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4809
4810 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4811
4812 * i387-fp.c (i387_cache_to_xsave): In look over
4813 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4814 zmmh_low_space field by use of zmmh_high_space.
4815
4816 2015-01-09 Pedro Alves <palves@redhat.com>
4817
4818 * linux-low.c (step_over_bkpt): Move higher up in the file.
4819 (handle_extended_wait): Don't store the stop_pc here.
4820 (get_stop_pc): Adjust comments and rename to ...
4821 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4822 stopped for a software breakpoint or hardware breakpoint.
4823 (thread_still_has_status_pending_p): New function.
4824 (status_pending_p_callback): Use
4825 thread_still_has_status_pending_p. If the event is no longer
4826 interesting, resume the LWP.
4827 (handle_tracepoints): Add assert.
4828 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4829 (wstatus_maybe_breakpoint): New function.
4830 (cancel_breakpoint): Delete function.
4831 (check_stopped_by_watchpoint): New function, factored out from
4832 linux_low_filter_event.
4833 (lp_status_maybe_breakpoint): Delete function.
4834 (linux_low_filter_event): Remove filter_ptid argument.
4835 Leave thread group exits pending here. Store the LWP's stop PC.
4836 Always leave events pending.
4837 (linux_wait_for_event_filtered): Pull all events out of the
4838 kernel, and leave them all pending.
4839 (count_events_callback, select_event_lwp_callback): Consider all
4840 events.
4841 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4842 (select_event_lwp): Only give preference to the stepping LWP in
4843 all-stop mode. Adjust comments.
4844 (ignore_event): New function.
4845 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4846 references to cancel_breakpoints. Adjust to renames. Also give
4847 equal priority to all LWPs that have had events in non-stop mode.
4848 If reporting a software breakpoint event, unadjust the LWP's PC.
4849 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4850 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4851 Adjust.
4852 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4853 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4854 (linux_stopped_by_watchpoint): Adjust.
4855 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4856 * linux-low.h (enum lwp_stop_reason): New.
4857 (struct lwp_info) <stop_pc>: Adjust comment.
4858 <stopped_by_watchpoint>: Delete field.
4859 <stop_reason>: New field.
4860 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4861 * mem-break.c (software_breakpoint_inserted_here)
4862 (hardware_breakpoint_inserted_here): New function.
4863 * mem-break.h (software_breakpoint_inserted_here)
4864 (hardware_breakpoint_inserted_here): Declare.
4865 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4866 (cancel_breakpoints): Delete.
4867 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4868 (upload_fast_traceframes): Remove references to
4869 cancel_breakpoints.
4870
4871 2015-01-09 Pedro Alves <palves@redhat.com>
4872
4873 * thread-db.c (find_new_threads_callback): Ignore thread if the
4874 kernel thread ID is -1.
4875
4876 2015-01-09 Pedro Alves <palves@redhat.com>
4877
4878 * linux-low.c (linux_attach_fail_reason_string): Move to
4879 nat/linux-ptrace.c, and rename.
4880 (linux_attach_lwp): Update comment.
4881 (attach_proc_task_lwp_callback): New function.
4882 (linux_attach): Adjust to rename and use
4883 linux_proc_attach_tgid_threads.
4884 (linux_attach_fail_reason_string): Delete declaration.
4885
4886 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4887
4888 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4889 * server.c (gdbserver_version): Likewise.
4890
4891 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4892
4893 * remote-utils.c: Include ctype.h.
4894 (input_interrupt): Explicitly handle the case when the char
4895 received is the NUL byte. Improve the printing of non-ASCII
4896 characters.
4897
4898 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4899
4900 * linux-low.c (linux_low_filter_event): Update call to
4901 linux_enable_event_reporting following the addition of
4902 a new parameter to that function.
4903
4904 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4905
4906 PR server/17457
4907 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4908 (AARCH64_FPCR_REGNO): Likewise.
4909 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4910 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4911 (aarch64_store_fpregset): Likewise.
4912
4913 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4914
4915 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4916 Remove FIXME comment about assumption about N.
4917
4918 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4919
4920 * configure.ac: If large-file support is disabled in GDBserver,
4921 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4922 * configure: Regenerate.
4923
4924 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4925
4926 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4927 warning upon ENODATA from ptrace.
4928 * linux-s390-low.c (s390_store_tdb): New.
4929 (s390_regsets): Add regset for NT_S390_TDB.
4930
4931 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4932
4933 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4934 without a fill_function.
4935 * linux-s390-low.c (s390_fill_last_break): Remove.
4936 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4937 (s390_arch_setup): Use regset's size instead of fill_function for
4938 loop end condition.
4939
4940 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4941
4942 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4943 the regset's store function when ptrace returned an error.
4944 * regcache.c (get_thread_regcache): Invalidate register cache
4945 before fetching inferior's registers.
4946
4947 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4948
4949 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4950 while-loop as for-loop.
4951 (regsets_store_inferior_registers): Likewise.
4952
4953 2014-11-28 Yao Qi <yao@codesourcery.com>
4954
4955 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4956 * config.in, configure: Re-generate.
4957 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4958 is defined.
4959
4960 2014-11-21 Yao Qi <yao@codesourcery.com>
4961
4962 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4963 (AC_CHECK_HEADERS): Remove malloc.h.
4964 * configure: Re-generated.
4965 * config.in: Re-generated.
4966 * server.h: Don't include alloca.h and malloc.h.
4967 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4968 Don't include malloc.h.
4969
4970 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4971
4972 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4973 corresponding ERRNO check in same block.
4974
4975 2014-11-12 Pedro Alves <palves@redhat.com>
4976
4977 * server.c (cont_thread): Update comment.
4978 (start_inferior, attach_inferior): No longer clear cont_thread.
4979 (handle_v_cont): No longer set cont_thread.
4980 (captured_main): Clear cont_thread each time a GDB connects.
4981
4982 2014-11-12 Pedro Alves <palves@redhat.com>
4983
4984 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4985 thread, and don't resume all threads if the Hc thread has exited.
4986
4987 2014-11-12 Pedro Alves <palves@redhat.com>
4988
4989 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4990 the process group instead of to a specific LWP.
4991
4992 2014-10-15 Pedro Alves <palves@redhat.com>
4993
4994 PR server/17487
4995 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4996 parameter.
4997 (arm_set_thread_context): Delete.
4998 (the_low_target): Adjust.
4999 * win32-i386-low.c (debug_registers_changed)
5000 (debug_registers_used): Delete.
5001 (update_debug_registers_callback): New function.
5002 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5003 needing to update their debug registers.
5004 (win32_get_current_dr): New function.
5005 (x86_dr_low_get_addr, x86_dr_low_get_control)
5006 (x86_dr_low_get_status): Fetch the debug register from the thread
5007 record's context.
5008 (i386_initial_stuff): Adjust.
5009 (i386_get_thread_context): Remove current_event parameter. Don't
5010 clear debug_registers_changed nor copy DR values to
5011 debug_reg_state.
5012 (i386_set_thread_context): Delete.
5013 (i386_prepare_to_resume): New function.
5014 (i386_thread_added): Mark the thread as needing to update irs
5015 debug registers.
5016 (the_low_target): Remove i386_set_thread_context and install
5017 i386_prepare_to_resume.
5018 * win32-low.c (win32_get_thread_context): Adjust.
5019 (win32_set_thread_context): Use SetThreadContext
5020 directly.
5021 (win32_prepare_to_resume): New function.
5022 (win32_require_context): New function, factored out from ...
5023 (thread_rec): ... this.
5024 (continue_one_thread): Call win32_prepare_to_resume on each thread
5025 we're about to continue.
5026 (win32_resume): Call win32_prepare_to_resume on the event thread.
5027 * win32-low.h (struct win32_thread_info)
5028 <debug_registers_changed>: New field.
5029 (struct win32_target_ops): Change prototype of set_thread_context,
5030 delete set_thread_context and add prepare_to_resume.
5031 (win32_require_context): New declaration.
5032
5033 2014-10-08 Gary Benson <gbenson@redhat.com>
5034
5035 * server.h: Do not include common-exceptions.h.
5036
5037 2014-10-08 Gary Benson <gbenson@redhat.com>
5038
5039 * server.h: Do not include cleanups.h.
5040
5041 2014-09-30 James Hogan <james.hogan@imgtec.com>
5042
5043 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5044 mips64-dsp-linux.c.
5045
5046 2014-09-23 Yao Qi <yao@codesourcery.com>
5047
5048 * linux-low.c (lp_status_maybe_breakpoint): New function.
5049 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5050 (count_events_callback): Likewise.
5051 (select_event_lwp_callback): Likewise.
5052 (cancel_breakpoints_callback): Likewise.
5053
5054 2014-09-19 Don Breazeal <donb@codesourcery.com>
5055
5056 * linux-low.c (handle_extended_wait): Call
5057 linux_ptrace_get_extended_event.
5058 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5059 linux_is_extended_waitstatus.
5060
5061 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5062
5063 * Makefile.in (CPPFLAGS): Define.
5064 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5065 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5066
5067 2014-09-16 Gary Benson <gbenson@redhat.com>
5068
5069 * inferiors.h (current_inferior): Renamed as...
5070 (current_thread): New variable. All uses updated.
5071 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5072 (maybe_move_out_of_jump_pad): Likewise.
5073 (cancel_breakpoint): Likewise.
5074 (linux_low_filter_event): Likewise.
5075 (wait_for_sigstop): Likewise.
5076 (linux_resume_one_lwp): Likewise.
5077 (need_step_over_p): Likewise.
5078 (start_step_over): Likewise.
5079 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5080 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5081 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5082 and save_inferior as saved_thread.
5083 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5084 saved_thread.
5085 (regcache_invalidate_thread): Likewise.
5086 * remote-utils.c (prepare_resume_reply): Likewise.
5087 * thread-db.c (thread_db_get_tls_address): Likewise.
5088 (disable_thread_event_reporting): Likewise.
5089 (remove_thread_event_breakpoints): Likewise.
5090 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5091 as saved_thread.
5092 * target.h (set_desired_inferior): Renamed as...
5093 (set_desired_thread): New declaration. All uses updated.
5094 * server.c (myresume): Updated comment to reference thread instead
5095 of inferior.
5096 (handle_serial_event): Likewise.
5097 (handle_target_event): Likewise.
5098
5099 2014-09-12 Tom Tromey <tromey@redhat.com>
5100 Gary Benson <gbenson@redhat.com>
5101
5102 * regcache.h: Include common-regcache.h.
5103 (regcache_read_pc): Don't declare.
5104 * regcache.c (get_thread_regcache_for_ptid): New function.
5105
5106 2014-09-11 Tom Tromey <tromey@redhat.com>
5107 Gary Benson <gbenson@redhat.com>
5108
5109 * symbol.c: New file.
5110 * Makefile.in (SFILES): Add symbol.c.
5111 (OBS): Add symbol.o.
5112
5113 2014-09-11 Gary Benson <gbenson@redhat.com>
5114
5115 * target.c (target_stop_ptid, target_continue_ptid): New
5116 functions.
5117
5118 2014-09-11 Tom Tromey <tromey@redhat.com>
5119 Gary Benson <gbenson@redhat.com>
5120
5121 * target.h: Include target/target.h.
5122 * target.c (target_read_memory, target_read_uint32)
5123 (target_write_memory): New functions.
5124
5125 2014-09-11 Gary Benson <gbenson@redhat.com>
5126
5127 * server.h (debug_hw_points): Don't declare.
5128 * server.c (debug_hw_points): Don't define. Replace all uses
5129 with show_debug_regs.
5130 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5131 all uses with show_debug_regs.
5132
5133 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5134
5135 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5136 endianness into account.
5137 (ppc_supply_ptrace_register): Likewise.
5138
5139 2014-09-03 James Hogan <james.hogan@imgtec.com>
5140
5141 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5142 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5143
5144 2014-09-03 Gary Benson <gbenson@redhat.com>
5145
5146 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5147 ALL_DEBUG_ADDRESS_REGISTERS.
5148
5149 2014-09-02 Gary Benson <gbenson@redhat.com>
5150
5151 * i386-low.h: Renamed as...
5152 * x86-low.h: New file. All type, function and variable name
5153 prefixes changed from "i386_" to "x86_". All references updated.
5154 * i386-low.c: Renamed as...
5155 * x86-low.c: New file. All type, function and variable name
5156 prefixes changed from "i386_" to "x86_". All references updated.
5157
5158 2014-09-02 Gary Benson <gbenson@redhat.com>
5159
5160 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5161 (x86_linux_new_thread): Likewise.
5162
5163 2014-08-29 Gary Benson <gbenson@redhat.com>
5164
5165 * server.h (setjmp.h): Do not include.
5166 (toplevel): Do not declare.
5167 (common-exceptions.h): Include.
5168 (cleanups.h): Likewise.
5169 * server.c (toplevel): Do not define.
5170 (exit_code): New static global.
5171 (detach_or_kill_for_exit_cleanup): New function.
5172 (main): New function. Original main renamed to...
5173 (captured_main): New function.
5174 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5175
5176 2014-08-29 Gary Benson <gbenson@redhat.com>
5177
5178 * Makefile.in (SFILES): Add common/common-exceptions.c.
5179 (OBS): Add common-exceptions.o.
5180 (common-exceptions.o): New rule.
5181 * utils.c (prepare_to_throw_exception): New function.
5182
5183 2014-08-29 Gary Benson <gbenson@redhat.com>
5184
5185 * config.in: Regenerate.
5186 * configure: Likewise.
5187
5188 2014-08-29 Gary Benson <gbenson@redhat.com>
5189
5190 * Makefile.in (SFILES): Add common/cleanups.c.
5191 (OBS): cleanups.o.
5192 (cleanups.o): New rule.
5193
5194 2014-08-29 Gary Benson <gbenson@redhat.com>
5195
5196 * utils.c (internal_vwarning): New function.
5197
5198 2014-08-28 Gary Benson <gbenson@redhat.com>
5199
5200 * utils.h (fatal): Remove declaration.
5201 * utils.c (fatal): Remove function.
5202
5203 2014-08-28 Gary Benson <gbenson@redhat.com>
5204
5205 * tracepoint.c (gdb_agent_init): Replace fatal with
5206 perror_with_name.
5207 (initialize_tracepoint): Likewise.
5208
5209 2014-08-28 Gary Benson <gbenson@redhat.com>
5210
5211 * remote-utils.c (remote_prepare): Replace fatal with error.
5212
5213 2014-08-28 Gary Benson <gbenson@redhat.com>
5214
5215 * linux-low.c (linux_async): Replace fatal with warning.
5216 Tidy up and return.
5217 (linux_start_non_stop): Return -1 if linux_async failed.
5218
5219 2014-08-28 Gary Benson <gbenson@redhat.com>
5220
5221 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5222 gdb_assert.
5223 (i386_dr_low_get_addr): Remove vague comment.
5224 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5225 gdb_assert.
5226
5227 2014-08-28 Gary Benson <gbenson@redhat.com>
5228
5229 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5230 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5231 internal_error.
5232 (linux_resume_one_lwp): Likewise.
5233 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5234 gdb_assert.
5235 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5236 with internal_error.
5237 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5238 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5239 (find_register_by_name): Replace fatal with internal_error.
5240 (find_regno): Likewise.
5241 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5242 * thread-db.c (thread_db_create_event): Likewise.
5243 (thread_db_load_search): Likewise.
5244 (try_thread_db_load_1): Likewise.
5245 * tracepoint.c (get_jump_space_head): Replace fatal with
5246 internal_error.
5247 (claim_trampoline_space): Likewise.
5248 (have_fast_tracepoint_trampoline_buffer): Likewise.
5249 (cmd_qtstart): Likewise.
5250 (stop_tracing): Likewise.
5251 (fast_tracepoint_collecting): Likewise.
5252 (target_malloc): Likewise.
5253 (download_tracepoint): Likewise.
5254 (download_trace_state_variables): Replace check with gdb_assert.
5255 (upload_fast_traceframes): Replace fatal with internal_error.
5256
5257 2014-08-19 Tom Tromey <tromey@redhat.com>
5258 Gary Benson <gbenson@redhat.com>
5259
5260 * Makefile.in (SFILES): Add common/common-debug.c.
5261 (OBS): Add common-debug.o.
5262 (common-debug.o): New rule.
5263 * debug.h (debug_printf): Don't declare.
5264 * debug.c (debug_printf): Renamed and rewritten as...
5265 (debug_vprintf): New function.
5266
5267 2014-08-19 Gary Benson <gbenson@redhat.com>
5268
5269 * utils.h: Do not include print-utils.h.
5270
5271 2014-08-19 Tom Tromey <tromey@redhat.com>
5272 Gary Benson <gbenson@redhat.com>
5273
5274 * server.h: Add static assertion.
5275 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5276
5277 2014-08-19 Tom Tromey <tromey@redhat.com>
5278 Gary Benson <gbenson@redhat.com>
5279
5280 * Makefile.in (SFILES): Add common/errors.c.
5281 (OBS): Add errors.o.
5282 (IPA_OBS): Add errors-ipa.o.
5283 (errors.o): New rule.
5284 (errors-ipa.o): Likewise.
5285 * utils.h (perror_with_name, error, warning): Don't declare.
5286 * utils.c (warning): Renamed and rewritten as...
5287 (vwarning): New function.
5288 (error): Renamed and rewritten as...
5289 (verror): New function.
5290 (internal_error): Renamed and rewritten as...
5291 (internal_verror): New function.
5292
5293 2014-08-07 Gary Benson <gbenson@redhat.com>
5294
5295 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5296 * configure: Regenerate.
5297 * config.in: Likewise.
5298 * server.h: Do not include errno.h.
5299 * event-loop.c: Likewise.
5300 * hostio-errno.c: Likewise.
5301 * linux-low.c: Likewise.
5302 * remote-utils.c: Likewise.
5303 * spu-low.c: Likewise.
5304 * utils.c: Likewise.
5305 * gdbreplay.c: Unconditionally include errno.h.
5306
5307 2014-08-07 Gary Benson <gbenson@redhat.com>
5308
5309 * server.h: Do not include string.h.
5310 * event-loop.c: Likewise.
5311 * linux-low.c: Likewise.
5312 * regcache.c: Likewise.
5313 * remote-utils.c: Likewise.
5314 * spu-low.c: Likewise.
5315 * utils.c: Likewise.
5316
5317 2014-08-07 Gary Benson <gbenson@redhat.com>
5318
5319 * server.h: Do not include gdb_assert.h.
5320
5321 2014-08-07 Gary Benson <gbenson@redhat.com>
5322
5323 * server.h: Do not include common-utils.h.
5324
5325 2014-08-07 Gary Benson <gbenson@redhat.com>
5326
5327 * server.h: Do not include ptid.h.
5328 * notif.h: Likewise.
5329
5330 2014-08-07 Gary Benson <gbenson@redhat.com>
5331
5332 * server.h: Do not include gdb_locale.h.
5333
5334 2014-08-07 Gary Benson <gbenson@redhat.com>
5335
5336 * server.h: Do not include gdb/signals.h.
5337 * win32-low.c: Likewise.
5338
5339 2014-08-07 Gary Benson <gbenson@redhat.com>
5340
5341 * server.h: Do not include pathmax.h.
5342
5343 2014-08-07 Gary Benson <gbenson@redhat.com>
5344
5345 * server.h: Do not include libiberty.h.
5346 * linux-bfin-low.c: Likewise.
5347
5348 2014-08-07 Gary Benson <gbenson@redhat.com>
5349
5350 * server.h: Do not include ansidecl.h.
5351
5352 2014-08-07 Gary Benson <gbenson@redhat.com>
5353
5354 * linux-x86-low.c: Do not include stddef.h.
5355 * lynx-ppc-low.c: Likewise.
5356 * tracepoint.c: Likewise.
5357
5358 2014-08-07 Gary Benson <gbenson@redhat.com>
5359
5360 * server.h: Do not include stdarg.h.
5361 * nto-low.c: Likewise.
5362
5363 2014-08-07 Gary Benson <gbenson@redhat.com>
5364
5365 * server.h: Do not include stdlib.h.
5366 * inferiors.c: Likewise.
5367 * linux-low.c: Likewise.
5368 * regcache.c: Likewise.
5369 * spu-low.c: Likewise.
5370 * tracepoint.c: Likewise.
5371 * utils.c: Likewise.
5372
5373 2014-08-07 Gary Benson <gbenson@redhat.com>
5374
5375 * server.h: Do not include stdio.h.
5376 * linux-low.c: Likewise.
5377 * remote-utils.c: Likewise.
5378 * spu-low.c: Likewise.
5379 * utils.c: Likewise.
5380 * wincecompat.c: Likewise.
5381
5382 2014-08-06 Gary Benson <gbenson@redhat.com>
5383
5384 * regcache.c (init_register_cache): Move conditionals inside if.
5385
5386 2014-08-06 Gary Benson <gbenson@redhat.com>
5387
5388 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5389
5390 2014-07-31 Gary Benson <gbenson@redhat.com>
5391
5392 * ax.h: Do not include server.h.
5393 * gdbthread.h: Likewise.
5394 * lynx-low.h: Likewise.
5395 * notif.h: Likewise.
5396
5397 2014-07-30 Gary Benson <gbenson@redhat.com>
5398
5399 * server.h: Include common-defs.h.
5400 Do not include config.h or build-gnulib-gdbserver/config.h.
5401
5402 2014-07-30 Gary Benson <gbenson@redhat.com>
5403
5404 * hostio-errno.c: Move server.h to top of includes list.
5405 * inferiors.c: Likewise.
5406 * linux-x86-low.c: Likewise.
5407 * notif.c: Include server.h.
5408
5409 2014-07-24 Tom Tromey <tromey@redhat.com>
5410 Gary Benson <gbenson@redhat.com>
5411
5412 * server.h (CORE_ADDR): Now unsigned.
5413
5414 2014-07-16 Pedro Alves <palves@redhat.com>
5415
5416 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5417
5418 2014-07-15 Pedro Alves <palves@redhat.com>
5419
5420 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5421 copy.
5422
5423 2014-07-11 Pedro Alves <palves@redhat.com>
5424
5425 * linux-low.c (kill_wait_lwp): New function, based on
5426 kill_one_lwp_callback, but use my_waitpid directly.
5427 (kill_one_lwp_callback, linux_kill): Use it.
5428
5429 2014-06-23 Pedro Alves <palves@redhat.com>
5430
5431 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5432 before setting DR0..DR3.
5433
5434 2014-06-20 Gary Benson <gbenson@redhat.com>
5435
5436 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5437 * configure: Regenerated.
5438 * config.in: Likewise.
5439
5440 2014-06-20 Gary Benson <gbenson@redhat.com>
5441
5442 * Makefile.in (SFILES): Update locations for files moved
5443 from common to nat.
5444 (object file files): Reordered.
5445
5446 2014-06-20 Gary Benson <gbenson@redhat.com>
5447
5448 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5449 (i386_dr_low_set_addr): Likewise.
5450 (i386_dr_low_get_addr): Likewise.
5451 (i386_dr_low_can_set_control): Likewise.
5452 (i386_dr_low_set_control): Likewise.
5453 (i386_dr_low_get_control): Likewise.
5454 (i386_dr_low_get_status): Likewise.
5455 (i386_get_debug_register_length): Likewise.
5456 * linux-x86-low.c (i386_dr_low_set_addr):
5457 Changed signature. Made static.
5458 (i386_dr_low_get_addr): Likewise.
5459 (i386_dr_low_set_control): Likewise.
5460 (i386_dr_low_get_control): Likewise.
5461 (i386_dr_low_get_status): Likewise.
5462 (i386_dr_low): New global variable.
5463 * win32-i386-low.c (i386_dr_low_set_addr):
5464 Changed signature. Made static.
5465 (i386_dr_low_get_addr): Likewise.
5466 (i386_dr_low_set_control): Likewise.
5467 (i386_dr_low_get_control): Likewise.
5468 (i386_dr_low_get_status): Likewise.
5469 (i386_dr_low): New global variable.
5470
5471 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5472
5473 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5474 * Makefile.in (AR, AR_FLAGS): Define.
5475 * configure: Regenerate.
5476
5477 2014-06-19 Gary Benson <gbenson@redhat.com>
5478
5479 * Makefile.in (i386-dregs.o): New rule.
5480 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5481 * i386-low.c (target.h): Remove include.
5482 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5483 (DR_CONTROL_SHIFT): Likewise.
5484 (DR_CONTROL_SIZE): Likewise.
5485 (DR_RW_EXECUTE): Likewise.
5486 (DR_RW_WRITE): Likewise.
5487 (DR_RW_READ): Likewise.
5488 (DR_RW_IORW): Likewise.
5489 (DR_LEN_1): Likewise.
5490 (DR_LEN_2): Likewise.
5491 (DR_LEN_4): Likewise.
5492 (DR_LEN_8): Likewise.
5493 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5494 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5495 (DR_ENABLE_SIZE): Likewise.
5496 (DR_LOCAL_SLOWDOWN): Likewise.
5497 (DR_GLOBAL_SLOWDOWN): Likewise.
5498 (DR_CONTROL_RESERVED): Likewise.
5499 (I386_DR_CONTROL_MASK): Likewise.
5500 (I386_DR_VACANT): Likewise.
5501 (I386_DR_LOCAL_ENABLE): Likewise.
5502 (I386_DR_GLOBAL_ENABLE): Likewise.
5503 (I386_DR_DISABLE): Likewise.
5504 (I386_DR_SET_RW_LEN): Likewise.
5505 (I386_DR_GET_RW_LEN): Likewise.
5506 (I386_DR_WATCH_HIT): Likewise.
5507 (i386_wp_op_t): Likewise.
5508 (i386_show_dr): Likewise.
5509 (i386_length_and_rw_bits): Likewise.
5510 (i386_insert_aligned_watchpoint): Likewise.
5511 (i386_remove_aligned_watchpoint): Likewise.
5512 (i386_handle_nonaligned_watchpoint): Likewise.
5513 i386_update_inferior_debug_regs(): Likewise.
5514 (i386_dr_insert_watchpoint): Likewise.
5515 (i386_dr_remove_watchpoint): Likewise.
5516 (i386_dr_region_ok_for_watchpoint): Likewise.
5517 (i386_dr_stopped_data_address): Likewise.
5518 (i386_dr_stopped_by_watchpoint): Likewise.
5519
5520 2014-06-19 Gary Benson <gbenson@redhat.com>
5521
5522 * i386-low.c (i386_dr_show): Renamed to
5523 i386_show_dr and made static. All uses updated.
5524 (i386_dr_length_and_rw_bits): Renamed to
5525 i386_length_and_rw_bits and made static.
5526 All uses updated.
5527 (i386_dr_insert_aligned_watchpoint): Renamed to
5528 i386_insert_aligned_watchpoint and made static.
5529 All uses updated.
5530 (i386_dr_remove_aligned_watchpoint): Renamed to
5531 i386_remove_aligned_watchpoint and made static.
5532 All uses updated.
5533 (i386_dr_update_inferior_debug_regs): Renamed to
5534 i386_update_inferior_debug_regs and made static.
5535 All uses updated.
5536
5537 2014-06-18 Gary Benson <gbenson@redhat.com>
5538
5539 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5540 (i386_dr_low_can_set_control): Likewise.
5541 (i386_get_debug_register_length): Likewise.
5542 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5543 (i386_dr_low_can_set_control): Likewise.
5544 (i386_get_debug_register_length): Likewise.
5545
5546 2014-06-17 Gary Benson <gbenson@redhat.com>
5547
5548 * i386-low.h (i386-dregs.h): New include.
5549 (DR_FIRSTADDR): Now in i386-dregs.h.
5550 (DR_LASTADDR): Likewise.
5551 (DR_NADDR): Likewise.
5552 (DR_STATUS): Likewise.
5553 (DR_CONTROL): Likewise.
5554 (i386_debug_reg_state): Likewise.
5555 (i386_dr_insert_watchpoint): Likewise.
5556 (i386_dr_remove_watchpoint): Likewise.
5557 (i386_dr_region_ok_for_watchpoint): Likewise.
5558 (i386_dr_stopped_data_address): Likewise.
5559 (i386_dr_stopped_by_watchpoint): Likewise.
5560 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5561
5562 2014-06-18 Gary Benson <gbenson@redhat.com>
5563
5564 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5565 i386_dr_insert_watchpoint.
5566 (i386_low_remove_watchpoint): Renamed to
5567 i386_dr_remove_watchpoint.
5568 (i386_low_region_ok_for_watchpoint): Renamed to
5569 i386_dr_region_ok_for_watchpoint.
5570 (i386_low_stopped_data_address): Renamed to
5571 i386_dr_stopped_data_address.
5572 (i386_low_stopped_by_watchpoint): Renamed to
5573 i386_dr_stopped_by_watchpoint.
5574 * i386-low.c (i386_show_dr): Renamed to
5575 i386_dr_show and made nonstatic. All uses updated.
5576 (i386_length_and_rw_bits): Renamed to
5577 i386_dr_length_and_rw_bits and made nonstatic.
5578 All uses updated.
5579 (i386_insert_aligned_watchpoint): Renamed to
5580 i386_dr_insert_aligned_watchpoint and made nonstatic.
5581 All uses updated.
5582 (i386_remove_aligned_watchpoint): Renamed to
5583 i386_dr_remove_aligned_watchpoint and made nonstatic.
5584 All uses updated.
5585 (i386_update_inferior_debug_regs): Renamed to
5586 i386_dr_update_inferior_debug_regs and made nonstatic.
5587 All uses updated.
5588 (i386_low_insert_watchpoint): Renamed to
5589 i386_dr_insert_watchpoint. All uses updated.
5590 (i386_low_remove_watchpoint): Renamed to
5591 i386_dr_remove_watchpoint. All uses updated.
5592 (i386_low_region_ok_for_watchpoint): Renamed to
5593 i386_dr_region_ok_for_watchpoint. All uses updated.
5594 (i386_low_stopped_data_address): Renamed to
5595 i386_dr_stopped_data_address. All uses updated.
5596 (i386_low_stopped_by_watchpoint): Renamed to
5597 i386_dr_stopped_by_watchpoint. All uses updated.
5598
5599 2014-06-18 Gary Benson <gbenson@redhat.com>
5600
5601 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5602 (i386_dr_low_can_set_control): Likewise.
5603 (i386_insert_aligned_watchpoint): New check.
5604
5605 2014-06-18 Gary Benson <gbenson@redhat.com>
5606
5607 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5608 Renamed to state.
5609
5610 2014-06-18 Gary Benson <gbenson@redhat.com>
5611
5612 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5613 instead of fatal and error.
5614 (i386_handle_nonaligned_watchpoint): Likewise.
5615
5616 2014-06-18 Gary Benson <gbenson@redhat.com>
5617
5618 * i386-low.c (i386_get_debug_register_length): New macro.
5619 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5620 (i386_show_dr): Use debug_printf instead of fprintf. Use
5621 phex to format values.
5622
5623 2014-06-18 Gary Benson <gbenson@redhat.com>
5624
5625 * i386-low.h: Comment changes.
5626 * i386-low.c: Likewise.
5627
5628 2014-06-18 Gary Benson <gbenson@redhat.com>
5629
5630 * i386-low.c: Whitespace changes.
5631
5632 2014-06-12 Tom Tromey <tromey@redhat.com>
5633
5634 * utils.c (freeargv): Remove.
5635
5636 2014-06-12 Tom Tromey <tromey@redhat.com>
5637
5638 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5639 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5640 (parse_debug_format_options): Likewise.
5641 (gdbserver_usage): Likewise.
5642 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5643 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5644 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5645 against libiberty.
5646 ($(LIBGNU)): Depend on libiberty.
5647 (all-lib): Recurse into all subdirs.
5648 (install-only): Invoke "install" target in subdirs.
5649 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5650 targets.
5651 * configure: Rebuild.
5652 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5653 for vasprintf, vsnprintf, or gettimeofday.
5654 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5655 srv_tgtobj.
5656
5657 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5658
5659 * development.sh: Delete.
5660 * Makefile.in (config.status): Adjust dependency on development.sh.
5661 * configure.ac: Adjust development.sh source call.
5662 * configure: Regenerate.
5663
5664 2014-06-02 Pedro Alves <palves@redhat.com>
5665
5666 * ax.c (gdb_free_agent_expr): New function.
5667 * ax.h (gdb_free_agent_expr): New declaration.
5668 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5669 list.
5670 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5671 static.
5672 (clear_breakpoint_conditions_and_commands): New function.
5673 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5674 (clear_breakpoint_conditions_and_commands): New declaration.
5675
5676 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5677
5678 * linux-aarch64-low.c (asm/ptrace.h): Include.
5679
5680 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5681
5682 Fix TLS access for -static -pthread.
5683 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5684 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5685 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5686
5687 2014-05-20 Pedro Alves <palves@redhat.com>
5688
5689 * linux-aarch64-low.c (aarch64_insert_point)
5690 (aarch64_remove_point): No longer check whether the type is
5691 supported here. Adjust to new interface.
5692 (the_low_target): Install aarch64_supports_z_point_type as
5693 supports_z_point_type method.
5694 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5695 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5696 instead of a Z packet char. Adjust.
5697 (arm_supports_z_point_type): New function.
5698 (arm_insert_point, arm_remove_point): Adjust to new interface.
5699 (the_low_target): Install arm_supports_z_point_type.
5700 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5701 (cris_insert_point, cris_remove_point): Adjust to new interface.
5702 Don't check whether the type is supported here.
5703 (the_low_target): Install cris_supports_z_point_type.
5704 * linux-low.c (linux_supports_z_point_type): New function.
5705 (linux_insert_point, linux_remove_point): Adjust to new interface.
5706 * linux-low.h (struct linux_target_ops) <insert_point,
5707 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5708 raw_breakpoint pointer parameter.
5709 <supports_z_point_type>: New method.
5710 * linux-mips-low.c (mips_supports_z_point_type): New function.
5711 (mips_insert_point, mips_remove_point): Adjust to new interface.
5712 Use mips_supports_z_point_type.
5713 (the_low_target): Install mips_supports_z_point_type.
5714 * linux-ppc-low.c (the_low_target): Install NULL as
5715 supports_z_point_type method.
5716 * linux-s390-low.c (the_low_target): Install NULL as
5717 supports_z_point_type method.
5718 * linux-sparc-low.c (the_low_target): Install NULL as
5719 supports_z_point_type method.
5720 * linux-x86-low.c (x86_supports_z_point_type): New function.
5721 (x86_insert_point): Adjust to new insert_point interface. Use
5722 insert_memory_breakpoint. Adjust to new
5723 i386_low_insert_watchpoint interface.
5724 (x86_remove_point): Adjust to remove_point interface. Use
5725 remove_memory_breakpoint. Adjust to new
5726 i386_low_remove_watchpoint interface.
5727 (the_low_target): Install x86_supports_z_point_type.
5728 * lynx-low.c (lynx_target_ops): Install NULL as
5729 supports_z_point_type callback.
5730 * nto-low.c (nto_supports_z_point_type): New.
5731 (nto_insert_point, nto_remove_point): Adjust to new interface.
5732 (nto_target_ops): Install nto_supports_z_point_type.
5733 * mem-break.c: Adjust intro comment.
5734 (struct raw_breakpoint) <raw_type, size>: New fields.
5735 <inserted>: Update comment.
5736 <shlib_disabled>: Delete field.
5737 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5738 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5739 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5740 (raw_bkpt_type_to_target_hw_bp_type): New function.
5741 (find_enabled_raw_code_breakpoint_at): New function.
5742 (find_raw_breakpoint_at): New type and size parameters. Use them.
5743 (insert_memory_breakpoint): New function, based off
5744 set_raw_breakpoint_at.
5745 (remove_memory_breakpoint): New function.
5746 (set_raw_breakpoint_at): Reimplement.
5747 (set_breakpoint): New, based on set_breakpoint_at.
5748 (set_breakpoint_at): Reimplement.
5749 (delete_raw_breakpoint): Go through the_target->remove_point
5750 instead of assuming memory breakpoints.
5751 (find_gdb_breakpoint_at): Delete.
5752 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5753 (find_gdb_breakpoint): New function.
5754 (set_gdb_breakpoint_at): Delete.
5755 (z_type_supported): New function.
5756 (set_gdb_breakpoint_1): New function, loosely based off
5757 set_gdb_breakpoint_at.
5758 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5759 (delete_gdb_breakpoint_at): Delete.
5760 (delete_gdb_breakpoint_1): New function, loosely based off
5761 delete_gdb_breakpoint_at.
5762 (delete_gdb_breakpoint): New function.
5763 (clear_gdb_breakpoint_conditions): Rename to ...
5764 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5765 breakpoint.
5766 (add_condition_to_breakpoint): Make static.
5767 (add_breakpoint_condition): Take a struct breakpoint pointer
5768 instead of an address. Adjust.
5769 (gdb_condition_true_at_breakpoint): Rename to ...
5770 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5771 z_type parameter.
5772 (gdb_condition_true_at_breakpoint): Reimplement.
5773 (add_breakpoint_commands): Take a struct breakpoint pointer
5774 instead of an address. Adjust.
5775 (gdb_no_commands_at_breakpoint): Rename to ...
5776 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5777 parameter. Return true if no breakpoint was found. Change debug
5778 output.
5779 (gdb_no_commands_at_breakpoint): Reimplement.
5780 (run_breakpoint_commands): Rename to ...
5781 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5782 and change return type to boolean.
5783 (run_breakpoint_commands): New function.
5784 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5785 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5786 breakpoint. Go through the_target->remove_point instead of
5787 assuming memory breakpoint.
5788 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5789 software and hardware breakpoints.
5790 (reinsert_raw_breakpoint): Go through the_target->insert_point
5791 instead of assuming memory breakpoint.
5792 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5793 software and hardware breakpoints.
5794 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5795 Check both software and hardware breakpoints.
5796 (validate_inserted_breakpoint): Assert the breakpoint is a
5797 software breakpoint. Set the inserted flag to -1 instead of
5798 setting shlib_disabled.
5799 (delete_disabled_breakpoints): Adjust.
5800 (validate_breakpoints): Only validate software breakpoints.
5801 Adjust to inserted flag change.
5802 (check_mem_read, check_mem_write): Skip breakpoint types other
5803 than software breakpoints. Adjust to inserted flag change.
5804 * mem-break.h (enum raw_bkpt_type): New enum.
5805 (raw_breakpoint, struct process_info): Forward declare.
5806 (Z_packet_to_target_hw_bp_type): Delete declaration.
5807 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5808 (set_gdb_breakpoint, delete_gdb_breakpoint)
5809 (clear_breakpoint_conditions): New declarations.
5810 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5811 (breakpoint_inserted_here): Update comment.
5812 (add_breakpoint_condition, add_breakpoint_commands): Replace
5813 address parameter with a breakpoint pointer parameter.
5814 (gdb_breakpoint_here): Update comment.
5815 (delete_gdb_breakpoint_at): Delete.
5816 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5817 * server.c (process_point_options): Take a struct breakpoint
5818 pointer instead of an address. Adjust.
5819 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5820 delete_gdb_breakpoint.
5821 * spu-low.c (spu_target_ops): Install NULL as
5822 supports_z_point_type method.
5823 * target.h: Include mem-break.h.
5824 (struct target_ops) <prepare_to_access_memory>: Update comment.
5825 <supports_z_point_type>: New field.
5826 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5827 instead of a char. Also take a raw breakpoint pointer.
5828 * win32-arm-low.c (the_low_target): Install NULL as
5829 supports_z_point_type.
5830 * win32-i386-low.c (i386_supports_z_point_type): New function.
5831 (i386_insert_point, i386_remove_point): Adjust to new interface.
5832 (the_low_target): Install i386_supports_z_point_type.
5833 * win32-low.c (win32_supports_z_point_type): New function.
5834 (win32_insert_point, win32_remove_point): Adjust to new interface.
5835 (win32_target_ops): Install win32_supports_z_point_type.
5836 * win32-low.h (struct win32_target_ops):
5837 <supports_z_point_type>: New method.
5838 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5839 instead of a char. Also take a raw breakpoint pointer.
5840
5841 2014-05-20 Pedro Alves <palves@redhat.com>
5842
5843 * mem-break.h: Include break-common.h.
5844 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5845 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5846 (Z_packet_to_target_hw_bp_type): New declaration.
5847 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5848 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5849 (Z_PACKET_ACCESS_WP): Delete macros.
5850 (Z_packet_to_hw_type): Delete function.
5851 * i386-low.h: Don't include break-common.h here.
5852 (Z_packet_to_hw_type): Delete declaration.
5853 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5854 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5855 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5856 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5857 * linux-aarch64-low.c: Don't include break-common.h here.
5858 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5859 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5860 (Z_packet_to_target_hw_bp_type): Delete function.
5861 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5862 function.
5863 (mips_insert_point, mips_remove_point): Use
5864 Z_packet_to_target_hw_bp_type.
5865
5866 2014-05-20 Pedro Alves <palves@redhat.com>
5867
5868 * linux-aarch64-low.c: Include break-common.h.
5869 (enum target_point_type): Delete.
5870 (Z_packet_to_point_type): Rename to ...
5871 (Z_packet_to_target_hw_bp_type): ... this, and return a
5872 target_hw_bp_type instead.
5873 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5874 instead of an enum target_point_type.
5875 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5876 breakpoint type.
5877 (aarch64_dr_state_insert_one_point)
5878 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5879 (aarch64_handle_aligned_watchpoint)
5880 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5881 Take an enum target_hw_bp_type instead of an enum
5882 target_point_type.
5883 (aarch64_supports_z_point_type): New function.
5884 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5885 use Z_packet_to_target_hw_bp_type.
5886
5887 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5888
5889 * configure.ac: Only use -Werror by default when DEVELOPMENT
5890 is true.
5891 * configure: Regenerate.
5892
5893 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5894
5895 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5896 * linux-x86-low.c (X86_64_USER_REGS): New.
5897 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5898
5899 2014-04-28 Yao Qi <yao@codesourcery.com>
5900
5901 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5902 name.
5903
5904 2014-04-25 Pedro Alves <palves@redhat.com>
5905
5906 PR server/16255
5907 * linux-low.c (linux_attach_fail_reason_string): New function.
5908 (linux_attach_lwp): Delete.
5909 (linux_attach_lwp_1): Rename to ...
5910 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5911 argument. Remove "initial" parameter. Return int instead of
5912 void. Don't error or warn here.
5913 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5914 failure to attach to the tgid. Call warning when failing to
5915 attach to an lwp.
5916 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5917 argument. Remove "initial" parameter. Return int instead of
5918 void. Don't error or warn here.
5919 (linux_attach_fail_reason_string): New declaration.
5920 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5921 interface change. Use linux_attach_fail_reason_string.
5922
5923 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5924 Walfred Tedeschi <walfred.tedeschi@intel.com>
5925
5926 * Makefile.in: Added rules to handle new files
5927 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5928 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5929 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5930 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5931 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5932 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5933 x32-avx512-linux.o.
5934 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5935 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5936 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5937 i386/x32-avx512.xml.
5938 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5939 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5940 i386/x32-avx512-linux.xml.
5941 * i387-fp.c (num_avx512_k_registers): New constant for number
5942 of K registers.
5943 (num_avx512_zmmh_low_registers): New constant for number of
5944 lower ZMM registers (0-15).
5945 (num_avx512_zmmh_high_registers): New constant for number of
5946 higher ZMM registers (16-31).
5947 (num_avx512_ymmh_registers): New contant for number of higher
5948 YMM registers (ymm16-31 added by avx521 on x86_64).
5949 (num_avx512_xmm_registers): New constant for number of higher
5950 XMM registers (xmm16-31 added by AVX512 on x86_64).
5951 (struct i387_xsave): Add space for AVX512 registers.
5952 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5953 Add code to handle AVX512 registers.
5954 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5955 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5956 prototypei from generated file.
5957 (tdesc_amd64_avx512_linux): Likewise.
5958 (init_registers_x32_avx512_linux): Likewise.
5959 (tdesc_x32_avx512_linux): Likewise.
5960 (init_registers_i386_avx512_linux): Likewise.
5961 (tdesc_i386_avx512_linux): Likewise.
5962 (x86_64_regmap): Add AVX512 registers.
5963 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5964 mask.
5965 (initialize_low_arch): Add code to initialize AVX512 registers.
5966
5967 2014-04-23 Pedro Alves <palves@redhat.com>
5968
5969 * mem-break.c (find_gdb_breakpoint_at): Make static.
5970 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5971
5972 2014-04-23 Pedro Alves <palves@redhat.com>
5973
5974 * i386-low.c: Don't include break-common.h here.
5975 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5976 prototype to take target_hw_bp_type as argument instead of a Z
5977 packet char.
5978 * i386-low.h: Include break-common.h here.
5979 (Z_packet_to_hw_type): Declare.
5980 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5981 prototypes.
5982 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5983 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5984 (x86_remove_point): Convert the packet number to a
5985 target_hw_bp_type before calling i386_low_remove_watchpoint.
5986 * win32-i386-low.c (i386_insert_point): Convert the packet number
5987 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5988 (i386_remove_point): Convert the packet number to a
5989 target_hw_bp_type before calling i386_low_remove_watchpoint.
5990
5991 2014-04-23 Pedro Alves <palves@redhat.com>
5992
5993 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5994
5995 2014-04-10 Pedro Alves <palves@redhat.com>
5996
5997 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5998 Check if the condition or command is NULL before checking if the
5999 breakpoint is known. On success, return true.
6000 * mem-break.h (add_breakpoint_condition): Document return.
6001 (add_breakpoint_commands): Add describing comment.
6002 * server.c (skip_to_semicolon): New function.
6003 (process_point_options): Use it.
6004
6005 2014-04-09 Pedro Alves <palves@redhat.com>
6006
6007 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6008 to lwpid_of.
6009
6010 2014-02-27 Pedro Alves <palves@redhat.com>
6011
6012 PR 12702
6013 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6014 macros.
6015 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6016 output.
6017 (last_thread_of_process_p): Take a PID argument instead of a
6018 thread pointer.
6019 (linux_wait_for_lwp): Delete.
6020 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6021 functions.
6022 (linux_low_filter_event): New function, party factored out from
6023 linux_wait_for_event.
6024 (linux_wait_for_event): Rename to ...
6025 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6026 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6027 sigsuspend. Check for zombie leaders.
6028 (linux_wait_for_event): Reimplement as wrapper around
6029 linux_wait_for_event_filtered.
6030 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6031 a normal or signal exit is seen, it's the whole process exiting.
6032 (wait_for_sigstop): No longer a for_each_inferior callback.
6033 Rewrite on top of linux_wait_for_event_filtered.
6034 (stop_all_lwps): Call wait_for_sigstop directly.
6035 * server.c (resume, handle_target_event): Handle
6036 TARGET_WAITKIND_NO_RESUMED.
6037
6038 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6039
6040 * win32-low.c (psapi_get_dll_name,
6041 * win32_CreateToolhelp32Snapshot): Delete.
6042 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6043 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6044 Delete.
6045 (handle_load_dll): Add function description.
6046 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6047
6048 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6049
6050 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6051 Add comment.
6052 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6053 base address when calling win32_add_one_solib.
6054 (handle_load_dll): Delete local variable load_addr.
6055 Remove 0x1000 offset applied to DLL base address when calling
6056 win32_add_one_solib.
6057 (handle_unload_dll): Add comment.
6058
6059 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6060
6061 * win32-low.c (win32_add_all_dlls): Renames
6062 win32_ensure_ntdll_loaded. Rewrite function documentation.
6063 Adjust implementation to always load all DLLs.
6064 Add 0x1000 offset to DLL base address when calling
6065 win32_add_one_solib.
6066 (child_initialization_done): New static global.
6067 (do_initial_child_stuff): Set child_initialization_done to
6068 zero during child initialization, and 1 after. Replace call
6069 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6070 Add comment.
6071 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6072 (handle_unload_dll): Add function documentation.
6073 (get_child_debug_event): Ignore load and unload DLL events
6074 during child initialization.
6075
6076 2014-02-20 Doug Evans <dje@google.com>
6077
6078 Remove global all_lwps.
6079 * inferiors.h (ptid_of): Move here from linux-low.h.
6080 (pid_of, lwpid_of): Ditto.
6081 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6082 parameter is a struct thread_info * now.
6083 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6084 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6085 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6086 directly.
6087 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6088 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6089 * linux-arm-low.c (update_registers_callback): Update, "entry"
6090 parameter is a struct thread_info * now.
6091 Fetch lwpid from current_inferior directly.
6092 (arm_insert_point): Pass &all_threads to find_inferior instead of
6093 &all_lwps.
6094 (arm_remove_point): Ditto.
6095 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6096 (arm_prepare_to_resume): Fetch pid from thread.
6097 (arm_read_description): Fetch lwpid from current_inferior directly.
6098 * linux-low.c (all_lwps): Delete.
6099 (delete_lwp): Delete call to remove_inferior.
6100 (handle_extended_wait): Fetch lwpid from thread.
6101 (add_lwp): Don't set lwp->entry.id. Remove call to
6102 add_inferior_to_list.
6103 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6104 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6105 (kill_one_lwp_callback): Ditto.
6106 (linux_kill): Don't dereference NULL pointer.
6107 Fetch ptid,lwpid from thread.
6108 (get_detach_signal): Fetch ptid from thread.
6109 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6110 Simplify call to regcache_invalidate_thread.
6111 (delete_lwp_callback): Update, "entry" parameter is a
6112 struct thread_info * now. Fetch pid from thread.
6113 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6114 (status_pending_p_callback): Update, "entry" parameter is a
6115 struct thread_info * now. Fetch ptid from thread.
6116 (find_lwp_pid): Update, "entry" parameter is a
6117 struct thread_info * now.
6118 (linux_wait_for_lwp): Fetch pid from thread.
6119 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6120 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6121 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6122 (dequeue_one_deferred_signal): Ditto.
6123 (cancel_breakpoint): Fetch ptid from current_inferior.
6124 (linux_wait_for_event): Pass &all_threads to find_inferior,
6125 not &all_lwps. Fetch ptid, lwpid from thread.
6126 (count_events_callback): Update, "entry" parameter is a
6127 struct thread_info * now.
6128 (select_singlestep_lwp_callback): Ditto.
6129 (select_event_lwp_callback): Ditto.
6130 (cancel_breakpoints_callback): Ditto.
6131 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6132 not &all_lwps.
6133 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6134 (unsuspend_one_lwp): Update, "entry" parameter is a
6135 struct thread_info * now.
6136 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6137 not &all_lwps.
6138 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6139 Fetch lwpid from thread, not lwp.
6140 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6141 Pass &all_threads to find_inferior, not &all_lwps.
6142 (send_sigstop): Fetch lwpid from thread, not lwp.
6143 (send_sigstop_callback): Update, "entry" parameter is a
6144 struct thread_info * now.
6145 (suspend_and_send_sigstop_callback): Ditto.
6146 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6147 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6148 struct thread_info * now.
6149 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6150 from thread, lwp.
6151 (lwp_running): Update, "entry" parameter is a
6152 struct thread_info * now.
6153 (stop_all_lwps): Fetch ptid from thread.
6154 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6155 (linux_resume_one_lwp): Fetch lwpid from thread.
6156 (linux_set_resume_request): Update, "entry" parameter is a
6157 struct thread_info * now. Fetch pid, lwpid from thread.
6158 (resume_status_pending_p): Update, "entry" parameter is a
6159 struct thread_info * now.
6160 (need_step_over_p): Ditto. Fetch lwpid from thread.
6161 (start_step_over): Fetch lwpid from thread.
6162 (linux_resume_one_thread): Update, "entry" parameter is a
6163 struct thread_info * now. Fetch lwpid from thread.
6164 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6165 (proceed_one_lwp): Update, "entry" parameter is a
6166 struct thread_info * now. Fetch lwpid from thread.
6167 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6168 struct thread_info * now.
6169 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6170 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6171 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6172 directly.
6173 (regsets_store_inferior_registers): Ditto.
6174 (fetch_register, store_register): Ditto.
6175 (linux_read_memory, linux_write_memory): Ditto.
6176 (linux_request_interrupt): Ditto.
6177 (linux_read_auxv): Ditto.
6178 (linux_xfer_siginfo): Ditto.
6179 (linux_qxfer_spu): Ditto.
6180 (linux_qxfer_libraries_svr4): Ditto.
6181 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6182 moved to inferiors.h.
6183 (get_lwp): Delete.
6184 (get_thread_lwp): Update.
6185 (struct lwp_info): Delete member "entry". Simplify comment for
6186 member "thread".
6187 (all_lwps): Delete.
6188 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6189 current_inferior directly.
6190 (update_watch_registers_callback): Update, "entry" parameter is a
6191 struct thread_info * now. Fetch pid from thread.
6192 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6193 (mips_insert_point): Fetch lwpid from current_inferior.
6194 Pass &all_threads to find_inferior, not &all_lwps.
6195 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6196 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6197 directly.
6198 (mips_stopped_data_address): Ditto.
6199 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6200 directly.
6201 * linux-tile-low.c (tile_arch_setup): Ditto.
6202 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6203 (update_debug_registers_callback): Update, "entry" parameter is a
6204 struct thread_info * now. Fetch pid from thread.
6205 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6206 Pass &all_threads to find_inferior, not &all_lwps.
6207 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6208 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6209 Pass &all_threads to find_inferior, not &all_lwps.
6210 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6211 (i386_dr_low_get_status): Ditto.
6212 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6213 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6214 (x86_linux_read_description): Ditto.
6215 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6216
6217 2014-02-20 Doug Evans <dje@google.com>
6218
6219 * inferiors.c (get_first_inferior): Fix buglet.
6220
6221 2014-02-19 Doug Evans <dje@google.com>
6222
6223 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6224 * inferiors.c (add_thread): Change result type to struct thread_info *.
6225 All callers updated.
6226 (add_lwp): Call add_thread here instead of in callers.
6227 All callers updated.
6228 * linux-low.h (get_lwp_thread): Rewrite.
6229 (struct lwp_info): New member "thread".
6230
6231 2014-02-19 Doug Evans <dje@google.com>
6232
6233 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6234 All callers updated.
6235
6236 2014-02-19 Doug Evans <dje@google.com>
6237
6238 * inferiors.c (add_thread): Fix whitespace.
6239
6240 2014-02-19 Doug Evans <dje@google.com>
6241
6242 * dll.c (clear_dlls): Replace accessing list implemention details
6243 with API function.
6244 * gdbthread.h (get_first_thread): Declare.
6245 * inferiors.c (for_each_inferior_with_data): New function.
6246 (get_first_thread): New function.
6247 (find_thread_ptid): Simplify.
6248 (get_first_inferior): New function.
6249 (clear_list): Delete.
6250 (one_inferior_p): New function.
6251 (clear_inferior_list): New function.
6252 (clear_inferiors): Update.
6253 * inferiors.h (for_each_inferior_with_data): Declare.
6254 (clear_inferior_list): Declare.
6255 (one_inferior_p): Declare.
6256 (get_first_inferior): Declare.
6257 * linux-low.c (linux_wait_for_event): Replace accessing list
6258 implemention details with API function.
6259 * server.c (target_running): Ditto.
6260 (accumulate_file_name_length): New function.
6261 (emit_dll_description): New function.
6262 (handle_qxfer_libraries): Replace accessing list implemention
6263 details with API function.
6264 (handle_qxfer_threads_worker): New function.
6265 (handle_qxfer_threads_proper): Replace accessing list implemention
6266 details with API function.
6267 (handle_query): Ditto.
6268 (visit_actioned_threads_callback_ftype): New typedef.
6269 (visit_actioned_threads_data): New struct.
6270 (visit_actioned_threads): Rewrite to be find_inferior callback.
6271 (resume): Call find_inferior.
6272 (handle_status): Replace accessing list implemention
6273 details with API function.
6274 (process_serial_event): Replace accessing list implemention details
6275 with API function.
6276 * target.c (set_desired_inferior): Replace accessing list implemention
6277 details with API function.
6278 * tracepoint.c (same_process_p): New function.
6279 (gdb_agent_about_to_close): Replace accessing list implemention
6280 details with API function.
6281 * win32-low.c (child_delete_thread): Replace accessing list
6282 implemention details with API function.
6283 (match_dll_by_basename): New function.
6284 (dll_is_loaded_by_basename): New function.
6285 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6286 details call to dll_is_loaded_by_basename.
6287
6288 2014-02-19 Doug Evans <dje@google.com>
6289
6290 * dll.h (struct dll_info): Add comment.
6291 * gdbthread.h (struct thread_info): Add comment.
6292 (current_ptid): Simplify.
6293 * inferiors.c (add_process): Update.
6294 (remove_process): Update.
6295 * inferiors.h (struct process_info): Rename member "head" to "entry".
6296 * linux-low.c (delete_lwp): Update.
6297 (add_lwp): Update.
6298 (last_thread_of_process_p): Update.
6299 (kill_one_lwp_callback, linux_kill): Update.
6300 (status_pending_p_callback): Update.
6301 (wait_for_sigstop): Update. Simplify read of ptid.
6302 (start_step_over): Update.
6303 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6304 (get_lwp_thread): Update.
6305 (struct lwp_info): Rename member "head" to "entry".
6306 * regcache.h (inferior_list_entry): Delete.
6307 * server.c (kill_inferior_callback): Update.
6308 (detach_or_kill_inferior_callback): Update.
6309 (print_started_pid): Update.
6310 (print_attached_pid): Update.
6311 (process_serial_event): Simplify read of ptid.
6312 * thread-db.c (thread_db_create_event): Update.
6313 (thread_db_get_tls_address): Update.
6314 * win32-low.c (current_inferior_ptid): Simplify.
6315
6316 2014-02-19 Tom Tromey <tromey@redhat.com>
6317
6318 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6319 argument.
6320 (target_supports_btrace): Update.
6321
6322 2014-02-14 Yao Qi <yao@codesourcery.com>
6323
6324 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6325 (rsp-low-ipa.o): New target.
6326
6327 2014-02-12 Tom Tromey <tromey@redhat.com>
6328
6329 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6330 convert_ascii_to_int.
6331 * regcache.c (registers_to_string): Likewise.
6332 * remote-utils.c (decode_M_packet): Likewise.
6333 * server.c (process_serial_event): Likewise.
6334
6335 2014-02-12 Tom Tromey <tromey@redhat.com>
6336
6337 * server.c (handle_query, handle_v_run): Use hex2bin, not
6338 unhexify.
6339 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6340
6341 2014-02-12 Tom Tromey <tromey@redhat.com>
6342
6343 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6344 convert_int_to_ascii.
6345 * regcache.c (registers_to_string, collect_register_as_string):
6346 Likewise.
6347 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6348 Likewise.
6349 * server.c (process_serial_event): Likewise.
6350 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6351 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6352
6353 2014-02-12 Tom Tromey <tromey@redhat.com>
6354
6355 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6356 bin2hex, not hexify.
6357 * tracepoint.c (cmd_qtstatus): Likewise.
6358
6359 2014-02-12 Tom Tromey <tromey@redhat.com>
6360
6361 * remote-utils.c (monitor_output): Pass explicit length to
6362 hexify.
6363
6364 2014-02-12 Tom Tromey <tromey@redhat.com>
6365
6366 * tracepoint.c: Include rsp-low.h.
6367 * server.c: Include rsp-low.h.
6368 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6369 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6370 declare.
6371 * remote-utils.c: Include rsp-low.h.
6372 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6373 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6374 (convert_int_to_ascii, convert_ascii_to_int): Move to
6375 common/rsp-low.c.
6376 * regcache.c: Include rsp-low.h.
6377 * ax.c: Include rsp-low.h.
6378 * Makefile.in (SFILES): Add common/rsp-low.c.
6379 (OBS): Add rsp-low.o.
6380 (rsp-low.o): New target.
6381
6382 2014-02-12 Tom Tromey <tromey@redhat.com>
6383
6384 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6385 Include print-utils.h.
6386 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6387 (plongest, thirty_two, phex_nz): Remove.
6388 * Makefile.in (SFILES): Add common/print-utils.c.
6389 (OBS): Add print-utils.o.
6390 (print-utils-ipa.o): New target.
6391 (print-utils.o): New target.
6392 (IPA_OBJS): Add print-utils-ipa.o.
6393
6394 2014-02-06 Tom Tromey <tromey@redhat.com>
6395
6396 * Makefile.in (SFILES): Fix indentation.
6397
6398 2014-02-05 Doug Evans <dje@google.com>
6399
6400 * linux-low.c (linux_wait_for_event): Improve comment.
6401 (linux_wait_1): Keep current_inferior in sync with event_child.
6402
6403 2014-01-22 Doug Evans <dje@google.com>
6404
6405 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6406
6407 2014-01-22 Doug Evans <dje@google.com>
6408
6409 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6410 * configure: Regenerate.
6411 * config.in: Regenerate.
6412 * Makefile.in (SFILES): Add debug.c.
6413 (OBS): Add debug.o.
6414 * debug.c: New file.
6415 * debug.h: New file.
6416 * linux-aarch64-low.c (*): Update all debugging printfs to use
6417 debug_printf instead of fprintf.
6418 * linux-arm-low.c (*): Ditto.
6419 * linux-cris-low.c (*): Ditto.
6420 * linux-crisv32-low.c (*): Ditto.
6421 * linux-m32r-low.c (*): Ditto.
6422 * linux-sparc-low.c (*): Ditto.
6423 * linux-x86.c (*): Ditto.
6424 * linux-low.c (*): Ditto.
6425 (linux_wait_1): Add calls to debug_enter, debug_exit.
6426 (linux_wait): Remove redundant debugging printf.
6427 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6428 (linux_resume, unstop_all_lwps): Ditto.
6429 * mem-break.c (*): Update all debugging printfs to use
6430 debug_printf instead of fprintf.
6431 * remote-utils.c (*): Ditto.
6432 * thread-db.c (*): Ditto.
6433 * server.c #include <ctype.h>, "gdb_vecs.h".
6434 (debug_threads): Moved to debug.c.
6435 (*): Update all debugging printfs to use debug_printf instead of
6436 fprintf.
6437 (start_inferior): Replace call to fflush with call to debug_flush.
6438 (monitor_show_help): Mention set debug-format.
6439 (parse_debug_format_options): New function.
6440 (handle_monitor_command): Handle "monitor set debug-format".
6441 (gdbserver_usage): Mention --debug-format.
6442 (main): Parse --debug-format.
6443 * server.h (debug_threads): Declaration moved to debug.h.
6444 #include "debug.h".
6445 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6446 trace_debug_1 that uses debug_printf.
6447 (tracepoint_look_up_symbols): Update all debugging printfs to use
6448 debug_printf instead of fprintf.
6449
6450 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6451
6452 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6453 sys/ptrace.h.
6454
6455 2014-01-17 Pedro Alves <palves@redhat.com>
6456
6457 PR build/16445
6458 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6459 defined after including gdb_proc_service.h.
6460
6461 2014-01-16 Doug Evans <dje@google.com>
6462
6463 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6464 (match_dll): Use it.
6465
6466 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6467
6468 * target.h (target_ops) <read_btrace>: Change parameters and
6469 return type to allow error reporting.
6470 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6471 trace reading errors on.
6472 * linux-low.c (linux_low_read_btrace): Pass trace reading
6473 errors on.
6474 (linux_low_disable_btrace): New.
6475
6476 2014-01-15 Doug Evans <dje@google.com>
6477
6478 * inferiors.c (thread_id_to_gdb_id): Delete.
6479 * inferiors.h (thread_id_to_gdb_id): Delete.
6480
6481 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6482
6483 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6484 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6485 versions.
6486
6487 2014-01-08 Pedro Alves <palves@redhat.com>
6488
6489 * server.c (handle_status): Don't discard previous queued stop
6490 replies or thread's pending status here.
6491 (main) <disconnection>: Do it here instead.
6492
6493 2014-01-08 Pedro Alves <palves@redhat.com>
6494
6495 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6496 * server.c (visit_actioned_threads, handle_pending_status): New
6497 function.
6498 (handle_v_cont): Factor out parts to ...
6499 (resume): ... this new function. If in all-stop, and a thread
6500 being resumed has a pending status, report it without actually
6501 resuming.
6502 (myresume): Adjust to use the new 'resume' function.
6503 (clear_pending_status_callback, set_pending_status_callback)
6504 (find_status_pending_thread_callback): New functions.
6505 (handle_status): Handle the case of multiple threads having
6506 interesting statuses to report. Report threads' real last signal
6507 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6508 with an interesting thread to report the status for, instead of
6509 always reporting the status of the first thread.
6510
6511 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6512
6513 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6514 * gdbreplay.c (gdbreplay_version): Likewise.
6515
6516 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6517
6518 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6519 iov.iov_len with the real length in use.
6520
6521 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6522
6523 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6524 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6525 for all targets that use win32-low.c.
6526 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6527 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6528
6529 2013-12-13 Pedro Alves <palves@redhat.com>
6530
6531 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6532 if equal to TARGET_WAITKIND_LOADED.
6533 * win32-low.c (cached_status): New static global.
6534 (win32_wait): Add declaration.
6535 (do_initial_child_stuff): Flush all initial pending debug events
6536 up to the initial breakpoint.
6537 (win32_wait): If CACHED_STATUS was set, return that instead
6538 of doing a real wait. Remove the code resuming the execution
6539 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6540 during the initial phase. Also remove the code changing
6541 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6542 TARGET_WAITKIND_STOPPED.
6543
6544 2013-12-11 Yao Qi <yao@codesourcery.com>
6545
6546 * notif.c (handle_notif_ack): Return 0 if no notification
6547 matches.
6548
6549 2013-11-20 Doug Evans <dje@google.com>
6550
6551 * linux-low.c (linux_set_resume_request): Fix comment.
6552
6553 2013-11-20 Doug Evans <dje@google.com>
6554
6555 * linux-low.c (resume_status_pending_p): Tweak comment.
6556
6557 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6558
6559 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6560 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6561 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6562 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6563 (srv_amd64_regobj): Add amd64-mpx.o.
6564 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6565 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6566 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6567 * i387-fp.c (num_pl_bnd_register) Added constant.
6568 (num_pl_bnd_cfg_registers) Added constant.
6569 (struct i387_xsave) Added reserved area and MPX fields.
6570 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6571 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6572 function.
6573 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6574 (init_registers_amd64_mpx_linux): Declare new function.
6575 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6576 (x86_64_regmap): Add MPX registers.
6577 (x86_linux_read_description): Add MPX case.
6578 (initialize_low_arch): Initialize MPX targets.
6579
6580 2013-11-18 Tom Tromey <tromey@redhat.com>
6581
6582 * configure: Rebuild.
6583 * configure.ac: Don't check for stdlib.h.
6584 * gdbreplay.c: Unconditionally include stdlib.h.
6585
6586 2013-11-18 Tom Tromey <tromey@redhat.com>
6587
6588 * config.in: Rebuild.
6589 * configure: Rebuild.
6590 * configure.ac: Don't use AC_HEADER_DIRENT.
6591
6592 2013-11-18 Tom Tromey <tromey@redhat.com>
6593
6594 * server.h: Don't check HAVE_STRING_H.
6595 * gdbreplay.c: Don't check HAVE_STRING_H.
6596 * configure: Rebuild.
6597
6598 2013-11-18 Tom Tromey <tromey@redhat.com>
6599
6600 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6601 LIBGNU.
6602
6603 2013-11-08 Tom Tromey <tromey@redhat.com>
6604
6605 * configure, config.in: Rebuild.
6606 * configure.ac: Remove unused configury.
6607
6608 2013-11-08 Tom Tromey <tromey@redhat.com>
6609
6610 * acinclude.m4: Include common.m4, codeset.m4.
6611 * configure, config.in: Rebuild.
6612 * configure.ac: Use GDB_AC_COMMON.
6613
6614 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6615
6616 * linux-s390-low.c (HWCAP_S390_TE): New define.
6617 (s390_arch_setup): Consider the TE field in the HWCAP for
6618 determining 'have_regset_tdb'.
6619
6620 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6621
6622 PR gdb/16014
6623 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6624 call to sizeof.
6625
6626 2013-10-02 Pedro Alves <palves@redhat.com>
6627
6628 * server.c (process_serial_event): Don't output "GDBserver
6629 exiting" if GDB is connected through stdio.
6630 * target.c (mywait): Likewise, be silent if GDB is connected
6631 through stdio.
6632
6633 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6634
6635 * lynx-low.c (lynx_add_threads_after_attach): New function.
6636 (lynx_attach): Remove call to add_thread. Add call to
6637 lynx_add_threads_after_attach instead.
6638
6639 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6640
6641 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6642 * config.in, configure: Regenerated.
6643
6644 2013-09-18 Yao Qi <yao@codesourcery.com>
6645
6646 PR server/15959
6647 * server.c (start_inferior): Clear 'resume_info'.
6648
6649 2013-09-16 Jiong Wang <jiwang@tilera.com>
6650
6651 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6652 for each register.
6653
6654 2013-09-16 Jiong Wang <jiwang@tilera.com>
6655
6656 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6657 linux-tile-low.o to srv_tgtobj.
6658
6659 2013-09-16 Will Newton <will.newton@linaro.org>
6660
6661 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6662 out regs.
6663
6664 2013-09-06 Pedro Alves <palves@redhat.com>
6665
6666 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6667 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6668 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6669 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6670 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6671 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6672
6673 2013-09-06 Pedro Alves <palves@redhat.com>
6674
6675 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6676 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6677
6678 2013-09-06 Pedro Alves <palves@redhat.com>
6679
6680 * linux-amd64-ipa.c: Include tracepoint.h.
6681 * linux-i386-ipa.c: Include tracepoint.h.
6682
6683 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6684
6685 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6686 (ps_get_thread_area): New function.
6687
6688 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6689
6690 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6691 (initialize_low_arch): Call init_registers_crisv32 rather than
6692 init_register_crisv32.
6693
6694 2013-09-05 Pedro Alves <palves@redhat.com>
6695
6696 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6697 to ...
6698 * hostio.h: ... this new file.
6699 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6700 win32-low.c: Include hostio.h.
6701
6702 2013-09-05 Pedro Alves <palves@redhat.com>
6703
6704 * server.h (gdb_client_data, handler_func, callback_handler_func)
6705 (delete_file_handler, add_file_handler, append_callback_event)
6706 (delete_callback_event, start_event_loop, initialize_event_loop):
6707 Move to event-loop.h and include it.
6708 * event-loop.h: New file.
6709
6710 2013-09-05 Pedro Alves <palves@redhat.com>
6711
6712 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6713 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6714 (loaded_dll, unloaded_dll): Move to ...
6715 * dll.h: ... this new file.
6716 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6717
6718 2013-09-05 Pedro Alves <palves@redhat.com>
6719
6720 * server.h (current_process, get_thread_process, all_processes)
6721 (add_inferior_to_list, for_each_inferior, current_inferior)
6722 (remove_inferior, add_process, remove_process, find_process_pid)
6723 (have_started_inferiors_p, have_attached_inferiors_p)
6724 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6725 (clear_inferiors, find_inferior, find_inferior_id)
6726 (inferior_target_data, set_inferior_target_data)
6727 (inferior_regcache_data, set_inferior_regcache_data): Move to
6728 inferiors.h, and include it.
6729 * inferiors.h: New file.
6730
6731 2013-09-05 Pedro Alves <palves@redhat.com>
6732
6733 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6734 Move ...
6735 * ax.h: ... here.
6736
6737 2013-09-05 Pedro Alves <palves@redhat.com>
6738
6739 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6740 tracepoint.h.
6741 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6742 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6743 (handle_tracepoint_general_set, handle_tracepoint_query)
6744 (tracepoint_finished_step, tracepoint_was_hit)
6745 (release_while_stepping_state_list, current_traceframe)
6746 (in_readonly_region, traceframe_read_mem)
6747 (fetch_traceframe_registers, traceframe_read_sdata)
6748 (traceframe_read_info, struct fast_tpoint_collect_status)
6749 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6750 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6751 (supply_fast_tracepoint_registers)
6752 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6753 (ipa_tdesc, claim_trampoline_space)
6754 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6755 (agent_mem_read, agent_get_trace_state_variable_value)
6756 (agent_set_trace_state_variable_value, agent_tsv_read)
6757 (agent_mem_read_string, get_raw_reg_func_addr)
6758 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6759 * tracepoint.h: ... this new file.
6760
6761 2013-09-05 Pedro Alves <palves@redhat.com>
6762
6763 * server.h (perror_with_name, error, fatal, warning, paddress)
6764 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6765 include it.
6766 * utils.h: New file.
6767
6768 2013-09-05 Pedro Alves <palves@redhat.com>
6769
6770 * server.h (remote_debug, noack_mode, transport_is_reliable)
6771 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6772 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6773 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6774 (write_enn, initialize_async_io, enable_async_io)
6775 (disable_async_io, check_remote_input_interrupt_request)
6776 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6777 (dead_thread_notify, prepare_resume_reply)
6778 (decode_address_to_semicolon, decode_address, decode_m_packet)
6779 (decode_M_packet, decode_X_packet, decode_xfer_write)
6780 (decode_search_memory_packet, unhexify, hexify)
6781 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6782 (look_up_one_symbol, relocate_instruction)
6783 (monitor_output): Move to remote-utils.h, and include it.
6784 * remote-utils.h: New file.
6785
6786 2013-09-05 Pedro Alves <palves@redhat.com>
6787
6788 * server.h (_): Delete.
6789
6790 2013-09-02 Pedro Alves <palves@redhat.com>
6791
6792 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6793 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6794 allocated.
6795 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6796
6797 2013-09-02 Pierre Muller <muller@sourceware.org>
6798
6799 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6800 or WriteProcessMemory complete successfully and handle
6801 ERROR_PARTIAL_COPY error.
6802
6803 2013-09-02 Pedro Alves <palves@redhat.com>
6804
6805 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6806 error instead of EIO.
6807
6808 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6809
6810 PR server/15604
6811 * linux-low.c: Include filestuff.h.
6812 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6813 * lynx-low.c: Include filestuff.h.
6814 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6815 * server.c: Include filestuff.h.
6816 (main): Call notice_open_fds.
6817 * spu-low.c: Include filestuff.h.
6818 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6819
6820 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6821
6822 * Makefile.in: Explain why ../target and ../nat are not
6823 listed as include file search paths.
6824 (linux-waitpid.o): New object file rule.
6825 * configure.srv (srv_native_linux_obj): New variable.
6826 Replace all occurrences of linux native object files with
6827 $srv_native_linux_obj.
6828 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6829 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6830 (linux_enable_event_reporting): Remove declaration.
6831 (my_waitpid): Moved to common/linux-waitpid.c.
6832 (linux_wait_for_event): Pass ptid when calling
6833 linux_enable_event_reporting.
6834 (linux_supports_tracefork_flag): Remove.
6835 (linux_enable_event_reporting): Likewise.
6836 (linux_tracefork_grandchild): Remove.
6837 (STACK_SIZE): Moved to common/linux-ptrace.c.
6838 (linux_tracefork_child): Remove.
6839 (linux_test_for_tracefork): Remove.
6840 (linux_look_up_symbols): Call linux_supports_traceclone.
6841 (initialize_low): Remove call to linux_test_for_tracefork.
6842 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6843 common/linux-ptrace.h.
6844 (PTRACE_TYPE_ARG4): Likewise.
6845 Include linux-ptrace.h.
6846
6847 2013-08-21 Pedro Alves <palves@redhat.com>
6848
6849 * config.in: Renegerate.
6850
6851 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6852
6853 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6854 (SFILES): Remove $(srcdir)/common/target-common.c and
6855 add $(srcdir)/target/waitstatus.c.
6856 (OBS): Remove target-common.o and add waitstatus.o.
6857 (server_h): Remove $(srcdir)/../common/target-common.h and
6858 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6859 and $(srcdir)/../target/waitstatus.h.
6860 (target-common.o): Remove.
6861 (waitstatus.o): New target object file.
6862 * target.h: Do not include target-common.h and
6863 include target/resume.h, target/wait.h and
6864 target/waitstatus.h.
6865
6866 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6867
6868 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6869 to PTRACE_TYPE_ARG3.
6870 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6871 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6872 PTRACE_TYPE_ARG4.
6873 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6874 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6875
6876 2013-07-27 Jie Zhang <jie@codesourcery.com>
6877 Daniel Jacobowitz <dan@codesourcery.com>
6878 Yao Qi <yao@codesourcery.com>
6879
6880 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6881 (mips-linux-watch.o): New rule.
6882 (mips_linux_watch_h): New variable.
6883 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6884 srv_tgtobj.
6885 * linux-mips-low.c: Include mips-linux-watch.h.
6886 (struct arch_process_info, struct arch_lwp_info): New.
6887 (update_watch_registers_callback): New function.
6888 (mips_linux_new_process, mips_linux_new_thread) New functions.
6889 (mips_linux_prepare_to_resume, mips_insert_point): New
6890 functions.
6891 (mips_remove_point, mips_stopped_by_watchpoint): New
6892 functions.
6893 (rsp_bp_type_to_target_hw_bp_type): New function.
6894 (mips_stopped_data_address): New function.
6895 (the_low_target): Add watchpoint support functions.
6896
6897 2013-07-27 Yao Qi <yao@codesourcery.com>
6898
6899 * i386-low.c: Include break-common.h.
6900 (enum target_hw_bp_type): Remove.
6901
6902 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6903
6904 * Makefile.in (SFILES): /common/target-common.c.
6905 (OBS): Add target-common.o.
6906 (server_h): Add $(srcdir)/../common/target-common.h.
6907 (target-common.o): New target.
6908 * server.c (queue_stop_reply_callback): Free
6909 status string after use.
6910 * target.c (target_waitstatus_to_string): Remove.
6911 * target.h: Include target-common.h.
6912 (resume_kind): Likewise.
6913 (target_waitkind): Likewise.
6914 (target_waitstatus): Likewise.
6915 (TARGET_WNOHANG): Likewise.
6916
6917 2013-07-04 Yao Qi <yao@codesourcery.com>
6918
6919 * Makefile.in (host_alias): Use @host_noncanonical@.
6920 (target_alias): Use @target_noncanonical@.
6921 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6922 ACX_NONCANONICAL_HOST.
6923 * configure: Regenerated.
6924
6925 Revert:
6926 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6927
6928 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6929 * configure: Rebuild.
6930 * Makefile.in (version_host, version_target): Get from configure.
6931 (version.c): Use $(version_host) and $(version_target).
6932
6933 2013-07-03 Pedro Alves <palves@redhat.com>
6934
6935 * Makefile.in (config.status): Depend on development.sh.
6936 * acinclude.m4: Include libmcheck.m4.
6937 * configure: Regenerate.
6938
6939 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6940
6941 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6942 attribute inside the parentheses.
6943 (winapi_DebugSetProcessKillOnExit): Ditto.
6944 (winapi_DebugBreakProcess): Ditto.
6945 (winapi_GenerateConsoleCtrlEvent): Ditto.
6946
6947 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6948
6949 * notif.h (notif_event): Add a dummy member to avoid compiler
6950 errors.
6951
6952 2013-07-01 Pedro Alves <palves@redhat.com>
6953
6954 * hostio.c (HOSTIO_PATH_MAX): Define.
6955 (require_filename, handle_open, handle_unlink, handle_readlink):
6956 Use it.
6957
6958 2013-07-01 Pedro Alves <palves@redhat.com>
6959
6960 * server.h: Include "pathmax.h".
6961 * linux-low.c: Don't include sys/param.h.
6962 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6963 MAXPATHLEN.
6964 * win32-low.c: Don't include sys/param.h.
6965 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6966
6967 2013-07-01 Pedro Alves <palves@redhat.com>
6968
6969 * event-loop.c: Don't check HAVE_UNISTD_H before including
6970 <unistd.h>.
6971 * gdbreplay.c: Likewise.
6972 * remote-utils.c: Likewise.
6973 * server.c: Likewise.
6974 * configure.ac: Don't check for unistd.h.
6975 * configure: Regenerate.
6976
6977 2013-06-28 Tom Tromey <tromey@redhat.com>
6978
6979 * Makefile.in (version.c): Use version.in, not
6980 common/version.in.
6981
6982 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6983
6984 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6985 * configure: Rebuild.
6986 * Makefile.in (version_host, version_target): Get from configure.
6987 (version.c): Use $(version_host) and $(version_target).
6988
6989 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6990
6991 Fix trace-status to output user name without trailing colon.
6992 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6993
6994 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6995
6996 Fix trace-status to output proper start-time and stop-time.
6997 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6998 output start time and stop time in hex as gdb expects.
6999
7000 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7001
7002 * tracepoint.c (build_traceframe_info_xml): Output trace state
7003 variables present in the trace buffer.
7004
7005 2013-06-24 Tom Tromey <tromey@redhat.com>
7006
7007 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7008 create-version.sh.
7009 (version.o): Remove.
7010 * gdbreplay.c: Include version.h.
7011 (version, host_name): Don't declare.
7012 * server.h: Include version.h.
7013 (version, host_name): Don't declare.
7014
7015 2013-06-12 Pedro Alves <palves@redhat.com>
7016
7017 * linux-x86-low.c (linux_is_elf64): Delete global.
7018 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7019 with local linux_pid_exe_is_elf_64_file use.
7020
7021 2013-06-11 Pedro Alves <palves@redhat.com>
7022
7023 * linux-low.c (regset_disabled, disable_regset): New functions.
7024 (regsets_fetch_inferior_registers)
7025 (regsets_store_inferior_registers): Use them.
7026 (initialize_regsets_info); Don't allocate the disabled_regsets
7027 array here.
7028 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7029 comment.
7030
7031 2013-06-11 Pedro Alves <palves@redhat.com>
7032
7033 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7034 xmalloc.
7035
7036 2013-06-11 Pedro Alves <palves@redhat.com>
7037
7038 * linux-x86-low.c (initialize_low_arch): Call
7039 init_registers_x32_avx_linux.
7040
7041 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7042
7043 Fix compatibility with Android Bionic.
7044 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7045 it is not empty.
7046
7047 2013-06-07 Pedro Alves <palves@redhat.com>
7048
7049 PR server/14823
7050 * Makefile.in (OBS): Add tdesc.o.
7051 (IPA_OBJS): Add tdesc-ipa.o.
7052 (tdesc-ipa.o): New rule.
7053 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7054 interface.
7055 * linux-low.c (new_inferior): Delete.
7056 (disabled_regsets, num_regsets): Delete.
7057 (linux_add_process): Adjust to set the new per-process
7058 new_inferior flag.
7059 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7060 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7061 was a stop. When calling arch_setup, switch the current inferior
7062 to the thread that got an event.
7063 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7064 (regsets_fetch_inferior_registers)
7065 (regsets_store_inferior_registers): New regsets_info parameter.
7066 Adjust to use it.
7067 (linux_register_in_regsets): New regs_info parameter. Adjust to
7068 use it.
7069 (register_addr, fetch_register, store_register): New usrregs_info
7070 parameter. Adjust to use it.
7071 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7072 parameter regs_info. Adjust to use it.
7073 (linux_fetch_registers): Get the current inferior's regs_info, and
7074 adjust to use it.
7075 (linux_store_registers): Ditto.
7076 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7077 (initialize_low): Don't initialize the target_regsets here. Call
7078 initialize_low_arch.
7079 * linux-low.h (target_regsets): Delete declaration.
7080 (struct regsets_info): New.
7081 (struct usrregs_info): New.
7082 (struct regs_info): New.
7083 (struct process_info_private) <new_inferior>: New field.
7084 (struct linux_target_ops): Delete the num_regs, regmap, and
7085 regset_bitmap fields. New field regs_info.
7086 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7087 * i387-fp.c (num_xmm_registers): Delete.
7088 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7089 calls to new interface.
7090 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7091 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7092 Infer the number of xmm registers from the regcache's target
7093 description.
7094 * i387-fp.h (num_xmm_registers): Delete.
7095 * inferiors.c (add_thread): Don't install the thread's regcache
7096 here.
7097 * proc-service.c (gregset_info): Fetch the current inferior's
7098 regs_info. Adjust to use it.
7099 * regcache.c: Include tdesc.h.
7100 (register_bytes, reg_defs, num_registers)
7101 (gdbserver_expedite_regs): Delete.
7102 (get_thread_regcache): If the thread doesn't have a regcache yet,
7103 create one, instead of aborting gdbserver.
7104 (regcache_invalidate_one): Rename to ...
7105 (regcache_invalidate_thread): ... this.
7106 (regcache_invalidate_one): New.
7107 (regcache_invalidate): Only invalidate registers of the current
7108 process.
7109 (init_register_cache): Add target_desc parameter, and use it.
7110 (new_register_cache): Ditto. Assert the target description has a
7111 non zero registers_size.
7112 (regcache_cpy): Add assertions. Adjust.
7113 (realloc_register_cache, set_register_cache): Delete.
7114 (registers_to_string, registers_from_string): Adjust.
7115 (find_register_by_name, find_regno, find_register_by_number)
7116 (register_cache_size): Add target_desc parameter, and use it.
7117 (free_register_cache_thread, free_register_cache_thread_one)
7118 (regcache_release, register_cache_size): New.
7119 (register_size): Add target_desc parameter, and use it.
7120 (register_data, supply_register, supply_register_zeroed)
7121 (supply_regblock, supply_register_by_name, collect_register)
7122 (collect_register_as_string, collect_register_by_name): Adjust.
7123 * regcache.h (struct target_desc): Forward declare.
7124 (struct regcache) <tdesc>: New field.
7125 (init_register_cache, new_register_cache): Add target_desc
7126 parameter.
7127 (regcache_invalidate_thread): Declare.
7128 (regcache_invalidate_one): Delete declaration.
7129 (regcache_release): Declare.
7130 (find_register_by_number, register_cache_size, register_size)
7131 (find_regno): Add target_desc parameter.
7132 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7133 declarations.
7134 * remote-utils.c: Include tdesc.h.
7135 (outreg, prepare_resume_reply): Adjust.
7136 * server.c: Include tdesc.h.
7137 (gdbserver_xmltarget): Delete declaration.
7138 (get_features_xml, process_serial_event): Adjust.
7139 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7140 declare.
7141 (struct process_info) <tdesc>: New field.
7142 (ipa_tdesc): Declare.
7143 * tdesc.c: New file.
7144 * tdesc.h: New file.
7145 * tracepoint.c: Include tdesc.h.
7146 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7147 (get_context_regcache): Adjust to pass ipa_tdesc down.
7148 (do_action_at_tracepoint): Adjust to get the register cache size
7149 from the context regcache's description.
7150 (traceframe_walk_blocks): Adjust to get the register cache size
7151 from the current trace frame's description.
7152 (traceframe_get_pc): Adjust to get current trace frame's
7153 description and pass it down.
7154 (gdb_collect): Adjust to get the register cache size from the
7155 IPA's description.
7156 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7157 (gdbserver_xmltarget): Delete.
7158 (initialize_low_tracepoint): Set the ipa's target description.
7159 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7160 (initialize_low_tracepoint): Set the ipa's target description.
7161 * linux-x86-low.c: Include tdesc.h.
7162 [__x86_64__] (is_64bit_tdesc): New.
7163 (ps_get_thread_area, x86_get_thread_area): Use it.
7164 (i386_cannot_store_register): Rename to ...
7165 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7166 (i386_cannot_fetch_register): Rename to ...
7167 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7168 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7169 to new interface.
7170 (target_regsets): Rename to ...
7171 (x86_regsets): ... this.
7172 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7173 interface.
7174 (x86_siginfo_fixup): Use is_64bit_tdesc.
7175 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7176 (tdesc_x32_avx_linux, tdesc_x32_linux)
7177 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7178 Declare.
7179 (x86_linux_update_xmltarget): Delete.
7180 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7181 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7182 (AMD64_LINUX_USER64_CS): New.
7183 (x86_linux_read_description): New, based on
7184 x86_linux_update_xmltarget.
7185 (same_process_callback): New.
7186 (x86_arch_setup_process_callback): New.
7187 (x86_linux_update_xmltarget): New.
7188 (x86_regsets_info): New.
7189 (amd64_linux_regs_info): New.
7190 (i386_linux_usrregs_info): New.
7191 (i386_linux_regs_info): New.
7192 (x86_linux_regs_info): New.
7193 (x86_arch_setup): Reimplement.
7194 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7195 (x86_emit_ops): Ditto.
7196 (the_low_target): Adjust. Install x86_linux_regs_info,
7197 x86_cannot_fetch_register, and x86_cannot_store_register.
7198 (initialize_low_arch): New.
7199 * linux-ia64-low.c (tdesc_ia64): Declare.
7200 (ia64_fetch_register): Adjust.
7201 (ia64_usrregs_info, regs_info): New globals.
7202 (ia64_regs_info): New function.
7203 (the_low_target): Adjust.
7204 (initialize_low_arch): New function.
7205 * linux-sparc-low.c (tdesc_sparc64): Declare.
7206 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7207 Adjust.
7208 (sparc_arch_setup): New function.
7209 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7210 (the_low_target): Adjust.
7211 (initialize_low_arch): New function.
7212 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7213 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7214 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7215 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7216 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7217 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7218 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7219 (tdesc_powerpc_isa205_vsx64l): Declare.
7220 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7221 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7222 (ppc_set_pc, ppc_get_hwcap): Adjust.
7223 (ppc_usrregs_info): Forward declare.
7224 (!__powerpc64__) ppc_regmap_adjusted: New global.
7225 (ppc_arch_setup): Adjust to the current process'es target
7226 description.
7227 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7228 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7229 (ppc_store_evrregset): Adjust.
7230 (target_regsets): Rename to ...
7231 (ppc_regsets): ... this, and make static.
7232 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7233 (ppc_regs_info): New function.
7234 (the_low_target): Adjust.
7235 (initialize_low_arch): New function.
7236 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7237 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7238 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7239 (tdesc_s390x_linux64v2): Declare.
7240 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7241 (s390_fill_gregset, s390_store_last_break): Adjust.
7242 (target_regsets): Rename to ...
7243 (s390_regsets): ... this, and make static.
7244 (s390_get_pc, s390_set_pc): Adjust.
7245 (s390_get_hwcap): New target_desc parameter, and use it.
7246 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7247 (s390_arch_setup): Adjust to set the current process'es target
7248 description. Don't adjust the regmap.
7249 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7250 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7251 (regs_info_3264): New globals.
7252 (s390_regs_info): New function.
7253 (the_low_target): Adjust.
7254 (initialize_low_arch): New function.
7255 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7256 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7257 [__mips64] (init_registers_mips_linux)
7258 (init_registers_mips_dsp_linux): Delete defines.
7259 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7260 (have_dsp): New global.
7261 (mips_read_description): New, based on mips_arch_setup.
7262 (mips_arch_setup): Reimplement.
7263 (get_usrregs_info): New function.
7264 (mips_cannot_fetch_register, mips_cannot_store_register)
7265 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7266 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7267 (target_regsets): Rename to ...
7268 (mips_regsets): ... this, and make static.
7269 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7270 (dsp_regs_info, regs_info): New globals.
7271 (mips_regs_info): New function.
7272 (the_low_target): Adjust.
7273 (initialize_low_arch): New function.
7274 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7275 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7276 Declare.
7277 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7278 (arm_read_description): New, with bits factored from
7279 arm_arch_setup.
7280 (arm_arch_setup): Reimplement.
7281 (target_regsets): Rename to ...
7282 (arm_regsets): ... this, and make static.
7283 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7284 (arm_regs_info): New function.
7285 (the_low_target): Adjust.
7286 (initialize_low_arch): New function.
7287 * linux-m68k-low.c (tdesc_m68k): Declare.
7288 (target_regsets): Rename to ...
7289 (m68k_regsets): ... this, and make static.
7290 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7291 (m68k_regs_info): New function.
7292 (m68k_arch_setup): New function.
7293 (the_low_target): Adjust.
7294 (initialize_low_arch): New function.
7295 * linux-sh-low.c (tdesc_sharch): Declare.
7296 (target_regsets): Rename to ...
7297 (sh_regsets): ... this, and make static.
7298 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7299 (sh_regs_info, sh_arch_setup): New functions.
7300 (the_low_target): Adjust.
7301 (initialize_low_arch): New function.
7302 * linux-bfin-low.c (tdesc_bfin): Declare.
7303 (bfin_arch_setup): New function.
7304 (bfin_usrregs_info, regs_info): New globals.
7305 (bfin_regs_info): New function.
7306 (the_low_target): Adjust.
7307 (initialize_low_arch): New function.
7308 * linux-cris-low.c (tdesc_cris): Declare.
7309 (cris_arch_setup): New function.
7310 (cris_usrregs_info, regs_info): New globals.
7311 (cris_regs_info): New function.
7312 (the_low_target): Adjust.
7313 (initialize_low_arch): New function.
7314 * linux-cris-low.c (tdesc_crisv32): Declare.
7315 (cris_arch_setup): New function.
7316 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7317 (cris_regs_info): New function.
7318 (the_low_target): Adjust.
7319 (initialize_low_arch): New function.
7320 * linux-m32r-low.c (tdesc_m32r): Declare.
7321 (m32r_arch_setup): New function.
7322 (m32r_usrregs_info, regs_info): New globals.
7323 (m32r_regs_info): Adjust.
7324 (initialize_low_arch): New function.
7325 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7326 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7327 (tic6x_usrregs_info): Forward declare.
7328 (tic6x_read_description): New function, based on ...
7329 (tic6x_arch_setup): ... this. Reimplement.
7330 (target_regsets): Rename to ...
7331 (tic6x_regsets): ... this, and make static.
7332 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7333 (tic6x_regs_info): New function.
7334 (the_low_target): Adjust.
7335 (initialize_low_arch): New function.
7336 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7337 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7338 (target_regsets): Rename to ...
7339 (xtensa_regsets): ... this, and make static.
7340 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7341 globals.
7342 (xtensa_arch_setup, xtensa_regs_info): New functions.
7343 (the_low_target): Adjust.
7344 (initialize_low_arch): New function.
7345 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7346 (nios2_arch_setup): Set the current process'es tdesc.
7347 (target_regsets): Rename to ...
7348 (nios2_regsets): ... this.
7349 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7350 (nios2_regs_info): New function.
7351 (the_low_target): Adjust.
7352 (initialize_low_arch): New function.
7353 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7354 (aarch64_arch_setup): Set the current process'es tdesc.
7355 (target_regsets): Rename to ...
7356 (aarch64_regsets): ... this.
7357 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7358 (aarch64_regs_info): New function.
7359 (the_low_target): Adjust.
7360 (initialize_low_arch): New function.
7361 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7362 globals.
7363 (target_regsets): Rename to ...
7364 (tile_regsets): ... this.
7365 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7366 (tile_regs_info): New function.
7367 (tile_arch_setup): Set the current process'es tdesc.
7368 (the_low_target): Adjust.
7369 (initialize_low_arch): New function.
7370 * spu-low.c (tdesc_spu): Declare.
7371 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7372 * win32-arm-low.c (tdesc_arm): Declare.
7373 (arm_arch_setup): New function.
7374 (the_low_target): Install arm_arch_setup instead of
7375 init_registers_arm.
7376 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7377 (init_windows_x86): Rename to ...
7378 (i386_arch_setup): ... this. Set `win32_tdesc'.
7379 (the_low_target): Adjust.
7380 * win32-low.c (win32_tdesc): New global.
7381 (child_add_thread): Don't create the thread cache here.
7382 (do_initial_child_stuff): Set the new process'es tdesc.
7383 * win32-low.h (struct target_desc): Forward declare.
7384 (win32_tdesc): Declare.
7385 * lynx-i386-low.c (tdesc_i386): Declare global.
7386 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7387 * lynx-low.c (lynx_tdesc): New global.
7388 (lynx_add_process): Set the new process'es tdesc.
7389 * lynx-low.h (struct target_desc): Forward declare.
7390 (lynx_tdesc): Declare global.
7391 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7392 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7393 * nto-low.c (nto_tdesc): New global.
7394 (do_attach): Set the new process'es tdesc.
7395 * nto-low.h (struct target_desc): Forward declare.
7396 (nto_tdesc): Declare.
7397 * nto-x86-low.c (tdesc_i386): Declare.
7398 (nto_x86_arch_setup): Set `nto_tdesc'.
7399
7400 2013-06-04 Gary Benson <gbenson@redhat.com>
7401
7402 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7403 to qSupported response when appropriate.
7404 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7405 with nonzero-length annex.
7406 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7407 arguments supplied in annex.
7408
7409 2013-05-31 Doug Evans <dje@google.com>
7410
7411 PR server/15594
7412 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7413 64 bits in 64-cross-32 environment.
7414
7415 2013-05-28 Pedro Alves <palves@redhat.com>
7416
7417 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7418 (aarch64-without-fpu.c): Delete rule.
7419 * configure.srv (aarch64*-*-linux*): Remove references to
7420 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7421 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7422 declaration.
7423
7424 2013-05-24 Pedro Alves <palves@redhat.com>
7425
7426 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7427 instead of strchr/decode_address. Error if the range isn't split
7428 with a ','. Don't assume there's be a ':' in the action.
7429
7430 2013-05-23 Yao Qi <yao@codesourcery.com>
7431 Pedro Alves <palves@redhat.com>
7432
7433 * linux-low.c (lwp_in_step_range): New function.
7434 (linux_wait_1): If the thread was range stepping and stopped
7435 outside the stepping range, report the stop to GDB. Otherwise,
7436 continue stepping. Add range stepping debug output.
7437 (linux_set_resume_request): Copy the step range from the resume
7438 request to the lwp.
7439 (linux_supports_range_stepping): New.
7440 (linux_target_ops) <supports_range_stepping>: Set to
7441 linux_supports_range_stepping.
7442 * linux-low.h (struct linux_target_ops)
7443 <supports_range_stepping>: New field.
7444 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7445 * linux-x86-low.c (x86_supports_range_stepping): New.
7446 (the_low_target) <supports_range_stepping>: Set to
7447 x86_supports_range_stepping.
7448 * server.c (handle_v_cont): Handle 'r' action.
7449 (handle_v_requests): Append ";r" if the target supports range
7450 stepping.
7451 * target.h (struct thread_resume) <step_range_start,
7452 step_range_end>: New fields.
7453 (struct target_ops) <supports_range_stepping>:
7454 New field.
7455 (target_supports_range_stepping): New macro.
7456
7457 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7458
7459 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7460 confusion in comment.
7461
7462 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7463
7464 * lynx-low.c (struct process_info_private): New type.
7465 (lynx_add_process): New function.
7466 (lynx_create_inferior, lynx_attach): Replace calls to
7467 add_process by calls to lynx_add_process.
7468 (lynx_resume): If PTID is null, then try using
7469 current_process()->private->last_wait_event_ptid.
7470 Add comments.
7471 (lynx_clear_inferiors): Delete. The contents of that function
7472 has been inlined in lynx_mourn;
7473 (lynx_wait_1): Save the ptid in the process's private data.
7474 (lynx_mourn): Free the process' private data. Replace call
7475 to lynx_clear_inferiors by call to clear_inferiors.
7476
7477 2013-05-17 Yao Qi <yao@codesourcery.com>
7478
7479 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7480 the right place.
7481
7482 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7483
7484 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7485 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7486 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7487 PT_TEXT_END_ADDR guards. Update comments.
7488 (linux_target_op) <read_offsets>: Conditionally define to
7489 linux_read_offsets if the target is UCLIBC and if it defines
7490 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7491
7492 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7493 Andrew Jenner <andrew@codesourcery.com>
7494
7495 * Makefile.in (SFILES): Add linux-nios2-low.c.
7496 (clean): Add action to delete nios2-linux.c.
7497 (nios2-linux.c): New rule.
7498 * configure.srv: Add nios2*-*-linux*.
7499 * linux-nios2-low.c: New.
7500
7501 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7502
7503 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7504
7505 2013-04-25 Hui Zhu <hui@codesourcery.com>
7506
7507 PR gdb/15186
7508 * ax.c (ax_printf): Add fflush.
7509
7510 2013-04-22 Tom Tromey <tromey@redhat.com>
7511
7512 * Makefile.in (SFILES): Add filestuff.c.
7513 (OBS): Add filestuff.o.
7514 (filestuff.o): New target.
7515 * config.in, configure: Rebuild.
7516 * configure.ac: Check for fdwalk, pipe2.
7517
7518 2013-04-17 Pedro Alves <palves@redhat.com>
7519
7520 * configure.ac (USE_THREAD_DB): Delete variable.
7521 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7522 Don't AC_SUBST USE_THREAD_DB.
7523 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7524 * config.in, configure: Regenerate.
7525
7526 2013-04-16 Pedro Alves <palves@redhat.com>
7527
7528 * linux-low.h (struct lwp_info) <thread_known>: Move under
7529 the USE_THREAD_DB #ifdef.
7530
7531 2013-04-16 Pedro Alves <palves@redhat.com>
7532
7533 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7534 (linux-low.o): Delete rule.
7535 * linux-low.h: Always include "gdb_thread_db.h" instead of
7536 conditionally including thread_db.h.
7537 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7538 HAVE_THREAD_DB_H.
7539
7540 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7541
7542 * Makefile.in (install-only): Fix make install regression.
7543
7544 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7545
7546 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7547 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7548 installation.
7549 * gdbserver.1: Remove.
7550
7551 2013-03-22 Pedro Alves <palves@redhat.com>
7552
7553 * linux-low.c (handle_extended_wait): Don't call
7554 linux_enable_event_reporting.
7555
7556 2013-03-15 Tony Theodore <tonyt@logyst.com>
7557
7558 PR build/9098:
7559 * Makefile.in (SHELL): Use @SHELL@.
7560
7561 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7562
7563 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7564 compiler warning.
7565
7566 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7567
7568 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7569 Remove extraneous NULL element.
7570
7571 2013-03-13 Yao Qi <yao@codesourcery.com>
7572
7573 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7574 'V' block in trace frame.
7575
7576 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7577
7578 * target.h (struct target_ops): Add btrace ops.
7579 (target_supports_btrace): New macro.
7580 (target_enable_btrace): New macro.
7581 (target_disable_btrace): New macro.
7582 (target_read_btrace): New macro.
7583 * gdbthread.h (struct thread_info): Add btrace field.
7584 * server.c: Include btrace-common.h.
7585 (handle_btrace_general_set): New function.
7586 (handle_btrace_enable): New function.
7587 (handle_btrace_disable): New function.
7588 (handle_general_set): Call handle_btrace_general_set.
7589 (handle_qxfer_btrace): New function.
7590 (struct qxfer qxfer_packets[]): Add btrace entry.
7591 * inferiors.c (remove_thread): Disable btrace.
7592 * linux-low: Include linux-btrace.h.
7593 (linux_low_enable_btrace): New function.
7594 (linux_low_read_btrace): New function.
7595 (linux_target_ops): Add btrace ops.
7596 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7597 Add srv_linux_btrace=yes.
7598 (x86_64-*-linux*): Add linux-btrace.o.
7599 Add srv_linux_btrace=yes.
7600 * configure.ac: Define HAVE_LINUX_BTRACE.
7601 * config.in: Regenerated.
7602 * configure: Regenerated.
7603
7604 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7605
7606 * server.c (handle_qxfer): Preserve error message if -3 is
7607 returned.
7608 (qxfer): Document the -3 return value.
7609
7610 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7611
7612 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7613 (linux_btrace_h): New variable.
7614 (linux-btrace.o): New rule.
7615
7616 2013-03-08 Stan Shebs <stan@codesourcery.com>
7617 Hafiz Abid Qadeer <abidh@codesourcery.com>
7618
7619 * tracepoint.c (trace_buffer_size): New global.
7620 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7621 (init_trace_buffer): Change to one-argument function. Allocate
7622 trace buffer memory.
7623 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7624 handle QTBuffer:size packet.
7625 (cmd_bigqtbuffer_size): New function.
7626 (initialize_tracepoint): Call init_trace_buffer with
7627 DEFAULT_TRACE_BUFFER_SIZE.
7628 * server.c (handle_query): Add QTBuffer:size in the
7629 supported packets.
7630
7631 2013-03-07 Yao Qi <yao@codesourcery.com>
7632
7633 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7634 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7635 of -1.
7636 (cmd_qtsp): Adjust condition. Do post increment.
7637 Set cur_action and cur_step_action back to 0.
7638
7639 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7640
7641 PR server/15236
7642 * linux-low.c (linux_write_memory): Return early success if LEN is
7643 zero.
7644
7645 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7646
7647 * configure.srv: Add x86_64-*-cygwin* as target.
7648
7649 2013-02-28 Tom Tromey <tromey@redhat.com>
7650
7651 * configure.ac: Invoke AC_SYS_LARGEFILE.
7652 * configure, config.in: Rebuild.
7653
7654 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7655
7656 * win32-low.c: Throughout, fix format strings and casts of
7657 printf-like functions to avoid type related warnings on all
7658 platforms.
7659 (get_child_debug_event): Print dwDebugEventCode as hex since
7660 that's how it's usually documented.
7661
7662 2013-02-28 Yao Qi <yao@codesourcery.com>
7663
7664 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7665 pulongest.
7666
7667 2013-02-27 Jiong Wang <jiwang@tilera.com>
7668
7669 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7670 (reg-tilegx32.c): New rule.
7671 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7672 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7673 different register info initializer according to elf class.
7674 (init_registers_tilgx32): New function. The tilegx32 register info
7675 initializer.
7676 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7677 (tile_store_gregset): Likewise.
7678
7679 2013-02-27 Yao Qi <yao@codesourcery.com>
7680
7681 * server.c (process_point_options): Print debug message when
7682 debug_threads is true.
7683
7684 2013-02-26 Yao Qi <yao@codesourcery.com>
7685
7686 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7687
7688 2013-02-19 Pedro Alves <palves@redhat.com>
7689 Kai Tietz <ktietz@redhat.com>
7690
7691 PR gdb/15161
7692
7693 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7694 instead of strtoul to extract address from packet.
7695 (process_serial_event) <'z'>: Likewise.
7696
7697 2013-02-18 Yao Qi <yao@codesourcery.com>
7698
7699 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7700
7701 2013-02-14 Pedro Alves <palves@redhat.com>
7702
7703 Plug memory leak.
7704
7705 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7706 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7707
7708 2013-02-14 Pedro Alves <palves@redhat.com>
7709
7710 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7711
7712 2013-02-14 Pedro Alves <palves@redhat.com>
7713
7714 * tracepoint.c (save_string): Delete.
7715 (add_tracepoint_action): Use savestring instead of save_string.
7716
7717 2013-02-12 Pedro Alves <palves@redhat.com>
7718
7719 * linux-xtensa-low.c: Ditto.
7720 * xtensa-xtregs.c: Ditto.
7721
7722 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7723
7724 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7725 thread_db.
7726
7727 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7728
7729 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7730 aarch64_num_wp_regs and aarch64_num_bp_regs to
7731 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7732
7733 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7734
7735 * linux-aarch64-low.c (ps_get_thread_area): Replace
7736 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7737
7738 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7739 Marcus Shawcroft <marcus.shawcroft@arm.com>
7740 Nigel Stephens <nigel.stephens@arm.com>
7741 Yufeng Zhang <yufeng.zhang@arm.com>
7742
7743 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7744 (aarch64.c, aarch64-without-fpu.c): New targets.
7745 * configure.srv (aarch64*-*-linux*): New.
7746 * linux-aarch64-low.c: New file.
7747
7748 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7749
7750 * linux-low.c (handle_extended_wait, linux_create_inferior)
7751 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7752 (dequeue_one_deferred_signal, linux_resume_one_thread)
7753 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7754 (linux_tracefork_grandchild, linux_test_for_tracefork)
7755 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7756 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7757 where the argument is 0.
7758
7759 2013-01-25 Yao Qi <yao@codesourcery.com>
7760
7761 * event-loop.c: Include "queue.h".
7762 (gdb_event_p): New typedef.
7763 (struct gdb_event) <next_event>: Remove.
7764 (event_queue): Change to QUEUE(gdb_event_p).
7765 (async_queue_event): Remove.
7766 (gdb_event_xfree): New.
7767 (initialize_event_loop): New.
7768 (process_event): Use API from QUEUE.
7769 (wait_for_event): Likewise.
7770 * server.c (main): Call initialize_event_loop.
7771 * server.h (initialize_event_loop): Declare.
7772
7773 2013-01-18 Yao Qi <yao@codesourcery.com>
7774
7775 * ax.h (struct eval_agent_expr_context): New.
7776 (gdb_eval_agent_expr): Update declaration.
7777 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7778 TFRAME. Add new argument CTX.
7779 * server.h (struct eval_agent_expr_context): Declare.
7780 (agent_mem_read, agent_tsv_read): Update declaration.
7781 (agent_mem_read_string): Likewise.
7782 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7783 (add_traceframe_block): Add new argument TPOINT.
7784 Increase TPOINT->traceframe_usage.
7785 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7786 eval_tracepoint_agent_expr.
7787 (condition_true_at_tracepoint): Likewise.
7788 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7789 (agent_mem_read_string, agent_tsv_read): Likewise.
7790
7791 2013-01-16 Yao Qi <yao@codesourcery.com>
7792
7793 * linux-low.c (linux_resume_one_lwp): Don't check
7794 'lwp->bp_reinsert != 0'.
7795
7796 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7797 Pedro Alves <palves@redhat.com>
7798
7799 * lynx-low.c (ptrace_request_to_str): Define a temporary
7800 macro and use it to simplify this function's implementation.
7801
7802 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7803
7804 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7805 sets errno.
7806
7807 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7808
7809 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7810
7811 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7812
7813 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7814
7815 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7816
7817 * lynx-low.c (lynx_resume): Use the resume_info parameter
7818 to determine the ptid for the lynx_ptrace call, unless
7819 it is equal to minus_one_ptid, in which case we use the
7820 ptid of the current_inferior.
7821 (lynx_wait_1): After having received a thread create/exit
7822 event, resume the inferior's execution using the signaling
7823 thread's ptid, rather than the old ptid.
7824
7825 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7826
7827 * lynx-low.c (lynx_resume): Delete variable ret.
7828
7829 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7830
7831 * gdbreplay.c (gdbreplay_version): Update copyright year.
7832 * server.c (gdbserver_version): Likewise.
7833
7834 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7835
7836 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7837 new thread.
7838
7839 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7840
7841 * lynx-low.c (ptrace_request_to_str): Add handling for
7842 PTRACE_GETTRACESIG.
7843
7844 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7845
7846 * lynx-low.c (lynx_attach): Delete variable new_process.
7847
7848 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7849
7850 * lynx-low.c (lynx_create_inferior): Delete variable
7851 new_process.
7852
7853 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7854
7855 * lynx-low.c (ptrace_request_to_str): Do not handle
7856 PTRACE_GETTHREADLIST if this macro does not exist.
7857
7858 2012-12-15 Yao Qi <yao@codesourcery.com>
7859
7860 * Makefile.in (OBS): Add notif.o.
7861 * notif.c, notif.h: New.
7862 * server.c: Include "notif.h".
7863 (struct vstop_notif) <next>: Remove.
7864 <base>: New field.
7865 (queue_stop_reply): Update.
7866 (push_event, send_next_stop_reply): Remove.
7867 (discard_queued_stop_replies): Update.
7868 (notif_stop): New variable.
7869 (handle_v_stopped): Remove.
7870 (handle_v_requests): Don't call handle_v_stopped. Call
7871 handle_ack_notif instead.
7872 (queue_stop_reply_callback): Call notif_event_enque instead
7873 of queue_stop_reply.
7874 (handle_status): Don't call send_next_stop_reply, call
7875 notif_write_event instead.
7876 (kill_inferior_callback): Likewise.
7877 (detach_or_kill_inferior_callback): Likewise.
7878 (main): Call initialize_notif.
7879 (process_serial_event): Call QUEUE_is_empty.
7880 (handle_target_event): Call notif_push instead of push event.
7881 * server.h (push_event): Remove declaration.
7882
7883 2012-12-10 Tom Tromey <tromey@redhat.com>
7884
7885 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7886 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7887 macros.
7888 (.c.o): Rewrite.
7889 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7890 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7891 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7892 (amd64-linux-ipa.o, ax.o): Rewrite.
7893 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7894 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7895 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7896 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7897 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7898 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7899 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7900 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7901 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7902 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7903 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7904 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7905 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7906 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7907 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7908 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7909 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7910 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7911 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7912 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7913 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7914 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7915 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7916 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7917 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7918 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7919 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7920 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7921 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7922 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7923 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7924 (reg-tilegx.o): Remove.
7925 (all_object_files): New macro.
7926 Include .deps files.
7927 * aclocal.m4, configure: Rebuild.
7928 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7929 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7930 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7931
7932 2012-12-05 Tom Tromey <tromey@redhat.com>
7933
7934 PR gdb/14917:
7935 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7936
7937 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7938
7939 * configure.ac: Check for linux/perf_event.h.
7940 * config.in: Regenerated.
7941 * configure: Regenerated.
7942
7943 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7944
7945 * hostio.c (handle_readlink): Decrease buffer size
7946 parameter passed to readlink by one byte.
7947
7948 2012-11-26 Yao Qi <yao@codesourcery.com>
7949
7950 * configure.ac (build_warnings): Append '-Wempty-body'.
7951 * configure: Regenerated.
7952 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7953 body.
7954
7955 2012-11-15 Pierre Muller <muller@sourceware.org>
7956
7957 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7958 * config.in: Regenerate.
7959 * configure: Regenerate.
7960 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7961 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7962 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7963 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7964 header.
7965 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7966 instead of <sys/wait.h> header.
7967 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7968
7969 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7970
7971 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7972 (various make rules): Remove -DGDBSERVER
7973
7974 2012-11-09 Yao Qi <yao@codesourcery.com>
7975
7976 * spu-low.c (current_ptid): Move it to ..
7977 * gdbthread.h: ... here. New.
7978 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7979 * server.c (myresume, process_serial_event): Likewise.
7980 * thread-db.c (thread_db_find_new_threads): Likewise.
7981 * tracepoint.c (run_inferior_command): Likewise.
7982
7983 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7984
7985 * server.c (handle_search_memory_1): Include access length in
7986 warning message.
7987
7988 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7989
7990 * linux-crisv32-low.c: Fix compile errors.
7991
7992 2012-09-04 Yao Qi <yao@codesourcery.com>
7993
7994 * tracepoint.c (cmd_qtsv): Adjust debug message.
7995 Don't check CUR_TPOINT.
7996
7997 2012-08-28 Yao Qi <yao@codesourcery.com>
7998
7999 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8000 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8001 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8002 Remove declarations of xmalloc, xreallloc, xstrdup and
8003 freeargv.
8004 * Makefile.in (libiberty_h): New.
8005 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8006 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8007
8008 2012-08-23 Yao Qi <yao@codesourcery.com>
8009
8010 * server.h: Remove declaration of 'xsnprintf'.
8011
8012 2012-08-22 Keith Seitz <keiths@redhat.com>
8013
8014 * server.h: Include build-gnulib-gbserver/config.h.
8015 * gdbreplay.c: Likewise.
8016
8017 2012-08-08 Doug Evans <dje@google.com>
8018
8019 * Makefile.in (SFILES): Add gdb_vecs.c.
8020 (OBS): Add gdb_vecs.o.
8021 (gdb_vecs_h, host_defs_h): New variables.
8022 (thread-db.o): Add $(gdb_vecs_h) dependency.
8023 (gdb_vecs.o): New rule.
8024 * thread-db.c: #include "gdb_vecs.h".
8025 (thread_db_load_search): Use a vector to iterate over path elements.
8026 Handle text appearing after "$pdir".
8027
8028 * configure.ac: Add check for strstr.
8029 * config.in: Regenerate.
8030 * configure: Regenerate.
8031
8032 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8033
8034 * hostio.c (handle_pread): If pread fails, fall back to attempting
8035 lseek/read.
8036 (handle_pwrite): Likewise for pwrite.
8037
8038 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8039
8040 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8041 between unsupported TYPE and unimplementable ADDR/LEN combination.
8042 (arm_insert_point): Act on new return value.
8043
8044 2012-07-31 Pedro Alves <palves@redhat.com>
8045
8046 * server.c (process_point_options): Only skip tokens if we find
8047 one that is unrecognized. Don't treat 'X' specially while
8048 skipping unrecognized tokens.
8049
8050 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8051
8052 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8053 to 4-byte-align HW breakpoint addresses for Thumb.
8054
8055 2012-07-27 Yao Qi <yao@codesourcery.com>
8056
8057 PR remote/14161.
8058
8059 * server.h: Declare gdb_agent_about_to_close.
8060 * target.c (kill_inferior): Include "agent.h".
8061 New. Send command 'kill'.
8062 * target.h (kill_inferior): Removed macro.
8063 * tracepoint.c (gdb_agent_about_to_close): New.
8064 (gdb_agent_helper_thread): Handle command 'close'.
8065 Wait endlessly until the inferior stops.
8066 Install gdb_agent_remove_socket to atexit hook.
8067 (agent_socket_name): New static variable.
8068 (gdb_agent_socket_init): Replace local variable 'name' with
8069 'agent_socket_name'.
8070 (gdb_agent_remove_socket): New.
8071
8072 2012-07-27 Yao Qi <yao@codesourcery.com>
8073
8074 * server.c (process_point_options): Stop at 'X' when parsing.
8075
8076 2012-07-19 Michael Eager <eager@eagercon.com>
8077
8078 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8079 to hw_execute.
8080 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8081 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8082 hardware breakpoint.
8083
8084 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8085
8086 * gdbserver/linux-low.c (initialize_low): Call
8087 linux_ptrace_init_warnings.
8088
8089 2012-07-02 Doug Evans <dje@google.com>
8090
8091 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8092 pointer to int.
8093
8094 2012-07-02 Stan Shebs <stan@codesourcery.com>
8095
8096 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8097 (ax.o): Add it to build rule.
8098 (ax-ipa.o): Ditto.
8099 (OBS): Add format.o.
8100 (IPA_OBS): Add format.o.
8101 * server.c (handle_query): Claim support for breakpoint commands.
8102 (process_point_options): Add command case.
8103 (process_serial_event): Leave running if there are printfs in
8104 effect.
8105 * mem-break.h (any_persistent_commands): Declare.
8106 (add_breakpoint_commands): Declare.
8107 (gdb_no_commands_at_breakpoint): Declare.
8108 (run_breakpoint_commands): Declare.
8109 * mem-break.c (struct point_command_list): New struct.
8110 (struct breakpoint): New field command_list.
8111 (any_persistent_commands): New function.
8112 (add_commands_to_breakpoint): New function.
8113 (add_breakpoint_commands): New function.
8114 (gdb_no_commands_at_breakpoint): New function.
8115 (run_breakpoint_commands): New function.
8116 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8117 locally.
8118 * ax.c: Include format.h.
8119 (ax_printf): New function.
8120 (gdb_eval_agent_expr): Add printf opcode.
8121
8122 2012-06-13 Yao Qi <yao@codesourcery.com>
8123
8124 * server.c (start_inferior): Remove duplicated writes to fields
8125 'last_resume_kind' and 'last_status' of 'current_inferior'.
8126
8127 2012-06-12 Yao Qi <yao@codesourcery.com>
8128 Pedro Alves <palves@redhat.com>
8129
8130 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8131 comment.
8132 * server.c (handle_v_cont): Extend comment.
8133
8134 2012-06-11 Yao Qi <yao@codesourcery.com>
8135
8136 * linux-low.c (linux_attach): Add 'static'.
8137
8138 2012-06-06 Yao Qi <yao@codesourcery.com>
8139
8140 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8141
8142 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8143
8144 Fix gcc -flto compilation warning.
8145 * server.c (main): Make variable multi_mode and attach volatile.
8146
8147 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8148
8149 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8150 if the platform doesn't know about it.
8151
8152 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8153
8154 * Makefile.in (SFILES): Add linux-tile-low.c.
8155 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8156 * configure.srv: Handle tilegx-*-linux*.
8157 * linux-tile-low.c: New file.
8158
8159 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8160
8161 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8162
8163 2012-05-24 Pedro Alves <palves@redhat.com>
8164
8165 PR gdb/7205
8166
8167 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8168
8169 2012-05-24 Pedro Alves <palves@redhat.com>
8170
8171 PR gdb/7205
8172
8173 Replace target_signal with gdb_signal throughout.
8174
8175 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8176
8177 * linux-low.c (linux_store_registers): Avoid the copying sequence
8178 when no data has been retrieved by ptrace.
8179
8180 2012-05-22 Will Deacon <will.deacon@arm.com>
8181
8182 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8183 Include asm/ptrace.h.
8184 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8185 already defined.
8186
8187 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8188
8189 * linux-low.c (linux_store_registers): Don't re-retrieve data
8190 with ptrace that has already been obtained from /proc. Always
8191 copy any data retrieved with ptrace to the buffer supplied.
8192
8193 2012-05-11 Yao Qi <yao@codesourcery.com>
8194 Pedro Alves <palves@redhat.com>
8195
8196 * linux-low.c (enum stopping_threads_kind): New.
8197 (stopping_threads): Change type to `enum stopping_threads_kind'.
8198 (handle_extended_wait): If stopping and suspending threads, leave
8199 the new_lwp suspended too.
8200 (linux_wait_for_event): Adjust.
8201 (stop_all_lwps): Set `stopping_threads' to
8202 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8203 whether we're suspending threads or just stopping them. Assert no
8204 recursion happens.
8205
8206 2012-04-29 Yao Qi <yao@codesourcery.com>
8207
8208 * server.h: Move some code to ...
8209 * gdbthread.h: ... here. New.
8210 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8211 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8212 (nto-low.o, win32-low.o): Likewise.
8213 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8214 * regcache.c, remote-utils.c, server.c: Likewise.
8215 * target.c, tracepoint.c, win32-low.c: Likewise.
8216
8217 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8218
8219 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8220 (PTRACE_ARG4_TYPE): Likewise.
8221 (PTRACE_XFER_TYPE): Likewise.
8222 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8223 ptrace to PTRACE_ARG3_TYPE.
8224 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8225 (PTRACE_ARG4_TYPE): Likewise.
8226 (PTRACE_XFER_TYPE): Likewise.
8227 (linux_detach_one_lwp): Cast fourth argument of
8228 ptrace to long then PTRACE_ARG4_TYPE.
8229 (regsets_fetch_inferior_registers): Cast third argument of
8230 ptrace to long then PTRACE_ARG3_TYPE.
8231 (regsets_store_inferior_registers): Likewise.
8232
8233 2012-04-20 Pedro Alves <palves@redhat.com>
8234
8235 * configure: Regenerate.
8236
8237 2012-04-19 Pedro Alves <palves@redhat.com>
8238
8239 * Makefile.in (GNULIB_BUILDDIR): New.
8240 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8241 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8242 (all, install-only, uninstall, clean-info, all-lib, clean): No
8243 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8244 (maintainer-clean realclean distclean): Use subdir_do.
8245 (subdir_do): New.
8246 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8247 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8248 * acinclude.m4: Include acx_configure_dir.m4.
8249 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8250 calls. Call AC_PROG_RANLIB. Configure gnulib using
8251 ACX_CONFIGURE_DIR.
8252 (GNULIB): New.
8253 (GNULIB_STDINT_H): Adjust.
8254 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8255 * gdbreplay.c: Include build-gnulib/config.h.
8256 * server.h: Likewise.
8257 * aclocal.m4: Regenerate.
8258 * config.in: Regenerate.
8259 * configure: Regenerate.
8260
8261 2012-04-19 Pedro Alves <palves@redhat.com>
8262
8263 * Makefile.in (LIBGNU, INCGNU): Adjust.
8264 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8265 (all, install-only, uninstall, clean-info, all-lib, clean)
8266 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8267 * configure.ac: Adjust AC_OUTPUT output.
8268 * aclocal.m4: Regenerate.
8269 * configure: Regenerate.
8270
8271 2012-04-19 Pedro Alves <palves@redhat.com>
8272
8273 * Makefile.in (generated_files): New.
8274 (server_h): Remove the explicit dependency on config.h, and depend
8275 on $generated_files.
8276
8277 2012-04-19 Pedro Alves <palves@redhat.com>
8278
8279 * Makefile.in (INCGNU): Add -Ignulib.
8280
8281 2012-04-19 Pedro Alves <palves@redhat.com>
8282
8283 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8284 (INCGNU): ... this, and spell out -I here.
8285 (GNULIB_LIB): Rename to ...
8286 (LIBGNU): ... this.
8287 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8288
8289 2012-04-19 Pedro Alves <palves@redhat.com>
8290
8291 * config.in: Regenerate.
8292
8293 2012-04-19 Pedro Alves <palves@redhat.com>
8294
8295 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8296 * server.h (memmem): Remove declaration.
8297 * config.in: Regenerate.
8298 * configure: Regenerate.
8299
8300 2012-04-19 Yao Qi <yao@codesourcery.com>
8301
8302 * Makefile.in (SFILES): Add common/vec.c.
8303 (OBS): Add vec.o.
8304 (vec.o): New rule.
8305
8306 2012-04-19 Yao Qi <yao@codesourcery.com>
8307
8308 * remote-utils.c (prepare_resume_reply): Replace with macro
8309 target_core_of_thread.
8310 * server.c (handle_qxfer_threads_proper): Likewise.
8311 * target.h (traget_core_of_thread): New macro.
8312
8313 2012-04-18 Pedro Alves <palves@redhat.com>
8314
8315 * aclocal.m4: Regenerate.
8316 * configure: Regenerate.
8317
8318 2012-04-16 Yao Qi <yao@codesourcery.com>
8319
8320 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8321 duplicated on address.
8322
8323 2012-04-16 Yao Qi <yao@codesourcery.com>
8324
8325 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8326 (struct tracepoint_action_ops) <send>: New field.
8327 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8328 (agent_expr_send, x_tracepoint_action_send): New.
8329 (l_tracepoint_action_send): New.
8330 (cmd_qtdp): Download and install tracepoint
8331 according to `use_agent'.
8332 (run_inferior_command): Add one more parameter `len'.
8333 Update callers.
8334 (tracepoint_send_agent): New.
8335 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8336
8337 2012-04-16 Yao Qi <yao@codesourcery.com>
8338
8339 * tracepoint.c (download_tracepoints): Moved to ...
8340 (cmd_qtstart): ... here.
8341
8342 2012-04-14 Yao Qi <yao@codesourcery.com>
8343
8344 * tracepoint.c: Include inttypes.h.
8345 (struct collect_memory_action): Use sized types.
8346 (struct tracepoint): Likewise.
8347 (cmd_qtdp, stop_tracing): Update print specifiers.
8348 (cmd_qtp, response_tracepoint): Likewise.
8349 (collect_data_at_tracepoint): Likewise.
8350 (collect_data_at_step): Likewise.
8351
8352 2012-04-14 Yao Qi <yao@codesourcery.com>
8353
8354 Import gnulib module inttypes.
8355 * aclocal.m4, config.in, configure: Regenerated.
8356
8357 2012-04-14 Yao Qi <yao@codesourcery.com>
8358
8359 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8360 Makefile and config.status at last.
8361
8362 2012-04-13 Yao Qi <yao@codesourcery.com>
8363
8364 * tracepoint.c: Include stdint.h unconditionally.
8365
8366 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8367
8368 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8369 on BFD_HAVE_SYS_PROCFS_TYPE.
8370 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8371 * configure: Regenerate.
8372 * config.in: Likewise.
8373
8374 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8375
8376 * Makefile.in (clean): Also remove x32.c x32-linux.c
8377 x32-avx.c x32-avx-linux.c.
8378 (x32.o): New target.
8379 (x32.c): Likewise.
8380 (x32-linux.o): Likewise.
8381 (x32-linux.c): Likewise.
8382 (x32-avx.o): Likewise.
8383 (x32-avx.c): Likewise.
8384 (x32-avx-linux.o): Likewise.
8385 (x32-avx-linux.c): Likewise.
8386
8387 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8388 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8389 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8390 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8391 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8392 i386/x32-avx-linux.xml.
8393
8394 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8395 (init_registers_x32_avx_linux): Likwise.
8396 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8397 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8398
8399 2012-04-13 Pedro Alves <palves@redhat.com>
8400
8401 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8402 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8403 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8404 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8405 the sub-make.
8406
8407 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8408
8409 * linux-x86-low.c (compat_x32_clock_t): New.
8410 (compat_x32_siginfo_t): Likewise.
8411 (compat_x32_siginfo_from_siginfo): Likewise.
8412 (siginfo_from_compat_x32_siginfo): Likewise.
8413 (linux_is_elf64): Likewise.
8414 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8415 and siginfo_from_compat_x32_siginfo for x32.
8416 (x86_arch_setup): Set linux_is_elf64.
8417
8418 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8419
8420 PR gdb/13969
8421 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8422 e_machine field.
8423 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8424 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8425 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8426 compatible with process.
8427
8428 2012-04-12 Yao Qi <yao@codesourcery.com>
8429
8430 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8431 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8432 (install-only, install-info, clean): Handle sub dir gnulib.
8433 (all-lib, am--refresh): New targets.
8434 (memmem.o): Remove target.
8435 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8436 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8437 (AC_REPLACE_FUNCS): Remove memmem.
8438 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8439 (AC_OUTPUT): Generate Makefile in gnulib/.
8440 * aclocal.m4, config.in, configure: Regenerated.
8441
8442 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8443
8444 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8445
8446 2012-04-05 Pedro Alves <palves@redhat.com>
8447
8448 -Werror=strict-aliasing
8449
8450 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8451 pointer.
8452
8453 2012-04-04 Pedro Alves <palves@redhat.com>
8454
8455 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8456 (sparc_store_gregset_from_stack, sparc_store_gregset)
8457 (sparc_breakpoint_at): Fix formatting.
8458
8459 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8460
8461 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8462 are available.
8463 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8464 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8465 * config.in: Regenerate.
8466 * configure: Likewise.
8467
8468 2012-03-29 Pedro Alves <palves@redhat.com>
8469
8470 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8471 Correct ptrace arguments.
8472
8473 2012-03-28 Pedro Alves <palves@redhat.com>
8474
8475 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8476 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8477 (IA64_FR1_REGNUM): New defines.
8478 (ia64_fetch_register): New.
8479 (the_low_target): Install it.
8480 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8481 field.
8482 * linux-low.c (linux_fetch_registers): Try the
8483 the_low_target.fetch_register hook first.
8484
8485 * linux-arm-low.c (the_low_target): Adjust.
8486 * linux-bfin-low.c (the_low_target): Adjust.
8487 * linux-cris-low.c (the_low_target): Adjust.
8488 * linux-crisv32-low.c (the_low_target): Adjust.
8489 * linux-m32r-low.c (the_low_target): Adjust.
8490 * linux-m68k-low.c (the_low_target): Adjust.
8491 * linux-mips-low.c (the_low_target): Adjust.
8492 * linux-ppc-low.c (the_low_target): Adjust.
8493 * linux-s390-low.c (the_low_target): Adjust.
8494 * linux-sh-low.c (the_low_target): Adjust.
8495 * linux-sparc-low.c (the_low_target): Adjust.
8496 * linux-tic6x-low.c (the_low_target): Adjust.
8497 * linux-x86-low.c (the_low_target): Adjust.
8498 * linux-xtensa-low.c (the_low_target): Adjust.
8499
8500 2012-03-26 Pedro Alves <palves@redhat.com>
8501
8502 * server.c (handle_qxfer_libraries): Don't bail early if
8503 the_target->qxfer_libraries_svr4 is not NULL.
8504
8505 2012-03-26 Pedro Alves <palves@redhat.com>
8506
8507 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8508
8509 2012-03-23 Pedro Alves <palves@redhat.com>
8510
8511 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8512 "library-list-svr4" element's start tag when the the DSO list is
8513 empty.
8514
8515 2012-03-23 Pedro Alves <palves@redhat.com>
8516
8517 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8518 a variable whose type size is the same as the inferior's pointer
8519 size.
8520
8521 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8522
8523 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8524 struct siginfo.
8525 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8526 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8527 * linux-low.h: Include <signal.h>.
8528 (struct siginfo): Remove forward declaration.
8529 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8530 struct siginfo.
8531
8532 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8533
8534 * .gitignore: Ignore more files.
8535
8536 2012-03-19 Pedro Alves <palves@redhat.com>
8537 Jan Kratochvil <jan.kratochvil@redhat.com>
8538
8539 * server.c (cont_thread, general_thread): Add describing comments.
8540 (start_inferior): Clear `cont_thread'.
8541 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8542 of a process.
8543
8544 2012-03-15 Yao Qi <yao@codesourcery.com>
8545
8546 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8547 handling to ...
8548 (cmd_qtdp): ... here.
8549
8550 2012-03-15 Yao Qi <yao@codesourcery.com>
8551
8552 * tracepoint.c (struct tracepoint_action_ops): New.
8553 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8554 (m_tracepoint_action_download): New.
8555 (r_tracepoint_action_download): New.
8556 (x_tracepoint_action_download): New.
8557 (l_tracepoint_action_download): New.
8558 (add_tracepoint_action): Install `action->ops' according type.
8559 (download_tracepoint_1): Move code `download' function pointer
8560 of various tracepoint_action_ops.
8561
8562 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8563
8564 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8565 linux_ptrace_attach_warnings.
8566
8567 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8568
8569 * Makefile.in (linux-ptrace.o): New.
8570 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8571 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8572 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8573 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8574 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8575 of these targets.
8576 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8577
8578 2012-03-08 Yao Qi <yao@codesourcery.com>
8579 Pedro Alves <palves@redhat.com>
8580
8581 Fix PR server/13392.
8582 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8583 offset of JMP insn.
8584 * tracepoint.c (remove_tracepoint): New.
8585 (cmd_qtdp): Call remove_tracepoint when failed to install.
8586
8587 2012-03-07 Pedro Alves <palves@redhat.com>
8588
8589 * linux-low.c (get_detach_signal): New.
8590 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8591 Pass on pending signals to PTRACE_DETACH. Check the result of the
8592 ptrace call.
8593 * server.c (program_signals, program_signals_p): New.
8594 (handle_general_set): Handle QProgramSignals.
8595 * server.h (program_signals, program_signals_p): Declare.
8596
8597 2012-03-05 Pedro Alves <palves@redhat.com>
8598 Jan Kratochvil <jan.kratochvil@redhat.com>
8599
8600 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8601 New comment why.
8602
8603 2012-03-03 Yao Qi <yao@codesourcery.com>
8604
8605 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8606 agent_look_up_symbols.
8607
8608 2012-03-03 Yao Qi <yao@codesourcery.com>
8609
8610 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8611 (linux-x86-low.o): Likewise.
8612 * server.h: Remove in_process_agent_loaded.
8613 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8614 common/agent.c.
8615 Update callers.
8616
8617 2012-03-03 Yao Qi <yao@codesourcery.com>
8618
8619 * tracepoint.c (gdb_agent_capability): New global.
8620 (in_process_agent_loaded_ust): Renamed to
8621 `in_process_agent_supports_ust'.
8622 Update callers.
8623 (in_process_agent_supports_ust): Call agent_capability_check.
8624 (clear_installed_tracepoints): Assert that agent supports
8625 agent.
8626
8627 2012-03-03 Yao Qi <yao@codesourcery.com>
8628
8629 * linux-low.c (linux_supports_agent): New.
8630 (linux_target_ops): Initialize field `supports_agent' with
8631 linux_supports_agent.
8632 * target.h (struct target_ops) <supports_agent>: New.
8633 (target_supports_agent): New macro.
8634 * server.c (handle_general_set): Handle packet 'QAgent'.
8635 (handle_query): Send `QAgent+'.
8636 * Makefile.in (server.o): Depends on agent.h.
8637
8638 2012-03-03 Yao Qi <yao@codesourcery.com>
8639
8640 * Makefile.in (OBS): Add agent.o.
8641 Add new rule for agent.o.
8642 Track dependence of tracepoint.c on agent.h.
8643 * tracepoint.c (run_inferior_command_1):
8644 (run_inferior_command): Call agent_run_command.
8645 (gdb_ust_connect_sync_socket): Deleted. Move it to
8646 common/agent.c.
8647 (resume_thread, stop_thread): Likewise.
8648 (gdb_ust_socket_init): Renamed to ...
8649 (gdb_agent_socket_init): ... New.
8650 (gdb_ust_thread): Renamed to ...
8651 (gdb_agent_helper_thread): ... New.
8652 (gdb_ust_init): Move some code to ...
8653 (gdb_agent_init): ... here. New.
8654 [HAVE_UST]: Call gdb_ust_init.
8655 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8656 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8657 * config.in, configure: Regenerated.
8658
8659 2012-03-02 Pedro Alves <palves@redhat.com>
8660
8661 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8662 * linux-low.c (struct simple_pid_list): New.
8663 (stopped_pids): New a struct simple_pid_list pointer.
8664 (add_to_pid_list, pull_pid_from_list): New.
8665 (handle_extended_wait): Don't assume the first signal new children
8666 report is SIGSTOP. Adjust call to pull_pid_from_list.
8667 (linux_wait_for_lwp): Adjust.
8668
8669 2012-03-02 Yao Qi <yao@codesourcery.com>
8670
8671 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8672 debug log.
8673
8674 2012-03-02 Yao Qi <yao@codesourcery.com>
8675
8676 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8677 `stop_pc' and `tpoint'. Update caller.
8678
8679 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8680
8681 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8682 * linux-low.c (use_linux_regsets): New macro.
8683 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8684 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8685 (linux_register_in_regsets): New function.
8686 (usr_fetch_inferior_registers): Skip registers covered by
8687 regsets.
8688 (usr_store_inferior_registers): Likewise.
8689 (usr_fetch_inferior_registers): New macro.
8690 (usr_store_inferior_registers): Likewise.
8691 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8692 (linux_store_registers): Likewise.
8693 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8694 prototype.
8695 (init_registers_mips64_dsp_linux): Likewise.
8696 (init_registers_mips_linux): New macro.
8697 (init_registers_mips_dsp_linux): Likewise.
8698 (mips_dsp_num_regs): Likewise.
8699 (DSP_BASE, DSP_CONTROL): New fallback macros.
8700 (mips_base_regs): New macro.
8701 (mips_regmap): Use it. Fix the size.
8702 (mips_dsp_regmap): New variable.
8703 (mips_dsp_regset_bitmap): Likewise.
8704 (mips_arch_setup): New function.
8705 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8706 than mips_regmap.
8707 (mips_cannot_store_register): Likewise.
8708 (the_low_target): Update .arch_setup, .num_regs and .regmap
8709 initializers. Add .regset_bitmap initializer.
8710 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8711 initializer.
8712 * linux-bfin-low.c (the_low_target): Likewise.
8713 * linux-cris-low.c (the_low_target): Likewise.
8714 * linux-crisv32-low.c (the_low_target): Likewise.
8715 * linux-ia64-low.c (the_low_target): Likewise.
8716 * linux-m32r-low.c (the_low_target): Likewise.
8717 * linux-m68k-low.c (the_low_target): Likewise.
8718 * linux-ppc-low.c (the_low_target): Likewise.
8719 * linux-s390-low.c (the_low_target): Likewise.
8720 * linux-sh-low.c (the_low_target): Likewise.
8721 * linux-sparc-low.c (the_low_target): Likewise.
8722 * linux-tic6x-low.c (the_low_target): Likewise.
8723 * linux-x86-low.c (the_low_target): Likewise.
8724 * linux-xtensa-low.c (the_low_target): Likewise.
8725 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8726 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8727 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8728 srv_xmlfiles.
8729 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8730 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8731
8732 2012-02-29 Yao Qi <yao@codesourcery.com>
8733 Pedro Alves <palves@redhat.com>
8734
8735 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8736 `step_over_finished' is true.
8737
8738 2012-02-27 Pedro Alves <palves@redhat.com>
8739
8740 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8741 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8742
8743 2012-02-27 Pedro Alves <palves@redhat.com>
8744
8745 PR server/9684
8746 * linux-low.c (pid_is_stopped): New.
8747 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8748
8749 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8750
8751 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8752 of conditions.
8753
8754 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8755
8756 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8757
8758 2012-02-24 Luis Machado <lgustavo@codesourcery>
8759
8760 * server.c (handle_query): Advertise support for target-side
8761 breakpoint condition evaluation.
8762 (process_point_options): New function.
8763 (process_serial_event): When inserting a breakpoint, check for
8764 a target-side condition that should be evaluated.
8765
8766 * mem-break.c: Include regcache.h and ax.h.
8767 (point_cond_list_t): New data structure.
8768 (breakpoint) <cond_list>: New field.
8769 (find_gdb_breakpoint_at): Make non-static.
8770 (delete_gdb_breakpoint_at): Clear any target-side
8771 conditions.
8772 (clear_gdb_breakpoint_conditions): New function.
8773 (add_condition_to_breakpoint): Likewise.
8774 (add_breakpoint_condition): Likewise.
8775 (gdb_condition_true_at_breakpoint): Likewise.
8776 (gdb_breakpoint_here): Return result directly instead
8777 of going through a local variable.
8778
8779 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8780 (clear_gdb_breakpoint_conditions): Likewise.
8781 (add_breakpoint_condition): Likewise.
8782 (gdb_condition_true_at_breakpoint): Likewise.
8783
8784 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8785 (need_step_over_p): Take target-side breakpoint condition into
8786 consideration.
8787
8788 2012-02-24 Luis Machado <lgustavo@codesourcery>
8789
8790 * server.h: Include tracepoint.h.
8791 (agent_mem_read, agent_get_trace_state_variable_value,
8792 agent_set_trace_state_variable_value,
8793 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8794 get_set_tsv_func_addr): New prototypes.
8795
8796 * ax.h: New include file.
8797 * ax.c: New source file.
8798
8799 * tracepoint.c: Include ax.h.
8800 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8801 agent_expr, eval_result_type): Move to ax.h.
8802 (parse_agent_expr): Rename to ...
8803 (gdb_parse_agent_expr): ... this, make it non-static and move
8804 to ax.h.
8805 (unparse_agent_expr) Rename to ...
8806 (gdb_unparse_agent_expr): ... this, make it non-static and move
8807 to ax.h.
8808 (eval_agent_expr): Rename to ...
8809 (eval_tracepoint_agent_expr): ... this.
8810 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8811 forward declarations.
8812 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8813 (agent_get_trace_state_variable_value): New function.
8814 (agent_set_trace_state_variable_value): New function.
8815 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8816 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8817 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8818 (condition_true_at_tracepoint): Likewise.
8819 (parse_agent_expr): Rename to ...
8820 (gdb_parse_agent_expr): ... this and move to ax.c.
8821 (unparse_agent_expr): Rename to ...
8822 (gdb_unparse_agent_expr): ... this and move to ax.c.
8823 (gdb_agent_op_name): Move to ax.c.
8824 (eval_agent_expr): Rename to ...
8825 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8826 and move to ax.c.
8827 (eval_tracepoint_agent_expr): New function.
8828 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8829 non-static.
8830 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8831 ax.c.
8832 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8833 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8834 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8835 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8836 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8837 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8838 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8839 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8840 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8841 (compile_bytecodes): Remove forward declaration.
8842 (is_goto_target): Move to ax.c.
8843 (compile_bytecodes): Move to ax.c and call
8844 agent_get_trace_state_variable_value (...) and
8845 agent_set_trace_state_variable_value (...).
8846
8847 * Makefile.in: Update ax.c and IPA dependencies.
8848
8849 2012-02-24 Pedro Alves <palves@redhat.com>
8850
8851 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8852 (cmd_bigqtbuffer_circular): ... this. Only handle
8853 'QTBuffer:circular:'.
8854 (handle_tracepoint_general_set): Adjust.
8855
8856 2012-02-16 Yao Qi <yao@codesourcery.com>
8857
8858 * inferiors.c: Move code to ...
8859 * dll.c: .... here. New.
8860 * server.h: Declare clear_dlls.
8861 * Makefile.in (SFILES): Add dll.c.
8862 (OBS): Add dll.o
8863 (dll.o): New rule.
8864
8865 2012-02-11 Yao Qi <yao@codesourcery.com>
8866
8867 * server.c: (handle_monitor_command): Add a new parameter
8868 `own_buf'.
8869 (handle_query): Update caller.
8870
8871 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8872
8873 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8874 * configure, config.in: Regenerate.
8875 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8876 is not defined.
8877
8878 2012-02-02 Pedro Alves <palves@redhat.com>
8879
8880 Try SIGKILL first, then PTRACE_KILL.
8881 * linux-low.c (linux_kill_one_lwp): New.
8882 (linux_kill_one_lwp): Rename to ...
8883 (kill_one_lwp_callback): ... this. Use the new
8884 linux_kill_one_lwp.
8885
8886 2012-02-02 Pedro Alves <palves@redhat.com>
8887
8888 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8889 inferior.
8890
8891 2012-01-27 Pedro Alves <palves@redhat.com>
8892
8893 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8894 (elf_64_file_p): Make static.
8895 (linux_pid_exe_is_elf_64_file): New.
8896 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8897 Delete declarations.
8898 (linux_pid_exe_is_elf_64_file): Declare.
8899 * linux-x86-low.c (x86_arch_setup): Use
8900 linux_pid_exe_is_elf_64_file.
8901
8902 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8903
8904 * linux-low.c (linux_wait_for_event_1): Rename to ...
8905 (linux_wait_for_event): ... here and merge it with former
8906 linux_wait_for_event - new variable wait_ptid, use it.
8907 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8908
8909 2012-01-23 Pedro Alves <palves@redhat.com>
8910
8911 * server.c (main): Avoid yet another case of infinite loop while
8912 detaching/killing after a longjmp.
8913
8914 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8915
8916 Code cleanup.
8917 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8918
8919 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8920
8921 * hostio.c (handle_readlink): New function.
8922 (handle_vFile): Call it to handle "vFile:readlink" packets.
8923
8924 2012-01-20 Pedro Alves <palves@redhat.com>
8925 Ulrich Weigand <ulrich.weigand@linaro.org>
8926
8927 * server.c (handle_v_requests): Only support vAttach and vRun to
8928 start multiple processes when in extended protocol mode.
8929
8930 2012-01-17 Pedro Alves <palves@redhat.com>
8931
8932 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8933 memalign plus mprotect to allocate the scratch buffer.
8934
8935 2012-01-13 Pedro Alves <palves@redhat.com>
8936
8937 * server.c (attach_inferior): Clear `cont_thread'.
8938
8939 2012-01-13 Pedro Alves <palves@redhat.com>
8940
8941 * server.c (main): Avoid infinite loop while detaching/killing
8942 after a longjmp.
8943
8944 2012-01-09 Doug Evans <dje@google.com>
8945
8946 * server.c (start_inferior): Set last_ptid in --wrapper case.
8947
8948 2012-01-06 Yao Qi <yao@codesourcery.com>
8949
8950 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8951 defined.
8952 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8953
8954 2012-01-04 Yao Qi <yao@codesourcery.com>
8955
8956 * tracepoint.c (cmd_qtdp): Print debug message
8957 for static tracepoint.
8958
8959 2012-01-04 Yao Qi <yao@codesourcery.com>
8960
8961 * tracepoint.c (trace_vdebug): Differentiate debug message
8962 between gdbserver and IPA.
8963
8964 2012-01-03 Yao Qi <yao@codesourcery.com>
8965
8966 * tracepoint.c (tracepoint_was_hit): Don't collect for
8967 static tracepoint.
8968
8969 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8970
8971 * terminal.h: Reformat copyright header.
8972
8973 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8974
8975 * server.c (gdbserver_version): Update copyright year.
8976 * gdbreplay.c (gdbreplay_version): Likewise.
8977
8978 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8979
8980 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8981
8982 Revert:
8983 2011-12-18 Hui Zhu <teawater@gmail.com>
8984 * linux-low.c (linux_create_inferior): Save return value to ret.
8985
8986 2011-12-18 Hui Zhu <teawater@gmail.com>
8987
8988 * linux-low.c (linux_create_inferior): Save return value to ret.
8989
8990 2011-12-16 Doug Evans <dje@google.com>
8991
8992 * linux-low.c (linux_create_inferior): If stdio connection,
8993 redirect stdin from /dev/null, stdout to stderr.
8994 * remote-utils.c (remote_is_stdio): New static global.
8995 (remote_connection_is_stdio): New function.
8996 (remote_prepare): Handle stdio connection.
8997 (remote_open): Ditto.
8998 (remote_close): Don't close stdin for stdio connections.
8999 (read_prim,write_prim): New functions. Replace all calls to
9000 read/write to these.
9001 * server.c (main): Watch for "-" argument. Move call to
9002 remote_prepare before start_inferior.
9003 * server.h (STDIO_CONNECTION_NAME): New macro.
9004 (remote_connection_is_stdio): Declare.
9005
9006 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9007 in debugging output.
9008
9009 2011-12-15 Yao Qi <yao@codesourcery.com>
9010
9011 * tracepoint.c: Include sys/syscall.h.
9012 (gdb_ust_thread): Remove preprocessor conditional.
9013
9014 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9015
9016 * linux-low.c (linux_detach_one_lwp): Call
9017 the_low_target.prepare_to_resume before detaching.
9018
9019 2011-12-14 Yao Qi <yao@codesourcery.com>
9020
9021 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9022 of write.
9023
9024 2011-12-14 Yao Qi <yao@codesourcery.com>
9025
9026 * i386-low.c (i386_low_stopped_data_address): Initialize local
9027 variable `control'.
9028
9029 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9030
9031 PR remote/13492
9032
9033 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9034 DR_CONTROL unless necessary. Extend comments.
9035 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9036 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9037
9038 2011-12-13 Yao Qi <yao@codesourcery.com>
9039
9040 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9041 macros.
9042 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9043
9044 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9045
9046 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9047 Print new debug message for such case.
9048
9049 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9050
9051 Fix overlapping memcpy.
9052 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9053 the read_inferior_memory transfer.
9054 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9055 write_inferior_memory transfer.
9056 (set_fast_tracepoint_jump): New variable buf. Use it for the
9057 read_inferior_memory and write_inferior_memory transfers.
9058 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9059 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9060 Use it for the write_inferior_memory transfer.
9061 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9062 buffers.
9063
9064 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9065
9066 * linux-low.c (fetch_register, store_register): Make code
9067 consistent, fix formatting.
9068
9069 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9070
9071 * linux-low.c (usr_store_inferior_registers): Factor out code
9072 to handle individual registers into...
9073 (store_register): ... this new function.
9074
9075 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9076
9077 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9078 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9079 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9080 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9081 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9082 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9083 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9084 (srv_xmlfiles): Add new XML files.
9085
9086 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9087 and <sys/uio.h>.
9088 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9089 (init_registers_s390_linux32v1): Add prototype.
9090 (init_registers_s390_linux32v2): Likewise.
9091 (init_registers_s390_linux64v1): Likewise.
9092 (init_registers_s390_linux64v2): Likewise.
9093 (init_registers_s390x_linux64v1): Likewise.
9094 (init_registers_s390x_linux64v2): Likewise.
9095 (s390_num_regs): Increment to 52.
9096 (s390_regmap): Add orig_r2 register.
9097 (s390_num_regs_3264): Increment to 68.
9098 (s390_regmap_3264): Add orig_r2 register.
9099 (s390_collect_ptrace_register): Handle orig_r2 register.
9100 (s390_supply_ptrace_register): Likewise.
9101 (s390_fill_last_break): New function.
9102 (s390_store_last_break): Likewise.
9103 (s390_fill_system_call): New function.
9104 (s390_store_system_call): Likewise.
9105 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9106 register sets.
9107 (s390_check_regset): New function.
9108 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9109 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9110 Update target_regsets for available register sets.
9111
9112 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9113 Jan Kratochvil <jan.kratochvil@redhat.com>
9114
9115 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9116 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9117 New.
9118 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9119 * linux-low.h (struct process_info_private): New member r_debug.
9120 * server.c (handle_qxfer_libraries): Call
9121 the_target->qxfer_libraries_svr4.
9122 (handle_qxfer_libraries_svr4): New function.
9123 (qxfer_packets): New entry "libraries-svr4".
9124 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9125 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9126 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9127 PACKET_qXfer_libraries_svr4.
9128
9129 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9130
9131 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9132 PSW address/mask between 8-byte and 16-byte formats.
9133 (s390_supply_ptrace_register): Likewise.
9134 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9135 basic addressing mode bit.
9136
9137 2011-11-24 Stan Shebs <stan@codesourcery.com>
9138
9139 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9140
9141 2011-11-17 Stan Shebs <stan@codesourcery.com>
9142
9143 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9144 (tracing_start_time): New global.
9145 (tracing_stop_time): New global.
9146 (tracing_user_name): New global.
9147 (tracing_notes): New global.
9148 (tracing_stop_note): New global.
9149 (cmd_qtstart): Set traceframe_usage, start_time.
9150 (stop_tracing): Set stop_time.
9151 (cmd_qtstatus): Report additional status.
9152 (cmd_qtp): New function.
9153 (handle_tracepoint_query): Call it.
9154 (cmd_qtnotes): New function.
9155 (handle_tracepoint_general_set): Call it.
9156 (get_timestamp): Rename from tsv_get_timestamp.
9157
9158 2011-11-14 Stan Shebs <stan@codesourcery.com>
9159 Kwok Cheung Yeung <kcy@codesourcery.com>
9160
9161 * linux-x86-low.c (small_jump_insn): New.
9162 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9163 trampoline and error message, build a trampoline and issue a small
9164 jump instruction to it.
9165 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9166 trampoline and error message.
9167 (x86_get_min_fast_tracepoint_insn_len): New.
9168 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9169 * linux-low.h (struct linux_target_ops): Add arguments to
9170 install_fast_tracepoint_jump_pad operation, add new operation.
9171 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9172 arguments.
9173 (linux_get_min_fast_tracepoint_insn_len): New function.
9174 (linux_target_op): Add new operation.
9175 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9176 (gdb_trampoline_buffer_end): Ditto.
9177 (gdb_trampoline_buffer_error): Ditto.
9178 (struct ipa_sym_addresses): Add fields for new IPA variables.
9179 (symbol_list): Add entries for new IPA variables.
9180 (struct tracepoint): Add fields to hold the address range of the
9181 trampoline used by the tracepoint.
9182 (trampoline_buffer_head): New static variable.
9183 (trampoline_buffer_tail): Ditto.
9184 (claim_trampoline_space): New function.
9185 (have_fast_tracepoint_trampoline_buffer): New function.
9186 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9187 structure.
9188 (install_fast_tracepoint): Ditto, also add error buffer argument.
9189 (cmd_qtminftpilen): New function.
9190 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9191 (fast_tracepoint_from_trampoline_address): New function.
9192 (fast_tracepoint_collecting): Handle trampoline as part of jump
9193 pad space.
9194 (set_trampoline_buffer_space): New function.
9195 (initialize_tracepoint): Initialize new IPA variables.
9196 * target.h (struct target_ops): Add arguments to
9197 install_fast_tracepoint_jump_pad operation, add new
9198 get_min_fast_tracepoint_insn_len operation.
9199 (target_get_min_fast_tracepoint_insn_len): New.
9200 (install_fast_tracepoint_jump_pad): Add arguments.
9201 * server.h (IPA_BUFSIZ): Define.
9202 * linux-i386-ipa.c: Include extra header files.
9203 (initialize_fast_tracepoint_trampoline_buffer): New function.
9204 (initialize_low_tracepoint): Call it.
9205 * server.h (set_trampoline_buffer_space): Declare.
9206 (claim_trampoline_space): Ditto.
9207 (have_fast_tracepoint_trampoline_buffer): Ditto.
9208
9209 2011-11-14 Yao Qi <yao@codesourcery.com>
9210
9211 * server.c (handle_query): Handle InstallInTrace for qSupported.
9212 * tracepoint.c (add_tracepoint): Sort list.
9213 (install_tracepoint, download_tracepoint): New.
9214 (cmd_qtdp): Call them to install and download tracepoints.
9215 (sort_tracepoints): Removed.
9216 (cmd_qtstart): Update.
9217
9218 2011-11-14 Yao Qi <yao@codesourcery.com>
9219
9220 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9221 * mem-break.h: Declare.
9222 * tracepoint.c (cmd_qtstart): Move some code to ...
9223 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9224 New.
9225 (download_tracepoints): Move some code to ...
9226 (download_tracepoint_1): ... here. New.
9227
9228 2011-11-08 Yao Qi <yao@codesourcery.com>
9229
9230 * remote-utils.c (relocate_instruction): A comment fix.
9231
9232 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9233
9234 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9235 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9236 dr_status_mirror and dr_control_mirror from debug_reg_state.
9237 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9238 (i386_initial_stuff): Remove use of deleted globals.
9239 (i386_get_thread_context, i386_set_thread_context,
9240 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9241 from debug_reg_state.
9242
9243 2011-11-05 Yao Qi <yao@codesourcery.com>
9244
9245 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9246 address as TPOINT's.
9247
9248 2011-11-02 Stan Shebs <stan@codesourcery.com>
9249
9250 * tracepoint.c (agent_mem_read_string): New function.
9251 (eval_agent_expr): Call it for tracenz.
9252 * server.c (handle_query): Report support for tracenz.
9253
9254 2011-11-02 Yao Qi <yao@codesourcery.com>
9255
9256 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9257
9258 2011-11-02 Yao Qi <yao@codesourcery.com>
9259
9260 * target.h: Fix a typo in comment.
9261
9262 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9263
9264 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9265 clobber the breakpoints' shadows with fast tracepoint jumps.
9266 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9267 * target.c (write_inferior_memory): Also pass MYADDR down to
9268 check_mem_write.
9269
9270 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9271
9272 * configure.ac: Check support for personality routine.
9273 * configure: Regenerate.
9274 * config.in: Likewise.
9275 * linux-low.c: Include <sys/personality.h>.
9276 Define ADDR_NO_RANDOMIZE if necessary.
9277 (linux_create_inferior): Disable address space randomization when
9278 forking inferior, if requested.
9279 (linux_supports_disable_randomization): New function.
9280 (linux_target_ops): Install it.
9281 * server.h (disable_randomization): Declare.
9282 * server.c (disable_randomization): New global variable.
9283 (handle_general_set): Handle QDisableRandomization.
9284 (handle_query): Likewise for qSupported.
9285 (main): Support --disable-randomization and --no-disable-randomization
9286 command line arguments.
9287 * target.h (struct target_ops): Add supports_disable_randomization.
9288 (target_supports_disable_randomization): New macro.
9289
9290 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9291
9292 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9293 ifdef check.
9294 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9295 [!PT_GETDSBT] (target_loadmap): New definition.
9296 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9297 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9298 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9299 and PT_GETDSBT to LINUX_LOADMAP.
9300 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9301 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9302
9303 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9304
9305 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9306 (arm_linux_hwbp_cap): New static variable.
9307 (arm_linux_get_hwbp_cap): Replace by ...
9308 (arm_linux_init_hwbp_cap): ... this new function.
9309 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9310 (arm_linux_get_hw_watchpoint_count): Likewise.
9311 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9312 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9313 (arm_prepare_to_resume): Use perror_with_name instead of error.
9314
9315 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9316
9317 * linux-arm-low.c: Include <signal.h>.
9318 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9319 (struct arm_linux_hwbp_cap): New data type.
9320 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9321 (struct arm_linux_hw_breakpoint): New data type.
9322 (MAX_BPTS, MAX_WPTS): Define.
9323 (struct arch_process_info, struct arch_lwp_info): New data types.
9324 (arm_linux_get_hwbp_cap): New function.
9325 (arm_linux_get_hw_breakpoint_count): Likewise.
9326 (arm_linux_get_hw_watchpoint_count): Likewise.
9327 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9328 (arm_hwbp_control_initialize): Likewise.
9329 (arm_hwbp_control_is_enabled): Likewise.
9330 (arm_hwbp_control_is_initialized): Likewise.
9331 (arm_hwbp_control_disable): Likewise.
9332 (arm_linux_hw_breakpoint_equal): Likewise.
9333 (arm_linux_hw_point_initialize): Likewise.
9334 (struct update_registers_data): New data structure.
9335 (update_registers_callback: New function.
9336 (arm_insert_point): Likewise.
9337 (arm_remove_point): Likewise.
9338 (arm_stopped_by_watchpoint): Likewise.
9339 (arm_stopped_data_address): Likewise.
9340 (arm_new_process): Likewise.
9341 (arm_new_thread): Likewise.
9342 (arm_prepare_to_resume): Likewise.
9343 (the_low_target): Register arm_insert_point, arm_remove_point,
9344 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9345 arm_new_thread, and arm_prepare_to_resume.
9346
9347 2011-09-15 Stan Shebs <stan@codesourcery.com>
9348
9349 * server.h (struct emit_ops): Add compare-goto fields.
9350 * tracepoint.c (gdb_agent_op_sizes): New table.
9351 (emit_eq_goto): New function.
9352 (emit_ne_goto): New function.
9353 (emit_lt_goto): New function.
9354 (emit_le_goto): New function.
9355 (emit_gt_goto): New function.
9356 (emit_ge_goto): New function.
9357 (is_goto_target): New function.
9358 (compile_bytecodes): Recognize special cases of compare-goto
9359 combinations and call specialized emitters for them.
9360 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9361 (amd64_emit_ne_goto): New function.
9362 (amd64_emit_lt_goto): New function.
9363 (amd64_emit_le_goto): New function.
9364 (amd64_emit_gt_goto): New function.
9365 (amd64_emit_ge_goto): New function.
9366 (amd64_emit_ops): Add the new functions.
9367 (i386_emit_eq_goto): New function.
9368 (i386_emit_ne_goto): New function.
9369 (i386_emit_lt_goto): New function.
9370 (i386_emit_le_goto): New function.
9371 (i386_emit_gt_goto): New function.
9372 (i386_emit_ge_goto): New function.
9373 (i386_emit_ops): Add the new functions.
9374
9375 2011-09-08 Stan Shebs <stan@codesourcery.com>
9376
9377 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9378 (i386_emit_epilogue): Restore %ebx.
9379
9380 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9381
9382 * server.c (step_thread): Remove definition.
9383 (process_serial_event): Don't handle Hs.
9384 * server.h (step_thread): Remove declaration.
9385 * target.c (set_desired_inferior): Remove use of step_thread.
9386
9387 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9388
9389 * linux-low.c: Include linux-procfs.h.
9390 (linux_attach_lwp_1): Update comments.
9391 (linux_attach): Scan for existing threads when attaching to a
9392 process that is the tgid.
9393 * Makefile.in: Update dependencies.
9394
9395 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9396
9397 * configure.srv: Add linux-procfs.o dependencies.
9398
9399 2011-08-14 Yao Qi <yao@codesourcery.com>
9400
9401 * target.h (struct target_ops): Fix indent.
9402 * win32-low.c (win32_target_ops): Fix comment.
9403
9404 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9405 Yao Qi <yao@codesourcery.com>
9406
9407 * Makefile.in (clean): Remove tic6x-*.c files.
9408 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9409 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9410 (tic6x-c64xp-linux.c): Likewise.
9411 * configure.srv: Add support for tic6x-*-uclinux.
9412 * linux-tic6x-low.c: New.
9413 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9414
9415 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9416 Yao Qi <yao@codesourcery.com>
9417
9418 * target.h (struct target_ops): Add read_loadmap.
9419 * linux-low.c (struct target_loadseg): New type.
9420 (struct target_loadmap): New type.
9421 (linux_read_loadmap): New function.
9422 (linux_target_ops): Add linux_read_loadmap.
9423 * server.c (handle_query): Support qXfer:fdpic:read packet.
9424 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9425 to NULL.
9426
9427 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9428
9429 * win32-low.c: Include <stdint.h>.
9430
9431 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9432
9433 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9434 to the inferior here.
9435 (i386_remove_aligned_watchpoint): Ditto.
9436 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9437 fit part of the watchpoint in the debug registers.
9438 (i386_update_inferior_debug_regs): New.
9439 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9440 registers, and only update the inferior on success.
9441 (i386_low_remove_watchpoint): Ditto.
9442
9443 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9444
9445 * linux-low.c (compare_ints, unique, list_threads, show_process,
9446 linux_core_of_thread): Delete.
9447 (linux_target_ops): Change linux_core_of_thread to
9448 linux_common_core_of_thread.
9449 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9450 * utils.c (malloc_failure): Change type of argument.
9451 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9452 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9453 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9454 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9455 (IPA_OBJS): Add common-utils-ipa.o.
9456 (ptid_h, linux_osdata_h): New macros.
9457 (server_h): Add common/common-utils.h, common/xml-utils.h,
9458 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9459 common/ptid.h.
9460 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9461 ptid.o, buffer.o): New rules.
9462 (linux-low.o): Add common/linux-osdata.h as a dependency.
9463 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9464 * configure.ac: Add AC_HEADER_DIRENT check.
9465 * config.in: Regenerate.
9466 * configure: Regenerate.
9467 * remote-utils.c (xml_escape_text): Delete.
9468 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9469 buffer_xml_printf): Move to common/buffer.c.
9470 * server.c (main): Remove call to initialize_inferiors.
9471 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9472 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9473 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9474 internal_error, gdb_assert, gdb_assert_fail): Delete.
9475 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9476 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9477 common/buffer.h.
9478 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9479 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9480 initialize_inferiors): Delete.
9481
9482 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9483
9484 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9485 symbol error.
9486
9487 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9488
9489 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9490 assertion.
9491 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9492
9493 2011-05-26 Yao Qi <yao@codesourcery.com>
9494
9495 * Makefile.in (thread-db.o): Track dependence to
9496 common/gdb_thread_db.h.
9497 * thread-db.c: include gdb_thread_db.h from right place.
9498
9499 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9500
9501 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9502 __FILE__ and __LINE__ to internal_error.
9503
9504 2011-05-13 Doug Evans <dje@google.com>
9505
9506 * thread-db.c (try_thread_db_load_from_sdir): New function.
9507 (try_thread_db_load_from_dir): New function.
9508 (thread_db_load_search): Handle $sdir, ignore $pdir.
9509 Remove trying of system directories if search of
9510 libthread-db-search-path fails, that is now done via $sdir.
9511
9512 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9513
9514 * server.c (handle_query): Add EnableDisableTracepoints to the list
9515 of supported features.
9516 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9517 tracepoints.
9518 (cmd_qtenable_disable): New.
9519 (cmd_qtstart): Install tracepoints even if disabled.
9520 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9521 receiving a QTEnable or QTDisable packet.
9522 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9523 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9524 tracepoints.
9525 (gdb_probe): Skip data collection if static tracepoint is disabled.
9526
9527 2011-05-10 Doug Evans <dje@google.com>
9528
9529 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9530
9531 2011-05-04 Doug Evans <dje@google.com>
9532
9533 * linux-low.c (linux_join): Skip process lookup.
9534 * spu-low.c (spu_join): Ditto.
9535 * server.c (join_inferiors_callback): Delete.
9536 (process_serial_event): For 'D' packet (detach) call join_inferior
9537 directly.
9538
9539 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9540
9541 * README: Don't mention xscale*-*-linux*.
9542 * configure.srv (xscale*-*-linux*): Don't handle target.
9543
9544 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9545
9546 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9547 casting pointers.
9548 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9549 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9550 (i386_emit_void_call_2): Likewise.
9551
9552 2011-04-26 Yao Qi <yao@codesourcery.com>
9553
9554 * linux-low.c: Move common macros to linux-ptrace.h.
9555 Include linux-ptrace.h.
9556 * Makefile.in (linux_ptrace_h): New.
9557 (linux-low.o): Depends on linux-ptrace.h.
9558
9559 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9560
9561 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9562 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9563 (remote_prepare): New function with most of the TCP code from ...
9564 (remote_open): ... here. Detect PORT here unconditionally. Move also
9565 setting transport_is_reliable.
9566 * server.c (run_once): New variable.
9567 (gdbserver_usage): Document it.
9568 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9569 the first run if RUN_ONCE.
9570 * server.h (run_once, remote_prepare): New declarations.
9571
9572 2011-04-19 Tom Tromey <tromey@redhat.com>
9573
9574 * win32-low.c (handle_load_dll): Remove duplicate "the".
9575
9576 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9577
9578 Remove support for old Cygwin 1.5 versions.
9579 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9580 function to avoid warning.
9581 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9582 warning.
9583
9584 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9585
9586 * gdbserver/server.h (Macro _): Define it if not available.
9587
9588 2011-03-14 Michael Snyder <msnyder@vmware.com>
9589
9590 * hostio.c (handle_close): Remove unnecessary null test.
9591
9592 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9593
9594 * Makefile.in (maintainer-clean realclean distclean): Remove
9595 "make ... subdir_do" command.
9596
9597 2011-03-10 Michael Snyder <msnyder@vmware.com>
9598
9599 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9600
9601 * server.c (handle_v_run): Free alloced buffer on early return.
9602
9603 2011-03-09 Yao Qi <yao@codesourcery.com>
9604
9605 Revert:
9606 2011-03-04 Yao Qi <yao@codesourcery.com>
9607
9608 * Makefile.in: Remove GNU make feature --directory.
9609
9610 2011-03-05 Yao Qi <yao@codesourcery.com>
9611
9612 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9613 (subdir_do): New make target. Copied from gdb/Makefile.
9614 (maintainer-clean, realclean, distclean, clean): Call corresponding
9615 make targets in common/Makefile.
9616
9617 2011-02-11 Yao Qi <yao@codesourcery.com>
9618
9619 * configure.ac: Call AC_PROG_RANLIB.
9620 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9621 * configure: Regenerate.
9622
9623 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9624
9625 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9626
9627 2011-03-06 Yao Qi <yao@codesourcery.com>
9628
9629 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9630
9631 2011-03-05 Yao Qi <yao@codesourcery.com>
9632
9633 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9634 (subdir_do): New make target. Copied from gdb/Makefile.
9635 (maintainer-clean, realclean, distclean, clean): Call corresponding
9636 make targets in common/Makefile.
9637
9638 2011-03-04 Yao Qi <yao@codesourcery.com>
9639
9640 * Makefile.in: Remove GNU make feature --directory.
9641
9642 2011-03-04 Michael Snyder <msnyder@vmware.com>
9643
9644 * server.c (queue_stop_reply): Call xmalloc not malloc.
9645
9646 2011-03-02 Michael Snyder <msnyder@vmware.com>
9647
9648 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9649
9650 2011-02-28 Michael Snyder <msnyder@vmware.com>
9651
9652 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9653 (cmd_qtframe): Ditto.
9654 (cmd_qtbuffer): Ditto.
9655 (cmd_bigqtbuffer): Ditto.
9656
9657 * utils.c (decimal2str): Initialize 'width' to nine, then
9658 don't mess with it.
9659
9660 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9661
9662 * hostio.c (require_data): Free *data, not data.
9663
9664 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9665
9666 * hostio.c (require_data): Use free, not xfree.
9667
9668 2011-02-27 Michael Snyder <msnyder@vmware.com>
9669
9670 * server.c (handle_query): Discard unused value.
9671
9672 * hostio.c (require_data): Free malloc memory before returning
9673 error.
9674
9675 2011-02-26 Michael Snyder <msnyder@vmware.com>
9676
9677 * linux-low.c (list_threads): Call closedir for dirent.
9678
9679 2011-02-27 Michael Snyder <msnyder@vmware.com>
9680
9681 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9682 a case statement falls through.
9683
9684 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9685
9686 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9687 in comparison.
9688
9689 2011-02-26 Michael Snyder <msnyder@vmware.com>
9690
9691 * utils.c (decimal2str): Eliminate dead code and dead param.
9692 (pulongest): Drop dead param from call to decimal2str.
9693 (plongest): Ditto.
9694
9695 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9696
9697 Revert the following patch (not approved yet):
9698 2011-02-21 Hui Zhu <teawater@gmail.com>
9699 * tracepoint.c (tp_printf): New function.
9700 (eval_agent_expr): Handle gdb_agent_op_printf.
9701
9702 2011-02-21 Hui Zhu <teawater@gmail.com>
9703
9704 * tracepoint.c (tp_printf): New function.
9705 (eval_agent_expr): Handle gdb_agent_op_printf.
9706
9707 2011-02-18 Tom Tromey <tromey@redhat.com>
9708
9709 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9710 (tracepoint.o): Likewise.
9711 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9712 (gdb_agent_op_names): Likewise.
9713
9714 2011-02-18 Tom Tromey <tromey@redhat.com>
9715
9716 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9717 gdb_agent_op_rot>: New constants.
9718 (gdb_agent_op_names): Add pick and roll.
9719 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9720 cases.
9721
9722 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9723
9724 * aclocal.m4: Regenerated with aclocal-1.11.1.
9725
9726 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9727
9728 * server.c (handle_qxfer_traceframe_info): New.
9729 (qxfer_packets): Register "traceframe-info".
9730 (handle_query): Report support for qXfer:traceframe-info:read+.
9731 * tracepoint.c (match_blocktype): New.
9732 (traceframe_find_block_type): Rename to ...
9733 (traceframe_walk_blocks): ... this. Add callback filter argument,
9734 and use it.
9735 (traceframe_find_block_type): New, reimplemented on top of
9736 traceframe_walk_blocks.
9737 (build_traceframe_info_xml): New.
9738 (traceframe_read_info): New.
9739 * server.h (traceframe_read_info): Declare.
9740
9741 2011-02-11 Yao Qi <yao@codesourcery.com>
9742
9743 * configure.ac: Call AC_PROG_RANLIB.
9744 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9745 * configure: Regenerate.
9746
9747 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9748
9749 * server.c (gdb_read_memory): Change return semantics to allow
9750 partial transfers.
9751 (handle_search_memory_1): Adjust.
9752 (process_serial_event) <'m' packet>: Handle partial transfers.
9753 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9754
9755 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9756
9757 * regcache.c (init_register_cache): Initialize
9758 regcache->register_status.
9759 (free_register_cache): Release regcache->register_status.
9760 (regcache_cpy): Copy register_status.
9761 (registers_to_string): Print 'x's for unavailable registers.
9762 (supply_register): Mark the register's status valid or
9763 unavailable, depending on whether a buffer was passed in or not.
9764 (supply_register_zeroed): New.
9765 (supply_regblock): Mark the registers' status valid or
9766 unavailable, depending on whether a buffer was passed in or not.
9767 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9768 (struct regcache): New `register_status' field.
9769 (supply_register_zeroed): Declare.
9770 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9771 supply_register_zeroed, rather than passing a NULL buffer to
9772 supply_register.
9773 * tracepoint.c (fetch_traceframe_registers): Update comment.
9774
9775 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9776
9777 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9778 buffer explicit.
9779
9780 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9781
9782 * server.h (decode_xfer_write): Change prototype.
9783 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9784 and don't extract the annex here.
9785 * server.c (decode_xfer_read): Remove `annex' parameter,
9786 and don't extract the annex here.
9787 (decode_xfer): New.
9788 (struct qxfer): New.
9789 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9790 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9791 (handle_qxfer_statictrace): New functions, abstracted out from
9792 handle_query, and made to use the struct qxfer interface.
9793 (handle_threads_qxfer_proper): Rename to ...
9794 (handle_qxfer_threads_proper): ... this.
9795 (handle_threads_qxfer): Rename to ...
9796 (handle_qxfer_threads): ... this. Adjust.
9797 (qxfer_packets): New array.
9798 (handle_qxfer): New function.
9799 (handle_query): Use handle_qxfer.
9800
9801 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9802
9803 * gdbreplay.c: Shorten lines of >= 80 columns.
9804 * linux-low.c: Ditto.
9805 * linux-ppc-low.c: Ditto.
9806 * linux-s390-low.c: Ditto.
9807 * linux-sparc-low.c: Ditto.
9808 * linux-x86-low.c: Ditto.
9809 * linux-xtensa-low.c: Ditto.
9810 * mem-break.c: Ditto.
9811 * nto-low.c: Ditto.
9812 * regcache.h: Ditto.
9813 * remote-utils.c: Ditto.
9814 * server.c: Ditto.
9815 * server.h: Ditto.
9816 * thread-db.c: Ditto.
9817 * tracepoint.c: Ditto.
9818 * utils.c: Ditto.
9819 * win32-low.h: Ditto.
9820
9821 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9822
9823 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9824 update.
9825
9826 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9827
9828 * server.c (gdbserver_version): Update copyright year in version
9829 output.
9830 * gdbreplay.c (gdbreplay_version): Ditto.
9831
9832 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9833
9834 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9835 * linux-bfin-low.c: New file.
9836 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9837 PT_DATA_ADDR for BFIN targets.
9838 * Makefile.in (SFILES): Add linux-bfin-low.c.
9839 (clean): Remove reg-bfin.c.
9840 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9841 * README: Mention supported Blackfin targets.
9842
9843 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9844
9845 * .gitignore: New file.
9846
9847 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9848
9849 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9850
9851 2010-10-22 Jie Zhang <jie@codesourcery.com>
9852
9853 * Makefile.in: Add FLAGS_TO_PASS variable.
9854 (install): Remove dependency of install-only and recursively
9855 invoke make for install-only.
9856
9857 2010-10-04 Doug Evans <dje@google.com>
9858
9859 * Makefile.in (uninstall): Use $(DESTDIR).
9860
9861 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9862
9863 PR gdb/11842
9864
9865 * linux-x86-low.c (compat_siginfo_from_siginfo)
9866 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9867 si_code is < 0. Check for si_code == SI_TIMER before checking for
9868 si_code < 0.
9869
9870 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9871
9872 * lynx-i386-low.c: New file.
9873 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9874
9875 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9876
9877 * lynx-low.c (ptrace_request_to_str): Remove handling for
9878 request values that have been removed in LynxOS 5.x.
9879
9880 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9881
9882 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9883 <ptrace.h>
9884
9885 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9886
9887 * configure.ac: Add --enable-inprocess-agent option.
9888 * configure: Rebuilt.
9889
9890 2010-09-06 Yao Qi <yao@codesourcery.com>
9891
9892 * linux-low.c (linux_kill): Remove unused variable.
9893 (linux_stabilize_threads): Likewise.
9894 * server.c (start_inferior): Likewise.
9895 (queue_stop_reply_callback): Likewise.
9896 * tracepoint.c (do_action_at_tracepoint): Likewise.
9897
9898 2010-09-06 Yao Qi <yao@codesourcery.com>
9899
9900 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9901 on return.
9902
9903 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9904
9905 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9906
9907 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9908
9909 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9910 "$(IPA_DEPFILES)".
9911
9912 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9913
9914 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9915 gdbserver/lynx-ppc-low.c: New files.
9916 * Makefile.in (lynx_low_h): New variable.
9917 (lynx-low.o, lynx-ppc-low.o): New rules.
9918 * configure.ac: On LynxOS, link with -lnetinet.
9919 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9920 * configure: regenerate.
9921
9922 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9923
9924 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9925 * configure.ac: Add check for vasprintf and vsnprintf.
9926 * configure, config.in: Regenerate.
9927 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9928
9929 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9930
9931 * gdbreplay.c: Move include of alloca.h up, next to include of
9932 malloc.h.
9933 * server.h: Add include of malloc.h.
9934 * mem-break.c: Remove include of malloc.h.
9935 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9936
9937 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9938
9939 * Makefile.in (memmem.o): Build with -Wno-error.
9940
9941 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9942
9943 * utils.c (xsnprintf): Make non-static.
9944 * server.h: Add xsnprintf declaration.
9945 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9946 replace calls to snprintf by calls to xsnprintf throughout.
9947
9948 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9949
9950 * configure.ac: Add configure check for alloca.
9951 * configure, config.in: Regenerate.
9952 * server.h: Include alloca.h if it exists.
9953 * gdbreplay.c: Include alloca.h if it exists.
9954
9955 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9956
9957 * linux-low.c (__SIGRTMIN): Define if not already defined.
9958 (linux_create_inferior): Check for __ANDROID__ rather than
9959 __SIGRTMIN.
9960 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9961 are already deferred.
9962 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9963 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9964 stopped and already has a pending signal to report.
9965 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9966 a pending signal to report or is moving out of a jump pad.
9967 (linux_init_signals): Check for __ANDROID__ rather than
9968 __SIGRTMIN.
9969
9970 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9971
9972 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9973 debug_threads check. Avoid a linear search when not doing debug
9974 output.
9975
9976 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9977
9978 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9979 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9980 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9981 (process_event): Change local fd's type to gdb_fildes_t.
9982 (create_file_handler): Adjust prototype.
9983 (delete_file_handler): Adjust prototype.
9984 (handle_file_event): Adjust prototype. Use pfildes.
9985 (create_file_event): Adjsut prototype.
9986 * remote-utils.c (remote_desc, listen_desc): Change type to
9987 gdb_fildes_t.
9988 * server.h: New gdb_fildes_t typedef.
9989 [USE_WIN32API]: Include winsock2.h.
9990 (delete_file_handler, add_file_handler): Adjust prototypes.
9991 (pfildes): Declare.
9992 * utils.c (pfildes): New.
9993
9994 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9995
9996 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9997 * configure: Regenerate.
9998
9999 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10000
10001 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10002 (linux_done_accessing_memory): ... this.
10003 (linux_target_ops): Adjust.
10004 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10005 * nto-low.c (nto_target_ops): Adjust comment.
10006 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10007 * spu-low.c (spu_target_ops): Adjust comment.
10008 * target.h (target_ops): Rename unprepare_to_access_memory field
10009 to done_accessing_memory.
10010 (unprepare_to_access_memory): Rename to ...
10011 (done_accessing_memory): ... this.
10012
10013 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10014
10015 * linux-low.c (linux_prepare_to_access_memory): New.
10016 (linux_unprepare_to_access_memory): New.
10017 (linux_target_ops): Install them.
10018 * server.c (read_memory): Rename to ...
10019 (gdb_read_memory): ... this. Use
10020 prepare_to_access_memory/prepare_to_access_memory.
10021 (write_memory): Rename to ...
10022 (gdb_write_memory): ... this. Use
10023 prepare_to_access_memory/prepare_to_access_memory.
10024 (handle_search_memory_1): Adjust.
10025 (process_serial_event): Adjust.
10026 * target.h (struct target_ops): New fields
10027 prepare_to_access_memory and unprepare_to_access_memory.
10028 (prepare_to_access_memory, unprepare_to_access_memory): New.
10029 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10030 prepare_to_access_memory/prepare_to_access_memory.
10031 * nto-low.c (nto_target_ops): Adjust.
10032 * spu-low.c (spu_target_ops): Adjust.
10033 * win32-low.c (win32_target_ops): Adjust.
10034
10035 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10036
10037 * Makefile.in (WARN_CFLAGS): Get it from configure.
10038 (WERROR_CFLAGS): New.
10039 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10040 * configure.ac: Introduce --enable-werror, which adds -Werror to
10041 the compiler command line. Enabled by default. Disable with
10042 --disable-werror. Add -Wdeclaration-after-statement
10043 Wpointer-arith and -Wformat-nonliteral to warning flags.
10044 * configure: Regenerate.
10045
10046 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10047
10048 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10049
10050 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10051
10052 * gdbreplay.c (remote_error): New.
10053 (gdbchar): New.
10054 (expect): Use gdbchar. Check for error reading from GDB.
10055 Clarify sync error output.
10056 (play): Check for errors writing to GDB.
10057 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10058 * remote-utils.c (getpkt): Check for errors writing to the remote
10059 descriptor.
10060
10061 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10062
10063 * linux-low.c (linux_wait_1): Move non-debugging code out of
10064 `debug_threads' control.
10065
10066 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10067
10068 * linux-low.c (linux_wait_1): Don't set last_status here.
10069 * server.c (push_event, queue_stop_reply_callback): Assert we're
10070 not pushing a TARGET_WAITKIND_IGNORE event.
10071 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10072 (myresume, handle_target_event): Set the thread's last_resume_kind
10073 and last_status from the target returned status.
10074
10075 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10076
10077 PR threads/10729
10078
10079 * linux-x86-low.c (update_debug_registers_callback): New.
10080 (i386_dr_low_set_addr): Use it.
10081 (i386_dr_low_get_addr): New.
10082 (i386_dr_low_set_control): Use update_debug_registers_callback.
10083 (i386_dr_low_get_control): New.
10084 (i386_dr_low_get_status): Adjust.
10085 * linux-low.c (linux_stop_lwp): New.
10086 * linux-low.h (linux_stop_lwp): Declare.
10087
10088 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10089 argument instead of a i386_debug_reg_state.
10090 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10091 a i386_debug_reg_state.
10092 (i386_insert_aligned_watchpoint): Adjust.
10093 (i386_remove_aligned_watchpoint): Adjust.
10094 (i386_low_stopped_data_address): Read the debug registers from the
10095 inferior instead of from the mirrors.
10096 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10097 (i386_dr_low_get_addr): Declare.
10098 (i386_dr_low_get_control): Declare.
10099 (i386_dr_low_get_status): Change prototype.
10100
10101 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10102 (i386_dr_low_get_addr): New.
10103 (i386_dr_low_get_control): New.
10104 (i386_dr_low_get_status): Adjust prototype. Return
10105 dr_status_mirror.
10106 (i386_initial_stuff): Clear dr_status_mirror and
10107 dr_control_mirror.
10108 (i386_get_thread_context): Adjust.
10109 (i386_set_thread_context): Adjust.
10110 (i386_thread_added): Adjust.
10111
10112 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10113
10114 * linux-low.h (linux_thread_area): Delete declaration.
10115
10116 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10117
10118 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10119 after its termination.
10120
10121 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10122
10123 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10124 (gdb_wants_all_stopped): Delete.
10125 (linux_wait_1): Don't call them.
10126 * server.c (handle_v_cont): Tag all threads as want-stopped.
10127 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10128 stopped as "client-wants-stopped".
10129
10130 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10131
10132 * Makefile.in (signals_h): New.
10133 (server_h): Depend on it.
10134 (server.o): Don't depend on $(signals_def).
10135 (signals.o): Depend on $(signals_def).
10136
10137 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10138
10139 * Makefile.in (signals_def): New.
10140 (server_h): Append include/gdb/signals.h and signals_def.
10141 (server.o): Append signals_def.
10142
10143 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10144
10145 * server.c (handle_target_event): Use target_signal_to_host for
10146 resume_info.sig initialization.
10147 * target.h (struct thread_resume) <sig>: New comment.
10148
10149 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10150
10151 * server.c (handle_query): strcpy() the returned string from paddress()
10152 instead of sprintf().
10153 * utils.c (paddress): Return phex_nz().
10154
10155 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10156
10157 * server.c (handle_v_cont): Call mourn_inferior if process
10158 just exited.
10159 (myresume): Likewise.
10160
10161 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10162
10163 Static tracepoints, and integration with UST.
10164
10165 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10166 * mem-break.c (uninsert_all_breakpoints)
10167 (reinsert_all_breakpoints): New.
10168 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10169 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10170 (gdb_agent_ust_loaded, helper_thread_id)
10171 (gdb_agent_helper_thread_id): New macros.
10172 (struct ipa_sym_addresses): Add addr_ust_loaded,
10173 addr_helper_thread_id, addr_cmd_buf.
10174 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10175 (in_process_agent_loaded_ust): New.
10176 (write_e_ust_not_loaded): New.
10177 (maybe_write_ipa_ust_not_loaded): New.
10178 (struct collect_static_trace_data_action): New.
10179 (enum tracepoint_type) <static_tracepoint>: New.
10180 (struct tracepoint) <handle>: Mention static tracepoints.
10181 (struct static_tracepoint_ctx): New.
10182 (CMD_BUF_SIZE): New.
10183 (add_tracepoint_action): Handle static tracepoint actions.
10184 (unprobe_marker_at): New.
10185 (clear_installed_tracepoints): Handle static tracepoints.
10186 (cmd_qtdp): Handle static tracepoints.
10187 (probe_marker_at): New.
10188 (cmd_qtstart): Handle static tracepoints.
10189 (response_tracepoint): Handle static tracepoints.
10190 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10191 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10192 (get_context_regcache): Handle static tracepoints.
10193 (do_action_at_tracepoint): Handle static tracepoint actions.
10194 (traceframe_find_block_type): Handle static trace data blocks.
10195 (traceframe_read_sdata): New.
10196 (download_tracepoints): Download static tracepoint actions.
10197 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10198 (GDB_PROBE_NAME): New.
10199 (ust_ops): New.
10200 (GET_UST_SYM): New.
10201 (USTF): New.
10202 (dlsym_ust): New.
10203 (ust_marker_to_static_tracepoint): New.
10204 (gdb_probe): New.
10205 (collect_ust_data_at_tracepoint): New.
10206 (gdb_ust_probe): New.
10207 (UNIX_PATH_MAX, SOCK_DIR): New.
10208 (gdb_ust_connect_sync_socket): New.
10209 (resume_thread, stop_thread): New.
10210 (run_inferior_command): New.
10211 (init_named_socket): New.
10212 (gdb_ust_socket_init): New.
10213 (cstr_to_hexstr): New.
10214 (next_st): New.
10215 (first_marker, next_marker): New.
10216 (response_ust_marker): New.
10217 (cmd_qtfstm, cmd_qtsstm): New.
10218 (unprobe_marker_at, probe_marker_at): New.
10219 (cmd_qtstmat, gdb_ust_thread): New.
10220 (gdb_ust_init): New.
10221 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10222 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10223 (ST_REGENTRY): New.
10224 (x86_64_st_collect_regmap): New.
10225 (X86_64_NUM_ST_COLLECT_GREGS): New.
10226 (AMD64_RIP_REGNUM): New.
10227 (supply_static_tracepoint_registers): New.
10228 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10229 (ST_REGENTRY): New.
10230 (i386_st_collect_regmap): New.
10231 (i386_NUM_ST_COLLECT_GREGS): New.
10232 (supply_static_tracepoint_registers): New.
10233 * server.c (handle_query): Handle qXfer:statictrace:read.
10234 <qSupported>: Report support for StaticTracepoints, and
10235 qXfer:statictrace:read features.
10236 * server.h (traceframe_read_sdata)
10237 (supply_static_tracepoint_registers): Declare.
10238 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10239 (unpack_varlen_hex): Include in IPA build.
10240 * Makefile.in (ustlibs, ustinc): New.
10241 (IPA_OBJS): Add remote-utils-ipa.o.
10242 ($(IPA_LIB)): Link -ldl and -lpthread.
10243 (UST_CFLAGS): New.
10244 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10245 * config.in, configure: Regenerate.
10246
10247 2010-06-20 Ian Lance Taylor <iant@google.com>
10248 Pedro Alves <pedro@codesourcery.com>
10249
10250 * linux-x86-low.c (always_true): Delete.
10251 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10252 trying to fool the compiler with always_true.
10253
10254 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10255
10256 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10257 conditions in gdbserver.
10258
10259 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10260
10261 * spu-low.c (spu_read_memory): Wrap around local store limit.
10262 (spu_write_memory): Likewise.
10263
10264 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10265
10266 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10267 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10268 LONGEST uses.
10269 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10270 uses.
10271 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10272 uses with LONGEST uses.
10273
10274 2010-06-14 Stan Shebs <stan@codesourcery.com>
10275 Pedro Alves <pedro@codesourcery.com>
10276
10277 Bytecode compiler.
10278
10279 * linux-x86-low.c: Include limits.h.
10280 (add_insns): New.
10281 (always_true): New.
10282 (EMIT_ASM): New.
10283 (EMIT_ASM32): New.
10284 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10285 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10286 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10287 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10288 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10289 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10290 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10291 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10292 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10293 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10294 (amd64_emit_void_call_2): New.
10295 (amd64_emit_ops): New.
10296 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10297 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10298 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10299 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10300 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10301 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10302 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10303 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10304 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10305 (i386_emit_stack_adjust, i386_emit_int_call_1)
10306 (i386_emit_void_call_2): New.
10307 (i386_emit_ops): New.
10308 (x86_emit_ops): New.
10309 (the_low_target): Install x86_emit_ops.
10310 * server.h (struct emit_ops): New.
10311 (get_raw_reg_func_addr): Declare.
10312 (current_insn_ptr, emit_error): Declare.
10313 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10314 (set_trace_state_variable_value): New defines.
10315 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10316 addr_get_trace_state_variable_value and
10317 addr_set_trace_state_variable_value.
10318 (symbol_list): New fields for get_raw_reg,
10319 get_trace_state_variable_value and set_trace_state_variable_value.
10320 (condfn): New typedef.
10321 (struct tracepoint): New field `compiled_cond'.
10322 (do_action_at_tracepoint): Clear compiled_cond.
10323 (get_trace_state_variable_value, set_trace_state_variable_value):
10324 Export in the IPA.
10325 (condition_true_at_tracepoint): If there's a compiled condition,
10326 run that.
10327 (current_insn_ptr, emit_error): New globals.
10328 (struct bytecode_address): New.
10329 (get_raw_reg_func_addr): New.
10330 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10331 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10332 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10333 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10334 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10335 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10336 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10337 (compile_tracepoint_condition, compile_bytecodes): New.
10338 * target.h (emit_ops): Forward declare.
10339 (struct target_ops): New field emit_ops.
10340 (target_emit_ops): New.
10341 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10342 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10343 * linux-low.c (linux_emit_ops): New.
10344 (linux_target_ops): Install it.
10345 * linux-low.h (struct linux_target_ops): New field emit_ops.
10346
10347 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10348
10349 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10350 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10351
10352 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10353 Stan Shebs <stan@codesourcery.com>
10354
10355 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10356 (all): Depend on $(extra_libraries).
10357 (install-only): Install the IPA.
10358 (IPA_OBJS, IPA_LIB): New.
10359 (clean): Remove the IPA lib.
10360 (IPAGENT_CFLAGS): New.
10361 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10362 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10363 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10364 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10365 * configure.ac: Check for atomic builtins support in the compiler.
10366 (IPA_DEPFILES, extra_libraries): Define.
10367 * configure.srv (ipa_obj): Add description.
10368 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10369 (i[34567]86-*-linux*): Set ipa_obj.
10370 (x86_64-*-linux*): Set ipa_obj.
10371 * linux-low.c (stabilizing_threads): New.
10372 (supports_fast_tracepoints): New.
10373 (linux_detach): Stabilize threads before detaching.
10374 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10375 the lwp is either not stabilizing, or is moving out of a jump pad.
10376 (linux_fast_tracepoint_collecting): New.
10377 (maybe_move_out_of_jump_pad): New.
10378 (enqueue_one_deferred_signal): New.
10379 (dequeue_one_deferred_signal): New.
10380 (linux_wait_for_event_1): If moving out of a jump pad, defer
10381 pending signals to later.
10382 (linux_stabilize_threads): New.
10383 (linux_wait_1): Check if threads need moving out of jump pads, and
10384 do it if so.
10385 (stuck_in_jump_pad_callback): New.
10386 (move_out_of_jump_pad_callback): New.
10387 (lwp_running): New.
10388 (linux_resume_one_lwp): Handle moving out of jump pads.
10389 (linux_set_resume_request): Dequeue deferred signals.
10390 (need_step_over_p): Also step over fast tracepoint jumps.
10391 (start_step_over): Also uninsert fast tracepoint jumps.
10392 (finish_step_over): Also reinsert fast tracepoint jumps.
10393 (linux_install_fast_tracepoint_jump): New.
10394 (linux_target_ops): Install linux_stabilize_threads and
10395 linux_install_fast_tracepoint_jump_pad.
10396 * linux-low.h (linux_target_ops) <get_thread_area,
10397 install_fast_tracepoint_jump_pad>: New fields.
10398 (struct lwp_info) <collecting_fast_tracepoint,
10399 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10400 (linux_get_thread_area): Declare.
10401 * linux-x86-low.c (jump_insn): New.
10402 (x86_get_thread_area): New.
10403 (append_insns): New.
10404 (push_opcode): New.
10405 (amd64_install_fast_tracepoint_jump_pad): New.
10406 (i386_install_fast_tracepoint_jump_pad): New.
10407 (x86_install_fast_tracepoint_jump_pad): New.
10408 (the_low_target): Install x86_get_thread_area and
10409 x86_install_fast_tracepoint_jump_pad.
10410 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10411 (struct fast_tracepoint_jump): New.
10412 (fast_tracepoint_jump_insn): New.
10413 (fast_tracepoint_jump_shadow): New.
10414 (find_fast_tracepoint_jump_at): New.
10415 (fast_tracepoint_jump_here): New.
10416 (delete_fast_tracepoint_jump): New.
10417 (set_fast_tracepoint_jump): New.
10418 (uninsert_fast_tracepoint_jumps_at): New.
10419 (reinsert_fast_tracepoint_jumps_at): New.
10420 (set_breakpoint_at): Use write_inferior_memory.
10421 (uninsert_raw_breakpoint): Use write_inferior_memory.
10422 (check_mem_read): Mask out fast tracepoint jumps.
10423 (check_mem_write): Mask out fast tracepoint jumps.
10424 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10425 (set_fast_tracepoint_jump): Declare.
10426 (delete_fast_tracepoint_jump)
10427 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10428 (reinsert_fast_tracepoint_jumps_at): Declare.
10429 * regcache.c: Don't compile many functions when building the
10430 in-process agent library.
10431 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10432 the register buffer in the heap.
10433 (free_register_cache): If the register buffer isn't owned by the
10434 regcache, don't free it.
10435 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10436 pre-existing register caches.
10437 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10438 type.
10439 (convert_ascii_to_int): : Constify `from' parameter type.
10440 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10441 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10442 the needed buffer in-place.
10443 (relocate_instruction): New.
10444 * server.c (handle_query) <qSymbols>: If the target supports
10445 tracepoints, give it a chance of looking up symbols. Report
10446 support for fast tracepoints.
10447 (handle_status): Stabilize threads.
10448 (process_serial_event): Adjust.
10449 * server.h (struct fast_tracepoint_jump): Forward declare.
10450 (struct process_info) <fast_tracepoint_jumps>: New field.
10451 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10452 (decode_X_packet, decode_M_packet): Adjust.
10453 (relocate_instruction): Declare.
10454 (in_process_agent_loaded): Declare.
10455 (tracepoint_look_up_symbols): Declare.
10456 (struct fast_tpoint_collect_status): Declare.
10457 (fast_tracepoint_collecting): Declare.
10458 (force_unlock_trace_buffer): Declare.
10459 (handle_tracepoint_bkpts): Declare.
10460 (initialize_low_tracepoint)
10461 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10462 * target.h (struct target_ops) <stabilize_threads,
10463 install_fast_tracepoint_jump_pad>: New fields.
10464 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10465 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10466 [HAVE_STDINT_H]: Include stdint.h.
10467 (trace_debug_1): Rename to ...
10468 (trace_vdebug): ... this.
10469 (trace_debug): Rename to ...
10470 (trace_debug_1): ... this. Add `level' parameter.
10471 (trace_debug): New.
10472 (ATTR_USED, ATTR_NOINLINE): New.
10473 (IP_AGENT_EXPORT): New.
10474 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10475 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10476 (about_to_request_buffer_space, trace_buffer_is_full)
10477 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10478 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10479 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10480 (traceframe_write_count, traceframes_created)
10481 (trace_state_variables)
10482 New renaming defines.
10483 (struct ipa_sym_addresses): New.
10484 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10485 (symbol_list): New.
10486 (ipa_sym_addrs): New.
10487 (all_tracepoint_symbols_looked_up): New.
10488 (in_process_agent_loaded): New.
10489 (write_e_ipa_not_loaded): New.
10490 (maybe_write_ipa_not_loaded): New.
10491 (tracepoint_look_up_symbols): New.
10492 (debug_threads) [IN_PROCESS_AGENT]: New.
10493 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10494 (UNKNOWN_SIDE_EFFECTS): New.
10495 (stop_tracing): New.
10496 (flush_trace_buffer): New.
10497 (stop_tracing_bkpt): New.
10498 (flush_trace_buffer_bkpt): New.
10499 (read_inferior_integer): New.
10500 (read_inferior_uinteger): New.
10501 (read_inferior_data_pointer): New.
10502 (write_inferior_data_pointer): New.
10503 (write_inferior_integer): New.
10504 (write_inferior_uinteger): New.
10505 (struct collect_static_trace_data_action): Delete.
10506 (enum tracepoint_type): New.
10507 (struct tracepoint) <type>: New field `type'.
10508 <actions_str, step_actions, step_actions_str>: Only include in
10509 GDBserver.
10510 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10511 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10512 (tracepoints): Use IP_AGENT_EXPORT.
10513 (last_tracepoint): Don't include in the IPA.
10514 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10515 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10516 (alloced_trace_state_variables): New.
10517 (trace_state_variables): Use IP_AGENT_EXPORT.
10518 (traceframe_t): Delete unused variable.
10519 (circular_trace_buffer): Don't include in the IPA.
10520 (trace_buffer_start): Delete.
10521 (struct trace_buffer_control): New.
10522 (trace_buffer_free): Delete.
10523 (struct ipa_trace_buffer_control): New.
10524 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10525 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10526 New.
10527 (trace_buffer_ctrl): New.
10528 (TRACE_BUFFER_CTRL_CURR): New.
10529 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10530 Reimplement as macros.
10531 (trace_buffer_wrap): Delete.
10532 (traceframe_write_count, traceframe_read_count)
10533 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10534 (struct tracepoint_hit_ctx) <type>: New field.
10535 (struct fast_tracepoint_ctx): New.
10536 (memory_barrier): New.
10537 (cmpxchg): New.
10538 (record_tracepoint_error): Update atomically in the IPA.
10539 (clear_inferior_trace_buffer): New.
10540 (about_to_request_buffer_space): New.
10541 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10542 updating the same buffer.
10543 (add_tracepoint): Default the tracepoint's type to trap
10544 tracepoint, and orig_size to -1.
10545 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10546 internal variables.
10547 (create_trace_state_variable): New parameter `gdb'. Handle it.
10548 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10549 (cmd_qtdp): Handle fast tracepoints.
10550 (cmd_qtdv): Adjust.
10551 (max_jump_pad_size): New.
10552 (gdb_jump_pad_head): New.
10553 (get_jump_space_head): New.
10554 (claim_jump_space): New.
10555 (sort_tracepoints): New.
10556 (MAX_JUMP_SIZE): New.
10557 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10558 IPA.
10559 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10560 support. Upload fast traceframes, and delete internal IPA
10561 breakpoints.
10562 (stop_tracing_handler): New.
10563 (flush_trace_buffer_handler): New.
10564 (cmd_qtstop): Upload fast tracepoints.
10565 (response_tracepoint): Handle fast tracepoints.
10566 (tracepoint_finished_step): Upload fast traceframes. Set the
10567 tracepoint hit context's tracepoint type.
10568 (handle_tracepoint_bkpts): New.
10569 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10570 type. Add comment about fast tracepoints.
10571 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10572 non-existing action_str field.
10573 (get_context_regcache): Handle fast tracepoints.
10574 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10575 to the regcache.
10576 (fast_tracepoint_from_jump_pad_address): New.
10577 (fast_tracepoint_from_ipa_tpoint_address): New.
10578 (collecting_t): New.
10579 (force_unlock_trace_buffer): New.
10580 (fast_tracepoint_collecting): New.
10581 (collecting): New.
10582 (gdb_collect): New.
10583 (write_inferior_data_ptr): New.
10584 (target_tp_heap): New.
10585 (target_malloc): New.
10586 (download_agent_expr): New.
10587 (UALIGN): New.
10588 (download_tracepoints): New.
10589 (download_trace_state_variables): New.
10590 (upload_fast_traceframes): New.
10591 (IPA_FIRST_TRACEFRAME): New.
10592 (IPA_NEXT_TRACEFRAME_1): New.
10593 (IPA_NEXT_TRACEFRAME): New.
10594 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10595 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10596 (gdb_jump_pad_buffer_end): New.
10597 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10598 (initialize_tracepoint): Adjust.
10599 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10600 buffer. Initialize the low module.
10601 * utils.c (PREFIX, TOOLNAME): New.
10602 (malloc_failure): Use PREFIX.
10603 (error): In the IPA, an error causes an exit.
10604 (fatal, warning): Use PREFIX.
10605 (internal_error): Use TOOLNAME.
10606 (NUMCELLS): Increase to 10.
10607 * configure, config.in: Regenerate.
10608
10609 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10610
10611 * server.c (handle_query) <qSupported>: Do two passes over the
10612 qSupported string to avoid nesting strtok.
10613
10614 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10615
10616 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10617 (CDEPS): New.
10618 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10619 -Wl,--dynamic-list.
10620 * configure: Regenerate.
10621 * proc-service.list: New.
10622
10623 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10624
10625 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10626 New comment.
10627
10628 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10629
10630 * gdbreplay.c (remote_open): Check error return from socket() call by
10631 its equality to -1 not by it being negative.
10632 * remote-utils.c (remote_open): Likewise.
10633
10634 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10635
10636 * config.h: Regenerate.
10637
10638 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10639
10640 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10641 doesn't provide PTRACE_GET_THREAD_AREA.
10642
10643 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10644
10645 * linux-m68k-low.c: Include <asm/ptrace.h>
10646 (ps_get_thread_area): Implement.
10647
10648 2010-05-03 Doug Evans <dje@google.com>
10649
10650 * event-loop.c (struct callback_event): New struct.
10651 (callback_list): New global.
10652 (append_callback_event, delete_callback_event): New functions.
10653 (process_callback): New function.
10654 (start_event_loop): Call it.
10655 * remote-utils.c (NOT_SCHEDULED): Define.
10656 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10657 moved out of readchar.
10658 (readchar): Rewrite. Call reschedule before returning.
10659 (reset_readchar): New function.
10660 (remote_close): Call it.
10661 (process_remaining, reschedule): New functions.
10662 * server.h (callback_handler_func): New typedef.
10663 (append_callback_event, delete_callback_event): Declare.
10664
10665 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10666
10667 * proc-service.c (ps_pglobal_lookup): Use
10668 thread_db_look_up_one_symbol.
10669 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10670 parameter. Use it instead of all_symbols_looked_up.
10671 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10672 field.
10673 (all_symbols_looked_up): Don't declare.
10674 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10675 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10676 field.
10677 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10678 Set all_symbols_looked_up here.
10679 (thread_db_look_up_one_symbol): New.
10680 (thread_db_get_tls_address): Adjust.
10681 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10682 thread_db object on the heap, and tentatively set it in the
10683 process structure.
10684 (thread_db_init): Don't set all_symbols_looked_up here.
10685 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10686
10687 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10688
10689 * linux-low.c (linux_kill, linux_detach): Adjust.
10690 (status_pending_p_callback): Remove redundant statement. Check
10691 for !TARGET_WAITIKIND_IGNORE, instead of
10692 TARGET_WAITKIND_STOPPED.
10693 (handle_tracepoints): Make sure LWP is locked. Adjust.
10694 (linux_wait_for_event_1): Adjust.
10695 (linux_cancel_breakpoints): New.
10696 (unsuspend_one_lwp): New.
10697 (unsuspend_all_lwps): New.
10698 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10699 (send_sigstop_callback): Change return type to int, add new
10700 `except' parameter and handle it.
10701 (suspend_and_send_sigstop_callback): New.
10702 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10703 pass them down. If SUSPEND, also increment the lwp's suspend
10704 count.
10705 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10706 (need_step_over_p): Don't consider suspended LWPs.
10707 (start_step_over): Adjust.
10708 (proceed_one_lwp): Change return type to int, add new `except'
10709 parameter and handle it.
10710 (unsuspend_and_proceed_one_lwp): New.
10711 (proceed_all_lwps): Use find_inferior instead of
10712 for_each_inferior.
10713 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10714 also decrement the suspend count of LWPs. Pass `except' down,
10715 instead of hacking its suspend count.
10716 (linux_pause_all): Add `freeze' parameter. Adjust.
10717 (linux_unpause_all): New.
10718 (linux_target_ops): Install linux_unpause_all.
10719 * server.c (handle_status): Adjust.
10720 * target.h (struct target_ops): New fields `unpause_all' and
10721 `cancel_breakpoints'. Add new parameter to `pause_all'.
10722 (pause_all): Add new `freeze' parameter.
10723 (unpause_all): New.
10724 (cancel_breakpoints): New.
10725 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10726 cancel breakpoints.
10727 (cmd_qtstart): Pause threads.
10728 (stop_tracing): Pause threads, and cancel breakpoints.
10729 * win32-low.c (win32_target_ops): Adjust.
10730
10731 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10732
10733 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10734 the inferior right away from here...
10735 (linux_wait_1): ... to here, and adjust to check the thread's
10736 last_resume_kind instead of the lwp's step or stop_expected flags.
10737
10738 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10739
10740 * README: Use consistent `GDB' and `GDBserver' spellings.
10741
10742 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10743
10744 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10745 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10746 (linux_detach_one_lwp): Assume the lwp is stopped.
10747 (any_thread_of): Delete.
10748 (linux_detach): Stop all lwps here. Don't blindly delete all
10749 breakpoints.
10750 (delete_lwp_callback): New.
10751 (linux_mourn): Delete all lwps of the process that is gone.
10752 (linux_wait_1): Don't delete the last lwp of the process here.
10753 * mem-break.h (mark_breakpoints_out): Declare.
10754 * mem-break.c (mark_breakpoints_out): New.
10755 (free_all_breakpoints): Use it.
10756 * server.c (handle_target_event): If the process is gone, mark
10757 breakpoints out.
10758 * thread-db.c (struct thread_db) <create_bp>: New field.
10759 (thread_db_enable_reporting): Fix prototype. Store a thread event
10760 breakpoint reference in the thread_db struct.
10761 (thread_db_load_search): Clear the thread_db object.
10762 (try_thread_db_load_1): Ditto.
10763 (switch_to_process): New.
10764 (disable_thread_event_reporting): Use it.
10765 (remove_thread_event_breakpoints): New.
10766 (thread_db_detach, thread_db_mourn): Use it.
10767
10768 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10769
10770 * linux-low.c (linux_enable_event_reporting): New.
10771 (linux_wait_for_event_1, handle_extended_wait): Use it.
10772
10773 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10774
10775 * linux-low.c (linux_kill_one_lwp, linux_kill)
10776 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10777 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10778 SIGSTOP even if the LWP is stopped.
10779 (send_sigstop_callback): New.
10780 (stop_all_lwps): Use send_sigstop_callback instead.
10781 (linux_resume_one_thread): Adjust.
10782 (proceed_one_lwp): Still proceed an LWP that the client has
10783 requested to stop, if we haven't reported it as stopped yet. Make
10784 sure that LWPs the client want stopped, have a pending SIGSTOP.
10785
10786 2010-04-26 Doug Evans <dje@google.com>
10787
10788 * server.c (handle_general_set): Make static.
10789
10790 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10791 Print received char after testing for error/eof instead of before.
10792 (input_interrupt): Tweak comment.
10793
10794 2010-04-23 Doug Evans <dje@google.com>
10795
10796 * server.c (start_inferior): Print inferior argv if --debug.
10797
10798 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10799
10800 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10801 * nto-x86-low.c: Include server.h
10802
10803 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10804
10805 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10806 be consistent with other sources of this directory.
10807 (init_registers_amd64): Correct name of source file of this function
10808 in the comment.
10809
10810 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10811
10812 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10813 64-bit executables.
10814
10815 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10816
10817 * win32-i386-low.c: Add 64-bit support.
10818 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10819 (init_registers_amd64): Declare.
10820 (mappings): Add 64-bit version of array.
10821 (init_windows_x86): New function.
10822 (the_low_target): Change init_arch field to init_windows_x86.
10823
10824 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10825
10826 * win32-low.c: Adapt to support also 64-bit architecture.
10827 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10828 (get_image_name): Use SIZE_T type for local variable `done'.
10829 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10830 (toolhelp_get_dll_name): Idem.
10831 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10832 Use uintptr_t typecast to avoid warning.
10833 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10834 (handle_exception): Use phex_nz to avoid warning.
10835 (win32_wait): Remove unused local variable `process'.
10836
10837 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10838
10839 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10840 `amd64-avx.o'.
10841
10842 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10843
10844 * configure.ac: Use `ws2_32' library for srv_mingw.
10845 * configure: Regenerate.
10846 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10847 * remote-utils.c: Likewise.
10848
10849 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10850
10851 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10852 if __x86_64__ is defined.
10853
10854 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10855
10856 * configure: Regenerate.
10857
10858 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10859
10860 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10861 * target.h (target_ops): New get_tib_address field.
10862 * win32-low.h (win32_thread_info): Add thread_local_base field.
10863 * win32-low.c (child_add_thread): Add tlb argument.
10864 Set thread_local_base field to TLB.
10865 (get_child_debug_event): Adapt to child_add_thread change.
10866 (win32_get_tib_address): New function.
10867 (win32_target_ops): Set get_tib_address field to
10868 win32_get_tib_address.
10869 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10870
10871 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10872
10873 * linux-low.c (linux_mourn): Also remove the process.
10874 * server.c (handle_target_event): Don't remove the process here.
10875 * nto-low.c (nto_mourn): New.
10876 (nto_target_ops): Install it.
10877 * spu-low.c (spu_mourn): New.
10878 (spu_target_ops): Install it.
10879 * win32-low.c (win32_mourn): New.
10880 (win32_target_ops): Install it.
10881
10882 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10883
10884 * server.h (buffer_xml_printf): Remove redundant `;'.
10885
10886 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10887
10888 * regcache.c (set_register_cache): Invalidate regcaches before
10889 changing the register cache layout.
10890 (regcache_invalidate_one): Allow a NULL regcache.
10891 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10892 regcaches before changing the register cache layout or the target
10893 regsets.
10894
10895 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10896
10897 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10898 variable warning on Linux/x86-64.
10899
10900 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10901
10902 GDBserver disconnected tracing support.
10903
10904 * linux-low.c (linux_remove_process): Delete.
10905 (add_lwp): Don't set last_resume_kind here.
10906 (linux_kill): Use `mourn'.
10907 (linux_detach): Use `thread_db_detach', and `mourn'.
10908 (linux_mourn): New.
10909 (linux_attach_lwp_1): Adjust comment.
10910 (linux_attach): last_resume_kind moved the thread_info; adjust.
10911 (status_pending_p_callback): Adjust.
10912 (linux_wait_for_event_1): Adjust.
10913 (count_events_callback, select_singlestep_lwp_callback)
10914 (select_event_lwp_callback, cancel_breakpoints_callback)
10915 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10916 (proceed_one_lwp): Adjust.
10917 (linux_async): Add debug output.
10918 (linux_thread_stopped): New.
10919 (linux_pause_all): New.
10920 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10921 linux_pause_all.
10922 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10923 (thread_db_free): Delete declaration.
10924 (thread_db_detach, thread_db_mourn): Declare.
10925 * thread-db.c (thread_db_init): Use thread_db_mourn.
10926 (thread_db_free): Delete, split in two.
10927 (disable_thread_event_reporting): New.
10928 (thread_db_detach): New.
10929 (thread_db_mourn): New.
10930
10931 * server.h (struct thread_info) <last_resume_kind>: New field.
10932 <attached>: Add comment.
10933 <gdb_detached>: New field.
10934 (handler_func): Change return type to int.
10935 (handle_serial_event, handle_target_event): Ditto.
10936 (gdb_connected): Declare.
10937 (tracing): Delete.
10938 (disconnected_tracing): Declare.
10939 (stop_tracing): Declare.
10940
10941 * server.c (handle_query) <qSupported>: Report support for
10942 disconnected tracing.
10943 (queue_stop_reply_callback): Account for running threads.
10944 (gdb_wants_thread_stopped): New.
10945 (gdb_wants_all_threads_stopped): New.
10946 (gdb_reattached_process): New.
10947 (handle_status): Clear the `gdb_detached' flag of all processes.
10948 In all-stop, stop all threads.
10949 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10950 (process_serial_event): If the remote connection breaks, or if an
10951 exit was forced with "monitor exit", force an event loop exit.
10952 Handle disconnected tracing on detach.
10953 (handle_serial_event): Adjust.
10954 (handle_target_event): If GDB isn't connected, forward events back
10955 to the inferior, unless the last process exited, in which case,
10956 exit gdbserver. Adjust interface.
10957
10958 * remote-utils.c (remote_open): Don't block in accept. Instead
10959 register an event loop source on the listen socket file
10960 descriptor. Refactor bits into ...
10961 (listen_desc): ... this new global.
10962 (gdb_connected): ... this new function.
10963 (enable_async_notification): ... this new function.
10964 (handle_accept_event): ... this new function.
10965 (remote_close): Clear remote_desc.
10966
10967 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10968
10969 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10970 New fields.
10971 (mourn_inferior): Define.
10972 (target_process_qsupported): Avoid the dangling else problem.
10973 (thread_stopped): Define.
10974 (pause_all): Define.
10975 (target_waitstatus_to_string): Declare.
10976 * target.c (target_waitstatus_to_string): New.
10977
10978 * tracepoint.c (tracing): Make extern.
10979 (disconnected_tracing): New.
10980 (stop_tracing): Make extern. Handle tracing stops due to GDB
10981 disconnecting.
10982 (cmd_qtdisconnected): New.
10983 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10984 (handle_tracepoint_general_set): Handle QTDisconnected.
10985
10986 * event-loop.c (event_handler_func): Change return type to int.
10987 (process_event): Bail out if the event handler wants the event
10988 loop to stop.
10989 (handle_file_event): Ditto.
10990 (start_event_loop): Bail out if the event handler wants the event
10991 loop to stop.
10992
10993 * nto-low.c (nto_target_ops): Adjust.
10994 * spu-low.c (spu_wait): Don't remove the process here.
10995 (spu_target_ops): Adjust.
10996 * win32-low.c (win32_wait): Don't remove the process here.
10997 (win32_target_ops): Adjust.
10998
10999 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11000
11001 * regcache.c (realloc_register_cache): Invalidate inferior's
11002 regcache before recreating it.
11003
11004 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11005
11006 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11007
11008 2010-04-09 Stan Shebs <stan@codesourcery.com>
11009 Pedro Alves <pedro@codesourcery.com>
11010
11011 * server.h (LONGEST): New.
11012 (struct thread_info) <while_stepping>: New field.
11013 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11014 Declare.
11015 (initialize_tracepoint, handle_tracepoint_general_set)
11016 (handle_tracepoint_query, tracepoint_finished_step)
11017 (tracepoint_was_hit, release_while_stepping_state_list):
11018 (current_traceframe): Declare.
11019 * server.c (handle_general_set): Handle tracepoint packets.
11020 (read_memory): New.
11021 (write_memory): New.
11022 (handle_search_memory_1): Use read_memory.
11023 (handle_query): Report support for conditional tracepoints, trace
11024 state variables, and tracepoint sources. Handle tracepoint
11025 queries.
11026 (main): Initialize the tracepoints module.
11027 (process_serial_event): Handle traceframe reads/writes.
11028
11029 * linux-low.c (handle_tracepoints): New.
11030 (linux_wait_1): Call it.
11031 (linux_resume_one_lwp): Handle while-stepping.
11032 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11033 (linux_target_ops): Install them.
11034 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11035 New field.
11036 * linux-x86-low.c (x86_supports_tracepoints): New.
11037 (the_low_target). Install it.
11038
11039 * mem-break.h (delete_breakpoint): Declare.
11040 * mem-break.c (delete_breakpoint): Make external.
11041
11042 * target.h (struct target_ops): Add `supports_tracepoints',
11043 `read_pc', and `write_pc' fields.
11044 (target_supports_tracepoints): Define.
11045 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11046 (phex_nz): New.
11047
11048 * regcache.h (struct regcache) <registers_owned>: New field.
11049 (init_register_cache, regcache_cpy): Declare.
11050 (regcache_read_pc, regcache_write_pc): Declare.
11051 (register_cache_size): Declare.
11052 (supply_regblock): Declare.
11053 * regcache.c (init_register_cache): New.
11054 (new_register_cache): Use it.
11055 (regcache_cpy): New.
11056 (register_cache_size): New.
11057 (supply_regblock): New.
11058 (regcache_read_pc, regcache_write_pc): New.
11059
11060 * tracepoint.c: New.
11061
11062 * Makefile.in (OBS): Add tracepoint.o.
11063 (tracepoint.o): New rule.
11064
11065 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11066
11067 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11068 (i386-mmx.o): New.
11069 (i386-mmx.c): Likewise.
11070 (i386-mmx-linux.o): Likewise.
11071 (i386-mmx-linux.c): Likewise.
11072
11073 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11074 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11075 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11076 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11077
11078 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11079 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11080 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11081
11082 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11083
11084 * Makefile.in (clean): Updated.
11085 (i386-avx.o): New.
11086 (i386-avx.c): Likewise.
11087 (i386-avx-linux.o): Likewise.
11088 (i386-avx-linux.c): Likewise.
11089 (amd64-avx.o): Likewise.
11090 (amd64-avx.c): Likewise.
11091 (amd64-avx-linux.o): Likewise.
11092 (amd64-avx-linux.c): Likewise.
11093
11094 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11095 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11096 (srv_amd64_regobj): Add amd64-avx.o.
11097 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11098 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11099 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11100 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11101 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11102 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11103 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11104
11105 * i387-fp.c: Include "i386-xstate.h".
11106 (i387_xsave): New.
11107 (i387_cache_to_xsave): Likewise.
11108 (i387_xsave_to_cache): Likewise.
11109 (x86_xcr0): Likewise.
11110
11111 * i387-fp.h (i387_cache_to_xsave): Likewise.
11112 (i387_xsave_to_cache): Likewise.
11113 (x86_xcr0): Likewise.
11114
11115 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11116 * linux-crisv32-low.c (target_regsets): Likewise.
11117 * linux-m68k-low.c (target_regsets): Likewise.
11118 * linux-mips-low.c (target_regsets): Likewise.
11119 * linux-ppc-low.c (target_regsets): Likewise.
11120 * linux-s390-low.c (target_regsets): Likewise.
11121 * linux-sh-low.c (target_regsets): Likewise.
11122 * linux-sparc-low.c (target_regsets): Likewise.
11123 * linux-xtensa-low.c (target_regsets): Likewise.
11124
11125 * linux-low.c: Include <sys/uio.h>.
11126 (regsets_fetch_inferior_registers): Support nt_type.
11127 (regsets_store_inferior_registers): Likewise.
11128 (linux_process_qsupported): New.
11129 (linux_target_ops): Add linux_process_qsupported.
11130
11131 * linux-low.h (regset_info): Add nt_type.
11132 (linux_target_ops): Add process_qsupported.
11133
11134 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11135 and <sys/uio.h>.
11136 (init_registers_i386_avx_linux): New.
11137 (init_registers_amd64_avx_linux): Likewise.
11138 (xmltarget_i386_linux_no_xml): Likewise.
11139 (xmltarget_amd64_linux_no_xml): Likewise.
11140 (PTRACE_GETREGSET): Likewise.
11141 (PTRACE_SETREGSET): Likewise.
11142 (x86_fill_xstateregset): Likewise.
11143 (x86_store_xstateregset): Likewise.
11144 (use_xml): Likewise.
11145 (x86_linux_update_xmltarget): Likewise.
11146 (x86_linux_process_qsupported): Likewise.
11147 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11148 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11149 init_registers_i386_linux here. Call
11150 x86_linux_update_xmltarget.
11151 (the_low_target): Add x86_linux_process_qsupported.
11152
11153 * server.c (handle_query): Call target_process_qsupported.
11154
11155 * target.h (target_ops): Add process_qsupported.
11156 (target_process_qsupported): New.
11157
11158 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11159
11160 * inferiors.c (add_thread): Set last_status kind to
11161 TARGET_WAITKIND_IGNORE.
11162 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11163 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11164 (linux_wait_1): Move `thread' local definition to block that uses
11165 it. Don't NULL initialize `event_child'.
11166 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11167 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11168 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11169
11170 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11171
11172 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11173 an extended waitstatus, or by a watchpoint.
11174 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11175 thread was stepping or has been stopped by a watchpoint.
11176
11177 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11178
11179 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11180 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11181 of another, then delete the previous, and validate all
11182 breakpoints.
11183 (validate_inserted_breakpoint): New.
11184 (delete_disabled_breakpoints): New.
11185 (validate_breakpoints): New.
11186 (check_mem_read): Validate breakpoints before trusting their
11187 shadow. Delete disabled breakpoints.
11188 (check_mem_write): Validate breakpoints before trusting they
11189 should be inserted. Delete disabled breakpoints.
11190 * mem-break.h (validate_breakpoints):
11191 * server.c (handle_query): Validate breakpoints when we see a
11192 qSymbol query.
11193
11194 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11195
11196 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11197 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11198 if we could tell there's a GDB breakpoint at stop_pc.
11199 (need_step_over_p): Don't do a step over if we find a GDB
11200 breakpoint at the resume PC.
11201
11202 * mem-break.c (struct raw_breakpoint): New.
11203 (enum bkpt_type): New type `gdb_breakpoint'.
11204 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11205 fields. New field `raw'.
11206 (find_raw_breakpoint_at): New.
11207 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11208 breakpoint instead.
11209 (set_breakpoint_at): Adjust.
11210 (delete_raw_breakpoint): New.
11211 (release_breakpoint): New.
11212 (delete_breakpoint): Rename to...
11213 (delete_breakpoint_1): ... this. Add proc parameter. Use
11214 release_breakpoint. Return ENOENT.
11215 (delete_breakpoint): Reimplement.
11216 (find_breakpoint_at): Delete.
11217 (find_gdb_breakpoint_at): New.
11218 (delete_breakpoint_at): Delete.
11219 (set_gdb_breakpoint_at): New.
11220 (delete_gdb_breakpoint_at): New.
11221 (gdb_breakpoint_here): New.
11222 (set_reinsert_breakpoint): Use release_breakpoint.
11223 (uninsert_breakpoint): Rename to ...
11224 (uninsert_raw_breakpoint): ... this.
11225 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11226 (reinsert_raw_breakpoint): Change parameter type to
11227 raw_breakpoint.
11228 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11229 instead.
11230 (check_breakpoints): Adjust. Use release_breakpoint.
11231 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11232 (breakpoint_inserted_here): Ditto.
11233 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11234 Don't trust the breakpoint's shadow if it is not inserted.
11235 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11236 (delete_all_breakpoints): Adjust.
11237 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11238 use delete_breakpoint_1.
11239
11240 * mem-break.h (breakpoints_supported): Delete declaration.
11241 (set_gdb_breakpoint_at): Declare.
11242 (gdb_breakpoint_here): Declare.
11243 (delete_breakpoint_at): Delete.
11244 (delete_gdb_breakpoint_at): Declare.
11245
11246 * server.h (struct raw_breakpoint): Forward declare.
11247 (struct process_info): New field `raw_breakpoints'.
11248
11249 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11250 breakpoints.
11251
11252 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11253
11254 * linux-low.c (status_pending_p_callback): Fix comment.
11255 (linux_wait_for_event_1): Move most of the internal breakpoint
11256 handling from here...
11257 (linux_wait_1): ... to here.
11258 (count_events_callback): New.
11259 (select_singlestep_lwp_callback): New.
11260 (select_event_lwp_callback): New.
11261 (cancel_breakpoints_callback): New.
11262 (select_event_lwp): New.
11263 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11264 priority to all LWPs that have had events that should be reported
11265 to the client. Cancel breakpoints when about to reporting the
11266 event to the client, not while stopping lwps. No longer cancel
11267 finished single-steps here.
11268 (cancel_finished_single_step): Delete.
11269 (cancel_finished_single_steps): Delete.
11270
11271 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11272
11273 * mem-break.c (enum bkpt_type): New.
11274 (struct breakpoint): New field `type'.
11275 (set_breakpoint_at): Change return type to struct breakpoint
11276 pointer. Set type to `other_breakpoint' by default.
11277 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11278 in the breakpoint list.
11279 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11280 (reinsert_breakpoint): Rename to ...
11281 (reinsert_raw_breakpoint): ... this.
11282 (reinsert_breakpoints_at): Adjust.
11283 * mem-break.h (struct breakpoint): Declare.
11284 (set_breakpoint_at): Change return type to struct breakpoint
11285 pointer.
11286
11287 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11288
11289 * server.c (handle_query): Assign, not compare.
11290
11291 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11292
11293 Teach linux gdbserver to step-over-breakpoints.
11294
11295 * linux-low.c (can_hardware_single_step): New.
11296 (supports_breakpoints): New.
11297 (handle_extended_wait): If stopping threads, read the stop pc of
11298 the new cloned LWP.
11299 (get_pc): New.
11300 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11301 low target doesn't support retrieving the PC.
11302 (add_lwp): Set last_resume_kind to resume_continue.
11303 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11304 (linux_attach): Don't clear stop_expected. Set the lwp's
11305 last_resume_kind to resume_stop.
11306 (linux_detach_one_lwp): Don't check for removed breakpoints.
11307 (check_removed_breakpoint): Delete.
11308 (status_pending_p): Rename to ...
11309 (status_pending_p_callback): ... this. Don't check for removed
11310 breakpoints. Don't consider threads that are stopped from GDB's
11311 perspective.
11312 (linux_wait_for_lwp): Always read the stop_pc here.
11313 (cancel_breakpoint): New.
11314 (step_over_bkpt): New global.
11315 (linux_wait_for_event_1): Implement stepping over breakpoints.
11316 (gdb_wants_lwp_stopped): New.
11317 (gdb_wants_all_stopped): New.
11318 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11319 single-step traps here. Store the thread's last reported target
11320 wait status.
11321 (send_sigstop): Don't clear stop_expected. Always set it,
11322 instead.
11323 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11324 (cancel_finished_single_step): New.
11325 (cancel_finished_single_steps): New.
11326 (wait_for_sigstop): Don't cancel finished single-step traps here.
11327 (linux_resume_one_lwp): Don't check for removed breakpoints.
11328 Don't set `step' on non-hardware step archs.
11329 (linux_set_resume_request): Ignore resume_stop requests if already
11330 stopping or stopped. Set the lwp's last_resume_kind.
11331 (resume_status_pending_p): Don't check for removed breakpoints.
11332 (need_step_over_p): New.
11333 (start_step_over): New.
11334 (finish_step_over): New.
11335 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11336 requests. Clear the thread's last reported target waitstatus.
11337 Don't use the `suspended' flag. Don't consider pending breakpoints.
11338 (linux_resume): Start a step-over if necessary.
11339 (proceed_one_lwp): New.
11340 (proceed_all_lwps): New.
11341 (unstop_all_lwps): New.
11342 * linux-low.h (struct lwp_info): Rewrite comment for the
11343 `suspended' flag. Add the `stop_pc' field. Delete the
11344 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11345 Add `'last_resume_kind' and `need_step_over' fields.
11346 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11347 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11348 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11349 (set_raw_breakpoint_at): New.
11350 (set_breakpoint_at): Rewrite to use it.
11351 (reinsert_breakpoint_handler): Delete.
11352 (set_reinsert_breakpoint): New.
11353 (reinsert_breakpoint_by_bp): Delete.
11354 (delete_reinsert_breakpoints): New.
11355 (uninsert_breakpoint): Rewrite.
11356 (uninsert_breakpoints_at): New.
11357 (reinsert_breakpoint): Rewrite.
11358 (reinsert_breakpoints_at): New.
11359 (check_breakpoints): Rewrite.
11360 (breakpoint_here): New.
11361 (breakpoint_inserted_here): New.
11362 (check_mem_read): Adjust.
11363 * mem-break.h (breakpoints_supported, breakpoint_here)
11364 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11365 (reinsert_breakpoint_by_bp): Delete declaration.
11366 (delete_reinsert_breakpoints): Declare.
11367 (reinsert_breakpoint): Delete declaration.
11368 (reinsert_breakpoints_at): Declare.
11369 (uninsert_breakpoint): Delete declaration.
11370 (uninsert_breakpoints_at): Declare.
11371 (check_breakpoints): Adjust prototype.
11372 * server.h: Adjust include order.
11373 (struct thread_info): Declare here. Add a `last_status' field.
11374
11375 2010-03-23 Michael Snyder <msnyder@vmware.com>
11376
11377 * server.c (crc32): New function.
11378 (handle_query): Add handling for 'qCRC:' request.
11379
11380 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11381
11382 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11383 lwp had been stopped by a watchpoint.
11384
11385 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11386
11387 * server.h (internal_error): Declare.
11388 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11389 * utils.c (internal_error): New function.
11390
11391 2010-03-15 Andreas Schwab <schwab@redhat.com>
11392
11393 * configure.srv: Fix typo setting srv_regobj.
11394
11395 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11396
11397 * linux-low.c (fetch_register): Avoid passing a non string literal
11398 format to `error'.
11399 (usr_store_inferior_registers): Ditto.
11400
11401 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11402
11403 * linux-low.c (linux_write_memory): Bail out early if peeking
11404 memory failed.
11405
11406 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11407
11408 * linux-low.h (struct lwp_info): New fields
11409 `stopped_by_watchpoint' and `stopped_data_address'.
11410 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11411 here, and cache them in the lwp object.
11412 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11413 directly.
11414 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11415 field.
11416 (linux_stopped_by_watchpoint): Rewrite.
11417 (linux_stopped_data_address): Rewrite.
11418
11419 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11420
11421 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11422 switching the current inferior, not before.
11423
11424 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11425
11426 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11427 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11428 i386-linux.c and amd64-linux.c.
11429 (reg-i386.o): Removed.
11430 (reg-i386.c): Likewise.
11431 (reg-i386-linux.o): Likewise.
11432 (reg-i386-linux.c): Likewise.
11433 (reg-x86-64.o): Likewise.
11434 (reg-x86-64.c): Likewise.
11435 (reg-x86-64-linux.o): Likewise.
11436 (reg-x86-64-linux.c): Likewise.
11437 (i386.o): New.
11438 (i386.c): Likewise.
11439 (i386-linux.o): Likewise.
11440 (i386-linux.c): Likewise.
11441 (amd64.o): Likewise.
11442 (amd64.c): Likewise.
11443 (amd64-linux.o): Likewise.
11444 (amd64-linux.c): Likewise.
11445
11446 * configure.srv (srv_i386_regobj): New.
11447 (srv_i386_linux_regobj): Likewise.
11448 (srv_amd64_regobj): Likewise.
11449 (srv_amd64_linux_regobj): Likewise.
11450 (srv_i386_32bit_xmlfiles): Likewise.
11451 (srv_i386_64bit_xmlfiles): Likewise.
11452 (srv_i386_xmlfiles): Likewise.
11453 (srv_amd64_xmlfiles): Likewise.
11454 (srv_i386_linux_xmlfiles): Likewise.
11455 (srv_amd64_linux_xmlfiles): Likewise.
11456 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11457 srv_xmlfiles to $srv_i386_xmlfiles.
11458 (i[34567]86-*-mingw32ce*): Likewise.
11459 (i[34567]86-*-mingw*): Likewise.
11460 (i[34567]86-*-nto*): Likewise.
11461 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11462 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11463 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11464 (x86_64-*-linux*): Likewise.
11465
11466 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11467 (init_registers_amd64_linux): New.
11468 (x86_arch_setup): Replace init_registers_x86_64_linux with
11469 init_registers_amd64_linux.
11470
11471 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11472
11473 * configure.ac: Check for libdl. If it is not available link against
11474 static libthread_db.
11475 * configure: Regenerate.
11476
11477 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11478
11479 PR9605
11480
11481 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11482 handing a read watchpoint.
11483 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11484
11485 2010-02-12 Doug Evans <dje@google.com>
11486
11487 * linux-low.c (linux_supports_tracefork_flag): Document.
11488 (linux_look_up_symbols): Add comment.
11489
11490 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11491
11492 * regcache.c (supply_register): Clear regcache if buf is NULL.
11493
11494 2010-02-02 Nicolas Roche <roche@sourceware.org>
11495 Joel Brobecker <brobecker@adacore.com>
11496
11497 * inferiors.c (find_inferior): Add function documentation.
11498 (unloaded_dll): Handle the case where the unloaded dll has not
11499 been previously registered in the dll list.
11500
11501 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11502
11503 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11504 (thumb2_breakpoint): New.
11505 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11506
11507 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11508
11509 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11510 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11511 breakpoints.
11512
11513 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11514
11515 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11516
11517 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11518
11519 * linux-s390-low.c (s390_collect_ptrace_register)
11520 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11521
11522 2010-01-21 Doug Evans <dje@google.com>
11523
11524 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11525 (PTRACE_ARG4_TYPE): New macro.
11526 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11527 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11528 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11529 (usr_store_inferior_registers): Ditto.
11530 (linux_read_memory, linux_write_memory): Ditto.
11531 (linux_test_for_tracefork): Ditto.
11532
11533 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11534 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11535
11536 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11537
11538 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11539 target.
11540
11541 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11542
11543 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11544 prototype to take a regcache. Adjust.
11545
11546 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11547
11548 * regcache.h (struct thread_info): Forward declare.
11549 (struct regcache): New.
11550 (new_register_cache): Adjust prototype.
11551 (get_thread_regcache): Declare.
11552 (free_register_cache): Adjust prototype.
11553 (registers_to_string, registers_from_string): Ditto.
11554 (supply_register, supply_register_by_name, collect_register)
11555 (collect_register_as_string, collect_register_by_name): Ditto.
11556 * regcache.c (struct inferior_regcache_data): Delete.
11557 (get_regcache): Rename to ...
11558 (get_thread_regcache): ... this. Adjust. Switch inferior before
11559 fetching registers.
11560 (regcache_invalidate_one): Adjust.
11561 (regcache_invalidate): Fix prototype.
11562 (new_register_cache): Return the new register cache.
11563 (free_register_cache): Change prototype.
11564 (realloc_register_cache): Adjust.
11565 (registers_to_string): Change prototype to take a regcache. Adjust.
11566 (registers_from_string): Ditto.
11567 (register_data): Ditto.
11568 (supply_register): Ditto.
11569 (supply_register_by_name): Ditto.
11570 (collect_register): Ditto.
11571 (collect_register_as_string): Ditto.
11572 (collect_register_by_name): Ditto.
11573 * server.c (process_serial_event): Adjust.
11574 * linux-low.h (regset_fill_func, regset_store_func): Change
11575 prototype.
11576 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11577 Change prototype.
11578 * linux-low.c (get_stop_pc): Adjust.
11579 (check_removed_breakpoint): Adjust.
11580 (linux_wait_for_event): Adjust.
11581 (linux_resume_one_lwp): Adjust.
11582 (fetch_register): Add regcache parameter. Adjust.
11583 (usr_store_inferior_registers): Ditto.
11584 (regsets_fetch_inferior_registers): Ditto.
11585 (regsets_store_inferior_registers): Ditto.
11586 (linux_fetch_registers, linux_store_registers): Ditto.
11587 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11588 regcache. Adjust.
11589 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11590 Ditto.
11591 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11592 prototype to take a regcache.
11593 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11594 * remote-utils.c (convert_ascii_to_int, outreg)
11595 (prepare_resume_reply): Change prototype to take a regcache.
11596 Adjust.
11597 * target.h (struct target_ops) <fetch_registers, store_registers>:
11598 Change prototype to take a regcache.
11599 (fetch_inferior_registers, store_inferior_registers): Change
11600 prototype to take a regcache. Adjust.
11601 * proc-service.c (ps_lgetregs): Adjust.
11602 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11603 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11604 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11605 take a regcache. Adjust.
11606 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11607 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11608 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11609 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11610 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11611 (cris_cannot_fetch_register):
11612 (cris_breakpoint_at): Change prototype to take a regcache.
11613 Adjust.
11614 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11615 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11616 to take a regcache. Adjust.
11617 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11618 Adjust.
11619 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11620 take a regcache. Adjust.
11621 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11622 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11623 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11624 * linux-mips-low.c (mips_get_pc):
11625 (mips_set_pc): Change prototype to take a regcache. Adjust.
11626 (mips_reinsert_addr): Adjust.
11627 (mips_collect_register): Change prototype to take a regcache.
11628 Adjust.
11629 (mips_supply_register):
11630 (mips_collect_register_32bit, mips_supply_register_32bit)
11631 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11632 (mips_store_fpregset): Ditto.
11633 * linux-ppc-low.c (ppc_supply_ptrace_register)
11634 (ppc_supply_ptrace_register): Ditto.
11635 (parse_spufs_run): Adjust.
11636 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11637 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11638 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11639 take a regcache. Adjust.
11640 * linux-s390-low.c (s390_collect_ptrace_register)
11641 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11642 (s390_set_pc): Change prototype to take a regcache. Adjust.
11643 (s390_arch_setup): Adjust.
11644 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11645 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11646 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11647 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11648 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11649 regcache. Adjust.
11650 (sparc_breakpoint_at): Adjust.
11651 * linux-xtensa-low.c (xtensa_fill_gregset):
11652 (xtensa_store_gregset):
11653 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11654 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11655 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11656 prototype to take a regcache. Adjust.
11657 * win32-arm-low.c (arm_fetch_inferior_register)
11658 (arm_store_inferior_register): Change prototype to take a
11659 regcache. Adjust.
11660 * win32-i386-low.c (i386_fetch_inferior_register)
11661 (i386_store_inferior_register): Change prototype to take a
11662 regcache. Adjust.
11663 * win32-low.c (child_fetch_inferior_registers)
11664 (child_store_inferior_registers): Change prototype to take a
11665 regcache. Adjust.
11666 (win32_wait): Adjust.
11667 (win32_fetch_inferior_registers): Change prototype to take a
11668 regcache. Adjust.
11669 (win32_store_inferior_registers): Adjust.
11670 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11671 store_inferior_register>: Change prototype to take a regcache.
11672
11673 2010-01-20 Doug Evans <dje@google.com>
11674
11675 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11676 #ifdef.
11677 (linux_wait_for_event1, linux_init_signals): Ditto.
11678 (W_STOPCODE): Provide definition if missing.
11679
11680 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11681
11682 * linux-low.c (linux_core_of_thread): New.
11683 (compare_ints, show_process, list_threads): New.
11684 (linux_qxfer_osdata): Report threads and cores.
11685 (linux_target_op): Register linux_core_of_thread.
11686 * remote-utils.c (prepare_resume_reply): Report the core.
11687 (buffer_xml_printf): Support %d specifier.
11688 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11689 New.
11690 (handle_query): Handle qXfer:threads. Announce availability
11691 thereof.
11692 * target.h (struct target_ops): New field core_of_thread.
11693
11694 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11695
11696 * Makefile.in (clean): Remove new generated files.
11697 (reg-s390.o, reg-s390.c): Remove rules.
11698 (reg-s390x.o, reg-s390x.c): Likewise.
11699 (s390-linux32.o, s390-linux32.c): Add rules.
11700 (s390-linux64.o, s390-linux64.c): Likewise.
11701 (s390x-linux64.o, s390x-linux64.c): Likewise.
11702 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11703 * linux-s390-low.c: Include <elf.h>.
11704 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11705 (init_registers_s390): Remove prototype.
11706 (init_registers_s390x): Likewise.
11707 (init_registers_s390_linux32): Add prototype.
11708 (init_registers_s390_linux64): Likewise.
11709 (init_registers_s390x_linux64): Likewise.
11710 (s390_num_regs_3264): New define.
11711 (s390_regmap_3264): New global variable.
11712 (s390_cannot_fetch_register): Remove obsolete check.
11713 (s390_cannot_store_register): Likewise.
11714 (s390_collect_ptrace_register): Handle upper/lower register halves.
11715 (s390_supply_ptrace_register): Likewise.
11716 (s390_fill_gregset): Update to register number changes.
11717 (s390_get_hwcap): New routine.
11718 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11719 Install appropriate regmap and register set.
11720
11721 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11722
11723 * server.c (gdbserver_version): Update copyright year to 2010.
11724 * gdbreplay.c (gdbreplay_version): Likewise.
11725
11726 2009-12-28 Doug Evans <dje@google.com>
11727
11728 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11729 elf/external.h. Include <elf.h> instead but only if necessary.
11730
11731 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11732
11733 * linux-low.c (linux_remove_process): Remove `detaching'
11734 parameter. Don't release/detach from thread_db here.
11735 (linux_kill): Release/detach from thread_db here, ...
11736 (linux_detach): ... and here, before actually detaching.
11737 (linux_wait_1): ... and here, when a process exits.
11738 * thread-db.c (any_thread_of): New.
11739 (thread_db_free): Switch the current inferior to a thread of the
11740 passed in process.
11741
11742 2009-12-21 Doug Evans <dje@google.com>
11743
11744 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11745
11746 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11747 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11748 warning ifndef __NR_tkill. Move setting of errno there too.
11749 Delete unnecessary resetting of errno after syscall.
11750 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11751
11752 * configure.ac: Check for dladdr.
11753 * config.in: Regenerate.
11754 * configure: Regenerate.
11755 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11756 (try_thread_db_load): Update.
11757
11758 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11759
11760 2009-12-18 Doug Evans <dje@google.com>
11761
11762 * event-loop.c: Include unistd.h if it exists.
11763
11764 * linux-low.c (my_waitpid): Move definition away from being in
11765 between linux_tracefork_child/linux_test_for_tracefork.
11766
11767 * gdb_proc_service.h (psaddr_t): Fix type.
11768 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11769 signature to match glibc.
11770
11771 2009-12-16 Doug Evans <dje@google.com>
11772
11773 * linux-low.c (linux_read_memory): Fix argument to read.
11774
11775 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11776
11777 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11778 events, don't leave current_inferior pointing at null.
11779
11780 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11781
11782 * win32-low.c (LOG): Delete.
11783 (OUTMSG): Output to stderr.
11784 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11785 on compile time LOG macro.
11786 (win32_wait): Fix debug output.
11787
11788 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11789
11790 * win32-low.c (win32_add_one_solib): If the dll name is
11791 "ntdll.dll", prepend the system directory to the dll path.
11792
11793 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11794
11795 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11796
11797 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11798 Vladimir Prus <vladimir@codesourcery.com>
11799
11800 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11801 * configure.ac: Check for __mcoldfire__ and set
11802 gdb_cv_m68k_is_coldfire.
11803 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11804 reg-cf.o and reg-m68k.o.
11805 * configure: Regenerated.
11806
11807 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11808
11809 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11810 Pass it to thread_db_free.
11811 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11812 proper `detaching' argument to linux_remove_process.
11813 * linux-low.h (thread_db_free): Add `detaching' parameter.
11814 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11815 to thread_db_free.
11816 (thread_db_free): Add `detaching' parameter. Only
11817 call td_ta_clear_event if detaching from process.
11818
11819 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11820
11821 * thread-db.c (thread_db_free): Fix typo.
11822
11823 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11824
11825 PR gdb/10838
11826 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11827
11828 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11829
11830 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11831 with an i686 compiler.
11832 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11833 needed.
11834 * configure: Rebuilt.
11835
11836 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11837
11838 PR gdb/10783
11839
11840 * server.c (handle_search_memory_1): Correct read_addr initialization
11841 in loop for searching subsequent chunks.
11842
11843 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11844
11845 * configure.ac: New --with-libthread-db option.
11846 * thread-db.c: Allow direct dependence on libthread_db.
11847 (thread_db_free): Adjust.
11848 * config.in: Regenerate.
11849 * configure: Likewise.
11850
11851 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11852
11853 PR gdb/10757
11854 * thread-db.c (attach_thread): New function.
11855 (maybe_attach_thread): Return success/failure.
11856 (find_new_threads_callback): Adjust.
11857 (thread_db_find_new_threads): Loop until no new threads.
11858
11859 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11860
11861 * proc-service.c (ps_lgetregs): Formatting.
11862
11863 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11864
11865 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11866 * configure.ac: Adjust.
11867 * linux-low.h (struct process_info_private): Move members to struct
11868 thread_db.
11869 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11870 * linux-low.c (linux_remove_process): Adjust.
11871 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11872 * server.c (handle_query): Move code ...
11873 (handle_monitor_command): ... here. New function.
11874 * target.h (struct target_ops): New member.
11875 * thread-db.c (struct thread_db): New.
11876 (libthread_db_search_path): New variable.
11877 (thread_db_create_event, thread_db_enable_reporting)
11878 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11879 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11880 (try_thread_db_load_1, dladdr_to_soname): New functions.
11881 (try_thread_db_load, thread_db_load_search): New functions.
11882 (thread_db_init): Search for libthread_db.
11883 (thread_db_free): New function.
11884 (thread_db_handle_monitor_command): Likewise.
11885 * config.in: Regenerate.
11886 * configure: Regenerate.
11887
11888 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11889
11890 * spu-low.c (spu_kill): Wait for inferior to terminate.
11891 Call clear_inferiors.
11892 (spu_detach): Call clear_inferiors.
11893
11894 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11895
11896 * aclocal.m4: Regenerate.
11897 * config.in: Likewise.
11898 * configure: Likewise.
11899
11900 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11901
11902 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11903 (parse_spufs_run): New function.
11904 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11905 (ppc_breakpoint_at): Handle SPU breakpoints.
11906
11907 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11908
11909 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11910 (SPUFS_MAGIC): Define.
11911 (spu_enumerate_spu_ids): New function.
11912 (linux_qxfer_spu): New function.
11913 (linux_target_ops): Install linux_qxfer_spu.
11914
11915 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11916
11917 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11918 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11919 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11920 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11921 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11922 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11923 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11924 (init_registers_powerpc_cell32l): Add prototype.
11925 (init_registers_powerpc_cell64l): Likewise.
11926 (ppc_arch_setup): Detect Cell/B.E. architecture.
11927
11928 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11929
11930 * Makefile.in (datarootdir): New variable.
11931
11932 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11933
11934 * linux-low.c (linux_write_memory): Update debugging output.
11935 * Makefile.in (clean): Add new descriptions.
11936 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11937 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11938 * configure.srv: Add new files for arm*-*-linux*.
11939 * linux-arm-low.c: Add new declarations.
11940 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11941 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11942 (HWCAP_VFPv3D16): New.
11943 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11944 instead of __IWMMXT__.
11945 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11946 (arm_arch_setup): New.
11947 (target_regsets): Remove #ifdef. Add VFP regset.
11948 (the_low_target): Use arm_arch_setup.
11949
11950 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11951
11952 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11953 the main thread again.
11954
11955 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11956
11957 Adding Neutrino gdbserver.
11958 * configure: Regenerated.
11959 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11960 * configure.srv (i[34567]86-*-nto*): New target.
11961 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11962 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11963 (nto_comctrl) [__QNX__]: New function.
11964 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11965
11966 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11967
11968 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11969 srv_tgtobj.
11970
11971 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11972 Pedro Alves <pedro@codesourcery.com>
11973
11974 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11975 don't support CONTEXT_EXTENDED_REGISTERS.
11976 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11977 (the_low_target): Install them.
11978 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11979 failing with ERROR_PIPE_NOT_CONNECTED.
11980
11981 2009-06-30 Doug Evans <dje@google.com>
11982 Pierre Muller <muller@ics.u-strasbg.fr>
11983
11984 Add h/w watchpoint support to x86-linux, win32-i386.
11985 * Makefile.in (SFILES): Add i386-low.c
11986 (i386_low_h): Define.
11987 (i386-low.o): Add dependencies.
11988 (linux-x86-low.o): Add i386-low.h dependency.
11989 (win32-i386-low.o): Ditto.
11990 * i386-low.c: New file.
11991 * i386-low.h: New file.
11992 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11993 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11994 * linux-low.c (linux_add_process): Initialize arch_private.
11995 (linux_remove_process): Free arch_private.
11996 (add_lwp): Initialize arch_private.
11997 (delete_lwp): Free arch_private.
11998 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11999 provided.
12000 * linux-low.h (process_info_private): New member arch_private.
12001 (lwp_info): New member arch_private.
12002 (linux_target_ops): New members new_process, new_thread,
12003 prepare_to_resume.
12004 (ptid_of): New macro.
12005 * linux-x86-low.c: Include stddef.h, i386-low.h.
12006 (arch_process_info): New struct.
12007 (arch_lwp_info): New struct.
12008 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12009 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12010 (i386_dr_low_get_status): New function.
12011 (x86_insert_point, x86_remove_point): New functions.
12012 (x86_stopped_by_watchpoint): New function.
12013 (x86_stopped_data_address): New function.
12014 (x86_linux_new_process, x86_linux_new_thread): New functions.
12015 (x86_linux_prepare_to_resume): New function.
12016 (the_low_target): Add entries for insert_point, remove_point,
12017 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12018 prepare_to_resume.
12019 * server.c (debug_hw_points): New global.
12020 (monitor_show_help): Document set debug-hw-points.
12021 (handle_query): Process "set debug-hw-points".
12022 * server.h (debug_hw_points): Declare.
12023 (paddress): Declare.
12024 * utils.c (NUMCELLS, CELLSIZE): New macros.
12025 (get_sell, xsnprintf, paddress): New functions.
12026 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12027 remove_point, stopped_by_watchpoint, stopped_data_address.
12028 * win32-i386-low.c: Include i386-low.h.
12029 (debug_reg_state): Replaces dr.
12030 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12031 (i386_dr_low_get_status): New function.
12032 (i386_insert_point, i386_remove_point): New functions.
12033 (i386_stopped_by_watchpoint): New function.
12034 (i386_stopped_data_address): New function.
12035 (i386_initial_stuff): Update.
12036 (get_thread_context,set_thread_context,i386_thread_added): Update.
12037 (the_low_target): Add entries for insert_point,
12038 remove_point, stopped_by_watchpoint, stopped_data_address.
12039 * win32-low.c (win32_insert_watchpoint): New function.
12040 (win32_remove_watchpoint): New function.
12041 (win32_stopped_by_watchpoint): New function.
12042 (win32_stopped_data_address): New function.
12043 (win32_target_ops): Add entries for insert_watchpoint,
12044 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12045 * win32-low.h (win32_target_ops): New members insert_point,
12046 remove_point, stopped_by_watchpoint, stopped_data_address.
12047
12048 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12049
12050 * server.c (process_serial_event): Re-return unsupported, not
12051 error, if the type isn't recognized. Re-allow supporting only
12052 insert or remove packets. Also call require_running for
12053 breakpoints. Add missing break statement to default case. Tidy.
12054 * target.h (struct target_ops): Rename insert_watchpoint to
12055 insert_point, and remove_watchpoint to remove_point.
12056
12057 * linux-low.h (struct linux_target_ops): Likewise.
12058 * linux-low.c (linux_insert_watchpoint): Rename to ...
12059 (linux_insert_point): ... this. Adjust.
12060 (linux_remove_watchpoint): Rename to ...
12061 (linux_remove_point): ... this. Adjust.
12062 (linux_target_ops): Adjust.
12063 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12064 (cris_insert_point): ... this.
12065 (cris_remove_watchpoint): Rename to ...
12066 (cris_remove_point): ... this.
12067 (the_low_target): Adjust.
12068
12069 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12070
12071 * server.c (handle_v_kill): Pass signal_pid to
12072 kill_inferior if multi_process is zero.
12073
12074 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12075
12076 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12077 * target.h (target_ops): Comment for *_watchpoint to make it clear
12078 the functions can get types '0' and '1'.
12079
12080 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12081
12082 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12083 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12084 * regcache.c (get_regcache): Likewise.
12085 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12086 * win32-low.c (child_fetch_inferior_registers): Remove check for
12087 regno 0.
12088
12089 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12090 Pedro Alves <pedro@codesourcery.com>
12091
12092 * target.h (struct target_ops) <supports_multi_process>: New
12093 callback.
12094 (target_supports_multi_process): New.
12095 * server.c (handle_query): Even if GDB reports support, only
12096 enable multi-process if the target also supports it. Report
12097 multi-process support only if the target backend supports it.
12098 * linux-low.c (linux_supports_multi_process): New function.
12099 (linux_target_ops): Install it as target_supports_multi_process
12100 callback.
12101
12102 2009-05-24 Doug Evans <dje@google.com>
12103
12104 Global renaming of find_thread_pid to find_thread_ptid.
12105 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12106 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12107 All callers updated.
12108
12109 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12110 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12111 directly.
12112
12113 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12114 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12115 (linux_resume_one_lwp): Ditto.
12116
12117 2009-05-23 Doug Evans <dje@google.com>
12118
12119 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12120 from struct inferior_list_entry * to struct lwp_info *.
12121 All callers updated.
12122
12123 2009-05-13 Doug Evans <dje@google.com>
12124
12125 * linux-x86-low.c: Don't include assert.h.
12126 (x86_siginfo_fixup): Use fatal, not assert.
12127 (x86_arch_setup): Fix comment.
12128
12129 2009-05-12 Doug Evans <dje@google.com>
12130
12131 Biarch support for i386/amd64 gdbserver.
12132 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12133 Add linux-x86-low.c.
12134 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12135 (linux-x86-low.o): Add.
12136 * linux-x86-64-low.c: Delete.
12137 * linux-i386-low.c: Delete.
12138 * linux-x86-low.c: New file.
12139 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12140 linux-x86-low.o.
12141 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12142 linux-x86-low.o.
12143 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12144 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12145 (linux_child_pid_to_exec_file): New function.
12146 (elf_64_header_p, elf_64_file_p): New functions.
12147 (siginfo_fixup): New function.
12148 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12149 give target a chance to convert layout.
12150 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12151 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12152
12153 2009-05-07 Doug Evans <dje@google.com>
12154
12155 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12156 (regsets_store_inferior_registers): Ditto.
12157
12158 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12159
12160 PR server/10048
12161
12162 * linux-low.c (must_set_ptrace_flags): Delete.
12163 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12164 of the global.
12165 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12166 `lwp->must_set_ptrace_flags' instead.
12167 (linux_wait_for_event_1): Set ptrace options here.
12168 (linux_wait_1): ... not here.
12169
12170 2009-04-30 Doug Evans <dje@google.com>
12171
12172 * inferiors.c (started_inferior_callback): New function.
12173 (attached_inferior_callback): New function.
12174 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12175 * server.c (print_started_pid, print_attached_pid): New functions.
12176 (detach_or_kill_for_exit): New function.
12177 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12178 * server.h (have_started_inferiors_p): Declare.
12179 (have_attached_inferiors_p): Declare.
12180
12181 * inferiors.c (remove_process): Fix memory leak, free process.
12182 * linux-low.c (linux_remove_process): New function.
12183 (linux_kill): Call it instead of remove_process.
12184 (linux_detach, linux_wait_1): Ditto.
12185
12186 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12187
12188 * configure.srv: Add x86 Windows CE target.
12189
12190 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12191
12192 * inferiors.c (get_thread_process): Make global.
12193 * server.h (get_thread_process): Add prototype.
12194 * thread-db.c (find_one_thread): Use get_thread_process
12195 instead of current_process.
12196 (thread_db_get_tls_address): Do not crash if called when
12197 thread layer is not yet initialized.
12198
12199 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12200
12201 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12202 * spu-low.c (current_tid): Rename to ...
12203 (current_ptid): ... this.
12204 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12205 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12206 ptid_get_lwp (current_ptid) instead of current_tid.
12207 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12208 instead of current_tid. Use find_process_pid to verify pid
12209 argument is valid. Pass proper argument to remove_process.
12210 (spu_thread_alive): Compare current_ptid instead of current_tid.
12211 (spu_resume): Likewise.
12212
12213 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12214
12215 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12216 variable.
12217
12218 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12219
12220 Implement the multiprocess extensions, and add linux multiprocess
12221 support.
12222
12223 * server.h (ULONGEST): Declare.
12224 (struct ptid, ptid_t): New.
12225 (minus_one_ptid, null_ptid): Declare.
12226 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12227 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12228 (struct inferior_list_entry): Change `id' type from unsigned from
12229 to ptid_t.
12230 (struct sym_cache, struct breakpoint, struct
12231 process_info_private): Forward declare.
12232 (struct process_info): Declare.
12233 (current_process): Declare.
12234 (all_processes): Declare.
12235 (initialize_inferiors): Declare.
12236 (add_thread): Adjust to use ptid_t.
12237 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12238 (add_process, remove_process, find_thread_pid): Declare.
12239 (find_inferior_id): Adjust to use ptid_t.
12240 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12241 (multi_process): Declare.
12242 (push_event): Adjust to use ptid_t.
12243 (read_ptid, write_ptid): Declare.
12244 (prepare_resume_reply): Adjust to use ptid_t.
12245 (clear_symbol_cache): Declare.
12246 * inferiors.c (all_processes): New.
12247 (null_ptid, minus_one_ptid): New.
12248 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12249 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12250 (add_thread): Change unsigned long to ptid. Remove gdb_id
12251 parameter. Adjust.
12252 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12253 (gdb_id_to_thread): Rename to ...
12254 (find_thread_pid): ... this. Change unsigned long to ptid.
12255 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12256 (loaded_dll, pull_pid_from_list): Adjust.
12257 (add_process, remove_process, find_process_pid)
12258 (get_thread_process, current_process, initialize_inferiors): New.
12259 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12260 (struct target_waitstatus) <related_pid>: Ditto.
12261 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12262 return type to int.
12263 (struct target_ops) <join>: Add `pid' argument.
12264 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12265 (struct target_ops) <wait>: Add `ptid' field. Change return type
12266 to ptid.
12267 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12268 (mywait): Add `ptid' argument. Change return type to ptid_t.
12269 (target_pid_to_str): Declare.
12270 * target.c (set_desired_inferior): Adjust to use ptids.
12271 (mywait): Add new `ptid' argument. Adjust.
12272 (target_pid_to_str): New.
12273 * mem-break.h (free_all_breakpoints): Declare.
12274 * mem-break.c (breakpoints): Delelete.
12275 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12276 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12277 to use per-process breakpoint list.
12278 (free_all_breakpoints): New.
12279 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12280 (symbol_cache, all_symbols_looked_up): Delete.
12281 (hexchars): New.
12282 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12283 read_ptid): New.
12284 (prepare_resume_reply): Change ptid argument's type from unsigned
12285 long to ptid_t. Adjust. Implement W;process and X;process.
12286 (free_sym_cache, clear_symbol_cache): New.
12287 (look_up_one_symbol): Adjust to per-process symbol cache. *
12288 * server.c (cont_thread, general_thread, step_thread): Change type
12289 to ptid_t.
12290 (attached): Delete.
12291 (multi_process): New.
12292 (last_ptid): Change type to ptid_t.
12293 (struct vstop_notif) <ptid>: Change type to ptid_t.
12294 (queue_stop_reply, push_event): Change `ptid' argument's type to
12295 ptid_t.
12296 (discard_queued_stop_replies): Add `pid' argument.
12297 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12298 changes. Don't reference the `attached' global.
12299 (attach_inferior): Adjust to mywait interface changes.
12300 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12301 features. Handle and report "multiprocess+". Handle
12302 "qAttached:PID".
12303 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12304 changes.
12305 (handle_v_kill): New.
12306 (handle_v_stopped): Adjust to use target_pid_to_str.
12307 (handle_v_requests): Allow multiple attaches and runs when
12308 multiprocess extensions are in effect. Handle "vKill".
12309 (myresume): Adjust to use ptids.
12310 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12311 (handle_status): Adjust to discard_queued_stop_replies interface
12312 change.
12313 (first_thread_of, kill_inferior_callback)
12314 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12315 (main): Call initialize_inferiors. Adjust to use ptids, killing
12316 and detaching from all inferiors. Handle multiprocess packet
12317 variants.
12318 * linux-low.h: Include gdb_proc_service.h.
12319 (struct process_info_private): New.
12320 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12321 <lwpid_of>: Use ptid_get_lwp.
12322 (get_lwp_thread): Adjust.
12323 (struct lwp_info): Add `dead' member.
12324 (find_lwp_pid): Declare.
12325 * linux-low.c (thread_db_active): Delete.
12326 (new_inferior): Adjust comment.
12327 (inferior_pid): Delete.
12328 (linux_add_process): New.
12329 (handle_extended_wait): Adjust.
12330 (add_lwp): Change unsigned long to ptid.
12331 (linux_create_inferior): Add process to processes table. Adjust
12332 to use ptids. Don't set new_inferior here.
12333 (linux_attach_lwp): Rename to ...
12334 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12335 it. Adjust to use ptids.
12336 (linux_attach_lwp): New.
12337 (linux_attach): Add process to processes table. Don't set
12338 new_inferior here.
12339 (struct counter): New.
12340 (second_thread_of_pid_p, last_thread_of_process_p): New.
12341 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12342 multiple processes.
12343 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12344 processes. Remove process from process table.
12345 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12346 to multiple processes.
12347 (any_thread_of): New.
12348 (linux_detach): Add `pid' argument, and handle it. Remove process
12349 from processes table.
12350 (linux_join): Add `pid' argument. Handle it.
12351 (linux_thread_alive): Change unsighed long argument to ptid_t.
12352 Consider dead lwps as not being alive.
12353 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12354 threads we're not interested in.
12355 (same_lwp, find_lwp_pid): New.
12356 (linux_wait_for_lwp): Change `pid' argument's type from int to
12357 ptid_t. Adjust.
12358 (linux_wait_for_event): Rename to ...
12359 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12360 from int to ptid_t. Adjust.
12361 (linux_wait_for_event): New.
12362 (linux_wait_1): Add `ptid' argument. Change return type to
12363 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12364 that exit from the process table.
12365 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12366 Adjust.
12367 (mark_lwp_dead): New.
12368 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12369 stopping all threads, mark its main lwp as dead.
12370 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12371 ptids.
12372 (fetch_register, usr_store_inferior_registers)
12373 (regsets_fetch_inferior_registers)
12374 (regsets_store_inferior_registers, linux_read_memory)
12375 (linux_write_memory): Inline `inferior_pid'.
12376 (linux_look_up_symbols): Adjust to use per-process
12377 `thread_db_active'.
12378 (linux_request_interrupt): Adjust to use ptids.
12379 (linux_read_auxv): Inline `inferior_pid'.
12380 (initialize_low): Don't reference thread_db_active.
12381 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12382 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12383 (ps_getpid): Return the pid of the current inferior.
12384 * thread-db.c (proc_handle, thread_agent): Delete.
12385 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12386 per-process data.
12387 (find_one_thread): Change argument type to ptid_t. Adjust to
12388 per-process data.
12389 (maybe_attach_thread): Adjust to per-process data and ptids.
12390 (thread_db_find_new_threads): Ditto.
12391 (thread_db_init): Ditto.
12392 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12393 processes table. Adjust to use ptids.
12394 (spu_kill, spu_detach): Adjust interface. Remove process from
12395 processes table.
12396 (spu_join, spu_thread_alive): Adjust interface.
12397 (spu_wait): Adjust interface. Remove process from processes
12398 table. Adjust to use ptids.
12399 * win32-low.c (current_inferior_tid): Delete.
12400 (current_inferior_ptid): New.
12401 (debug_event_ptid): New.
12402 (thread_rec): Take a ptid. Adjust.
12403 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12404 (child_delete_thread): Ditto.
12405 (do_initial_child_stuff): Add `attached' argument. Add process to
12406 processes table.
12407 (child_fetch_inferior_registers, child_store_inferior_registers):
12408 Adjust.
12409 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12410 (win32_attach): Pass 1 to do_initial_child_stuff.
12411 (win32_kill): Adjust interface. Remove process from processes
12412 table.
12413 (win32_detach): Ditto.
12414 (win32_join): Adjust interface.
12415 (win32_thread_alive): Take a ptid.
12416 (win32_resume): Adjust to use ptids.
12417 (get_child_debug_event): Ditto.
12418 (win32_wait): Adjust interface. Remove exiting process from
12419 processes table.
12420
12421 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12422
12423 Non-stop mode support.
12424
12425 * server.h (non_stop): Declare.
12426 (gdb_client_data, handler_func): Declare.
12427 (delete_file_handler, add_file_handler, start_event_loop):
12428 Declare.
12429 (handle_serial_event, handle_target_event, push_event)
12430 (putpkt_notif): Declare.
12431 * target.h (enum resume_kind): New.
12432 (struct thread_resume): Replace `step' field by `kind' field.
12433 (TARGET_WNOHANG): Define.
12434 (struct target_ops) <wait>: Add `options' argument.
12435 <supports_non_stop, async, start_non_stop>: New fields.
12436 (target_supports_non_stop, target_async): New.
12437 (start_non_stop): Declare.
12438 (mywait): Add `options' argument.
12439 * target.c (mywait): Add `options' argument. Print child exit
12440 notifications here.
12441 (start_non_stop): New.
12442 * server.c (non_stop, own_buf, mem_buf): New globals.
12443 (struct vstop_notif): New.
12444 (notif_queue): New global.
12445 (queue_stop_reply, push_event, discard_queued_stop_replies)
12446 (send_next_stop_reply): New.
12447 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12448 interface changes.
12449 (attach_inferior): In non-stop mode, don't wait for the target
12450 here.
12451 (handle_general_set): Handle QNonStop.
12452 (handle_query): When handling qC, return the current general
12453 thread, instead of the first thread of the list.
12454 (handle_query): If the backend supports non-stop mode, include
12455 QNonStop+ in the qSupported query response.
12456 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12457 and non-stop mode.
12458 (handle_v_attach, handle_v_run): Handle non-stop mode.
12459 (handle_v_stopped): New.
12460 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12461 (myresume): Adjust to use resume_kind. Handle non-stop.
12462 (queue_stop_reply_callback): New.
12463 (handle_status): Handle non-stop mode.
12464 (main): Clear non_stop flag on reconnection. Use the event-loop.
12465 Refactor serial protocol handling from here ...
12466 (process_serial_event): ... to this new function. When GDB
12467 selects any thread, select one here. In non-stop mode, wait until
12468 GDB acks all pending events before exiting.
12469 (handle_serial_event, handle_target_event): New.
12470 * remote-utils.c (remote_open): Install remote_desc in the event
12471 loop.
12472 (remote_close): Remove remote_desc from the event loop.
12473 (putpkt_binary): Rename to...
12474 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12475 (putpkt_binary): New as wrapper around putpkt_binary_1.
12476 (putpkt_notif): New.
12477 (prepare_resume_reply): In non-stop mode, don't change the
12478 general_thread.
12479 * event-loop.c: New.
12480 * Makefile.in (OBJ): Add event-loop.o.
12481 (event-loop.o): New rule.
12482
12483 * linux-low.h (pid_of): Moved here.
12484 (lwpid_of): New.
12485 (get_lwp_thread): Use lwpid_of.
12486 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12487 * linux-low.c (pid_of): Delete.
12488 (inferior_pid): Use lwpid_of.
12489 (linux_event_pipe): New.
12490 (target_is_async_p): New.
12491 (delete_lwp): New.
12492 (handle_extended_wait): Use lwpid_of.
12493 (add_lwp): Don't set lwpid field.
12494 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12495 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12496 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12497 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12498 first. Adjust to linux_wait_for_event interface changes. Use
12499 lwpid_of.
12500 (linux_detach): Don't delete the main lwp here.
12501 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12502 (status_pending_p): Don't consider explicitly suspended lwps.
12503 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12504 pointer. Add OPTIONS argument. Change return type to int. Use
12505 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12506 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12507 pointer. Add status pointer argument. Return a pid instead of a
12508 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12509 changes. In non-stop mode, don't switch to a random thread.
12510 (linux_wait): Rename to...
12511 (linux_wait_1): ... this. Add target_options argument, and handle
12512 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12513 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12514 clean exit and signal exit code. Don't stop all threads in
12515 non-stop mode. In all-stop mode, only stop all threads when
12516 reporting a stop to GDB. Handle explicit thread stop requests.
12517 (async_file_flush, async_file_mark): New.
12518 (linux_wait): New.
12519 (send_sigstop): Use lwpid_of.
12520 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12521 interface changes. In non-stop mode, don't switch to a random
12522 thread.
12523 (linux_resume_one_lwp): Use lwpid_of.
12524 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12525 (linux_resume_one_thread): ... this. Handle resume_stop. In
12526 non-stop mode, don't look for pending flag in all threads.
12527 (resume_status_pending_p): Don't consider explicitly suspended
12528 threads.
12529 (my_waitpid): Reimplement. Emulate __WALL.
12530 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12531 Use lwpid_of.
12532 (sigchld_handler, linux_supports_non_stop, linux_async)
12533 (linux_start_non_stop): New.
12534 (linux_target_ops): Register linux_supports_non_stop, linux_async
12535 and linux_start_non_stop.
12536 (initialize_low): Install SIGCHLD handler.
12537 * thread-db.c (thread_db_create_event, find_one_thread)
12538 (thread_db_get_tls_address): Use lwpid_of.
12539 * win32-low.c (win32_detach): Adjust to use resume_kind.
12540 (win32_wait): Add `options' argument.
12541 * spu-low.c (spu_resume): Adjust to use resume_kind.
12542 (spu_wait): Add `options' argument.
12543
12544 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12545
12546 Decouple target code from remote protocol.
12547
12548 * target.h (enum target_waitkind): New.
12549 (struct target_waitstatus): New.
12550 (struct target_ops) <wait>: Return an unsigned long. Take a
12551 target_waitstatus pointer instead of a char pointer.
12552 (mywait): Likewise.
12553 * target.c (mywait): Change prototype to return an unsigned long.
12554 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12555 * server.h (thread_from_wait, old_thread_from_wait): Delete
12556 declarations.
12557 (prepare_resume_reply): Change prototype to take a
12558 target_waitstatus.
12559 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12560 (last_status, last_ptid): New.
12561 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12562 pid instead of a signal.
12563 (attach_inferior): Remove "status" and "signal" parameters.
12564 Adjust.
12565 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12566 not as an address.
12567 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12568 (handle_v_requests, myresume): Remove "status" and "signal"
12569 parameters. Adjust.
12570 (handle_status): New.
12571 (main): Delete local `status'. Adjust.
12572 * remote-utils.c: Include target.h.
12573 (prepare_resume_reply): Change prototype to take a
12574 target_waitstatus. Adjust.
12575
12576 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12577 interface.
12578 * spu-low.c (spu_wait): Adjust.
12579 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12580 Delete.
12581 (win32_wait): Adjust.
12582
12583 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12584
12585 * target.h (struct thread_resume): Delete leave_stopped member.
12586 (struct target_ops): Add a `n' argument to the `resume' callback.
12587 * server.c (start_inferior): Adjust.
12588 (handle_v_cont, myresume): Adjust.
12589 * linux-low.c (check_removed_breakpoint): Adjust to resume
12590 interface change, and to removed leave_stopped field.
12591 (resume_ptr): Delete.
12592 (struct thread_resume_array): New.
12593 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12594 resume interface change.
12595 (linux_continue_one_thread, linux_queue_one_thread)
12596 (resume_status_pending_p): Check if the resume field is NULL
12597 instead of checking the leave_stopped member.
12598 (linux_resume): Adjust to the target resume interface change.
12599 * spu-low.c (spu_resume): Adjust to the target resume interface
12600 change.
12601 * win32-low.c (win32_detach, win32_resume): Ditto.
12602
12603 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12604
12605 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12606 flag.
12607 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12608 pending.
12609 (linux_continue_one_thread): Only preserve the stepping flag if
12610 there's a pending breakpoint.
12611
12612 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12613
12614 * server.c (main): After the inferior having exited, call
12615 remote_close before exiting gdbserver.
12616
12617 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12618
12619 Fix size of FPSCR in Power 7 processors.
12620 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12621 (PPC_FEATURE_HAS_DFP): New #define.
12622 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12623 size of the FPSCR.
12624
12625 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12626
12627 * server.c (handle_query) Whitespace and formatting.
12628
12629 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12630
12631 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12632 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12633 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12634 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12635 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12636 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12637 Makefile.in, configure.ac: Fix whitespace throughout.
12638 * configure: Regenerate.
12639
12640 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12641
12642 * inferiors.c (find_inferior): Make it safe for the callback
12643 function to delete the currently iterated inferior.
12644
12645 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12646
12647 * Makefile.in (linuw_low_h): Move higher.
12648 (thread-db.o): Depend on $(linux_low_h).
12649
12650 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12651
12652 Rename "process" to "lwp" throughout.
12653
12654 * linux-low.c (all_processes): Rename to...
12655 (all_lwps): ... this.
12656 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12657 (add_process): Rename to ...
12658 (add_lwp): ... this. Adjust.
12659 (linux_create_inferior): Adjust.
12660 (linux_attach_lwp): Adjust.
12661 (linux_attach): Adjust.
12662 (linux_kill_one_process): Rename to ...
12663 (linux_kill_one_lwp): ... this. Adjust.
12664 (linux_kill): Adjust.
12665 (linux_detach_one_process): Rename to ...
12666 (linux_detach_one_lwp): ... this. Adjust.
12667 (linux_detach): Adjust.
12668 (check_removed_breakpoint): Adjust.
12669 (status_pending_p): Adjust.
12670 (linux_wait_for_process): Rename to ...
12671 (linux_wait_for_lwp): ... this. Adjust.
12672 (linux_wait_for_event): Adjust.
12673 (send_sigstop): Adjust.
12674 (wait_for_sigstop): Adjust.
12675 (stop_all_processes): Rename to ...
12676 (stop_all_lwps): ... this.
12677 (linux_resume_one_process): Rename to ...
12678 (linux_resume_one_lwp): ... this. Adjust.
12679 (linux_set_resume_request, linux_continue_one_thread)
12680 (linux_queue_one_thread, resume_status_pending_p)
12681 (usr_store_inferior_registers, regsets_store_inferior_registers)
12682 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12683 Adjust.
12684 * linux-low.h (get_process): Rename to ...
12685 (get_lwp): ... this. Adjust.
12686 (get_thread_process): Rename to ...
12687 (get_thread_lwp): ... this. Adjust.
12688 (get_process_thread): Rename to ...
12689 (get_lwp_thread): ... this. Adjust.
12690 (struct process_info): Rename to ...
12691 (struct lwp_info): ... this.
12692 (all_processes): Rename to ...
12693 (all_lwps): ... this.
12694 * proc-service.c (ps_lgetregs): Adjust.
12695 * thread-db.c (thread_db_create_event, find_one_thread)
12696 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12697
12698 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12699
12700 * server.c (handle_query): Handle "qAttached".
12701
12702 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12703
12704 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12705 GPLv3, update license URL.
12706
12707 2009-03-01 Doug Evans <dje@google.com>
12708
12709 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12710 (server_h): Add gdb_signals.h.
12711 (signals.o): Update.
12712 * server.h (target_signal_from_host,target_signal_to_host_p)
12713 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12714
12715 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12716
12717 * remote-utils.c (getpkt): Also generate remote-debug
12718 information if noack_mode is set.
12719
12720 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12721
12722 * server.c (handle_query): Report qXfer:siginfo:read and
12723 qXfer:siginfo:write as supported and handle them.
12724 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12725 * linux-low.c (linux_xfer_siginfo): New.
12726 (linux_target_ops): Set it.
12727
12728 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12729
12730 * server.c (gdbserver_usage): Mention --remote-debug.
12731 (main): Accept '--remote-debug' switch.
12732
12733 2009-01-18 Doug Evans <dje@google.com>
12734
12735 * regcache.c (new_register_cache): No need to check result of xcalloc.
12736 * server.c (handle_search_memory): Back out calls to xmalloc,
12737 result is checked and error is returned to user upon failure.
12738 (handle_query): Ditto. Add more checks for result of malloc.
12739 (handle_v_cont): Check result of malloc, report error back to
12740 user upon failure.
12741 (handle_v_run): Ditto. Call freeargv.
12742 * server.h (freeargv): Declare.
12743 * utils.c (freeargv): New fn.
12744
12745 2009-01-15 Doug Evans <dje@google.com>
12746
12747 * gdbreplay.c (perror_with_name): Make arg const char *.
12748 * server.h (target_signal_to_name): Make return type const char *.
12749 * thread-db.c (thread_db_err_str): Make return type const char *.
12750 * utils.c (perror_with_name): Make arg const char *.
12751
12752 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12753
12754 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12755 when handling a EXIT_PROCESS_DEBUG_EVENT.
12756
12757 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12758
12759 * gdbreplay.c (gdbreplay_version): Update copyright year.
12760 * server.c (gdbserver_version): Likewise.
12761
12762 2009-01-05 Doug Evans <dje@google.com>
12763
12764 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12765 (handle_extended_wait): Improve comment.
12766
12767 2008-12-13 Doug Evans <dje@google.com>
12768
12769 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12770 * server.h (ATTR_MALLOC): New macro.
12771 (xmalloc,xcalloc,xstrdup): Declare.
12772 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12773 * inferiors.c: Ditto.
12774 * linux-low.c: Ditto.
12775 * mem-break.c: Ditto.
12776 * regcache.c: Ditto.
12777 * remote-utils.c: Ditto.
12778 * server.c: Ditto.
12779 * target.c: Ditto.
12780 * win32-low.c: Ditto.
12781
12782 2008-12-12 Doug Evans <dje@google.com>
12783
12784 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12785 in debugging printf.
12786
12787 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12788
12789 2008-12-09 Doug Evans <dje@google.com>
12790
12791 * linux-low.h (struct process_info): Delete member tid, unused.
12792 * thread-db.c (find_one_thread): Update.
12793 (maybe_attach_thread): Update.
12794
12795 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12796
12797 * target.h (struct target_ops): Add qxfer_osdata member.
12798 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12799 and dirent.h.
12800 (linux_qxfer_osdata): New functions.
12801 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12802 callback.
12803 * server.c (handle_query): Handle "qXfer:osdata:read:".
12804 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12805 (buffer_xml_printf): New functions.
12806 * server.h (struct buffer): New.
12807 (buffer_grow_str, buffer_grow_str0): New macros.
12808 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12809 (buffer_xml_printf): Declare.
12810
12811 2008-11-24 Doug Evans <dje@google.com>
12812
12813 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12814
12815 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12816
12817 * server.c (handle_v_run): Always use the supplied argument list.
12818
12819 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12820
12821 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12822 (xtensa_regmap_table): Add entry for scompare1.
12823
12824 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12825
12826 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12827 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12828 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12829 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12830 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12831 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12832 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12833 XML target descriptions.
12834 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12835 when inferior is running on an ISA 2.05 or later processor. Add
12836 special case to return offset for full 64-bit slot of FPSCR when
12837 in 32-bits.
12838
12839 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12840
12841 * Makefile.in (SFILES, clean): Added sparc64 files.
12842 (reg-sparc64.o, reg-sparc64.c): New.
12843 * configure.srv (sparc*-*-linux*): New configuration.
12844 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12845 syscall arguments for SPARC.
12846 (regsets_store_inferior_registers): Likewise.
12847 * linux-sparc-low.c: New file.
12848
12849 2008-10-21 Doug Evans <dje@google.com>
12850
12851 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12852 (READLINE_DIR,READLINE_DEP): Delete.
12853 (INTERNAL_CFLAGS): Update.
12854 (LINTFLAGS): Update.
12855
12856 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12857
12858 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12859 whole argv from the last run, not just argv[0].
12860
12861 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12862
12863 * regcache.c (new_register_cache): Return NULL if the register
12864 cache size isn't known yet.
12865 (free_register_cache): Avoid dereferencing a NULL regcache.
12866
12867 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12868
12869 * configure.srv: Merge MIPS and MIPS64.
12870
12871 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12872
12873 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12874
12875 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12876
12877 * Makefile.in: Add required vsx dependencies.
12878
12879 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12880 Declare init_registers_powerpc_vsx32l.
12881 Declare init_registers_powerpc_vsx64l.
12882 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12883 (ppc_arch_setup): Check for VSX in hwcap.
12884 (ppc_fill_vsxregset): New function.
12885 (ppc_store_vsxregset): New function.
12886 Add new VSX entry in regset_info target_regsets.
12887
12888 * configure.srv: Add new VSX dependencies.
12889
12890 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12891
12892 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12893 (remote_open): Set or clear transport_is_reliable.
12894 (putpkt_binary): Don't expect acks in noack mode.
12895 (getpkt): Don't send ack/nac in noack mode.
12896 * server.c (handle_general_set): Handle QStartNoAckMode.
12897 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12898 qSupported.
12899 (main): Reset noack_mode on every connection.
12900 * server.h (noack_mode): Declare.
12901
12902 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12903
12904 * Makefile.in (GDBREPLAY_OBS): New variable.
12905 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12906
12907 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12908 Daniel Jacobowitz <dan@codesourcery.com>
12909
12910 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12911 (usr_store_inferior_registers): Likewise.
12912 (regsets_store_inferior_registers): Likewise.
12913
12914 2008-07-31 Rolf Jansen <rj@surtec.com>
12915 Pedro Alves <pedro@codesourcery.com>
12916
12917 * configure.ac: Check for memmem declaration.
12918 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12919 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12920 (disable_packet_qfThreadInfo): Unconditionally compile.
12921 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12922 * configure, config.in: Regenerate.
12923
12924 2008-07-28 Doug Kwan <dougkwan@google.com>
12925
12926 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12927 (linux_write_memory): Remove declaration of errno.
12928
12929 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12930
12931 * linux-low.c (handle_extended_wait): Do not use "status"
12932 variable uninitialized.
12933
12934 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12935
12936 * server.c (handle_v_attach): Inhibit reporting dll changes.
12937
12938 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12939
12940 * remote-utils.c (prepare_resume_reply): If requested, don't
12941 output "thread:TID" in the T stop reply.
12942
12943 * server.c (disable_packet_vCont, disable_packet_Tthread)
12944 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12945 (handle_query): If requested, disable support for qC, qfThreadInfo
12946 and qsThreadInfo.
12947 (handle_v_requests): If requested, disable support for vCont.
12948 (gdbserver_show_disableable): New.
12949 (main): Handle --disable-packet and --disable-packet=LIST.
12950
12951 * server.h (disable_packet_vCont, disable_packet_Tthread)
12952 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12953
12954 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12955
12956 * server.c (gdbserver_usage): Mention --version.
12957
12958 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12959
12960 * Makefile.in (gdbreplay.o): New rule.
12961
12962 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12963
12964 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12965 message, not gdbserver.
12966
12967 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12968 Nathan Sidwell <nathan@codesourcery.com>
12969 Joseph Myers <joseph@codesourcery.com>
12970
12971 * acinclude.m4: Include ../../config/acx.m4.
12972 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12973 * configure, config.in: Regenerate.
12974 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12975 * server.c (gdbserver_version): Print PKGVERSION.
12976 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12977 (main): Adjust gdbserver_usage calls.
12978 * gdbreplay.c (version, host_name): Add declarations.
12979 (gdbreplay_version, gdbreplay_usage): New.
12980 (main): Accept --version and --help options.
12981
12982 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12983
12984 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12985 (arm_breakpoint_at): Handle Thumb.
12986 (the_low_target): Add comment.
12987
12988 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12989
12990 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12991
12992 2008-05-09 Doug Evans <dje@google.com>
12993
12994 * server.h (decode_search_memory_packet): Declare.
12995 * remote-utils.c (decode_search_memory_packet): New fn.
12996 * server.c (handle_search_memory_1): New fn.
12997 (handle_search_memory): New fn.
12998 (handle_query): Process qSearch:memory packets.
12999
13000 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13001
13002 * regcache.c (registers_length): Remove.
13003 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13004 full register packet.
13005 * regcache.h (registers_length): Remove prototype.
13006 * server.h (PBUFSIZ): Define to 16384.
13007
13008 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13009
13010 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13011 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13012 powerpc-64l.o, and powerpc-altivec64l.o.
13013 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13014 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13015 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13016 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13017 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13018 to srv_xmlfiles.
13019
13020 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13021 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13022 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13023 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13024 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13025 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13026 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13027 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13028 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13029 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13030 (clean): Update.
13031
13032 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13033 (init_registers_powerpc_32l): ... this new prototype.
13034 (init_registers_powerpc_32): Remove, replace by ...
13035 (init_registers_powerpc_altivec32l): ... this new prototype.
13036 (init_registers_powerpc_e500): Remove, replace by ...
13037 (init_registers_powerpc_e500l): ... this new prototype.
13038 (init_registers_ppc64): Remove, replace by ...
13039 (init_registers_powerpc_64l): ... this new prototype.
13040 (init_registers_powerpc_64): Remove, replace by ...
13041 (init_registers_powerpc_altivec64l): ... this new prototype.
13042 (ppc_num_regs): Set to 73.
13043 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13044 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13045 (ppc_cannot_store_register): Handle orig_r3 and trap.
13046 (ppc_arch_setup): Update init_registers_... calls.
13047 (ppc_fill_gregset): Handle orig_r3 and trap.
13048
13049 * inferiors.c (clear_inferiors): Reset current_inferior.
13050
13051 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13052
13053 * acinclude.m4: Add override.m4.
13054 * configure: Regenerate.
13055
13056 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13057
13058 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13059 initial call to init_register_ppc64.
13060
13061 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13062
13063 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13064 single powerpc*-*-linux* case.
13065 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13066
13067 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13068
13069 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13070 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13071 from reg_xmlfiles.
13072 * linux-ppc-low.c: Include <elf.h>.
13073 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13074 (ppc_hwcap): New global variable.
13075 (ppc_regmap): Remove __SPE__ #ifdef sections.
13076 (ppc_regmap_e500): New global variable.
13077 (ppc_cannot_store_register): Update __SPE__ special case.
13078 (ppc_get_hwcap): New function.
13079 (ppc_arch_setup): Use it to determine whether inferior supports
13080 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13081 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13082 Do not access registers if target does not support AltiVec.
13083 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13084 Do not access registers if target does not support SPE.
13085 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13086
13087 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13088
13089 * linux-low.c (disabled_regsets, num_regsets): New.
13090 (use_regsets_p): Delete.
13091 (linux_wait_for_process): Clear disabled_regsets.
13092 (regsets_fetch_inferior_registers): Check and set it.
13093 (regsets_store_inferior_registers): Likewise.
13094 (linux_fetch_registers, linux_store_registers): Do not use
13095 use_regsets_p.
13096 (initialize_low): Allocate disabled_regsets.
13097
13098 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13099
13100 * Makefile.in (LIBOBJS): New.
13101 (OBS): Use LIBOBJS.
13102 (memmem.o): New rule.
13103 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13104 * configure: Regenerated.
13105
13106 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13107
13108 * server.c (handle_query): Never return "unsupported" for
13109 qXfer:features:read queries.
13110
13111 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13112
13113 * server.c (get_features_xml): Fix inverted condition.
13114 (handle_query): Always support qXfer:feature:read.
13115
13116 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13117
13118 * server.c (wrapper_argv): New.
13119 (start_inferior): Handle wrapper_argv. If set, expect an extra
13120 trap.
13121 (gdbserver_usage): Document --wrapper.
13122 (main): Parse --wrapper.
13123
13124 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13125
13126 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13127 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13128 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13129 (ppc_set_pc): Likewise.
13130 (ppc_arch_setup): New function.
13131 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13132 of collect_register.
13133 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13134
13135 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13136
13137 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13138 instead of linux-ppc64-low.o.
13139 * linux-ppc64-low.c: Remove file.
13140 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13141 (linux-ppc64-low.o): Remove rule.
13142
13143 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13144 (init_registers_powerpc_64): Likewise.
13145 (ppc_regmap): Conditionally define depending on __powerpc64__.
13146 (ppc_cannot_store_register): Do not special-case "fpscr" when
13147 compiled on __powerpc64__.
13148 (ppc_collect_ptrace_register): New function.
13149 (ppc_supply_ptrace_register): New function.
13150 (ppc_breakpoint): Change type to "unsigned int".
13151 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13152 (the_low_target): Conditionally provide initializers for the
13153 arch_setup member depending on __powerpc64__. Install
13154 collect_ptrace_register and supply_ptrace_register members.
13155
13156 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13157
13158 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13159 * server.c (gdbserver_xmltarget): Define.
13160 (get_features_xml): Use it to replace "target.xml" and arch_string.
13161
13162 * configure.srv: Remove srv_xmltarget. Add XML files that were
13163 mentioned there to srv_xmlfiles instead. Remove conditional tests
13164 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13165 srv_xmlfiles and srv_regobj to include all possible choices.
13166 * configure.ac (srv_xmltarget): Remove.
13167 (srv_xmlfiles): Do not add "target.xml".
13168 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13169 checks for supplementary target information.
13170 * configure: Regenerate.
13171 * Makefile.in (XML_TARGET): Remove.
13172 (target.xml): Remove rule.
13173 (clean): Do not clean up target.xml.
13174 (.PRECIOUS): Do not mention target.xml.
13175
13176 * target.h (struct target_ops): Remove arch_string member.
13177 * linux-low.c (linux_arch_string): Remove.
13178 (linux_target_ops): Remove arch_string initializer.
13179 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13180 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13181 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13182 * spu-low.c (spu_arch_string): Remove.
13183 (spu_target_ops): Remove arch_string initializer.
13184 * win32-low.c (win32_arch_string): Remove.
13185 (win32_target_ops): Remove arch_string initializer.
13186 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13187 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13188 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13189
13190 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13191
13192 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13193 by collect_ptrace_register and supply_ptrace_register hooks.
13194 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13195 instead of checking for the_low_target.left_pad_xfer.
13196 (usr_store_inferior_registers): Use collect_ptrace_register callback
13197 instead of checking for the_low_target.left_pad_xfer.
13198
13199 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13200 (s390_supply_ptrace_register): Likewise.
13201 (s390_fill_gregset): Call s390_collect_ptrace_register.
13202 (the_low_target): Update.
13203
13204 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13205 (ppc_supply_ptrace_register): Likewise.
13206 (the_low_target): Update.
13207
13208 * linux-i386-low.c (the_low_target): Update.
13209 * linux-x86-64-low.c (the_low_target): Update.
13210
13211 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13212
13213 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13214 reg-s390.o and reg-s390x.o.
13215
13216 * linux-low.c (new_inferior): New global variable.
13217 (linux_create_inferior, linux_attach): Set it.
13218 (linux_wait_for_process): Call the_low_target.arch_setup after the
13219 target has stopped for the first time.
13220 (initialize_low): Do not call the_low_target.arch_setup.
13221
13222 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13223 (s390_set_pc): Likewise.
13224 (s390_arch_setup): New function.
13225 (the_low_target): Use s390_arch_setup as arch_setup routine.
13226
13227 * regcache.c (realloc_register_cache): New function.
13228 (set_register_cache): Call it for each existing regcache.
13229
13230 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13231
13232 * server.h (init_registers): Remove prototype.
13233
13234 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13235 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13236 instead of init_registers ().
13237 * linux-arm-low.c (init_registers_arm): Add prototype.
13238 (init_registers_arm_with_iwmmxt): Likewise.
13239 (the_low_target): Add initializer for arch_setup field.
13240 * linux-cris-low.c (init_registers_cris): Add prototype.
13241 (the_low_target): Add initializer for arch_setup field.
13242 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13243 (the_low_target): Add initializer for arch_setup field.
13244 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13245 (the_low_target): Add initializer for arch_setup field.
13246 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13247 (the_low_target): Add initializer for arch_setup field.
13248 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13249 (the_low_target): Add initializer for arch_setup field.
13250 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13251 (the_low_target): Add initializer for arch_setup field.
13252 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13253 (init_registers_mips64_linux): Likewise.
13254 (the_low_target): Add initializer for arch_setup field.
13255 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13256 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13257 (the_low_target): Add initializer for arch_setup field.
13258 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13259 (init_registers_powerpc_64): Likewise.
13260 (the_low_target): Add initializer for arch_setup field.
13261 * linux-s390-low.c (init_registers_s390): Add prototype.
13262 (init_registers_s390x): Likewise.
13263 (the_low_target): Add initializer for arch_setup field.
13264 * linux-sh-low.c (init_registers_sh): Add prototype.
13265 (the_low_target): Add initializer for arch_setup field.
13266 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13267 (the_low_target): Add initializer for arch_setup field.
13268 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13269 (the_low_target): Add initializer for arch_setup field.
13270
13271 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13272 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13273 instead of init_registers ().
13274 * win32-arm-low.c (init_registers_arm): Add prototype.
13275 (the_low_target): Add initializer for arch_setup field.
13276 * win32-i386-low.c (init_registers_i386): Add prototype.
13277 (the_low_target): Add initializer for arch_setup field.
13278
13279 * spu-low.c (init_registers_spu): Add prototype.
13280 (initialize_low): Call initialie_registers_spu () instead of
13281 initialize_registers ().
13282
13283 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13284
13285 * server.c (handle_v_requests): When handling the vRun and vAttach
13286 packets, if already debugging a process, don't kill it. Return an
13287 error instead.
13288
13289 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13290
13291 * server.c (handle_query): Correct length check.
13292
13293 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13294
13295 * win32-low.c (do_initial_child_stuff): Add process handle
13296 parameter. Set current_process_handle and current_process_id from the
13297 parameters. Clear globals.
13298 (win32_create_inferior): Don't set current_process_handle and
13299 current_process_id here. Instead pass them on the call to
13300 do_initial_child_stuff.
13301 (win32_attach): Likewise.
13302 (win32_clear_inferiors): New.
13303 (win32_kill): Don't close the current process handle or the
13304 current thread handle here. Instead call win32_clear_inferiors.
13305 (win32_detach): Don't open a new handle to the process. Call
13306 win32_clear_inferiors.
13307 (win32_join): Don't rely on current_process_handle; open a new
13308 handle using the process id.
13309 (win32_wait): Call win32_clear_inferiors when the inferior process
13310 has exited.
13311
13312 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13313
13314 * server.c (monitor_show_help): Add "exit".
13315
13316 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13317
13318 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13319 (clean): Add reg-xtensa.c.
13320 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13321 * configure.srv (xtensa*-*-linux*) New target.
13322 * linux-xtensa-low.c: New.
13323 * xtensa-xtregs.c: New.
13324
13325 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13326
13327 * hostio.c: Don't include errno.h.
13328 (errno_to_fileio_errno): Move to hostio-errno.
13329 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13330 error number outputting to the target->hostio_last_error callback.
13331 (hostio_packet_error): Use FILEIO_EINVAL directly.
13332 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13333 calls to hostio_error.
13334 * hostio-errno.c: New.
13335 * server.h (hostio_last_error_from_errno): Declare.
13336 * target.h (target_ops): Add hostio_last_error member.
13337 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13338 as hostio_last_error handler.
13339 * spu-low.c (spu_target_ops): Likewise.
13340 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13341 (wince_hostio_last_error): New functions.
13342 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13343 as hostio_last_error handler.
13344 (win32_target_ops) [!_WIN32_WCE]: Register
13345 hostio_last_error_from_errno as hostio_last_error handler.
13346 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13347 (hostio-errno.o): New rule.
13348 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13349 * configure.srv (srv_hostio_err_objs): New variable. Default to
13350 hostio-errno.o.
13351 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13352 * configure: Regenerate.
13353
13354 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13355
13356 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13357 (linux_kill, linux_detach): Clean up the process list.
13358 * remote-utils.c (remote_open): Improve port number parsing.
13359 (putpkt_binary, input_interrupt): Only send interrupts if the target
13360 is running.
13361 * server.c (extended_protocol): Make static.
13362 (attached): Define earlier.
13363 (exit_requested, response_needed, program_argv): New variables.
13364 (target_running): New.
13365 (start_inferior): Clear attached here.
13366 (attach_inferior): Set attached here.
13367 (require_running): Define.
13368 (handle_query): Use require_running and target_running. Implement
13369 "monitor exit".
13370 (handle_v_attach, handle_v_run): New.
13371 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13372 (gdbserver_usage): Update.
13373 (main): Redo argument parsing. Handle --debug and --multi. Handle
13374 --attach along with other options or after the port. Save
13375 program_argv. Support no initial program. Resynchronize
13376 communication with GDB after an error. Handle "monitor exit".
13377 Use require_running and target_running. Always allow the extended
13378 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13379 restart in extended mode.
13380 * README: Refer to the GDB manual. Update --attach usage.
13381
13382 2007-12-20 Andreas Schwab <schwab@suse.de>
13383
13384 * linux-low.c (STACK_SIZE): Define.
13385 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13386 (linux_test_for_tracefork): Likewise.
13387
13388 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13389
13390 * linux-low.c (linux_wait_for_event): Update messages. Do not
13391 reinsert auto-delete breakpoints.
13392 * mem-break.c (struct breakpoint): Change return type of handler to
13393 int.
13394 (set_breakpoint_at): Update handler type.
13395 (reinsert_breakpoint_handler): Return 1 instead of calling
13396 delete_breakpoint.
13397 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13398 setting a new one.
13399 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13400 * mem-break.h (set_breakpoint_at): Update handler type.
13401 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13402 * win32-low.c (auto_delete_breakpoint): New.
13403 (get_child_debug_event): Use it.
13404
13405 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13406
13407 * configure.ac: Check for pread and pwrite.
13408 * hostio.c (handle_pread): Fall back to lseek and read.
13409 (handle_pwrite): Fall back to lseek and write.
13410 * config.in, configure: Regenerated.
13411
13412 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13413
13414 * server.c (myresume): Add own_buf argument.
13415 (main): Update calls.
13416
13417 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13418
13419 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13420 * remote-utils.c (remote_open): Do not call disable_async_io.
13421 (block_async_io): Delete.
13422 (unblock_async_io): Make static.
13423 (initialize_async_io): New.
13424 * server.c (handle_v_cont): Handle async I/O here.
13425 (myresume): Likewise. Move other common resume tasks here...
13426 (main): ... from here. Call initialize_async_io. Disable async
13427 I/O before the main loop.
13428 * server.h (initialize_async_io): Declare.
13429 (block_async_io, unblock_async_io): Delete prototypes.
13430 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13431
13432 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13433
13434 * remote-utils.c (readchar): Allow binary data in received messages.
13435
13436 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13437
13438 * win32-low.c (attaching): New global.
13439 (win32_create_inferior): Clear the `attaching' global.
13440 (win32_attach): Set the `attaching' global.
13441 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13442 attaching. Only set a breakpoint at the entry point if not
13443 attaching.
13444
13445 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13446
13447 * server.c (main): Don't report dll events on the initial
13448 connection on attaches.
13449
13450 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13451
13452 * server.c (main): Relax numerical bases supported for the pid of
13453 the --attach command line argument.
13454
13455 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13456
13457 * win32-low.c (win32_attach): Call OpenProcess before
13458 DebugActiveProcess, not after. Add last error output to error
13459 call.
13460
13461 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13462
13463 * win32-low.c (win32_get_thread_context)
13464 (win32_set_thread_context): New functions.
13465 (thread_rec): Use win32_get_thread_context.
13466 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13467 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13468 field.
13469
13470 2007-12-03 Leo Zayas
13471 Pedro Alves <pedro_alves@portugalmail.pt>
13472
13473 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13474 global variables.
13475 (child_add_thread): Minor cleanup.
13476 (child_continue): Resume artificially suspended threads before
13477 calling ContinueDebugEvent.
13478 (suspend_one_thread): New.
13479 (fake_breakpoint_event): New.
13480 (get_child_debug_event): Change return type to int. Check here if
13481 gdb sent an interrupt request. If a soft interrupt was requested,
13482 fake a breakpoint event. Return 0 if there is no event to handle,
13483 and 1 otherwise.
13484 (win32_wait): Don't check here if gdb sent an interrupt request.
13485 Ensure there is a valid event to handle.
13486 (win32_request_interrupt): Add soft interruption method as last
13487 resort.
13488
13489 2007-12-03 Leo Zayas
13490 Pedro Alves <pedro_alves@portugalmail.pt>
13491
13492 * win32-low.h (win32_thread_info): Add descriptions to the
13493 structure members. Replace `suspend_count' counter by a
13494 `suspended' flag.
13495 * win32-low.c (thread_rec): Update condition of when to get the
13496 context from the inferior. Rely on ContextFlags being set if it
13497 has already been retrieved. Only suspend the inferior thread if
13498 we haven't already. Warn if that fails.
13499 (continue_one_thread): s/suspend_count/suspended/. Only call
13500 ResumeThread once. Warn if that fails.
13501
13502 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13503
13504 * win32-low.c (win32_wait): Don't read from the inferior when it
13505 has already exited.
13506
13507 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13508
13509 * Makefile.in (win32_low_h): New variable.
13510 (win32-low.o): Add dependency on $(win32_low_h).
13511 (win32-arm-low.o, win32-i386-low.o): New rules.
13512
13513 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13514
13515 * hostio.c: Correct copyright year.
13516
13517 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13518
13519 * Makefile.in (OBS): Add hostio.o.
13520 (hostio.o): New rule.
13521 * server.h (handle_vFile): Declare.
13522 * hostio.c: New file.
13523 * server.c (handle_v_requests): Take packet_len and new_packet_len
13524 for binary packets. Call handle_vFile.
13525 (main): Update call to handle_v_requests.
13526
13527 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13528
13529 * linux-low.c: Include <sched.h>.
13530
13531 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13532
13533 * linux-low.c (linux_tracefork_grandchild): New.
13534 (linux_tracefork_child): Use clone.
13535 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13536
13537 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13538
13539 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13540
13541 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13542
13543 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13544
13545 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13546
13547 * inferiors.c (change_inferior_id): Delete.
13548 (add_pid_to_list, pull_pid_from_list): New.
13549 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13550 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13551 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13552 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13553 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13554 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13555 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13556 (using_threads): Always set to 1.
13557 (handle_extended_wait): New.
13558 (add_process): Do not set TID.
13559 (linux_create_inferior): Set must_set_ptrace_flags.
13560 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13561 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13562 (linux_thread_alive): Rename TID argument to LWPID.
13563 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13564 (linux_wait_for_event): Do not use TID or check using_threads. Update
13565 call to dead_thread_notify. Call handle_extended_wait.
13566 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13567 (send_sigstop): Delete sigstop_sent.
13568 (wait_for_sigstop): Avoid TID.
13569 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13570 (linux_test_for_tracefork): New.
13571 (linux_lookup_signals): Use thread_db_active and
13572 linux_supports_tracefork_flag.
13573 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13574 * linux-low.h (get_process_thread): Avoid TID.
13575 (struct process_ifo): Move thread_known and tid to the end. Remove
13576 sigstop_sent.
13577 (linux_attach_lwp, thread_db_init): Update prototypes.
13578 * server.h (change_inferior_id): Delete prototype.
13579 (add_pid_to_list, pull_pid_from_list): New prototypes.
13580 * thread-db.c (thread_db_use_events): New.
13581 (find_first_thread): Rename to...
13582 (find_one_thread): ...this. Update callers and messages. Do not
13583 call fatal. Check thread_db_use_events. Do not call
13584 change_inferior_id or new_thread_notify.
13585 (maybe_attach_thread): Update. Do not call new_thread_notify.
13586 (thread_db_init): Set thread_db_use_events. Check use_events.
13587 * utils.c (fatal, warning): Correct message prefix.
13588
13589 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * Makefile.in (clean): Remove new files.
13592 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13593 (powerpc-64.o, powerpc-64.c): New rules.
13594 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13595 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13596 with SPE.
13597 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13598 SPE targets.
13599 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13600 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13601 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13602 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13603 (target_regsets): Add AltiVec and SPE register sets.
13604 * configure.ac: Check for AltiVec and SPE.
13605 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13606 (ppc_fill_vrregset, ppc_store_vrregset): New.
13607 (target_regsets): Add AltiVec register set.
13608 * configure: Regenerated.
13609
13610 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13611
13612 * linux-low.c (O_LARGEFILE): Define.
13613 (linux_read_memory): Use /proc/PID/mem.
13614 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13615 * configure, config.in: Regenerated.
13616
13617 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13618
13619 * linux-low.c (linux_wait_for_event): Do not pass signals while
13620 single-stepping.
13621
13622 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13623
13624 * win32-low.c (create_process): New.
13625 (win32_create_inferior): Use create_process instead of
13626 CreateProcess. If create_process failed retry appending an ".exe"
13627 suffix. Store the GetLastError result immediatelly after
13628 create_process calls and use it on the call to error.
13629
13630 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13631
13632 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13633
13634 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13635
13636 * configure.ac: Switch license to GPLv3.
13637
13638 2007-08-01 Michael Snyder <msnyder@access-company.com>
13639
13640 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13641
13642 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13643
13644 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13645 typedef.
13646 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13647 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13648 CloseToolhelp32Snapshot.
13649 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13650 CloseToolhelp32Snapshot.
13651
13652 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13653
13654 * server.c (main): Check for inferior exit before main loop.
13655
13656 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13657
13658 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13659 instead of on tmp_desc.
13660
13661 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13662 Daniel Jacobowitz <dan@codesourcery.com>
13663
13664 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13665 (add_thread): Minor cleanups.
13666 (clear_inferiors): Move lower in the file. Clear the DLL
13667 list.
13668 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13669 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13670 (xml_escape_text): New.
13671 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13672 for qSupported.
13673 (handle_v_cont): Report errors.
13674 (gdbserver_version): Update.
13675 (main): Correct size of own_buf. Do not report initial DLL events.
13676 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13677 (unloaded_dll, xml_escape_text): New.
13678 * win32-low.c (enum target_waitkind): Update comments.
13679 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13680 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13681 (win32_EnumProcessModules, win32_GetModuleInformation)
13682 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13683 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13684 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13685 (win32_Module32First, win32_Module32Next, load_toolhelp)
13686 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13687 (get_child_debug_event): Handle DLL events.
13688 (win32_wait): Likewise.
13689
13690 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13691
13692 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13693 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13694
13695 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13696
13697 * win32-low.c (handle_output_debug_string): Ignore event if not
13698 waiting.
13699
13700 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13701
13702 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13703
13704 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13705
13706 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13707
13708 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13709
13710 * inferiors.c (change_inferior_id): Add comment.
13711 * linux-low.c (check_removed_breakpoint): Add an early
13712 prototype. Improve debug output.
13713 (linux_attach): Doc update.
13714 (linux_detach_one_process, linux_detach): Clean up before releasing
13715 each process.
13716 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13717 * linux-low.h (struct process_info): Doc improvement.
13718 * mem-break.c (delete_all_breakpoints): New.
13719 * mem-break.h (delete_all_breakpoints): New prototype.
13720 * thread-db.c (find_first_thread): New.
13721 (thread_db_create_event): Call it instead of
13722 thread_db_find_new_threads. Clean up unused variables.
13723 (maybe_attach_thread): Remove first thread handling.
13724 (thread_db_find_new_threads): Use find_first_thread.
13725 (thread_db_get_tls_address): Likewise.
13726
13727 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13728
13729 * thread-db.c (thread_db_find_new_threads): Add prototype.
13730 (thread_db_create_event): Check for the main thread before adding
13731 a new thread.
13732 (maybe_attach_thread): Only enable event reporting if TID == 0.
13733 (thread_db_get_tls_address): Check for new threads.
13734
13735 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13736
13737 * linux-low.c (linux_create_inferior): Try execv before execvp.
13738 * spu-low.c (spu_create_inferior): Likewise.
13739
13740 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13741
13742 * linux-low.c (linux_create_inferior): Change execv to execvp.
13743 * spu-low.c (spu_create_inferior): Likewies.
13744
13745 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13746
13747 * Makefile.in (clean): Clean new files instead of deleted ones.
13748 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13749 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13750 rules.
13751 * configure.srv: Specify XML files and new regformats for MIPS and
13752 MIPS64 GNU/Linux.
13753 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13754 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13755 an entry for the restart register.
13756 (mips_cannot_fetch_register, mips_cannot_store_register)
13757 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13758 register names to match the XML descriptions.
13759 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13760 restart register instead of $0.
13761
13762 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13763 Markus Deuling <deuling@de.ibm.com>
13764
13765 * remote-utils.c (decode_xfer_write): New function.
13766 * server.h (decode_xfer_write): Add prototype.
13767 * server.c (handle_query): Add PACKET_LEN argument. Support
13768 qXfer:spu:read and qXfer:spu:write packets.
13769 (main): Pass packet_len to handle_query.
13770 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13771 * target.h (target_ops): Add qxfer_spu.
13772
13773 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13774
13775 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13776 accessing non-seekable spufs files.
13777
13778 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13779
13780 * server.c (handle_query): Add reply for qC packet.
13781
13782 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13783 Leo Zayas <lerele@champenstudios@com>
13784
13785 * server.h (check_remote_input_interrupt_request): New function.
13786 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13787 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13788 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13789 (check_remote_input_interrupt_request): New function.
13790 * server.h (check_remote_input_interrupt_request): Declare.
13791 * win32-low.c (winapi_DebugBreakProcess,
13792 winapi_GenerateConsoleCtrlEvent): New typedefs.
13793 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13794 to 250 ms.
13795 (win32_wait): Check for remote interrupt request
13796 with check_remote_input_interrupt_request.
13797 (win32_request_interrupt): New function.
13798 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13799
13800 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13801
13802 * win32-low.c (debug_registers_changed,
13803 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13804 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13805 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13806 (thread_rec): Get context using the low target.
13807 (child_add_thread): Call thread_added on the low target,
13808 which does the same thing.
13809 (regptr): Delete.
13810 (do_initial_child_stuff): Remove debug registers references.
13811 Set context using the low target. Resume threads after
13812 setting the contexts.
13813 (child_continue): Remove dead variable. Remove debug
13814 registers references.
13815 (child_fetch_inferior_registers): Go through the low target.
13816 (do_child_store_inferior_registers): Remove.
13817 (child_store_inferior_registers): Go through the low target.
13818 (win32_resume): Remove debug registers references.
13819 Set context using the low target.
13820 (handle_exception): Change return type to void. Don't record
13821 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13822 first chance exception.
13823 (get_child_debug_event): Change return type to void. Remove
13824 goto loop. Always return after waiting for debug event.
13825 (win32_wait): Convert to switch statement. Handle spurious
13826 events.
13827
13828 * win32-i386-low.c (debug_registers_changed,
13829 debug_registers_used): New.
13830 (initial_stuff): Rename to ...
13831 (i386_initial_stuff): ... this. Clear debug registers
13832 state variables.
13833 (store_debug_registers): Delete.
13834 (i386_get_thread_context): New.
13835 (load_debug_registers): Delete.
13836 (i386_set_thread_context): New.
13837 (i386_thread_added): New.
13838 (single_step): Rename to ...
13839 (i386_single_step): ... this.
13840 (do_fetch_inferior_registers): Rename to ...
13841 (i386_fetch_inferior_register): ... this.
13842 (i386_store_inferior_register): New.
13843 (the_low_target): Adapt to new interface.
13844
13845 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13846 (arm_get_thread_context): New.
13847 (arm_set_thread_context): New.
13848 (regptr): New.
13849 (do_fetch_inferior_registers): Rename to ...
13850 (arm_fetch_inferior_register): ... this.
13851 (arm_store_inferior_register): New.
13852 (arm_wince_breakpoint): Reimplement as unsigned long.
13853 (arm_wince_breakpoint_len): Define.
13854 (the_low_target): Adapt to new interface.
13855
13856 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13857 load_debug_registers. Add get_thread_context, set_thread_context,
13858 thread_added and store_inferior_register. Rename
13859 fetch_inferior_registers to fetch_inferior_register.
13860 (regptr): Remove declaration.
13861
13862 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13863
13864 * linux-low.c (linux_detach): Change return type to int. Return 0.
13865 * spu-low.c (spu_detach): Likewise.
13866
13867 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13868
13869 * target.h (target_ops): Change return type of detach to int.
13870 Add join.
13871 (join_inferior): New.
13872 * server.c (main): Don't skip detach support on mingw32.
13873 If the inferior doesn't support detaching return error.
13874 Call join_inferior instead of using waitpid.
13875 * linux-low.c (linux_join): New.
13876 (linux_target_op): Add linux_join.
13877 * spu-low.c (spu_join): New.
13878 (spu_target_ops): Add spu_join.
13879 * win32-low.c (win32_detach): Adapt to new interface.
13880 Reopen current_process_handle before detaching. Issue a child
13881 resume before detaching.
13882 (win32_join): New.
13883 (win32_target_op): Add win32_join.
13884
13885 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13886
13887 * win32-low.c (win32-attach): Fix return value.
13888 * target.h (target_ops): Describe ATTACH return values.
13889
13890 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13891
13892 * win32-low.c (GETPROCADDRESS): Define.
13893 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13894 (winapi_DebugSetProcessKillOnExit): Likewise.
13895 (win32_create_inferior): Force usage of ansi CreateProcessA.
13896 (win32_attach): Use GETPROCADDRESS.
13897 (win32_detach): Likewise.
13898
13899 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13900
13901 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13902
13903 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13904
13905 * win32-low.c: Commit leftover changes from 2007-03-29.
13906
13907 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13910 fields short instead of int. Add explicit padding.
13911 (i387_cache_to_fsave): Remove unnecessary casts.
13912 (i387_fsave_to_cache): Doc fix.
13913 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13914
13915 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13916
13917 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13918 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13919
13920 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13921
13922 * configure.srv (arm*-*-mingw32ce*): Move near the other
13923 arm targets.
13924
13925 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13926
13927 * configure.ac: Add errno checking.
13928 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13929 sys/file.h and malloc.h.
13930 (AC_CHECK_DECLS): Add perror.
13931 (srv_mingwce): Handle.
13932 * configure.srv (i[34567]86-*-cygwin*): Add
13933 win32-i386-low.o to srv_tgtobj.
13934 (i[34567]86-*-mingw*): Likewise.
13935 (arm*-*-mingw32ce*): Add case.
13936 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13937 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13938 [__MINGW32CE__] (strerror): New function.
13939 [__MINGW32CE__] (errno): Define to GetLastError.
13940 [__MINGW32CE__] (COUNTOF): New macro.
13941 (remote_open): Remove extra close call.
13942 * mem-break.c (delete_breakpoint_at): New function.
13943 * mem-break.h (delete_breakpoint_at): Declare.
13944 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13945 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13946 [USE_WIN32API] (read, write): Add char* casts.
13947 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13948 * server.h: Include wincecompat.h on Windows CE.
13949 [HAVE_ERRNO_H]: Check.
13950 (perror): Declare if not declared.
13951 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13952 (perror_with_name): Remove errno declaration.
13953 * wincecompat.h: New.
13954 * wincecompat.c: New.
13955 * win32-low.h: New.
13956 * win32-arm-low.c: New.
13957 * win32-i386-low.c: New.
13958 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13959 (OUTMSG2): Make it safe.
13960 (_T): New macro.
13961 (COUNTOF): New macro.
13962 (NUM_REGS): Get it from the low target.
13963 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13964 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13965 (thread_rec): Let low target handle debug registers.
13966 (child_add_thread): Likewise.
13967 (child_init_thread_list): Likewise.
13968 (continue_one_thread): Likewise.
13969 (regptr): New.
13970 (do_child_fetch_inferior_registers): Move to ...
13971 * win32-i386-low.c: ... here, and rename to ...
13972 (do_fetch_inferior_registers): ... this.
13973 * win32-low.c (child_fetch_inferior_registers):
13974 Go through the low target.
13975 (do_child_store_inferior_registers): Use regptr.
13976 (strwinerror): New function.
13977 (win32_create_inferior): Handle Windows CE.
13978 Use strwinerror instead of strerror on Windows error
13979 codes. Add program to the error output.
13980 Don't close the main thread handle on Windows CE.
13981 (win32_attach): Use coredll.dll on Windows CE.
13982 (win32_kill): Close current process and current
13983 thread handles.
13984 (win32_detach): Use coredll.dll on Windows CE.
13985 (win32_resume): Let low target handle debug registers, and
13986 step request.
13987 (handle_exception): Add/Remove initial breakpoint. Avoid
13988 non-existant WSTOPSIG on Windows CE.
13989 (win32_read_inferior_memory): Cast to remove warning.
13990 (win32_arch_string): Go through the low target.
13991 (initialize_low): Call set_breakpoint_data with the low
13992 target's breakpoint.
13993 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13994 FOP_REGNUM, mappings): Move to ...
13995 * win32-i386-low.c: ... here.
13996 * win32-low.c (win32_thread_info): Move to ...
13997 * win32-low.h: ... here.
13998 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13999 win32-arm-low.c and wincecompat.c.
14000 (all:): Add $EXEEXT.
14001 (install-only:): Likewise.
14002 (gdbserver:): Likewise.
14003 (gdbreplay:): Likewise.
14004 * config.in: Regenerate.
14005 * configure: Regenerate.
14006
14007 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14008
14009 * win32-low.c: Rename typedef thread_info to
14010 win32_thread_info throughout.
14011
14012 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14013
14014 * win32-i386-low.c: Rename to ...
14015 * win32-low.c: ... this.
14016 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14017 * Makefile.in: Likewise.
14018
14019 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14020
14021 * remote-utils.c (monitor_output): Constify msg parameter.
14022 * server.h (monitor_output): Likewise.
14023 * win32-i386-low.c (handle_output_debug_string): New.
14024 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14025 handle_output_debug_string.
14026 (get_child_debug_event): Likewise.
14027
14028 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14029
14030 * server.c (main): Correct strtoul check.
14031
14032 2007-03-27 Jon Ringle <jon@ringle.org>
14033
14034 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14035
14036 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14037
14038 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14039
14040 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14041
14042 * terminal.h: Check HAVE_SGTTY_H.
14043
14044 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14045
14046 * remote-utils.c (remote_open): Print out the assigned port number.
14047
14048 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14049
14050 * remote-utils.c (monitor_output): New function.
14051 * server.c (debug_threads): Define here.
14052 (monitor_show_help): New function.
14053 (handle_query): Handle qRcmd.
14054 (main): Do not handle 'd' packet.
14055 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14056 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14057 of debug_threads.
14058
14059 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14060
14061 * Makefile.in (EXEEXT): New.
14062 (clean): Use $(EXEEXT).
14063
14064 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14065
14066 * target.h (target_ops): Rename send_signal to request_interrupt,
14067 and remove enum target_signal parameter.
14068 * linux-low.c (linux_request_interrupt): Rename from
14069 linux_send_signal, and always send SIGINT.
14070 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14071 and always send SIGINT.
14072 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14073 of send_signal.
14074 (input_interrupt): Likewise.
14075
14076 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14077
14078 * server.c (get_features_xml): Check if target implemented
14079 arch_string.
14080 * win32-i386-low.c (win32_arch_string): New.
14081 (win32_target_ops): Add win32_arch_string as arch_string member.
14082
14083 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14084
14085 * spu-low.c (spu_arch_string): New.
14086 (spu_target_ops): Add spu_arch_string.
14087
14088 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14089
14090 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14091 * configure.ac: Do not check for terminal.h.
14092 * configure, config.in: Regenerated.
14093
14094 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14095
14096 * Makefile.in (OBS): Add $(XML_BUILTIN).
14097 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14098 (clean): Update.
14099 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14100 (arm-with-iwmmxt.c): New.
14101 * config.in, configure: Regenerate.
14102 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14103 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14104 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14105 (arm*-*-linux*): Add iWMMXt and regset support.
14106 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14107 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14108 (arm_store_wmmxregset, target_regsets): New.
14109 * server.c (get_features_xml): Take annex argument. Check builtin
14110 XML documents.
14111 (handle_query): Handle multiple annexes.
14112
14113 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14114
14115 * remote-utils.c [USE_WIN32API] (read, write): Define.
14116 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14117 write.
14118
14119 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14120
14121 * linux-i386-low.c (the_low_target): Set arch_string.
14122 * linux-x86-64-low.c (the_low_target): Likewise.
14123 * linux-low.c (linux_arch_string): New.
14124 (linux_target_ops): Add it.
14125 * linux-low.h (struct linux_target_ops): Add arch_string.
14126 * server.c (write_qxfer_response): Use const void * for DATA.
14127 (get_features_xml): New.
14128 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14129 * target.h (struct target_ops): Add arch_string method.
14130
14131 2007-01-03 Denis Pilat <denis.pilat@st.com>
14132 Daniel Jacobowitz <dan@codesourcery.com>
14133
14134 * linux-low.c (linux_kill): Handle being called with no threads.
14135 * win32-i386-low.c (win32_kill): Likewise.
14136 (get_child_debug_event): Clear current_process_handle.
14137
14138 2006-12-30 Denis PILAT <denis.pilat@st.com>
14139 Daniel Jacobowitz <dan@codesourcery.com>
14140
14141 * remote-utils.c (remote_open): Check the type of specified
14142 serial port devices before opening them.
14143 * server.c (main): Kill the inferior if an error occurs during
14144 the first remote_open.
14145
14146 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14147
14148 * README: Update supported targets.
14149
14150 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14151
14152 * Makefile.in (clean): Remove reg-mips64.c.
14153 (reg-mips64.c, reg-mips64.o): New rules.
14154 * configure.srv: Handle mips64. Include regset support for mips.
14155 * linux-mips-low.c (union mips_register): New.
14156 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14157 (mips_breakpoint, mips_breakpoint_at): Use int.
14158 (mips_collect_register, mips_supply_register)
14159 (mips_collect_register_32bit, mips_supply_register_32bit)
14160 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14161 (mips_store_fpregset, target_regsets): New.
14162 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14163
14164 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14165
14166 * configure.srv: Add target "spu*-*-*".
14167 * Makefile.in (clean): Remove reg-spu.c.
14168 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14169 * spu-low.c: New file.
14170
14171 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * configure.ac: Correct td_thr_tls_get_addr test.
14174 * configure: Regenerated.
14175
14176 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * linux-low.c (linux_wait_for_event): Reformat. Use the
14179 pass_signals array.
14180 * remote-utils.c (decode_address_to_semicolon): New.
14181 * server.c (pass_signals, handle_general_set): New.
14182 (handle_query): Mention QPassSignals for qSupported.
14183 (main): Call handle_general_set.
14184 * server.h (pass_signals, decode_address_to_semicolon): New.
14185
14186 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14187
14188 * server.c (handle_query): Correct error handling for read_auxv.
14189
14190 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14191
14192 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14193 and srv_linux_thread_db to yes.
14194 * linux-s390-low.c (s390_fill_gregset): New function.
14195 (target_regsets): Define data structure.
14196
14197 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14198
14199 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14200 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14201 * config.in, configure: Regenerated.
14202 * inferiors.c (gdb_id_to_thread): New function.
14203 (gdb_id_to_thread_id): Use it.
14204 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14205 * linux-low.h (struct process_info): Add th member.
14206 (thread_db_get_tls_address): New prototype.
14207 * remote-utils.c (decode_address): Make non-static.
14208 * server.c (handle_query): Handle qGetTLSAddr.
14209 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14210 * target.h (struct target_ops): Add get_tls_address.
14211 * thread-db.c (maybe_attach_thread): Save the thread handle.
14212 (thread_db_get_tls_address): New.
14213
14214 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14215
14216 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14217 (linux_resume_one_process): Take a siginfo_t *. Update all
14218 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14219 (struct pending_signals): Add a siginfo_t.
14220 (linux_wait_for_process): Always set last_status.
14221 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14222 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14223 * linux-low.h (struct process_info): Add last_status.
14224
14225 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14226
14227 * remote-utils.c (try_rle): New function.
14228 (putpkt_binary): Use it.
14229
14230 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14231
14232 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14233 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14234 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14235 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14236 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14237 point registers.
14238
14239 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14240
14241 * server.c (terminal_fd): New variable.
14242 (old_foreground_pgrp): Likewise.
14243 (restore_old_foreground_pgrp): New function.
14244 (start_inferior): Record the terminal file descriptor in terminal_fd
14245 and its original foreground group in old_foreground_pgrp. Register
14246 restore_old_foreground_pgrp with atexit().
14247
14248 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14249
14250 * server.c (handle_query): Correct qPart to qXfer.
14251
14252 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14253
14254 * configure.ac: Check for more headers which are missing on
14255 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14256 * configure.srv: Add Cygwin and mingw32.
14257 * remote-utils.c: Don't include headers unconditionally which
14258 are missing on mingw32. Include <winsock.h> for mingw32.
14259 (remote_open): Adjust for mingw32 support. Flush
14260 standard error after writing to it.
14261 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14262 (unblock_async_io, enable_async_io, disable_async_io)
14263 (readchar, getpkt): Update for Winsock support.
14264 (prepare_resume_reply): Expect a protocol signal number.
14265 * server.c: Disable <sys/wait.h> on mingw32.
14266 (start_inferior): Adjust for mingw32 support. Flush
14267 standard error after writing to it.
14268 (attach_inferior): Likewise. Use protocol signal
14269 numbers.
14270 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14271 and names.
14272 * win32-i386-low.c: New file.
14273 * Makefile.in (XM_CLIBS): Set.
14274 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14275 (win32-i386-low.o): New dependency rule.
14276 * linux-low.c (linux_wait): Use target signal numbers.
14277 * target.h (struct target_ops): Doc fix.
14278 * server.h (target_signal_to_name): New prototype.
14279 * gdbreplay.c: Don't include headers unconditionally which
14280 are missing on mingw32. Include <winsock.h> for mingw32.
14281 (remote_close, remote_open): Adjust for Winsock support.
14282 * configure, config.in: Regenerated.
14283
14284 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14285
14286 * server.c (decode_xfer_read, write_qxfer_response): New.
14287 (handle_query): Take a packet length argument. Handle
14288 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14289 the qSupported response.
14290 (main): Update call to handle_query.
14291
14292 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14293
14294 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14295 (putpkt_binary): Renamed from putpkt and adjusted for binary
14296 data.
14297 (putpkt): New wrapper for putpkt_binary.
14298 (readchar): Don't mask off the high bit.
14299 (decode_X_packet): New function.
14300 * server.c (main): Call putpkt_binary if a handler sets the packet
14301 length. Save the length of the incoming packet. Handle 'X'.
14302 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14303
14304 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14305
14306 * server.c (handle_query): Handle qSupported.
14307
14308 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14309
14310 * remote-utils.c (all_symbols_looked_up): New variable.
14311 (look_up_one_symbol): Check it.
14312 * server.h (look_up_one_symbol): New declaration.
14313 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14314
14315 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14316
14317 * Makefile.in (linux-arm-low.o): Update dependencies.
14318 * linux-arm-low.c: Include "gdb_proc_service.h".
14319 (PTRACE_GET_THREAD_AREA): Define.
14320 (ps_get_thread_area): New function.
14321
14322 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14323
14324 * configure.srv (m68k*-*-uclinux*): New target.
14325 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14326 (linux_resume_one_process): Remove extraneous cast.
14327 (linux_read_offsets): New.
14328 (linux_target_op): Add linux_read_offsets on mmuless systems.
14329 * server.c (handle_query): Add qOffsets logic.
14330 * target.h (struct target_ops): Add read_offsets.
14331
14332 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14333
14334 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14335 (PTRACE_GET_THREAD_AREA): Define.
14336 (ps_get_thread_area): New function.
14337 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14338 (linux-x86-64-low.o): Update.
14339
14340 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14341
14342 * configure.ac: Remove checks for prfpregset_t.
14343 * gdb_proc_service.h: New file.
14344 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14345 new "gdb_proc_service.h".
14346 * proc-service.c: Likewise.
14347 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14348 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14349 * Makefile.in (gdb_proc_service_h): Updated.
14350 * configure, config.in: Regenerated.
14351
14352 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14353
14354 * remote-utils.c (prepare_resume_reply): Move declaration
14355 of gdb_id_from_wait to the top of the block.
14356
14357 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14358
14359 * linux-low.c (regsets_store_inferior_registers): Read the regset
14360 from the target before filling it.
14361
14362 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14363
14364 * server.c (attach_inferior): Return SIGTRAP for a successful
14365 attach.
14366
14367 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * Makefile.in (OBS): Add version.o.
14370 (STAGESTUFF): Delete.
14371 (version.o): Add dependencies.
14372 (version.c): Replace rule.
14373 (clean): Remove version.c.
14374 * server.c (gdbserver_version): New.
14375 (gdbserver_usage): Use printf.
14376 (main): Handle --version and --help.
14377 * server.h (version, host_name): Add declarations.
14378
14379 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14380
14381 * linux-arm-low.c:
14382 * linux-arm-low.c:
14383 * inferiors.c:
14384 * i387-fp.h:
14385 * i387-fp.c:
14386 * gdbreplay.c:
14387 * regcache.c:
14388 * proc-service.c:
14389 * mem-break.h:
14390 * mem-break.c:
14391 * linux-x86-64-low.c:
14392 * linux-sh-low.c:
14393 * linux-s390-low.c:
14394 * linux-ppc64-low.c:
14395 * linux-ppc-low.c:
14396 * linux-mips-low.c:
14397 * linux-m68k-low.c:
14398 * linux-m32r-low.c:
14399 * linux-low.h:
14400 * linux-low.c:
14401 * linux-ia64-low.c:
14402 * linux-i386-low.c:
14403 * linux-crisv32-low.c:
14404 * thread-db.c:
14405 * terminal.h:
14406 * target.h:
14407 * target.c:
14408 * server.h:
14409 * server.c:
14410 * remote-utils.c:
14411 * regcache.h:
14412 * utils.c:
14413 * Makefile.in:
14414 * configure.ac:
14415 * gdbserver.1: Add (C) after Copyright. Update the FSF
14416 address.
14417
14418 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14419
14420 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14421 (arm_breakpoint_at): Recognize both breakpoints.
14422 (the_low_target): Use the correct breakpoint instruction.
14423
14424 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14425
14426 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14427 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14428 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14429 (the_low_target): Update.
14430
14431 2005-10-25 Andreas Schwab <schwab@suse.de>
14432
14433 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14434
14435 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14436 (ia64_num_regs): Reduce to 462.
14437
14438 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14439
14440 * acinclude.m4: Correct quoting.
14441 * aclocal.m4: Regenerated.
14442
14443 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14444 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14445 (thread_db_init): Call thread_db_err_str.
14446 * configure.ac: Check for TD_VERSION.
14447 * config.in, configure: Regenerated.
14448
14449 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14450
14451 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14452
14453 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14454
14455 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14456 is not available. Define HAVE_PTRACE_GETREGS if it is.
14457 * config.in, configure: Regenerated.
14458 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14459 * linux-i386-low.c, linux-m68k-low.c: Update to use
14460 HAVE_PTRACE_GETREGS.
14461 * linux-low.c (regsets_fetch_inferior_registers)
14462 (regsets_store_inferior_registers): Only return 0 if we processed
14463 GENERAL_REGS.
14464 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14465 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14466
14467 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14468
14469 * inferiors.c (struct thread_info): Add gdb_id.
14470 (add_thread): Add gdb_id argument.
14471 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14472 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14473 calls to add_thread.
14474 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14475 * server.c (handle_query): Use thread_to_gdb_id.
14476 (handle_v_cont, main): Use gdb_id_to_thread_id.
14477 * server.h (add_thread): Update prototype.
14478 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14479 prototypes.
14480
14481 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14482
14483 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14484 left-padded registers.
14485 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14486 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14487
14488 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14489
14490 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14491 * configure: Regenerate.
14492 * config.in: Regenerate.
14493 * server.h (NEED_DECLARATION_STRERROR):
14494 Replace with !HAVE_DECL_STRERROR.
14495
14496 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * linux-low.c (linux_wait, linux_send_signal): Don't test
14499 an unsigned long variable for > 0 if it could be MAX_ULONG.
14500 * server.c (myresume): Likewise.
14501 * target.c (set_desired_inferior): Likewise.
14502
14503 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14504
14505 * configure.ac: Simplify and improve check for socklen_t.
14506 * configure, config.in: Regenerate.
14507
14508 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14509
14510 * acconfig.h: Remove.
14511 * configure.ac: Add a test for socklen_t. Use three-argument
14512 AC_DEFINE throughout.
14513 * config.in: Regenerated using autoheader 2.59.
14514 * configure: Regenerated.
14515
14516 * gdbreplay.c (socklen_t): Provide a default.
14517 (remote_open): Use socklen_t.
14518 * remote-utils.c (socklen_t): Provide a default.
14519 (remote_open): Use socklen_t.
14520 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14521 unsigned char.
14522
14523 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14524 char for buffers.
14525 * linux-low.c (linux_read_memory, linux_write_memory)
14526 (linux_read_auxv): Likewise.
14527 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14528 (check_mem_write): Likewise.
14529 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14530 Likewise.
14531 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14532 (registers_from_string, register_data): Likewise.
14533 * server.c (handle_query, main): Likewise.
14534 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14535 (decode_M_packet): Likewise.
14536 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14537 * target.h (struct target_ops): Update read_memory, write_memory,
14538 and read_auxv.
14539 (read_inferior_memory, write_inferior_memory): Update.
14540 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14541 to unsigned char *.
14542 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14543 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14544 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14545 linux-s390-low.c, linux-sh-low.c: Update for changes in
14546 read_inferior_memory and the_low_target->breakpoint.
14547
14548 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14549
14550 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14551 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14552 * configure.srv: Add powerpc64-*-linux*.
14553 * linux-ppc64-low.c: New file.
14554
14555 2005-05-23 Orjan Friberg <orjanf@axis.com>
14556
14557 * linux-cris-low.c: New file with support for CRIS.
14558 * linux-crisv32-low.c: Ditto for CRISv32.
14559 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14560 (clean): Add reg-cris.c and reg-crisv32.c.
14561 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14562 reg-crisv32.o, and reg-crisv32.c to make rules.
14563 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14564 recognized targets.
14565
14566 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14567
14568 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14569 of sizeof (PTRACE_XFER_TYPE).
14570 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14571
14572 2005-05-12 Orjan Friberg <orjanf@axis.com>
14573
14574 * target.h (struct target_ops): Add insert_watchpoint,
14575 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14576 pointers for hardware watchpoint support.
14577 * linux-low.h (struct linux_target_ops): Ditto.
14578 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14579 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14580 to linux_target_ops.
14581 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14582 reply packet.
14583 * server.c (main): Recognize 'Z' and 'z' packets.
14584
14585 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14586
14587 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14588 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14589 (the_low_target): Add new members.
14590
14591 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * proc-service.c (ps_lgetregs): Search all_processes instead of
14594 all_threads.
14595
14596 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * server.c (start_inferior): Change return type to int.
14599 (attach_inferior): Change sigptr to int *.
14600 (handle_v_cont, handle_v_requests): Change signal to int *.
14601 (main): Change signal to int.
14602
14603 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14604
14605 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14606 * configure.srv: Add m32r*-*-linux*.
14607 * linux-m32r-low.c: New file.
14608
14609 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14612
14613 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14614
14615 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14616 Take unsigned long arguments for PIDs.
14617 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14618 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14619 (wait_for_sigstop, linux_resume_one_process)
14620 (regsets_fetch_inferior_registers, linux_send_signal)
14621 (linux_read_auxv): Likewise. Update the types of variables holding
14622 PIDs. Update format string specifiers.
14623 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14624 * remote-utils.c (prepare_resume_reply): Likewise.
14625 * server.c (cont_thread, general_thread, step_thread)
14626 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14627 unsigned long.
14628 (handle_query): Update format specifiers.
14629 (handle_v_cont, main): Use strtoul for thread IDs.
14630 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14631 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14632 (general_thread, step_thread, thread_from_wait)
14633 (old_thread_from_wait): Update.
14634 * target.h (struct thread_resume): Use unsigned long for THREAD.
14635 (struct target_ops): Use unsigned long for arguments to attach and
14636 thread_alive.
14637
14638 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14639
14640 * acinclude.m4: Include bfd/bfd.m4 directly.
14641 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14642 <agriffis@toolchain.org>.
14643 * aclocal.m4, configure: Regenerated.
14644
14645 2005-01-07 Andrew Cagney <cagney@gnu.org>
14646
14647 * configure.ac: Rename configure.in, require autoconf 2.59.
14648 * configure: Re-generate.
14649
14650 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14651
14652 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14653 LIBS when finished.
14654 * aclocal.m4: Regenerated.
14655 * configure: Regenerated.
14656
14657 2004-11-21 Andreas Schwab <schwab@suse.de>
14658
14659 * linux-m68k-low.c (m68k_num_gregs): Define.
14660 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14661 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14662 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14663 (m68k_breakpoint_at): New. Add to the_low_target.
14664
14665 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14666 srv_linux_thread_db to yes.
14667
14668 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14669
14670 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14671 (ARCH_SET_FS): Likewise.
14672 (ARCH_GET_FS): Likewise.
14673 (ARCH_GET_GS): Likewise.
14674
14675 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14676
14677 * linux-i386-low.c (ps_get_thread_area): New.
14678 * linux-x86-64-low.c (ps_get_thread_area): New.
14679 * linux-low.c: Include <sys/syscall.h>.
14680 (linux_kill_one_process): Don't kill the first thread here.
14681 (linux_kill): Kill the first thread here.
14682 (kill_lwp): New function.
14683 (send_sigstop, linux_send_signal): Use it.
14684 * proc-service.c: Clean up #ifdefs.
14685 (fpregset_info): Delete.
14686 (ps_lgetregs): Update and enable implementation.
14687 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14688 implementations.
14689 * remote-utils.c (struct sym_cache, symbol_cache): New.
14690 (input_interrupt): Print a clearer message.
14691 (async_io_enabled): New variable.
14692 (enable_async_io, disable_async_io): Use it. Update comments.
14693 (look_up_one_symbol): Use the symbol cache.
14694 * thread-db.c (thread_db_look_up_symbols): New function.
14695 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14696
14697 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14698
14699 * configure.in: Test for -rdynamic.
14700 * configure: Regenerated.
14701 * Makefile (INTERNAL_LDFLAGS): New.
14702 (gdbserver, gdbreplay): Use it.
14703
14704 2004-09-02 Andrew Cagney <cagney@gnu.org>
14705
14706 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14707
14708 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14709
14710 * linux-low.c (linux_wait): Clear all_processes list also.
14711
14712 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14713
14714 * linux-low.c: Include <errno.h>. Remove extern declaration of
14715 errno.
14716
14717 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14718
14719 * gdbreplay.c, server.h, utils.c: Update copyright years.
14720
14721 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14722
14723 * server.c (main): Print child status or termination signal from
14724 variable 'signal', not 'sig'.
14725
14726 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14727
14728 * linux-low.c (linux_read_memory): Change return type to
14729 int. Check for and return error from ptrace().
14730 * target.c (read_inferior_memory): Change return type to int. Pass
14731 back return status from the_target->read_memory().
14732 * target.h (struct target_ops): Adapt *read_memory() prototype.
14733 Update comment.
14734 (read_inferior_memory): Adapt prototype.
14735 * server.c (main): Return an error packet if
14736 read_inferior_memory() returns an error.
14737
14738 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14739
14740 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14741 Unify with other clean targets.
14742
14743 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14744
14745 * server.c (handle_v_cont): Call set_desired_inferior.
14746
14747 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14748
14749 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14750
14751 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14752
14753 * linux-low.c (linux_wait): Unblock async I/O.
14754 (linux_resume): Block and enable async I/O.
14755 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14756 * server.h (block_async_io, unblock_async_io): Add prototypes.
14757
14758 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14759
14760 * remote-utils.c (remote_open): Print a status notice after
14761 opening a TCP port.
14762 * server.c (attach_inferior): Print a status notice after
14763 attaching.
14764
14765 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14766
14767 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14768
14769 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14770
14771 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14772 error packet.
14773 * server.c, target.h: Update copyright years.
14774
14775 2004-02-25 Roland McGrath <roland@redhat.com>
14776
14777 * target.h (struct target_ops): New member `read_auxv'.
14778 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14779 * linux-low.c (linux_read_auxv): New function.
14780 (linux_target_ops): Initialize `read_auxv' member to that.
14781
14782 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14783
14784 Committed by Jim Blandy <jimb@redhat.com>.
14785
14786 * linux-s390-low.c (s390_num_regs): Update.
14787 (s390_regmap): Remove control registers. Use __s390x__ predefine
14788 instead of GPR_SIZE to distiguish s390 and s390x targets.
14789
14790 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14791
14792 * linux-low.c: Update copyright year.
14793 (check_removed_breakpoint): Clear pending_is_breakpoint.
14794 (linux_set_resume_request, linux_queue_one_thread)
14795 (resume_status_pending_p): New functions.
14796 (linux_continue_one_thread): Use process->resume.
14797 (linux_resume): Only resume threads if there are no pending events.
14798 * linux-low.h (struct process_info): Add resume request
14799 pointer.
14800
14801 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14802
14803 * regcache.c (new_register_cache): Clear the allocated register
14804 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14805
14806 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14807
14808 * linux-low.c (linux_resume): Take a struct thread_resume *
14809 argument.
14810 (linux_wait): Update call.
14811 (resume_ptr): New static variable.
14812 (linux_continue_one_thread): Renamed from
14813 linux_continue_one_process. Use resume_ptr.
14814 (linux_resume): Use linux_continue_one_thread.
14815 * server.c (handle_v_cont, handle_v_requests): New functions.
14816 (myresume): New function.
14817 (main): Handle 'v' case.
14818 * target.h (struct thread_resume): New type.
14819 (struct target_ops): Change argument of "resume" to struct
14820 thread_resume *.
14821 (myresume): Delete macro.
14822
14823 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14824
14825 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14826 (uninstall): Support DESTDIR.
14827
14828 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14829
14830 * configure.srv: Add xscale*linux copy of arm*linux entry.
14831
14832 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14833
14834 * linux-arm-low.c (arm_reinsert_addr): New function.
14835 (the_low_target): Add arm_reinsert_addr.
14836
14837 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14838
14839 * mem-break.c: Remove whitespace at end of file.
14840
14841 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14842
14843 * configure.in: Check whether we need to prototype strerror.
14844 * server.h: Optionally prototype strerror.
14845 * gdbreplay.c (perror_with_name): Use strerror.
14846 * linux-low.c (linux_attach_lwp): Use strerror.
14847 * utils.c (perror_with_name): Use strerror.
14848 * config.in, configure: Regenerated.
14849
14850 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14851
14852 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14853 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14854
14855 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14856
14857 * Makefile.in (SFILES): Update.
14858 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14859 low-sun3.c: Remove files.
14860
14861 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14862
14863 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14864 (linux_detach_one_process, linux_detach): New functions.
14865 (linux_target_ops): Add linux_detach.
14866 * server.c (main): Handle 'D' packet.
14867 * target.h (struct target_ops): Add "detach" member.
14868 (detach_inferior): Define.
14869
14870 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14871
14872 From Kelley Cook <kelleycook@wideopenwest.com>:
14873 * configure.srv: Accept i[34567]86 variants.
14874
14875 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14876
14877 * linux-low.c (linux_wait_for_event): Correct comment typos.
14878 (linux_resume_one_process): Call check_removed_breakpoint.
14879 (linux_send_signal): New function.
14880 (linux_target_ops): Add linux_send_signal.
14881 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14882 of kill.
14883 * target.h (struct target_ops): Add send_signal.
14884
14885 2003-05-29 Jim Blandy <jimb@redhat.com>
14886
14887 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14888 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14889 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14890 away part of the register's value.
14891
14892 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14893
14894 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14895 (linux_wait_for_event, linux_init_signals): Likewise.
14896
14897 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14898
14899 * configure.in: Check for stdlib.h.
14900 * configure: Regenerated.
14901 * config.in: Regenerated.
14902
14903 2003-01-04 Andreas Schwab <schwab@suse.de>
14904
14905 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14906
14907 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14908
14909 * Makefile.in: Remove obsolete code.
14910
14911 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14912
14913 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14914 defined(PT_FPR0_HI).
14915
14916 2002-11-17 Stuart Hughes <seh@zee2.com>
14917
14918 * linux-arm-low.c (arm_num_regs): Increase.
14919 (arm_regmap): Include status register.
14920
14921 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14922
14923 * linux-low.c (register_addr): Remove incorrect -1 check.
14924
14925 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14926
14927 * linux-low.c (linux_create_inferior): Call setpgid. Return
14928 the new PID.
14929 (unstopped_p, linux_signal_pid): Remove.
14930 (linux_target_ops): Remove linux_signal_pid.
14931 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14932 global instead of target method.
14933 * target.h (struct target_ops): Remove signal_pid. Update comment
14934 for create_inferior.
14935 * server.c (signal_pid): New variable.
14936 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14937 gdbserver. Set the child to be the foreground process group.
14938 (attach_inferior): Set signal_pid.
14939
14940 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14941
14942 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14943
14944 2002-08-20 Jim Blandy <jimb@redhat.com>
14945
14946 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14947 default for this.
14948
14949 2002-08-01 Andrew Cagney <cagney@redhat.com>
14950
14951 * Makefile.in: Make chill references obsolete.
14952
14953 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14954
14955 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14956 * configure: Regenerate.
14957 * config.in: Regenerate.
14958
14959 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14960
14961 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14962 (perror_with_name, remote_close, remote_open, expect, play): Static.
14963
14964 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14965
14966 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14967 byte offsets instead of an array of indexes.
14968 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14969
14970 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14971
14972 * regcache.c: Add comment.
14973
14974 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14975
14976 * thread-db.c: New file.
14977 * proc-service.c: New file.
14978 * acinclude.m4: New file.
14979 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14980 proc-service.o, and thread-db.o.
14981 (linux-low.o): Add USE_THREAD_DB.
14982 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14983 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14984 * aclocal.m4: Regenerated.
14985 * config.in: Regenerated.
14986 * configure: Regenerated.
14987 * configure.in: Check for proc_service.h, sys/procfs.h,
14988 thread_db.h, and linux/elf.h headrs.
14989 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14990 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14991 Check for -lthread_db and thread support.
14992 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14993 PowerPC, and SuperH.
14994 * i387-fp.c: Constify arguments.
14995 * i387-fp.h: Likewise.
14996 * inferiors.c: (struct thread_info): Renamed from
14997 `struct inferior_info'. Remove PID member. Use generic inferior
14998 list header. All uses updated.
14999 (inferiors, signal_pid): Removed.
15000 (all_threads): New variable.
15001 (get_thread): Define.
15002 (add_inferior_to_list): New function.
15003 (for_each_inferior): New function.
15004 (change_inferior_id): New function.
15005 (add_inferior): Removed.
15006 (remove_inferior): New function.
15007 (add_thread): New function.
15008 (free_one_thread): New function.
15009 (remove_thread): New function.
15010 (clear_inferiors): Use for_each_inferior and free_one_thread.
15011 (find_inferior): New function.
15012 (find_inferior_id): New function.
15013 (inferior_target_data): Update argument type.
15014 (set_inferior_target_data): Likewise.
15015 (inferior_regcache_data): Likewise.
15016 (set_inferior_regcache_data): Likewise.
15017 * linux-low.c (linux_bp_reinsert): Remove.
15018 (all_processes, stopping_threads, using_thrads)
15019 (struct pending_signals, debug_threads, pid_of): New.
15020 (inferior_pid): Replace with macro.
15021 (struct inferior_linux_data): Remove.
15022 (get_stop_pc, add_process): New functions.
15023 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15024 Use add_process and add_thread.
15025 (linux_attach_lwp): New function, based on old linux_attach. Use
15026 add_process and add_thread. Set stop_expected for new threads.
15027 (linux_attach): New function.
15028 (linux_kill_one_process): New function.
15029 (linux_kill): Kill all LWPs.
15030 (linux_thread_alive): Use find_inferior_id.
15031 (check_removed_breakpoints, status_pending_p): New functions.
15032 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15033 Update. Use WNOHANG. Wait for cloned processes also. Update process
15034 struct for the found process.
15035 (linux_wait_for_event): New function.
15036 (linux_wait): Use it. Support LWPs.
15037 (send_sigstop, wait_for_sigstop, stop_all_processes)
15038 (linux_resume_one_process, linux_continue_one_process): New functions.
15039 (linux_resume): Support LWPs.
15040 (REGISTER_RAW_SIZE): Remove.
15041 (fetch_register): Use register_size instead. Call supply_register.
15042 (usr_store_inferior_registers): Likewise. Call collect_register.
15043 Fix recursive case.
15044 (regsets_fetch_inferior_registers): Improve error message.
15045 (regsets_store_inferior_registers): Add debugging.
15046 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15047 (unstopped_p, linux_signal_pid): New functions.
15048 (linux_target_ops): Add linux_signal_pid.
15049 (linux_init_signals): New function.
15050 (initialize_low): Call it. Initialize using_threads.
15051 * regcache.c (inferior_regcache_data): Add valid
15052 flag.
15053 (get_regcache): Fetch registers lazily. Add fetch argument
15054 and update all callers.
15055 (regcache_invalidate_one, regcache_invalidate): New
15056 functions.
15057 (new_register_cache): Renamed from create_register_cache.
15058 Return the new regcache.
15059 (free_register_cache): Change argument to a void *.
15060 (registers_to_string, registers_from_string): Call get_regcache
15061 with fetch flag set.
15062 (register_data): Make static. Pass fetch flag to get_regcache.
15063 (supply_register): Call get_regcache with fetch flag clear.
15064 (collect_register): Call get_regcache with fetch flag set.
15065 (collect_register_as_string): New function.
15066 * regcache.h: Update.
15067 * remote-utils.c (putpkt): Flush after debug output and use
15068 stderr.
15069 Handle input interrupts while waiting for an ACK.
15070 (input_interrupt): Use signal_pid method.
15071 (getpkt): Flush after debug output and use stderr.
15072 (outreg): Use collect_register_as_string.
15073 (new_thread_notify, dead_thread_notify): New functions.
15074 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15075 and general_thread.
15076 (look_up_one_symbol): Flush after debug output.
15077 * server.c (step_thread, server_waiting): New variables.
15078 (start_inferior): Don't use signal_pid. Update call to mywait.
15079 (attach_inferior): Update call to mywait.
15080 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15081 (main): Don't fetch/store registers explicitly. Use
15082 set_desired_inferior. Support proposed ``Hs'' packet. Update
15083 calls to mywait.
15084 * server.h: Update.
15085 (struct inferior_list, struct_inferior_list_entry): New.
15086 * target.c (set_desired_inferior): New.
15087 (write_inferior_memory): Constify.
15088 (mywait): New function.
15089 * target.h: Update.
15090 (struct target_ops): New signal_pid method.
15091 (mywait): Removed macro, added prototype.
15092
15093 * linux-low.h (regset_func): Removed.
15094 (regset_fill_func, regset_store_func): New.
15095 (enum regset_type): New.
15096 (struct regset_info): Add type field. Use new operation types.
15097 (struct linux_target_ops): stop_pc renamed to get_pc.
15098 Add decr_pc_after_break and breakpoint_at.
15099 (get_process, get_thread_proess, get_process_thread)
15100 (strut process_info, all_processes, linux_attach_lwp)
15101 (thread_db_init): New.
15102
15103 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15104 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15105 (the_low_target): Add new members.
15106 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15107 (i386_store_fpxregset): Constify.
15108 (target_regsets): Add new kind identifier.
15109 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15110 (i386_set_pc): Add debugging.
15111 (i386_breakpoint_at): New function.
15112 (the_low_target): Add new members.
15113 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15114 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15115 (mips_breakpoint_at): New.
15116 (the_low_target): Add new members.
15117 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15118 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15119 (the_low_target): Add new members.
15120 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15121 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15122 (the_low_target): Add new members.
15123 * linux-x86-64-low.c (target_regsets): Add new kind
15124 identifier.
15125
15126 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15127
15128 From Martin Pool <mbp@samba.org>:
15129 * server.c (gdbserver_usage): New function.
15130 (main): Call it.
15131
15132 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15133
15134 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15135 stop_at -> stop_pc.
15136
15137 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15138
15139 * Makefile.in: Remove obsolete code.
15140
15141 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15142
15143 * linux-low.c (regsets_fetch_inferior_registers),
15144 (regsets_store_inferior_registers): Removed cast to int from
15145 ptrace() calls.
15146 * regcache.h: Added declaration of struct inferior_info.
15147
15148 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15149
15150 * inferiors.c (struct inferior_info): Add regcache_data.
15151 (add_inferior): Call create_register_cache.
15152 (clear_inferiors): Call free_register_cache.
15153 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15154 * regcache.c (struct inferior_regcache_data): New.
15155 (registers): Remove.
15156 (get_regcache): New function.
15157 (create_register_cache, free_register_cache): New functions.
15158 (set_register_cache): Don't initialize the register cache here.
15159 (registers_to_string, registers_from_string, register_data): Call
15160 get_regcache.
15161 * regcache.h: Add prototypes.
15162 * server.h: Likewise.
15163
15164 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15165
15166 * mem-break.c: New file.
15167 * mem-break.h: New file.
15168 * Makefile.in: Add mem-break.o rule; update server.h
15169 dependencies.
15170 * inferiors.c (struct inferior_info): Add target_data
15171 member.
15172 (clear_inferiors): Free target_data member if set.
15173 (inferior_target_data, set_inferior_target_data): New functions.
15174 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15175 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15176 * linux-low.c (linux_bp_reinsert): New variable.
15177 (struct inferior_linux_data): New.
15178 (linux_create_inferior): Use set_inferior_target_data.
15179 (linux_attach): Likewise. Call add_inferior.
15180 (linux_wait_for_one_inferior): New function.
15181 (linux_wait): Call it.
15182 (linux_write_memory): Add const.
15183 (initialize_low): Call set_breakpoint_data.
15184 * linux-low.h (struct linux_target_ops): Add breakpoint
15185 handling members.
15186 * server.c (attach_inferior): Remove extra add_inferior
15187 call.
15188 * server.h: Include mem-break.h. Update inferior.c
15189 prototypes.
15190 * target.c (read_inferior_memory)
15191 (write_inferior_memory): New functions.
15192 * target.h (read_inferior_memory)
15193 (write_inferior_memory): Change macros to prototypes.
15194 (struct target_ops): Update comments. Add const to write_memory
15195 definition.
15196
15197 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15198
15199 * linux-low.c (usr_store_inferior_registers): Support
15200 registers which are allowed to fail to store.
15201 * linux-low.h (linux_target_ops): Likewise.
15202 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15203 (ppc_cannot_store_register): FPSCR may not be storable.
15204
15205 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15206
15207 * server.h: Include <string.h> if HAVE_STRING_H.
15208 * ChangeLog: Correct paths in last ChangeLog entry.
15209
15210 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15211
15212 * linux-low.h: Remove obsolete prototypes.
15213 (struct linux_target_ops): New.
15214 (extern the_low_target): New.
15215 * linux-low.c (num_regs, regmap): Remove declarations.
15216 (register_addr): Use the_low_target explicitly.
15217 (fetch_register): Likewise.
15218 (usr_fetch_inferior_registers): Likewise.
15219 (usr_store_inferior_registers): Likewise.
15220 * linux-arm-low.c (num_regs): Remove.
15221 (arm_num_regs): Define.
15222 (arm_regmap): Renamed from regmap, made static.
15223 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15224 made static.
15225 (arm_cannot_store_register): Renamed from cannot_store_register,
15226 made static.
15227 (the_low_target): New.
15228 * linux-i386-low.c (num_regs): Remove.
15229 (i386_num_regs): Define.
15230 (i386_regmap): Renamed from regmap, made static.
15231 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15232 made static.
15233 (i386_cannot_store_register): Renamed from cannot_store_register,
15234 made static.
15235 (the_low_target): New.
15236 * linux-ia64-low.c (num_regs): Remove.
15237 (ia64_num_regs): Define.
15238 (ia64_regmap): Renamed from regmap, made static.
15239 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15240 made static.
15241 (ia64_cannot_store_register): Renamed from cannot_store_register,
15242 made static.
15243 (the_low_target): New.
15244 * linux-m68k-low.c (num_regs): Remove.
15245 (m68k_num_regs): Define.
15246 (m68k_regmap): Renamed from regmap, made static.
15247 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15248 made static.
15249 (m68k_cannot_store_register): Renamed from cannot_store_register,
15250 made static.
15251 (the_low_target): New.
15252 * linux-mips-low.c (num_regs): Remove.
15253 (mips_num_regs): Define.
15254 (mips_regmap): Renamed from regmap, made static.
15255 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15256 made static.
15257 (mips_cannot_store_register): Renamed from cannot_store_register,
15258 made static.
15259 (the_low_target): New.
15260 * linux-ppc-low.c (num_regs): Remove.
15261 (ppc_num_regs): Define.
15262 (ppc_regmap): Renamed from regmap, made static.
15263 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15264 made static.
15265 (ppc_cannot_store_register): Renamed from cannot_store_register,
15266 made static.
15267 (the_low_target): New.
15268 * linux-s390-low.c (num_regs): Remove.
15269 (s390_num_regs): Define.
15270 (s390_regmap): Renamed from regmap, made static.
15271 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15272 made static.
15273 (s390_cannot_store_register): Renamed from cannot_store_register,
15274 made static.
15275 (the_low_target): New.
15276 * linux-sh-low.c (num_regs): Remove.
15277 (sh_num_regs): Define.
15278 (sh_regmap): Renamed from regmap, made static.
15279 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15280 made static.
15281 (sh_cannot_store_register): Renamed from cannot_store_register,
15282 made static.
15283 (the_low_target): New.
15284 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15285 (the_low_target): New.
15286
15287 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15288
15289 * Makefile.in: Add stamp-h target.
15290 * configure.in: Create stamp-h.
15291 * configure: Regenerated.
15292
15293 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15294
15295 * inferiors.c: New file.
15296 * target.c: New file.
15297 * target.h: New file.
15298 * Makefile.in: Add target.o and inferiors.o. Update
15299 dependencies.
15300 * linux-low.c (inferior_pid): New static variable,
15301 moved from server.c.
15302 (linux_create_inferior): Renamed from create_inferior.
15303 Call add_inferior. Return 0 on success instead of a PID.
15304 (linux_attach): Renamed from myattach.
15305 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15306 (linux_thread_alive): Renamed from mythread_alive.
15307 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15308 child dies.
15309 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15310 (regsets_store_inferior_registers): Correct error message.
15311 Add missing ``return 0''.
15312 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15313 (linux_store_registers): Renamed from store_inferior_registers.
15314 (linux_read_memory): Renamed from read_inferior_memory.
15315 (linux_write_memory): Renamed from write_inferior_memory.
15316 (linux_target_ops): New structure.
15317 (initialize_low): Call set_target_ops ().
15318 * remote-utils.c (unhexify): New function.
15319 (hexify): New function.
15320 (input_interrupt): Send signals to ``signal_pid''.
15321 * server.c (inferior_pid): Remove.
15322 (start_inferior): Update create_inferior call.
15323 (attach_inferior): Call add_inferior.
15324 (handle_query): New function.
15325 (main): Call handle_query for `q' packets.
15326 * server.h: Include "target.h". Remove obsolete prototypes.
15327 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15328
15329 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15330
15331 * Makefile.in: Add WARN_CFLAGS. Update configury
15332 dependencies.
15333 * configure.in: Check for <string.h>
15334 * configure: Regenerate.
15335 * config.in: Regenerate.
15336 * gdbreplay.c: Include needed system headers.
15337 (remote_open): Remove strchr prototype.
15338 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15339 * regcache.c (supply_register): Change buf argument to const void *.
15340 (supply_register_by_name): Likewise.
15341 (collect_register): Change buf argument to void *.
15342 (collect_register_by_name): Likewise.
15343 * regcache.h: Add missing prototypes.
15344 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15345 * server.c (handle_query): New function.
15346 (attached): New static variable, moved out of main.
15347 (main): Quiet longjmp clobber warnings.
15348 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15349 * utils.c (error): Remove NORETURN.
15350 (fatal): Likewise.
This page took 0.352166 seconds and 5 git commands to generate.