[GDBserver] Use pre-generated amd64-linux tdesc as test
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4 false.
5 (ipa_amd64_linux_regobj): Remove.
6 (ipa_x32_linux_regobj): Remove.
7
8 2017-09-05 Yao Qi <yao.qi@linaro.org>
9
10 * Makefile.in (arch-amd64.o): New rule.
11 * configure.srv: Append arch-amd64.o.
12 * linux-amd64-ipa.c: Include common/x86-xstate.h.
13 (get_ipa_tdesc): Call amd64_linux_read_description.
14 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
15 and init_registers_amd64_XXX.
16 * linux-x86-low.c (x86_linux_read_description): Call
17 amd64_linux_read_description.
18 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
19 (initialize_low_arch): Don't call init_registers_x32_XXX and
20 init_registers_amd64_XXX.
21 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
22 and tdesc_amd64_XXX.
23 [__x86_64__] (amd64_tdesc_test): New function.
24 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
25 and init_registers_amd64_XXX.
26 * linux-x86-tdesc.c: Include arch/amd64.h.
27 (xcr0_to_tdesc_idx): New function.
28 (i386_linux_read_description): New function.
29 (amd64_get_ipa_tdesc_idx): New function.
30 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
31 (amd64_get_ipa_tdesc): Declare.
32
33 2017-09-05 Yao Qi <yao.qi@linaro.org>
34
35 * configure.srv (srv_i386_linux_xmlfiles): Remove
36 i386/i386-XXX-linux.xml from it.
37
38 2017-09-05 Yao Qi <yao.qi@linaro.org>
39
40 * configure.srv: Set srv_i386_linux_regobj empty if $development
41 is false.
42 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
43 initialize_low_tdesc.
44 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
45 with #if initialize_low_tdesc.
46 * linux-x86-tdesc-selftest.c: New file.
47 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
48
49 2017-09-05 Yao Qi <yao.qi@linaro.org>
50
51 * Makefile.in (arch-i386.o): New rule.
52 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
53 (x86_64-*-linux*): Likewise.
54 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
55 include arch/i386.h.
56 (i386_linux_read_description): Remove code and call
57 i386_create_target_description.
58 * tdesc.c (allocate_target_description): New function.
59 * tdesc.h (set_tdesc_architecture): Remove declaration.
60 (set_tdesc_osabi): Likewise.
61
62 2017-09-05 Yao Qi <yao.qi@linaro.org>
63
64 * linux-x86-tdesc.c: Don't include <inttypes.h>.
65 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
66 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
67 .xmltarget.
68 * server.c (get_features_xml): Call tdesc_get_features_xml.
69 * tdesc.c (set_tdesc_architecture): New function.
70 (set_tdesc_osabi): New function.
71 (tdesc_get_features_xml): New function.
72 (tdesc_create_feature): Add an argument.
73 * tdesc.h (struct target_desc) <features>: New field.
74 <arch, osabi>: New field.
75 (~target_desc): xfree features, arch, and osabi.
76 (target_desc::oerator==): Don't compare .xmltarget.
77 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
78 (set_tdesc_osabi): Likewise.
79 (tdesc_get_features_xml): Likewise.
80
81 2017-09-05 Yao Qi <yao.qi@linaro.org>
82
83 * linux-x86-tdesc.c: Include selftest.h.
84 (i386_tdesc_test): New function.
85 (initialize_low_tdesc): Call selftests::register_test.
86 * tdesc.h: Include regdef.h.
87 (target_desc): Override operator == and !=.
88
89 2017-09-05 Yao Qi <yao.qi@linaro.org>
90
91 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
92 (ipa_obj): Likewise.
93 * linux-i386-ipa.c: Include common/x86-xstate.h
94 (get_ipa_tdesc): Call i386_linux_read_description.
95 (initialize_low_tracepoint): Don't call init_registers_XXX
96 functions, call initialize_low_tdesc instead.
97 * linux-x86-low.c (x86_linux_read_description): Call
98 i386_linux_read_description.
99 (initialize_low_arch): Don't call init_registers_i386_XXX
100 functions, call initialize_low_tdesc.
101 * linux-x86-tdesc.c: New file.
102 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
103 (i386_get_ipa_tdesc_idx): Declare.
104 (i386_get_ipa_tdesc): Declare.
105 (initialize_low_tdesc): Declare.
106
107 2017-09-05 Yao Qi <yao.qi@linaro.org>
108
109 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
110 instead of 0.
111
112 2017-09-05 Yao Qi <yao.qi@linaro.org>
113
114 * Makefile.in (IPA_OBJS): Add vec-ipa.o
115 * regcache.c (get_thread_regcache): Use VEC_length.
116 (init_register_cache): Likewise.
117 (regcache_cpy): Likewise.
118 (registers_to_string): Iterate reg_defs via VEC_iterate.
119 (find_regno): Likewise.
120 (find_register_by_number): Use VEC_index.
121 (register_size): Call find_register_by_number.
122 (register_data): Call find_register_by_number.
123 (supply_regblock): Use VEC_length.
124 (regcache_raw_read_unsigned): Likewise.
125 * tdesc.c (init_target_desc): Iterate reg_defs via
126 VEC_iterate.
127 (default_description): Update initializer.
128 (copy_target_description): Don't update field num_registers.
129 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
130 <num_registers>: Remove.
131
132 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
133
134 * Makefile.in (.SECONDARY): Define target.
135
136 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
137
138 * linux-low.c (linux_wait_1): Adjust.
139 * server.c (queue_stop_reply_callback): Adjust.
140
141 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
142
143 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
144 QEnvironmentUnset and QEnvironmentReset packets.
145 (handle_query): Inform remote that QEnvironmentHexEncoded,
146 QEnvironmentUnset and QEnvironmentReset are supported.
147
148 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
149
150 * inferiors.h (inferior_target_data): Rename to ...
151 (thread_target_data): ... this.
152 (inferior_regcache_data): Rename to ...
153 (thread_regcache_data): ... this.
154 (set_inferior_regcache_data): Rename to ...
155 (set_thread_regcache_data): ... this.
156 * inferiors.c (inferior_target_data): Rename to ...
157 (thread_target_data): ... this.
158 (inferior_regcache_data): Rename to ...
159 (thread_regcache_data): ... this.
160 (set_inferior_regcache_data): Rename to ...
161 (set_thread_regcache_data): ... this.
162 (free_one_thread): Update.
163 * linux-low.h (get_thread_lwp): Update.
164 * regcache.c (get_thread_regcache): Update.
165 (regcache_invalidate_thread): Update.
166 (free_register_cache_thread): Update.
167 * win32-i386-low.c (update_debug_registers_callback): Update.
168 (win32_get_current_dr): Update.
169 * win32-low.c (thread_rec): Update.
170 (delete_thread_info): Update.
171 (continue_one_thread): Update.
172 (suspend_one_thread): Update.
173
174 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
175
176 * inferiors.c (set_inferior_target_data): Remove.
177 * inferiors.h (set_inferior_target_data): Remove.
178
179 2017-08-18 Yao Qi <yao.qi@linaro.org>
180
181 * Makefile.in (OBS): Add selftest.o.
182 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
183 * configure, config.in: Re-generated.
184 * server.c: Include common/sefltest.h.
185 (captured_main): Handle option --selftest.
186
187 2017-08-09 Yao Qi <yao.qi@linaro.org>
188
189 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
190 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
191 i386-avx-mpx.o and i386-mmx.o.
192 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
193 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
194 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
195 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
196 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
197 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
198 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
199 i386/amd64-avx-mpx.xml.
200
201 2017-08-09 Yao Qi <yao.qi@linaro.org>
202
203 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
204 and x32-avx-avx512.o.
205 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
206 i386/x32-avx-avx512.xml.
207
208 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
209
210 * tracepoint.h (enum class fast_tpoint_collect_result): New
211 enumeration.
212 (fast_tracepoint_collecting): Change return type to
213 fast_tpoint_collect_result.
214 * tracepoint.c (fast_tracepoint_collecting): Likewise.
215 * linux-low.h: Include tracepoint.h.
216 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
217 fast_tpoint_collect_result.
218 * linux-low.c (handle_tracepoints): Adjust.
219 (linux_fast_tracepoint_collecting): Change return type to
220 fast_tpoint_collect_result.
221 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
222 linux_wait_1, stuck_in_jump_pad_callback,
223 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
224 proceed_one_lwp): Adjust to type change.
225
226 2017-07-10 Yao Qi <yao.qi@linaro.org>
227
228 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
229
230 2017-06-29 Yao Qi <yao.qi@linaro.org>
231
232 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
233 Remove.
234 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
235
236 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
237
238 * Makefile.in (IPA_OBJS): Sort and format one item per line.
239
240 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
241
242 * linux-low.c (linux_create_inferior): Adjust code to access the
243 environment information via 'gdb_environ' class.
244 * lynx-low.c (lynx_create_inferior): Likewise.
245 * server.c (our_environ): Make it an instance of 'gdb_environ'.
246 (get_environ): Return a pointer to 'our_environ'.
247 (captured_main): Initialize 'our_environ'.
248 * server.h (get_environ): Adjust prototype.
249 * spu-low.c (spu_create_inferior): Adjust code to access the
250 environment information via 'gdb_environ' class.
251
252 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
253
254 * linux-low.c (linux_read_memory, linux_write_memory): Remove
255 usage of "register" keyword.
256
257 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
258
259 * configure: Re-generate.
260
261 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
262
263 * configure: Re-generate.
264
265 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
266
267 * Makefile.in (COMPILE.pre): Add "-x c++".
268
269 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
270
271 * fork-child.c: Conditionally include <signal.h>.
272
273 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
274
275 * server.c (handle_general_set): Handle new packet
276 "QStartupWithShell".
277 (handle_query): Add "QStartupWithShell" to the list of supported
278 packets.
279 (gdbserver_usage): Add help text explaining the
280 new "--startup-with-shell" and "--no-startup-with-shell" CLI
281 options.
282 (captured_main): Recognize and act upon the presence of the new
283 CLI options.
284
285 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
286 Pedro Alves <palves@redhat.com>
287
288 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
289 * configure: Regenerate.
290 * configure.srv (srv_linux_obj): Add "fork-child.o" and
291 "fork-inferior.o".
292 (i[34567]86-*-lynxos*): Likewise.
293 (spu*-*-*): Likewise.
294 * fork-child.c: New file.
295 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
296 and "environ.h".
297 (linux_ptrace_fun): New function.
298 (linux_create_inferior): Adjust function prototype to reflect
299 change on "target.h". Adjust function code to use
300 "fork_inferior".
301 (linux_request_interrupt): Delete "signal_pid".
302 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
303 (lynx_ptrace_fun): New function.
304 (lynx_create_inferior): Adjust function prototype to reflect
305 change on "target.h". Adjust function code to use
306 "fork_inferior".
307 * nto-low.c (nto_create_inferior): Adjust function prototype and
308 code to reflect change on "target.h". Update comments.
309 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
310 "common-terminal.h" and "environ.h".
311 (terminal_fd): Moved to fork-child.c.
312 (old_foreground_pgrp): Likewise.
313 (restore_old_foreground_pgrp): Likewise.
314 (last_status): Make it global.
315 (last_ptid): Likewise.
316 (our_environ): New variable.
317 (startup_with_shell): Likewise.
318 (program_name): Likewise.
319 (program_argv): Rename to...
320 (program_args): ...this.
321 (wrapper_argv): New variable.
322 (start_inferior): Delete function.
323 (get_exec_wrapper): New function.
324 (get_exec_file): Likewise.
325 (get_environ): Likewise.
326 (prefork_hook): Likewise.
327 (post_fork_inferior): Likewise.
328 (postfork_hook): Likewise.
329 (postfork_child_hook): Likewise.
330 (handle_v_run): Update code to deal with arguments coming from the
331 remote host. Update calls from "start_inferior" to
332 "create_inferior".
333 (captured_main): Likewise. Initialize environment variable. Call
334 "have_job_control".
335 * server.h (post_fork_inferior): New prototype.
336 (get_environ): Likewise.
337 (last_status): Declare.
338 (last_ptid): Likewise.
339 (signal_pid): Likewise.
340 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
341 (spu_ptrace_fun): New function.
342 (spu_create_inferior): Adjust function prototype to reflect change
343 on "target.h". Adjust function code to use "fork_inferior".
344 * target.c (target_terminal_init): New function.
345 (target_terminal_inferior): Likewise.
346 (target_terminal_ours): Likewise.
347 * target.h: Include <vector>.
348 (struct target_ops) <create_inferior>: Update prototype.
349 (create_inferior): Update macro.
350 * utils.c (gdb_flush_out_err): New function.
351 * win32-low.c (win32_create_inferior): Adjust function prototype
352 and code to reflect change on "target.h".
353
354 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
355
356 * inferiors.c (switch_to_thread): New function.
357
358 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
359
360 * Makefile.in (SFILE): Add "common/job-control.c".
361 (OBS): Add "job-control.o".
362
363 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
364
365 * Makefile: Remove "@host_makefile_frag@".
366
367 2017-05-05 Pedro Alves <palves@redhat.com>
368
369 * configure: Regenerate.
370
371 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
372
373 * configure: Regenerate.
374
375 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
376
377 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
378 software_single_step change of return type to
379 std::vector<CORE_ADDR>.
380 * linux-low.c (install_software_single_step_breakpoints):
381 Likewise.
382 * linux-low.h (install_software_single_step_breakpoints):
383 Likewise.
384
385 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
386
387 * remote-utils.c: Include "gdb_termios.h" instead of
388 "terminal.h".
389 * terminal.h: Delete file.
390
391 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 * server.c: Include <vector>.
394 <program_argv, wrapper_argv>: Convert to std::vector.
395 (start_inferior): Rewrite function to use C++.
396 (handle_v_run): Likewise. Update code that calculates the argv
397 based on the vRun packet; use C++.
398 (captured_main): Likewise.
399
400 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
401
402 * server.c (handle_v_cont): Initialize thread_resume::thread
403 with null_ptid.
404
405 2017-04-05 Pedro Alves <palves@redhat.com>
406
407 * configure: Regenerate.
408
409 2017-04-05 Pedro Alves <palves@redhat.com>
410
411 * gdbreplay.c (sync_error): Constify.
412 * linux-x86-low.c (push_opcode): Constify.
413
414 2017-04-05 Pedro Alves <palves@redhat.com>
415
416 * win32-low.c (get_child_debug_event)
417 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
418 Report TARGET_WAITKIND_SPURIOUS instead.
419
420 2017-04-05 Pedro Alves <palves@redhat.com>
421
422 * remote-utils.c (remote_prepare, remote_open): Constify.
423 * remote-utils.h (remote_prepare, remote_open): Constify.
424 * server.c (captured_main): Constify 'port' handling.
425
426 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
427
428 * Makefile.in (clean): Clear .deps.
429
430 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
431
432 * .gitignore: Remove generated files, replace with wildcard.
433 * (clean): Replace removal of generated files with wildcard.
434 (version.c): Replace with...
435 (version-generated.c): ...this.
436 (xml-builtin.c): Replace with...
437 (xml-builtin-generated.c): ...this.
438 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
439 (%.c: *regformats*): Replace with...
440 (%-generated.c: *regformats*): ...this.
441
442 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
443
444 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
445 (xtensa_fill_gregset): Call collect_register_by_name for
446 threadptr register.
447 (xtensa_store_gregset): Call supply_register_by_name for
448 threadptr register.
449
450 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
451
452 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
453 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
454 (xtensa_store_gregset): Call supply_register for all registers in
455 a0_regnum..a0_regnum + C0_NREGS range.
456
457 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
458
459 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
460 (ax-ipa.o: ax.c): Remove.
461 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
462 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
463 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
464 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
465 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
466
467 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
468
469 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
470 (print-utils-ipa.o: ../common/print-utils.c): Remove.
471 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
472 (errors-ipa.o: ../common/errors.c): Remove.
473 (format-ipa.o: ../common/format.c): Remove.
474 (common-utils-ipa.o: ../common/common-utils.c): Remove.
475
476 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
477
478 * Makefile.in (%-ipa.o: %.c): New rule.
479 (tracepoint-ipa.o: tracepoint.c): Remove.
480 (utils-ipa.o: utils.c): Remove.
481 (remote-utils-ipa.o: remote-utils.c): Remove.
482 (regcache-ipa.o: regcache.c): Remove.
483 (i386-linux-ipa.o: i386-linux.c): Remove.
484 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
485 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
486 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
487 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
488 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
489 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
490 (amd64-linux-ipa.o: amd64-linux.c): Remove.
491 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
492 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
493 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
494 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
495 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
496 (aarch64-ipa.o: aarch64.c): Remove.
497 (s390-linux32-ipa.o: s390-linux32.c): Remove.
498 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
499 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
500 (s390-linux64-ipa.o: s390-linux64.c): Remove.
501 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
502 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
503 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
504 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
505 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
506 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
507 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
508 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
509 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
510 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
511 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
512 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
513 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
514 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
515 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
516 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
517 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
518 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
519 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
520 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
521 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
522 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
523 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
524 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
525 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
526 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
527 (tdesc-ipa.o: tdesc.c): Remove.
528 (x32-linux-ipa.o: x32-linux.c): Remove.
529 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
530 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
531
532 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
533
534 * Makefile.in (%.o: ../arch/%.c): New rule.
535 (arm.o: ../arch/arm.c): Remove.
536 (arm-linux.o: ../arch/arm-linux.c): Remove.
537 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
538 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
539
540 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
541
542 * Makefile.in (%.o: ../nat/%.c): New rule.
543 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
544 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
545 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
546 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
547 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
548 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
549 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
550 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
551 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
552 (linux-personality.o: ../nat/linux-personality.c): Remove.
553 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
554 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
555 (x86-linux.o: ../nat/x86-linux.c): Remove.
556 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
557 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
558
559 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
560
561 * Makefile.in (%.o: ../common/%.c): New rule.
562 (signals.o: ../common/signals.c): Remove.
563 (print-utils.o: ../common/print-utils.c): Remove.
564 (rsp-low.o: ../common/rsp-low.c): Remove.
565 (common-utils.o: ../common/common-utils.c): Remove.
566 (posix-strerror.o: ../common/posix-strerror.c): Remove.
567 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
568 (vec.o: ../common/vec.c): Remove.
569 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
570 (xml-utils.o: ../common/xml-utils.c): Remove.
571 (ptid.o: ../common/ptid.c): Remove.
572 (buffer.o: ../common/buffer.c): Remove.
573 (format.o: ../common/format.c): Remove.
574 (filestuff.o: ../common/filestuff.c): Remove.
575 (agent.o: ../common/agent.c): Remove.
576 (errors.o: ../common/errors.c): Remove.
577 (environ.o: ../common/environ.c): Remove.
578 (common-debug.o: ../common/common-debug.c): Remove.
579 (cleanups.o: ../common/cleanups.c): Remove.
580 (common-exceptions.o: ../common/common-exceptions.c): Remove.
581 (fileio.o: ../common/fileio.c): Remove.
582 (common-regcache.o: ../common/common-regcache.c): Remove.
583 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
584 (new-op.o: ../common/new-op.c): Remove.
585 (btrace-common.o: ../common/btrace-common.c): Remove.
586
587 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * Makefile.in (%.o: ../target/%.c): New rule.
590 (waitstatus.o: ../target/waitstatus.c): Remove.
591
592 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
593
594 * Makefile.in
595 (%.c: ../regformats/%.dat,
596 (%.c: ../regformats/arm/%.dat,
597 (%.c: ../regformats/i386/%.dat,
598 (%.c: ../regformats/rs6000/%.dat): New rules.
599 (aarch64.c): Remove.
600 (reg-arm.c): Remove.
601 (arm-with-iwmmxt.c): Remove.
602 (arm-with-vfpv2.c): Remove.
603 (arm-with-vfpv3.c): Remove.
604 (arm-with-neon.c): Remove.
605 (reg-bfin.c): Remove.
606 (reg-cris.c): Remove.
607 (reg-crisv32.c): Remove.
608 (i386.c): Remove.
609 (i386-linux.c): Remove.
610 (i386-avx.c): Remove.
611 (i386-avx-linux.c): Remove.
612 (i386-avx-avx512.c): Remove.
613 (i386-avx-avx512-linux.c): Remove.
614 (i386-mpx.c): Remove.
615 (i386-mpx-linux.c): Remove.
616 (i386-avx-mpx-avx512-pku.c): Remove.
617 (i386-avx-mpx-avx512-pku-linux.c): Remove.
618 (i386-avx-mpx.c): Remove.
619 (i386-avx-mpx-linux.c): Remove.
620 (i386-mmx.c): Remove.
621 (i386-mmx-linux.c): Remove.
622 (reg-ia64.c): Remove.
623 (reg-m32r.c): Remove.
624 (reg-m68k.c): Remove.
625 (reg-cf.c): Remove.
626 (mips-linux.c): Remove.
627 (mips-dsp-linux.c): Remove.
628 (mips64-linux.c): Remove.
629 (mips64-dsp-linux.c): Remove.
630 (nios2-linux.c): Remove.
631 (powerpc-32.c): Remove.
632 (powerpc-32l.c): Remove.
633 (powerpc-altivec32l.c): Remove.
634 (powerpc-cell32l.c): Remove.
635 (powerpc-vsx32l.c): Remove.
636 (powerpc-isa205-32l.c): Remove.
637 (powerpc-isa205-altivec32l.c): Remove.
638 (powerpc-isa205-vsx32l.c): Remove.
639 (powerpc-e500l.c): Remove.
640 (powerpc-64l.c): Remove.
641 (powerpc-altivec64l.c): Remove.
642 (powerpc-cell64l.c): Remove.
643 (powerpc-vsx64l.c): Remove.
644 (powerpc-isa205-64l.c): Remove.
645 (powerpc-isa205-altivec64l.c): Remove.
646 (powerpc-isa205-vsx64l.c): Remove.
647 (s390-linux32.c): Remove.
648 (s390-linux32v1.c): Remove.
649 (s390-linux32v2.c): Remove.
650 (s390-linux64.c): Remove.
651 (s390-linux64v1.c): Remove.
652 (s390-linux64v2.c): Remove.
653 (s390-te-linux64.c): Remove.
654 (s390-vx-linux64.c): Remove.
655 (s390-tevx-linux64.c): Remove.
656 (s390x-linux64.c): Remove.
657 (s390x-linux64v1.c): Remove.
658 (s390x-linux64v2.c): Remove.
659 (s390x-te-linux64.c): Remove.
660 (s390x-vx-linux64.c): Remove.
661 (s390x-tevx-linux64.c): Remove.
662 (tic6x-c64xp-linux.c): Remove.
663 (tic6x-c64x-linux.c): Remove.
664 (tic6x-c62x-linux.c): Remove.
665 (reg-sh.c): Remove.
666 (reg-sparc64.c): Remove.
667 (reg-spu.c): Remove.
668 (amd64.c): Remove.
669 (amd64-linux.c): Remove.
670 (amd64-avx.c): Remove.
671 (amd64-avx-linux.c): Remove.
672 (amd64-avx-avx512.c): Remove.
673 (amd64-avx-avx512-linux.c): Remove.
674 (amd64-mpx.c): Remove.
675 (amd64-mpx-linux.c): Remove.
676 (amd64-avx-mpx-avx512-pku.c): Remove.
677 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
678 (amd64-avx-mpx.c): Remove.
679 (amd64-avx-mpx-linux.c): Remove.
680 (x32.c): Remove.
681 (x32-linux.c): Remove.
682 (x32-avx.c): Remove.
683 (x32-avx-linux.c): Remove.
684 (x32-avx-avx512.c): Remove.
685 (x32-avx-avx512-linux.c): Remove.
686 (reg-xtensa.c): Remove.
687 (reg-tilegx.c): Remove.
688 (reg-tilegx32.c): Remove.
689
690 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
691
692 * Makefile.in (SFILES): Add "common/environ.c".
693 (OBJS): Add "common/environ.h".
694
695 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
696
697 * configure.ac: Check if the fs_base and gs_base members of
698 `struct user_regs_struct' exist.
699 * config.in: Regenerated.
700 * configure: Likewise.
701
702 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
703
704 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
705 target_read_memory.
706 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
707 (get_next_pcs_syscall_next_pc): Likewise.
708
709 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
710
711 * win32-i386-low.c: Fix incorrect reference to a couple source files.
712 * nto-x86-low.c: Likewise.
713
714 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
715
716 * Makefile.in: Include disable-implicit-rules.mk.
717
718 2016-11-23 Pedro Alves <palves@redhat.com>
719
720 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
721 (debug_vprintf): Use std::chrono::steady_clock instead of
722 gettimeofday. Use '.' instead of ':'.
723 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
724 (get_timestamp): Use std::chrono::steady_clock instead of
725 gettimeofday.
726
727 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
728
729 * Makefile.in: Fix whitespace formatting.
730
731 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
732
733 * Makefile.in (SFILES, OBS): Flatten list and order
734 alphabetically.
735
736 2016-11-23 Pedro Alves <palves@redhat.com>
737
738 * event-loop.c (handle_file_event): Use warning.
739 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
740 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
741 Use warning.
742
743 2016-11-23 Pedro Alves <palves@redhat.com>
744
745 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
746 output.
747 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
748 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
749 debug_printf and debug_flush for debug output.
750 * server.c (handle_general_set): Likewise.
751 * thread-db.c (try_thread_db_load): Use debug_printf for debug
752 output.
753
754 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
755
756 * Makefile.in (.c.o): Replace rule with ...
757 (%.o: %.c): ... this one.
758
759 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
762 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
763 make.
764 * configure.ac: Remove checks for the make program.
765 * configure: Re-generate.
766
767 2016-10-28 Pedro Alves <palves@redhat.com>
768
769 * Makefile.in (CXX_DIALECT): Get from configure.
770 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
771 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
772 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
773 * config.in: Regenerate.
774 * configure: Regenerate.
775
776 2016-10-27 Yao Qi <yao.qi@linaro.org>
777
778 * linux-low.c (linux_supports_range_stepping): Return true if
779 can_software_single_step return true.
780
781 2016-10-27 Yao Qi <yao.qi@linaro.org>
782
783 * inferiors.c (find_inferior_in_random): New function.
784 * inferiors.h (find_inferior_in_random): Declare.
785 * linux-low.c (linux_wait_for_event_filtered): Call
786 find_inferior_in_random instead of find_inferior.
787
788 2016-10-27 Yao Qi <yao.qi@linaro.org>
789
790 * linux-low.c (linux_wait_1): If single-step breakpoints are
791 inserted, remove them.
792
793 2016-10-26 Pedro Alves <palves@redhat.com>
794
795 * linux-low.c (handle_extended_wait): Link parent/child fork
796 threads.
797 (linux_wait_1): Unlink them.
798 (linux_set_resume_request): Ignore resume requests for
799 already-resumed and unhandled fork child threads.
800 * linux-low.h (struct lwp_info) <fork_relative>: New field.
801 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
802 New functions.
803 (handle_v_requests) <vCont>: Don't call require_running.
804 * server.h (in_queued_stop_replies): New declaration.
805
806 2016-10-24 Yao Qi <yao.qi@linaro.org>
807
808 PR server/20733
809 * linux-aarch64-low.c (append_insns): Cast the return value to
810 'uint32_t *'.
811
812 2016-10-10 Yao Qi <yao.qi@linaro.org>
813
814 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
815
816 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
817
818 * target.c (target_supports_multi_process): New function, moved
819 from...
820 * target.h (target_supports_multi_process): ... here. Remove
821 macro.
822
823 2016-10-05 Tom Tromey <tom@tromey.com>
824
825 PR remote/20655:
826 * tracepoint.c (handle_tracepoint_bkpts): Check
827 ipa_error_tracepoint, not ipa_stopping_tracepoint.
828
829 2016-10-05 Yao Qi <yao.qi@linaro.org>
830
831 * configure.srv: Update the path of arm-*.xml files.
832
833 2016-10-05 Terry Guo <terry.guo@arm.com>
834 Yao Qi <yao.qi@linaro.org>
835
836 * Makefile.in: Adjust the path of rules.
837 * configure.srv: Update the path of xml files.
838 * regformats/arm-with-iwmmxt.dat: Regenerated.
839 * regformats/arm-with-neon.dat: Likewise.
840 * regformats/arm-with-vfpv2.dat: Likewise.
841 * regformats/arm-with-vfpv3.dat Likewise.
842
843 2016-09-30 Yao Qi <yao.qi@linaro.org>
844
845 PR gdbserver/20627
846 * target.c (target_stop_and_wait): Don't call
847 target_continue_no_signal, use resume_stop instead.
848
849 2016-09-26 Yao Qi <yao.qi@linaro.org>
850
851 * linux-low.c (linux_wait_1): Call debug_exit.
852
853 2016-09-23 Pedro Alves <palves@redhat.com>
854
855 * Makefile.in (SFILES): Add common/new-op.c.
856 (OBS): Add common/new-op.o.
857 (new-op.o): New rule.
858
859 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
860
861 * .gitinore: Ignore more files.
862
863 2016-09-21 Yao Qi <yao.qi@linaro.org>
864
865 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
866 23.
867
868 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
869
870 * server.c (start_inferior): Call target_mourn_inferior instead of
871 mourn_inferior; pass ptid_t argument to it.
872 (resume): Likewise.
873 (handle_target_event): Likewise.
874 * target.c (target_mourn_inferior): New function.
875 * target.h (mourn_inferior): Delete macro.
876
877 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
878
879 * linux-low.c (lwp_is_stepping): New function.
880
881 2016-09-06 Carl Love <cel@us.ibm.com>
882
883 * server.c (start_inferior): Fixed comment, requested comment change
884 didn't get updated correctly. Removed reference to ptrace () call as
885 it is only true on Linux systems.
886
887 2016-09-06 Carl Love <cel@us.ibm.com>
888
889 * server.c (start_inferior): Do not call
890 function target_post_create_inferior () if the
891 inferior process has already exited.
892
893 2016-09-05 Pedro Alves <palves@redhat.com>
894
895 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
896 (COMPILE.pre, CC_LD): Use CXX directly.
897 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
898 * acinclude.m4: Don't include build-with-cxx.m4.
899 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
900 * configure: Regenerate.
901
902 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
903
904 PR gdb/19495
905 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
906 call writing data to own_buf.
907
908 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
909
910 * target.c (mywait): Call target_wait instead of
911 the_target->wait.
912 (target_wait): New function.
913
914 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
915
916 * server.c (start_inferior): New variable 'ptid'. Replace calls
917 to the_target->resume by target_continue{,_no_signal}, depending
918 on the case.
919 * target.c (target_stop_and_wait): Call target_continue_no_signal
920 instead of the_target->resume.
921 (target_continue): New function.
922
923 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
924
925 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
926
927 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
928
929 PR server/20491
930 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
931 ps_prochandle.
932 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
933 * linux-arm-low.c (ps_get_thread_area): Likewise.
934 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
935 * linux-m68k-low.c (ps_get_thread_area): Likewise.
936 * linux-mips-low.c (ps_get_thread_area): Likewise.
937 * linux-nios2-low.c (ps_get_thread_area): Likewise.
938 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
939 * linux-x86-low.c (ps_get_thread_area): Likewise.
940 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
941
942 2016-08-19 Pedro Alves <palves@redhat.com>
943
944 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
945
946 2016-08-19 Pedro Alves <palves@redhat.com>
947
948 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
949 comment. Use memcpy instead of casting through unsigned long.
950
951 2016-08-19 Pedro Alves <palves@redhat.com>
952
953 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
954 allocating around 0x80000000.
955
956 2016-08-19 Pedro Alves <palves@redhat.com>
957
958 PR gdb/20415
959 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
960 (x32-avx512-linux-ipa.o): New rules.
961 * configure.ac (x86_64-*-linux*): New x32 check.
962 * configure.srv (ipa_x32_linux_regobj): New.
963 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
964 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
965 descriptions.
966 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
967 descriptions.
968 * configure: Regenerate.
969
970 2016-08-09 Pedro Alves <palves@redhat.com>
971
972 PR gdb/18653
973 * Makefile.in (OBS): Add signals-state-save-restore.o.
974 (signals-state-save-restore.o): New rule.
975 * config.in: Regenerate.
976 * configure: Regenerate.
977 * linux-low.c: Include "signals-state-save-restore.h".
978 (linux_create_inferior): Call
979 restore_original_signals_state.
980 * server.c: Include "dispositions-save-restore.h".
981 (captured_main): Call save_original_signals_state.
982
983 2016-08-05 Pedro Alves <palves@redhat.com>
984
985 * configure: Regenerate.
986
987 2016-08-04 Yao Qi <yao.qi@linaro.org>
988
989 * linux-low.c (regsets_fetch_inferior_registers): Check
990 errno is ESRCH or not.
991
992 2016-08-02 Yao Qi <yao.qi@linaro.org>
993
994 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
995 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
996 (thread_db_load_search): Update.
997 (try_thread_db_load_1): Don't look for td_ta_event_addr,
998 td_ta_set_event and td_ta_event_getmsg.
999
1000 2016-07-26 Pedro Alves <palves@redhat.com>
1001
1002 PR server/20414
1003 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1004 of unsigned long for 64-bit registers and use uint32_t instead of
1005 unsigned int for 32-bit registers.
1006
1007 2016-07-26 Pedro Alves <palves@redhat.com>
1008
1009 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1010 to 'ptrace'.
1011
1012 2016-07-21 Tom Tromey <tom@tromey.com>
1013
1014 * configure: Rebuild.
1015
1016 2016-07-21 Yao Qi <yao.qi@linaro.org>
1017
1018 * mem-break.c (find_gdb_breakpoint): Cast bp to
1019 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1020
1021 2016-07-21 Yao Qi <yao.qi@linaro.org>
1022
1023 * server.c (handle_v_requests): Support s and S actions
1024 if target_supports_software_single_step return true.
1025
1026 2016-07-21 Yao Qi <yao.qi@linaro.org>
1027
1028 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1029 is resume_step, call maybe_hw_step.
1030 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1031 and unstop them.
1032 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1033 breakpoints or not.
1034 (proceed_one_lwp): If resume request is resume_step, install
1035 reinsert breakpoints and call maybe_hw_step.
1036
1037 2016-07-21 Yao Qi <yao.qi@linaro.org>
1038
1039 * linux-low.c (proceed_one_lwp): Declare.
1040 (linux_resume_one_thread): Remove local variable 'step'.
1041 Lift code enqueue signal. Call proceed_one_lwp instead of
1042 linux_resume_one_lwp.
1043
1044 2016-07-21 Yao Qi <yao.qi@linaro.org>
1045
1046 * linux-low.c (linux_resume_one_thread): Call
1047 enqueue_pending_signal.
1048
1049 2016-07-21 Yao Qi <yao.qi@linaro.org>
1050
1051 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1052 * inferiors.c (do_restore_current_thread_cleanup): New function.
1053 (make_cleanup_restore_current_thread): Likewise.
1054 * linux-low.c (install_software_single_step_breakpoints): Call
1055 make_cleanup_restore_current_thread. Switch current_thread to
1056 thread.
1057
1058 2016-07-21 Yao Qi <yao.qi@linaro.org>
1059
1060 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1061 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1062 (clone_one_breakpoint): Likewise.
1063 (delete_reinsert_breakpoints): Change parameter to thread.
1064 Callers updated.
1065 (has_reinsert_breakpoints): Likewise.
1066 (uninsert_reinsert_breakpoints): Likewise.
1067 (reinsert_reinsert_breakpoints): Likewise.
1068 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1069 (delete_reinsert_breakpoints): Likewise.
1070 (reinsert_reinsert_breakpoints): Likewise.
1071 (uninsert_reinsert_breakpoints): Likewise.
1072 (has_reinsert_breakpoints): Likewise.
1073
1074 2016-07-21 Yao Qi <yao.qi@linaro.org>
1075
1076 * inferiors.c (get_thread_process): Make parameter const.
1077 * inferiors.h (get_thread_process): Update declaration.
1078 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1079 Add new parameters child_thread and parent_thread. Callers
1080 updated.
1081 * mem-break.h (clone_all_breakpoints): Update declaration.
1082
1083 2016-07-21 Yao Qi <yao.qi@linaro.org>
1084
1085 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1086 <command_list, handler>: Remove.
1087 (struct gdb_breakpoint): New.
1088 (struct other_breakpoint): New.
1089 (struct reinsert_breakpoint): New.
1090 (is_gdb_breakpoint): New function.
1091 (any_persistent_commands): Update command_list if
1092 is_gdb_breakpoint returns true.
1093 (set_breakpoint): Create breakpoints according to their types.
1094 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1095 (set_gdb_breakpoint_1): Likewise.
1096 (set_gdb_breakpoint): Likewise.
1097 (clear_breakpoint_conditions): Change parameter type to
1098 'struct gdb_breakpoint *'.
1099 (clear_breakpoint_commands): Likewise.
1100 (clear_breakpoint_conditions_and_commands): Likewise.
1101 (add_condition_to_breakpoint): Likewise.
1102 (add_breakpoint_condition): Likewise.
1103 (add_commands_to_breakpoint): Likewise.
1104 (check_breakpoints): Check other_breakpoint.
1105 (clone_one_breakpoint): Clone breakpopint according to its type.
1106 * mem-break.h (struct gdb_breakpoint): Declare.
1107 (set_gdb_breakpoint): Update declaration.
1108 (clear_breakpoint_conditions_and_commands): Likewise.
1109 (add_breakpoint_condition): Likewise.
1110 (add_breakpoint_commands): Likewise.
1111 * server.c (process_point_options): Change parameter type to
1112 'struct gdb_breakpoint *'.
1113
1114 2016-07-21 Yao Qi <yao.qi@linaro.org>
1115
1116 * mem-break.c (set_breakpoint_at): Rename it to ...
1117 (set_breakpoint_type_at): ... it.
1118 (set_breakpoint_at): Call set_breakpoint_type_at.
1119 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1120 * mem-break.h (set_breakpoint_at): Update comments.
1121
1122 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1123
1124 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1125 to buf parameter.
1126 (nios2_store_gregset): Likewise.
1127
1128 2016-07-01 Pedro Alves <palves@redhat.com>
1129 Antoine Tremblay <antoine.tremblay@ericsson.com>
1130
1131 * linux-low.c: Change interface to take the target lwp_info
1132 pointer directly and return void. Handle detaching from a zombie
1133 thread.
1134 (linux_detach_lwp_callback): New function.
1135 (linux_detach): Detach from the leader thread after detaching from
1136 the clone threads.
1137
1138 2016-06-28 Yao Qi <yao.qi@linaro.org>
1139
1140 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1141 for variable new_offset.
1142 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1143 (aarch64_ftrace_insn_reloc_cb): Likewise.
1144 (aarch64_ftrace_insn_reloc_tb): Likewise.
1145 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1146 PRIx64 instead of PRIx32.
1147
1148 2016-06-28 Yao Qi <yao.qi@linaro.org>
1149
1150 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1151 (the_low_target): Install arm_get_syscall_trapinfo.
1152
1153 2016-06-28 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1156 function.
1157 (the_low_target): Install aarch64_get_syscall_trapinfo.
1158
1159 2016-06-28 Yao Qi <yao.qi@linaro.org>
1160
1161 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1162 Callers updated.
1163 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1164 Remove parameter sysno.
1165 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1166 sysret.
1167
1168 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1169
1170 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1171 (s390_emit_ne_goto): Likewise.
1172 (s390_emit_lt_goto): Likewise.
1173 (s390_emit_le_goto): Likewise.
1174 (s390_emit_gt_goto): Likewise.
1175 (s390_emit_ge_goto): Likewise.
1176 (s390x_emit_eq_goto): Likewise.
1177 (s390x_emit_ne_goto): Likewise.
1178 (s390x_emit_lt_goto): Likewise.
1179 (s390x_emit_le_goto): Likewise.
1180 (s390x_emit_gt_goto): Likewise.
1181 (s390x_emit_ge_goto): Likewise.
1182 (s390_emit_ops_impl): Mark variable static.
1183 (s390x_emit_ops): Likewise.
1184
1185 2016-06-17 Yao Qi <yao.qi@linaro.org>
1186
1187 * linux-low.c (handle_extended_wait): Call
1188 uninsert_reinsert_breakpoints for the parent process. Remove
1189 reinsert breakpoints from the child process. Reinsert them to
1190 the parent process when vfork is done.
1191 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1192 (reinsert_reinsert_breakpoints): New function.
1193 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1194 (reinsert_reinsert_breakpoints): Declare.
1195
1196 2016-06-17 Yao Qi <yao.qi@linaro.org>
1197
1198 * linux-low.c (handle_extended_wait): If the parent is doing
1199 step-over, remove the reinsert breakpoints from the forked child.
1200
1201 2016-06-17 Yao Qi <yao.qi@linaro.org>
1202
1203 * linux-low.c (unsuspend_all_lwps): Declare.
1204 (linux_low_filter_event): If thread exited, call finish_step_over.
1205 If step-over is finished, unsuspend other threads.
1206
1207 2016-06-17 Yao Qi <yao.qi@linaro.org>
1208
1209 * linux-low.c (linux_resume_one_lwp_throw): Assert
1210 has_reinsert_breakpoints returns false.
1211 * mem-break.c (delete_disabled_breakpoints): Assert
1212 bp type isn't reinsert_breakpoint.
1213
1214 2016-06-17 Yao Qi <yao.qi@linaro.org>
1215
1216 * linux-low.c (maybe_hw_step): New function.
1217 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1218 (finish_step_over): Switch current_thread to lwp temporarily,
1219 and assert has_reinsert_breakpoints returns true.
1220 (proceed_one_lwp): Call maybe_hw_step.
1221 * mem-break.c (has_reinsert_breakpoints): New function.
1222 * mem-break.h (has_reinsert_breakpoints): Declare.
1223
1224 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1225
1226 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1227
1228 2016-05-17 Yao Qi <yao.qi@linaro.org>
1229
1230 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1231 instead of find_inferior.
1232
1233 2016-05-05 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1236 Initialize res to zero.
1237
1238 2016-05-05 Yao Qi <yao.qi@linaro.org>
1239
1240 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1241 to uint32_t.
1242
1243 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1244
1245 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1246 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1247 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1248
1249 2016-04-28 Par Olsson <par.olsson@windriver.com>
1250 Simon Marchi <simon.marchi@ericsson.com>
1251
1252 * tracepoint.c (write_inferior_int8): New function.
1253 (cmd_qtenable_disable): Write enable flag using
1254 write_inferior_int8.
1255
1256 2016-04-25 Yao Qi <yao.qi@linaro.org>
1257
1258 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1259 (need_step_over_p): Return zero if the LWP has pending signals
1260 can be delivered on software single step target.
1261
1262 2016-04-25 Yao Qi <yao.qi@linaro.org>
1263
1264 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1265 return instead of error.
1266
1267 2016-04-22 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1270 to 23.
1271
1272 2016-04-22 Yao Qi <yao.qi@linaro.org>
1273
1274 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1275 signal when stepping over breakpoint with software single
1276 step.
1277
1278 2016-04-21 Pedro Alves <palves@redhat.com>
1279
1280 * linux-s390-low.c (s390_collect_ptrace_register)
1281 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1282 add casts.
1283 (s390_check_regset): Use void * instead of gdb_byte *.
1284
1285 2016-04-20 Pedro Alves <palves@redhat.com>
1286
1287 * configure: Renegerate.
1288
1289 2016-04-20 Yao Qi <yao.qi@linaro.org>
1290
1291 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1292 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1293 number 16.
1294 (arm_store_gregset): Likewise.
1295
1296 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1297
1298 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1299 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1300 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1301 (amd64-avx-mpx-linux.c): New rules.
1302 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1303 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1304 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1305 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1306 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1307 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1308 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1309 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1310 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1311 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1312 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1313 * linux-x86-low.c (x86_linux_read_description): Add case for
1314 X86_XSTATE_AVX_MPX_MASK.
1315 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1316 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1317 init_registers_i386_avx_mpx_linux.
1318 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1319 (initialize_low_tracepoint): Call
1320 init_registers_i386_avx_mpx_linux.
1321 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1322 (initialize_low_tracepoint): Call
1323 init_registers_amd64_avx_mpx_linux.
1324 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1325 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1326 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1327 declarations.
1328
1329 2016-04-18 Pedro Alves <palves@redhat.com>
1330
1331 * configure: Regenerate.
1332
1333 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1334
1335 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1336 (aarch64_emit_sub): Likewise.
1337
1338 2016-04-12 Pedro Alves <palves@redhat.com>
1339
1340 * utils.c (prepare_to_throw_exception): Delete.
1341
1342 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1345
1346 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1347
1348 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1349
1350 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1351
1352 * linux-aarch64-ipa.c: Add <elf.h> include.
1353 * linux-ppc-ipa.c: Add <elf.h> include.
1354 * linux-s390-ipa.c: Add <elf.h> include.
1355
1356 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1357
1358 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1359 (get_raw_reg_ptr): Likewise.
1360 (get_trace_state_variable_value_ptr): Likewise.
1361 (set_trace_state_variable_value_ptr): Likewise.
1362 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1363 char *.
1364
1365 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1366 Marcin Kościelnicki <koriakin@0x04.net>
1367
1368 PR/17221
1369 * linux-ppc-low.c (emit_insns): New function.
1370 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1371 (ppc_emit_prologue): New function.
1372 (ppc_emit_epilogue): New function.
1373 (ppc_emit_add): New function.
1374 (ppc_emit_sub): New function.
1375 (ppc_emit_mul): New function.
1376 (ppc_emit_lsh): New function.
1377 (ppc_emit_rsh_signed): New function.
1378 (ppc_emit_rsh_unsigned): New function.
1379 (ppc_emit_ext): New function.
1380 (ppc_emit_zero_ext): New function.
1381 (ppc_emit_log_not): New function.
1382 (ppc_emit_bit_and): New function.
1383 (ppc_emit_bit_or): New function.
1384 (ppc_emit_bit_xor): New function.
1385 (ppc_emit_bit_not): New function.
1386 (ppc_emit_equal): New function.
1387 (ppc_emit_less_signed): New function.
1388 (ppc_emit_less_unsigned): New function.
1389 (ppc_emit_ref): New function.
1390 (ppc_emit_const): New function.
1391 (ppc_emit_reg): New function.
1392 (ppc_emit_pop): New function.
1393 (ppc_emit_stack_flush): New function.
1394 (ppc_emit_swap): New function.
1395 (ppc_emit_stack_adjust): New function.
1396 (ppc_emit_call): New function.
1397 (ppc_emit_int_call_1): New function.
1398 (ppc_emit_void_call_2): New function.
1399 (ppc_emit_if_goto): New function.
1400 (ppc_emit_goto): New function.
1401 (ppc_emit_eq_goto): New function.
1402 (ppc_emit_ne_goto): New function.
1403 (ppc_emit_lt_goto): New function.
1404 (ppc_emit_le_goto): New function.
1405 (ppc_emit_gt_goto): New function.
1406 (ppc_emit_ge_goto): New function.
1407 (ppc_write_goto_address): New function.
1408 (ppc_emit_ops_impl): New static variable.
1409 (ppc64v1_emit_prologue): New function.
1410 (ppc64v2_emit_prologue): New function.
1411 (ppc64_emit_epilogue): New function.
1412 (ppc64_emit_add): New function.
1413 (ppc64_emit_sub): New function.
1414 (ppc64_emit_mul): New function.
1415 (ppc64_emit_lsh): New function.
1416 (ppc64_emit_rsh_signed): New function.
1417 (ppc64_emit_rsh_unsigned): New function.
1418 (ppc64_emit_ext): New function.
1419 (ppc64_emit_zero_ext): New function.
1420 (ppc64_emit_log_not): New function.
1421 (ppc64_emit_bit_and): New function.
1422 (ppc64_emit_bit_or): New function.
1423 (ppc64_emit_bit_xor): New function.
1424 (ppc64_emit_bit_not): New function.
1425 (ppc64_emit_equal): New function.
1426 (ppc64_emit_less_signed): New function.
1427 (ppc64_emit_less_unsigned): New function.
1428 (ppc64_emit_ref): New function.
1429 (ppc64_emit_const): New function.
1430 (ppc64v1_emit_reg): New function.
1431 (ppc64v2_emit_reg): New function.
1432 (ppc64_emit_pop): New function.
1433 (ppc64_emit_stack_flush): New function.
1434 (ppc64_emit_swap): New function.
1435 (ppc64v1_emit_call): New function.
1436 (ppc64v2_emit_call): New function.
1437 (ppc64v1_emit_int_call_1): New function.
1438 (ppc64v2_emit_int_call_1): New function.
1439 (ppc64v1_emit_void_call_2): New function.
1440 (ppc64v2_emit_void_call_2): New function.
1441 (ppc64_emit_if_goto): New function.
1442 (ppc64_emit_eq_goto): New function.
1443 (ppc64_emit_ne_goto): New function.
1444 (ppc64_emit_lt_goto): New function.
1445 (ppc64_emit_le_goto): New function.
1446 (ppc64_emit_gt_goto): New function.
1447 (ppc64_emit_ge_goto): New function.
1448 (ppc64v1_emit_ops_impl): New static variable.
1449 (ppc64v2_emit_ops_impl): New static variable.
1450 (ppc_emit_ops): New function.
1451 (linux_low_target): Wire in ppc_emit_ops.
1452
1453 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1454 Marcin Kościelnicki <koriakin@0x04.net>
1455
1456 PR/17221
1457 * Makefile.in: Add powerpc-*-ipa.o
1458 * configure.srv: Add ipa_obj for powerpc*-linux.
1459 * linux-ppc-ipa.c: New file.
1460 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1461 includes.
1462 (PPC_FIELD): New macro.
1463 (PPC_SEXT): New macro.
1464 (PPC_OP6): New macro.
1465 (PPC_BO): New macro.
1466 (PPC_LI): New macro.
1467 (PPC_BD): New macro.
1468 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1469 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1470 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1471 (ppc_get_thread_area): New function.
1472 (is_elfv2_inferior): New function.
1473 (gen_ds_form): New function.
1474 (GEN_STD): New macro.
1475 (GEN_STDU): New macro.
1476 (GEN_LD): New macro.
1477 (GEN_LDU): New macro.
1478 (gen_d_form): New function.
1479 (GEN_ADDI): New macro.
1480 (GEN_ADDIS): New macro.
1481 (GEN_LI): New macro.
1482 (GEN_LIS): New macro.
1483 (GEN_ORI): New macro.
1484 (GEN_ORIS): New macro.
1485 (GEN_LWZ): New macro.
1486 (GEN_STW): New macro.
1487 (GEN_STWU): New macro.
1488 (gen_xfx_form): New function.
1489 (GEN_MFSPR): New macro.
1490 (GEN_MTSPR): New macro.
1491 (GEN_MFCR): New macro.
1492 (GEN_MTCR): New macro.
1493 (GEN_SYNC): New macro.
1494 (GEN_LWSYNC): New macro.
1495 (gen_x_form): New function.
1496 (GEN_OR): New macro.
1497 (GEN_MR): New macro.
1498 (GEN_LWARX): New macro.
1499 (GEN_STWCX): New macro.
1500 (GEN_CMPW): New macro.
1501 (gen_md_form): New function.
1502 (GEN_RLDICL): New macro.
1503 (GEN_RLDICR): New macro.
1504 (gen_i_form): New function.
1505 (GEN_B): New macro.
1506 (GEN_BL): New macro.
1507 (gen_b_form): New function.
1508 (GEN_BNE): New macro.
1509 (GEN_LOAD): New macro.
1510 (GEN_STORE): New macro.
1511 (gen_limm): New function.
1512 (gen_atomic_xchg): New function.
1513 (gen_call): New function.
1514 (ppc_relocate_instruction): New function.
1515 (ppc_install_fast_tracepoint_jump_pad): New function.
1516 (ppc_get_min_fast_tracepoint_insn_len): New function.
1517 (ppc_get_ipa_tdesc_idx): New function.
1518 (the_low_target): Wire in the new functions.
1519 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1520 tdescs.
1521 * linux-ppc-tdesc.h: New file.
1522
1523 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1524
1525 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1526 (alloc_jump_pad_buffer): New function.
1527 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1528 (alloc_jump_pad_buffer): New function.
1529 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1530 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1531 (alloc_jump_pad_buffer): New function.
1532 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1533 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1534 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1535 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1536
1537 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1538
1539 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1540 * linux-amd64-ipa.c: Likewise.
1541 * linux-i386-ipa.c: Likewise.
1542 * linux-s390-ipa.c: Likewise.
1543 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1544 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1545 set_trace_state_variable_value_ptr.
1546 (struct ipa_sym_addresses): Likewise.
1547 (symbol_list): Likewise.
1548 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1549 accessing gdb_collect directly.
1550 (gdb_collect_ptr_type): New typedef.
1551 (get_raw_reg_ptr_type): New typedef.
1552 (get_trace_state_variable_value_ptr_type): New typedef.
1553 (set_trace_state_variable_value_ptr_type): New typedef.
1554 (gdb_collect_ptr): New global.
1555 (get_raw_reg_ptr): New global.
1556 (get_trace_state_variable_value_ptr): New global.
1557 (set_trace_state_variable_value_ptr): New global.
1558 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1559 accessing get_raw_reg directly.
1560 (get_get_tsv_func_addr): Likewise for
1561 get_trace_state_variable_value_ptr.
1562 (get_set_tsv_func_addr): Likewise for
1563 set_trace_state_variable_value_ptr.
1564 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1565
1566 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1567
1568 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1569
1570 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1571
1572 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1573 packets.
1574 (relocate_instruction): Remove own_buf.
1575 * server.c (own_buf): Make global.
1576 (handle_v_requests): Make global.
1577 * server.h (own_buf): New declaration.
1578 (handle_v_requests): New prototype.
1579
1580 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1581
1582 PR 18377
1583 * linux-s390-low.c (add_insns): New function.
1584 (s390_emit_prologue): New function.
1585 (s390_emit_epilogue): New function.
1586 (s390_emit_add): New function.
1587 (s390_emit_sub): New function.
1588 (s390_emit_mul): New function.
1589 (s390_emit_lsh): New function.
1590 (s390_emit_rsh_signed): New function.
1591 (s390_emit_rsh_unsigned): New function.
1592 (s390_emit_ext): New function.
1593 (s390_emit_log_not): New function.
1594 (s390_emit_bit_and): New function.
1595 (s390_emit_bit_or): New function.
1596 (s390_emit_bit_xor): New function.
1597 (s390_emit_bit_not): New function.
1598 (s390_emit_equal): New function.
1599 (s390_emit_less_signed): New function.
1600 (s390_emit_less_unsigned): New function.
1601 (s390_emit_ref): New function.
1602 (s390_emit_if_goto): New function.
1603 (s390_emit_goto): New function.
1604 (s390_write_goto_address): New function.
1605 (s390_emit_litpool): New function.
1606 (s390_emit_const): New function.
1607 (s390_emit_call): New function.
1608 (s390_emit_reg): New function.
1609 (s390_emit_pop): New function.
1610 (s390_emit_stack_flush): New function.
1611 (s390_emit_zero_ext): New function.
1612 (s390_emit_swap): New function.
1613 (s390_emit_stack_adjust): New function.
1614 (s390_emit_set_r2): New function.
1615 (s390_emit_int_call_1): New function.
1616 (s390_emit_void_call_2): New function.
1617 (s390_emit_eq_goto): New function.
1618 (s390_emit_ne_goto): New function.
1619 (s390_emit_lt_goto): New function.
1620 (s390_emit_le_goto): New function.
1621 (s390_emit_gt_goto): New function.
1622 (s390_emit_ge_goto): New function.
1623 (s390x_emit_prologue): New function.
1624 (s390x_emit_epilogue): New function.
1625 (s390x_emit_add): New function.
1626 (s390x_emit_sub): New function.
1627 (s390x_emit_mul): New function.
1628 (s390x_emit_lsh): New function.
1629 (s390x_emit_rsh_signed): New function.
1630 (s390x_emit_rsh_unsigned): New function.
1631 (s390x_emit_ext): New function.
1632 (s390x_emit_log_not): New function.
1633 (s390x_emit_bit_and): New function.
1634 (s390x_emit_bit_or): New function.
1635 (s390x_emit_bit_xor): New function.
1636 (s390x_emit_bit_not): New function.
1637 (s390x_emit_equal): New function.
1638 (s390x_emit_less_signed): New function.
1639 (s390x_emit_less_unsigned): New function.
1640 (s390x_emit_ref): New function.
1641 (s390x_emit_if_goto): New function.
1642 (s390x_emit_const): New function.
1643 (s390x_emit_call): New function.
1644 (s390x_emit_reg): New function.
1645 (s390x_emit_pop): New function.
1646 (s390x_emit_stack_flush): New function.
1647 (s390x_emit_zero_ext): New function.
1648 (s390x_emit_swap): New function.
1649 (s390x_emit_stack_adjust): New function.
1650 (s390x_emit_int_call_1): New function.
1651 (s390x_emit_void_call_2): New function.
1652 (s390x_emit_eq_goto): New function.
1653 (s390x_emit_ne_goto): New function.
1654 (s390x_emit_lt_goto): New function.
1655 (s390x_emit_le_goto): New function.
1656 (s390x_emit_gt_goto): New function.
1657 (s390x_emit_ge_goto): New function.
1658 (s390_emit_ops): New function.
1659 (struct linux_target_ops): Fill in emit_ops hook.
1660
1661 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1662
1663 PR 18377
1664 * Makefile.in: Add s390 IPA files.
1665 * configure.srv: Build IPA for s390.
1666 * linux-s390-ipa.c: New file.
1667 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1668 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1669 (tdesc_s390_linux32): Likewise.
1670 (init_registers_s390_linux32v1): Likewise.
1671 (tdesc_s390_linux32v1): Likewise.
1672 (init_registers_s390_linux32v2): Likewise.
1673 (tdesc_s390_linux32v2): Likewise.
1674 (init_registers_s390_linux64): Likewise.
1675 (tdesc_s390_linux64): Likewise.
1676 (init_registers_s390_linux64v1): Likewise.
1677 (tdesc_s390_linux64v1): Likewise.
1678 (init_registers_s390_linux64v2): Likewise.
1679 (tdesc_s390_linux64v2): Likewise.
1680 (init_registers_s390_te_linux64): Likewise.
1681 (tdesc_s390_te_linux64): Likewise.
1682 (init_registers_s390_vx_linux64): Likewise.
1683 (tdesc_s390_vx_linux64): Likewise.
1684 (init_registers_s390_tevx_linux64): Likewise.
1685 (tdesc_s390_tevx_linux64): Likewise.
1686 (init_registers_s390x_linux64): Likewise.
1687 (tdesc_s390x_linux64): Likewise.
1688 (init_registers_s390x_linux64v1): Likewise.
1689 (tdesc_s390x_linux64v1): Likewise.
1690 (init_registers_s390x_linux64v2): Likewise.
1691 (tdesc_s390x_linux64v2): Likewise.
1692 (init_registers_s390x_te_linux64): Likewise.
1693 (tdesc_s390x_te_linux64): Likewise.
1694 (init_registers_s390x_vx_linux64): Likewise.
1695 (tdesc_s390x_vx_linux64): Likewise.
1696 (init_registers_s390x_tevx_linux64): Likewise.
1697 (tdesc_s390x_tevx_linux64): Likewise.
1698 (have_hwcap_s390_vx): New static variable.
1699 (s390_arch_setup): Fill have_hwcap_s390_vx.
1700 (s390_get_thread_area): New function.
1701 (s390_ft_entry_gpr_esa): New const.
1702 (s390_ft_entry_gpr_zarch): New const.
1703 (s390_ft_entry_misc): New const.
1704 (s390_ft_entry_fr): New const.
1705 (s390_ft_entry_vr): New const.
1706 (s390_ft_main_31): New const.
1707 (s390_ft_main_64): New const.
1708 (s390_ft_exit_fr): New const.
1709 (s390_ft_exit_vr): New const.
1710 (s390_ft_exit_misc): New const.
1711 (s390_ft_exit_gpr_esa): New const.
1712 (s390_ft_exit_gpr_zarch): New const.
1713 (append_insns): New function.
1714 (s390_relocate_instruction): New function.
1715 (s390_install_fast_tracepoint_jump_pad): New function.
1716 (s390_get_min_fast_tracepoint_insn_len): New function.
1717 (s390_get_ipa_tdesc_idx): New function.
1718 (struct linux_target_ops): Wire in the above functions.
1719 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1720 * linux-s390-tdesc.h: New file.
1721
1722 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1723
1724 * linux-s390-low.c (s390_supports_tracepoints): New function.
1725 (struct linux_target_ops): Fill supports_tracepoints hook.
1726
1727 2016-03-18 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-low.c (lwp_signal_can_be_delivered): New function.
1730 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1731
1732 2016-03-18 Yao Qi <yao.qi@linaro.org>
1733
1734 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1735 0 if signal is enqueued. Remove 'signal' from one debugging
1736 message. Move one debugging message to some lines below.
1737 Remove code setting 'signal' to 0.
1738
1739 2016-03-18 Yao Qi <yao.qi@linaro.org>
1740
1741 * linux-low.c (linux_low_filter_event): Remove redundant
1742 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1743
1744 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1745
1746 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1747 (struct linux_target_ops): Wire in the above.
1748
1749 2016-03-03 Yao Qi <yao.qi@linaro.org>
1750
1751 * linux-low.c: Update comments to start_step_over.
1752
1753 2016-03-03 Yao Qi <yao.qi@linaro.org>
1754
1755 PR server/19736
1756 * linux-low.c (handle_extended_wait): Set child suspended
1757 if event_lwp->bp_reinsert isn't zero.
1758
1759 2016-03-02 Yao Qi <yao.qi@linaro.org>
1760
1761 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1762 enqueue_pending_signal.
1763
1764 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1765
1766 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1767 is actually loaded.
1768
1769 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1770
1771 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1772 (s390_regmap_3264) [!__s390x__]: New global.
1773 (s390_collect_ptrace_register): Skip map entries containing -1.
1774 (s390_supply_ptrace_register): Ditto.
1775 (s390_fill_gprs_high): New function.
1776 (s390_store_gprs_high): New function.
1777 (s390_regsets): Add NT_S390_HIGH_GPRS.
1778 (s390_get_hwcap): Enable on 31-bit.
1779 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1780 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1781 Detect NT_S390_HIGH_GPRS.
1782 (s390_usrregs_info_3264): Enable on 31-bit.
1783 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1784 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1785
1786 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1787
1788 PR gdb/13808
1789 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1790 * configure.srv: Ditto.
1791 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1792 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1793 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1794 (init_registers_amd64_linux): Remove prototype.
1795 (tdesc_amd64_linux): Remove declaration.
1796 (get_ipa_tdesc): New function.
1797 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1798 initialize remaining tdescs.
1799 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1800 (init_registers_i386_linux): Remove prototype.
1801 (tdesc_i386_linux): Remove declaration.
1802 (get_ipa_tdesc): New function.
1803 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1804 initialize remaining tdescs.
1805 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1806 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1807 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1808 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1809 (x86_get_ipa_tdesc_idx): New function.
1810 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1811 * linux-x86-tdesc.h: New file.
1812 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1813 (target_get_ipa_tdesc_idx): New macro.
1814 * tracepoint.c (ipa_tdesc_idx): New macro.
1815 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1816 (symbol_list): Add ipa_tdesc_idx.
1817 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1818 (ipa_tdesc): Remove.
1819 (ipa_tdesc_idx): New variable.
1820 (get_context_regcache): Use get_ipa_tdesc.
1821 (gdb_collect): Ditto.
1822 (gdb_probe): Ditto.
1823 * tracepoint.h (get_ipa_tdesc): New prototype.
1824 (ipa_tdesc): Remove.
1825
1826 2016-02-24 Pedro Alves <palves@redhat.com>
1827
1828 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1829 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1830 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1831 Factor out common code between the USE_SIGTRAP_SIGINFO and
1832 !USE_SIGTRAP_SIGINFO blocks.
1833 (linux_low_filter_event): Call save_stop_reason instead of
1834 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1835 Update comments.
1836 (linux_wait_1): Update comments.
1837
1838 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1839
1840 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1841 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1842 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1843 ppc_insert_point, ppc_remove_point.
1844
1845 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1846
1847 * linux-s390-low.c (s390_supports_z_point_type): New function.
1848 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1849
1850 2016-02-16 Yao Qi <yao.qi@linaro.org>
1851
1852 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1853 PC. Get pc from regcache_read_pc.
1854
1855 2016-02-12 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1858 or linux_get_pc_32bit.
1859 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1860
1861 2016-02-12 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1864 arm_linux_get_next_pcs_fixup.
1865
1866 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1867
1868 * tracepoint.c (x_tracepoint_action_download): Change
1869 write_inferior_data_ptr to write_inferior_data_pointer.
1870 (cmd_qtstart): Likewise.
1871 (write_inferior_data_ptr): Remove.
1872 (download_agent_expr): Change write_inferior_data_ptr to
1873 write_inferior_data_pointer.
1874 (download_tracepoint_1): Likewise.
1875 (download_tracepoint): Likewise.
1876 (download_trace_state_variables): Likewise.
1877
1878 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1879 Marcin Kościelnicki <koriakin@0x04.net>
1880
1881 * tracepoint.c (struct tracepoint_action_ops): Remove.
1882 (struct tracepoint_action): Remove ops.
1883 (m_tracepoint_action_download, r_tracepoint_action_download)
1884 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1885 size and offset accordingly.
1886 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1887 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1888 (tracepoint_action_send, tracepoint_action_download): New functions.
1889 Helpers for trace action handlers.
1890 (add_tracepoint_action): Remove setup actions ops.
1891 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1892
1893 2016-02-10 Yao Qi <yao.qi@linaro.org>
1894
1895 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1896
1897 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1898
1899 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1900 to AC_OUTPUT.
1901 * configure: Regenerate.
1902
1903 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1904
1905 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1906 void * to gdb_byte *.
1907 * linux-low.c (siginfo_fixup): Likewise.
1908 (linux_xfer_siginfo): Likewise.
1909 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1910 Likewise.
1911 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1912
1913 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1914
1915 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1916 to srv_tgtobj.
1917 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1918 to srv_tgtobj.
1919 * linux-x86-low.c [__x86_64__]: Include
1920 "nat/amd64-linux-siginfo.h".
1921 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1922 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1923 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1924 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1925 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1926 (cpt_si_fd, si_timerid, si_overrun): Move from
1927 nat/amd64-linux-siginfo.c.
1928 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1929
1930 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1931
1932 * server.c (skip_to_semicolon): Remove.
1933 (process_point_options): Use strchrnul instead of
1934 skip_to_semicolon.
1935
1936 2016-01-26 Yao Qi <yao.qi@linaro.org>
1937
1938 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1939 * linux-low.c (install_software_single_step_breakpoints): Don't
1940 call regcache_read_pc.
1941 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1942 argument pc.
1943
1944 2016-01-26 Yao Qi <yao.qi@linaro.org>
1945
1946 * linux-low.c (install_software_single_step_breakpoints): Call
1947 regcache_read_pc instead of get_pc.
1948
1949 2016-01-26 Yao Qi <yao.qi@linaro.org>
1950
1951 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1952 (unblock_async_io): Rename to ...
1953 (block_unblock_async_io): ... it. New function.
1954 (enable_async_io): Don't install SIGIO handler. Unblock it
1955 instead.
1956 (disable_async_io): Don't ignore SIGIO. Block it instead.
1957 (initialize_async_io): Install SIGIO handler. Don't call
1958 unblock_async_io.
1959
1960 2016-01-26 Yao Qi <yao.qi@linaro.org>
1961
1962 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1963 first character is '\003', call *the_target->request_interrupt.
1964
1965 2016-01-25 Yao Qi <yao.qi@linaro.org>
1966
1967 * remote-utils.c (new_thread_notify): Remove.
1968 (dead_thread_notify): Likewise.
1969 * remote-utils.h (new_thread_notify): Remove declaration.
1970 (dead_thread_notify): Likewise.
1971
1972 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1973
1974 * gdb.trace/pending.exp: Fix expected message on continue.
1975
1976 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1977
1978 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1979 it works properly on big-endian machines where sizeof (CORE_ADDR)
1980 != sizeof (void *).
1981
1982 2016-01-21 Pedro Alves <palves@redhat.com>
1983
1984 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1985 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1986 * configure: Regenerate.
1987
1988 2016-01-21 Yao Qi <yao.qi@linaro.org>
1989
1990 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1991 is_thumb and set it according to CPSR saved on the stack.
1992 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1993 arm_sigreturn_next_pc.
1994
1995 2016-01-18 Yao Qi <yao.qi@linaro.org>
1996
1997 * linux-low.c (linux_set_pc_64bit): New function.
1998 (linux_get_pc_64bit): New function.
1999 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2000 Declare.
2001 * linux-sparc-low.c (debug_threads): Remove declaration.
2002 (sparc_get_pc): Remove.
2003 (the_low_target): Use linux_get_pc_64bit instead of
2004 sparc_get_pc.
2005 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2006 (the_low_target): Use linux_get_pc_64bit and
2007 linux_set_pc_64bit.
2008
2009 2016-01-18 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-arm-low.c (debug_threads): Remove declaration.
2012 (arm_get_pc, arm_set_pc): Remove.
2013 (the_low_target): Use linux_get_pc_32bit and
2014 linux_set_pc_32bit.
2015 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2016 (the_low_target): Use linux_get_pc_32bit and
2017 linux_set_pc_32bit.
2018 * linux-cris-low.c (debug_threads): Remove declaration.
2019 (cris_get_pc, cris_set_pc,): Remove.
2020 (the_low_target): Use linux_get_pc_32bit and
2021 linux_set_pc_32bit.
2022 * linux-crisv32-low.c (debug_threads): Remove declaration.
2023 (cris_get_pc, cris_set_pc): Remove.
2024 (the_low_target): Use linux_get_pc_32bit and
2025 linux_set_pc_32bit.
2026 * linux-low.c: Include inttypes.h.
2027 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2028 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2029 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2030 (the_low_target): Use linux_get_pc_32bit and
2031 linux_set_pc_32bit.
2032 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2033 (the_low_target): Use linux_get_pc_32bit and
2034 linux_set_pc_32bit.
2035 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2036 (the_low_target): Use linux_get_pc_32bit and
2037 linux_set_pc_32bit.
2038 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2039 (the_low_target): Use linux_get_pc_32bit and
2040 linux_set_pc_32bit.
2041 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2042 (the_low_target): Use linux_get_pc_32bit and
2043 linux_set_pc_32bit.
2044
2045 2016-01-18 Gary Benson <gbenson@redhat.com>
2046
2047 * configure.ac (AC_FUNC_FORK): New check.
2048 * config.in: Regenerate.
2049 * configure: Likewise.
2050
2051 2016-01-14 Yao Qi <yao.qi@linaro.org>
2052
2053 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2054 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2055 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2056 arm_get_next_pcs_ctor.
2057
2058 2016-01-12 Josh Stone <jistone@redhat.com>
2059 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2060
2061 * inferiors.h: Include "gdb_vecs.h".
2062 (struct process_info): Add syscalls_to_catch.
2063 * inferiors.c (remove_process): Free syscalls_to_catch.
2064 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2065 syscall_return stops.
2066 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2067 * server.c (handle_general_set): Handle QCatchSyscalls.
2068 (handle_query): Report support for QCatchSyscalls.
2069 * target.h (struct target_ops): Add supports_catch_syscall.
2070 (target_supports_catch_syscall): New macro.
2071 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2072 (struct lwp_info): Add syscall_state.
2073 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2074 Maintain syscall_state and syscalls_to_catch across exec.
2075 (get_syscall_trapinfo): New function, proxy to the_low_target.
2076 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2077 (linux_low_filter_event): Toggle syscall_state entry/return for
2078 syscall traps, and set it ignored for all others.
2079 (gdb_catching_syscalls_p): New function.
2080 (gdb_catch_this_syscall_p): New function.
2081 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2082 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2083 (linux_supports_catch_syscall): New function.
2084 (linux_target_ops): Install it.
2085 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2086 (the_low_target): Install it.
2087
2088 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2089
2090 * acinclude.m4: Include new ../warning.m4 file.
2091 * configure: Regenerated.
2092 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2093
2094 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2095
2096 * ax.c (is_goto_target): Mark static.
2097 * linux-low.c (register_addr): Likewise.
2098 (linux_fetch_registers, linux_store_registers): Likewise.
2099 * mem-break.c (any_persistent_commands): Fix old prototype.
2100 (add_commands_to_breakpoint): Mark static.
2101 * regcache.c (find_register_by_name): Delete unused func.
2102 * remote-utils.c (hex_or_minus_one): Mark static.
2103 * server.c (monitor_show_help): Mark static.
2104 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2105 handle_v_requests): Likewise.
2106
2107 2016-01-12 Pedro Alves <palves@redhat.com>
2108
2109 Remove use of the registered trademark symbol throughout.
2110
2111 2016-01-08 Yao Qi <yao.qi@linaro.org>
2112
2113 * remote-utils.c (getpkt): If c is '\003', call target hook
2114 request_interrupt.
2115
2116 2016-01-06 Yao Qi <yao.qi@linaro.org>
2117
2118 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2119 linux-aarch32-low.c.
2120 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2121 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2122 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2123 (thumb2_breakpoint): Declare.
2124 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2125 linux-aarch32-low.h.
2126 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2127 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2128 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2129
2130 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2131
2132 * gdbreplay.c (gdbreplay_version): Change copyright year in
2133 version message.
2134 * server.c (gdbserver_version): Likewise.
2135
2136 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2137
2138 * server.c (crc32_table): Delete.
2139 (crc32): Use libiberty's xcrc32 function.
2140
2141 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2142
2143 * lynx-low.c (lynx_delete_thread_callback): New function.
2144 (lynx_mourn): Properly delete our process and all of its
2145 threads. Remove call to clear_inferiors.
2146
2147 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2148
2149 * target.c (thread_search_callback): Add check that
2150 the thread_stopped target callback is not NULL before
2151 calling it.
2152
2153 2015-12-21 Yao Qi <yao.qi@linaro.org>
2154
2155 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2156 arm breakpoint.
2157
2158 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2159
2160 * server.c (handle_query): Call target_supports_software_single_step.
2161
2162 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2163
2164 * linux-low.c (single_step): New function.
2165 (linux_resume_one_lwp_throw): Call single_step.
2166 (start_step_over): Likewise.
2167
2168 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2169
2170 * Makefile.in (SFILES): Append arch/arm-linux.c,
2171 arch/arm-get-next-pcs.c.
2172 (arm-linux.o): New rule.
2173 (arm-get-next-pcs.o): New rule.
2174 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2175 arm-linux.o.
2176 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2177 to linux-aarch32-low.c.
2178 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2179 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2180 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2181 (thumb2_breakpoint_len): Likewise.
2182 (arm_is_thumb_mode): Make non-static.
2183 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2184 from linux-aarch32-low.c.
2185 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2186 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2187 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2188 (thumb2_breakpoint_len): Likewise.
2189 (arm_is_thumb_mode): New declaration.
2190 * linux-arm-low.c: Include arch/arm-linux.h
2191 aarch/arm-get-next-pcs.h, sys/syscall.h.
2192 (get_next_pcs_ops): New struct.
2193 (get_next_pcs_addr_bits_remove): New function.
2194 (get_next_pcs_is_thumb): New function.
2195 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2196 (arm_sigreturn_next_pc): Likewise.
2197 (get_next_pcs_syscall_next_pc): Likewise.
2198 (arm_gdbserver_get_next_pcs): Likewise.
2199 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2200 Initialize.
2201 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2202 * server.h: Include gdb_vecs.h.
2203
2204 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2205
2206 * Makefile.in (SFILES): Append common/common-regcache.c.
2207 (OBS): Append common-regcache.o.
2208 (common-regcache.o): New rule.
2209 * regcache.c (init_register_cache): Initialize cache to
2210 REG_UNAVAILABLE.
2211 (regcache_raw_read_unsigned): New function.
2212 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2213 register_status enum.
2214
2215 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2216
2217 * linux-aarch64-low.c (the_low_targets): Rename
2218 breakpoint_reinsert_addr to get_next_pcs.
2219 * linux-arm-low.c (the_low_targets): Likewise.
2220 * linux-bfin-low.c (the_low_targets): Likewise.
2221 * linux-cris-low.c (the_low_targets): Likewise.
2222 * linux-crisv32-low.c (the_low_targets): Likewise.
2223 * linux-low.c (can_software_single_step): Likewise.
2224 (install_software_single_step_breakpoints): New function.
2225 (start_step_over): Use install_software_single_step_breakpoints.
2226 * linux-low.h: New CORE_ADDR vector.
2227 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2228 get_next_pcs.
2229 * linux-mips-low.c (the_low_targets): Likewise.
2230 * linux-nios2-low.c (the_low_targets): Likewise.
2231 * linux-sparc-low.c (the_low_targets): Likewise.
2232
2233 2015-12-17 Pedro Alves <palves@redhat.com>
2234
2235 * linux-low.c (linux_kill_one_lwp): Remove references to
2236 LinuxThreads.
2237 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2238 to 'kill'.
2239 (linux_init_signals): Delete.
2240 (initialize_low): Adjust.
2241 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2242
2243 2015-12-16 Pedro Alves <palves@redhat.com>
2244
2245 * configure.ac (compiler warning flags): When testing a
2246 -Wno-foo option, check whether -Wfoo works instead.
2247 * configure: Regenerate.
2248
2249 2015-12-11 Don Breazeal <donb@codesourcery.com>
2250
2251 * server.c (process_serial_event): Don't exit from gdbserver
2252 in remote mode if there are still active inferiors.
2253
2254 2015-12-11 Yao Qi <yao.qi@linaro.org>
2255
2256 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2257 arm_breakpoint_at if the process is 32-bit.
2258
2259 2015-12-11 Yao Qi <yao.qi@linaro.org>
2260
2261 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2262 arm breakpoint.
2263
2264 2015-12-07 Yao Qi <yao.qi@linaro.org>
2265
2266 * configure.srv: Append arm.o to srv_tgtobj for
2267 aarch64*-*-linux* target.
2268 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2269 from linux-arm-low.c.
2270 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2271 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2272 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2273 (thumb2_breakpoint_len): Likewise.
2274 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2275 (arm_breakpoint_kinds): Likewise.
2276 (arm_breakpoint_kind_from_pc): Likewise.
2277 (arm_sw_breakpoint_from_kind): Likewise.
2278 (arm_breakpoint_kind_from_current_state): Likewise.
2279 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2280 (arm_sw_breakpoint_from_kind): Declare.
2281 (arm_breakpoint_kind_from_current_state): Declare.
2282 (arm_breakpoint_at): Declare.
2283 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2284 arm_sw_breakpoint_from_kind if process is 32-bit.
2285 (aarch64_breakpoint_kind_from_pc): New function.
2286 (aarch64_breakpoint_kind_from_current_state): New function.
2287 (the_low_target): Initialize fields breakpoint_kind_from_pc
2288 and breakpoint_kind_from_current_state.
2289 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2290 linux-aarch32-low.c.
2291 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2292 (arm_breakpoint, arm_breakpoint_len): Likewise.
2293 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2294 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2295 (arm_is_thumb_mode): Likewise.
2296 (arm_breakpoint_at): Likewise.
2297 (arm_breakpoint_kind_from_pc): Likewise.
2298 (arm_sw_breakpoint_from_kind): Likewise.
2299 (arm_breakpoint_kind_from_current_state): Likewise.
2300
2301 Revert:
2302 2015-08-04 Yao Qi <yao.qi@linaro.org>
2303
2304 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2305 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2306 * server.c (extended_protocol): Remove "static".
2307 * server.h (extended_protocol): Declare it.
2308
2309 2015-12-04 Josh Stone <jistone@redhat.com>
2310
2311 * target.h (struct target_ops) <arch_setup>: Rename to ...
2312 (struct target_ops) <post_create_inferior>: ... this.
2313 (target_arch_setup): Rename to ...
2314 (target_post_create_inferior): ... this, calling post_create_inferior.
2315 * server.c (start_inferior): Update target_arch_setup calls to
2316 target_post_create_inferior.
2317 * linux-low.c (linux_low_ptrace_options): Forward declare.
2318 (linux_arch_setup): Update its comment for general use.
2319 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2320 (struct linux_target_ops): Use linux_post_create_inferior.
2321 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2322 to post_create_inferior.
2323 * nto-low.c (struct nto_target_ops): Likewise.
2324 * spu-low.c (struct spu_target_ops): Likewise.
2325 * win32-low.c (struct win32_target_ops): Likewise.
2326
2327 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2328
2329 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2330
2331 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2332
2333 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2334 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2335 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2336 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2337 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2338 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2339 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2340 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2341 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2342 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2343 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2344 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2345
2346 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2347
2348 * linux-low.c (linux_look_up_symbols): Don't call
2349 linux_supports_traceclone.
2350 * linux-low.h (thread_db_init): Remove use_events argument.
2351 * thread-db.c (thread_db_use_event): Remove global variable.
2352 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2353 (struct thread_db) <td_create_bp>: Remove field.
2354 (thread_db_create_event): Remove function.
2355 (thread_db_enable_reporting): Likewise.
2356 (find_one_thread): Don't check for thread_db_use_events.
2357 (attach_thread): Likewise.
2358 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2359 (try_thread_db_load_1): Don't check for thread_db_use_events.
2360 (thread_db_init): Remove use_events argument and thread events
2361 handling.
2362 (remove_thread_event_breakpoints): Remove function.
2363 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2364
2365 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2366
2367 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2368 New function.
2369 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2370 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2371 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2372 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2373 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2374 Initialize.
2375 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2376 New function.
2377 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2378 * linux-low.c (can_hardware_single_step): Use
2379 supports_hardware_single_step.
2380 (can_software_single_step): New function.
2381 (start_step_over): Call can_software_single_step.
2382 (linux_supports_hardware_single_step): New function.
2383 (struct target_ops) <supports_software_single_step>: Initialize.
2384 * linux-low.h (struct linux_target_ops)
2385 <supports_hardware_single_step>: Initialize.
2386 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2387 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2388 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2389 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2390 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2391 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2392 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2393 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2394 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2395 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2396 Initialize.
2397 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2398 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2399 Initialize.
2400 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2401 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2402 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2403 New function.
2404 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2405 * target.h (struct target_ops): <supports_software_single_step>:
2406 New field.
2407 (target_supports_software_single_step): New macro.
2408
2409 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2410
2411 * linux-low.c (linux_wait_1): Fix pc advance condition.
2412 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2413 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2414
2415 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2416
2417 * linux-arm-low.c (arm_is_thumb_mode): New function.
2418 (arm_breakpoint_at): Use arm_is_thumb_mode.
2419 (arm_breakpoint_kind_from_current_state): New function.
2420 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2421 Initialize.
2422 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2423 (linux_breakpoint_kind_from_current_state): New function.
2424 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2425 * linux-low.h (struct linux_target_ops)
2426 <breakpoint_kind_from_current_state>: New field.
2427 * target.h (struct target_ops): Likewise.
2428 (target_breakpoint_kind_from_current_state): New macro.
2429
2430 2015-11-30 Pedro Alves <palves@redhat.com>
2431
2432 * linux-low.c (linux_resume): Wake up the event loop before
2433 returning.
2434
2435 2015-11-30 Pedro Alves <palves@redhat.com>
2436
2437 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2438 check.
2439 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2440 to -1.
2441 * target.c (struct thread_search): New structure.
2442 (thread_search_callback): New function.
2443 (prev_general_thread): New global.
2444 (prepare_to_access_memory, done_accessing_memory): New functions.
2445 * target.h (prepare_to_access_memory, done_accessing_memory):
2446 Replace macros with function declarations.
2447
2448 2015-11-30 Pedro Alves <palves@redhat.com>
2449
2450 PR 14618
2451 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2452 report TARGET_WAITKIND_NO_RESUMED.
2453 * remote-utils.c (prepare_resume_reply): Handle
2454 TARGET_WAITKIND_NO_RESUMED.
2455 * server.c (report_no_resumed): New global.
2456 (handle_query) <qSupported>: Handle "no-resumed+". Report
2457 "no-resumed+" support.
2458 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2459 return error if the client doesn't support no-resumed events.
2460 (push_stop_notification): New function.
2461 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2462 events if the client supports them.
2463
2464 2015-11-30 Pedro Alves <palves@redhat.com>
2465
2466 * linux-low.c (thread_still_has_status_pending_p): Don't check
2467 vCont;t here.
2468 (lwp_resumed): New function.
2469 (status_pending_p_callback): Return early if the LWP is not
2470 supposed to be resumed.
2471
2472 2015-11-30 Pedro Alves <palves@redhat.com>
2473
2474 * linux-low.c (handle_extended_wait): Assert that the LWP's
2475 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2476 thread create events, leave the new child's status pending.
2477 (linux_low_filter_event): If GDB wants to hear about thread exit
2478 events, leave the LWP marked dead and don't delete it.
2479 (linux_wait_for_event_filtered): Don't check for thread exit.
2480 (filter_exit_event): New function.
2481 (linux_wait_1): Use it, when returning an exit event.
2482 (linux_resume_one_lwp_throw): Assert that the LWP's
2483 waitstatus is TARGET_WAITKIND_IGNORE.
2484 * remote-utils.c (prepare_resume_reply): Handle
2485 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2486 * server.c (report_thread_events): New global.
2487 (handle_general_set): Handle QThreadEvents.
2488 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2489 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2490 TARGET_WAITKIND_THREAD_EXITED.
2491 * server.h (report_thread_events): Declare.
2492
2493 2015-11-30 Pedro Alves <palves@redhat.com>
2494
2495 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2496 the thread's last_resume_kind was resume_stop.
2497
2498 2015-11-30 Pedro Alves <palves@redhat.com>
2499
2500 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2501 before returning.
2502
2503 2015-11-30 Pedro Alves <palves@redhat.com>
2504
2505 * server.c (handle_v_requests): Handle vCtrlC.
2506
2507 2015-11-30 Pedro Alves <palves@redhat.com>
2508
2509 * gdbthread.h (find_any_thread_of_pid): Declare.
2510 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2511 functions.
2512 * server.c (handle_query): If current_thread is NULL, look for
2513 another thread of the selected process.
2514
2515 2015-11-26 Daniel Colascione <dancol@dancol.org>
2516 Simon Marchi <simon.marchi@ericsson.com>
2517
2518 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2519 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2520 name in reply.
2521 * target.h (struct target_ops) <thread_name>: New field.
2522 (target_thread_name): New macro.
2523
2524 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2525
2526 * regcache.h (regcache_invalidate_pid): Add declaration.
2527 * regcache.c (regcache_invalidate_pid): New function, extracted
2528 from regcache_invalidate.
2529 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2530 Add trivial documentation comment.
2531 * lynx-low.c: Use regcache_invalidate_pid instead of
2532 regcache_invalidate.
2533
2534 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2535
2536 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2537 and Elf64_auxv_t if the target is Android.
2538
2539 2015-11-22 Doug Evans <xdje42@gmail.com>
2540
2541 * target.h: #include <sys/types.h>.
2542
2543 2015-11-19 Pedro Alves <palves@redhat.com>
2544
2545 * linux-low.c (linux_process_qsupported): Change prototype.
2546 Adjust.
2547 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2548 Change prototype.
2549 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2550 and adjust to loop over all features.
2551 * server.c (handle_query) <qSupported>: Adjust to call
2552 target_process_qsupported once, passing it a vector of unprocessed
2553 features.
2554 * target.h (struct target_ops) <process_qsupported>: Change
2555 prototype.
2556 (target_process_qsupported): Adjust.
2557
2558 2015-11-19 Pedro Alves <palves@redhat.com>
2559
2560 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2561 mode.
2562 * configure: Regenerate.
2563
2564 2015-11-19 Pedro Alves <palves@redhat.com>
2565
2566 * configure: Regenerate.
2567
2568 2015-11-19 Yao Qi <yao.qi@linaro.org>
2569
2570 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2571 type to uint32_t.
2572
2573 2015-11-19 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2576 (struct aarch64_operand): Move enum out.
2577
2578 2015-11-19 Yao Qi <yao.qi@linaro.org>
2579
2580 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2581 struct user_fpsimd_state *.
2582 (aarch64_store_fpregset): Likewise.
2583
2584 2015-11-19 Yao Qi <yao.qi@linaro.org>
2585
2586 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2587 struct user_pt_regs *.
2588 (aarch64_store_gregset): Likewise.
2589
2590 2015-11-18 Pedro Alves <palves@redhat.com>
2591
2592 * Makefile.in (all_object_files): Add $IPA_OBJS.
2593
2594 2015-11-17 Pedro Alves <palves@redhat.com>
2595
2596 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2597 GDB_SIGNAL_0 and gdb_signal_to_string.
2598
2599 2015-11-17 Pedro Alves <palves@redhat.com>
2600
2601 * win32-low.c (handle_output_debug_string): Remove parameter.
2602 (win32_kill): Remove our_status local and adjust call to
2603 handle_output_debug_string.
2604 (get_child_debug_event): Adjust call to
2605 handle_output_debug_string.
2606
2607 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2608
2609 * linux-mips-low.c (mips_fill_gregset): Add cast.
2610 (mips_store_gregset): Likewise.
2611 (mips_fill_fpregset): Likewise.
2612 (mips_store_fpregset): Likewise.
2613
2614 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2615
2616 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2617 priv.
2618
2619 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2620
2621 * linux-mips-low.c (mips_linux_new_thread): Change type of
2622 watch_type to enum target_hw_bp_type.
2623
2624 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2625
2626 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2627 Change return type to arm_hwbp_type.
2628
2629 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2630
2631 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2632 (arm_store_gregset): Likewise.
2633 * linux-arm-low.c (arm_get_hwcap): Likewise.
2634 (arm_read_description): Likewise.
2635
2636 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2637
2638 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2639
2640 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2641
2642 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2643 (ppc_fill_vsxregset): Likewise.
2644 (ppc_store_vsxregset): Likewise.
2645 (ppc_fill_vrregset): Likewise.
2646 (ppc_store_vrregset): Likewise.
2647 (ppc_fill_evrregset): Likewise.
2648 (ppc_store_evrregset): Likewise.
2649
2650 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2651
2652 * linux-ppc-low.c (ppc_usrregs_info): Remove
2653 forward-declaration.
2654 (ppc_arch_setup): Move lower in file.
2655
2656 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2657
2658 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2659 (ps_pdwrite): Likewise.
2660
2661 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2662
2663 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2664 to after assert checks.
2665
2666 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2667
2668 * proc-service.c (ps_pdread): Add/adjust casts.
2669 (ps_pdwrite): Add/adjust casts.
2670
2671 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2672
2673 * server.c (handle_search_memory_1): Cast return value of
2674 memmem.
2675
2676 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2677
2678 * server.c (write_qxfer_response): Change type of data to
2679 gdb_byte *.
2680
2681 2015-10-29 Pedro Alves <palves@redhat.com>
2682
2683 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2684
2685 2015-10-29 Pedro Alves <palves@redhat.com>
2686
2687 * tracepoint.c (clear_installed_tracepoints): Add casts.
2688
2689 2015-10-29 Pedro Alves <palves@redhat.com>
2690
2691 * server.c (handle_v_cont, process_serial_event): Add enum
2692 gdb_signal casts to signal parsing code.
2693
2694 2015-10-29 Pedro Alves <palves@redhat.com>
2695
2696 * linux-low.h (NULL_REGSET): Define.
2697 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2698 * linux-arm-low.c (arm_regsets): Likewise.
2699 * linux-crisv32-low.c (cris_regsets): Likewise.
2700 * linux-m68k-low.c (m68k_regsets): Likewise.
2701 * linux-mips-low.c (mips_regsets): Likewise.
2702 * linux-nios2-low.c (nios2_regsets): Likewise.
2703 * linux-ppc-low.c (ppc_regsets): Likewise.
2704 * linux-s390-low.c (s390_regsets): Likewise.
2705 * linux-sh-low.c (sh_regsets): Likewise.
2706 * linux-sparc-low.c (sparc_regsets): Likewise.
2707 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2708 * linux-tile-low.c (tile_regsets): Likewise.
2709 * linux-x86-low.c (x86_regsets): Likewise.
2710 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2711
2712 2015-10-29 Pedro Alves <palves@redhat.com>
2713
2714 * linux-low.h (NULL_REGSET): Define.
2715 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2716 * linux-arm-low.c (arm_regsets): Likewise.
2717 * linux-crisv32-low.c (cris_regsets): Likewise.
2718 * linux-m68k-low.c (m68k_regsets): Likewise.
2719 * linux-mips-low.c (mips_regsets): Likewise.
2720 * linux-nios2-low.c (nios2_regsets): Likewise.
2721 * linux-ppc-low.c (ppc_regsets): Likewise.
2722 * linux-s390-low.c (s390_regsets): Likewise.
2723 * linux-sh-low.c (sh_regsets): Likewise.
2724 * linux-sparc-low.c (sparc_regsets): Likewise.
2725 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2726 * linux-tile-low.c (tile_regsets): Likewise.
2727 * linux-x86-low.c (x86_regsets): Likewise.
2728 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2729
2730 2015-10-26 Doug Evans <dje@google.com>
2731
2732 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2733
2734 2015-10-26 Doug Evans <dje@google.com>
2735
2736 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2737
2738 2015-10-26 Doug Evans <dje@google.com>
2739
2740 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2741 for debug_printf.
2742 (attach_thread, find_new_threads_callback): Ditto.
2743
2744 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2745
2746 * mem-break.h (set_breakpoint_data): Remove.
2747
2748 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2749
2750 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2751 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2752 (initialize_low): Remove set_breakpoint_data call.
2753 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2754 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2755 (initialize_low): Remove set_breakpoint_data call.
2756 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2757 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2758 (initialize_low): Remove set_breakpoint_data call.
2759
2760 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2761
2762 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2763 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2764 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2765 * target.h (target_breakpoint_kind_from_pc): New macro.
2766
2767 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2768
2769 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2770 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2771 the default breakpoint kind.
2772
2773 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2774
2775 * linux-arm-low.c (arm_supports_z_point_type): Add software
2776 breakpoint support.
2777
2778 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2779
2780 * linux-arm-low.c: Refactor breakpoint definitions.
2781 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2782 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2783
2784 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2785
2786 * Makefile.in: Add arm.c/o.
2787 * configure.srv: Likewise.
2788 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2789 (arm_breakpoint_kind_from_pc): New function.
2790 (arm_sw_breakpoint_from_kind): Return proper kind.
2791 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2792
2793 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2794
2795 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2796 removal.
2797 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2798 (struct raw_breakpoint) <size>: Remove.
2799 (struct raw_breakpoint) <kind>: Add.
2800 (bp_size): New function.
2801 (bp_opcode): Likewise.
2802 (find_raw_breakpoint_at): Adjust for kind.
2803 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2804 (remove_memory_breakpoint): Adjust for kind call bp_size.
2805 (set_raw_breakpoint_at): Adjust for kind.
2806 (set_breakpoint): Likewise.
2807 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2808 (delete_raw_breakpoint): Adjust for kind.
2809 (delete_breakpoint): Likewise.
2810 (find_gdb_breakpoint): Likewise.
2811 (set_gdb_breakpoint_1): Likewise.
2812 (set_gdb_breakpoint): Likewise.
2813 (delete_gdb_breakpoint_1): Likewise.
2814 (delete_gdb_breakpoint): Likewise.
2815 (uninsert_raw_breakpoint): Likewise.
2816 (reinsert_raw_breakpoint): Likewise.
2817 (set_breakpoint_data): Remove.
2818 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2819 (check_mem_read): Adjust for kind call bp_size.
2820 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2821 (clone_one_breakpoint): Adjust for kind.
2822 * mem-break.h (set_gdb_breakpoint): Likewise.
2823 (delete_gdb_breakpoint): Likewise.
2824 * server.c (process_serial_event): Likewise.
2825
2826 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2827
2828 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2829 (struct linux_target_ops) <breakpoint>: Remove.
2830 (struct linux_target_ops) <breakpoint_len>: Remove.
2831 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2832 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2833 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2834 (arm_sw_breakpoint_from_kind): New function.
2835 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2836 (struct linux_target_ops) <breakpoint>: Remove.
2837 (struct linux_target_ops) <breakpoint_len>: Remove.
2838 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2839 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2840 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2841 (struct linux_target_ops) <breakpoint>: Remove.
2842 (struct linux_target_ops) <breakpoint_len>: Remove.
2843 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2844 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2845 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2846 (struct linux_target_ops) <breakpoint>: Remove.
2847 (struct linux_target_ops) <breakpoint_len>: Remove.
2848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2849 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2850 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2851 and sw_breakpoint_from_kind to increment the pc.
2852 (linux_breakpoint_kind_from_pc): New function.
2853 (linux_sw_breakpoint_from_kind): New function.
2854 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2855 (initialize_low): Call breakpoint_kind_from_pc and
2856 sw_breakpoint_from_kind to replace breakpoint_data/len.
2857 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2858 New field.
2859 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2860 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2861 (struct linux_target_ops) <breakpoint>: Remove.
2862 (struct linux_target_ops) <breakpoint_len>: Remove.
2863 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2864 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2865 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2866 (struct linux_target_ops) <breakpoint>: Remove.
2867 (struct linux_target_ops) <breakpoint_len>: Remove.
2868 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2869 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2870 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2871 (struct linux_target_ops) <breakpoint>: Remove.
2872 (struct linux_target_ops) <breakpoint_len>: Remove.
2873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2875 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2876 (struct linux_target_ops) <breakpoint>: Remove.
2877 (struct linux_target_ops) <breakpoint_len>: Remove.
2878 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2880 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2881 (struct linux_target_ops) <breakpoint>: Remove.
2882 (struct linux_target_ops) <breakpoint_len>: Remove.
2883 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2884 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2885 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2886 (struct linux_target_ops) <breakpoint>: Remove.
2887 (struct linux_target_ops) <breakpoint_len>: Remove.
2888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2890 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2891 (struct linux_target_ops) <breakpoint>: Remove.
2892 (struct linux_target_ops) <breakpoint_len>: Remove.
2893 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2894 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2895 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2896 (struct linux_target_ops) <breakpoint>: Remove.
2897 (struct linux_target_ops) <breakpoint_len>: Remove.
2898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2900 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2901 (struct linux_target_ops) <breakpoint>: Remove.
2902 (struct linux_target_ops) <breakpoint_len>: Remove.
2903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2905 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2906 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
2917 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2918
2919 * linux-cris-low.c (cris_get_pc): Remove void arg.
2920
2921 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2922
2923 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2924 variable name.
2925
2926 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2927
2928 * inferiors.c (thread_pid_matches_callback): New function.
2929 (find_thread_process): New function.
2930 (remove_thread): Reset current_thread.
2931 (remove_process): Assert threads have been removed first.
2932
2933 2015-10-15 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2936 if it is 3.
2937 (aarch64_remove_point): Likewise.
2938 * regcache.c (regcache_register_size): New function.
2939
2940 2015-10-12 Yao Qi <yao.qi@linaro.org>
2941
2942 * linux-aarch64-low.c: Update all callers as emit_load_store
2943 is renamed to aarch64_emit_load_store.
2944
2945 2015-10-12 Yao Qi <yao.qi@linaro.org>
2946
2947 * linux-aarch64-low.c: Update all callers of function renaming
2948 from emit_insn to aarch64_emit_insn.
2949
2950 2015-10-12 Yao Qi <yao.qi@linaro.org>
2951
2952 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2953 arch/aarch64-insn.h.
2954 (struct aarch64_memory_operand): Likewise.
2955 (ENCODE): Likewise.
2956 (emit_insn): Move to arch/aarch64-insn.c.
2957 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2958 (emit_load_store): Move to arch/aarch64-insn.c.
2959 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2960 (can_encode_int32): Remove.
2961
2962 2015-10-12 Yao Qi <yao.qi@linaro.org>
2963
2964 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2965 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2966 (aarch64_relocate_instruction): Likewise.
2967 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2968 (struct aarch64_insn_visitor): Likewise.
2969
2970 2015-10-12 Yao Qi <yao.qi@linaro.org>
2971
2972 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2973 (struct aarch64_insn_visitor): New.
2974 (struct aarch64_insn_relocation_data): New.
2975 (aarch64_ftrace_insn_reloc_b): New function.
2976 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2977 (aarch64_ftrace_insn_reloc_cb): Likewise.
2978 (aarch64_ftrace_insn_reloc_tb): Likewise.
2979 (aarch64_ftrace_insn_reloc_adr): Likewise.
2980 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2981 (aarch64_ftrace_insn_reloc_others): Likewise.
2982 (visitor): New.
2983 (aarch64_relocate_instruction): Use visitor.
2984
2985 2015-10-12 Yao Qi <yao.qi@linaro.org>
2986
2987 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2988 int. Add argument buf.
2989 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2990 aarch64_relocate_instruction.
2991
2992 2015-10-12 Yao Qi <yao.qi@linaro.org>
2993
2994 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2995 argument insn. Remove local variable insn. Don't call
2996 target_read_uint32.
2997 (aarch64_install_fast_tracepoint_jump_pad): Call
2998 target_read_uint32.
2999
3000 2015-09-30 Yao Qi <yao.qi@linaro.org>
3001
3002 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3003 (emit_load_store_pair): Likewise.
3004
3005 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3006
3007 * dll.c (match_dll): Add cast(s).
3008 (unloaded_dll): Likewise.
3009 * linux-low.c (second_thread_of_pid_p): Likewise.
3010 (delete_lwp_callback): Likewise.
3011 (count_events_callback): Likewise.
3012 (select_event_lwp_callback): Likewise.
3013 (linux_set_resume_request): Likewise.
3014 * server.c (accumulate_file_name_length): Likewise.
3015 (emit_dll_description): Likewise.
3016 (handle_qxfer_threads_worker): Likewise.
3017 (visit_actioned_threads): Likewise.
3018 * thread-db.c (any_thread_of): Likewise.
3019 * tracepoint.c (same_process_p): Likewise.
3020 (match_blocktype): Likewise.
3021 (build_traceframe_info_xml): Likewise.
3022
3023 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3024
3025 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3026 assignment.
3027 (gdb_unparse_agent_expr): Likewise.
3028 * hostio.c (require_data): Likewise.
3029 (handle_pread): Likewise.
3030 * linux-low.c (disable_regset): Likewise.
3031 (fetch_register): Likewise.
3032 (store_register): Likewise.
3033 (get_dynamic): Likewise.
3034 (linux_qxfer_libraries_svr4): Likewise.
3035 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3036 (set_fast_tracepoint_jump): Likewise.
3037 (uninsert_fast_tracepoint_jumps_at): Likewise.
3038 (reinsert_fast_tracepoint_jumps_at): Likewise.
3039 (validate_inserted_breakpoint): Likewise.
3040 (clone_agent_expr): Likewise.
3041 * regcache.c (init_register_cache): Likewise.
3042 * remote-utils.c (putpkt_binary_1): Likewise.
3043 (decode_M_packet): Likewise.
3044 (decode_X_packet): Likewise.
3045 (look_up_one_symbol): Likewise.
3046 (relocate_instruction): Likewise.
3047 (monitor_output): Likewise.
3048 * server.c (handle_search_memory): Likewise.
3049 (handle_qxfer_exec_file): Likewise.
3050 (handle_qxfer_libraries): Likewise.
3051 (handle_qxfer): Likewise.
3052 (handle_query): Likewise.
3053 (handle_v_cont): Likewise.
3054 (handle_v_run): Likewise.
3055 (captured_main): Likewise.
3056 * target.c (write_inferior_memory): Likewise.
3057 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3058 * tracepoint.c (init_trace_buffer): Likewise.
3059 (add_tracepoint_action): Likewise.
3060 (add_traceframe): Likewise.
3061 (add_traceframe_block): Likewise.
3062 (cmd_qtdpsrc): Likewise.
3063 (cmd_qtdv): Likewise.
3064 (cmd_qtstatus): Likewise.
3065 (response_source): Likewise.
3066 (response_tsv): Likewise.
3067 (cmd_qtnotes): Likewise.
3068 (gdb_collect): Likewise.
3069 (initialize_tracepoint): Likewise.
3070
3071 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3072
3073 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3074 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3075 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3076 <NOP>: New.
3077 (enum aarch64_condition_codes): New enum.
3078 (w0): New static global.
3079 (fp): Likewise.
3080 (lr): Likewise.
3081 (struct aarch64_memory_operand) <type>: New
3082 MEMORY_OPERAND_POSTINDEX type.
3083 (postindex_memory_operand): New helper function.
3084 (emit_ret): New function.
3085 (emit_load_store_pair): New function, factored out of emit_stp
3086 with support for MEMORY_OPERAND_POSTINDEX.
3087 (emit_stp): Rewrite using emit_load_store_pair.
3088 (emit_ldp): New function.
3089 (emit_load_store): Likewise.
3090 (emit_ldr): Mention post-index instruction in comment.
3091 (emit_ldrh): New function.
3092 (emit_ldrb): New function.
3093 (emit_ldrsw): Mention post-index instruction in comment.
3094 (emit_str): Likewise.
3095 (emit_subs): New function.
3096 (emit_cmp): Likewise.
3097 (emit_and): Likewise.
3098 (emit_orr): Likewise.
3099 (emit_orn): Likewise.
3100 (emit_eor): Likewise.
3101 (emit_mvn): Likewise.
3102 (emit_lslv): Likewise.
3103 (emit_lsrv): Likewise.
3104 (emit_asrv): Likewise.
3105 (emit_mul): Likewise.
3106 (emit_sbfm): Likewise.
3107 (emit_sbfx): Likewise.
3108 (emit_ubfm): Likewise.
3109 (emit_ubfx): Likewise.
3110 (emit_csinc): Likewise.
3111 (emit_cset): Likewise.
3112 (emit_nop): Likewise.
3113 (emit_ops_insns): New helper function.
3114 (emit_pop): Likewise.
3115 (emit_push): Likewise.
3116 (aarch64_emit_prologue): New function.
3117 (aarch64_emit_epilogue): Likewise.
3118 (aarch64_emit_add): Likewise.
3119 (aarch64_emit_sub): Likewise.
3120 (aarch64_emit_mul): Likewise.
3121 (aarch64_emit_lsh): Likewise.
3122 (aarch64_emit_rsh_signed): Likewise.
3123 (aarch64_emit_rsh_unsigned): Likewise.
3124 (aarch64_emit_ext): Likewise.
3125 (aarch64_emit_log_not): Likewise.
3126 (aarch64_emit_bit_and): Likewise.
3127 (aarch64_emit_bit_or): Likewise.
3128 (aarch64_emit_bit_xor): Likewise.
3129 (aarch64_emit_bit_not): Likewise.
3130 (aarch64_emit_equal): Likewise.
3131 (aarch64_emit_less_signed): Likewise.
3132 (aarch64_emit_less_unsigned): Likewise.
3133 (aarch64_emit_ref): Likewise.
3134 (aarch64_emit_if_goto): Likewise.
3135 (aarch64_emit_goto): Likewise.
3136 (aarch64_write_goto_address): Likewise.
3137 (aarch64_emit_const): Likewise.
3138 (aarch64_emit_call): Likewise.
3139 (aarch64_emit_reg): Likewise.
3140 (aarch64_emit_pop): Likewise.
3141 (aarch64_emit_stack_flush): Likewise.
3142 (aarch64_emit_zero_ext): Likewise.
3143 (aarch64_emit_swap): Likewise.
3144 (aarch64_emit_stack_adjust): Likewise.
3145 (aarch64_emit_int_call_1): Likewise.
3146 (aarch64_emit_void_call_2): Likewise.
3147 (aarch64_emit_eq_goto): Likewise.
3148 (aarch64_emit_ne_goto): Likewise.
3149 (aarch64_emit_lt_goto): Likewise.
3150 (aarch64_emit_le_goto): Likewise.
3151 (aarch64_emit_gt_goto): Likewise.
3152 (aarch64_emit_ge_got): Likewise.
3153 (aarch64_emit_ops_impl): New static global variable.
3154 (aarch64_emit_ops): New target function, return
3155 &aarch64_emit_ops_impl.
3156 (struct linux_target_ops): Install it.
3157
3158 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3159
3160 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3161 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3162 aarch64-ipa.o.
3163 * linux-aarch64-ipa.c: New file.
3164 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3165 and endian.h.
3166 (aarch64_get_thread_area): New target method.
3167 (extract_signed_bitfield): New helper function.
3168 (aarch64_decode_ldr_literal): New function.
3169 (enum aarch64_opcodes): New enum.
3170 (struct aarch64_register): New struct.
3171 (struct aarch64_operand): New struct.
3172 (x0): New static global.
3173 (x1): Likewise.
3174 (x2): Likewise.
3175 (x3): Likewise.
3176 (x4): Likewise.
3177 (w2): Likewise.
3178 (ip0): Likewise.
3179 (sp): Likewise.
3180 (xzr): Likewise.
3181 (aarch64_register): New helper function.
3182 (register_operand): Likewise.
3183 (immediate_operand): Likewise.
3184 (struct aarch64_memory_operand): New struct.
3185 (offset_memory_operand): New helper function.
3186 (preindex_memory_operand): Likewise.
3187 (enum aarch64_system_control_registers): New enum.
3188 (ENCODE): New macro.
3189 (emit_insn): New helper function.
3190 (emit_b): New function.
3191 (emit_bcond): Likewise.
3192 (emit_cb): Likewise.
3193 (emit_tb): Likewise.
3194 (emit_blr): Likewise.
3195 (emit_stp): Likewise.
3196 (emit_ldp_q_offset): Likewise.
3197 (emit_stp_q_offset): Likewise.
3198 (emit_load_store): Likewise.
3199 (emit_ldr): Likewise.
3200 (emit_ldrsw): Likewise.
3201 (emit_str): Likewise.
3202 (emit_ldaxr): Likewise.
3203 (emit_stxr): Likewise.
3204 (emit_stlr): Likewise.
3205 (emit_data_processing_reg): Likewise.
3206 (emit_data_processing): Likewise.
3207 (emit_add): Likewise.
3208 (emit_sub): Likewise.
3209 (emit_mov): Likewise.
3210 (emit_movk): Likewise.
3211 (emit_mov_addr): Likewise.
3212 (emit_mrs): Likewise.
3213 (emit_msr): Likewise.
3214 (emit_sevl): Likewise.
3215 (emit_wfe): Likewise.
3216 (append_insns): Likewise.
3217 (can_encode_int32_in): New helper function.
3218 (aarch64_relocate_instruction): New function.
3219 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3220 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3221 (struct linux_target_ops): Install aarch64_get_thread_area,
3222 aarch64_install_fast_tracepoint_jump_pad and
3223 aarch64_get_min_fast_tracepoint_insn_len.
3224
3225 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3226
3227 * Makefile.in (aarch64-insn.o): New rule.
3228 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3229
3230 2015-09-21 Yao Qi <yao.qi@linaro.org>
3231
3232 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3233
3234 2015-09-21 Yao Qi <yao.qi@linaro.org>
3235
3236 * tracepoint.c (max_jump_pad_size): Remove.
3237
3238 2015-09-18 Yao Qi <yao.qi@linaro.org>
3239
3240 * linux-aarch64-low.c: Don't include sys/uio.h.
3241 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3242
3243 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3244
3245 * tracepoint.c (eval_result_type): Change prototype.
3246 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3247
3248 2015-09-15 Pedro Alves <palves@redhat.com>
3249
3250 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3251 Check whether to report exec events instead of checking whether
3252 multiprocess is enabled.
3253
3254 2015-09-15 Pedro Alves <palves@redhat.com>
3255
3256 PR remote/18965
3257 * remote-utils.c (prepare_resume_reply): Merge
3258 TARGET_WAITKIND_VFORK_DONE switch case with the
3259 TARGET_WAITKIND_FORKED case.
3260
3261 2015-09-15 Yao Qi <yao.qi@linaro.org>
3262
3263 * server.c (handle_query): Check string comparison using
3264 "else if" instead of "if".
3265
3266 2015-09-15 Yao Qi <yao.qi@linaro.org>
3267
3268 * server.c (vCont_supported): New global variable.
3269 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3270 matches. Append ";vContSupported+" to own_buf.
3271 (handle_v_requests): Append ";s;S" to own_buf if target supports
3272 hardware single step or vCont_supported is false.
3273 (capture_main): Set vCont_supported to zero.
3274
3275 2015-09-15 Yao Qi <yao.qi@linaro.org>
3276
3277 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3278 it to ...
3279 (linux_supports_hardware_single_step): ... New function.
3280 (linux_target_ops): Update.
3281 * lynx-low.c (lynx_target_ops): Set field
3282 supports_hardware_single_step to target_can_do_hardware_single_step.
3283 * nto-low.c (nto_target_ops): Likewise.
3284 * spu-low.c (spu_target_ops): Likewise.
3285 * win32-low.c (win32_target_ops): Likewise.
3286 * target.c (target_can_do_hardware_single_step): New function.
3287 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3288 Remove. <supports_hardware_single_step>: New field.
3289 (target_supports_conditional_breakpoints): Remove.
3290 (target_supports_hardware_single_step): New macro.
3291 (target_can_do_hardware_single_step): Declare.
3292 * server.c (handle_query): Use target_supports_hardware_single_step
3293 instead of target_supports_conditional_breakpoints.
3294
3295 2015-09-15 Yao Qi <yao.qi@linaro.org>
3296
3297 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3298 function.
3299 (struct linux_target_ops the_low_target): Install
3300 aarch64_linux_siginfo_fixup.
3301
3302 2015-09-11 Don Breazeal <donb@codesourcery.com>
3303 Luis Machado <lgustavo@codesourcery.com>
3304
3305 * linux-low.c (linux_mourn): Static declaration.
3306 (linux_arch_setup): Move in front of
3307 handle_extended_wait.
3308 (linux_arch_setup_thread): New function.
3309 (handle_extended_wait): Handle exec events. Call
3310 linux_arch_setup_thread. Make event_lwp argument a
3311 pointer-to-a-pointer.
3312 (check_zombie_leaders): Do not check stopped threads.
3313 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3314 (linux_low_filter_event): Add lwp and thread for exec'ing
3315 non-leader thread if leader thread has been deleted.
3316 Refactor code into linux_arch_setup_thread and call it.
3317 Pass child lwp pointer by reference to handle_extended_wait.
3318 (linux_wait_for_event_filtered): Update comment.
3319 (linux_wait_1): Prevent clobbering exec event status.
3320 (linux_supports_exec_events): New function.
3321 (linux_target_ops) <supports_exec_events>: Initialize new member.
3322 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3323 new member.
3324 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3325 * server.c (report_exec_events): New global variable.
3326 (handle_query): Handle qSupported query for exec-events feature.
3327 (captured_main): Initialize report_exec_events.
3328 * server.h (report_exec_events): Declare new global variable.
3329 * target.h (struct target_ops) <supports_exec_events>: New
3330 member.
3331 (target_supports_exec_events): New macro.
3332 * win32-low.c (win32_target_ops) <supports_exec_events>:
3333 Initialize new member.
3334
3335 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3336
3337 * linux-low.c (linux_low_enable_btrace): Remove.
3338 (linux_target_ops): Replace linux_low_enable_btrace with
3339 linux_enable_btrace.
3340
3341 2015-09-03 Yao Qi <yao.qi@linaro.org>
3342
3343 * linux-aarch64-low.c (aarch64_insert_point): Call
3344 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3345 returns true.
3346
3347 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3348
3349 * linux-low.c (check_stopped_by_breakpoint): Use
3350 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3351
3352 2015-08-27 Pedro Alves <palves@redhat.com>
3353
3354 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3355
3356 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3357
3358 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3359 the XNEW-family equivalent.
3360 (compile_bytecodes): Likewise.
3361 * dll.c (loaded_dll): Likewise.
3362 * event-loop.c (append_callback_event): Likewise.
3363 (create_file_handler): Likewise.
3364 (create_file_event): Likewise.
3365 * hostio.c (handle_open): Likewise.
3366 * inferiors.c (add_thread): Likewise.
3367 (add_process): Likewise.
3368 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3369 * linux-arm-low.c (arm_new_process): Likewise.
3370 (arm_new_thread): Likewise.
3371 * linux-low.c (add_to_pid_list): Likewise.
3372 (linux_add_process): Likewise.
3373 (handle_extended_wait): Likewise.
3374 (add_lwp): Likewise.
3375 (enqueue_one_deferred_signal): Likewise.
3376 (enqueue_pending_signal): Likewise.
3377 (linux_resume_one_lwp_throw): Likewise.
3378 (linux_resume_one_thread): Likewise.
3379 (linux_read_memory): Likewise.
3380 (linux_write_memory): Likewise.
3381 * linux-mips-low.c (mips_linux_new_process): Likewise.
3382 (mips_linux_new_thread): Likewise.
3383 (mips_add_watchpoint): Likewise.
3384 * linux-x86-low.c (initialize_low_arch): Likewise.
3385 * lynx-low.c (lynx_add_process): Likewise.
3386 * mem-break.c (set_raw_breakpoint_at): Likewise.
3387 (set_breakpoint): Likewise.
3388 (add_condition_to_breakpoint): Likewise.
3389 (add_commands_to_breakpoint): Likewise.
3390 (clone_agent_expr): Likewise.
3391 (clone_one_breakpoint): Likewise.
3392 * regcache.c (new_register_cache): Likewise.
3393 * remote-utils.c (look_up_one_symbol): Likewise.
3394 * server.c (queue_stop_reply): Likewise.
3395 (start_inferior): Likewise.
3396 (queue_stop_reply_callback): Likewise.
3397 (handle_target_event): Likewise.
3398 * spu-low.c (fetch_ppc_memory): Likewise.
3399 (store_ppc_memory): Likewise.
3400 * target.c (set_target_ops): Likewise.
3401 * thread-db.c (thread_db_load_search): Likewise.
3402 (try_thread_db_load_1): Likewise.
3403 * tracepoint.c (add_tracepoint): Likewise.
3404 (add_tracepoint_action): Likewise.
3405 (create_trace_state_variable): Likewise.
3406 (cmd_qtdpsrc): Likewise.
3407 (cmd_qtro): Likewise.
3408 (add_while_stepping_state): Likewise.
3409 * win32-low.c (child_add_thread): Likewise.
3410 (get_image_name): Likewise.
3411
3412 2015-08-25 Yao Qi <yao.qi@linaro.org>
3413
3414 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3415
3416 2015-08-25 Yao Qi <yao.qi@linaro.org>
3417
3418 * Makefile.in (aarch64-linux.o): New rule.
3419 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3420 srv_tgtobj.
3421 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3422 (aarch64_init_debug_reg_state): Make it extern.
3423 (aarch64_linux_prepare_to_resume): Remove.
3424
3425 2015-08-25 Yao Qi <yao.qi@linaro.org>
3426
3427 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3428 lwp_arch_private_info and ptid_of_lwp.
3429
3430 2015-08-25 Yao Qi <yao.qi@linaro.org>
3431
3432 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3433 Find proc_info by find_process_pid. All callers updated.
3434
3435 2015-08-25 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3438 Remove.
3439 (debug_reg_change_callback): Remove.
3440 (aarch64_notify_debug_reg_change): Remove.
3441
3442 2015-08-25 Yao Qi <yao.qi@linaro.org>
3443
3444 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3445 Call current_lwp_ptid.
3446
3447 2015-08-25 Yao Qi <yao.qi@linaro.org>
3448
3449 * linux-aarch64-low.c (debug_reg_change_callback): Use
3450 debug_printf.
3451
3452 2015-08-25 Yao Qi <yao.qi@linaro.org>
3453
3454 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3455
3456 2015-08-25 Yao Qi <yao.qi@linaro.org>
3457
3458 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3459
3460 2015-08-25 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3463 the code.
3464
3465 2015-08-25 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3468 Remove.
3469 (debug_reg_change_callback): Remove argument entry and add argument
3470 lwp. Remove local variable thread. Don't print thread id in the
3471 debugging output. Don't check whether pid of thread equals to pid.
3472 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3473 iterate_over_lwps instead find_inferior.
3474
3475 2015-08-24 Pedro Alves <palves@redhat.com>
3476
3477 * inferiors.c (get_first_process): New function.
3478 * inferiors.h (get_first_process): New declaration.
3479 * remote-utils.c (read_ptid): Default to the first process in the
3480 list, instead of to the current thread's process.
3481
3482 2015-08-24 Pedro Alves <palves@redhat.com>
3483
3484 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3485 * event-loop.c: Likewise.
3486 * remote-utils.c: Likewise.
3487 * tracepoint.c: Likewise.
3488
3489 2015-08-24 Pedro Alves <palves@redhat.com>
3490
3491 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3492 ptid_get_lwp.
3493
3494 2015-08-21 Pedro Alves <palves@redhat.com>
3495
3496 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3497 instead of literal 1.
3498
3499 2015-08-21 Pedro Alves <palves@redhat.com>
3500
3501 * tdesc.c (default_description): Explicitly zero-initialize.
3502
3503 2015-08-21 Pedro Alves <palves@redhat.com>
3504
3505 PR gdb/18749
3506 * inferiors.c (remove_thread): Discard any pending stop reply for
3507 this thread.
3508 * server.c (remove_all_on_match_pid): Rename to ...
3509 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3510 instead of a pid.
3511 (discard_queued_stop_replies): Change parameter to a ptid. Now
3512 extern.
3513 (handle_v_kill, kill_inferior_callback, captured_main)
3514 (process_serial_event): Adjust.
3515 * server.h (discard_queued_stop_replies): Declare.
3516
3517 2015-08-21 Pedro Alves <palves@redhat.com>
3518
3519 * linux-low.c (wait_for_sigstop): Always switch to no thread
3520 selected if the previously current thread dies.
3521 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3522 process instead of the current thread's.
3523 * remote-utils.c (input_interrupt): Don't check if there's no
3524 current thread.
3525 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3526 current thread to the general thread fails, error out.
3527 (handle_qxfer_auxv, handle_qxfer_libraries)
3528 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3529 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3530 (handle_query): Check if there's a thread selected instead of
3531 checking whether there's any thread in the thread list.
3532 (handle_qxfer_threads, handle_qxfer_btrace)
3533 (handle_qxfer_btrace_conf): Don't error out early if there's no
3534 thread in the thread list.
3535 (handle_v_cont, myresume): Don't set the current thread to the
3536 continue thread.
3537 (process_serial_event) <Hg handling>: Also set thread_id if the
3538 previous general thread is still alive.
3539 (process_serial_event) <g/G handling>: If setting the current
3540 thread to the general thread fails, error out.
3541 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3542 thread's lwp instead of the current thread's.
3543 * target.c (set_desired_thread): If the desired thread was not
3544 found, leave the current thread pointing to NULL. Return an int
3545 (boolean) indicating success.
3546 * target.h (set_desired_thread): Change return type to int.
3547
3548 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3549
3550 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3551 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3552 #includes.
3553 (ps_get_thread_area): New function.
3554
3555 2015-08-19 Gary Benson <gbenson@redhat.com>
3556
3557 * hostio.c (handle_pread): Do not attempt to read more data
3558 than hostio_reply_with_data can fit in a packet.
3559
3560 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3561
3562 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3563
3564 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3565
3566 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3567
3568 2015-08-06 Pedro Alves <palves@redhat.com>
3569
3570 * tracepoint.c (expr_eval_result): Now an int.
3571
3572 2015-08-06 Pedro Alves <palves@redhat.com>
3573
3574 * gdbthread.h (struct regcache): Forward declare.
3575 (struct thread_info) <regcache_data>: Now a struct regcache
3576 pointer.
3577 * inferiors.c (inferior_regcache_data)
3578 (set_inferior_regcache_data): Now work with struct regcache
3579 pointers.
3580 * inferiors.h (struct regcache): Forward declare.
3581 (inferior_regcache_data, set_inferior_regcache_data): Now work
3582 with struct regcache pointers.
3583 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3584 (free_register_cache_thread): Remove struct regcache pointer
3585 casts.
3586
3587 2015-08-06 Pedro Alves <palves@redhat.com>
3588
3589 * server.c (captured_main): On error, print the exception message
3590 to stderr, and if run_once is set, throw a quit.
3591
3592 2015-08-06 Pedro Alves <palves@redhat.com>
3593
3594 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3595 the current thread.
3596
3597 2015-08-06 Pedro Alves <palves@redhat.com>
3598
3599 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3600 reading beyond the passed in buffer length.
3601
3602 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3603
3604 * tracepoint.c (symbol_list) <required>: Remove.
3605
3606 2015-08-06 Pedro Alves <palves@redhat.com>
3607
3608 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3609 count if stopping and suspending threads.
3610 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3611 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3612 (linux_detach): Complete an ongoing step-over.
3613 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3614 throughout.
3615 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3616 (linux_wait_1): If passing a signal to the inferior after
3617 finishing a step-over, unsuspend and re-resume all lwps. If we
3618 see a single-step event but the thread should be continuing, don't
3619 pass the trap to gdb.
3620 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3621 internal_error instead of gdb_assert.
3622 (enqueue_pending_signal): New function.
3623 (check_ptrace_stopped_lwp_gone): Add debug output.
3624 (start_step_over): Use internal_error instead of gdb_assert.
3625 (complete_ongoing_step_over): New function.
3626 (linux_resume_one_thread): Don't resume a suspended thread.
3627 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3628 it stepping.
3629
3630 2015-08-06 Pedro Alves <palves@redhat.com>
3631
3632 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3633 (linux_thread_alive): Use lwp_is_marked_dead.
3634 (extended_event_reported): Delete.
3635 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3636 instead of extended_event_reported.
3637 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3638 as well.
3639 (lwp_is_marked_dead): New function.
3640 (lwp_running): Use lwp_is_marked_dead.
3641 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3642 comment.
3643
3644 2015-08-06 Pedro Alves <palves@redhat.com>
3645
3646 * linux-low.c (linux_wait_1): Move fork event output out of the
3647 !report_to_gdb check. Pass event_child->waitstatus to
3648 target_waitstatus_to_string instead of ourstatus.
3649
3650 2015-08-04 Yao Qi <yao.qi@linaro.org>
3651
3652 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3653 if current_thread is 32 bit.
3654
3655 2015-08-04 Yao Qi <yao.qi@linaro.org>
3656
3657 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3658 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3659 * server.c (extended_protocol): Remove "static".
3660 * server.h (extended_protocol): Declare it.
3661
3662 2015-08-04 Yao Qi <yao.qi@linaro.org>
3663
3664 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3665 both aarch64 and aarch32.
3666 (aarch64_set_pc): Likewise.
3667
3668 2015-08-04 Yao Qi <yao.qi@linaro.org>
3669
3670 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3671 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3672 arm-with-neon.xml to srv_xmlfiles.
3673 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3674 (is_64bit_tdesc): New function.
3675 (aarch64_linux_read_description): New function.
3676 (aarch64_arch_setup): Call aarch64_linux_read_description.
3677 (regs_info): Rename to regs_info_aarch64.
3678 (aarch64_regs_info): Return right regs_info.
3679 (initialize_low_arch): Call initialize_low_arch_aarch32.
3680
3681 2015-08-04 Yao Qi <yao.qi@linaro.org>
3682
3683 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3684 * linux-aarch32-low.c: New file.
3685 * linux-aarch32-low.h: New file.
3686 * linux-arm-low.c (arm_fill_gregset): Move it to
3687 linux-aarch32-low.c.
3688 (arm_store_gregset): Likewise.
3689 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3690 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3691 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3692 (regs_info): Rename to regs_info_arm.
3693 (arm_regs_info): Return regs_info_aarch32 if
3694 have_ptrace_getregset is 1 and target description is
3695 arm_with_neon or arm_with_vfpv3.
3696 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3697 Call initialize_low_arch_aarch32 instead.
3698
3699 2015-08-04 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3702 * linux-low.c: ... here.
3703 * linux-low.h (have_ptrace_getregset): Declare it.
3704
3705 2015-08-04 Pedro Alves <palves@redhat.com>
3706
3707 * thread-db.c (struct thread_db): Use new typedefs.
3708 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3709 CHK calls.
3710 (disable_thread_event_reporting): Cast result of dlsym to
3711 destination function pointer type.
3712 (thread_db_mourn): Use td_ta_delete_ftype.
3713
3714 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3715
3716 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3717 arch variant.
3718 (CDX_BREAKPOINT): Define for R2.
3719 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3720 (the_low_target): Add comments.
3721
3722 2015-07-30 Yao Qi <yao.qi@linaro.org>
3723
3724 * linux-arm-low.c (arm_hwcap): Remove it.
3725 (arm_read_description): New local variable arm_hwcap. Don't
3726 set arm_hwcap to zero.
3727
3728 2015-07-30 Yao Qi <yao.qi@linaro.org>
3729
3730 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3731 Use regcache->tdesc instead.
3732 (arm_store_wmmxregset): Likewise.
3733 (arm_fill_vfpregset): Likewise.
3734 (arm_store_vfpregset): Likewise.
3735
3736 2015-07-30 Yao Qi <yao.qi@linaro.org>
3737
3738 * linux-arm-low.c: Include arch/arm.h.
3739 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3740 (arm_store_gregset): Likewise.
3741
3742 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3743
3744 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3745 ptrace's 4th parameter.
3746
3747 2015-07-27 Yao Qi <yao.qi@linaro.org>
3748
3749 * configure.srv (case aarch64*-*-linux*): Don't set
3750 srv_linux_usrregs.
3751
3752 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3753
3754 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3755 sys/ptrace.h.
3756 * linux-arm-low.c: Likewise.
3757 * linux-cris-low.c: Likewise.
3758 * linux-crisv32-low.c: Likewise.
3759 * linux-low.c: Likewise.
3760 * linux-m68k-low.c: Likewise.
3761 * linux-mips-low.c: Likewise.
3762 * linux-nios2-low.c: Likewise.
3763 * linux-s390-low.c: Likewise.
3764 * linux-sparc-low.c: Likewise.
3765 * linux-tic6x-low.c: Likewise.
3766 * linux-tile-low.c: Likewise.
3767 * linux-x86-low.c: Likewise.
3768
3769 2015-07-24 Pedro Alves <palves@redhat.com>
3770
3771 * config.in: Regenerate.
3772 * configure: Regenerate.
3773
3774 2015-07-24 Pedro Alves <palves@redhat.com>
3775
3776 * acinclude.m4: Include ../ptrace.m4.
3777 * configure.ac: Call GDB_AC_PTRACE.
3778 * config.in, configure: Regenerate.
3779
3780 2015-07-24 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-low.c (linux_create_inferior): Remove setting to
3783 proc->priv->new_inferior.
3784 (linux_attach): Likewise.
3785 (linux_low_filter_event): Likewise.
3786 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3787
3788 2015-07-24 Yao Qi <yao.qi@linaro.org>
3789
3790 * linux-low.c (linux_arch_setup): New function.
3791 (linux_low_filter_event): If proc->tdesc is NULL and
3792 proc->attached is true, call the_low_target.arch_setup.
3793 Otherwise, keep status pending, and return.
3794 (linux_resume_one_lwp_throw): Don't call get_pc if
3795 thread->while_stepping isn't NULL. Don't call
3796 get_thread_regcache if proc->tdesc is NULL.
3797 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3798 (linux_target_ops): Install arch_setup.
3799 * server.c (start_inferior): Call the_target->arch_setup.
3800 * target.h (struct target_ops) <arch_setup>: New field.
3801 (target_arch_setup): New marco.
3802 * lynx-low.c (lynx_target_ops): Update.
3803 * nto-low.c (nto_target_ops): Update.
3804 * spu-low.c (spu_target_ops): Update.
3805 * win32-low.c (win32_target_ops): Update.
3806
3807 2015-07-24 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-low.c (linux_add_process): Don't set
3810 proc->priv->new_inferior.
3811 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3812 (linux_attach): Likewise.
3813
3814 2015-07-24 Yao Qi <yao.qi@linaro.org>
3815
3816 * server.c (start_inferior): Code refactor.
3817
3818 2015-07-24 Yao Qi <yao.qi@linaro.org>
3819
3820 * server.c (process_serial_event): Set general_thread.
3821
3822 2015-07-21 Yao Qi <yao.qi@linaro.org>
3823
3824 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3825 aarch64_linux_get_debug_reg_capacity.
3826
3827 2015-07-17 Yao Qi <yao.qi@linaro.org>
3828
3829 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3830 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3831 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3832 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3833 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3834 (AARCH64_HWP_ALIGNMENT): Likewise.
3835 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3836 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3837 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3838 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3839 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3840 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3841 (struct aarch64_debug_reg_state): Likewise.
3842 (struct arch_lwp_info): Likewise.
3843 (aarch64_align_watchpoint): Likewise.
3844 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3845 (aarch64_watchpoint_length): Likewise.
3846 (aarch64_point_encode_ctrl_reg): Likewise
3847 (aarch64_point_is_aligned): Likewise.
3848 (aarch64_align_watchpoint): Likewise.
3849 (aarch64_linux_set_debug_regs):
3850 (aarch64_dr_state_insert_one_point): Likewise.
3851 (aarch64_dr_state_remove_one_point): Likewise.
3852 (aarch64_handle_breakpoint): Likewise.
3853 (aarch64_handle_aligned_watchpoint): Likewise.
3854 (aarch64_handle_unaligned_watchpoint): Likewise.
3855 (aarch64_handle_watchpoint): Likewise.
3856
3857 2015-07-17 Yao Qi <yao.qi@linaro.org>
3858
3859 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3860 and don't aarch64_get_debug_reg_state. All callers update.
3861 (aarch64_handle_aligned_watchpoint): Likewise.
3862 (aarch64_handle_unaligned_watchpoint): Likewise.
3863 (aarch64_handle_watchpoint): Likewise.
3864 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3865 (aarch64_remove_point): Likewise.
3866
3867 2015-07-17 Yao Qi <yao.qi@linaro.org>
3868
3869 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3870 debug_printf.
3871 (aarch64_handle_unaligned_watchpoint): Likewise.
3872
3873 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3874
3875 Revert the previous 3 commits:
3876 Move gdb_regex* to common/
3877 Move linux_find_memory_regions_full & co.
3878 gdbserver build-id attribute generator
3879
3880 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3881 Jan Kratochvil <jan.kratochvil@redhat.com>
3882
3883 gdbserver build-id attribute generator.
3884 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3885 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3886 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3887 (find_phdr): New.
3888 (get_dynamic): Use find_pdhr to traverse program headers.
3889 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3890 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3891 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3892 (get_hex_build_id): New.
3893 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3894 to reply XML document.
3895
3896 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3897 Jan Kratochvil <jan.kratochvil@redhat.com>
3898
3899 * target.c: Include target/target-utils.h and fcntl.h.
3900 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3901 (target_fileio_read_stralloc): New functions.
3902
3903 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3904
3905 * Makefile.in (OBS): Add gdb_regex.o.
3906 (gdb_regex.o): New.
3907 * config.in: Rebuilt.
3908 * configure: Rebuilt.
3909
3910 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3911 Jan Kratochvil <jan.kratochvil@redhat.com>
3912
3913 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3914 * Makefile.in (OBS): Add target-utils.o.
3915 (linux-maps.o, target-utils.o): New.
3916 * configure.srv (srv_linux_obj): Add linux-maps.o.
3917
3918 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3919
3920 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3921 function, return 1.
3922 (the_low_target): Install it.
3923
3924 2015-07-14 Pedro Alves <palves@redhat.com>
3925
3926 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3927 Instead, ignore ECHILD, and throw an error for other errnos.
3928
3929 2015-07-10 Pedro Alves <palves@redhat.com>
3930
3931 * event-loop.c (struct callback_event) <data>: Change type to
3932 gdb_client_data instance instead of gdb_client_data pointer.
3933 (append_callback_event): Adjust.
3934
3935 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3936
3937 * linux-aarch64-low.c: Add comments for each linux_target_ops
3938 method. Remove comments already covered in target_ops and
3939 linux_target_ops definitions.
3940 (the_low_target): Add comments for each unimplemented method.
3941
3942 2015-07-09 Yao Qi <yao.qi@linaro.org>
3943
3944 * linux-aarch64-low.c (aarch64_regmap): Remove.
3945 (aarch64_usrregs_info): Remove.
3946 (regs_info): Set field usrregs to NULL.
3947
3948 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3949
3950 * linux-low.c: Include "rsp-low.h"
3951 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3952 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3953 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3954 (handle_btrace_enable_pt): New.
3955 (handle_btrace_general_set): Support "pt".
3956 (handle_btrace_conf_general_set): Support "pt:size".
3957
3958 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3959
3960 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3961 Z_PACKET_SW_BP.
3962
3963 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3964
3965 * linux-aarch64-low.c: Remove comment about endianness.
3966 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3967 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3968 memcmp.
3969
3970 2015-06-24 Gary Benson <gbenson@redhat.com>
3971
3972 * linux-i386-ipa.c (stdint.h): Do not include.
3973 * lynx-i386-low.c (stdint.h): Likewise.
3974 * lynx-ppc-low.c (stdint.h): Likewise.
3975 * mem-break.c (stdint.h): Likewise.
3976 * thread-db.c (stdint.h): Likewise.
3977 * tracepoint.c (stdint.h): Likewise.
3978 * win32-low.c (stdint.h): Likewise.
3979
3980 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3981
3982 * server.c (write_qxfer_response): Update call to
3983 remote_escape_output.
3984
3985 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3986 Jan Kratochvil <jan.kratochvil@redhat.com>
3987
3988 Merge multiple hex conversions.
3989 * gdbreplay.c (tohex): Rename to 'fromhex'.
3990 (logchar): Use fromhex.
3991
3992 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3993
3994 * server.c (handle_qxfer_libraries): Set `version' attribute for
3995 <library-list>.
3996
3997 2015-06-10 Gary Benson <gbenson@redhat.com>
3998
3999 * target.h (struct target_ops) <multifs_open>: New field.
4000 <multifs_unlink>: Likewise.
4001 <multifs_readlink>: Likewise.
4002 * linux-low.c (nat/linux-namespaces.h): New include.
4003 (linux_target_ops): Initialize the_target->multifs_open,
4004 the_target->multifs_unlink and the_target->multifs_readlink.
4005 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4006 * hostio.c (hostio_fs_pid): New static variable.
4007 (hostio_handle_new_gdb_connection): New function.
4008 (handle_setfs): Likewise.
4009 (handle_open): Use the_target->multifs_open as appropriate.
4010 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4011 (handle_readlink): Use the_target->multifs_readlink as
4012 appropriate.
4013 (handle_vFile): Handle vFile:setfs packets.
4014 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4015 after target_handle_new_gdb_connection.
4016
4017 2015-06-10 Gary Benson <gbenson@redhat.com>
4018
4019 * configure.ac (AC_CHECK_FUNCS): Add setns.
4020 * config.in: Regenerate.
4021 * configure: Likewise.
4022 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4023 (linux-namespaces.o): New rule.
4024 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4025
4026 2015-06-09 Gary Benson <gbenson@redhat.com>
4027
4028 * hostio.c (handle_open): Process mode argument with
4029 fileio_to_host_mode.
4030
4031 2015-06-01 Yao Qi <yao.qi@linaro.org>
4032
4033 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4034 * linux-x86-low.c: Likewise.
4035
4036 2015-05-28 Don Breazeal <donb@codesourcery.com>
4037
4038 * linux-low.c (handle_extended_wait): Initialize
4039 thread_info.last_resume_kind for new fork children.
4040
4041 2015-05-15 Pedro Alves <palves@redhat.com>
4042
4043 * target.h (target_handle_new_gdb_connection): Rewrite using if
4044 wrapped in do/while.
4045
4046 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4047
4048 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4049 * configure, config.in: Regenerate.
4050 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4051 Declare typedef.
4052
4053 2015-05-12 Don Breazeal <donb@codesourcery.com>
4054
4055 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4056 PTRACE_EVENT_VFORK_DONE.
4057 (linux_low_ptrace_options, extended_event_reported): Add vfork
4058 events.
4059 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4060 and "vforkdone" for RSP 'T' Stop Reply Packet.
4061 * server.h (report_vfork_events): Declare
4062 global variable.
4063
4064 2015-05-12 Don Breazeal <donb@codesourcery.com>
4065
4066 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4067 (the_low_target) <new_fork>: Initialize new member.
4068 * linux-arm-low.c (arm_new_fork): New function.
4069 (the_low_target) <new_fork>: Initialize new member.
4070 * linux-low.c (handle_extended_wait): Call new target function
4071 new_fork.
4072 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4073 * linux-mips-low.c (mips_add_watchpoint): New function
4074 extracted from mips_insert_point.
4075 (the_low_target) <new_fork>: Initialize new member.
4076 (mips_linux_new_fork): New function.
4077 (mips_insert_point): Call mips_add_watchpoint.
4078 * linux-x86-low.c (x86_linux_new_fork): New function.
4079 (the_low_target) <new_fork>: Initialize new member.
4080
4081 2015-05-12 Don Breazeal <donb@codesourcery.com>
4082
4083 * linux-low.c (handle_extended_wait): Implement return value,
4084 rename argument 'event_child' to 'event_lwp', handle
4085 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4086 (linux_low_ptrace_options): New function.
4087 (linux_low_filter_event): Call linux_low_ptrace_options,
4088 use different argument fo linux_enable_event_reporting,
4089 use return value from handle_extended_wait.
4090 (extended_event_reported): New function.
4091 (linux_wait_1): Call extended_event_reported and set
4092 status to report fork events.
4093 (linux_write_memory): Add pid to debug message.
4094 (reset_lwp_ptrace_options_callback): New function.
4095 (linux_handle_new_gdb_connection): New function.
4096 (linux_target_ops): Initialize new structure member.
4097 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4098 * lynx-low.c: Initialize new structure member.
4099 * remote-utils.c (prepare_resume_reply): Implement stop reason
4100 "fork" for "T" stop message.
4101 * server.c (handle_query): Call handle_new_gdb_connection.
4102 * server.h (report_fork_events): Declare global flag.
4103 * target.h (struct target_ops) <handle_new_gdb_connection>:
4104 New member.
4105 (target_handle_new_gdb_connection): New macro.
4106 * win32-low.c: Initialize new structure member.
4107
4108 2015-05-12 Don Breazeal <donb@codesourcery.com>
4109
4110 * mem-break.c (APPEND_TO_LIST): Define macro.
4111 (clone_agent_expr): New function.
4112 (clone_one_breakpoint): New function.
4113 (clone_all_breakpoints): New function.
4114 * mem-break.h: Declare new functions.
4115
4116 2015-05-12 Don Breazeal <donb@codesourcery.com>
4117
4118 * linux-low.c (linux_supports_fork_events): New function.
4119 (linux_supports_vfork_events): New function.
4120 (linux_target_ops): Initialize new structure members.
4121 (initialize_low): Call linux_check_ptrace_features.
4122 * lynx-low.c (lynx_target_ops): Initialize new structure
4123 members.
4124 * server.c (report_fork_events, report_vfork_events):
4125 New global flags.
4126 (handle_query): Add new features to qSupported packet and
4127 response.
4128 (captured_main): Initialize new global variables.
4129 * target.h (struct target_ops) <supports_fork_events>:
4130 New member.
4131 <supports_vfork_events>: New member.
4132 (target_supports_fork_events): New macro.
4133 (target_supports_vfork_events): New macro.
4134 * win32-low.c (win32_target_ops): Initialize new structure
4135 members.
4136
4137 2015-05-12 Gary Benson <gbenson@redhat.com>
4138
4139 * server.c (handle_qxfer_exec_file): Use current process
4140 if annex is empty.
4141
4142 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4143
4144 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4145 Remove HAVE_PTRACE_GETREGS conditionals.
4146 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4147 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4148
4149 2015-05-08 Yao Qi <yao.qi@linaro.org>
4150
4151 * linux-low.c (linux_supports_conditional_breakpoints): New
4152 function.
4153 (linux_target_ops): Install new target method.
4154 * lynx-low.c (lynx_target_ops): Install NULL hook for
4155 supports_conditional_breakpoints.
4156 * nto-low.c (nto_target_ops): Likewise.
4157 * spu-low.c (spu_target_ops): Likewise.
4158 * win32-low.c (win32_target_ops): Likewise.
4159 * server.c (handle_query): Check
4160 target_supports_conditional_breakpoints.
4161 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4162 New field.
4163 (target_supports_conditional_breakpoints): New macro.
4164
4165 2015-05-06 Pedro Alves <palves@redhat.com>
4166
4167 PR server/18081
4168 * server.c (start_inferior): If the process exits, mourn it.
4169
4170 2015-04-21 Gary Benson <gbenson@redhat.com>
4171
4172 * hostio.c (fileio_open_flags_to_host): Factored out to
4173 fileio_to_host_openflags in common/fileio.c. Single use
4174 updated.
4175
4176 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4177
4178 * linux-xtensa-low.c (xtensa_fill_gregset)
4179 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4180 XCHAL_HAVE_LOOP.
4181
4182 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4183
4184 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4185 (regs_info): Replace usrregs pointer with NULL.
4186
4187 2015-04-17 Gary Benson <gbenson@redhat.com>
4188
4189 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4190 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4191 * server.c (handle_qxfer_exec_file): New function.
4192 (qxfer_packets): Add exec-file entry.
4193 (handle_query): Report qXfer:exec-file:read as supported packet.
4194
4195 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4196
4197 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4198
4199 2015-04-09 Gary Benson <gbenson@redhat.com>
4200
4201 * hostio-errno.c (errno_to_fileio_error): Remove function.
4202 Update caller to use remote_fileio_to_fio_error.
4203
4204 2015-04-09 Yao Qi <yao.qi@linaro.org>
4205
4206 * linux-low.c (linux_insert_point): Call
4207 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4208 (linux_remove_point): Call remove_memory_breakpoint if type is
4209 raw_bkpt_type_sw.
4210 * linux-x86-low.c (x86_insert_point): Don't call
4211 insert_memory_breakpoint.
4212 (x86_remove_point): Don't call remove_memory_breakpoint.
4213
4214 2015-04-01 Pedro Alves <palves@redhat.com>
4215 Cleber Rosa <crosa@redhat.com>
4216
4217 * server.c (gdbserver_usage): Reorganize and extend the usage
4218 message.
4219
4220 2015-03-24 Pedro Alves <palves@redhat.com>
4221
4222 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4223 output. Also dump TRAP_TRACE.
4224 (linux_low_filter_event): In debug output, distinguish a
4225 resume_stop SIGSTOP from a delayed SIGSTOP.
4226
4227 2015-03-24 Gary Benson <gbenson@redhat.com>
4228
4229 * linux-x86-low.c (x86_linux_new_thread): Moved to
4230 nat/x86-linux.c.
4231 (x86_linux_prepare_to_resume): Likewise.
4232
4233 2015-03-24 Gary Benson <gbenson@redhat.com>
4234
4235 * Makefile.in (x86-linux-dregs.o): New rule.
4236 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4237 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4238 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4239 (x86_linux_dr_get): Likewise.
4240 (x86_linux_dr_set): Likewise.
4241 (update_debug_registers_callback): Likewise.
4242 (x86_linux_dr_set_addr): Likewise.
4243 (x86_linux_dr_get_addr): Likewise.
4244 (x86_linux_dr_set_control): Likewise.
4245 (x86_linux_dr_get_control): Likewise.
4246 (x86_linux_dr_get_status): Likewise.
4247 (x86_linux_update_debug_registers): Likewise.
4248
4249 2015-03-24 Gary Benson <gbenson@redhat.com>
4250
4251 * linux-x86-low.c (x86_linux_update_debug_registers):
4252 New function, factored out from...
4253 (x86_linux_prepare_to_resume): ...this.
4254
4255 2015-03-24 Gary Benson <gbenson@redhat.com>
4256
4257 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4258 (x86_linux_dr_set): Likewise.
4259 (update_debug_registers_callback): Likewise.
4260 (x86_linux_dr_set_addr): Likewise.
4261 (x86_linux_dr_get_addr): Likewise.
4262 (x86_linux_dr_set_control): Likewise.
4263 (x86_linux_dr_get_control): Likewise.
4264 (x86_linux_dr_get_status): Likewise.
4265 (x86_linux_prepare_to_resume): Likewise.
4266
4267 2015-03-24 Gary Benson <gbenson@redhat.com>
4268
4269 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4270 Use perror_with_name. Pass string through gettext.
4271 (x86_linux_dr_set): Likewise.
4272
4273 2015-03-24 Gary Benson <gbenson@redhat.com>
4274
4275 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4276 (x86_linux_dr_set_addr): ...this.
4277 (x86_dr_low_get_addr): Rename to...
4278 (x86_linux_dr_get_addr): ...this.
4279 (x86_dr_low_set_control): Rename to...
4280 (x86_linux_dr_set_control): ...this.
4281 (x86_dr_low_get_control): Rename to...
4282 (x86_linux_dr_get_control): ...this.
4283 (x86_dr_low_get_status): Rename to...
4284 (x86_linux_dr_get_status): ...this.
4285 (x86_dr_low): Update with new function names.
4286
4287 2015-03-24 Gary Benson <gbenson@redhat.com>
4288
4289 * Makefile.in (x86-linux.o): New rule.
4290 * configure.srv: Add x86-linux.o to relevant targets.
4291 * linux-low.c (lwp_set_arch_private_info): New function.
4292 (lwp_arch_private_info): Likewise.
4293 * linux-x86-low.c: Include nat/x86-linux.h.
4294 (arch_lwp_info): Removed structure.
4295 (update_debug_registers_callback):
4296 Use lwp_set_debug_registers_changed.
4297 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4298 and lwp_set_debug_registers_changed.
4299 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4300
4301 2015-03-24 Gary Benson <gbenson@redhat.com>
4302
4303 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4304 * linux-arm-low.c (arm_new_thread): Likewise.
4305 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4306 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4307 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4308 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4309
4310 2015-03-24 Gary Benson <gbenson@redhat.com>
4311
4312 * linux-low.c (ptid_of_lwp): New function.
4313 (lwp_is_stopped): Likewise.
4314 (lwp_stop_reason): Likewise.
4315 * linux-x86-low.c (update_debug_registers_callback):
4316 Use lwp_is_stopped.
4317 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4318 lwp_stop_reason.
4319
4320 2015-03-24 Gary Benson <gbenson@redhat.com>
4321
4322 * linux-low.h (linux_stop_lwp): Remove declaration.
4323
4324 2015-03-24 Gary Benson <gbenson@redhat.com>
4325
4326 * linux-low.h: Include nat/linux-nat.h.
4327 * linux-low.c (iterate_over_lwps_args): New structure.
4328 (iterate_over_lwps_filter): New function.
4329 (iterate_over_lwps): Likewise.
4330 * linux-x86-low.c (update_debug_registers_callback):
4331 Update signature to what iterate_over_lwps expects.
4332 Remove PID check that iterate_over_lwps now performs.
4333 (x86_dr_low_set_addr): Use iterate_over_lwps.
4334 (x86_dr_low_set_control): Likewise.
4335
4336 2015-03-24 Gary Benson <gbenson@redhat.com>
4337
4338 * linux-x86-low.c (x86_debug_reg_state): New function.
4339 (x86_linux_prepare_to_resume): Use the above.
4340
4341 2015-03-24 Gary Benson <gbenson@redhat.com>
4342
4343 * linux-low.c (current_lwp_ptid): New function.
4344 * linux-x86-low.c: Include nat/linux-nat.h.
4345 (x86_dr_low_get_addr): Use current_lwp_ptid.
4346 (x86_dr_low_get_control): Likewise.
4347 (x86_dr_low_get_status): Likewise.
4348
4349 2015-03-20 Pedro Alves <palves@redhat.com>
4350
4351 * tracepoint.c (cmd_qtstatus): Make "str" const.
4352
4353 2015-03-20 Pedro Alves <palves@redhat.com>
4354
4355 * server.c (handle_general_set): Make "req_str" const.
4356
4357 2015-03-19 Pedro Alves <palves@redhat.com>
4358
4359 * linux-low.c (linux_resume_one_lwp): Rename to ...
4360 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4361 instead call perror_with_name.
4362 (check_ptrace_stopped_lwp_gone): New function.
4363 (linux_resume_one_lwp): Reimplement as wrapper around
4364 linux_resume_one_lwp_throw that swallows errors if the LWP is
4365 gone.
4366
4367 2015-03-19 Pedro Alves <palves@redhat.com>
4368
4369 * linux-low.c (count_events_callback, select_event_lwp_callback):
4370 No longer check whether the thread has resume_stop as last resume
4371 kind.
4372
4373 2015-03-19 Pedro Alves <palves@redhat.com>
4374
4375 * linux-low.c (count_events_callback, select_event_lwp_callback):
4376 Use the lwp's status_pending_p field, not the thread's.
4377
4378 2015-03-19 Pedro Alves <palves@redhat.com>
4379
4380 * linux-low.c (select_event_lwp_callback): Update comments to
4381 no longer mention SIGTRAP.
4382
4383 2015-03-18 Gary Benson <gbenson@redhat.com>
4384
4385 * server.c (handle_query): Do not report vFile:fstat as supported.
4386
4387 2015-03-11 Gary Benson <gbenson@redhat.com>
4388
4389 * hostio.c (sys/types.h): New include.
4390 (sys/stat.h): Likewise.
4391 (common-remote-fileio.h): Likewise.
4392 (handle_fstat): New function.
4393 (handle_vFile): Handle vFile:fstat packets.
4394
4395 2015-03-11 Gary Benson <gbenson@redhat.com>
4396
4397 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4398 struct stat.st_blocks and struct stat.st_blksize.
4399 * configure: Regenerate.
4400 * config.in: Likewise.
4401 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4402 (OBS): Add common-remote-fileio.o.
4403 (common-remote-fileio.o): New rule.
4404
4405 2015-03-09 Pedro Alves <palves@redhat.com>
4406
4407 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4408 'struct sockaddr' pointer in 'accept' call.
4409
4410 2015-03-09 Pedro Alves <palves@redhat.com>
4411
4412 Revert:
4413 2015-03-07 Pedro Alves <palves@redhat.com>
4414 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4415 or <winsock2.h> here. Instead include "gdb_socket.h".
4416 (remote_open): Use union gdb_sockaddr_u.
4417 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4418 or <winsock2.h> here. Instead include "gdb_socket.h".
4419 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4420 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4421 or <sys/un.h>.
4422 (init_named_socket, gdb_agent_helper_thread): Use union
4423 gdb_sockaddr_u.
4424
4425 2015-03-07 Pedro Alves <palves@redhat.com>
4426
4427 * configure.ac (build_warnings): Move
4428 -Wdeclaration-after-statement to the C-specific set.
4429 * configure: Regenerate.
4430
4431 2015-03-07 Pedro Alves <palves@redhat.com>
4432
4433 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4434 or <winsock2.h> here. Instead include "gdb_socket.h".
4435 (remote_open): Use union gdb_sockaddr_u.
4436 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4437 or <winsock2.h> here. Instead include "gdb_socket.h".
4438 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4439 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4440 or <sys/un.h>.
4441 (init_named_socket, gdb_agent_helper_thread): Use union
4442 gdb_sockaddr_u.
4443
4444 2015-03-07 Pedro Alves <palves@redhat.com>
4445
4446 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4447 instead.
4448
4449 2015-03-06 Yao Qi <yao.qi@linaro.org>
4450
4451 * linux-aarch64-low.c (aarch64_insert_point): Use
4452 show_debug_regs as a boolean.
4453 (aarch64_remove_point): Likewise.
4454
4455 2015-03-05 Pedro Alves <palves@redhat.com>
4456
4457 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4458 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4459 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4460 * nto-low.c (nto_target_ops): Likewise.
4461 * spu-low.c (spu_target_ops): Likewise.
4462 * win32-low.c (win32_target_ops): Likewise.
4463
4464 2015-03-04 Pedro Alves <palves@redhat.com>
4465
4466 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4467 Decide whether a breakpoint triggered based on the SIGTRAP's
4468 siginfo.si_code.
4469 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4470 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4471 (linux_low_filter_event): Check for breakpoints before checking
4472 watchpoints.
4473 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4474 siginfo.si_code.
4475 (linux_stopped_by_sw_breakpoint)
4476 (linux_supports_stopped_by_sw_breakpoint)
4477 (linux_stopped_by_hw_breakpoint)
4478 (linux_supports_stopped_by_hw_breakpoint): New functions.
4479 (linux_target_ops): Install new target methods.
4480
4481 2015-03-04 Pedro Alves <palves@redhat.com>
4482
4483 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4484 * server.c (swbreak_feature, hwbreak_feature): New globals.
4485 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4486 (captured_main): Clear swbreak_feature and hwbreak_feature.
4487 * server.h (swbreak_feature, hwbreak_feature): Declare.
4488 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4489 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4490 supports_stopped_by_hw_breakpoint>: New fields.
4491 (target_supports_stopped_by_sw_breakpoint)
4492 (target_stopped_by_sw_breakpoint)
4493 (target_supports_stopped_by_hw_breakpoint)
4494 (target_stopped_by_hw_breakpoint): Declare.
4495
4496 2015-03-04 Pedro Alves <palves@redhat.com>
4497
4498 enum lwp_stop_reason -> enum target_stop_reason
4499 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4500 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4501 (linux_wait_1, stuck_in_jump_pad_callback)
4502 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4503 (linux_stopped_by_watchpoint):
4504 * linux-low.h (enum lwp_stop_reason): Delete.
4505 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4506 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4507
4508 2015-03-04 Yao Qi <yao.qi@linaro.org>
4509
4510 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4511
4512 2015-03-03 Gary Benson <gbenson@redhat.com>
4513
4514 * hostio.c (handle_vFile): Fix prefix lengths.
4515
4516 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4517
4518 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4519 ptr_bits.
4520
4521 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4522
4523 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4524 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4525 (clean): Add "rm -f" for above C files.
4526 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4527 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4528 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4529 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4530 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4531 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4532 (init_registers_s390x_vx_linux64)
4533 (init_registers_s390x_tevx_linux64)
4534 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4535 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4536 declarations.
4537 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4538 (s390_store_vxrs_high): New functions.
4539 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4540 NT_S390_VXRS_HIGH.
4541 (s390_arch_setup): Add logic for selecting one of the new target
4542 descriptions. Activate the new vector regsets if applicable.
4543 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4544 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4545 and init_registers_s390x_tevx_linux64.
4546
4547 2015-03-01 Pedro Alves <palves@redhat.com>
4548
4549 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4550 parameter.
4551
4552 2015-02-27 Pedro Alves <palves@redhat.com>
4553
4554 * linux-x86-low.c (u_debugreg_offset): New function.
4555 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4556
4557 2015-02-27 Pedro Alves <palves@redhat.com>
4558
4559 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4560 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4561 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4562 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4563 (ps_lsetfpregs, ps_getpid)
4564 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4565 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4566 (ps_lsetxregs, ps_plog): Declare.
4567
4568 2015-02-27 Pedro Alves <palves@redhat.com>
4569
4570 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4571 IP_AGENT_EXPORT_FUNC.
4572 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4573 IP_AGENT_EXPORT_FUNC.
4574 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4575 (IP_AGENT_EXPORT): Delete.
4576 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4577 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4578 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4579 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4580 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4581 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4582 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4583 (traceframe_read_count, traceframe_write_count)
4584 (traceframes_created, trace_state_variables, get_raw_reg)
4585 (get_trace_state_variable_value, set_trace_state_variable_value)
4586 (ust_loaded, helper_thread_id, cmd_buf): Use
4587 IPA_SYM_EXPORTED_NAME.
4588 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4589 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4590 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4591 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4592 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4593 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4594 EXTERN_C_PUSH/EXTERN_C_POP.
4595 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4596 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4597 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4598 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4599 (traceframe_write_count, traceframe_read_count)
4600 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4601 (about_to_request_buffer_space, get_trace_state_variable_value)
4602 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4603 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4604 EXTERN_C_PUSH/EXTERN_C_POP.
4605 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4606 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4607 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4608 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4609 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4610 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4611 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4612 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4613 Define.
4614 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4615 (IP_AGENT_EXPORT_VAR_DECL): Define.
4616 (tracing): Declare.
4617 (gdb_agent_get_raw_reg): Declare.
4618
4619 2015-02-27 Tom Tromey <tromey@redhat.com>
4620 Pedro Alves <palves@redhat.com>
4621
4622 Rename symbols whose names are reserved C++ keywords throughout.
4623
4624 2015-02-27 Pedro Alves <palves@redhat.com>
4625
4626 * Makefile.in (COMPILER): New, get it from autoconf.
4627 (CXX): Get from autoconf instead.
4628 (COMPILE.pre): Use COMPILER.
4629 (CC-LD): Rename to ...
4630 (CC_LD): ... this. Use COMPILER.
4631 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4632 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4633 * acinclude.m4: Include build-with-cxx.m4.
4634 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4635 Disable -Werror by default if building in C++ mode.
4636 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4637 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4638 the C++ compiler. Save/restore CXXFLAGS too.
4639 * configure: Regenerate.
4640
4641 2015-02-27 Pedro Alves <palves@redhat.com>
4642
4643 * acinclude.m4: Include libiberty.m4.
4644 * configure.ac: Call libiberty_INIT.
4645 * config.in, configure: Regenerate.
4646
4647 2015-02-26 Pedro Alves <palves@redhat.com>
4648
4649 * linux-low.c (linux_wait_1): When incrementing the PC past a
4650 program breakpoint always use the_low_target.breakpoint_len as
4651 increment, rather than the maximum between that and
4652 the_low_target.decr_pc_after_break.
4653
4654 2015-02-23 Pedro Alves <palves@redhat.com>
4655
4656 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4657 thread was doing a step-over; always adjust the PC if
4658 we stepped over a permanent breakpoint.
4659 (linux_wait_1): If we stepped over breakpoint that was on top of a
4660 permanent breakpoint, manually advance the PC past it.
4661
4662 2015-02-23 Pedro Alves <palves@redhat.com>
4663
4664 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4665 modes.
4666 (x86_fill_gregset, x86_store_gregset): Use it when handling
4667 $orig_eax.
4668
4669 2015-02-20 Pedro Alves <palves@redhat.com>
4670
4671 * thread-db.c: Include "nat/linux-procfs.h".
4672 (thread_db_init): Skip listing new threads if the kernel supports
4673 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4674
4675 2015-02-20 Pedro Alves <palves@redhat.com>
4676
4677 * linux-low.c (status_pending_p_callback): Use ptid_match.
4678
4679 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4680
4681 PR breakpoints/16812
4682 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4683 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4684 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4685
4686 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4687
4688 PR breakpoints/15956
4689 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4690
4691 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4692
4693 * linux-low.c (linux_low_btrace_conf): Print size.
4694 * server.c (handle_btrace_conf_general_set): New.
4695 (hanle_general_set): Call handle_btrace_conf_general_set.
4696 (handle_query): Report Qbtrace-conf:bts:size as supported.
4697
4698 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4699
4700 * linux-low.c (linux_low_enable_btrace): Update parameters.
4701 (linux_low_btrace_conf): New.
4702 (linux_target_ops)<to_btrace_conf>: Initialize.
4703 * server.c (current_btrace_conf): New.
4704 (handle_btrace_enable): Rename to ...
4705 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4706 to target_enable_btrace. Update comment. Update users.
4707 (handle_qxfer_btrace_conf): New.
4708 (qxfer_packets): Add btrace-conf entry.
4709 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4710 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4711 (target_ops)<read_btrace_conf>: New.
4712 (target_enable_btrace): Update parameters.
4713 (target_read_btrace_conf): New.
4714
4715 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4716
4717 * server.c (handle_btrace_general_set): Remove call to
4718 target_supports_btrace.
4719 (supported_btrace_packets): New.
4720 (handle_query): Call supported_btrace_packets.
4721 * target.h: include btrace-common.h.
4722 (btrace_target_info): Removed.
4723 (supports_btrace, target_supports_btrace): Update parameters.
4724
4725 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4726
4727 * Makefile.in (SFILES): Add common/btrace-common.c.
4728 (OBS): Add common/btrace-common.o.
4729 (btrace-common.o): Add build rules.
4730 * linux-low: Include btrace-common.h.
4731 (linux_low_read_btrace): Use struct btrace_data. Call
4732 btrace_data_init and btrace_data_fini.
4733
4734 2015-02-06 Pedro Alves <palves@redhat.com>
4735
4736 * thread-db.c (find_new_threads_callback): Add debug output.
4737
4738 2015-02-04 Pedro Alves <palves@redhat.com>
4739
4740 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4741 (resume_stopped_resumed_lwps): New function.
4742 (linux_wait_for_event_filtered): Use it.
4743
4744 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4745
4746 * Makefile.in (SFILES): Add linux-personality.c.
4747 (linux-personality.o): New rule.
4748 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4749 list of objects to be built.
4750 * linux-low.c: Include nat/linux-personality.h.
4751 (linux_create_inferior): Remove code to disable address space
4752 randomization (moved to ../nat/linux-personality.c). Create
4753 cleanup to disable address space randomization.
4754
4755 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4756
4757 * Makefile.in (posix-strerror.o): New rule.
4758 (mingw-strerror.o): Likewise.
4759 * configure: Regenerated.
4760 * configure.ac: Source file ../common/common.host. Initialize new
4761 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4762
4763 2015-01-14 Yao Qi <yao@codesourcery.com>
4764
4765 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4766 (ppc-linux.o): New rule.
4767 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4768 * configure.ac: AC_CHECK_FUNCS(getauxval).
4769 * config.in: Re-generated.
4770 * configure: Re-generated.
4771 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4772 ppc64_64bit_inferior_p
4773
4774 2015-01-14 Yao Qi <yao@codesourcery.com>
4775
4776 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4777 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4778 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4779 (PT_ORIG_R3, PT_TRAP): Likewise.
4780 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4781 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4782 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4783
4784 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4785
4786 * i387-fp.c (i387_cache_to_xsave): In look over
4787 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4788 zmmh_low_space field by use of zmmh_high_space.
4789
4790 2015-01-09 Pedro Alves <palves@redhat.com>
4791
4792 * linux-low.c (step_over_bkpt): Move higher up in the file.
4793 (handle_extended_wait): Don't store the stop_pc here.
4794 (get_stop_pc): Adjust comments and rename to ...
4795 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4796 stopped for a software breakpoint or hardware breakpoint.
4797 (thread_still_has_status_pending_p): New function.
4798 (status_pending_p_callback): Use
4799 thread_still_has_status_pending_p. If the event is no longer
4800 interesting, resume the LWP.
4801 (handle_tracepoints): Add assert.
4802 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4803 (wstatus_maybe_breakpoint): New function.
4804 (cancel_breakpoint): Delete function.
4805 (check_stopped_by_watchpoint): New function, factored out from
4806 linux_low_filter_event.
4807 (lp_status_maybe_breakpoint): Delete function.
4808 (linux_low_filter_event): Remove filter_ptid argument.
4809 Leave thread group exits pending here. Store the LWP's stop PC.
4810 Always leave events pending.
4811 (linux_wait_for_event_filtered): Pull all events out of the
4812 kernel, and leave them all pending.
4813 (count_events_callback, select_event_lwp_callback): Consider all
4814 events.
4815 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4816 (select_event_lwp): Only give preference to the stepping LWP in
4817 all-stop mode. Adjust comments.
4818 (ignore_event): New function.
4819 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4820 references to cancel_breakpoints. Adjust to renames. Also give
4821 equal priority to all LWPs that have had events in non-stop mode.
4822 If reporting a software breakpoint event, unadjust the LWP's PC.
4823 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4824 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4825 Adjust.
4826 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4827 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4828 (linux_stopped_by_watchpoint): Adjust.
4829 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4830 * linux-low.h (enum lwp_stop_reason): New.
4831 (struct lwp_info) <stop_pc>: Adjust comment.
4832 <stopped_by_watchpoint>: Delete field.
4833 <stop_reason>: New field.
4834 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4835 * mem-break.c (software_breakpoint_inserted_here)
4836 (hardware_breakpoint_inserted_here): New function.
4837 * mem-break.h (software_breakpoint_inserted_here)
4838 (hardware_breakpoint_inserted_here): Declare.
4839 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4840 (cancel_breakpoints): Delete.
4841 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4842 (upload_fast_traceframes): Remove references to
4843 cancel_breakpoints.
4844
4845 2015-01-09 Pedro Alves <palves@redhat.com>
4846
4847 * thread-db.c (find_new_threads_callback): Ignore thread if the
4848 kernel thread ID is -1.
4849
4850 2015-01-09 Pedro Alves <palves@redhat.com>
4851
4852 * linux-low.c (linux_attach_fail_reason_string): Move to
4853 nat/linux-ptrace.c, and rename.
4854 (linux_attach_lwp): Update comment.
4855 (attach_proc_task_lwp_callback): New function.
4856 (linux_attach): Adjust to rename and use
4857 linux_proc_attach_tgid_threads.
4858 (linux_attach_fail_reason_string): Delete declaration.
4859
4860 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4861
4862 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4863 * server.c (gdbserver_version): Likewise.
4864
4865 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4866
4867 * remote-utils.c: Include ctype.h.
4868 (input_interrupt): Explicitly handle the case when the char
4869 received is the NUL byte. Improve the printing of non-ASCII
4870 characters.
4871
4872 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4873
4874 * linux-low.c (linux_low_filter_event): Update call to
4875 linux_enable_event_reporting following the addition of
4876 a new parameter to that function.
4877
4878 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4879
4880 PR server/17457
4881 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4882 (AARCH64_FPCR_REGNO): Likewise.
4883 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4884 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4885 (aarch64_store_fpregset): Likewise.
4886
4887 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4888
4889 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4890 Remove FIXME comment about assumption about N.
4891
4892 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4893
4894 * configure.ac: If large-file support is disabled in GDBserver,
4895 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4896 * configure: Regenerate.
4897
4898 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4899
4900 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4901 warning upon ENODATA from ptrace.
4902 * linux-s390-low.c (s390_store_tdb): New.
4903 (s390_regsets): Add regset for NT_S390_TDB.
4904
4905 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4906
4907 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4908 without a fill_function.
4909 * linux-s390-low.c (s390_fill_last_break): Remove.
4910 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4911 (s390_arch_setup): Use regset's size instead of fill_function for
4912 loop end condition.
4913
4914 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4915
4916 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4917 the regset's store function when ptrace returned an error.
4918 * regcache.c (get_thread_regcache): Invalidate register cache
4919 before fetching inferior's registers.
4920
4921 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4922
4923 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4924 while-loop as for-loop.
4925 (regsets_store_inferior_registers): Likewise.
4926
4927 2014-11-28 Yao Qi <yao@codesourcery.com>
4928
4929 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4930 * config.in, configure: Re-generate.
4931 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4932 is defined.
4933
4934 2014-11-21 Yao Qi <yao@codesourcery.com>
4935
4936 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4937 (AC_CHECK_HEADERS): Remove malloc.h.
4938 * configure: Re-generated.
4939 * config.in: Re-generated.
4940 * server.h: Don't include alloca.h and malloc.h.
4941 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4942 Don't include malloc.h.
4943
4944 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4945
4946 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4947 corresponding ERRNO check in same block.
4948
4949 2014-11-12 Pedro Alves <palves@redhat.com>
4950
4951 * server.c (cont_thread): Update comment.
4952 (start_inferior, attach_inferior): No longer clear cont_thread.
4953 (handle_v_cont): No longer set cont_thread.
4954 (captured_main): Clear cont_thread each time a GDB connects.
4955
4956 2014-11-12 Pedro Alves <palves@redhat.com>
4957
4958 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4959 thread, and don't resume all threads if the Hc thread has exited.
4960
4961 2014-11-12 Pedro Alves <palves@redhat.com>
4962
4963 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4964 the process group instead of to a specific LWP.
4965
4966 2014-10-15 Pedro Alves <palves@redhat.com>
4967
4968 PR server/17487
4969 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4970 parameter.
4971 (arm_set_thread_context): Delete.
4972 (the_low_target): Adjust.
4973 * win32-i386-low.c (debug_registers_changed)
4974 (debug_registers_used): Delete.
4975 (update_debug_registers_callback): New function.
4976 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4977 needing to update their debug registers.
4978 (win32_get_current_dr): New function.
4979 (x86_dr_low_get_addr, x86_dr_low_get_control)
4980 (x86_dr_low_get_status): Fetch the debug register from the thread
4981 record's context.
4982 (i386_initial_stuff): Adjust.
4983 (i386_get_thread_context): Remove current_event parameter. Don't
4984 clear debug_registers_changed nor copy DR values to
4985 debug_reg_state.
4986 (i386_set_thread_context): Delete.
4987 (i386_prepare_to_resume): New function.
4988 (i386_thread_added): Mark the thread as needing to update irs
4989 debug registers.
4990 (the_low_target): Remove i386_set_thread_context and install
4991 i386_prepare_to_resume.
4992 * win32-low.c (win32_get_thread_context): Adjust.
4993 (win32_set_thread_context): Use SetThreadContext
4994 directly.
4995 (win32_prepare_to_resume): New function.
4996 (win32_require_context): New function, factored out from ...
4997 (thread_rec): ... this.
4998 (continue_one_thread): Call win32_prepare_to_resume on each thread
4999 we're about to continue.
5000 (win32_resume): Call win32_prepare_to_resume on the event thread.
5001 * win32-low.h (struct win32_thread_info)
5002 <debug_registers_changed>: New field.
5003 (struct win32_target_ops): Change prototype of set_thread_context,
5004 delete set_thread_context and add prepare_to_resume.
5005 (win32_require_context): New declaration.
5006
5007 2014-10-08 Gary Benson <gbenson@redhat.com>
5008
5009 * server.h: Do not include common-exceptions.h.
5010
5011 2014-10-08 Gary Benson <gbenson@redhat.com>
5012
5013 * server.h: Do not include cleanups.h.
5014
5015 2014-09-30 James Hogan <james.hogan@imgtec.com>
5016
5017 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5018 mips64-dsp-linux.c.
5019
5020 2014-09-23 Yao Qi <yao@codesourcery.com>
5021
5022 * linux-low.c (lp_status_maybe_breakpoint): New function.
5023 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5024 (count_events_callback): Likewise.
5025 (select_event_lwp_callback): Likewise.
5026 (cancel_breakpoints_callback): Likewise.
5027
5028 2014-09-19 Don Breazeal <donb@codesourcery.com>
5029
5030 * linux-low.c (handle_extended_wait): Call
5031 linux_ptrace_get_extended_event.
5032 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5033 linux_is_extended_waitstatus.
5034
5035 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5036
5037 * Makefile.in (CPPFLAGS): Define.
5038 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5039 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5040
5041 2014-09-16 Gary Benson <gbenson@redhat.com>
5042
5043 * inferiors.h (current_inferior): Renamed as...
5044 (current_thread): New variable. All uses updated.
5045 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5046 (maybe_move_out_of_jump_pad): Likewise.
5047 (cancel_breakpoint): Likewise.
5048 (linux_low_filter_event): Likewise.
5049 (wait_for_sigstop): Likewise.
5050 (linux_resume_one_lwp): Likewise.
5051 (need_step_over_p): Likewise.
5052 (start_step_over): Likewise.
5053 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5054 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5055 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5056 and save_inferior as saved_thread.
5057 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5058 saved_thread.
5059 (regcache_invalidate_thread): Likewise.
5060 * remote-utils.c (prepare_resume_reply): Likewise.
5061 * thread-db.c (thread_db_get_tls_address): Likewise.
5062 (disable_thread_event_reporting): Likewise.
5063 (remove_thread_event_breakpoints): Likewise.
5064 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5065 as saved_thread.
5066 * target.h (set_desired_inferior): Renamed as...
5067 (set_desired_thread): New declaration. All uses updated.
5068 * server.c (myresume): Updated comment to reference thread instead
5069 of inferior.
5070 (handle_serial_event): Likewise.
5071 (handle_target_event): Likewise.
5072
5073 2014-09-12 Tom Tromey <tromey@redhat.com>
5074 Gary Benson <gbenson@redhat.com>
5075
5076 * regcache.h: Include common-regcache.h.
5077 (regcache_read_pc): Don't declare.
5078 * regcache.c (get_thread_regcache_for_ptid): New function.
5079
5080 2014-09-11 Tom Tromey <tromey@redhat.com>
5081 Gary Benson <gbenson@redhat.com>
5082
5083 * symbol.c: New file.
5084 * Makefile.in (SFILES): Add symbol.c.
5085 (OBS): Add symbol.o.
5086
5087 2014-09-11 Gary Benson <gbenson@redhat.com>
5088
5089 * target.c (target_stop_ptid, target_continue_ptid): New
5090 functions.
5091
5092 2014-09-11 Tom Tromey <tromey@redhat.com>
5093 Gary Benson <gbenson@redhat.com>
5094
5095 * target.h: Include target/target.h.
5096 * target.c (target_read_memory, target_read_uint32)
5097 (target_write_memory): New functions.
5098
5099 2014-09-11 Gary Benson <gbenson@redhat.com>
5100
5101 * server.h (debug_hw_points): Don't declare.
5102 * server.c (debug_hw_points): Don't define. Replace all uses
5103 with show_debug_regs.
5104 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5105 all uses with show_debug_regs.
5106
5107 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5108
5109 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5110 endianness into account.
5111 (ppc_supply_ptrace_register): Likewise.
5112
5113 2014-09-03 James Hogan <james.hogan@imgtec.com>
5114
5115 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5116 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5117
5118 2014-09-03 Gary Benson <gbenson@redhat.com>
5119
5120 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5121 ALL_DEBUG_ADDRESS_REGISTERS.
5122
5123 2014-09-02 Gary Benson <gbenson@redhat.com>
5124
5125 * i386-low.h: Renamed as...
5126 * x86-low.h: New file. All type, function and variable name
5127 prefixes changed from "i386_" to "x86_". All references updated.
5128 * i386-low.c: Renamed as...
5129 * x86-low.c: New file. All type, function and variable name
5130 prefixes changed from "i386_" to "x86_". All references updated.
5131
5132 2014-09-02 Gary Benson <gbenson@redhat.com>
5133
5134 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5135 (x86_linux_new_thread): Likewise.
5136
5137 2014-08-29 Gary Benson <gbenson@redhat.com>
5138
5139 * server.h (setjmp.h): Do not include.
5140 (toplevel): Do not declare.
5141 (common-exceptions.h): Include.
5142 (cleanups.h): Likewise.
5143 * server.c (toplevel): Do not define.
5144 (exit_code): New static global.
5145 (detach_or_kill_for_exit_cleanup): New function.
5146 (main): New function. Original main renamed to...
5147 (captured_main): New function.
5148 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5149
5150 2014-08-29 Gary Benson <gbenson@redhat.com>
5151
5152 * Makefile.in (SFILES): Add common/common-exceptions.c.
5153 (OBS): Add common-exceptions.o.
5154 (common-exceptions.o): New rule.
5155 * utils.c (prepare_to_throw_exception): New function.
5156
5157 2014-08-29 Gary Benson <gbenson@redhat.com>
5158
5159 * config.in: Regenerate.
5160 * configure: Likewise.
5161
5162 2014-08-29 Gary Benson <gbenson@redhat.com>
5163
5164 * Makefile.in (SFILES): Add common/cleanups.c.
5165 (OBS): cleanups.o.
5166 (cleanups.o): New rule.
5167
5168 2014-08-29 Gary Benson <gbenson@redhat.com>
5169
5170 * utils.c (internal_vwarning): New function.
5171
5172 2014-08-28 Gary Benson <gbenson@redhat.com>
5173
5174 * utils.h (fatal): Remove declaration.
5175 * utils.c (fatal): Remove function.
5176
5177 2014-08-28 Gary Benson <gbenson@redhat.com>
5178
5179 * tracepoint.c (gdb_agent_init): Replace fatal with
5180 perror_with_name.
5181 (initialize_tracepoint): Likewise.
5182
5183 2014-08-28 Gary Benson <gbenson@redhat.com>
5184
5185 * remote-utils.c (remote_prepare): Replace fatal with error.
5186
5187 2014-08-28 Gary Benson <gbenson@redhat.com>
5188
5189 * linux-low.c (linux_async): Replace fatal with warning.
5190 Tidy up and return.
5191 (linux_start_non_stop): Return -1 if linux_async failed.
5192
5193 2014-08-28 Gary Benson <gbenson@redhat.com>
5194
5195 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5196 gdb_assert.
5197 (i386_dr_low_get_addr): Remove vague comment.
5198 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5199 gdb_assert.
5200
5201 2014-08-28 Gary Benson <gbenson@redhat.com>
5202
5203 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5204 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5205 internal_error.
5206 (linux_resume_one_lwp): Likewise.
5207 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5208 gdb_assert.
5209 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5210 with internal_error.
5211 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5212 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5213 (find_register_by_name): Replace fatal with internal_error.
5214 (find_regno): Likewise.
5215 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5216 * thread-db.c (thread_db_create_event): Likewise.
5217 (thread_db_load_search): Likewise.
5218 (try_thread_db_load_1): Likewise.
5219 * tracepoint.c (get_jump_space_head): Replace fatal with
5220 internal_error.
5221 (claim_trampoline_space): Likewise.
5222 (have_fast_tracepoint_trampoline_buffer): Likewise.
5223 (cmd_qtstart): Likewise.
5224 (stop_tracing): Likewise.
5225 (fast_tracepoint_collecting): Likewise.
5226 (target_malloc): Likewise.
5227 (download_tracepoint): Likewise.
5228 (download_trace_state_variables): Replace check with gdb_assert.
5229 (upload_fast_traceframes): Replace fatal with internal_error.
5230
5231 2014-08-19 Tom Tromey <tromey@redhat.com>
5232 Gary Benson <gbenson@redhat.com>
5233
5234 * Makefile.in (SFILES): Add common/common-debug.c.
5235 (OBS): Add common-debug.o.
5236 (common-debug.o): New rule.
5237 * debug.h (debug_printf): Don't declare.
5238 * debug.c (debug_printf): Renamed and rewritten as...
5239 (debug_vprintf): New function.
5240
5241 2014-08-19 Gary Benson <gbenson@redhat.com>
5242
5243 * utils.h: Do not include print-utils.h.
5244
5245 2014-08-19 Tom Tromey <tromey@redhat.com>
5246 Gary Benson <gbenson@redhat.com>
5247
5248 * server.h: Add static assertion.
5249 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5250
5251 2014-08-19 Tom Tromey <tromey@redhat.com>
5252 Gary Benson <gbenson@redhat.com>
5253
5254 * Makefile.in (SFILES): Add common/errors.c.
5255 (OBS): Add errors.o.
5256 (IPA_OBS): Add errors-ipa.o.
5257 (errors.o): New rule.
5258 (errors-ipa.o): Likewise.
5259 * utils.h (perror_with_name, error, warning): Don't declare.
5260 * utils.c (warning): Renamed and rewritten as...
5261 (vwarning): New function.
5262 (error): Renamed and rewritten as...
5263 (verror): New function.
5264 (internal_error): Renamed and rewritten as...
5265 (internal_verror): New function.
5266
5267 2014-08-07 Gary Benson <gbenson@redhat.com>
5268
5269 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5270 * configure: Regenerate.
5271 * config.in: Likewise.
5272 * server.h: Do not include errno.h.
5273 * event-loop.c: Likewise.
5274 * hostio-errno.c: Likewise.
5275 * linux-low.c: Likewise.
5276 * remote-utils.c: Likewise.
5277 * spu-low.c: Likewise.
5278 * utils.c: Likewise.
5279 * gdbreplay.c: Unconditionally include errno.h.
5280
5281 2014-08-07 Gary Benson <gbenson@redhat.com>
5282
5283 * server.h: Do not include string.h.
5284 * event-loop.c: Likewise.
5285 * linux-low.c: Likewise.
5286 * regcache.c: Likewise.
5287 * remote-utils.c: Likewise.
5288 * spu-low.c: Likewise.
5289 * utils.c: Likewise.
5290
5291 2014-08-07 Gary Benson <gbenson@redhat.com>
5292
5293 * server.h: Do not include gdb_assert.h.
5294
5295 2014-08-07 Gary Benson <gbenson@redhat.com>
5296
5297 * server.h: Do not include common-utils.h.
5298
5299 2014-08-07 Gary Benson <gbenson@redhat.com>
5300
5301 * server.h: Do not include ptid.h.
5302 * notif.h: Likewise.
5303
5304 2014-08-07 Gary Benson <gbenson@redhat.com>
5305
5306 * server.h: Do not include gdb_locale.h.
5307
5308 2014-08-07 Gary Benson <gbenson@redhat.com>
5309
5310 * server.h: Do not include gdb/signals.h.
5311 * win32-low.c: Likewise.
5312
5313 2014-08-07 Gary Benson <gbenson@redhat.com>
5314
5315 * server.h: Do not include pathmax.h.
5316
5317 2014-08-07 Gary Benson <gbenson@redhat.com>
5318
5319 * server.h: Do not include libiberty.h.
5320 * linux-bfin-low.c: Likewise.
5321
5322 2014-08-07 Gary Benson <gbenson@redhat.com>
5323
5324 * server.h: Do not include ansidecl.h.
5325
5326 2014-08-07 Gary Benson <gbenson@redhat.com>
5327
5328 * linux-x86-low.c: Do not include stddef.h.
5329 * lynx-ppc-low.c: Likewise.
5330 * tracepoint.c: Likewise.
5331
5332 2014-08-07 Gary Benson <gbenson@redhat.com>
5333
5334 * server.h: Do not include stdarg.h.
5335 * nto-low.c: Likewise.
5336
5337 2014-08-07 Gary Benson <gbenson@redhat.com>
5338
5339 * server.h: Do not include stdlib.h.
5340 * inferiors.c: Likewise.
5341 * linux-low.c: Likewise.
5342 * regcache.c: Likewise.
5343 * spu-low.c: Likewise.
5344 * tracepoint.c: Likewise.
5345 * utils.c: Likewise.
5346
5347 2014-08-07 Gary Benson <gbenson@redhat.com>
5348
5349 * server.h: Do not include stdio.h.
5350 * linux-low.c: Likewise.
5351 * remote-utils.c: Likewise.
5352 * spu-low.c: Likewise.
5353 * utils.c: Likewise.
5354 * wincecompat.c: Likewise.
5355
5356 2014-08-06 Gary Benson <gbenson@redhat.com>
5357
5358 * regcache.c (init_register_cache): Move conditionals inside if.
5359
5360 2014-08-06 Gary Benson <gbenson@redhat.com>
5361
5362 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5363
5364 2014-07-31 Gary Benson <gbenson@redhat.com>
5365
5366 * ax.h: Do not include server.h.
5367 * gdbthread.h: Likewise.
5368 * lynx-low.h: Likewise.
5369 * notif.h: Likewise.
5370
5371 2014-07-30 Gary Benson <gbenson@redhat.com>
5372
5373 * server.h: Include common-defs.h.
5374 Do not include config.h or build-gnulib-gdbserver/config.h.
5375
5376 2014-07-30 Gary Benson <gbenson@redhat.com>
5377
5378 * hostio-errno.c: Move server.h to top of includes list.
5379 * inferiors.c: Likewise.
5380 * linux-x86-low.c: Likewise.
5381 * notif.c: Include server.h.
5382
5383 2014-07-24 Tom Tromey <tromey@redhat.com>
5384 Gary Benson <gbenson@redhat.com>
5385
5386 * server.h (CORE_ADDR): Now unsigned.
5387
5388 2014-07-16 Pedro Alves <palves@redhat.com>
5389
5390 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5391
5392 2014-07-15 Pedro Alves <palves@redhat.com>
5393
5394 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5395 copy.
5396
5397 2014-07-11 Pedro Alves <palves@redhat.com>
5398
5399 * linux-low.c (kill_wait_lwp): New function, based on
5400 kill_one_lwp_callback, but use my_waitpid directly.
5401 (kill_one_lwp_callback, linux_kill): Use it.
5402
5403 2014-06-23 Pedro Alves <palves@redhat.com>
5404
5405 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5406 before setting DR0..DR3.
5407
5408 2014-06-20 Gary Benson <gbenson@redhat.com>
5409
5410 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5411 * configure: Regenerated.
5412 * config.in: Likewise.
5413
5414 2014-06-20 Gary Benson <gbenson@redhat.com>
5415
5416 * Makefile.in (SFILES): Update locations for files moved
5417 from common to nat.
5418 (object file files): Reordered.
5419
5420 2014-06-20 Gary Benson <gbenson@redhat.com>
5421
5422 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5423 (i386_dr_low_set_addr): Likewise.
5424 (i386_dr_low_get_addr): Likewise.
5425 (i386_dr_low_can_set_control): Likewise.
5426 (i386_dr_low_set_control): Likewise.
5427 (i386_dr_low_get_control): Likewise.
5428 (i386_dr_low_get_status): Likewise.
5429 (i386_get_debug_register_length): Likewise.
5430 * linux-x86-low.c (i386_dr_low_set_addr):
5431 Changed signature. Made static.
5432 (i386_dr_low_get_addr): Likewise.
5433 (i386_dr_low_set_control): Likewise.
5434 (i386_dr_low_get_control): Likewise.
5435 (i386_dr_low_get_status): Likewise.
5436 (i386_dr_low): New global variable.
5437 * win32-i386-low.c (i386_dr_low_set_addr):
5438 Changed signature. Made static.
5439 (i386_dr_low_get_addr): Likewise.
5440 (i386_dr_low_set_control): Likewise.
5441 (i386_dr_low_get_control): Likewise.
5442 (i386_dr_low_get_status): Likewise.
5443 (i386_dr_low): New global variable.
5444
5445 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5446
5447 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5448 * Makefile.in (AR, AR_FLAGS): Define.
5449 * configure: Regenerate.
5450
5451 2014-06-19 Gary Benson <gbenson@redhat.com>
5452
5453 * Makefile.in (i386-dregs.o): New rule.
5454 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5455 * i386-low.c (target.h): Remove include.
5456 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5457 (DR_CONTROL_SHIFT): Likewise.
5458 (DR_CONTROL_SIZE): Likewise.
5459 (DR_RW_EXECUTE): Likewise.
5460 (DR_RW_WRITE): Likewise.
5461 (DR_RW_READ): Likewise.
5462 (DR_RW_IORW): Likewise.
5463 (DR_LEN_1): Likewise.
5464 (DR_LEN_2): Likewise.
5465 (DR_LEN_4): Likewise.
5466 (DR_LEN_8): Likewise.
5467 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5468 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5469 (DR_ENABLE_SIZE): Likewise.
5470 (DR_LOCAL_SLOWDOWN): Likewise.
5471 (DR_GLOBAL_SLOWDOWN): Likewise.
5472 (DR_CONTROL_RESERVED): Likewise.
5473 (I386_DR_CONTROL_MASK): Likewise.
5474 (I386_DR_VACANT): Likewise.
5475 (I386_DR_LOCAL_ENABLE): Likewise.
5476 (I386_DR_GLOBAL_ENABLE): Likewise.
5477 (I386_DR_DISABLE): Likewise.
5478 (I386_DR_SET_RW_LEN): Likewise.
5479 (I386_DR_GET_RW_LEN): Likewise.
5480 (I386_DR_WATCH_HIT): Likewise.
5481 (i386_wp_op_t): Likewise.
5482 (i386_show_dr): Likewise.
5483 (i386_length_and_rw_bits): Likewise.
5484 (i386_insert_aligned_watchpoint): Likewise.
5485 (i386_remove_aligned_watchpoint): Likewise.
5486 (i386_handle_nonaligned_watchpoint): Likewise.
5487 i386_update_inferior_debug_regs(): Likewise.
5488 (i386_dr_insert_watchpoint): Likewise.
5489 (i386_dr_remove_watchpoint): Likewise.
5490 (i386_dr_region_ok_for_watchpoint): Likewise.
5491 (i386_dr_stopped_data_address): Likewise.
5492 (i386_dr_stopped_by_watchpoint): Likewise.
5493
5494 2014-06-19 Gary Benson <gbenson@redhat.com>
5495
5496 * i386-low.c (i386_dr_show): Renamed to
5497 i386_show_dr and made static. All uses updated.
5498 (i386_dr_length_and_rw_bits): Renamed to
5499 i386_length_and_rw_bits and made static.
5500 All uses updated.
5501 (i386_dr_insert_aligned_watchpoint): Renamed to
5502 i386_insert_aligned_watchpoint and made static.
5503 All uses updated.
5504 (i386_dr_remove_aligned_watchpoint): Renamed to
5505 i386_remove_aligned_watchpoint and made static.
5506 All uses updated.
5507 (i386_dr_update_inferior_debug_regs): Renamed to
5508 i386_update_inferior_debug_regs and made static.
5509 All uses updated.
5510
5511 2014-06-18 Gary Benson <gbenson@redhat.com>
5512
5513 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5514 (i386_dr_low_can_set_control): Likewise.
5515 (i386_get_debug_register_length): Likewise.
5516 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5517 (i386_dr_low_can_set_control): Likewise.
5518 (i386_get_debug_register_length): Likewise.
5519
5520 2014-06-17 Gary Benson <gbenson@redhat.com>
5521
5522 * i386-low.h (i386-dregs.h): New include.
5523 (DR_FIRSTADDR): Now in i386-dregs.h.
5524 (DR_LASTADDR): Likewise.
5525 (DR_NADDR): Likewise.
5526 (DR_STATUS): Likewise.
5527 (DR_CONTROL): Likewise.
5528 (i386_debug_reg_state): Likewise.
5529 (i386_dr_insert_watchpoint): Likewise.
5530 (i386_dr_remove_watchpoint): Likewise.
5531 (i386_dr_region_ok_for_watchpoint): Likewise.
5532 (i386_dr_stopped_data_address): Likewise.
5533 (i386_dr_stopped_by_watchpoint): Likewise.
5534 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5535
5536 2014-06-18 Gary Benson <gbenson@redhat.com>
5537
5538 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5539 i386_dr_insert_watchpoint.
5540 (i386_low_remove_watchpoint): Renamed to
5541 i386_dr_remove_watchpoint.
5542 (i386_low_region_ok_for_watchpoint): Renamed to
5543 i386_dr_region_ok_for_watchpoint.
5544 (i386_low_stopped_data_address): Renamed to
5545 i386_dr_stopped_data_address.
5546 (i386_low_stopped_by_watchpoint): Renamed to
5547 i386_dr_stopped_by_watchpoint.
5548 * i386-low.c (i386_show_dr): Renamed to
5549 i386_dr_show and made nonstatic. All uses updated.
5550 (i386_length_and_rw_bits): Renamed to
5551 i386_dr_length_and_rw_bits and made nonstatic.
5552 All uses updated.
5553 (i386_insert_aligned_watchpoint): Renamed to
5554 i386_dr_insert_aligned_watchpoint and made nonstatic.
5555 All uses updated.
5556 (i386_remove_aligned_watchpoint): Renamed to
5557 i386_dr_remove_aligned_watchpoint and made nonstatic.
5558 All uses updated.
5559 (i386_update_inferior_debug_regs): Renamed to
5560 i386_dr_update_inferior_debug_regs and made nonstatic.
5561 All uses updated.
5562 (i386_low_insert_watchpoint): Renamed to
5563 i386_dr_insert_watchpoint. All uses updated.
5564 (i386_low_remove_watchpoint): Renamed to
5565 i386_dr_remove_watchpoint. All uses updated.
5566 (i386_low_region_ok_for_watchpoint): Renamed to
5567 i386_dr_region_ok_for_watchpoint. All uses updated.
5568 (i386_low_stopped_data_address): Renamed to
5569 i386_dr_stopped_data_address. All uses updated.
5570 (i386_low_stopped_by_watchpoint): Renamed to
5571 i386_dr_stopped_by_watchpoint. All uses updated.
5572
5573 2014-06-18 Gary Benson <gbenson@redhat.com>
5574
5575 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5576 (i386_dr_low_can_set_control): Likewise.
5577 (i386_insert_aligned_watchpoint): New check.
5578
5579 2014-06-18 Gary Benson <gbenson@redhat.com>
5580
5581 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5582 Renamed to state.
5583
5584 2014-06-18 Gary Benson <gbenson@redhat.com>
5585
5586 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5587 instead of fatal and error.
5588 (i386_handle_nonaligned_watchpoint): Likewise.
5589
5590 2014-06-18 Gary Benson <gbenson@redhat.com>
5591
5592 * i386-low.c (i386_get_debug_register_length): New macro.
5593 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5594 (i386_show_dr): Use debug_printf instead of fprintf. Use
5595 phex to format values.
5596
5597 2014-06-18 Gary Benson <gbenson@redhat.com>
5598
5599 * i386-low.h: Comment changes.
5600 * i386-low.c: Likewise.
5601
5602 2014-06-18 Gary Benson <gbenson@redhat.com>
5603
5604 * i386-low.c: Whitespace changes.
5605
5606 2014-06-12 Tom Tromey <tromey@redhat.com>
5607
5608 * utils.c (freeargv): Remove.
5609
5610 2014-06-12 Tom Tromey <tromey@redhat.com>
5611
5612 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5613 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5614 (parse_debug_format_options): Likewise.
5615 (gdbserver_usage): Likewise.
5616 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5617 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5618 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5619 against libiberty.
5620 ($(LIBGNU)): Depend on libiberty.
5621 (all-lib): Recurse into all subdirs.
5622 (install-only): Invoke "install" target in subdirs.
5623 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5624 targets.
5625 * configure: Rebuild.
5626 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5627 for vasprintf, vsnprintf, or gettimeofday.
5628 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5629 srv_tgtobj.
5630
5631 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5632
5633 * development.sh: Delete.
5634 * Makefile.in (config.status): Adjust dependency on development.sh.
5635 * configure.ac: Adjust development.sh source call.
5636 * configure: Regenerate.
5637
5638 2014-06-02 Pedro Alves <palves@redhat.com>
5639
5640 * ax.c (gdb_free_agent_expr): New function.
5641 * ax.h (gdb_free_agent_expr): New declaration.
5642 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5643 list.
5644 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5645 static.
5646 (clear_breakpoint_conditions_and_commands): New function.
5647 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5648 (clear_breakpoint_conditions_and_commands): New declaration.
5649
5650 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5651
5652 * linux-aarch64-low.c (asm/ptrace.h): Include.
5653
5654 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5655
5656 Fix TLS access for -static -pthread.
5657 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5658 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5659 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5660
5661 2014-05-20 Pedro Alves <palves@redhat.com>
5662
5663 * linux-aarch64-low.c (aarch64_insert_point)
5664 (aarch64_remove_point): No longer check whether the type is
5665 supported here. Adjust to new interface.
5666 (the_low_target): Install aarch64_supports_z_point_type as
5667 supports_z_point_type method.
5668 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5669 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5670 instead of a Z packet char. Adjust.
5671 (arm_supports_z_point_type): New function.
5672 (arm_insert_point, arm_remove_point): Adjust to new interface.
5673 (the_low_target): Install arm_supports_z_point_type.
5674 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5675 (cris_insert_point, cris_remove_point): Adjust to new interface.
5676 Don't check whether the type is supported here.
5677 (the_low_target): Install cris_supports_z_point_type.
5678 * linux-low.c (linux_supports_z_point_type): New function.
5679 (linux_insert_point, linux_remove_point): Adjust to new interface.
5680 * linux-low.h (struct linux_target_ops) <insert_point,
5681 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5682 raw_breakpoint pointer parameter.
5683 <supports_z_point_type>: New method.
5684 * linux-mips-low.c (mips_supports_z_point_type): New function.
5685 (mips_insert_point, mips_remove_point): Adjust to new interface.
5686 Use mips_supports_z_point_type.
5687 (the_low_target): Install mips_supports_z_point_type.
5688 * linux-ppc-low.c (the_low_target): Install NULL as
5689 supports_z_point_type method.
5690 * linux-s390-low.c (the_low_target): Install NULL as
5691 supports_z_point_type method.
5692 * linux-sparc-low.c (the_low_target): Install NULL as
5693 supports_z_point_type method.
5694 * linux-x86-low.c (x86_supports_z_point_type): New function.
5695 (x86_insert_point): Adjust to new insert_point interface. Use
5696 insert_memory_breakpoint. Adjust to new
5697 i386_low_insert_watchpoint interface.
5698 (x86_remove_point): Adjust to remove_point interface. Use
5699 remove_memory_breakpoint. Adjust to new
5700 i386_low_remove_watchpoint interface.
5701 (the_low_target): Install x86_supports_z_point_type.
5702 * lynx-low.c (lynx_target_ops): Install NULL as
5703 supports_z_point_type callback.
5704 * nto-low.c (nto_supports_z_point_type): New.
5705 (nto_insert_point, nto_remove_point): Adjust to new interface.
5706 (nto_target_ops): Install nto_supports_z_point_type.
5707 * mem-break.c: Adjust intro comment.
5708 (struct raw_breakpoint) <raw_type, size>: New fields.
5709 <inserted>: Update comment.
5710 <shlib_disabled>: Delete field.
5711 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5712 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5713 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5714 (raw_bkpt_type_to_target_hw_bp_type): New function.
5715 (find_enabled_raw_code_breakpoint_at): New function.
5716 (find_raw_breakpoint_at): New type and size parameters. Use them.
5717 (insert_memory_breakpoint): New function, based off
5718 set_raw_breakpoint_at.
5719 (remove_memory_breakpoint): New function.
5720 (set_raw_breakpoint_at): Reimplement.
5721 (set_breakpoint): New, based on set_breakpoint_at.
5722 (set_breakpoint_at): Reimplement.
5723 (delete_raw_breakpoint): Go through the_target->remove_point
5724 instead of assuming memory breakpoints.
5725 (find_gdb_breakpoint_at): Delete.
5726 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5727 (find_gdb_breakpoint): New function.
5728 (set_gdb_breakpoint_at): Delete.
5729 (z_type_supported): New function.
5730 (set_gdb_breakpoint_1): New function, loosely based off
5731 set_gdb_breakpoint_at.
5732 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5733 (delete_gdb_breakpoint_at): Delete.
5734 (delete_gdb_breakpoint_1): New function, loosely based off
5735 delete_gdb_breakpoint_at.
5736 (delete_gdb_breakpoint): New function.
5737 (clear_gdb_breakpoint_conditions): Rename to ...
5738 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5739 breakpoint.
5740 (add_condition_to_breakpoint): Make static.
5741 (add_breakpoint_condition): Take a struct breakpoint pointer
5742 instead of an address. Adjust.
5743 (gdb_condition_true_at_breakpoint): Rename to ...
5744 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5745 z_type parameter.
5746 (gdb_condition_true_at_breakpoint): Reimplement.
5747 (add_breakpoint_commands): Take a struct breakpoint pointer
5748 instead of an address. Adjust.
5749 (gdb_no_commands_at_breakpoint): Rename to ...
5750 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5751 parameter. Return true if no breakpoint was found. Change debug
5752 output.
5753 (gdb_no_commands_at_breakpoint): Reimplement.
5754 (run_breakpoint_commands): Rename to ...
5755 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5756 and change return type to boolean.
5757 (run_breakpoint_commands): New function.
5758 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5759 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5760 breakpoint. Go through the_target->remove_point instead of
5761 assuming memory breakpoint.
5762 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5763 software and hardware breakpoints.
5764 (reinsert_raw_breakpoint): Go through the_target->insert_point
5765 instead of assuming memory breakpoint.
5766 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5767 software and hardware breakpoints.
5768 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5769 Check both software and hardware breakpoints.
5770 (validate_inserted_breakpoint): Assert the breakpoint is a
5771 software breakpoint. Set the inserted flag to -1 instead of
5772 setting shlib_disabled.
5773 (delete_disabled_breakpoints): Adjust.
5774 (validate_breakpoints): Only validate software breakpoints.
5775 Adjust to inserted flag change.
5776 (check_mem_read, check_mem_write): Skip breakpoint types other
5777 than software breakpoints. Adjust to inserted flag change.
5778 * mem-break.h (enum raw_bkpt_type): New enum.
5779 (raw_breakpoint, struct process_info): Forward declare.
5780 (Z_packet_to_target_hw_bp_type): Delete declaration.
5781 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5782 (set_gdb_breakpoint, delete_gdb_breakpoint)
5783 (clear_breakpoint_conditions): New declarations.
5784 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5785 (breakpoint_inserted_here): Update comment.
5786 (add_breakpoint_condition, add_breakpoint_commands): Replace
5787 address parameter with a breakpoint pointer parameter.
5788 (gdb_breakpoint_here): Update comment.
5789 (delete_gdb_breakpoint_at): Delete.
5790 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5791 * server.c (process_point_options): Take a struct breakpoint
5792 pointer instead of an address. Adjust.
5793 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5794 delete_gdb_breakpoint.
5795 * spu-low.c (spu_target_ops): Install NULL as
5796 supports_z_point_type method.
5797 * target.h: Include mem-break.h.
5798 (struct target_ops) <prepare_to_access_memory>: Update comment.
5799 <supports_z_point_type>: New field.
5800 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5801 instead of a char. Also take a raw breakpoint pointer.
5802 * win32-arm-low.c (the_low_target): Install NULL as
5803 supports_z_point_type.
5804 * win32-i386-low.c (i386_supports_z_point_type): New function.
5805 (i386_insert_point, i386_remove_point): Adjust to new interface.
5806 (the_low_target): Install i386_supports_z_point_type.
5807 * win32-low.c (win32_supports_z_point_type): New function.
5808 (win32_insert_point, win32_remove_point): Adjust to new interface.
5809 (win32_target_ops): Install win32_supports_z_point_type.
5810 * win32-low.h (struct win32_target_ops):
5811 <supports_z_point_type>: New method.
5812 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5813 instead of a char. Also take a raw breakpoint pointer.
5814
5815 2014-05-20 Pedro Alves <palves@redhat.com>
5816
5817 * mem-break.h: Include break-common.h.
5818 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5819 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5820 (Z_packet_to_target_hw_bp_type): New declaration.
5821 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5822 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5823 (Z_PACKET_ACCESS_WP): Delete macros.
5824 (Z_packet_to_hw_type): Delete function.
5825 * i386-low.h: Don't include break-common.h here.
5826 (Z_packet_to_hw_type): Delete declaration.
5827 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5828 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5829 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5830 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5831 * linux-aarch64-low.c: Don't include break-common.h here.
5832 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5833 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5834 (Z_packet_to_target_hw_bp_type): Delete function.
5835 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5836 function.
5837 (mips_insert_point, mips_remove_point): Use
5838 Z_packet_to_target_hw_bp_type.
5839
5840 2014-05-20 Pedro Alves <palves@redhat.com>
5841
5842 * linux-aarch64-low.c: Include break-common.h.
5843 (enum target_point_type): Delete.
5844 (Z_packet_to_point_type): Rename to ...
5845 (Z_packet_to_target_hw_bp_type): ... this, and return a
5846 target_hw_bp_type instead.
5847 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5848 instead of an enum target_point_type.
5849 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5850 breakpoint type.
5851 (aarch64_dr_state_insert_one_point)
5852 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5853 (aarch64_handle_aligned_watchpoint)
5854 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5855 Take an enum target_hw_bp_type instead of an enum
5856 target_point_type.
5857 (aarch64_supports_z_point_type): New function.
5858 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5859 use Z_packet_to_target_hw_bp_type.
5860
5861 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5862
5863 * configure.ac: Only use -Werror by default when DEVELOPMENT
5864 is true.
5865 * configure: Regenerate.
5866
5867 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5868
5869 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5870 * linux-x86-low.c (X86_64_USER_REGS): New.
5871 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5872
5873 2014-04-28 Yao Qi <yao@codesourcery.com>
5874
5875 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5876 name.
5877
5878 2014-04-25 Pedro Alves <palves@redhat.com>
5879
5880 PR server/16255
5881 * linux-low.c (linux_attach_fail_reason_string): New function.
5882 (linux_attach_lwp): Delete.
5883 (linux_attach_lwp_1): Rename to ...
5884 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5885 argument. Remove "initial" parameter. Return int instead of
5886 void. Don't error or warn here.
5887 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5888 failure to attach to the tgid. Call warning when failing to
5889 attach to an lwp.
5890 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5891 argument. Remove "initial" parameter. Return int instead of
5892 void. Don't error or warn here.
5893 (linux_attach_fail_reason_string): New declaration.
5894 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5895 interface change. Use linux_attach_fail_reason_string.
5896
5897 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5898 Walfred Tedeschi <walfred.tedeschi@intel.com>
5899
5900 * Makefile.in: Added rules to handle new files
5901 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5902 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5903 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5904 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5905 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5906 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5907 x32-avx512-linux.o.
5908 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5909 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5910 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5911 i386/x32-avx512.xml.
5912 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5913 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5914 i386/x32-avx512-linux.xml.
5915 * i387-fp.c (num_avx512_k_registers): New constant for number
5916 of K registers.
5917 (num_avx512_zmmh_low_registers): New constant for number of
5918 lower ZMM registers (0-15).
5919 (num_avx512_zmmh_high_registers): New constant for number of
5920 higher ZMM registers (16-31).
5921 (num_avx512_ymmh_registers): New contant for number of higher
5922 YMM registers (ymm16-31 added by avx521 on x86_64).
5923 (num_avx512_xmm_registers): New constant for number of higher
5924 XMM registers (xmm16-31 added by AVX512 on x86_64).
5925 (struct i387_xsave): Add space for AVX512 registers.
5926 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5927 Add code to handle AVX512 registers.
5928 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5929 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5930 prototypei from generated file.
5931 (tdesc_amd64_avx512_linux): Likewise.
5932 (init_registers_x32_avx512_linux): Likewise.
5933 (tdesc_x32_avx512_linux): Likewise.
5934 (init_registers_i386_avx512_linux): Likewise.
5935 (tdesc_i386_avx512_linux): Likewise.
5936 (x86_64_regmap): Add AVX512 registers.
5937 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5938 mask.
5939 (initialize_low_arch): Add code to initialize AVX512 registers.
5940
5941 2014-04-23 Pedro Alves <palves@redhat.com>
5942
5943 * mem-break.c (find_gdb_breakpoint_at): Make static.
5944 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5945
5946 2014-04-23 Pedro Alves <palves@redhat.com>
5947
5948 * i386-low.c: Don't include break-common.h here.
5949 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5950 prototype to take target_hw_bp_type as argument instead of a Z
5951 packet char.
5952 * i386-low.h: Include break-common.h here.
5953 (Z_packet_to_hw_type): Declare.
5954 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5955 prototypes.
5956 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5957 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5958 (x86_remove_point): Convert the packet number to a
5959 target_hw_bp_type before calling i386_low_remove_watchpoint.
5960 * win32-i386-low.c (i386_insert_point): Convert the packet number
5961 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5962 (i386_remove_point): Convert the packet number to a
5963 target_hw_bp_type before calling i386_low_remove_watchpoint.
5964
5965 2014-04-23 Pedro Alves <palves@redhat.com>
5966
5967 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5968
5969 2014-04-10 Pedro Alves <palves@redhat.com>
5970
5971 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5972 Check if the condition or command is NULL before checking if the
5973 breakpoint is known. On success, return true.
5974 * mem-break.h (add_breakpoint_condition): Document return.
5975 (add_breakpoint_commands): Add describing comment.
5976 * server.c (skip_to_semicolon): New function.
5977 (process_point_options): Use it.
5978
5979 2014-04-09 Pedro Alves <palves@redhat.com>
5980
5981 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5982 to lwpid_of.
5983
5984 2014-02-27 Pedro Alves <palves@redhat.com>
5985
5986 PR 12702
5987 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5988 macros.
5989 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5990 output.
5991 (last_thread_of_process_p): Take a PID argument instead of a
5992 thread pointer.
5993 (linux_wait_for_lwp): Delete.
5994 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5995 functions.
5996 (linux_low_filter_event): New function, party factored out from
5997 linux_wait_for_event.
5998 (linux_wait_for_event): Rename to ...
5999 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6000 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6001 sigsuspend. Check for zombie leaders.
6002 (linux_wait_for_event): Reimplement as wrapper around
6003 linux_wait_for_event_filtered.
6004 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6005 a normal or signal exit is seen, it's the whole process exiting.
6006 (wait_for_sigstop): No longer a for_each_inferior callback.
6007 Rewrite on top of linux_wait_for_event_filtered.
6008 (stop_all_lwps): Call wait_for_sigstop directly.
6009 * server.c (resume, handle_target_event): Handle
6010 TARGET_WAITKIND_NO_RESUMED.
6011
6012 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6013
6014 * win32-low.c (psapi_get_dll_name,
6015 * win32_CreateToolhelp32Snapshot): Delete.
6016 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6017 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6018 Delete.
6019 (handle_load_dll): Add function description.
6020 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6021
6022 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6023
6024 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6025 Add comment.
6026 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6027 base address when calling win32_add_one_solib.
6028 (handle_load_dll): Delete local variable load_addr.
6029 Remove 0x1000 offset applied to DLL base address when calling
6030 win32_add_one_solib.
6031 (handle_unload_dll): Add comment.
6032
6033 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6034
6035 * win32-low.c (win32_add_all_dlls): Renames
6036 win32_ensure_ntdll_loaded. Rewrite function documentation.
6037 Adjust implementation to always load all DLLs.
6038 Add 0x1000 offset to DLL base address when calling
6039 win32_add_one_solib.
6040 (child_initialization_done): New static global.
6041 (do_initial_child_stuff): Set child_initialization_done to
6042 zero during child initialization, and 1 after. Replace call
6043 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6044 Add comment.
6045 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6046 (handle_unload_dll): Add function documentation.
6047 (get_child_debug_event): Ignore load and unload DLL events
6048 during child initialization.
6049
6050 2014-02-20 Doug Evans <dje@google.com>
6051
6052 Remove global all_lwps.
6053 * inferiors.h (ptid_of): Move here from linux-low.h.
6054 (pid_of, lwpid_of): Ditto.
6055 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6056 parameter is a struct thread_info * now.
6057 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6058 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6059 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6060 directly.
6061 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6062 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6063 * linux-arm-low.c (update_registers_callback): Update, "entry"
6064 parameter is a struct thread_info * now.
6065 Fetch lwpid from current_inferior directly.
6066 (arm_insert_point): Pass &all_threads to find_inferior instead of
6067 &all_lwps.
6068 (arm_remove_point): Ditto.
6069 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6070 (arm_prepare_to_resume): Fetch pid from thread.
6071 (arm_read_description): Fetch lwpid from current_inferior directly.
6072 * linux-low.c (all_lwps): Delete.
6073 (delete_lwp): Delete call to remove_inferior.
6074 (handle_extended_wait): Fetch lwpid from thread.
6075 (add_lwp): Don't set lwp->entry.id. Remove call to
6076 add_inferior_to_list.
6077 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6078 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6079 (kill_one_lwp_callback): Ditto.
6080 (linux_kill): Don't dereference NULL pointer.
6081 Fetch ptid,lwpid from thread.
6082 (get_detach_signal): Fetch ptid from thread.
6083 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6084 Simplify call to regcache_invalidate_thread.
6085 (delete_lwp_callback): Update, "entry" parameter is a
6086 struct thread_info * now. Fetch pid from thread.
6087 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6088 (status_pending_p_callback): Update, "entry" parameter is a
6089 struct thread_info * now. Fetch ptid from thread.
6090 (find_lwp_pid): Update, "entry" parameter is a
6091 struct thread_info * now.
6092 (linux_wait_for_lwp): Fetch pid from thread.
6093 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6094 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6095 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6096 (dequeue_one_deferred_signal): Ditto.
6097 (cancel_breakpoint): Fetch ptid from current_inferior.
6098 (linux_wait_for_event): Pass &all_threads to find_inferior,
6099 not &all_lwps. Fetch ptid, lwpid from thread.
6100 (count_events_callback): Update, "entry" parameter is a
6101 struct thread_info * now.
6102 (select_singlestep_lwp_callback): Ditto.
6103 (select_event_lwp_callback): Ditto.
6104 (cancel_breakpoints_callback): Ditto.
6105 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6106 not &all_lwps.
6107 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6108 (unsuspend_one_lwp): Update, "entry" parameter is a
6109 struct thread_info * now.
6110 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6111 not &all_lwps.
6112 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6113 Fetch lwpid from thread, not lwp.
6114 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6115 Pass &all_threads to find_inferior, not &all_lwps.
6116 (send_sigstop): Fetch lwpid from thread, not lwp.
6117 (send_sigstop_callback): Update, "entry" parameter is a
6118 struct thread_info * now.
6119 (suspend_and_send_sigstop_callback): Ditto.
6120 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6121 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6122 struct thread_info * now.
6123 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6124 from thread, lwp.
6125 (lwp_running): Update, "entry" parameter is a
6126 struct thread_info * now.
6127 (stop_all_lwps): Fetch ptid from thread.
6128 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6129 (linux_resume_one_lwp): Fetch lwpid from thread.
6130 (linux_set_resume_request): Update, "entry" parameter is a
6131 struct thread_info * now. Fetch pid, lwpid from thread.
6132 (resume_status_pending_p): Update, "entry" parameter is a
6133 struct thread_info * now.
6134 (need_step_over_p): Ditto. Fetch lwpid from thread.
6135 (start_step_over): Fetch lwpid from thread.
6136 (linux_resume_one_thread): Update, "entry" parameter is a
6137 struct thread_info * now. Fetch lwpid from thread.
6138 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6139 (proceed_one_lwp): Update, "entry" parameter is a
6140 struct thread_info * now. Fetch lwpid from thread.
6141 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6142 struct thread_info * now.
6143 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6144 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6145 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6146 directly.
6147 (regsets_store_inferior_registers): Ditto.
6148 (fetch_register, store_register): Ditto.
6149 (linux_read_memory, linux_write_memory): Ditto.
6150 (linux_request_interrupt): Ditto.
6151 (linux_read_auxv): Ditto.
6152 (linux_xfer_siginfo): Ditto.
6153 (linux_qxfer_spu): Ditto.
6154 (linux_qxfer_libraries_svr4): Ditto.
6155 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6156 moved to inferiors.h.
6157 (get_lwp): Delete.
6158 (get_thread_lwp): Update.
6159 (struct lwp_info): Delete member "entry". Simplify comment for
6160 member "thread".
6161 (all_lwps): Delete.
6162 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6163 current_inferior directly.
6164 (update_watch_registers_callback): Update, "entry" parameter is a
6165 struct thread_info * now. Fetch pid from thread.
6166 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6167 (mips_insert_point): Fetch lwpid from current_inferior.
6168 Pass &all_threads to find_inferior, not &all_lwps.
6169 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6170 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6171 directly.
6172 (mips_stopped_data_address): Ditto.
6173 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6174 directly.
6175 * linux-tile-low.c (tile_arch_setup): Ditto.
6176 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6177 (update_debug_registers_callback): Update, "entry" parameter is a
6178 struct thread_info * now. Fetch pid from thread.
6179 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6180 Pass &all_threads to find_inferior, not &all_lwps.
6181 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6182 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6183 Pass &all_threads to find_inferior, not &all_lwps.
6184 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6185 (i386_dr_low_get_status): Ditto.
6186 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6187 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6188 (x86_linux_read_description): Ditto.
6189 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6190
6191 2014-02-20 Doug Evans <dje@google.com>
6192
6193 * inferiors.c (get_first_inferior): Fix buglet.
6194
6195 2014-02-19 Doug Evans <dje@google.com>
6196
6197 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6198 * inferiors.c (add_thread): Change result type to struct thread_info *.
6199 All callers updated.
6200 (add_lwp): Call add_thread here instead of in callers.
6201 All callers updated.
6202 * linux-low.h (get_lwp_thread): Rewrite.
6203 (struct lwp_info): New member "thread".
6204
6205 2014-02-19 Doug Evans <dje@google.com>
6206
6207 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6208 All callers updated.
6209
6210 2014-02-19 Doug Evans <dje@google.com>
6211
6212 * inferiors.c (add_thread): Fix whitespace.
6213
6214 2014-02-19 Doug Evans <dje@google.com>
6215
6216 * dll.c (clear_dlls): Replace accessing list implemention details
6217 with API function.
6218 * gdbthread.h (get_first_thread): Declare.
6219 * inferiors.c (for_each_inferior_with_data): New function.
6220 (get_first_thread): New function.
6221 (find_thread_ptid): Simplify.
6222 (get_first_inferior): New function.
6223 (clear_list): Delete.
6224 (one_inferior_p): New function.
6225 (clear_inferior_list): New function.
6226 (clear_inferiors): Update.
6227 * inferiors.h (for_each_inferior_with_data): Declare.
6228 (clear_inferior_list): Declare.
6229 (one_inferior_p): Declare.
6230 (get_first_inferior): Declare.
6231 * linux-low.c (linux_wait_for_event): Replace accessing list
6232 implemention details with API function.
6233 * server.c (target_running): Ditto.
6234 (accumulate_file_name_length): New function.
6235 (emit_dll_description): New function.
6236 (handle_qxfer_libraries): Replace accessing list implemention
6237 details with API function.
6238 (handle_qxfer_threads_worker): New function.
6239 (handle_qxfer_threads_proper): Replace accessing list implemention
6240 details with API function.
6241 (handle_query): Ditto.
6242 (visit_actioned_threads_callback_ftype): New typedef.
6243 (visit_actioned_threads_data): New struct.
6244 (visit_actioned_threads): Rewrite to be find_inferior callback.
6245 (resume): Call find_inferior.
6246 (handle_status): Replace accessing list implemention
6247 details with API function.
6248 (process_serial_event): Replace accessing list implemention details
6249 with API function.
6250 * target.c (set_desired_inferior): Replace accessing list implemention
6251 details with API function.
6252 * tracepoint.c (same_process_p): New function.
6253 (gdb_agent_about_to_close): Replace accessing list implemention
6254 details with API function.
6255 * win32-low.c (child_delete_thread): Replace accessing list
6256 implemention details with API function.
6257 (match_dll_by_basename): New function.
6258 (dll_is_loaded_by_basename): New function.
6259 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6260 details call to dll_is_loaded_by_basename.
6261
6262 2014-02-19 Doug Evans <dje@google.com>
6263
6264 * dll.h (struct dll_info): Add comment.
6265 * gdbthread.h (struct thread_info): Add comment.
6266 (current_ptid): Simplify.
6267 * inferiors.c (add_process): Update.
6268 (remove_process): Update.
6269 * inferiors.h (struct process_info): Rename member "head" to "entry".
6270 * linux-low.c (delete_lwp): Update.
6271 (add_lwp): Update.
6272 (last_thread_of_process_p): Update.
6273 (kill_one_lwp_callback, linux_kill): Update.
6274 (status_pending_p_callback): Update.
6275 (wait_for_sigstop): Update. Simplify read of ptid.
6276 (start_step_over): Update.
6277 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6278 (get_lwp_thread): Update.
6279 (struct lwp_info): Rename member "head" to "entry".
6280 * regcache.h (inferior_list_entry): Delete.
6281 * server.c (kill_inferior_callback): Update.
6282 (detach_or_kill_inferior_callback): Update.
6283 (print_started_pid): Update.
6284 (print_attached_pid): Update.
6285 (process_serial_event): Simplify read of ptid.
6286 * thread-db.c (thread_db_create_event): Update.
6287 (thread_db_get_tls_address): Update.
6288 * win32-low.c (current_inferior_ptid): Simplify.
6289
6290 2014-02-19 Tom Tromey <tromey@redhat.com>
6291
6292 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6293 argument.
6294 (target_supports_btrace): Update.
6295
6296 2014-02-14 Yao Qi <yao@codesourcery.com>
6297
6298 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6299 (rsp-low-ipa.o): New target.
6300
6301 2014-02-12 Tom Tromey <tromey@redhat.com>
6302
6303 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6304 convert_ascii_to_int.
6305 * regcache.c (registers_to_string): Likewise.
6306 * remote-utils.c (decode_M_packet): Likewise.
6307 * server.c (process_serial_event): Likewise.
6308
6309 2014-02-12 Tom Tromey <tromey@redhat.com>
6310
6311 * server.c (handle_query, handle_v_run): Use hex2bin, not
6312 unhexify.
6313 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6314
6315 2014-02-12 Tom Tromey <tromey@redhat.com>
6316
6317 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6318 convert_int_to_ascii.
6319 * regcache.c (registers_to_string, collect_register_as_string):
6320 Likewise.
6321 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6322 Likewise.
6323 * server.c (process_serial_event): Likewise.
6324 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6325 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6326
6327 2014-02-12 Tom Tromey <tromey@redhat.com>
6328
6329 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6330 bin2hex, not hexify.
6331 * tracepoint.c (cmd_qtstatus): Likewise.
6332
6333 2014-02-12 Tom Tromey <tromey@redhat.com>
6334
6335 * remote-utils.c (monitor_output): Pass explicit length to
6336 hexify.
6337
6338 2014-02-12 Tom Tromey <tromey@redhat.com>
6339
6340 * tracepoint.c: Include rsp-low.h.
6341 * server.c: Include rsp-low.h.
6342 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6343 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6344 declare.
6345 * remote-utils.c: Include rsp-low.h.
6346 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6347 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6348 (convert_int_to_ascii, convert_ascii_to_int): Move to
6349 common/rsp-low.c.
6350 * regcache.c: Include rsp-low.h.
6351 * ax.c: Include rsp-low.h.
6352 * Makefile.in (SFILES): Add common/rsp-low.c.
6353 (OBS): Add rsp-low.o.
6354 (rsp-low.o): New target.
6355
6356 2014-02-12 Tom Tromey <tromey@redhat.com>
6357
6358 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6359 Include print-utils.h.
6360 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6361 (plongest, thirty_two, phex_nz): Remove.
6362 * Makefile.in (SFILES): Add common/print-utils.c.
6363 (OBS): Add print-utils.o.
6364 (print-utils-ipa.o): New target.
6365 (print-utils.o): New target.
6366 (IPA_OBJS): Add print-utils-ipa.o.
6367
6368 2014-02-06 Tom Tromey <tromey@redhat.com>
6369
6370 * Makefile.in (SFILES): Fix indentation.
6371
6372 2014-02-05 Doug Evans <dje@google.com>
6373
6374 * linux-low.c (linux_wait_for_event): Improve comment.
6375 (linux_wait_1): Keep current_inferior in sync with event_child.
6376
6377 2014-01-22 Doug Evans <dje@google.com>
6378
6379 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6380
6381 2014-01-22 Doug Evans <dje@google.com>
6382
6383 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6384 * configure: Regenerate.
6385 * config.in: Regenerate.
6386 * Makefile.in (SFILES): Add debug.c.
6387 (OBS): Add debug.o.
6388 * debug.c: New file.
6389 * debug.h: New file.
6390 * linux-aarch64-low.c (*): Update all debugging printfs to use
6391 debug_printf instead of fprintf.
6392 * linux-arm-low.c (*): Ditto.
6393 * linux-cris-low.c (*): Ditto.
6394 * linux-crisv32-low.c (*): Ditto.
6395 * linux-m32r-low.c (*): Ditto.
6396 * linux-sparc-low.c (*): Ditto.
6397 * linux-x86.c (*): Ditto.
6398 * linux-low.c (*): Ditto.
6399 (linux_wait_1): Add calls to debug_enter, debug_exit.
6400 (linux_wait): Remove redundant debugging printf.
6401 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6402 (linux_resume, unstop_all_lwps): Ditto.
6403 * mem-break.c (*): Update all debugging printfs to use
6404 debug_printf instead of fprintf.
6405 * remote-utils.c (*): Ditto.
6406 * thread-db.c (*): Ditto.
6407 * server.c #include <ctype.h>, "gdb_vecs.h".
6408 (debug_threads): Moved to debug.c.
6409 (*): Update all debugging printfs to use debug_printf instead of
6410 fprintf.
6411 (start_inferior): Replace call to fflush with call to debug_flush.
6412 (monitor_show_help): Mention set debug-format.
6413 (parse_debug_format_options): New function.
6414 (handle_monitor_command): Handle "monitor set debug-format".
6415 (gdbserver_usage): Mention --debug-format.
6416 (main): Parse --debug-format.
6417 * server.h (debug_threads): Declaration moved to debug.h.
6418 #include "debug.h".
6419 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6420 trace_debug_1 that uses debug_printf.
6421 (tracepoint_look_up_symbols): Update all debugging printfs to use
6422 debug_printf instead of fprintf.
6423
6424 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6425
6426 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6427 sys/ptrace.h.
6428
6429 2014-01-17 Pedro Alves <palves@redhat.com>
6430
6431 PR build/16445
6432 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6433 defined after including gdb_proc_service.h.
6434
6435 2014-01-16 Doug Evans <dje@google.com>
6436
6437 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6438 (match_dll): Use it.
6439
6440 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6441
6442 * target.h (target_ops) <read_btrace>: Change parameters and
6443 return type to allow error reporting.
6444 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6445 trace reading errors on.
6446 * linux-low.c (linux_low_read_btrace): Pass trace reading
6447 errors on.
6448 (linux_low_disable_btrace): New.
6449
6450 2014-01-15 Doug Evans <dje@google.com>
6451
6452 * inferiors.c (thread_id_to_gdb_id): Delete.
6453 * inferiors.h (thread_id_to_gdb_id): Delete.
6454
6455 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6456
6457 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6458 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6459 versions.
6460
6461 2014-01-08 Pedro Alves <palves@redhat.com>
6462
6463 * server.c (handle_status): Don't discard previous queued stop
6464 replies or thread's pending status here.
6465 (main) <disconnection>: Do it here instead.
6466
6467 2014-01-08 Pedro Alves <palves@redhat.com>
6468
6469 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6470 * server.c (visit_actioned_threads, handle_pending_status): New
6471 function.
6472 (handle_v_cont): Factor out parts to ...
6473 (resume): ... this new function. If in all-stop, and a thread
6474 being resumed has a pending status, report it without actually
6475 resuming.
6476 (myresume): Adjust to use the new 'resume' function.
6477 (clear_pending_status_callback, set_pending_status_callback)
6478 (find_status_pending_thread_callback): New functions.
6479 (handle_status): Handle the case of multiple threads having
6480 interesting statuses to report. Report threads' real last signal
6481 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6482 with an interesting thread to report the status for, instead of
6483 always reporting the status of the first thread.
6484
6485 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6486
6487 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6488 * gdbreplay.c (gdbreplay_version): Likewise.
6489
6490 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6491
6492 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6493 iov.iov_len with the real length in use.
6494
6495 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6496
6497 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6498 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6499 for all targets that use win32-low.c.
6500 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6501 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6502
6503 2013-12-13 Pedro Alves <palves@redhat.com>
6504
6505 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6506 if equal to TARGET_WAITKIND_LOADED.
6507 * win32-low.c (cached_status): New static global.
6508 (win32_wait): Add declaration.
6509 (do_initial_child_stuff): Flush all initial pending debug events
6510 up to the initial breakpoint.
6511 (win32_wait): If CACHED_STATUS was set, return that instead
6512 of doing a real wait. Remove the code resuming the execution
6513 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6514 during the initial phase. Also remove the code changing
6515 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6516 TARGET_WAITKIND_STOPPED.
6517
6518 2013-12-11 Yao Qi <yao@codesourcery.com>
6519
6520 * notif.c (handle_notif_ack): Return 0 if no notification
6521 matches.
6522
6523 2013-11-20 Doug Evans <dje@google.com>
6524
6525 * linux-low.c (linux_set_resume_request): Fix comment.
6526
6527 2013-11-20 Doug Evans <dje@google.com>
6528
6529 * linux-low.c (resume_status_pending_p): Tweak comment.
6530
6531 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6532
6533 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6534 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6535 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6536 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6537 (srv_amd64_regobj): Add amd64-mpx.o.
6538 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6539 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6540 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6541 * i387-fp.c (num_pl_bnd_register) Added constant.
6542 (num_pl_bnd_cfg_registers) Added constant.
6543 (struct i387_xsave) Added reserved area and MPX fields.
6544 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6545 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6546 function.
6547 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6548 (init_registers_amd64_mpx_linux): Declare new function.
6549 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6550 (x86_64_regmap): Add MPX registers.
6551 (x86_linux_read_description): Add MPX case.
6552 (initialize_low_arch): Initialize MPX targets.
6553
6554 2013-11-18 Tom Tromey <tromey@redhat.com>
6555
6556 * configure: Rebuild.
6557 * configure.ac: Don't check for stdlib.h.
6558 * gdbreplay.c: Unconditionally include stdlib.h.
6559
6560 2013-11-18 Tom Tromey <tromey@redhat.com>
6561
6562 * config.in: Rebuild.
6563 * configure: Rebuild.
6564 * configure.ac: Don't use AC_HEADER_DIRENT.
6565
6566 2013-11-18 Tom Tromey <tromey@redhat.com>
6567
6568 * server.h: Don't check HAVE_STRING_H.
6569 * gdbreplay.c: Don't check HAVE_STRING_H.
6570 * configure: Rebuild.
6571
6572 2013-11-18 Tom Tromey <tromey@redhat.com>
6573
6574 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6575 LIBGNU.
6576
6577 2013-11-08 Tom Tromey <tromey@redhat.com>
6578
6579 * configure, config.in: Rebuild.
6580 * configure.ac: Remove unused configury.
6581
6582 2013-11-08 Tom Tromey <tromey@redhat.com>
6583
6584 * acinclude.m4: Include common.m4, codeset.m4.
6585 * configure, config.in: Rebuild.
6586 * configure.ac: Use GDB_AC_COMMON.
6587
6588 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6589
6590 * linux-s390-low.c (HWCAP_S390_TE): New define.
6591 (s390_arch_setup): Consider the TE field in the HWCAP for
6592 determining 'have_regset_tdb'.
6593
6594 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6595
6596 PR gdb/16014
6597 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6598 call to sizeof.
6599
6600 2013-10-02 Pedro Alves <palves@redhat.com>
6601
6602 * server.c (process_serial_event): Don't output "GDBserver
6603 exiting" if GDB is connected through stdio.
6604 * target.c (mywait): Likewise, be silent if GDB is connected
6605 through stdio.
6606
6607 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6608
6609 * lynx-low.c (lynx_add_threads_after_attach): New function.
6610 (lynx_attach): Remove call to add_thread. Add call to
6611 lynx_add_threads_after_attach instead.
6612
6613 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6614
6615 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6616 * config.in, configure: Regenerated.
6617
6618 2013-09-18 Yao Qi <yao@codesourcery.com>
6619
6620 PR server/15959
6621 * server.c (start_inferior): Clear 'resume_info'.
6622
6623 2013-09-16 Jiong Wang <jiwang@tilera.com>
6624
6625 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6626 for each register.
6627
6628 2013-09-16 Jiong Wang <jiwang@tilera.com>
6629
6630 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6631 linux-tile-low.o to srv_tgtobj.
6632
6633 2013-09-16 Will Newton <will.newton@linaro.org>
6634
6635 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6636 out regs.
6637
6638 2013-09-06 Pedro Alves <palves@redhat.com>
6639
6640 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6641 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6642 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6643 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6644 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6645 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6646
6647 2013-09-06 Pedro Alves <palves@redhat.com>
6648
6649 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6650 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6651
6652 2013-09-06 Pedro Alves <palves@redhat.com>
6653
6654 * linux-amd64-ipa.c: Include tracepoint.h.
6655 * linux-i386-ipa.c: Include tracepoint.h.
6656
6657 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6658
6659 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6660 (ps_get_thread_area): New function.
6661
6662 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6663
6664 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6665 (initialize_low_arch): Call init_registers_crisv32 rather than
6666 init_register_crisv32.
6667
6668 2013-09-05 Pedro Alves <palves@redhat.com>
6669
6670 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6671 to ...
6672 * hostio.h: ... this new file.
6673 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6674 win32-low.c: Include hostio.h.
6675
6676 2013-09-05 Pedro Alves <palves@redhat.com>
6677
6678 * server.h (gdb_client_data, handler_func, callback_handler_func)
6679 (delete_file_handler, add_file_handler, append_callback_event)
6680 (delete_callback_event, start_event_loop, initialize_event_loop):
6681 Move to event-loop.h and include it.
6682 * event-loop.h: New file.
6683
6684 2013-09-05 Pedro Alves <palves@redhat.com>
6685
6686 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6687 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6688 (loaded_dll, unloaded_dll): Move to ...
6689 * dll.h: ... this new file.
6690 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6691
6692 2013-09-05 Pedro Alves <palves@redhat.com>
6693
6694 * server.h (current_process, get_thread_process, all_processes)
6695 (add_inferior_to_list, for_each_inferior, current_inferior)
6696 (remove_inferior, add_process, remove_process, find_process_pid)
6697 (have_started_inferiors_p, have_attached_inferiors_p)
6698 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6699 (clear_inferiors, find_inferior, find_inferior_id)
6700 (inferior_target_data, set_inferior_target_data)
6701 (inferior_regcache_data, set_inferior_regcache_data): Move to
6702 inferiors.h, and include it.
6703 * inferiors.h: New file.
6704
6705 2013-09-05 Pedro Alves <palves@redhat.com>
6706
6707 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6708 Move ...
6709 * ax.h: ... here.
6710
6711 2013-09-05 Pedro Alves <palves@redhat.com>
6712
6713 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6714 tracepoint.h.
6715 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6716 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6717 (handle_tracepoint_general_set, handle_tracepoint_query)
6718 (tracepoint_finished_step, tracepoint_was_hit)
6719 (release_while_stepping_state_list, current_traceframe)
6720 (in_readonly_region, traceframe_read_mem)
6721 (fetch_traceframe_registers, traceframe_read_sdata)
6722 (traceframe_read_info, struct fast_tpoint_collect_status)
6723 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6724 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6725 (supply_fast_tracepoint_registers)
6726 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6727 (ipa_tdesc, claim_trampoline_space)
6728 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6729 (agent_mem_read, agent_get_trace_state_variable_value)
6730 (agent_set_trace_state_variable_value, agent_tsv_read)
6731 (agent_mem_read_string, get_raw_reg_func_addr)
6732 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6733 * tracepoint.h: ... this new file.
6734
6735 2013-09-05 Pedro Alves <palves@redhat.com>
6736
6737 * server.h (perror_with_name, error, fatal, warning, paddress)
6738 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6739 include it.
6740 * utils.h: New file.
6741
6742 2013-09-05 Pedro Alves <palves@redhat.com>
6743
6744 * server.h (remote_debug, noack_mode, transport_is_reliable)
6745 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6746 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6747 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6748 (write_enn, initialize_async_io, enable_async_io)
6749 (disable_async_io, check_remote_input_interrupt_request)
6750 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6751 (dead_thread_notify, prepare_resume_reply)
6752 (decode_address_to_semicolon, decode_address, decode_m_packet)
6753 (decode_M_packet, decode_X_packet, decode_xfer_write)
6754 (decode_search_memory_packet, unhexify, hexify)
6755 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6756 (look_up_one_symbol, relocate_instruction)
6757 (monitor_output): Move to remote-utils.h, and include it.
6758 * remote-utils.h: New file.
6759
6760 2013-09-05 Pedro Alves <palves@redhat.com>
6761
6762 * server.h (_): Delete.
6763
6764 2013-09-02 Pedro Alves <palves@redhat.com>
6765
6766 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6767 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6768 allocated.
6769 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6770
6771 2013-09-02 Pierre Muller <muller@sourceware.org>
6772
6773 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6774 or WriteProcessMemory complete successfully and handle
6775 ERROR_PARTIAL_COPY error.
6776
6777 2013-09-02 Pedro Alves <palves@redhat.com>
6778
6779 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6780 error instead of EIO.
6781
6782 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6783
6784 PR server/15604
6785 * linux-low.c: Include filestuff.h.
6786 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6787 * lynx-low.c: Include filestuff.h.
6788 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6789 * server.c: Include filestuff.h.
6790 (main): Call notice_open_fds.
6791 * spu-low.c: Include filestuff.h.
6792 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6793
6794 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6795
6796 * Makefile.in: Explain why ../target and ../nat are not
6797 listed as include file search paths.
6798 (linux-waitpid.o): New object file rule.
6799 * configure.srv (srv_native_linux_obj): New variable.
6800 Replace all occurrences of linux native object files with
6801 $srv_native_linux_obj.
6802 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6803 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6804 (linux_enable_event_reporting): Remove declaration.
6805 (my_waitpid): Moved to common/linux-waitpid.c.
6806 (linux_wait_for_event): Pass ptid when calling
6807 linux_enable_event_reporting.
6808 (linux_supports_tracefork_flag): Remove.
6809 (linux_enable_event_reporting): Likewise.
6810 (linux_tracefork_grandchild): Remove.
6811 (STACK_SIZE): Moved to common/linux-ptrace.c.
6812 (linux_tracefork_child): Remove.
6813 (linux_test_for_tracefork): Remove.
6814 (linux_look_up_symbols): Call linux_supports_traceclone.
6815 (initialize_low): Remove call to linux_test_for_tracefork.
6816 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6817 common/linux-ptrace.h.
6818 (PTRACE_TYPE_ARG4): Likewise.
6819 Include linux-ptrace.h.
6820
6821 2013-08-21 Pedro Alves <palves@redhat.com>
6822
6823 * config.in: Renegerate.
6824
6825 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6826
6827 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6828 (SFILES): Remove $(srcdir)/common/target-common.c and
6829 add $(srcdir)/target/waitstatus.c.
6830 (OBS): Remove target-common.o and add waitstatus.o.
6831 (server_h): Remove $(srcdir)/../common/target-common.h and
6832 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6833 and $(srcdir)/../target/waitstatus.h.
6834 (target-common.o): Remove.
6835 (waitstatus.o): New target object file.
6836 * target.h: Do not include target-common.h and
6837 include target/resume.h, target/wait.h and
6838 target/waitstatus.h.
6839
6840 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6841
6842 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6843 to PTRACE_TYPE_ARG3.
6844 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6845 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6846 PTRACE_TYPE_ARG4.
6847 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6848 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6849
6850 2013-07-27 Jie Zhang <jie@codesourcery.com>
6851 Daniel Jacobowitz <dan@codesourcery.com>
6852 Yao Qi <yao@codesourcery.com>
6853
6854 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6855 (mips-linux-watch.o): New rule.
6856 (mips_linux_watch_h): New variable.
6857 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6858 srv_tgtobj.
6859 * linux-mips-low.c: Include mips-linux-watch.h.
6860 (struct arch_process_info, struct arch_lwp_info): New.
6861 (update_watch_registers_callback): New function.
6862 (mips_linux_new_process, mips_linux_new_thread) New functions.
6863 (mips_linux_prepare_to_resume, mips_insert_point): New
6864 functions.
6865 (mips_remove_point, mips_stopped_by_watchpoint): New
6866 functions.
6867 (rsp_bp_type_to_target_hw_bp_type): New function.
6868 (mips_stopped_data_address): New function.
6869 (the_low_target): Add watchpoint support functions.
6870
6871 2013-07-27 Yao Qi <yao@codesourcery.com>
6872
6873 * i386-low.c: Include break-common.h.
6874 (enum target_hw_bp_type): Remove.
6875
6876 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6877
6878 * Makefile.in (SFILES): /common/target-common.c.
6879 (OBS): Add target-common.o.
6880 (server_h): Add $(srcdir)/../common/target-common.h.
6881 (target-common.o): New target.
6882 * server.c (queue_stop_reply_callback): Free
6883 status string after use.
6884 * target.c (target_waitstatus_to_string): Remove.
6885 * target.h: Include target-common.h.
6886 (resume_kind): Likewise.
6887 (target_waitkind): Likewise.
6888 (target_waitstatus): Likewise.
6889 (TARGET_WNOHANG): Likewise.
6890
6891 2013-07-04 Yao Qi <yao@codesourcery.com>
6892
6893 * Makefile.in (host_alias): Use @host_noncanonical@.
6894 (target_alias): Use @target_noncanonical@.
6895 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6896 ACX_NONCANONICAL_HOST.
6897 * configure: Regenerated.
6898
6899 Revert:
6900 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6901
6902 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6903 * configure: Rebuild.
6904 * Makefile.in (version_host, version_target): Get from configure.
6905 (version.c): Use $(version_host) and $(version_target).
6906
6907 2013-07-03 Pedro Alves <palves@redhat.com>
6908
6909 * Makefile.in (config.status): Depend on development.sh.
6910 * acinclude.m4: Include libmcheck.m4.
6911 * configure: Regenerate.
6912
6913 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6914
6915 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6916 attribute inside the parentheses.
6917 (winapi_DebugSetProcessKillOnExit): Ditto.
6918 (winapi_DebugBreakProcess): Ditto.
6919 (winapi_GenerateConsoleCtrlEvent): Ditto.
6920
6921 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6922
6923 * notif.h (notif_event): Add a dummy member to avoid compiler
6924 errors.
6925
6926 2013-07-01 Pedro Alves <palves@redhat.com>
6927
6928 * hostio.c (HOSTIO_PATH_MAX): Define.
6929 (require_filename, handle_open, handle_unlink, handle_readlink):
6930 Use it.
6931
6932 2013-07-01 Pedro Alves <palves@redhat.com>
6933
6934 * server.h: Include "pathmax.h".
6935 * linux-low.c: Don't include sys/param.h.
6936 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6937 MAXPATHLEN.
6938 * win32-low.c: Don't include sys/param.h.
6939 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6940
6941 2013-07-01 Pedro Alves <palves@redhat.com>
6942
6943 * event-loop.c: Don't check HAVE_UNISTD_H before including
6944 <unistd.h>.
6945 * gdbreplay.c: Likewise.
6946 * remote-utils.c: Likewise.
6947 * server.c: Likewise.
6948 * configure.ac: Don't check for unistd.h.
6949 * configure: Regenerate.
6950
6951 2013-06-28 Tom Tromey <tromey@redhat.com>
6952
6953 * Makefile.in (version.c): Use version.in, not
6954 common/version.in.
6955
6956 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6957
6958 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6959 * configure: Rebuild.
6960 * Makefile.in (version_host, version_target): Get from configure.
6961 (version.c): Use $(version_host) and $(version_target).
6962
6963 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6964
6965 Fix trace-status to output user name without trailing colon.
6966 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6967
6968 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6969
6970 Fix trace-status to output proper start-time and stop-time.
6971 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6972 output start time and stop time in hex as gdb expects.
6973
6974 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6975
6976 * tracepoint.c (build_traceframe_info_xml): Output trace state
6977 variables present in the trace buffer.
6978
6979 2013-06-24 Tom Tromey <tromey@redhat.com>
6980
6981 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6982 create-version.sh.
6983 (version.o): Remove.
6984 * gdbreplay.c: Include version.h.
6985 (version, host_name): Don't declare.
6986 * server.h: Include version.h.
6987 (version, host_name): Don't declare.
6988
6989 2013-06-12 Pedro Alves <palves@redhat.com>
6990
6991 * linux-x86-low.c (linux_is_elf64): Delete global.
6992 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6993 with local linux_pid_exe_is_elf_64_file use.
6994
6995 2013-06-11 Pedro Alves <palves@redhat.com>
6996
6997 * linux-low.c (regset_disabled, disable_regset): New functions.
6998 (regsets_fetch_inferior_registers)
6999 (regsets_store_inferior_registers): Use them.
7000 (initialize_regsets_info); Don't allocate the disabled_regsets
7001 array here.
7002 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7003 comment.
7004
7005 2013-06-11 Pedro Alves <palves@redhat.com>
7006
7007 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7008 xmalloc.
7009
7010 2013-06-11 Pedro Alves <palves@redhat.com>
7011
7012 * linux-x86-low.c (initialize_low_arch): Call
7013 init_registers_x32_avx_linux.
7014
7015 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7016
7017 Fix compatibility with Android Bionic.
7018 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7019 it is not empty.
7020
7021 2013-06-07 Pedro Alves <palves@redhat.com>
7022
7023 PR server/14823
7024 * Makefile.in (OBS): Add tdesc.o.
7025 (IPA_OBJS): Add tdesc-ipa.o.
7026 (tdesc-ipa.o): New rule.
7027 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7028 interface.
7029 * linux-low.c (new_inferior): Delete.
7030 (disabled_regsets, num_regsets): Delete.
7031 (linux_add_process): Adjust to set the new per-process
7032 new_inferior flag.
7033 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7034 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7035 was a stop. When calling arch_setup, switch the current inferior
7036 to the thread that got an event.
7037 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7038 (regsets_fetch_inferior_registers)
7039 (regsets_store_inferior_registers): New regsets_info parameter.
7040 Adjust to use it.
7041 (linux_register_in_regsets): New regs_info parameter. Adjust to
7042 use it.
7043 (register_addr, fetch_register, store_register): New usrregs_info
7044 parameter. Adjust to use it.
7045 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7046 parameter regs_info. Adjust to use it.
7047 (linux_fetch_registers): Get the current inferior's regs_info, and
7048 adjust to use it.
7049 (linux_store_registers): Ditto.
7050 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7051 (initialize_low): Don't initialize the target_regsets here. Call
7052 initialize_low_arch.
7053 * linux-low.h (target_regsets): Delete declaration.
7054 (struct regsets_info): New.
7055 (struct usrregs_info): New.
7056 (struct regs_info): New.
7057 (struct process_info_private) <new_inferior>: New field.
7058 (struct linux_target_ops): Delete the num_regs, regmap, and
7059 regset_bitmap fields. New field regs_info.
7060 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7061 * i387-fp.c (num_xmm_registers): Delete.
7062 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7063 calls to new interface.
7064 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7065 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7066 Infer the number of xmm registers from the regcache's target
7067 description.
7068 * i387-fp.h (num_xmm_registers): Delete.
7069 * inferiors.c (add_thread): Don't install the thread's regcache
7070 here.
7071 * proc-service.c (gregset_info): Fetch the current inferior's
7072 regs_info. Adjust to use it.
7073 * regcache.c: Include tdesc.h.
7074 (register_bytes, reg_defs, num_registers)
7075 (gdbserver_expedite_regs): Delete.
7076 (get_thread_regcache): If the thread doesn't have a regcache yet,
7077 create one, instead of aborting gdbserver.
7078 (regcache_invalidate_one): Rename to ...
7079 (regcache_invalidate_thread): ... this.
7080 (regcache_invalidate_one): New.
7081 (regcache_invalidate): Only invalidate registers of the current
7082 process.
7083 (init_register_cache): Add target_desc parameter, and use it.
7084 (new_register_cache): Ditto. Assert the target description has a
7085 non zero registers_size.
7086 (regcache_cpy): Add assertions. Adjust.
7087 (realloc_register_cache, set_register_cache): Delete.
7088 (registers_to_string, registers_from_string): Adjust.
7089 (find_register_by_name, find_regno, find_register_by_number)
7090 (register_cache_size): Add target_desc parameter, and use it.
7091 (free_register_cache_thread, free_register_cache_thread_one)
7092 (regcache_release, register_cache_size): New.
7093 (register_size): Add target_desc parameter, and use it.
7094 (register_data, supply_register, supply_register_zeroed)
7095 (supply_regblock, supply_register_by_name, collect_register)
7096 (collect_register_as_string, collect_register_by_name): Adjust.
7097 * regcache.h (struct target_desc): Forward declare.
7098 (struct regcache) <tdesc>: New field.
7099 (init_register_cache, new_register_cache): Add target_desc
7100 parameter.
7101 (regcache_invalidate_thread): Declare.
7102 (regcache_invalidate_one): Delete declaration.
7103 (regcache_release): Declare.
7104 (find_register_by_number, register_cache_size, register_size)
7105 (find_regno): Add target_desc parameter.
7106 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7107 declarations.
7108 * remote-utils.c: Include tdesc.h.
7109 (outreg, prepare_resume_reply): Adjust.
7110 * server.c: Include tdesc.h.
7111 (gdbserver_xmltarget): Delete declaration.
7112 (get_features_xml, process_serial_event): Adjust.
7113 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7114 declare.
7115 (struct process_info) <tdesc>: New field.
7116 (ipa_tdesc): Declare.
7117 * tdesc.c: New file.
7118 * tdesc.h: New file.
7119 * tracepoint.c: Include tdesc.h.
7120 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7121 (get_context_regcache): Adjust to pass ipa_tdesc down.
7122 (do_action_at_tracepoint): Adjust to get the register cache size
7123 from the context regcache's description.
7124 (traceframe_walk_blocks): Adjust to get the register cache size
7125 from the current trace frame's description.
7126 (traceframe_get_pc): Adjust to get current trace frame's
7127 description and pass it down.
7128 (gdb_collect): Adjust to get the register cache size from the
7129 IPA's description.
7130 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7131 (gdbserver_xmltarget): Delete.
7132 (initialize_low_tracepoint): Set the ipa's target description.
7133 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7134 (initialize_low_tracepoint): Set the ipa's target description.
7135 * linux-x86-low.c: Include tdesc.h.
7136 [__x86_64__] (is_64bit_tdesc): New.
7137 (ps_get_thread_area, x86_get_thread_area): Use it.
7138 (i386_cannot_store_register): Rename to ...
7139 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7140 (i386_cannot_fetch_register): Rename to ...
7141 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7142 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7143 to new interface.
7144 (target_regsets): Rename to ...
7145 (x86_regsets): ... this.
7146 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7147 interface.
7148 (x86_siginfo_fixup): Use is_64bit_tdesc.
7149 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7150 (tdesc_x32_avx_linux, tdesc_x32_linux)
7151 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7152 Declare.
7153 (x86_linux_update_xmltarget): Delete.
7154 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7155 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7156 (AMD64_LINUX_USER64_CS): New.
7157 (x86_linux_read_description): New, based on
7158 x86_linux_update_xmltarget.
7159 (same_process_callback): New.
7160 (x86_arch_setup_process_callback): New.
7161 (x86_linux_update_xmltarget): New.
7162 (x86_regsets_info): New.
7163 (amd64_linux_regs_info): New.
7164 (i386_linux_usrregs_info): New.
7165 (i386_linux_regs_info): New.
7166 (x86_linux_regs_info): New.
7167 (x86_arch_setup): Reimplement.
7168 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7169 (x86_emit_ops): Ditto.
7170 (the_low_target): Adjust. Install x86_linux_regs_info,
7171 x86_cannot_fetch_register, and x86_cannot_store_register.
7172 (initialize_low_arch): New.
7173 * linux-ia64-low.c (tdesc_ia64): Declare.
7174 (ia64_fetch_register): Adjust.
7175 (ia64_usrregs_info, regs_info): New globals.
7176 (ia64_regs_info): New function.
7177 (the_low_target): Adjust.
7178 (initialize_low_arch): New function.
7179 * linux-sparc-low.c (tdesc_sparc64): Declare.
7180 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7181 Adjust.
7182 (sparc_arch_setup): New function.
7183 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7184 (the_low_target): Adjust.
7185 (initialize_low_arch): New function.
7186 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7187 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7188 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7189 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7190 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7191 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7192 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7193 (tdesc_powerpc_isa205_vsx64l): Declare.
7194 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7195 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7196 (ppc_set_pc, ppc_get_hwcap): Adjust.
7197 (ppc_usrregs_info): Forward declare.
7198 (!__powerpc64__) ppc_regmap_adjusted: New global.
7199 (ppc_arch_setup): Adjust to the current process'es target
7200 description.
7201 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7202 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7203 (ppc_store_evrregset): Adjust.
7204 (target_regsets): Rename to ...
7205 (ppc_regsets): ... this, and make static.
7206 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7207 (ppc_regs_info): New function.
7208 (the_low_target): Adjust.
7209 (initialize_low_arch): New function.
7210 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7211 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7212 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7213 (tdesc_s390x_linux64v2): Declare.
7214 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7215 (s390_fill_gregset, s390_store_last_break): Adjust.
7216 (target_regsets): Rename to ...
7217 (s390_regsets): ... this, and make static.
7218 (s390_get_pc, s390_set_pc): Adjust.
7219 (s390_get_hwcap): New target_desc parameter, and use it.
7220 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7221 (s390_arch_setup): Adjust to set the current process'es target
7222 description. Don't adjust the regmap.
7223 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7224 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7225 (regs_info_3264): New globals.
7226 (s390_regs_info): New function.
7227 (the_low_target): Adjust.
7228 (initialize_low_arch): New function.
7229 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7230 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7231 [__mips64] (init_registers_mips_linux)
7232 (init_registers_mips_dsp_linux): Delete defines.
7233 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7234 (have_dsp): New global.
7235 (mips_read_description): New, based on mips_arch_setup.
7236 (mips_arch_setup): Reimplement.
7237 (get_usrregs_info): New function.
7238 (mips_cannot_fetch_register, mips_cannot_store_register)
7239 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7240 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7241 (target_regsets): Rename to ...
7242 (mips_regsets): ... this, and make static.
7243 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7244 (dsp_regs_info, regs_info): New globals.
7245 (mips_regs_info): New function.
7246 (the_low_target): Adjust.
7247 (initialize_low_arch): New function.
7248 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7249 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7250 Declare.
7251 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7252 (arm_read_description): New, with bits factored from
7253 arm_arch_setup.
7254 (arm_arch_setup): Reimplement.
7255 (target_regsets): Rename to ...
7256 (arm_regsets): ... this, and make static.
7257 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7258 (arm_regs_info): New function.
7259 (the_low_target): Adjust.
7260 (initialize_low_arch): New function.
7261 * linux-m68k-low.c (tdesc_m68k): Declare.
7262 (target_regsets): Rename to ...
7263 (m68k_regsets): ... this, and make static.
7264 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7265 (m68k_regs_info): New function.
7266 (m68k_arch_setup): New function.
7267 (the_low_target): Adjust.
7268 (initialize_low_arch): New function.
7269 * linux-sh-low.c (tdesc_sharch): Declare.
7270 (target_regsets): Rename to ...
7271 (sh_regsets): ... this, and make static.
7272 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7273 (sh_regs_info, sh_arch_setup): New functions.
7274 (the_low_target): Adjust.
7275 (initialize_low_arch): New function.
7276 * linux-bfin-low.c (tdesc_bfin): Declare.
7277 (bfin_arch_setup): New function.
7278 (bfin_usrregs_info, regs_info): New globals.
7279 (bfin_regs_info): New function.
7280 (the_low_target): Adjust.
7281 (initialize_low_arch): New function.
7282 * linux-cris-low.c (tdesc_cris): Declare.
7283 (cris_arch_setup): New function.
7284 (cris_usrregs_info, regs_info): New globals.
7285 (cris_regs_info): New function.
7286 (the_low_target): Adjust.
7287 (initialize_low_arch): New function.
7288 * linux-cris-low.c (tdesc_crisv32): Declare.
7289 (cris_arch_setup): New function.
7290 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7291 (cris_regs_info): New function.
7292 (the_low_target): Adjust.
7293 (initialize_low_arch): New function.
7294 * linux-m32r-low.c (tdesc_m32r): Declare.
7295 (m32r_arch_setup): New function.
7296 (m32r_usrregs_info, regs_info): New globals.
7297 (m32r_regs_info): Adjust.
7298 (initialize_low_arch): New function.
7299 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7300 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7301 (tic6x_usrregs_info): Forward declare.
7302 (tic6x_read_description): New function, based on ...
7303 (tic6x_arch_setup): ... this. Reimplement.
7304 (target_regsets): Rename to ...
7305 (tic6x_regsets): ... this, and make static.
7306 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7307 (tic6x_regs_info): New function.
7308 (the_low_target): Adjust.
7309 (initialize_low_arch): New function.
7310 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7311 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7312 (target_regsets): Rename to ...
7313 (xtensa_regsets): ... this, and make static.
7314 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7315 globals.
7316 (xtensa_arch_setup, xtensa_regs_info): New functions.
7317 (the_low_target): Adjust.
7318 (initialize_low_arch): New function.
7319 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7320 (nios2_arch_setup): Set the current process'es tdesc.
7321 (target_regsets): Rename to ...
7322 (nios2_regsets): ... this.
7323 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7324 (nios2_regs_info): New function.
7325 (the_low_target): Adjust.
7326 (initialize_low_arch): New function.
7327 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7328 (aarch64_arch_setup): Set the current process'es tdesc.
7329 (target_regsets): Rename to ...
7330 (aarch64_regsets): ... this.
7331 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7332 (aarch64_regs_info): New function.
7333 (the_low_target): Adjust.
7334 (initialize_low_arch): New function.
7335 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7336 globals.
7337 (target_regsets): Rename to ...
7338 (tile_regsets): ... this.
7339 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7340 (tile_regs_info): New function.
7341 (tile_arch_setup): Set the current process'es tdesc.
7342 (the_low_target): Adjust.
7343 (initialize_low_arch): New function.
7344 * spu-low.c (tdesc_spu): Declare.
7345 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7346 * win32-arm-low.c (tdesc_arm): Declare.
7347 (arm_arch_setup): New function.
7348 (the_low_target): Install arm_arch_setup instead of
7349 init_registers_arm.
7350 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7351 (init_windows_x86): Rename to ...
7352 (i386_arch_setup): ... this. Set `win32_tdesc'.
7353 (the_low_target): Adjust.
7354 * win32-low.c (win32_tdesc): New global.
7355 (child_add_thread): Don't create the thread cache here.
7356 (do_initial_child_stuff): Set the new process'es tdesc.
7357 * win32-low.h (struct target_desc): Forward declare.
7358 (win32_tdesc): Declare.
7359 * lynx-i386-low.c (tdesc_i386): Declare global.
7360 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7361 * lynx-low.c (lynx_tdesc): New global.
7362 (lynx_add_process): Set the new process'es tdesc.
7363 * lynx-low.h (struct target_desc): Forward declare.
7364 (lynx_tdesc): Declare global.
7365 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7366 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7367 * nto-low.c (nto_tdesc): New global.
7368 (do_attach): Set the new process'es tdesc.
7369 * nto-low.h (struct target_desc): Forward declare.
7370 (nto_tdesc): Declare.
7371 * nto-x86-low.c (tdesc_i386): Declare.
7372 (nto_x86_arch_setup): Set `nto_tdesc'.
7373
7374 2013-06-04 Gary Benson <gbenson@redhat.com>
7375
7376 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7377 to qSupported response when appropriate.
7378 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7379 with nonzero-length annex.
7380 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7381 arguments supplied in annex.
7382
7383 2013-05-31 Doug Evans <dje@google.com>
7384
7385 PR server/15594
7386 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7387 64 bits in 64-cross-32 environment.
7388
7389 2013-05-28 Pedro Alves <palves@redhat.com>
7390
7391 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7392 (aarch64-without-fpu.c): Delete rule.
7393 * configure.srv (aarch64*-*-linux*): Remove references to
7394 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7395 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7396 declaration.
7397
7398 2013-05-24 Pedro Alves <palves@redhat.com>
7399
7400 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7401 instead of strchr/decode_address. Error if the range isn't split
7402 with a ','. Don't assume there's be a ':' in the action.
7403
7404 2013-05-23 Yao Qi <yao@codesourcery.com>
7405 Pedro Alves <palves@redhat.com>
7406
7407 * linux-low.c (lwp_in_step_range): New function.
7408 (linux_wait_1): If the thread was range stepping and stopped
7409 outside the stepping range, report the stop to GDB. Otherwise,
7410 continue stepping. Add range stepping debug output.
7411 (linux_set_resume_request): Copy the step range from the resume
7412 request to the lwp.
7413 (linux_supports_range_stepping): New.
7414 (linux_target_ops) <supports_range_stepping>: Set to
7415 linux_supports_range_stepping.
7416 * linux-low.h (struct linux_target_ops)
7417 <supports_range_stepping>: New field.
7418 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7419 * linux-x86-low.c (x86_supports_range_stepping): New.
7420 (the_low_target) <supports_range_stepping>: Set to
7421 x86_supports_range_stepping.
7422 * server.c (handle_v_cont): Handle 'r' action.
7423 (handle_v_requests): Append ";r" if the target supports range
7424 stepping.
7425 * target.h (struct thread_resume) <step_range_start,
7426 step_range_end>: New fields.
7427 (struct target_ops) <supports_range_stepping>:
7428 New field.
7429 (target_supports_range_stepping): New macro.
7430
7431 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7432
7433 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7434 confusion in comment.
7435
7436 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7437
7438 * lynx-low.c (struct process_info_private): New type.
7439 (lynx_add_process): New function.
7440 (lynx_create_inferior, lynx_attach): Replace calls to
7441 add_process by calls to lynx_add_process.
7442 (lynx_resume): If PTID is null, then try using
7443 current_process()->private->last_wait_event_ptid.
7444 Add comments.
7445 (lynx_clear_inferiors): Delete. The contents of that function
7446 has been inlined in lynx_mourn;
7447 (lynx_wait_1): Save the ptid in the process's private data.
7448 (lynx_mourn): Free the process' private data. Replace call
7449 to lynx_clear_inferiors by call to clear_inferiors.
7450
7451 2013-05-17 Yao Qi <yao@codesourcery.com>
7452
7453 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7454 the right place.
7455
7456 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7457
7458 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7459 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7460 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7461 PT_TEXT_END_ADDR guards. Update comments.
7462 (linux_target_op) <read_offsets>: Conditionally define to
7463 linux_read_offsets if the target is UCLIBC and if it defines
7464 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7465
7466 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7467 Andrew Jenner <andrew@codesourcery.com>
7468
7469 * Makefile.in (SFILES): Add linux-nios2-low.c.
7470 (clean): Add action to delete nios2-linux.c.
7471 (nios2-linux.c): New rule.
7472 * configure.srv: Add nios2*-*-linux*.
7473 * linux-nios2-low.c: New.
7474
7475 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7476
7477 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7478
7479 2013-04-25 Hui Zhu <hui@codesourcery.com>
7480
7481 PR gdb/15186
7482 * ax.c (ax_printf): Add fflush.
7483
7484 2013-04-22 Tom Tromey <tromey@redhat.com>
7485
7486 * Makefile.in (SFILES): Add filestuff.c.
7487 (OBS): Add filestuff.o.
7488 (filestuff.o): New target.
7489 * config.in, configure: Rebuild.
7490 * configure.ac: Check for fdwalk, pipe2.
7491
7492 2013-04-17 Pedro Alves <palves@redhat.com>
7493
7494 * configure.ac (USE_THREAD_DB): Delete variable.
7495 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7496 Don't AC_SUBST USE_THREAD_DB.
7497 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7498 * config.in, configure: Regenerate.
7499
7500 2013-04-16 Pedro Alves <palves@redhat.com>
7501
7502 * linux-low.h (struct lwp_info) <thread_known>: Move under
7503 the USE_THREAD_DB #ifdef.
7504
7505 2013-04-16 Pedro Alves <palves@redhat.com>
7506
7507 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7508 (linux-low.o): Delete rule.
7509 * linux-low.h: Always include "gdb_thread_db.h" instead of
7510 conditionally including thread_db.h.
7511 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7512 HAVE_THREAD_DB_H.
7513
7514 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7515
7516 * Makefile.in (install-only): Fix make install regression.
7517
7518 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7519
7520 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7521 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7522 installation.
7523 * gdbserver.1: Remove.
7524
7525 2013-03-22 Pedro Alves <palves@redhat.com>
7526
7527 * linux-low.c (handle_extended_wait): Don't call
7528 linux_enable_event_reporting.
7529
7530 2013-03-15 Tony Theodore <tonyt@logyst.com>
7531
7532 PR build/9098:
7533 * Makefile.in (SHELL): Use @SHELL@.
7534
7535 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7536
7537 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7538 compiler warning.
7539
7540 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7541
7542 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7543 Remove extraneous NULL element.
7544
7545 2013-03-13 Yao Qi <yao@codesourcery.com>
7546
7547 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7548 'V' block in trace frame.
7549
7550 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7551
7552 * target.h (struct target_ops): Add btrace ops.
7553 (target_supports_btrace): New macro.
7554 (target_enable_btrace): New macro.
7555 (target_disable_btrace): New macro.
7556 (target_read_btrace): New macro.
7557 * gdbthread.h (struct thread_info): Add btrace field.
7558 * server.c: Include btrace-common.h.
7559 (handle_btrace_general_set): New function.
7560 (handle_btrace_enable): New function.
7561 (handle_btrace_disable): New function.
7562 (handle_general_set): Call handle_btrace_general_set.
7563 (handle_qxfer_btrace): New function.
7564 (struct qxfer qxfer_packets[]): Add btrace entry.
7565 * inferiors.c (remove_thread): Disable btrace.
7566 * linux-low: Include linux-btrace.h.
7567 (linux_low_enable_btrace): New function.
7568 (linux_low_read_btrace): New function.
7569 (linux_target_ops): Add btrace ops.
7570 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7571 Add srv_linux_btrace=yes.
7572 (x86_64-*-linux*): Add linux-btrace.o.
7573 Add srv_linux_btrace=yes.
7574 * configure.ac: Define HAVE_LINUX_BTRACE.
7575 * config.in: Regenerated.
7576 * configure: Regenerated.
7577
7578 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7579
7580 * server.c (handle_qxfer): Preserve error message if -3 is
7581 returned.
7582 (qxfer): Document the -3 return value.
7583
7584 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7585
7586 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7587 (linux_btrace_h): New variable.
7588 (linux-btrace.o): New rule.
7589
7590 2013-03-08 Stan Shebs <stan@codesourcery.com>
7591 Hafiz Abid Qadeer <abidh@codesourcery.com>
7592
7593 * tracepoint.c (trace_buffer_size): New global.
7594 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7595 (init_trace_buffer): Change to one-argument function. Allocate
7596 trace buffer memory.
7597 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7598 handle QTBuffer:size packet.
7599 (cmd_bigqtbuffer_size): New function.
7600 (initialize_tracepoint): Call init_trace_buffer with
7601 DEFAULT_TRACE_BUFFER_SIZE.
7602 * server.c (handle_query): Add QTBuffer:size in the
7603 supported packets.
7604
7605 2013-03-07 Yao Qi <yao@codesourcery.com>
7606
7607 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7608 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7609 of -1.
7610 (cmd_qtsp): Adjust condition. Do post increment.
7611 Set cur_action and cur_step_action back to 0.
7612
7613 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7614
7615 PR server/15236
7616 * linux-low.c (linux_write_memory): Return early success if LEN is
7617 zero.
7618
7619 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7620
7621 * configure.srv: Add x86_64-*-cygwin* as target.
7622
7623 2013-02-28 Tom Tromey <tromey@redhat.com>
7624
7625 * configure.ac: Invoke AC_SYS_LARGEFILE.
7626 * configure, config.in: Rebuild.
7627
7628 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7629
7630 * win32-low.c: Throughout, fix format strings and casts of
7631 printf-like functions to avoid type related warnings on all
7632 platforms.
7633 (get_child_debug_event): Print dwDebugEventCode as hex since
7634 that's how it's usually documented.
7635
7636 2013-02-28 Yao Qi <yao@codesourcery.com>
7637
7638 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7639 pulongest.
7640
7641 2013-02-27 Jiong Wang <jiwang@tilera.com>
7642
7643 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7644 (reg-tilegx32.c): New rule.
7645 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7646 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7647 different register info initializer according to elf class.
7648 (init_registers_tilgx32): New function. The tilegx32 register info
7649 initializer.
7650 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7651 (tile_store_gregset): Likewise.
7652
7653 2013-02-27 Yao Qi <yao@codesourcery.com>
7654
7655 * server.c (process_point_options): Print debug message when
7656 debug_threads is true.
7657
7658 2013-02-26 Yao Qi <yao@codesourcery.com>
7659
7660 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7661
7662 2013-02-19 Pedro Alves <palves@redhat.com>
7663 Kai Tietz <ktietz@redhat.com>
7664
7665 PR gdb/15161
7666
7667 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7668 instead of strtoul to extract address from packet.
7669 (process_serial_event) <'z'>: Likewise.
7670
7671 2013-02-18 Yao Qi <yao@codesourcery.com>
7672
7673 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7674
7675 2013-02-14 Pedro Alves <palves@redhat.com>
7676
7677 Plug memory leak.
7678
7679 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7680 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7681
7682 2013-02-14 Pedro Alves <palves@redhat.com>
7683
7684 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7685
7686 2013-02-14 Pedro Alves <palves@redhat.com>
7687
7688 * tracepoint.c (save_string): Delete.
7689 (add_tracepoint_action): Use savestring instead of save_string.
7690
7691 2013-02-12 Pedro Alves <palves@redhat.com>
7692
7693 * linux-xtensa-low.c: Ditto.
7694 * xtensa-xtregs.c: Ditto.
7695
7696 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7697
7698 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7699 thread_db.
7700
7701 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7702
7703 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7704 aarch64_num_wp_regs and aarch64_num_bp_regs to
7705 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7706
7707 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7708
7709 * linux-aarch64-low.c (ps_get_thread_area): Replace
7710 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7711
7712 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7713 Marcus Shawcroft <marcus.shawcroft@arm.com>
7714 Nigel Stephens <nigel.stephens@arm.com>
7715 Yufeng Zhang <yufeng.zhang@arm.com>
7716
7717 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7718 (aarch64.c, aarch64-without-fpu.c): New targets.
7719 * configure.srv (aarch64*-*-linux*): New.
7720 * linux-aarch64-low.c: New file.
7721
7722 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7723
7724 * linux-low.c (handle_extended_wait, linux_create_inferior)
7725 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7726 (dequeue_one_deferred_signal, linux_resume_one_thread)
7727 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7728 (linux_tracefork_grandchild, linux_test_for_tracefork)
7729 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7730 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7731 where the argument is 0.
7732
7733 2013-01-25 Yao Qi <yao@codesourcery.com>
7734
7735 * event-loop.c: Include "queue.h".
7736 (gdb_event_p): New typedef.
7737 (struct gdb_event) <next_event>: Remove.
7738 (event_queue): Change to QUEUE(gdb_event_p).
7739 (async_queue_event): Remove.
7740 (gdb_event_xfree): New.
7741 (initialize_event_loop): New.
7742 (process_event): Use API from QUEUE.
7743 (wait_for_event): Likewise.
7744 * server.c (main): Call initialize_event_loop.
7745 * server.h (initialize_event_loop): Declare.
7746
7747 2013-01-18 Yao Qi <yao@codesourcery.com>
7748
7749 * ax.h (struct eval_agent_expr_context): New.
7750 (gdb_eval_agent_expr): Update declaration.
7751 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7752 TFRAME. Add new argument CTX.
7753 * server.h (struct eval_agent_expr_context): Declare.
7754 (agent_mem_read, agent_tsv_read): Update declaration.
7755 (agent_mem_read_string): Likewise.
7756 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7757 (add_traceframe_block): Add new argument TPOINT.
7758 Increase TPOINT->traceframe_usage.
7759 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7760 eval_tracepoint_agent_expr.
7761 (condition_true_at_tracepoint): Likewise.
7762 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7763 (agent_mem_read_string, agent_tsv_read): Likewise.
7764
7765 2013-01-16 Yao Qi <yao@codesourcery.com>
7766
7767 * linux-low.c (linux_resume_one_lwp): Don't check
7768 'lwp->bp_reinsert != 0'.
7769
7770 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7771 Pedro Alves <palves@redhat.com>
7772
7773 * lynx-low.c (ptrace_request_to_str): Define a temporary
7774 macro and use it to simplify this function's implementation.
7775
7776 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7777
7778 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7779 sets errno.
7780
7781 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7782
7783 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7784
7785 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7786
7787 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7788
7789 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7790
7791 * lynx-low.c (lynx_resume): Use the resume_info parameter
7792 to determine the ptid for the lynx_ptrace call, unless
7793 it is equal to minus_one_ptid, in which case we use the
7794 ptid of the current_inferior.
7795 (lynx_wait_1): After having received a thread create/exit
7796 event, resume the inferior's execution using the signaling
7797 thread's ptid, rather than the old ptid.
7798
7799 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7800
7801 * lynx-low.c (lynx_resume): Delete variable ret.
7802
7803 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7804
7805 * gdbreplay.c (gdbreplay_version): Update copyright year.
7806 * server.c (gdbserver_version): Likewise.
7807
7808 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7809
7810 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7811 new thread.
7812
7813 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7814
7815 * lynx-low.c (ptrace_request_to_str): Add handling for
7816 PTRACE_GETTRACESIG.
7817
7818 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7819
7820 * lynx-low.c (lynx_attach): Delete variable new_process.
7821
7822 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7823
7824 * lynx-low.c (lynx_create_inferior): Delete variable
7825 new_process.
7826
7827 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7828
7829 * lynx-low.c (ptrace_request_to_str): Do not handle
7830 PTRACE_GETTHREADLIST if this macro does not exist.
7831
7832 2012-12-15 Yao Qi <yao@codesourcery.com>
7833
7834 * Makefile.in (OBS): Add notif.o.
7835 * notif.c, notif.h: New.
7836 * server.c: Include "notif.h".
7837 (struct vstop_notif) <next>: Remove.
7838 <base>: New field.
7839 (queue_stop_reply): Update.
7840 (push_event, send_next_stop_reply): Remove.
7841 (discard_queued_stop_replies): Update.
7842 (notif_stop): New variable.
7843 (handle_v_stopped): Remove.
7844 (handle_v_requests): Don't call handle_v_stopped. Call
7845 handle_ack_notif instead.
7846 (queue_stop_reply_callback): Call notif_event_enque instead
7847 of queue_stop_reply.
7848 (handle_status): Don't call send_next_stop_reply, call
7849 notif_write_event instead.
7850 (kill_inferior_callback): Likewise.
7851 (detach_or_kill_inferior_callback): Likewise.
7852 (main): Call initialize_notif.
7853 (process_serial_event): Call QUEUE_is_empty.
7854 (handle_target_event): Call notif_push instead of push event.
7855 * server.h (push_event): Remove declaration.
7856
7857 2012-12-10 Tom Tromey <tromey@redhat.com>
7858
7859 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7860 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7861 macros.
7862 (.c.o): Rewrite.
7863 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7864 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7865 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7866 (amd64-linux-ipa.o, ax.o): Rewrite.
7867 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7868 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7869 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7870 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7871 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7872 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7873 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7874 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7875 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7876 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7877 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7878 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7879 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7880 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7881 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7882 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7883 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7884 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7885 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7886 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7887 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7888 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7889 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7890 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7891 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7892 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7893 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7894 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7895 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7896 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7897 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7898 (reg-tilegx.o): Remove.
7899 (all_object_files): New macro.
7900 Include .deps files.
7901 * aclocal.m4, configure: Rebuild.
7902 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7903 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7904 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7905
7906 2012-12-05 Tom Tromey <tromey@redhat.com>
7907
7908 PR gdb/14917:
7909 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7910
7911 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7912
7913 * configure.ac: Check for linux/perf_event.h.
7914 * config.in: Regenerated.
7915 * configure: Regenerated.
7916
7917 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7918
7919 * hostio.c (handle_readlink): Decrease buffer size
7920 parameter passed to readlink by one byte.
7921
7922 2012-11-26 Yao Qi <yao@codesourcery.com>
7923
7924 * configure.ac (build_warnings): Append '-Wempty-body'.
7925 * configure: Regenerated.
7926 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7927 body.
7928
7929 2012-11-15 Pierre Muller <muller@sourceware.org>
7930
7931 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7932 * config.in: Regenerate.
7933 * configure: Regenerate.
7934 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7935 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7936 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7937 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7938 header.
7939 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7940 instead of <sys/wait.h> header.
7941 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7942
7943 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7944
7945 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7946 (various make rules): Remove -DGDBSERVER
7947
7948 2012-11-09 Yao Qi <yao@codesourcery.com>
7949
7950 * spu-low.c (current_ptid): Move it to ..
7951 * gdbthread.h: ... here. New.
7952 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7953 * server.c (myresume, process_serial_event): Likewise.
7954 * thread-db.c (thread_db_find_new_threads): Likewise.
7955 * tracepoint.c (run_inferior_command): Likewise.
7956
7957 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7958
7959 * server.c (handle_search_memory_1): Include access length in
7960 warning message.
7961
7962 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7963
7964 * linux-crisv32-low.c: Fix compile errors.
7965
7966 2012-09-04 Yao Qi <yao@codesourcery.com>
7967
7968 * tracepoint.c (cmd_qtsv): Adjust debug message.
7969 Don't check CUR_TPOINT.
7970
7971 2012-08-28 Yao Qi <yao@codesourcery.com>
7972
7973 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7974 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7975 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7976 Remove declarations of xmalloc, xreallloc, xstrdup and
7977 freeargv.
7978 * Makefile.in (libiberty_h): New.
7979 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7980 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7981
7982 2012-08-23 Yao Qi <yao@codesourcery.com>
7983
7984 * server.h: Remove declaration of 'xsnprintf'.
7985
7986 2012-08-22 Keith Seitz <keiths@redhat.com>
7987
7988 * server.h: Include build-gnulib-gbserver/config.h.
7989 * gdbreplay.c: Likewise.
7990
7991 2012-08-08 Doug Evans <dje@google.com>
7992
7993 * Makefile.in (SFILES): Add gdb_vecs.c.
7994 (OBS): Add gdb_vecs.o.
7995 (gdb_vecs_h, host_defs_h): New variables.
7996 (thread-db.o): Add $(gdb_vecs_h) dependency.
7997 (gdb_vecs.o): New rule.
7998 * thread-db.c: #include "gdb_vecs.h".
7999 (thread_db_load_search): Use a vector to iterate over path elements.
8000 Handle text appearing after "$pdir".
8001
8002 * configure.ac: Add check for strstr.
8003 * config.in: Regenerate.
8004 * configure: Regenerate.
8005
8006 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8007
8008 * hostio.c (handle_pread): If pread fails, fall back to attempting
8009 lseek/read.
8010 (handle_pwrite): Likewise for pwrite.
8011
8012 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8013
8014 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8015 between unsupported TYPE and unimplementable ADDR/LEN combination.
8016 (arm_insert_point): Act on new return value.
8017
8018 2012-07-31 Pedro Alves <palves@redhat.com>
8019
8020 * server.c (process_point_options): Only skip tokens if we find
8021 one that is unrecognized. Don't treat 'X' specially while
8022 skipping unrecognized tokens.
8023
8024 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8025
8026 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8027 to 4-byte-align HW breakpoint addresses for Thumb.
8028
8029 2012-07-27 Yao Qi <yao@codesourcery.com>
8030
8031 PR remote/14161.
8032
8033 * server.h: Declare gdb_agent_about_to_close.
8034 * target.c (kill_inferior): Include "agent.h".
8035 New. Send command 'kill'.
8036 * target.h (kill_inferior): Removed macro.
8037 * tracepoint.c (gdb_agent_about_to_close): New.
8038 (gdb_agent_helper_thread): Handle command 'close'.
8039 Wait endlessly until the inferior stops.
8040 Install gdb_agent_remove_socket to atexit hook.
8041 (agent_socket_name): New static variable.
8042 (gdb_agent_socket_init): Replace local variable 'name' with
8043 'agent_socket_name'.
8044 (gdb_agent_remove_socket): New.
8045
8046 2012-07-27 Yao Qi <yao@codesourcery.com>
8047
8048 * server.c (process_point_options): Stop at 'X' when parsing.
8049
8050 2012-07-19 Michael Eager <eager@eagercon.com>
8051
8052 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8053 to hw_execute.
8054 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8055 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8056 hardware breakpoint.
8057
8058 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8059
8060 * gdbserver/linux-low.c (initialize_low): Call
8061 linux_ptrace_init_warnings.
8062
8063 2012-07-02 Doug Evans <dje@google.com>
8064
8065 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8066 pointer to int.
8067
8068 2012-07-02 Stan Shebs <stan@codesourcery.com>
8069
8070 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8071 (ax.o): Add it to build rule.
8072 (ax-ipa.o): Ditto.
8073 (OBS): Add format.o.
8074 (IPA_OBS): Add format.o.
8075 * server.c (handle_query): Claim support for breakpoint commands.
8076 (process_point_options): Add command case.
8077 (process_serial_event): Leave running if there are printfs in
8078 effect.
8079 * mem-break.h (any_persistent_commands): Declare.
8080 (add_breakpoint_commands): Declare.
8081 (gdb_no_commands_at_breakpoint): Declare.
8082 (run_breakpoint_commands): Declare.
8083 * mem-break.c (struct point_command_list): New struct.
8084 (struct breakpoint): New field command_list.
8085 (any_persistent_commands): New function.
8086 (add_commands_to_breakpoint): New function.
8087 (add_breakpoint_commands): New function.
8088 (gdb_no_commands_at_breakpoint): New function.
8089 (run_breakpoint_commands): New function.
8090 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8091 locally.
8092 * ax.c: Include format.h.
8093 (ax_printf): New function.
8094 (gdb_eval_agent_expr): Add printf opcode.
8095
8096 2012-06-13 Yao Qi <yao@codesourcery.com>
8097
8098 * server.c (start_inferior): Remove duplicated writes to fields
8099 'last_resume_kind' and 'last_status' of 'current_inferior'.
8100
8101 2012-06-12 Yao Qi <yao@codesourcery.com>
8102 Pedro Alves <palves@redhat.com>
8103
8104 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8105 comment.
8106 * server.c (handle_v_cont): Extend comment.
8107
8108 2012-06-11 Yao Qi <yao@codesourcery.com>
8109
8110 * linux-low.c (linux_attach): Add 'static'.
8111
8112 2012-06-06 Yao Qi <yao@codesourcery.com>
8113
8114 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8115
8116 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8117
8118 Fix gcc -flto compilation warning.
8119 * server.c (main): Make variable multi_mode and attach volatile.
8120
8121 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8122
8123 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8124 if the platform doesn't know about it.
8125
8126 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8127
8128 * Makefile.in (SFILES): Add linux-tile-low.c.
8129 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8130 * configure.srv: Handle tilegx-*-linux*.
8131 * linux-tile-low.c: New file.
8132
8133 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8134
8135 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8136
8137 2012-05-24 Pedro Alves <palves@redhat.com>
8138
8139 PR gdb/7205
8140
8141 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8142
8143 2012-05-24 Pedro Alves <palves@redhat.com>
8144
8145 PR gdb/7205
8146
8147 Replace target_signal with gdb_signal throughout.
8148
8149 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8150
8151 * linux-low.c (linux_store_registers): Avoid the copying sequence
8152 when no data has been retrieved by ptrace.
8153
8154 2012-05-22 Will Deacon <will.deacon@arm.com>
8155
8156 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8157 Include asm/ptrace.h.
8158 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8159 already defined.
8160
8161 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8162
8163 * linux-low.c (linux_store_registers): Don't re-retrieve data
8164 with ptrace that has already been obtained from /proc. Always
8165 copy any data retrieved with ptrace to the buffer supplied.
8166
8167 2012-05-11 Yao Qi <yao@codesourcery.com>
8168 Pedro Alves <palves@redhat.com>
8169
8170 * linux-low.c (enum stopping_threads_kind): New.
8171 (stopping_threads): Change type to `enum stopping_threads_kind'.
8172 (handle_extended_wait): If stopping and suspending threads, leave
8173 the new_lwp suspended too.
8174 (linux_wait_for_event): Adjust.
8175 (stop_all_lwps): Set `stopping_threads' to
8176 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8177 whether we're suspending threads or just stopping them. Assert no
8178 recursion happens.
8179
8180 2012-04-29 Yao Qi <yao@codesourcery.com>
8181
8182 * server.h: Move some code to ...
8183 * gdbthread.h: ... here. New.
8184 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8185 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8186 (nto-low.o, win32-low.o): Likewise.
8187 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8188 * regcache.c, remote-utils.c, server.c: Likewise.
8189 * target.c, tracepoint.c, win32-low.c: Likewise.
8190
8191 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8192
8193 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8194 (PTRACE_ARG4_TYPE): Likewise.
8195 (PTRACE_XFER_TYPE): Likewise.
8196 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8197 ptrace to PTRACE_ARG3_TYPE.
8198 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8199 (PTRACE_ARG4_TYPE): Likewise.
8200 (PTRACE_XFER_TYPE): Likewise.
8201 (linux_detach_one_lwp): Cast fourth argument of
8202 ptrace to long then PTRACE_ARG4_TYPE.
8203 (regsets_fetch_inferior_registers): Cast third argument of
8204 ptrace to long then PTRACE_ARG3_TYPE.
8205 (regsets_store_inferior_registers): Likewise.
8206
8207 2012-04-20 Pedro Alves <palves@redhat.com>
8208
8209 * configure: Regenerate.
8210
8211 2012-04-19 Pedro Alves <palves@redhat.com>
8212
8213 * Makefile.in (GNULIB_BUILDDIR): New.
8214 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8215 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8216 (all, install-only, uninstall, clean-info, all-lib, clean): No
8217 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8218 (maintainer-clean realclean distclean): Use subdir_do.
8219 (subdir_do): New.
8220 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8221 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8222 * acinclude.m4: Include acx_configure_dir.m4.
8223 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8224 calls. Call AC_PROG_RANLIB. Configure gnulib using
8225 ACX_CONFIGURE_DIR.
8226 (GNULIB): New.
8227 (GNULIB_STDINT_H): Adjust.
8228 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8229 * gdbreplay.c: Include build-gnulib/config.h.
8230 * server.h: Likewise.
8231 * aclocal.m4: Regenerate.
8232 * config.in: Regenerate.
8233 * configure: Regenerate.
8234
8235 2012-04-19 Pedro Alves <palves@redhat.com>
8236
8237 * Makefile.in (LIBGNU, INCGNU): Adjust.
8238 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8239 (all, install-only, uninstall, clean-info, all-lib, clean)
8240 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8241 * configure.ac: Adjust AC_OUTPUT output.
8242 * aclocal.m4: Regenerate.
8243 * configure: Regenerate.
8244
8245 2012-04-19 Pedro Alves <palves@redhat.com>
8246
8247 * Makefile.in (generated_files): New.
8248 (server_h): Remove the explicit dependency on config.h, and depend
8249 on $generated_files.
8250
8251 2012-04-19 Pedro Alves <palves@redhat.com>
8252
8253 * Makefile.in (INCGNU): Add -Ignulib.
8254
8255 2012-04-19 Pedro Alves <palves@redhat.com>
8256
8257 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8258 (INCGNU): ... this, and spell out -I here.
8259 (GNULIB_LIB): Rename to ...
8260 (LIBGNU): ... this.
8261 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8262
8263 2012-04-19 Pedro Alves <palves@redhat.com>
8264
8265 * config.in: Regenerate.
8266
8267 2012-04-19 Pedro Alves <palves@redhat.com>
8268
8269 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8270 * server.h (memmem): Remove declaration.
8271 * config.in: Regenerate.
8272 * configure: Regenerate.
8273
8274 2012-04-19 Yao Qi <yao@codesourcery.com>
8275
8276 * Makefile.in (SFILES): Add common/vec.c.
8277 (OBS): Add vec.o.
8278 (vec.o): New rule.
8279
8280 2012-04-19 Yao Qi <yao@codesourcery.com>
8281
8282 * remote-utils.c (prepare_resume_reply): Replace with macro
8283 target_core_of_thread.
8284 * server.c (handle_qxfer_threads_proper): Likewise.
8285 * target.h (traget_core_of_thread): New macro.
8286
8287 2012-04-18 Pedro Alves <palves@redhat.com>
8288
8289 * aclocal.m4: Regenerate.
8290 * configure: Regenerate.
8291
8292 2012-04-16 Yao Qi <yao@codesourcery.com>
8293
8294 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8295 duplicated on address.
8296
8297 2012-04-16 Yao Qi <yao@codesourcery.com>
8298
8299 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8300 (struct tracepoint_action_ops) <send>: New field.
8301 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8302 (agent_expr_send, x_tracepoint_action_send): New.
8303 (l_tracepoint_action_send): New.
8304 (cmd_qtdp): Download and install tracepoint
8305 according to `use_agent'.
8306 (run_inferior_command): Add one more parameter `len'.
8307 Update callers.
8308 (tracepoint_send_agent): New.
8309 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8310
8311 2012-04-16 Yao Qi <yao@codesourcery.com>
8312
8313 * tracepoint.c (download_tracepoints): Moved to ...
8314 (cmd_qtstart): ... here.
8315
8316 2012-04-14 Yao Qi <yao@codesourcery.com>
8317
8318 * tracepoint.c: Include inttypes.h.
8319 (struct collect_memory_action): Use sized types.
8320 (struct tracepoint): Likewise.
8321 (cmd_qtdp, stop_tracing): Update print specifiers.
8322 (cmd_qtp, response_tracepoint): Likewise.
8323 (collect_data_at_tracepoint): Likewise.
8324 (collect_data_at_step): Likewise.
8325
8326 2012-04-14 Yao Qi <yao@codesourcery.com>
8327
8328 Import gnulib module inttypes.
8329 * aclocal.m4, config.in, configure: Regenerated.
8330
8331 2012-04-14 Yao Qi <yao@codesourcery.com>
8332
8333 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8334 Makefile and config.status at last.
8335
8336 2012-04-13 Yao Qi <yao@codesourcery.com>
8337
8338 * tracepoint.c: Include stdint.h unconditionally.
8339
8340 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8341
8342 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8343 on BFD_HAVE_SYS_PROCFS_TYPE.
8344 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8345 * configure: Regenerate.
8346 * config.in: Likewise.
8347
8348 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8349
8350 * Makefile.in (clean): Also remove x32.c x32-linux.c
8351 x32-avx.c x32-avx-linux.c.
8352 (x32.o): New target.
8353 (x32.c): Likewise.
8354 (x32-linux.o): Likewise.
8355 (x32-linux.c): Likewise.
8356 (x32-avx.o): Likewise.
8357 (x32-avx.c): Likewise.
8358 (x32-avx-linux.o): Likewise.
8359 (x32-avx-linux.c): Likewise.
8360
8361 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8362 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8363 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8364 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8365 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8366 i386/x32-avx-linux.xml.
8367
8368 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8369 (init_registers_x32_avx_linux): Likwise.
8370 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8371 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8372
8373 2012-04-13 Pedro Alves <palves@redhat.com>
8374
8375 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8376 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8377 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8378 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8379 the sub-make.
8380
8381 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8382
8383 * linux-x86-low.c (compat_x32_clock_t): New.
8384 (compat_x32_siginfo_t): Likewise.
8385 (compat_x32_siginfo_from_siginfo): Likewise.
8386 (siginfo_from_compat_x32_siginfo): Likewise.
8387 (linux_is_elf64): Likewise.
8388 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8389 and siginfo_from_compat_x32_siginfo for x32.
8390 (x86_arch_setup): Set linux_is_elf64.
8391
8392 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8393
8394 PR gdb/13969
8395 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8396 e_machine field.
8397 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8398 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8399 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8400 compatible with process.
8401
8402 2012-04-12 Yao Qi <yao@codesourcery.com>
8403
8404 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8405 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8406 (install-only, install-info, clean): Handle sub dir gnulib.
8407 (all-lib, am--refresh): New targets.
8408 (memmem.o): Remove target.
8409 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8410 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8411 (AC_REPLACE_FUNCS): Remove memmem.
8412 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8413 (AC_OUTPUT): Generate Makefile in gnulib/.
8414 * aclocal.m4, config.in, configure: Regenerated.
8415
8416 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8417
8418 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8419
8420 2012-04-05 Pedro Alves <palves@redhat.com>
8421
8422 -Werror=strict-aliasing
8423
8424 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8425 pointer.
8426
8427 2012-04-04 Pedro Alves <palves@redhat.com>
8428
8429 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8430 (sparc_store_gregset_from_stack, sparc_store_gregset)
8431 (sparc_breakpoint_at): Fix formatting.
8432
8433 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8434
8435 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8436 are available.
8437 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8438 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8439 * config.in: Regenerate.
8440 * configure: Likewise.
8441
8442 2012-03-29 Pedro Alves <palves@redhat.com>
8443
8444 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8445 Correct ptrace arguments.
8446
8447 2012-03-28 Pedro Alves <palves@redhat.com>
8448
8449 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8450 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8451 (IA64_FR1_REGNUM): New defines.
8452 (ia64_fetch_register): New.
8453 (the_low_target): Install it.
8454 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8455 field.
8456 * linux-low.c (linux_fetch_registers): Try the
8457 the_low_target.fetch_register hook first.
8458
8459 * linux-arm-low.c (the_low_target): Adjust.
8460 * linux-bfin-low.c (the_low_target): Adjust.
8461 * linux-cris-low.c (the_low_target): Adjust.
8462 * linux-crisv32-low.c (the_low_target): Adjust.
8463 * linux-m32r-low.c (the_low_target): Adjust.
8464 * linux-m68k-low.c (the_low_target): Adjust.
8465 * linux-mips-low.c (the_low_target): Adjust.
8466 * linux-ppc-low.c (the_low_target): Adjust.
8467 * linux-s390-low.c (the_low_target): Adjust.
8468 * linux-sh-low.c (the_low_target): Adjust.
8469 * linux-sparc-low.c (the_low_target): Adjust.
8470 * linux-tic6x-low.c (the_low_target): Adjust.
8471 * linux-x86-low.c (the_low_target): Adjust.
8472 * linux-xtensa-low.c (the_low_target): Adjust.
8473
8474 2012-03-26 Pedro Alves <palves@redhat.com>
8475
8476 * server.c (handle_qxfer_libraries): Don't bail early if
8477 the_target->qxfer_libraries_svr4 is not NULL.
8478
8479 2012-03-26 Pedro Alves <palves@redhat.com>
8480
8481 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8482
8483 2012-03-23 Pedro Alves <palves@redhat.com>
8484
8485 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8486 "library-list-svr4" element's start tag when the the DSO list is
8487 empty.
8488
8489 2012-03-23 Pedro Alves <palves@redhat.com>
8490
8491 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8492 a variable whose type size is the same as the inferior's pointer
8493 size.
8494
8495 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8496
8497 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8498 struct siginfo.
8499 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8500 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8501 * linux-low.h: Include <signal.h>.
8502 (struct siginfo): Remove forward declaration.
8503 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8504 struct siginfo.
8505
8506 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8507
8508 * .gitignore: Ignore more files.
8509
8510 2012-03-19 Pedro Alves <palves@redhat.com>
8511 Jan Kratochvil <jan.kratochvil@redhat.com>
8512
8513 * server.c (cont_thread, general_thread): Add describing comments.
8514 (start_inferior): Clear `cont_thread'.
8515 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8516 of a process.
8517
8518 2012-03-15 Yao Qi <yao@codesourcery.com>
8519
8520 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8521 handling to ...
8522 (cmd_qtdp): ... here.
8523
8524 2012-03-15 Yao Qi <yao@codesourcery.com>
8525
8526 * tracepoint.c (struct tracepoint_action_ops): New.
8527 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8528 (m_tracepoint_action_download): New.
8529 (r_tracepoint_action_download): New.
8530 (x_tracepoint_action_download): New.
8531 (l_tracepoint_action_download): New.
8532 (add_tracepoint_action): Install `action->ops' according type.
8533 (download_tracepoint_1): Move code `download' function pointer
8534 of various tracepoint_action_ops.
8535
8536 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8537
8538 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8539 linux_ptrace_attach_warnings.
8540
8541 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8542
8543 * Makefile.in (linux-ptrace.o): New.
8544 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8545 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8546 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8547 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8548 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8549 of these targets.
8550 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8551
8552 2012-03-08 Yao Qi <yao@codesourcery.com>
8553 Pedro Alves <palves@redhat.com>
8554
8555 Fix PR server/13392.
8556 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8557 offset of JMP insn.
8558 * tracepoint.c (remove_tracepoint): New.
8559 (cmd_qtdp): Call remove_tracepoint when failed to install.
8560
8561 2012-03-07 Pedro Alves <palves@redhat.com>
8562
8563 * linux-low.c (get_detach_signal): New.
8564 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8565 Pass on pending signals to PTRACE_DETACH. Check the result of the
8566 ptrace call.
8567 * server.c (program_signals, program_signals_p): New.
8568 (handle_general_set): Handle QProgramSignals.
8569 * server.h (program_signals, program_signals_p): Declare.
8570
8571 2012-03-05 Pedro Alves <palves@redhat.com>
8572 Jan Kratochvil <jan.kratochvil@redhat.com>
8573
8574 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8575 New comment why.
8576
8577 2012-03-03 Yao Qi <yao@codesourcery.com>
8578
8579 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8580 agent_look_up_symbols.
8581
8582 2012-03-03 Yao Qi <yao@codesourcery.com>
8583
8584 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8585 (linux-x86-low.o): Likewise.
8586 * server.h: Remove in_process_agent_loaded.
8587 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8588 common/agent.c.
8589 Update callers.
8590
8591 2012-03-03 Yao Qi <yao@codesourcery.com>
8592
8593 * tracepoint.c (gdb_agent_capability): New global.
8594 (in_process_agent_loaded_ust): Renamed to
8595 `in_process_agent_supports_ust'.
8596 Update callers.
8597 (in_process_agent_supports_ust): Call agent_capability_check.
8598 (clear_installed_tracepoints): Assert that agent supports
8599 agent.
8600
8601 2012-03-03 Yao Qi <yao@codesourcery.com>
8602
8603 * linux-low.c (linux_supports_agent): New.
8604 (linux_target_ops): Initialize field `supports_agent' with
8605 linux_supports_agent.
8606 * target.h (struct target_ops) <supports_agent>: New.
8607 (target_supports_agent): New macro.
8608 * server.c (handle_general_set): Handle packet 'QAgent'.
8609 (handle_query): Send `QAgent+'.
8610 * Makefile.in (server.o): Depends on agent.h.
8611
8612 2012-03-03 Yao Qi <yao@codesourcery.com>
8613
8614 * Makefile.in (OBS): Add agent.o.
8615 Add new rule for agent.o.
8616 Track dependence of tracepoint.c on agent.h.
8617 * tracepoint.c (run_inferior_command_1):
8618 (run_inferior_command): Call agent_run_command.
8619 (gdb_ust_connect_sync_socket): Deleted. Move it to
8620 common/agent.c.
8621 (resume_thread, stop_thread): Likewise.
8622 (gdb_ust_socket_init): Renamed to ...
8623 (gdb_agent_socket_init): ... New.
8624 (gdb_ust_thread): Renamed to ...
8625 (gdb_agent_helper_thread): ... New.
8626 (gdb_ust_init): Move some code to ...
8627 (gdb_agent_init): ... here. New.
8628 [HAVE_UST]: Call gdb_ust_init.
8629 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8630 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8631 * config.in, configure: Regenerated.
8632
8633 2012-03-02 Pedro Alves <palves@redhat.com>
8634
8635 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8636 * linux-low.c (struct simple_pid_list): New.
8637 (stopped_pids): New a struct simple_pid_list pointer.
8638 (add_to_pid_list, pull_pid_from_list): New.
8639 (handle_extended_wait): Don't assume the first signal new children
8640 report is SIGSTOP. Adjust call to pull_pid_from_list.
8641 (linux_wait_for_lwp): Adjust.
8642
8643 2012-03-02 Yao Qi <yao@codesourcery.com>
8644
8645 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8646 debug log.
8647
8648 2012-03-02 Yao Qi <yao@codesourcery.com>
8649
8650 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8651 `stop_pc' and `tpoint'. Update caller.
8652
8653 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8654
8655 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8656 * linux-low.c (use_linux_regsets): New macro.
8657 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8658 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8659 (linux_register_in_regsets): New function.
8660 (usr_fetch_inferior_registers): Skip registers covered by
8661 regsets.
8662 (usr_store_inferior_registers): Likewise.
8663 (usr_fetch_inferior_registers): New macro.
8664 (usr_store_inferior_registers): Likewise.
8665 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8666 (linux_store_registers): Likewise.
8667 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8668 prototype.
8669 (init_registers_mips64_dsp_linux): Likewise.
8670 (init_registers_mips_linux): New macro.
8671 (init_registers_mips_dsp_linux): Likewise.
8672 (mips_dsp_num_regs): Likewise.
8673 (DSP_BASE, DSP_CONTROL): New fallback macros.
8674 (mips_base_regs): New macro.
8675 (mips_regmap): Use it. Fix the size.
8676 (mips_dsp_regmap): New variable.
8677 (mips_dsp_regset_bitmap): Likewise.
8678 (mips_arch_setup): New function.
8679 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8680 than mips_regmap.
8681 (mips_cannot_store_register): Likewise.
8682 (the_low_target): Update .arch_setup, .num_regs and .regmap
8683 initializers. Add .regset_bitmap initializer.
8684 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8685 initializer.
8686 * linux-bfin-low.c (the_low_target): Likewise.
8687 * linux-cris-low.c (the_low_target): Likewise.
8688 * linux-crisv32-low.c (the_low_target): Likewise.
8689 * linux-ia64-low.c (the_low_target): Likewise.
8690 * linux-m32r-low.c (the_low_target): Likewise.
8691 * linux-m68k-low.c (the_low_target): Likewise.
8692 * linux-ppc-low.c (the_low_target): Likewise.
8693 * linux-s390-low.c (the_low_target): Likewise.
8694 * linux-sh-low.c (the_low_target): Likewise.
8695 * linux-sparc-low.c (the_low_target): Likewise.
8696 * linux-tic6x-low.c (the_low_target): Likewise.
8697 * linux-x86-low.c (the_low_target): Likewise.
8698 * linux-xtensa-low.c (the_low_target): Likewise.
8699 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8700 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8701 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8702 srv_xmlfiles.
8703 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8704 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8705
8706 2012-02-29 Yao Qi <yao@codesourcery.com>
8707 Pedro Alves <palves@redhat.com>
8708
8709 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8710 `step_over_finished' is true.
8711
8712 2012-02-27 Pedro Alves <palves@redhat.com>
8713
8714 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8715 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8716
8717 2012-02-27 Pedro Alves <palves@redhat.com>
8718
8719 PR server/9684
8720 * linux-low.c (pid_is_stopped): New.
8721 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8722
8723 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8724
8725 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8726 of conditions.
8727
8728 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8729
8730 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8731
8732 2012-02-24 Luis Machado <lgustavo@codesourcery>
8733
8734 * server.c (handle_query): Advertise support for target-side
8735 breakpoint condition evaluation.
8736 (process_point_options): New function.
8737 (process_serial_event): When inserting a breakpoint, check for
8738 a target-side condition that should be evaluated.
8739
8740 * mem-break.c: Include regcache.h and ax.h.
8741 (point_cond_list_t): New data structure.
8742 (breakpoint) <cond_list>: New field.
8743 (find_gdb_breakpoint_at): Make non-static.
8744 (delete_gdb_breakpoint_at): Clear any target-side
8745 conditions.
8746 (clear_gdb_breakpoint_conditions): New function.
8747 (add_condition_to_breakpoint): Likewise.
8748 (add_breakpoint_condition): Likewise.
8749 (gdb_condition_true_at_breakpoint): Likewise.
8750 (gdb_breakpoint_here): Return result directly instead
8751 of going through a local variable.
8752
8753 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8754 (clear_gdb_breakpoint_conditions): Likewise.
8755 (add_breakpoint_condition): Likewise.
8756 (gdb_condition_true_at_breakpoint): Likewise.
8757
8758 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8759 (need_step_over_p): Take target-side breakpoint condition into
8760 consideration.
8761
8762 2012-02-24 Luis Machado <lgustavo@codesourcery>
8763
8764 * server.h: Include tracepoint.h.
8765 (agent_mem_read, agent_get_trace_state_variable_value,
8766 agent_set_trace_state_variable_value,
8767 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8768 get_set_tsv_func_addr): New prototypes.
8769
8770 * ax.h: New include file.
8771 * ax.c: New source file.
8772
8773 * tracepoint.c: Include ax.h.
8774 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8775 agent_expr, eval_result_type): Move to ax.h.
8776 (parse_agent_expr): Rename to ...
8777 (gdb_parse_agent_expr): ... this, make it non-static and move
8778 to ax.h.
8779 (unparse_agent_expr) Rename to ...
8780 (gdb_unparse_agent_expr): ... this, make it non-static and move
8781 to ax.h.
8782 (eval_agent_expr): Rename to ...
8783 (eval_tracepoint_agent_expr): ... this.
8784 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8785 forward declarations.
8786 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8787 (agent_get_trace_state_variable_value): New function.
8788 (agent_set_trace_state_variable_value): New function.
8789 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8790 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8791 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8792 (condition_true_at_tracepoint): Likewise.
8793 (parse_agent_expr): Rename to ...
8794 (gdb_parse_agent_expr): ... this and move to ax.c.
8795 (unparse_agent_expr): Rename to ...
8796 (gdb_unparse_agent_expr): ... this and move to ax.c.
8797 (gdb_agent_op_name): Move to ax.c.
8798 (eval_agent_expr): Rename to ...
8799 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8800 and move to ax.c.
8801 (eval_tracepoint_agent_expr): New function.
8802 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8803 non-static.
8804 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8805 ax.c.
8806 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8807 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8808 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8809 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8810 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8811 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8812 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8813 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8814 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8815 (compile_bytecodes): Remove forward declaration.
8816 (is_goto_target): Move to ax.c.
8817 (compile_bytecodes): Move to ax.c and call
8818 agent_get_trace_state_variable_value (...) and
8819 agent_set_trace_state_variable_value (...).
8820
8821 * Makefile.in: Update ax.c and IPA dependencies.
8822
8823 2012-02-24 Pedro Alves <palves@redhat.com>
8824
8825 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8826 (cmd_bigqtbuffer_circular): ... this. Only handle
8827 'QTBuffer:circular:'.
8828 (handle_tracepoint_general_set): Adjust.
8829
8830 2012-02-16 Yao Qi <yao@codesourcery.com>
8831
8832 * inferiors.c: Move code to ...
8833 * dll.c: .... here. New.
8834 * server.h: Declare clear_dlls.
8835 * Makefile.in (SFILES): Add dll.c.
8836 (OBS): Add dll.o
8837 (dll.o): New rule.
8838
8839 2012-02-11 Yao Qi <yao@codesourcery.com>
8840
8841 * server.c: (handle_monitor_command): Add a new parameter
8842 `own_buf'.
8843 (handle_query): Update caller.
8844
8845 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8846
8847 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8848 * configure, config.in: Regenerate.
8849 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8850 is not defined.
8851
8852 2012-02-02 Pedro Alves <palves@redhat.com>
8853
8854 Try SIGKILL first, then PTRACE_KILL.
8855 * linux-low.c (linux_kill_one_lwp): New.
8856 (linux_kill_one_lwp): Rename to ...
8857 (kill_one_lwp_callback): ... this. Use the new
8858 linux_kill_one_lwp.
8859
8860 2012-02-02 Pedro Alves <palves@redhat.com>
8861
8862 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8863 inferior.
8864
8865 2012-01-27 Pedro Alves <palves@redhat.com>
8866
8867 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8868 (elf_64_file_p): Make static.
8869 (linux_pid_exe_is_elf_64_file): New.
8870 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8871 Delete declarations.
8872 (linux_pid_exe_is_elf_64_file): Declare.
8873 * linux-x86-low.c (x86_arch_setup): Use
8874 linux_pid_exe_is_elf_64_file.
8875
8876 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8877
8878 * linux-low.c (linux_wait_for_event_1): Rename to ...
8879 (linux_wait_for_event): ... here and merge it with former
8880 linux_wait_for_event - new variable wait_ptid, use it.
8881 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8882
8883 2012-01-23 Pedro Alves <palves@redhat.com>
8884
8885 * server.c (main): Avoid yet another case of infinite loop while
8886 detaching/killing after a longjmp.
8887
8888 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8889
8890 Code cleanup.
8891 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8892
8893 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8894
8895 * hostio.c (handle_readlink): New function.
8896 (handle_vFile): Call it to handle "vFile:readlink" packets.
8897
8898 2012-01-20 Pedro Alves <palves@redhat.com>
8899 Ulrich Weigand <ulrich.weigand@linaro.org>
8900
8901 * server.c (handle_v_requests): Only support vAttach and vRun to
8902 start multiple processes when in extended protocol mode.
8903
8904 2012-01-17 Pedro Alves <palves@redhat.com>
8905
8906 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8907 memalign plus mprotect to allocate the scratch buffer.
8908
8909 2012-01-13 Pedro Alves <palves@redhat.com>
8910
8911 * server.c (attach_inferior): Clear `cont_thread'.
8912
8913 2012-01-13 Pedro Alves <palves@redhat.com>
8914
8915 * server.c (main): Avoid infinite loop while detaching/killing
8916 after a longjmp.
8917
8918 2012-01-09 Doug Evans <dje@google.com>
8919
8920 * server.c (start_inferior): Set last_ptid in --wrapper case.
8921
8922 2012-01-06 Yao Qi <yao@codesourcery.com>
8923
8924 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8925 defined.
8926 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8927
8928 2012-01-04 Yao Qi <yao@codesourcery.com>
8929
8930 * tracepoint.c (cmd_qtdp): Print debug message
8931 for static tracepoint.
8932
8933 2012-01-04 Yao Qi <yao@codesourcery.com>
8934
8935 * tracepoint.c (trace_vdebug): Differentiate debug message
8936 between gdbserver and IPA.
8937
8938 2012-01-03 Yao Qi <yao@codesourcery.com>
8939
8940 * tracepoint.c (tracepoint_was_hit): Don't collect for
8941 static tracepoint.
8942
8943 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8944
8945 * terminal.h: Reformat copyright header.
8946
8947 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8948
8949 * server.c (gdbserver_version): Update copyright year.
8950 * gdbreplay.c (gdbreplay_version): Likewise.
8951
8952 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8953
8954 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8955
8956 Revert:
8957 2011-12-18 Hui Zhu <teawater@gmail.com>
8958 * linux-low.c (linux_create_inferior): Save return value to ret.
8959
8960 2011-12-18 Hui Zhu <teawater@gmail.com>
8961
8962 * linux-low.c (linux_create_inferior): Save return value to ret.
8963
8964 2011-12-16 Doug Evans <dje@google.com>
8965
8966 * linux-low.c (linux_create_inferior): If stdio connection,
8967 redirect stdin from /dev/null, stdout to stderr.
8968 * remote-utils.c (remote_is_stdio): New static global.
8969 (remote_connection_is_stdio): New function.
8970 (remote_prepare): Handle stdio connection.
8971 (remote_open): Ditto.
8972 (remote_close): Don't close stdin for stdio connections.
8973 (read_prim,write_prim): New functions. Replace all calls to
8974 read/write to these.
8975 * server.c (main): Watch for "-" argument. Move call to
8976 remote_prepare before start_inferior.
8977 * server.h (STDIO_CONNECTION_NAME): New macro.
8978 (remote_connection_is_stdio): Declare.
8979
8980 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8981 in debugging output.
8982
8983 2011-12-15 Yao Qi <yao@codesourcery.com>
8984
8985 * tracepoint.c: Include sys/syscall.h.
8986 (gdb_ust_thread): Remove preprocessor conditional.
8987
8988 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8989
8990 * linux-low.c (linux_detach_one_lwp): Call
8991 the_low_target.prepare_to_resume before detaching.
8992
8993 2011-12-14 Yao Qi <yao@codesourcery.com>
8994
8995 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8996 of write.
8997
8998 2011-12-14 Yao Qi <yao@codesourcery.com>
8999
9000 * i386-low.c (i386_low_stopped_data_address): Initialize local
9001 variable `control'.
9002
9003 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9004
9005 PR remote/13492
9006
9007 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9008 DR_CONTROL unless necessary. Extend comments.
9009 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9010 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9011
9012 2011-12-13 Yao Qi <yao@codesourcery.com>
9013
9014 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9015 macros.
9016 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9017
9018 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9019
9020 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9021 Print new debug message for such case.
9022
9023 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9024
9025 Fix overlapping memcpy.
9026 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9027 the read_inferior_memory transfer.
9028 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9029 write_inferior_memory transfer.
9030 (set_fast_tracepoint_jump): New variable buf. Use it for the
9031 read_inferior_memory and write_inferior_memory transfers.
9032 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9033 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9034 Use it for the write_inferior_memory transfer.
9035 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9036 buffers.
9037
9038 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9039
9040 * linux-low.c (fetch_register, store_register): Make code
9041 consistent, fix formatting.
9042
9043 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9044
9045 * linux-low.c (usr_store_inferior_registers): Factor out code
9046 to handle individual registers into...
9047 (store_register): ... this new function.
9048
9049 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9050
9051 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9052 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9053 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9054 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9055 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9056 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9057 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9058 (srv_xmlfiles): Add new XML files.
9059
9060 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9061 and <sys/uio.h>.
9062 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9063 (init_registers_s390_linux32v1): Add prototype.
9064 (init_registers_s390_linux32v2): Likewise.
9065 (init_registers_s390_linux64v1): Likewise.
9066 (init_registers_s390_linux64v2): Likewise.
9067 (init_registers_s390x_linux64v1): Likewise.
9068 (init_registers_s390x_linux64v2): Likewise.
9069 (s390_num_regs): Increment to 52.
9070 (s390_regmap): Add orig_r2 register.
9071 (s390_num_regs_3264): Increment to 68.
9072 (s390_regmap_3264): Add orig_r2 register.
9073 (s390_collect_ptrace_register): Handle orig_r2 register.
9074 (s390_supply_ptrace_register): Likewise.
9075 (s390_fill_last_break): New function.
9076 (s390_store_last_break): Likewise.
9077 (s390_fill_system_call): New function.
9078 (s390_store_system_call): Likewise.
9079 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9080 register sets.
9081 (s390_check_regset): New function.
9082 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9083 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9084 Update target_regsets for available register sets.
9085
9086 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9087 Jan Kratochvil <jan.kratochvil@redhat.com>
9088
9089 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9090 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9091 New.
9092 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9093 * linux-low.h (struct process_info_private): New member r_debug.
9094 * server.c (handle_qxfer_libraries): Call
9095 the_target->qxfer_libraries_svr4.
9096 (handle_qxfer_libraries_svr4): New function.
9097 (qxfer_packets): New entry "libraries-svr4".
9098 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9099 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9100 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9101 PACKET_qXfer_libraries_svr4.
9102
9103 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9104
9105 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9106 PSW address/mask between 8-byte and 16-byte formats.
9107 (s390_supply_ptrace_register): Likewise.
9108 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9109 basic addressing mode bit.
9110
9111 2011-11-24 Stan Shebs <stan@codesourcery.com>
9112
9113 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9114
9115 2011-11-17 Stan Shebs <stan@codesourcery.com>
9116
9117 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9118 (tracing_start_time): New global.
9119 (tracing_stop_time): New global.
9120 (tracing_user_name): New global.
9121 (tracing_notes): New global.
9122 (tracing_stop_note): New global.
9123 (cmd_qtstart): Set traceframe_usage, start_time.
9124 (stop_tracing): Set stop_time.
9125 (cmd_qtstatus): Report additional status.
9126 (cmd_qtp): New function.
9127 (handle_tracepoint_query): Call it.
9128 (cmd_qtnotes): New function.
9129 (handle_tracepoint_general_set): Call it.
9130 (get_timestamp): Rename from tsv_get_timestamp.
9131
9132 2011-11-14 Stan Shebs <stan@codesourcery.com>
9133 Kwok Cheung Yeung <kcy@codesourcery.com>
9134
9135 * linux-x86-low.c (small_jump_insn): New.
9136 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9137 trampoline and error message, build a trampoline and issue a small
9138 jump instruction to it.
9139 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9140 trampoline and error message.
9141 (x86_get_min_fast_tracepoint_insn_len): New.
9142 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9143 * linux-low.h (struct linux_target_ops): Add arguments to
9144 install_fast_tracepoint_jump_pad operation, add new operation.
9145 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9146 arguments.
9147 (linux_get_min_fast_tracepoint_insn_len): New function.
9148 (linux_target_op): Add new operation.
9149 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9150 (gdb_trampoline_buffer_end): Ditto.
9151 (gdb_trampoline_buffer_error): Ditto.
9152 (struct ipa_sym_addresses): Add fields for new IPA variables.
9153 (symbol_list): Add entries for new IPA variables.
9154 (struct tracepoint): Add fields to hold the address range of the
9155 trampoline used by the tracepoint.
9156 (trampoline_buffer_head): New static variable.
9157 (trampoline_buffer_tail): Ditto.
9158 (claim_trampoline_space): New function.
9159 (have_fast_tracepoint_trampoline_buffer): New function.
9160 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9161 structure.
9162 (install_fast_tracepoint): Ditto, also add error buffer argument.
9163 (cmd_qtminftpilen): New function.
9164 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9165 (fast_tracepoint_from_trampoline_address): New function.
9166 (fast_tracepoint_collecting): Handle trampoline as part of jump
9167 pad space.
9168 (set_trampoline_buffer_space): New function.
9169 (initialize_tracepoint): Initialize new IPA variables.
9170 * target.h (struct target_ops): Add arguments to
9171 install_fast_tracepoint_jump_pad operation, add new
9172 get_min_fast_tracepoint_insn_len operation.
9173 (target_get_min_fast_tracepoint_insn_len): New.
9174 (install_fast_tracepoint_jump_pad): Add arguments.
9175 * server.h (IPA_BUFSIZ): Define.
9176 * linux-i386-ipa.c: Include extra header files.
9177 (initialize_fast_tracepoint_trampoline_buffer): New function.
9178 (initialize_low_tracepoint): Call it.
9179 * server.h (set_trampoline_buffer_space): Declare.
9180 (claim_trampoline_space): Ditto.
9181 (have_fast_tracepoint_trampoline_buffer): Ditto.
9182
9183 2011-11-14 Yao Qi <yao@codesourcery.com>
9184
9185 * server.c (handle_query): Handle InstallInTrace for qSupported.
9186 * tracepoint.c (add_tracepoint): Sort list.
9187 (install_tracepoint, download_tracepoint): New.
9188 (cmd_qtdp): Call them to install and download tracepoints.
9189 (sort_tracepoints): Removed.
9190 (cmd_qtstart): Update.
9191
9192 2011-11-14 Yao Qi <yao@codesourcery.com>
9193
9194 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9195 * mem-break.h: Declare.
9196 * tracepoint.c (cmd_qtstart): Move some code to ...
9197 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9198 New.
9199 (download_tracepoints): Move some code to ...
9200 (download_tracepoint_1): ... here. New.
9201
9202 2011-11-08 Yao Qi <yao@codesourcery.com>
9203
9204 * remote-utils.c (relocate_instruction): A comment fix.
9205
9206 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9207
9208 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9209 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9210 dr_status_mirror and dr_control_mirror from debug_reg_state.
9211 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9212 (i386_initial_stuff): Remove use of deleted globals.
9213 (i386_get_thread_context, i386_set_thread_context,
9214 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9215 from debug_reg_state.
9216
9217 2011-11-05 Yao Qi <yao@codesourcery.com>
9218
9219 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9220 address as TPOINT's.
9221
9222 2011-11-02 Stan Shebs <stan@codesourcery.com>
9223
9224 * tracepoint.c (agent_mem_read_string): New function.
9225 (eval_agent_expr): Call it for tracenz.
9226 * server.c (handle_query): Report support for tracenz.
9227
9228 2011-11-02 Yao Qi <yao@codesourcery.com>
9229
9230 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9231
9232 2011-11-02 Yao Qi <yao@codesourcery.com>
9233
9234 * target.h: Fix a typo in comment.
9235
9236 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9237
9238 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9239 clobber the breakpoints' shadows with fast tracepoint jumps.
9240 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9241 * target.c (write_inferior_memory): Also pass MYADDR down to
9242 check_mem_write.
9243
9244 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9245
9246 * configure.ac: Check support for personality routine.
9247 * configure: Regenerate.
9248 * config.in: Likewise.
9249 * linux-low.c: Include <sys/personality.h>.
9250 Define ADDR_NO_RANDOMIZE if necessary.
9251 (linux_create_inferior): Disable address space randomization when
9252 forking inferior, if requested.
9253 (linux_supports_disable_randomization): New function.
9254 (linux_target_ops): Install it.
9255 * server.h (disable_randomization): Declare.
9256 * server.c (disable_randomization): New global variable.
9257 (handle_general_set): Handle QDisableRandomization.
9258 (handle_query): Likewise for qSupported.
9259 (main): Support --disable-randomization and --no-disable-randomization
9260 command line arguments.
9261 * target.h (struct target_ops): Add supports_disable_randomization.
9262 (target_supports_disable_randomization): New macro.
9263
9264 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9265
9266 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9267 ifdef check.
9268 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9269 [!PT_GETDSBT] (target_loadmap): New definition.
9270 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9271 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9272 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9273 and PT_GETDSBT to LINUX_LOADMAP.
9274 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9275 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9276
9277 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9278
9279 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9280 (arm_linux_hwbp_cap): New static variable.
9281 (arm_linux_get_hwbp_cap): Replace by ...
9282 (arm_linux_init_hwbp_cap): ... this new function.
9283 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9284 (arm_linux_get_hw_watchpoint_count): Likewise.
9285 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9286 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9287 (arm_prepare_to_resume): Use perror_with_name instead of error.
9288
9289 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9290
9291 * linux-arm-low.c: Include <signal.h>.
9292 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9293 (struct arm_linux_hwbp_cap): New data type.
9294 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9295 (struct arm_linux_hw_breakpoint): New data type.
9296 (MAX_BPTS, MAX_WPTS): Define.
9297 (struct arch_process_info, struct arch_lwp_info): New data types.
9298 (arm_linux_get_hwbp_cap): New function.
9299 (arm_linux_get_hw_breakpoint_count): Likewise.
9300 (arm_linux_get_hw_watchpoint_count): Likewise.
9301 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9302 (arm_hwbp_control_initialize): Likewise.
9303 (arm_hwbp_control_is_enabled): Likewise.
9304 (arm_hwbp_control_is_initialized): Likewise.
9305 (arm_hwbp_control_disable): Likewise.
9306 (arm_linux_hw_breakpoint_equal): Likewise.
9307 (arm_linux_hw_point_initialize): Likewise.
9308 (struct update_registers_data): New data structure.
9309 (update_registers_callback: New function.
9310 (arm_insert_point): Likewise.
9311 (arm_remove_point): Likewise.
9312 (arm_stopped_by_watchpoint): Likewise.
9313 (arm_stopped_data_address): Likewise.
9314 (arm_new_process): Likewise.
9315 (arm_new_thread): Likewise.
9316 (arm_prepare_to_resume): Likewise.
9317 (the_low_target): Register arm_insert_point, arm_remove_point,
9318 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9319 arm_new_thread, and arm_prepare_to_resume.
9320
9321 2011-09-15 Stan Shebs <stan@codesourcery.com>
9322
9323 * server.h (struct emit_ops): Add compare-goto fields.
9324 * tracepoint.c (gdb_agent_op_sizes): New table.
9325 (emit_eq_goto): New function.
9326 (emit_ne_goto): New function.
9327 (emit_lt_goto): New function.
9328 (emit_le_goto): New function.
9329 (emit_gt_goto): New function.
9330 (emit_ge_goto): New function.
9331 (is_goto_target): New function.
9332 (compile_bytecodes): Recognize special cases of compare-goto
9333 combinations and call specialized emitters for them.
9334 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9335 (amd64_emit_ne_goto): New function.
9336 (amd64_emit_lt_goto): New function.
9337 (amd64_emit_le_goto): New function.
9338 (amd64_emit_gt_goto): New function.
9339 (amd64_emit_ge_goto): New function.
9340 (amd64_emit_ops): Add the new functions.
9341 (i386_emit_eq_goto): New function.
9342 (i386_emit_ne_goto): New function.
9343 (i386_emit_lt_goto): New function.
9344 (i386_emit_le_goto): New function.
9345 (i386_emit_gt_goto): New function.
9346 (i386_emit_ge_goto): New function.
9347 (i386_emit_ops): Add the new functions.
9348
9349 2011-09-08 Stan Shebs <stan@codesourcery.com>
9350
9351 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9352 (i386_emit_epilogue): Restore %ebx.
9353
9354 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9355
9356 * server.c (step_thread): Remove definition.
9357 (process_serial_event): Don't handle Hs.
9358 * server.h (step_thread): Remove declaration.
9359 * target.c (set_desired_inferior): Remove use of step_thread.
9360
9361 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9362
9363 * linux-low.c: Include linux-procfs.h.
9364 (linux_attach_lwp_1): Update comments.
9365 (linux_attach): Scan for existing threads when attaching to a
9366 process that is the tgid.
9367 * Makefile.in: Update dependencies.
9368
9369 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9370
9371 * configure.srv: Add linux-procfs.o dependencies.
9372
9373 2011-08-14 Yao Qi <yao@codesourcery.com>
9374
9375 * target.h (struct target_ops): Fix indent.
9376 * win32-low.c (win32_target_ops): Fix comment.
9377
9378 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9379 Yao Qi <yao@codesourcery.com>
9380
9381 * Makefile.in (clean): Remove tic6x-*.c files.
9382 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9383 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9384 (tic6x-c64xp-linux.c): Likewise.
9385 * configure.srv: Add support for tic6x-*-uclinux.
9386 * linux-tic6x-low.c: New.
9387 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9388
9389 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9390 Yao Qi <yao@codesourcery.com>
9391
9392 * target.h (struct target_ops): Add read_loadmap.
9393 * linux-low.c (struct target_loadseg): New type.
9394 (struct target_loadmap): New type.
9395 (linux_read_loadmap): New function.
9396 (linux_target_ops): Add linux_read_loadmap.
9397 * server.c (handle_query): Support qXfer:fdpic:read packet.
9398 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9399 to NULL.
9400
9401 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9402
9403 * win32-low.c: Include <stdint.h>.
9404
9405 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9406
9407 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9408 to the inferior here.
9409 (i386_remove_aligned_watchpoint): Ditto.
9410 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9411 fit part of the watchpoint in the debug registers.
9412 (i386_update_inferior_debug_regs): New.
9413 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9414 registers, and only update the inferior on success.
9415 (i386_low_remove_watchpoint): Ditto.
9416
9417 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9418
9419 * linux-low.c (compare_ints, unique, list_threads, show_process,
9420 linux_core_of_thread): Delete.
9421 (linux_target_ops): Change linux_core_of_thread to
9422 linux_common_core_of_thread.
9423 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9424 * utils.c (malloc_failure): Change type of argument.
9425 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9426 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9427 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9428 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9429 (IPA_OBJS): Add common-utils-ipa.o.
9430 (ptid_h, linux_osdata_h): New macros.
9431 (server_h): Add common/common-utils.h, common/xml-utils.h,
9432 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9433 common/ptid.h.
9434 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9435 ptid.o, buffer.o): New rules.
9436 (linux-low.o): Add common/linux-osdata.h as a dependency.
9437 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9438 * configure.ac: Add AC_HEADER_DIRENT check.
9439 * config.in: Regenerate.
9440 * configure: Regenerate.
9441 * remote-utils.c (xml_escape_text): Delete.
9442 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9443 buffer_xml_printf): Move to common/buffer.c.
9444 * server.c (main): Remove call to initialize_inferiors.
9445 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9446 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9447 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9448 internal_error, gdb_assert, gdb_assert_fail): Delete.
9449 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9450 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9451 common/buffer.h.
9452 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9453 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9454 initialize_inferiors): Delete.
9455
9456 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9457
9458 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9459 symbol error.
9460
9461 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9462
9463 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9464 assertion.
9465 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9466
9467 2011-05-26 Yao Qi <yao@codesourcery.com>
9468
9469 * Makefile.in (thread-db.o): Track dependence to
9470 common/gdb_thread_db.h.
9471 * thread-db.c: include gdb_thread_db.h from right place.
9472
9473 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9474
9475 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9476 __FILE__ and __LINE__ to internal_error.
9477
9478 2011-05-13 Doug Evans <dje@google.com>
9479
9480 * thread-db.c (try_thread_db_load_from_sdir): New function.
9481 (try_thread_db_load_from_dir): New function.
9482 (thread_db_load_search): Handle $sdir, ignore $pdir.
9483 Remove trying of system directories if search of
9484 libthread-db-search-path fails, that is now done via $sdir.
9485
9486 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9487
9488 * server.c (handle_query): Add EnableDisableTracepoints to the list
9489 of supported features.
9490 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9491 tracepoints.
9492 (cmd_qtenable_disable): New.
9493 (cmd_qtstart): Install tracepoints even if disabled.
9494 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9495 receiving a QTEnable or QTDisable packet.
9496 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9497 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9498 tracepoints.
9499 (gdb_probe): Skip data collection if static tracepoint is disabled.
9500
9501 2011-05-10 Doug Evans <dje@google.com>
9502
9503 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9504
9505 2011-05-04 Doug Evans <dje@google.com>
9506
9507 * linux-low.c (linux_join): Skip process lookup.
9508 * spu-low.c (spu_join): Ditto.
9509 * server.c (join_inferiors_callback): Delete.
9510 (process_serial_event): For 'D' packet (detach) call join_inferior
9511 directly.
9512
9513 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9514
9515 * README: Don't mention xscale*-*-linux*.
9516 * configure.srv (xscale*-*-linux*): Don't handle target.
9517
9518 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9519
9520 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9521 casting pointers.
9522 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9523 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9524 (i386_emit_void_call_2): Likewise.
9525
9526 2011-04-26 Yao Qi <yao@codesourcery.com>
9527
9528 * linux-low.c: Move common macros to linux-ptrace.h.
9529 Include linux-ptrace.h.
9530 * Makefile.in (linux_ptrace_h): New.
9531 (linux-low.o): Depends on linux-ptrace.h.
9532
9533 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9534
9535 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9536 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9537 (remote_prepare): New function with most of the TCP code from ...
9538 (remote_open): ... here. Detect PORT here unconditionally. Move also
9539 setting transport_is_reliable.
9540 * server.c (run_once): New variable.
9541 (gdbserver_usage): Document it.
9542 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9543 the first run if RUN_ONCE.
9544 * server.h (run_once, remote_prepare): New declarations.
9545
9546 2011-04-19 Tom Tromey <tromey@redhat.com>
9547
9548 * win32-low.c (handle_load_dll): Remove duplicate "the".
9549
9550 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9551
9552 Remove support for old Cygwin 1.5 versions.
9553 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9554 function to avoid warning.
9555 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9556 warning.
9557
9558 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9559
9560 * gdbserver/server.h (Macro _): Define it if not available.
9561
9562 2011-03-14 Michael Snyder <msnyder@vmware.com>
9563
9564 * hostio.c (handle_close): Remove unnecessary null test.
9565
9566 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9567
9568 * Makefile.in (maintainer-clean realclean distclean): Remove
9569 "make ... subdir_do" command.
9570
9571 2011-03-10 Michael Snyder <msnyder@vmware.com>
9572
9573 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9574
9575 * server.c (handle_v_run): Free alloced buffer on early return.
9576
9577 2011-03-09 Yao Qi <yao@codesourcery.com>
9578
9579 Revert:
9580 2011-03-04 Yao Qi <yao@codesourcery.com>
9581
9582 * Makefile.in: Remove GNU make feature --directory.
9583
9584 2011-03-05 Yao Qi <yao@codesourcery.com>
9585
9586 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9587 (subdir_do): New make target. Copied from gdb/Makefile.
9588 (maintainer-clean, realclean, distclean, clean): Call corresponding
9589 make targets in common/Makefile.
9590
9591 2011-02-11 Yao Qi <yao@codesourcery.com>
9592
9593 * configure.ac: Call AC_PROG_RANLIB.
9594 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9595 * configure: Regenerate.
9596
9597 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9598
9599 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9600
9601 2011-03-06 Yao Qi <yao@codesourcery.com>
9602
9603 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9604
9605 2011-03-05 Yao Qi <yao@codesourcery.com>
9606
9607 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9608 (subdir_do): New make target. Copied from gdb/Makefile.
9609 (maintainer-clean, realclean, distclean, clean): Call corresponding
9610 make targets in common/Makefile.
9611
9612 2011-03-04 Yao Qi <yao@codesourcery.com>
9613
9614 * Makefile.in: Remove GNU make feature --directory.
9615
9616 2011-03-04 Michael Snyder <msnyder@vmware.com>
9617
9618 * server.c (queue_stop_reply): Call xmalloc not malloc.
9619
9620 2011-03-02 Michael Snyder <msnyder@vmware.com>
9621
9622 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9623
9624 2011-02-28 Michael Snyder <msnyder@vmware.com>
9625
9626 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9627 (cmd_qtframe): Ditto.
9628 (cmd_qtbuffer): Ditto.
9629 (cmd_bigqtbuffer): Ditto.
9630
9631 * utils.c (decimal2str): Initialize 'width' to nine, then
9632 don't mess with it.
9633
9634 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9635
9636 * hostio.c (require_data): Free *data, not data.
9637
9638 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9639
9640 * hostio.c (require_data): Use free, not xfree.
9641
9642 2011-02-27 Michael Snyder <msnyder@vmware.com>
9643
9644 * server.c (handle_query): Discard unused value.
9645
9646 * hostio.c (require_data): Free malloc memory before returning
9647 error.
9648
9649 2011-02-26 Michael Snyder <msnyder@vmware.com>
9650
9651 * linux-low.c (list_threads): Call closedir for dirent.
9652
9653 2011-02-27 Michael Snyder <msnyder@vmware.com>
9654
9655 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9656 a case statement falls through.
9657
9658 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9659
9660 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9661 in comparison.
9662
9663 2011-02-26 Michael Snyder <msnyder@vmware.com>
9664
9665 * utils.c (decimal2str): Eliminate dead code and dead param.
9666 (pulongest): Drop dead param from call to decimal2str.
9667 (plongest): Ditto.
9668
9669 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9670
9671 Revert the following patch (not approved yet):
9672 2011-02-21 Hui Zhu <teawater@gmail.com>
9673 * tracepoint.c (tp_printf): New function.
9674 (eval_agent_expr): Handle gdb_agent_op_printf.
9675
9676 2011-02-21 Hui Zhu <teawater@gmail.com>
9677
9678 * tracepoint.c (tp_printf): New function.
9679 (eval_agent_expr): Handle gdb_agent_op_printf.
9680
9681 2011-02-18 Tom Tromey <tromey@redhat.com>
9682
9683 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9684 (tracepoint.o): Likewise.
9685 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9686 (gdb_agent_op_names): Likewise.
9687
9688 2011-02-18 Tom Tromey <tromey@redhat.com>
9689
9690 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9691 gdb_agent_op_rot>: New constants.
9692 (gdb_agent_op_names): Add pick and roll.
9693 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9694 cases.
9695
9696 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9697
9698 * aclocal.m4: Regenerated with aclocal-1.11.1.
9699
9700 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9701
9702 * server.c (handle_qxfer_traceframe_info): New.
9703 (qxfer_packets): Register "traceframe-info".
9704 (handle_query): Report support for qXfer:traceframe-info:read+.
9705 * tracepoint.c (match_blocktype): New.
9706 (traceframe_find_block_type): Rename to ...
9707 (traceframe_walk_blocks): ... this. Add callback filter argument,
9708 and use it.
9709 (traceframe_find_block_type): New, reimplemented on top of
9710 traceframe_walk_blocks.
9711 (build_traceframe_info_xml): New.
9712 (traceframe_read_info): New.
9713 * server.h (traceframe_read_info): Declare.
9714
9715 2011-02-11 Yao Qi <yao@codesourcery.com>
9716
9717 * configure.ac: Call AC_PROG_RANLIB.
9718 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9719 * configure: Regenerate.
9720
9721 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9722
9723 * server.c (gdb_read_memory): Change return semantics to allow
9724 partial transfers.
9725 (handle_search_memory_1): Adjust.
9726 (process_serial_event) <'m' packet>: Handle partial transfers.
9727 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9728
9729 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9730
9731 * regcache.c (init_register_cache): Initialize
9732 regcache->register_status.
9733 (free_register_cache): Release regcache->register_status.
9734 (regcache_cpy): Copy register_status.
9735 (registers_to_string): Print 'x's for unavailable registers.
9736 (supply_register): Mark the register's status valid or
9737 unavailable, depending on whether a buffer was passed in or not.
9738 (supply_register_zeroed): New.
9739 (supply_regblock): Mark the registers' status valid or
9740 unavailable, depending on whether a buffer was passed in or not.
9741 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9742 (struct regcache): New `register_status' field.
9743 (supply_register_zeroed): Declare.
9744 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9745 supply_register_zeroed, rather than passing a NULL buffer to
9746 supply_register.
9747 * tracepoint.c (fetch_traceframe_registers): Update comment.
9748
9749 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9750
9751 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9752 buffer explicit.
9753
9754 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9755
9756 * server.h (decode_xfer_write): Change prototype.
9757 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9758 and don't extract the annex here.
9759 * server.c (decode_xfer_read): Remove `annex' parameter,
9760 and don't extract the annex here.
9761 (decode_xfer): New.
9762 (struct qxfer): New.
9763 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9764 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9765 (handle_qxfer_statictrace): New functions, abstracted out from
9766 handle_query, and made to use the struct qxfer interface.
9767 (handle_threads_qxfer_proper): Rename to ...
9768 (handle_qxfer_threads_proper): ... this.
9769 (handle_threads_qxfer): Rename to ...
9770 (handle_qxfer_threads): ... this. Adjust.
9771 (qxfer_packets): New array.
9772 (handle_qxfer): New function.
9773 (handle_query): Use handle_qxfer.
9774
9775 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9776
9777 * gdbreplay.c: Shorten lines of >= 80 columns.
9778 * linux-low.c: Ditto.
9779 * linux-ppc-low.c: Ditto.
9780 * linux-s390-low.c: Ditto.
9781 * linux-sparc-low.c: Ditto.
9782 * linux-x86-low.c: Ditto.
9783 * linux-xtensa-low.c: Ditto.
9784 * mem-break.c: Ditto.
9785 * nto-low.c: Ditto.
9786 * regcache.h: Ditto.
9787 * remote-utils.c: Ditto.
9788 * server.c: Ditto.
9789 * server.h: Ditto.
9790 * thread-db.c: Ditto.
9791 * tracepoint.c: Ditto.
9792 * utils.c: Ditto.
9793 * win32-low.h: Ditto.
9794
9795 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9796
9797 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9798 update.
9799
9800 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9801
9802 * server.c (gdbserver_version): Update copyright year in version
9803 output.
9804 * gdbreplay.c (gdbreplay_version): Ditto.
9805
9806 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9807
9808 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9809 * linux-bfin-low.c: New file.
9810 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9811 PT_DATA_ADDR for BFIN targets.
9812 * Makefile.in (SFILES): Add linux-bfin-low.c.
9813 (clean): Remove reg-bfin.c.
9814 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9815 * README: Mention supported Blackfin targets.
9816
9817 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9818
9819 * .gitignore: New file.
9820
9821 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9822
9823 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9824
9825 2010-10-22 Jie Zhang <jie@codesourcery.com>
9826
9827 * Makefile.in: Add FLAGS_TO_PASS variable.
9828 (install): Remove dependency of install-only and recursively
9829 invoke make for install-only.
9830
9831 2010-10-04 Doug Evans <dje@google.com>
9832
9833 * Makefile.in (uninstall): Use $(DESTDIR).
9834
9835 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9836
9837 PR gdb/11842
9838
9839 * linux-x86-low.c (compat_siginfo_from_siginfo)
9840 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9841 si_code is < 0. Check for si_code == SI_TIMER before checking for
9842 si_code < 0.
9843
9844 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9845
9846 * lynx-i386-low.c: New file.
9847 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9848
9849 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9850
9851 * lynx-low.c (ptrace_request_to_str): Remove handling for
9852 request values that have been removed in LynxOS 5.x.
9853
9854 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9855
9856 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9857 <ptrace.h>
9858
9859 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9860
9861 * configure.ac: Add --enable-inprocess-agent option.
9862 * configure: Rebuilt.
9863
9864 2010-09-06 Yao Qi <yao@codesourcery.com>
9865
9866 * linux-low.c (linux_kill): Remove unused variable.
9867 (linux_stabilize_threads): Likewise.
9868 * server.c (start_inferior): Likewise.
9869 (queue_stop_reply_callback): Likewise.
9870 * tracepoint.c (do_action_at_tracepoint): Likewise.
9871
9872 2010-09-06 Yao Qi <yao@codesourcery.com>
9873
9874 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9875 on return.
9876
9877 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9878
9879 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9880
9881 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9882
9883 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9884 "$(IPA_DEPFILES)".
9885
9886 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9887
9888 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9889 gdbserver/lynx-ppc-low.c: New files.
9890 * Makefile.in (lynx_low_h): New variable.
9891 (lynx-low.o, lynx-ppc-low.o): New rules.
9892 * configure.ac: On LynxOS, link with -lnetinet.
9893 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9894 * configure: regenerate.
9895
9896 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9897
9898 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9899 * configure.ac: Add check for vasprintf and vsnprintf.
9900 * configure, config.in: Regenerate.
9901 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9902
9903 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9904
9905 * gdbreplay.c: Move include of alloca.h up, next to include of
9906 malloc.h.
9907 * server.h: Add include of malloc.h.
9908 * mem-break.c: Remove include of malloc.h.
9909 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9910
9911 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9912
9913 * Makefile.in (memmem.o): Build with -Wno-error.
9914
9915 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9916
9917 * utils.c (xsnprintf): Make non-static.
9918 * server.h: Add xsnprintf declaration.
9919 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9920 replace calls to snprintf by calls to xsnprintf throughout.
9921
9922 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9923
9924 * configure.ac: Add configure check for alloca.
9925 * configure, config.in: Regenerate.
9926 * server.h: Include alloca.h if it exists.
9927 * gdbreplay.c: Include alloca.h if it exists.
9928
9929 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9930
9931 * linux-low.c (__SIGRTMIN): Define if not already defined.
9932 (linux_create_inferior): Check for __ANDROID__ rather than
9933 __SIGRTMIN.
9934 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9935 are already deferred.
9936 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9937 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9938 stopped and already has a pending signal to report.
9939 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9940 a pending signal to report or is moving out of a jump pad.
9941 (linux_init_signals): Check for __ANDROID__ rather than
9942 __SIGRTMIN.
9943
9944 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9945
9946 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9947 debug_threads check. Avoid a linear search when not doing debug
9948 output.
9949
9950 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9951
9952 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9953 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9954 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9955 (process_event): Change local fd's type to gdb_fildes_t.
9956 (create_file_handler): Adjust prototype.
9957 (delete_file_handler): Adjust prototype.
9958 (handle_file_event): Adjust prototype. Use pfildes.
9959 (create_file_event): Adjsut prototype.
9960 * remote-utils.c (remote_desc, listen_desc): Change type to
9961 gdb_fildes_t.
9962 * server.h: New gdb_fildes_t typedef.
9963 [USE_WIN32API]: Include winsock2.h.
9964 (delete_file_handler, add_file_handler): Adjust prototypes.
9965 (pfildes): Declare.
9966 * utils.c (pfildes): New.
9967
9968 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9969
9970 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9971 * configure: Regenerate.
9972
9973 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9974
9975 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9976 (linux_done_accessing_memory): ... this.
9977 (linux_target_ops): Adjust.
9978 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9979 * nto-low.c (nto_target_ops): Adjust comment.
9980 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9981 * spu-low.c (spu_target_ops): Adjust comment.
9982 * target.h (target_ops): Rename unprepare_to_access_memory field
9983 to done_accessing_memory.
9984 (unprepare_to_access_memory): Rename to ...
9985 (done_accessing_memory): ... this.
9986
9987 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9988
9989 * linux-low.c (linux_prepare_to_access_memory): New.
9990 (linux_unprepare_to_access_memory): New.
9991 (linux_target_ops): Install them.
9992 * server.c (read_memory): Rename to ...
9993 (gdb_read_memory): ... this. Use
9994 prepare_to_access_memory/prepare_to_access_memory.
9995 (write_memory): Rename to ...
9996 (gdb_write_memory): ... this. Use
9997 prepare_to_access_memory/prepare_to_access_memory.
9998 (handle_search_memory_1): Adjust.
9999 (process_serial_event): Adjust.
10000 * target.h (struct target_ops): New fields
10001 prepare_to_access_memory and unprepare_to_access_memory.
10002 (prepare_to_access_memory, unprepare_to_access_memory): New.
10003 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10004 prepare_to_access_memory/prepare_to_access_memory.
10005 * nto-low.c (nto_target_ops): Adjust.
10006 * spu-low.c (spu_target_ops): Adjust.
10007 * win32-low.c (win32_target_ops): Adjust.
10008
10009 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10010
10011 * Makefile.in (WARN_CFLAGS): Get it from configure.
10012 (WERROR_CFLAGS): New.
10013 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10014 * configure.ac: Introduce --enable-werror, which adds -Werror to
10015 the compiler command line. Enabled by default. Disable with
10016 --disable-werror. Add -Wdeclaration-after-statement
10017 Wpointer-arith and -Wformat-nonliteral to warning flags.
10018 * configure: Regenerate.
10019
10020 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10021
10022 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10023
10024 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10025
10026 * gdbreplay.c (remote_error): New.
10027 (gdbchar): New.
10028 (expect): Use gdbchar. Check for error reading from GDB.
10029 Clarify sync error output.
10030 (play): Check for errors writing to GDB.
10031 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10032 * remote-utils.c (getpkt): Check for errors writing to the remote
10033 descriptor.
10034
10035 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10036
10037 * linux-low.c (linux_wait_1): Move non-debugging code out of
10038 `debug_threads' control.
10039
10040 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10041
10042 * linux-low.c (linux_wait_1): Don't set last_status here.
10043 * server.c (push_event, queue_stop_reply_callback): Assert we're
10044 not pushing a TARGET_WAITKIND_IGNORE event.
10045 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10046 (myresume, handle_target_event): Set the thread's last_resume_kind
10047 and last_status from the target returned status.
10048
10049 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10050
10051 PR threads/10729
10052
10053 * linux-x86-low.c (update_debug_registers_callback): New.
10054 (i386_dr_low_set_addr): Use it.
10055 (i386_dr_low_get_addr): New.
10056 (i386_dr_low_set_control): Use update_debug_registers_callback.
10057 (i386_dr_low_get_control): New.
10058 (i386_dr_low_get_status): Adjust.
10059 * linux-low.c (linux_stop_lwp): New.
10060 * linux-low.h (linux_stop_lwp): Declare.
10061
10062 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10063 argument instead of a i386_debug_reg_state.
10064 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10065 a i386_debug_reg_state.
10066 (i386_insert_aligned_watchpoint): Adjust.
10067 (i386_remove_aligned_watchpoint): Adjust.
10068 (i386_low_stopped_data_address): Read the debug registers from the
10069 inferior instead of from the mirrors.
10070 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10071 (i386_dr_low_get_addr): Declare.
10072 (i386_dr_low_get_control): Declare.
10073 (i386_dr_low_get_status): Change prototype.
10074
10075 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10076 (i386_dr_low_get_addr): New.
10077 (i386_dr_low_get_control): New.
10078 (i386_dr_low_get_status): Adjust prototype. Return
10079 dr_status_mirror.
10080 (i386_initial_stuff): Clear dr_status_mirror and
10081 dr_control_mirror.
10082 (i386_get_thread_context): Adjust.
10083 (i386_set_thread_context): Adjust.
10084 (i386_thread_added): Adjust.
10085
10086 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10087
10088 * linux-low.h (linux_thread_area): Delete declaration.
10089
10090 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10091
10092 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10093 after its termination.
10094
10095 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10096
10097 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10098 (gdb_wants_all_stopped): Delete.
10099 (linux_wait_1): Don't call them.
10100 * server.c (handle_v_cont): Tag all threads as want-stopped.
10101 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10102 stopped as "client-wants-stopped".
10103
10104 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10105
10106 * Makefile.in (signals_h): New.
10107 (server_h): Depend on it.
10108 (server.o): Don't depend on $(signals_def).
10109 (signals.o): Depend on $(signals_def).
10110
10111 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10112
10113 * Makefile.in (signals_def): New.
10114 (server_h): Append include/gdb/signals.h and signals_def.
10115 (server.o): Append signals_def.
10116
10117 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10118
10119 * server.c (handle_target_event): Use target_signal_to_host for
10120 resume_info.sig initialization.
10121 * target.h (struct thread_resume) <sig>: New comment.
10122
10123 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10124
10125 * server.c (handle_query): strcpy() the returned string from paddress()
10126 instead of sprintf().
10127 * utils.c (paddress): Return phex_nz().
10128
10129 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10130
10131 * server.c (handle_v_cont): Call mourn_inferior if process
10132 just exited.
10133 (myresume): Likewise.
10134
10135 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10136
10137 Static tracepoints, and integration with UST.
10138
10139 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10140 * mem-break.c (uninsert_all_breakpoints)
10141 (reinsert_all_breakpoints): New.
10142 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10143 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10144 (gdb_agent_ust_loaded, helper_thread_id)
10145 (gdb_agent_helper_thread_id): New macros.
10146 (struct ipa_sym_addresses): Add addr_ust_loaded,
10147 addr_helper_thread_id, addr_cmd_buf.
10148 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10149 (in_process_agent_loaded_ust): New.
10150 (write_e_ust_not_loaded): New.
10151 (maybe_write_ipa_ust_not_loaded): New.
10152 (struct collect_static_trace_data_action): New.
10153 (enum tracepoint_type) <static_tracepoint>: New.
10154 (struct tracepoint) <handle>: Mention static tracepoints.
10155 (struct static_tracepoint_ctx): New.
10156 (CMD_BUF_SIZE): New.
10157 (add_tracepoint_action): Handle static tracepoint actions.
10158 (unprobe_marker_at): New.
10159 (clear_installed_tracepoints): Handle static tracepoints.
10160 (cmd_qtdp): Handle static tracepoints.
10161 (probe_marker_at): New.
10162 (cmd_qtstart): Handle static tracepoints.
10163 (response_tracepoint): Handle static tracepoints.
10164 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10165 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10166 (get_context_regcache): Handle static tracepoints.
10167 (do_action_at_tracepoint): Handle static tracepoint actions.
10168 (traceframe_find_block_type): Handle static trace data blocks.
10169 (traceframe_read_sdata): New.
10170 (download_tracepoints): Download static tracepoint actions.
10171 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10172 (GDB_PROBE_NAME): New.
10173 (ust_ops): New.
10174 (GET_UST_SYM): New.
10175 (USTF): New.
10176 (dlsym_ust): New.
10177 (ust_marker_to_static_tracepoint): New.
10178 (gdb_probe): New.
10179 (collect_ust_data_at_tracepoint): New.
10180 (gdb_ust_probe): New.
10181 (UNIX_PATH_MAX, SOCK_DIR): New.
10182 (gdb_ust_connect_sync_socket): New.
10183 (resume_thread, stop_thread): New.
10184 (run_inferior_command): New.
10185 (init_named_socket): New.
10186 (gdb_ust_socket_init): New.
10187 (cstr_to_hexstr): New.
10188 (next_st): New.
10189 (first_marker, next_marker): New.
10190 (response_ust_marker): New.
10191 (cmd_qtfstm, cmd_qtsstm): New.
10192 (unprobe_marker_at, probe_marker_at): New.
10193 (cmd_qtstmat, gdb_ust_thread): New.
10194 (gdb_ust_init): New.
10195 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10196 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10197 (ST_REGENTRY): New.
10198 (x86_64_st_collect_regmap): New.
10199 (X86_64_NUM_ST_COLLECT_GREGS): New.
10200 (AMD64_RIP_REGNUM): New.
10201 (supply_static_tracepoint_registers): New.
10202 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10203 (ST_REGENTRY): New.
10204 (i386_st_collect_regmap): New.
10205 (i386_NUM_ST_COLLECT_GREGS): New.
10206 (supply_static_tracepoint_registers): New.
10207 * server.c (handle_query): Handle qXfer:statictrace:read.
10208 <qSupported>: Report support for StaticTracepoints, and
10209 qXfer:statictrace:read features.
10210 * server.h (traceframe_read_sdata)
10211 (supply_static_tracepoint_registers): Declare.
10212 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10213 (unpack_varlen_hex): Include in IPA build.
10214 * Makefile.in (ustlibs, ustinc): New.
10215 (IPA_OBJS): Add remote-utils-ipa.o.
10216 ($(IPA_LIB)): Link -ldl and -lpthread.
10217 (UST_CFLAGS): New.
10218 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10219 * config.in, configure: Regenerate.
10220
10221 2010-06-20 Ian Lance Taylor <iant@google.com>
10222 Pedro Alves <pedro@codesourcery.com>
10223
10224 * linux-x86-low.c (always_true): Delete.
10225 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10226 trying to fool the compiler with always_true.
10227
10228 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10229
10230 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10231 conditions in gdbserver.
10232
10233 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10234
10235 * spu-low.c (spu_read_memory): Wrap around local store limit.
10236 (spu_write_memory): Likewise.
10237
10238 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10239
10240 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10241 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10242 LONGEST uses.
10243 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10244 uses.
10245 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10246 uses with LONGEST uses.
10247
10248 2010-06-14 Stan Shebs <stan@codesourcery.com>
10249 Pedro Alves <pedro@codesourcery.com>
10250
10251 Bytecode compiler.
10252
10253 * linux-x86-low.c: Include limits.h.
10254 (add_insns): New.
10255 (always_true): New.
10256 (EMIT_ASM): New.
10257 (EMIT_ASM32): New.
10258 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10259 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10260 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10261 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10262 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10263 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10264 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10265 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10266 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10267 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10268 (amd64_emit_void_call_2): New.
10269 (amd64_emit_ops): New.
10270 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10271 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10272 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10273 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10274 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10275 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10276 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10277 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10278 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10279 (i386_emit_stack_adjust, i386_emit_int_call_1)
10280 (i386_emit_void_call_2): New.
10281 (i386_emit_ops): New.
10282 (x86_emit_ops): New.
10283 (the_low_target): Install x86_emit_ops.
10284 * server.h (struct emit_ops): New.
10285 (get_raw_reg_func_addr): Declare.
10286 (current_insn_ptr, emit_error): Declare.
10287 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10288 (set_trace_state_variable_value): New defines.
10289 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10290 addr_get_trace_state_variable_value and
10291 addr_set_trace_state_variable_value.
10292 (symbol_list): New fields for get_raw_reg,
10293 get_trace_state_variable_value and set_trace_state_variable_value.
10294 (condfn): New typedef.
10295 (struct tracepoint): New field `compiled_cond'.
10296 (do_action_at_tracepoint): Clear compiled_cond.
10297 (get_trace_state_variable_value, set_trace_state_variable_value):
10298 Export in the IPA.
10299 (condition_true_at_tracepoint): If there's a compiled condition,
10300 run that.
10301 (current_insn_ptr, emit_error): New globals.
10302 (struct bytecode_address): New.
10303 (get_raw_reg_func_addr): New.
10304 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10305 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10306 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10307 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10308 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10309 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10310 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10311 (compile_tracepoint_condition, compile_bytecodes): New.
10312 * target.h (emit_ops): Forward declare.
10313 (struct target_ops): New field emit_ops.
10314 (target_emit_ops): New.
10315 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10316 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10317 * linux-low.c (linux_emit_ops): New.
10318 (linux_target_ops): Install it.
10319 * linux-low.h (struct linux_target_ops): New field emit_ops.
10320
10321 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10322
10323 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10324 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10325
10326 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10327 Stan Shebs <stan@codesourcery.com>
10328
10329 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10330 (all): Depend on $(extra_libraries).
10331 (install-only): Install the IPA.
10332 (IPA_OBJS, IPA_LIB): New.
10333 (clean): Remove the IPA lib.
10334 (IPAGENT_CFLAGS): New.
10335 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10336 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10337 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10338 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10339 * configure.ac: Check for atomic builtins support in the compiler.
10340 (IPA_DEPFILES, extra_libraries): Define.
10341 * configure.srv (ipa_obj): Add description.
10342 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10343 (i[34567]86-*-linux*): Set ipa_obj.
10344 (x86_64-*-linux*): Set ipa_obj.
10345 * linux-low.c (stabilizing_threads): New.
10346 (supports_fast_tracepoints): New.
10347 (linux_detach): Stabilize threads before detaching.
10348 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10349 the lwp is either not stabilizing, or is moving out of a jump pad.
10350 (linux_fast_tracepoint_collecting): New.
10351 (maybe_move_out_of_jump_pad): New.
10352 (enqueue_one_deferred_signal): New.
10353 (dequeue_one_deferred_signal): New.
10354 (linux_wait_for_event_1): If moving out of a jump pad, defer
10355 pending signals to later.
10356 (linux_stabilize_threads): New.
10357 (linux_wait_1): Check if threads need moving out of jump pads, and
10358 do it if so.
10359 (stuck_in_jump_pad_callback): New.
10360 (move_out_of_jump_pad_callback): New.
10361 (lwp_running): New.
10362 (linux_resume_one_lwp): Handle moving out of jump pads.
10363 (linux_set_resume_request): Dequeue deferred signals.
10364 (need_step_over_p): Also step over fast tracepoint jumps.
10365 (start_step_over): Also uninsert fast tracepoint jumps.
10366 (finish_step_over): Also reinsert fast tracepoint jumps.
10367 (linux_install_fast_tracepoint_jump): New.
10368 (linux_target_ops): Install linux_stabilize_threads and
10369 linux_install_fast_tracepoint_jump_pad.
10370 * linux-low.h (linux_target_ops) <get_thread_area,
10371 install_fast_tracepoint_jump_pad>: New fields.
10372 (struct lwp_info) <collecting_fast_tracepoint,
10373 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10374 (linux_get_thread_area): Declare.
10375 * linux-x86-low.c (jump_insn): New.
10376 (x86_get_thread_area): New.
10377 (append_insns): New.
10378 (push_opcode): New.
10379 (amd64_install_fast_tracepoint_jump_pad): New.
10380 (i386_install_fast_tracepoint_jump_pad): New.
10381 (x86_install_fast_tracepoint_jump_pad): New.
10382 (the_low_target): Install x86_get_thread_area and
10383 x86_install_fast_tracepoint_jump_pad.
10384 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10385 (struct fast_tracepoint_jump): New.
10386 (fast_tracepoint_jump_insn): New.
10387 (fast_tracepoint_jump_shadow): New.
10388 (find_fast_tracepoint_jump_at): New.
10389 (fast_tracepoint_jump_here): New.
10390 (delete_fast_tracepoint_jump): New.
10391 (set_fast_tracepoint_jump): New.
10392 (uninsert_fast_tracepoint_jumps_at): New.
10393 (reinsert_fast_tracepoint_jumps_at): New.
10394 (set_breakpoint_at): Use write_inferior_memory.
10395 (uninsert_raw_breakpoint): Use write_inferior_memory.
10396 (check_mem_read): Mask out fast tracepoint jumps.
10397 (check_mem_write): Mask out fast tracepoint jumps.
10398 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10399 (set_fast_tracepoint_jump): Declare.
10400 (delete_fast_tracepoint_jump)
10401 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10402 (reinsert_fast_tracepoint_jumps_at): Declare.
10403 * regcache.c: Don't compile many functions when building the
10404 in-process agent library.
10405 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10406 the register buffer in the heap.
10407 (free_register_cache): If the register buffer isn't owned by the
10408 regcache, don't free it.
10409 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10410 pre-existing register caches.
10411 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10412 type.
10413 (convert_ascii_to_int): : Constify `from' parameter type.
10414 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10415 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10416 the needed buffer in-place.
10417 (relocate_instruction): New.
10418 * server.c (handle_query) <qSymbols>: If the target supports
10419 tracepoints, give it a chance of looking up symbols. Report
10420 support for fast tracepoints.
10421 (handle_status): Stabilize threads.
10422 (process_serial_event): Adjust.
10423 * server.h (struct fast_tracepoint_jump): Forward declare.
10424 (struct process_info) <fast_tracepoint_jumps>: New field.
10425 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10426 (decode_X_packet, decode_M_packet): Adjust.
10427 (relocate_instruction): Declare.
10428 (in_process_agent_loaded): Declare.
10429 (tracepoint_look_up_symbols): Declare.
10430 (struct fast_tpoint_collect_status): Declare.
10431 (fast_tracepoint_collecting): Declare.
10432 (force_unlock_trace_buffer): Declare.
10433 (handle_tracepoint_bkpts): Declare.
10434 (initialize_low_tracepoint)
10435 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10436 * target.h (struct target_ops) <stabilize_threads,
10437 install_fast_tracepoint_jump_pad>: New fields.
10438 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10439 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10440 [HAVE_STDINT_H]: Include stdint.h.
10441 (trace_debug_1): Rename to ...
10442 (trace_vdebug): ... this.
10443 (trace_debug): Rename to ...
10444 (trace_debug_1): ... this. Add `level' parameter.
10445 (trace_debug): New.
10446 (ATTR_USED, ATTR_NOINLINE): New.
10447 (IP_AGENT_EXPORT): New.
10448 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10449 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10450 (about_to_request_buffer_space, trace_buffer_is_full)
10451 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10452 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10453 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10454 (traceframe_write_count, traceframes_created)
10455 (trace_state_variables)
10456 New renaming defines.
10457 (struct ipa_sym_addresses): New.
10458 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10459 (symbol_list): New.
10460 (ipa_sym_addrs): New.
10461 (all_tracepoint_symbols_looked_up): New.
10462 (in_process_agent_loaded): New.
10463 (write_e_ipa_not_loaded): New.
10464 (maybe_write_ipa_not_loaded): New.
10465 (tracepoint_look_up_symbols): New.
10466 (debug_threads) [IN_PROCESS_AGENT]: New.
10467 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10468 (UNKNOWN_SIDE_EFFECTS): New.
10469 (stop_tracing): New.
10470 (flush_trace_buffer): New.
10471 (stop_tracing_bkpt): New.
10472 (flush_trace_buffer_bkpt): New.
10473 (read_inferior_integer): New.
10474 (read_inferior_uinteger): New.
10475 (read_inferior_data_pointer): New.
10476 (write_inferior_data_pointer): New.
10477 (write_inferior_integer): New.
10478 (write_inferior_uinteger): New.
10479 (struct collect_static_trace_data_action): Delete.
10480 (enum tracepoint_type): New.
10481 (struct tracepoint) <type>: New field `type'.
10482 <actions_str, step_actions, step_actions_str>: Only include in
10483 GDBserver.
10484 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10485 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10486 (tracepoints): Use IP_AGENT_EXPORT.
10487 (last_tracepoint): Don't include in the IPA.
10488 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10489 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10490 (alloced_trace_state_variables): New.
10491 (trace_state_variables): Use IP_AGENT_EXPORT.
10492 (traceframe_t): Delete unused variable.
10493 (circular_trace_buffer): Don't include in the IPA.
10494 (trace_buffer_start): Delete.
10495 (struct trace_buffer_control): New.
10496 (trace_buffer_free): Delete.
10497 (struct ipa_trace_buffer_control): New.
10498 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10499 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10500 New.
10501 (trace_buffer_ctrl): New.
10502 (TRACE_BUFFER_CTRL_CURR): New.
10503 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10504 Reimplement as macros.
10505 (trace_buffer_wrap): Delete.
10506 (traceframe_write_count, traceframe_read_count)
10507 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10508 (struct tracepoint_hit_ctx) <type>: New field.
10509 (struct fast_tracepoint_ctx): New.
10510 (memory_barrier): New.
10511 (cmpxchg): New.
10512 (record_tracepoint_error): Update atomically in the IPA.
10513 (clear_inferior_trace_buffer): New.
10514 (about_to_request_buffer_space): New.
10515 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10516 updating the same buffer.
10517 (add_tracepoint): Default the tracepoint's type to trap
10518 tracepoint, and orig_size to -1.
10519 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10520 internal variables.
10521 (create_trace_state_variable): New parameter `gdb'. Handle it.
10522 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10523 (cmd_qtdp): Handle fast tracepoints.
10524 (cmd_qtdv): Adjust.
10525 (max_jump_pad_size): New.
10526 (gdb_jump_pad_head): New.
10527 (get_jump_space_head): New.
10528 (claim_jump_space): New.
10529 (sort_tracepoints): New.
10530 (MAX_JUMP_SIZE): New.
10531 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10532 IPA.
10533 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10534 support. Upload fast traceframes, and delete internal IPA
10535 breakpoints.
10536 (stop_tracing_handler): New.
10537 (flush_trace_buffer_handler): New.
10538 (cmd_qtstop): Upload fast tracepoints.
10539 (response_tracepoint): Handle fast tracepoints.
10540 (tracepoint_finished_step): Upload fast traceframes. Set the
10541 tracepoint hit context's tracepoint type.
10542 (handle_tracepoint_bkpts): New.
10543 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10544 type. Add comment about fast tracepoints.
10545 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10546 non-existing action_str field.
10547 (get_context_regcache): Handle fast tracepoints.
10548 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10549 to the regcache.
10550 (fast_tracepoint_from_jump_pad_address): New.
10551 (fast_tracepoint_from_ipa_tpoint_address): New.
10552 (collecting_t): New.
10553 (force_unlock_trace_buffer): New.
10554 (fast_tracepoint_collecting): New.
10555 (collecting): New.
10556 (gdb_collect): New.
10557 (write_inferior_data_ptr): New.
10558 (target_tp_heap): New.
10559 (target_malloc): New.
10560 (download_agent_expr): New.
10561 (UALIGN): New.
10562 (download_tracepoints): New.
10563 (download_trace_state_variables): New.
10564 (upload_fast_traceframes): New.
10565 (IPA_FIRST_TRACEFRAME): New.
10566 (IPA_NEXT_TRACEFRAME_1): New.
10567 (IPA_NEXT_TRACEFRAME): New.
10568 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10569 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10570 (gdb_jump_pad_buffer_end): New.
10571 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10572 (initialize_tracepoint): Adjust.
10573 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10574 buffer. Initialize the low module.
10575 * utils.c (PREFIX, TOOLNAME): New.
10576 (malloc_failure): Use PREFIX.
10577 (error): In the IPA, an error causes an exit.
10578 (fatal, warning): Use PREFIX.
10579 (internal_error): Use TOOLNAME.
10580 (NUMCELLS): Increase to 10.
10581 * configure, config.in: Regenerate.
10582
10583 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10584
10585 * server.c (handle_query) <qSupported>: Do two passes over the
10586 qSupported string to avoid nesting strtok.
10587
10588 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10589
10590 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10591 (CDEPS): New.
10592 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10593 -Wl,--dynamic-list.
10594 * configure: Regenerate.
10595 * proc-service.list: New.
10596
10597 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10598
10599 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10600 New comment.
10601
10602 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10603
10604 * gdbreplay.c (remote_open): Check error return from socket() call by
10605 its equality to -1 not by it being negative.
10606 * remote-utils.c (remote_open): Likewise.
10607
10608 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10609
10610 * config.h: Regenerate.
10611
10612 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10613
10614 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10615 doesn't provide PTRACE_GET_THREAD_AREA.
10616
10617 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10618
10619 * linux-m68k-low.c: Include <asm/ptrace.h>
10620 (ps_get_thread_area): Implement.
10621
10622 2010-05-03 Doug Evans <dje@google.com>
10623
10624 * event-loop.c (struct callback_event): New struct.
10625 (callback_list): New global.
10626 (append_callback_event, delete_callback_event): New functions.
10627 (process_callback): New function.
10628 (start_event_loop): Call it.
10629 * remote-utils.c (NOT_SCHEDULED): Define.
10630 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10631 moved out of readchar.
10632 (readchar): Rewrite. Call reschedule before returning.
10633 (reset_readchar): New function.
10634 (remote_close): Call it.
10635 (process_remaining, reschedule): New functions.
10636 * server.h (callback_handler_func): New typedef.
10637 (append_callback_event, delete_callback_event): Declare.
10638
10639 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10640
10641 * proc-service.c (ps_pglobal_lookup): Use
10642 thread_db_look_up_one_symbol.
10643 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10644 parameter. Use it instead of all_symbols_looked_up.
10645 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10646 field.
10647 (all_symbols_looked_up): Don't declare.
10648 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10649 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10650 field.
10651 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10652 Set all_symbols_looked_up here.
10653 (thread_db_look_up_one_symbol): New.
10654 (thread_db_get_tls_address): Adjust.
10655 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10656 thread_db object on the heap, and tentatively set it in the
10657 process structure.
10658 (thread_db_init): Don't set all_symbols_looked_up here.
10659 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10660
10661 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10662
10663 * linux-low.c (linux_kill, linux_detach): Adjust.
10664 (status_pending_p_callback): Remove redundant statement. Check
10665 for !TARGET_WAITIKIND_IGNORE, instead of
10666 TARGET_WAITKIND_STOPPED.
10667 (handle_tracepoints): Make sure LWP is locked. Adjust.
10668 (linux_wait_for_event_1): Adjust.
10669 (linux_cancel_breakpoints): New.
10670 (unsuspend_one_lwp): New.
10671 (unsuspend_all_lwps): New.
10672 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10673 (send_sigstop_callback): Change return type to int, add new
10674 `except' parameter and handle it.
10675 (suspend_and_send_sigstop_callback): New.
10676 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10677 pass them down. If SUSPEND, also increment the lwp's suspend
10678 count.
10679 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10680 (need_step_over_p): Don't consider suspended LWPs.
10681 (start_step_over): Adjust.
10682 (proceed_one_lwp): Change return type to int, add new `except'
10683 parameter and handle it.
10684 (unsuspend_and_proceed_one_lwp): New.
10685 (proceed_all_lwps): Use find_inferior instead of
10686 for_each_inferior.
10687 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10688 also decrement the suspend count of LWPs. Pass `except' down,
10689 instead of hacking its suspend count.
10690 (linux_pause_all): Add `freeze' parameter. Adjust.
10691 (linux_unpause_all): New.
10692 (linux_target_ops): Install linux_unpause_all.
10693 * server.c (handle_status): Adjust.
10694 * target.h (struct target_ops): New fields `unpause_all' and
10695 `cancel_breakpoints'. Add new parameter to `pause_all'.
10696 (pause_all): Add new `freeze' parameter.
10697 (unpause_all): New.
10698 (cancel_breakpoints): New.
10699 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10700 cancel breakpoints.
10701 (cmd_qtstart): Pause threads.
10702 (stop_tracing): Pause threads, and cancel breakpoints.
10703 * win32-low.c (win32_target_ops): Adjust.
10704
10705 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10706
10707 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10708 the inferior right away from here...
10709 (linux_wait_1): ... to here, and adjust to check the thread's
10710 last_resume_kind instead of the lwp's step or stop_expected flags.
10711
10712 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10713
10714 * README: Use consistent `GDB' and `GDBserver' spellings.
10715
10716 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10717
10718 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10719 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10720 (linux_detach_one_lwp): Assume the lwp is stopped.
10721 (any_thread_of): Delete.
10722 (linux_detach): Stop all lwps here. Don't blindly delete all
10723 breakpoints.
10724 (delete_lwp_callback): New.
10725 (linux_mourn): Delete all lwps of the process that is gone.
10726 (linux_wait_1): Don't delete the last lwp of the process here.
10727 * mem-break.h (mark_breakpoints_out): Declare.
10728 * mem-break.c (mark_breakpoints_out): New.
10729 (free_all_breakpoints): Use it.
10730 * server.c (handle_target_event): If the process is gone, mark
10731 breakpoints out.
10732 * thread-db.c (struct thread_db) <create_bp>: New field.
10733 (thread_db_enable_reporting): Fix prototype. Store a thread event
10734 breakpoint reference in the thread_db struct.
10735 (thread_db_load_search): Clear the thread_db object.
10736 (try_thread_db_load_1): Ditto.
10737 (switch_to_process): New.
10738 (disable_thread_event_reporting): Use it.
10739 (remove_thread_event_breakpoints): New.
10740 (thread_db_detach, thread_db_mourn): Use it.
10741
10742 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10743
10744 * linux-low.c (linux_enable_event_reporting): New.
10745 (linux_wait_for_event_1, handle_extended_wait): Use it.
10746
10747 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10748
10749 * linux-low.c (linux_kill_one_lwp, linux_kill)
10750 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10751 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10752 SIGSTOP even if the LWP is stopped.
10753 (send_sigstop_callback): New.
10754 (stop_all_lwps): Use send_sigstop_callback instead.
10755 (linux_resume_one_thread): Adjust.
10756 (proceed_one_lwp): Still proceed an LWP that the client has
10757 requested to stop, if we haven't reported it as stopped yet. Make
10758 sure that LWPs the client want stopped, have a pending SIGSTOP.
10759
10760 2010-04-26 Doug Evans <dje@google.com>
10761
10762 * server.c (handle_general_set): Make static.
10763
10764 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10765 Print received char after testing for error/eof instead of before.
10766 (input_interrupt): Tweak comment.
10767
10768 2010-04-23 Doug Evans <dje@google.com>
10769
10770 * server.c (start_inferior): Print inferior argv if --debug.
10771
10772 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10773
10774 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10775 * nto-x86-low.c: Include server.h
10776
10777 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10778
10779 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10780 be consistent with other sources of this directory.
10781 (init_registers_amd64): Correct name of source file of this function
10782 in the comment.
10783
10784 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10785
10786 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10787 64-bit executables.
10788
10789 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10790
10791 * win32-i386-low.c: Add 64-bit support.
10792 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10793 (init_registers_amd64): Declare.
10794 (mappings): Add 64-bit version of array.
10795 (init_windows_x86): New function.
10796 (the_low_target): Change init_arch field to init_windows_x86.
10797
10798 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10799
10800 * win32-low.c: Adapt to support also 64-bit architecture.
10801 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10802 (get_image_name): Use SIZE_T type for local variable `done'.
10803 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10804 (toolhelp_get_dll_name): Idem.
10805 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10806 Use uintptr_t typecast to avoid warning.
10807 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10808 (handle_exception): Use phex_nz to avoid warning.
10809 (win32_wait): Remove unused local variable `process'.
10810
10811 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10812
10813 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10814 `amd64-avx.o'.
10815
10816 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10817
10818 * configure.ac: Use `ws2_32' library for srv_mingw.
10819 * configure: Regenerate.
10820 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10821 * remote-utils.c: Likewise.
10822
10823 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10824
10825 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10826 if __x86_64__ is defined.
10827
10828 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10829
10830 * configure: Regenerate.
10831
10832 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10833
10834 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10835 * target.h (target_ops): New get_tib_address field.
10836 * win32-low.h (win32_thread_info): Add thread_local_base field.
10837 * win32-low.c (child_add_thread): Add tlb argument.
10838 Set thread_local_base field to TLB.
10839 (get_child_debug_event): Adapt to child_add_thread change.
10840 (win32_get_tib_address): New function.
10841 (win32_target_ops): Set get_tib_address field to
10842 win32_get_tib_address.
10843 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10844
10845 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10846
10847 * linux-low.c (linux_mourn): Also remove the process.
10848 * server.c (handle_target_event): Don't remove the process here.
10849 * nto-low.c (nto_mourn): New.
10850 (nto_target_ops): Install it.
10851 * spu-low.c (spu_mourn): New.
10852 (spu_target_ops): Install it.
10853 * win32-low.c (win32_mourn): New.
10854 (win32_target_ops): Install it.
10855
10856 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10857
10858 * server.h (buffer_xml_printf): Remove redundant `;'.
10859
10860 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10861
10862 * regcache.c (set_register_cache): Invalidate regcaches before
10863 changing the register cache layout.
10864 (regcache_invalidate_one): Allow a NULL regcache.
10865 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10866 regcaches before changing the register cache layout or the target
10867 regsets.
10868
10869 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10870
10871 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10872 variable warning on Linux/x86-64.
10873
10874 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10875
10876 GDBserver disconnected tracing support.
10877
10878 * linux-low.c (linux_remove_process): Delete.
10879 (add_lwp): Don't set last_resume_kind here.
10880 (linux_kill): Use `mourn'.
10881 (linux_detach): Use `thread_db_detach', and `mourn'.
10882 (linux_mourn): New.
10883 (linux_attach_lwp_1): Adjust comment.
10884 (linux_attach): last_resume_kind moved the thread_info; adjust.
10885 (status_pending_p_callback): Adjust.
10886 (linux_wait_for_event_1): Adjust.
10887 (count_events_callback, select_singlestep_lwp_callback)
10888 (select_event_lwp_callback, cancel_breakpoints_callback)
10889 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10890 (proceed_one_lwp): Adjust.
10891 (linux_async): Add debug output.
10892 (linux_thread_stopped): New.
10893 (linux_pause_all): New.
10894 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10895 linux_pause_all.
10896 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10897 (thread_db_free): Delete declaration.
10898 (thread_db_detach, thread_db_mourn): Declare.
10899 * thread-db.c (thread_db_init): Use thread_db_mourn.
10900 (thread_db_free): Delete, split in two.
10901 (disable_thread_event_reporting): New.
10902 (thread_db_detach): New.
10903 (thread_db_mourn): New.
10904
10905 * server.h (struct thread_info) <last_resume_kind>: New field.
10906 <attached>: Add comment.
10907 <gdb_detached>: New field.
10908 (handler_func): Change return type to int.
10909 (handle_serial_event, handle_target_event): Ditto.
10910 (gdb_connected): Declare.
10911 (tracing): Delete.
10912 (disconnected_tracing): Declare.
10913 (stop_tracing): Declare.
10914
10915 * server.c (handle_query) <qSupported>: Report support for
10916 disconnected tracing.
10917 (queue_stop_reply_callback): Account for running threads.
10918 (gdb_wants_thread_stopped): New.
10919 (gdb_wants_all_threads_stopped): New.
10920 (gdb_reattached_process): New.
10921 (handle_status): Clear the `gdb_detached' flag of all processes.
10922 In all-stop, stop all threads.
10923 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10924 (process_serial_event): If the remote connection breaks, or if an
10925 exit was forced with "monitor exit", force an event loop exit.
10926 Handle disconnected tracing on detach.
10927 (handle_serial_event): Adjust.
10928 (handle_target_event): If GDB isn't connected, forward events back
10929 to the inferior, unless the last process exited, in which case,
10930 exit gdbserver. Adjust interface.
10931
10932 * remote-utils.c (remote_open): Don't block in accept. Instead
10933 register an event loop source on the listen socket file
10934 descriptor. Refactor bits into ...
10935 (listen_desc): ... this new global.
10936 (gdb_connected): ... this new function.
10937 (enable_async_notification): ... this new function.
10938 (handle_accept_event): ... this new function.
10939 (remote_close): Clear remote_desc.
10940
10941 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10942
10943 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10944 New fields.
10945 (mourn_inferior): Define.
10946 (target_process_qsupported): Avoid the dangling else problem.
10947 (thread_stopped): Define.
10948 (pause_all): Define.
10949 (target_waitstatus_to_string): Declare.
10950 * target.c (target_waitstatus_to_string): New.
10951
10952 * tracepoint.c (tracing): Make extern.
10953 (disconnected_tracing): New.
10954 (stop_tracing): Make extern. Handle tracing stops due to GDB
10955 disconnecting.
10956 (cmd_qtdisconnected): New.
10957 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10958 (handle_tracepoint_general_set): Handle QTDisconnected.
10959
10960 * event-loop.c (event_handler_func): Change return type to int.
10961 (process_event): Bail out if the event handler wants the event
10962 loop to stop.
10963 (handle_file_event): Ditto.
10964 (start_event_loop): Bail out if the event handler wants the event
10965 loop to stop.
10966
10967 * nto-low.c (nto_target_ops): Adjust.
10968 * spu-low.c (spu_wait): Don't remove the process here.
10969 (spu_target_ops): Adjust.
10970 * win32-low.c (win32_wait): Don't remove the process here.
10971 (win32_target_ops): Adjust.
10972
10973 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10974
10975 * regcache.c (realloc_register_cache): Invalidate inferior's
10976 regcache before recreating it.
10977
10978 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10979
10980 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10981
10982 2010-04-09 Stan Shebs <stan@codesourcery.com>
10983 Pedro Alves <pedro@codesourcery.com>
10984
10985 * server.h (LONGEST): New.
10986 (struct thread_info) <while_stepping>: New field.
10987 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10988 Declare.
10989 (initialize_tracepoint, handle_tracepoint_general_set)
10990 (handle_tracepoint_query, tracepoint_finished_step)
10991 (tracepoint_was_hit, release_while_stepping_state_list):
10992 (current_traceframe): Declare.
10993 * server.c (handle_general_set): Handle tracepoint packets.
10994 (read_memory): New.
10995 (write_memory): New.
10996 (handle_search_memory_1): Use read_memory.
10997 (handle_query): Report support for conditional tracepoints, trace
10998 state variables, and tracepoint sources. Handle tracepoint
10999 queries.
11000 (main): Initialize the tracepoints module.
11001 (process_serial_event): Handle traceframe reads/writes.
11002
11003 * linux-low.c (handle_tracepoints): New.
11004 (linux_wait_1): Call it.
11005 (linux_resume_one_lwp): Handle while-stepping.
11006 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11007 (linux_target_ops): Install them.
11008 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11009 New field.
11010 * linux-x86-low.c (x86_supports_tracepoints): New.
11011 (the_low_target). Install it.
11012
11013 * mem-break.h (delete_breakpoint): Declare.
11014 * mem-break.c (delete_breakpoint): Make external.
11015
11016 * target.h (struct target_ops): Add `supports_tracepoints',
11017 `read_pc', and `write_pc' fields.
11018 (target_supports_tracepoints): Define.
11019 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11020 (phex_nz): New.
11021
11022 * regcache.h (struct regcache) <registers_owned>: New field.
11023 (init_register_cache, regcache_cpy): Declare.
11024 (regcache_read_pc, regcache_write_pc): Declare.
11025 (register_cache_size): Declare.
11026 (supply_regblock): Declare.
11027 * regcache.c (init_register_cache): New.
11028 (new_register_cache): Use it.
11029 (regcache_cpy): New.
11030 (register_cache_size): New.
11031 (supply_regblock): New.
11032 (regcache_read_pc, regcache_write_pc): New.
11033
11034 * tracepoint.c: New.
11035
11036 * Makefile.in (OBS): Add tracepoint.o.
11037 (tracepoint.o): New rule.
11038
11039 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11040
11041 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11042 (i386-mmx.o): New.
11043 (i386-mmx.c): Likewise.
11044 (i386-mmx-linux.o): Likewise.
11045 (i386-mmx-linux.c): Likewise.
11046
11047 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11048 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11049 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11050 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11051
11052 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11053 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11054 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11055
11056 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11057
11058 * Makefile.in (clean): Updated.
11059 (i386-avx.o): New.
11060 (i386-avx.c): Likewise.
11061 (i386-avx-linux.o): Likewise.
11062 (i386-avx-linux.c): Likewise.
11063 (amd64-avx.o): Likewise.
11064 (amd64-avx.c): Likewise.
11065 (amd64-avx-linux.o): Likewise.
11066 (amd64-avx-linux.c): Likewise.
11067
11068 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11069 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11070 (srv_amd64_regobj): Add amd64-avx.o.
11071 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11072 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11073 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11074 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11075 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11076 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11077 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11078
11079 * i387-fp.c: Include "i386-xstate.h".
11080 (i387_xsave): New.
11081 (i387_cache_to_xsave): Likewise.
11082 (i387_xsave_to_cache): Likewise.
11083 (x86_xcr0): Likewise.
11084
11085 * i387-fp.h (i387_cache_to_xsave): Likewise.
11086 (i387_xsave_to_cache): Likewise.
11087 (x86_xcr0): Likewise.
11088
11089 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11090 * linux-crisv32-low.c (target_regsets): Likewise.
11091 * linux-m68k-low.c (target_regsets): Likewise.
11092 * linux-mips-low.c (target_regsets): Likewise.
11093 * linux-ppc-low.c (target_regsets): Likewise.
11094 * linux-s390-low.c (target_regsets): Likewise.
11095 * linux-sh-low.c (target_regsets): Likewise.
11096 * linux-sparc-low.c (target_regsets): Likewise.
11097 * linux-xtensa-low.c (target_regsets): Likewise.
11098
11099 * linux-low.c: Include <sys/uio.h>.
11100 (regsets_fetch_inferior_registers): Support nt_type.
11101 (regsets_store_inferior_registers): Likewise.
11102 (linux_process_qsupported): New.
11103 (linux_target_ops): Add linux_process_qsupported.
11104
11105 * linux-low.h (regset_info): Add nt_type.
11106 (linux_target_ops): Add process_qsupported.
11107
11108 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11109 and <sys/uio.h>.
11110 (init_registers_i386_avx_linux): New.
11111 (init_registers_amd64_avx_linux): Likewise.
11112 (xmltarget_i386_linux_no_xml): Likewise.
11113 (xmltarget_amd64_linux_no_xml): Likewise.
11114 (PTRACE_GETREGSET): Likewise.
11115 (PTRACE_SETREGSET): Likewise.
11116 (x86_fill_xstateregset): Likewise.
11117 (x86_store_xstateregset): Likewise.
11118 (use_xml): Likewise.
11119 (x86_linux_update_xmltarget): Likewise.
11120 (x86_linux_process_qsupported): Likewise.
11121 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11122 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11123 init_registers_i386_linux here. Call
11124 x86_linux_update_xmltarget.
11125 (the_low_target): Add x86_linux_process_qsupported.
11126
11127 * server.c (handle_query): Call target_process_qsupported.
11128
11129 * target.h (target_ops): Add process_qsupported.
11130 (target_process_qsupported): New.
11131
11132 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11133
11134 * inferiors.c (add_thread): Set last_status kind to
11135 TARGET_WAITKIND_IGNORE.
11136 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11137 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11138 (linux_wait_1): Move `thread' local definition to block that uses
11139 it. Don't NULL initialize `event_child'.
11140 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11141 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11142 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11143
11144 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11145
11146 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11147 an extended waitstatus, or by a watchpoint.
11148 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11149 thread was stepping or has been stopped by a watchpoint.
11150
11151 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11152
11153 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11154 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11155 of another, then delete the previous, and validate all
11156 breakpoints.
11157 (validate_inserted_breakpoint): New.
11158 (delete_disabled_breakpoints): New.
11159 (validate_breakpoints): New.
11160 (check_mem_read): Validate breakpoints before trusting their
11161 shadow. Delete disabled breakpoints.
11162 (check_mem_write): Validate breakpoints before trusting they
11163 should be inserted. Delete disabled breakpoints.
11164 * mem-break.h (validate_breakpoints):
11165 * server.c (handle_query): Validate breakpoints when we see a
11166 qSymbol query.
11167
11168 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11169
11170 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11171 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11172 if we could tell there's a GDB breakpoint at stop_pc.
11173 (need_step_over_p): Don't do a step over if we find a GDB
11174 breakpoint at the resume PC.
11175
11176 * mem-break.c (struct raw_breakpoint): New.
11177 (enum bkpt_type): New type `gdb_breakpoint'.
11178 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11179 fields. New field `raw'.
11180 (find_raw_breakpoint_at): New.
11181 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11182 breakpoint instead.
11183 (set_breakpoint_at): Adjust.
11184 (delete_raw_breakpoint): New.
11185 (release_breakpoint): New.
11186 (delete_breakpoint): Rename to...
11187 (delete_breakpoint_1): ... this. Add proc parameter. Use
11188 release_breakpoint. Return ENOENT.
11189 (delete_breakpoint): Reimplement.
11190 (find_breakpoint_at): Delete.
11191 (find_gdb_breakpoint_at): New.
11192 (delete_breakpoint_at): Delete.
11193 (set_gdb_breakpoint_at): New.
11194 (delete_gdb_breakpoint_at): New.
11195 (gdb_breakpoint_here): New.
11196 (set_reinsert_breakpoint): Use release_breakpoint.
11197 (uninsert_breakpoint): Rename to ...
11198 (uninsert_raw_breakpoint): ... this.
11199 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11200 (reinsert_raw_breakpoint): Change parameter type to
11201 raw_breakpoint.
11202 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11203 instead.
11204 (check_breakpoints): Adjust. Use release_breakpoint.
11205 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11206 (breakpoint_inserted_here): Ditto.
11207 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11208 Don't trust the breakpoint's shadow if it is not inserted.
11209 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11210 (delete_all_breakpoints): Adjust.
11211 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11212 use delete_breakpoint_1.
11213
11214 * mem-break.h (breakpoints_supported): Delete declaration.
11215 (set_gdb_breakpoint_at): Declare.
11216 (gdb_breakpoint_here): Declare.
11217 (delete_breakpoint_at): Delete.
11218 (delete_gdb_breakpoint_at): Declare.
11219
11220 * server.h (struct raw_breakpoint): Forward declare.
11221 (struct process_info): New field `raw_breakpoints'.
11222
11223 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11224 breakpoints.
11225
11226 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11227
11228 * linux-low.c (status_pending_p_callback): Fix comment.
11229 (linux_wait_for_event_1): Move most of the internal breakpoint
11230 handling from here...
11231 (linux_wait_1): ... to here.
11232 (count_events_callback): New.
11233 (select_singlestep_lwp_callback): New.
11234 (select_event_lwp_callback): New.
11235 (cancel_breakpoints_callback): New.
11236 (select_event_lwp): New.
11237 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11238 priority to all LWPs that have had events that should be reported
11239 to the client. Cancel breakpoints when about to reporting the
11240 event to the client, not while stopping lwps. No longer cancel
11241 finished single-steps here.
11242 (cancel_finished_single_step): Delete.
11243 (cancel_finished_single_steps): Delete.
11244
11245 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11246
11247 * mem-break.c (enum bkpt_type): New.
11248 (struct breakpoint): New field `type'.
11249 (set_breakpoint_at): Change return type to struct breakpoint
11250 pointer. Set type to `other_breakpoint' by default.
11251 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11252 in the breakpoint list.
11253 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11254 (reinsert_breakpoint): Rename to ...
11255 (reinsert_raw_breakpoint): ... this.
11256 (reinsert_breakpoints_at): Adjust.
11257 * mem-break.h (struct breakpoint): Declare.
11258 (set_breakpoint_at): Change return type to struct breakpoint
11259 pointer.
11260
11261 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11262
11263 * server.c (handle_query): Assign, not compare.
11264
11265 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11266
11267 Teach linux gdbserver to step-over-breakpoints.
11268
11269 * linux-low.c (can_hardware_single_step): New.
11270 (supports_breakpoints): New.
11271 (handle_extended_wait): If stopping threads, read the stop pc of
11272 the new cloned LWP.
11273 (get_pc): New.
11274 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11275 low target doesn't support retrieving the PC.
11276 (add_lwp): Set last_resume_kind to resume_continue.
11277 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11278 (linux_attach): Don't clear stop_expected. Set the lwp's
11279 last_resume_kind to resume_stop.
11280 (linux_detach_one_lwp): Don't check for removed breakpoints.
11281 (check_removed_breakpoint): Delete.
11282 (status_pending_p): Rename to ...
11283 (status_pending_p_callback): ... this. Don't check for removed
11284 breakpoints. Don't consider threads that are stopped from GDB's
11285 perspective.
11286 (linux_wait_for_lwp): Always read the stop_pc here.
11287 (cancel_breakpoint): New.
11288 (step_over_bkpt): New global.
11289 (linux_wait_for_event_1): Implement stepping over breakpoints.
11290 (gdb_wants_lwp_stopped): New.
11291 (gdb_wants_all_stopped): New.
11292 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11293 single-step traps here. Store the thread's last reported target
11294 wait status.
11295 (send_sigstop): Don't clear stop_expected. Always set it,
11296 instead.
11297 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11298 (cancel_finished_single_step): New.
11299 (cancel_finished_single_steps): New.
11300 (wait_for_sigstop): Don't cancel finished single-step traps here.
11301 (linux_resume_one_lwp): Don't check for removed breakpoints.
11302 Don't set `step' on non-hardware step archs.
11303 (linux_set_resume_request): Ignore resume_stop requests if already
11304 stopping or stopped. Set the lwp's last_resume_kind.
11305 (resume_status_pending_p): Don't check for removed breakpoints.
11306 (need_step_over_p): New.
11307 (start_step_over): New.
11308 (finish_step_over): New.
11309 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11310 requests. Clear the thread's last reported target waitstatus.
11311 Don't use the `suspended' flag. Don't consider pending breakpoints.
11312 (linux_resume): Start a step-over if necessary.
11313 (proceed_one_lwp): New.
11314 (proceed_all_lwps): New.
11315 (unstop_all_lwps): New.
11316 * linux-low.h (struct lwp_info): Rewrite comment for the
11317 `suspended' flag. Add the `stop_pc' field. Delete the
11318 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11319 Add `'last_resume_kind' and `need_step_over' fields.
11320 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11321 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11322 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11323 (set_raw_breakpoint_at): New.
11324 (set_breakpoint_at): Rewrite to use it.
11325 (reinsert_breakpoint_handler): Delete.
11326 (set_reinsert_breakpoint): New.
11327 (reinsert_breakpoint_by_bp): Delete.
11328 (delete_reinsert_breakpoints): New.
11329 (uninsert_breakpoint): Rewrite.
11330 (uninsert_breakpoints_at): New.
11331 (reinsert_breakpoint): Rewrite.
11332 (reinsert_breakpoints_at): New.
11333 (check_breakpoints): Rewrite.
11334 (breakpoint_here): New.
11335 (breakpoint_inserted_here): New.
11336 (check_mem_read): Adjust.
11337 * mem-break.h (breakpoints_supported, breakpoint_here)
11338 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11339 (reinsert_breakpoint_by_bp): Delete declaration.
11340 (delete_reinsert_breakpoints): Declare.
11341 (reinsert_breakpoint): Delete declaration.
11342 (reinsert_breakpoints_at): Declare.
11343 (uninsert_breakpoint): Delete declaration.
11344 (uninsert_breakpoints_at): Declare.
11345 (check_breakpoints): Adjust prototype.
11346 * server.h: Adjust include order.
11347 (struct thread_info): Declare here. Add a `last_status' field.
11348
11349 2010-03-23 Michael Snyder <msnyder@vmware.com>
11350
11351 * server.c (crc32): New function.
11352 (handle_query): Add handling for 'qCRC:' request.
11353
11354 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11355
11356 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11357 lwp had been stopped by a watchpoint.
11358
11359 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11360
11361 * server.h (internal_error): Declare.
11362 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11363 * utils.c (internal_error): New function.
11364
11365 2010-03-15 Andreas Schwab <schwab@redhat.com>
11366
11367 * configure.srv: Fix typo setting srv_regobj.
11368
11369 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11370
11371 * linux-low.c (fetch_register): Avoid passing a non string literal
11372 format to `error'.
11373 (usr_store_inferior_registers): Ditto.
11374
11375 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11376
11377 * linux-low.c (linux_write_memory): Bail out early if peeking
11378 memory failed.
11379
11380 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11381
11382 * linux-low.h (struct lwp_info): New fields
11383 `stopped_by_watchpoint' and `stopped_data_address'.
11384 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11385 here, and cache them in the lwp object.
11386 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11387 directly.
11388 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11389 field.
11390 (linux_stopped_by_watchpoint): Rewrite.
11391 (linux_stopped_data_address): Rewrite.
11392
11393 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11394
11395 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11396 switching the current inferior, not before.
11397
11398 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11399
11400 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11401 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11402 i386-linux.c and amd64-linux.c.
11403 (reg-i386.o): Removed.
11404 (reg-i386.c): Likewise.
11405 (reg-i386-linux.o): Likewise.
11406 (reg-i386-linux.c): Likewise.
11407 (reg-x86-64.o): Likewise.
11408 (reg-x86-64.c): Likewise.
11409 (reg-x86-64-linux.o): Likewise.
11410 (reg-x86-64-linux.c): Likewise.
11411 (i386.o): New.
11412 (i386.c): Likewise.
11413 (i386-linux.o): Likewise.
11414 (i386-linux.c): Likewise.
11415 (amd64.o): Likewise.
11416 (amd64.c): Likewise.
11417 (amd64-linux.o): Likewise.
11418 (amd64-linux.c): Likewise.
11419
11420 * configure.srv (srv_i386_regobj): New.
11421 (srv_i386_linux_regobj): Likewise.
11422 (srv_amd64_regobj): Likewise.
11423 (srv_amd64_linux_regobj): Likewise.
11424 (srv_i386_32bit_xmlfiles): Likewise.
11425 (srv_i386_64bit_xmlfiles): Likewise.
11426 (srv_i386_xmlfiles): Likewise.
11427 (srv_amd64_xmlfiles): Likewise.
11428 (srv_i386_linux_xmlfiles): Likewise.
11429 (srv_amd64_linux_xmlfiles): Likewise.
11430 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11431 srv_xmlfiles to $srv_i386_xmlfiles.
11432 (i[34567]86-*-mingw32ce*): Likewise.
11433 (i[34567]86-*-mingw*): Likewise.
11434 (i[34567]86-*-nto*): Likewise.
11435 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11436 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11437 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11438 (x86_64-*-linux*): Likewise.
11439
11440 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11441 (init_registers_amd64_linux): New.
11442 (x86_arch_setup): Replace init_registers_x86_64_linux with
11443 init_registers_amd64_linux.
11444
11445 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11446
11447 * configure.ac: Check for libdl. If it is not available link against
11448 static libthread_db.
11449 * configure: Regenerate.
11450
11451 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11452
11453 PR9605
11454
11455 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11456 handing a read watchpoint.
11457 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11458
11459 2010-02-12 Doug Evans <dje@google.com>
11460
11461 * linux-low.c (linux_supports_tracefork_flag): Document.
11462 (linux_look_up_symbols): Add comment.
11463
11464 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11465
11466 * regcache.c (supply_register): Clear regcache if buf is NULL.
11467
11468 2010-02-02 Nicolas Roche <roche@sourceware.org>
11469 Joel Brobecker <brobecker@adacore.com>
11470
11471 * inferiors.c (find_inferior): Add function documentation.
11472 (unloaded_dll): Handle the case where the unloaded dll has not
11473 been previously registered in the dll list.
11474
11475 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11476
11477 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11478 (thumb2_breakpoint): New.
11479 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11480
11481 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11482
11483 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11484 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11485 breakpoints.
11486
11487 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11488
11489 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11490
11491 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11492
11493 * linux-s390-low.c (s390_collect_ptrace_register)
11494 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11495
11496 2010-01-21 Doug Evans <dje@google.com>
11497
11498 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11499 (PTRACE_ARG4_TYPE): New macro.
11500 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11501 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11502 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11503 (usr_store_inferior_registers): Ditto.
11504 (linux_read_memory, linux_write_memory): Ditto.
11505 (linux_test_for_tracefork): Ditto.
11506
11507 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11508 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11509
11510 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11511
11512 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11513 target.
11514
11515 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11516
11517 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11518 prototype to take a regcache. Adjust.
11519
11520 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11521
11522 * regcache.h (struct thread_info): Forward declare.
11523 (struct regcache): New.
11524 (new_register_cache): Adjust prototype.
11525 (get_thread_regcache): Declare.
11526 (free_register_cache): Adjust prototype.
11527 (registers_to_string, registers_from_string): Ditto.
11528 (supply_register, supply_register_by_name, collect_register)
11529 (collect_register_as_string, collect_register_by_name): Ditto.
11530 * regcache.c (struct inferior_regcache_data): Delete.
11531 (get_regcache): Rename to ...
11532 (get_thread_regcache): ... this. Adjust. Switch inferior before
11533 fetching registers.
11534 (regcache_invalidate_one): Adjust.
11535 (regcache_invalidate): Fix prototype.
11536 (new_register_cache): Return the new register cache.
11537 (free_register_cache): Change prototype.
11538 (realloc_register_cache): Adjust.
11539 (registers_to_string): Change prototype to take a regcache. Adjust.
11540 (registers_from_string): Ditto.
11541 (register_data): Ditto.
11542 (supply_register): Ditto.
11543 (supply_register_by_name): Ditto.
11544 (collect_register): Ditto.
11545 (collect_register_as_string): Ditto.
11546 (collect_register_by_name): Ditto.
11547 * server.c (process_serial_event): Adjust.
11548 * linux-low.h (regset_fill_func, regset_store_func): Change
11549 prototype.
11550 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11551 Change prototype.
11552 * linux-low.c (get_stop_pc): Adjust.
11553 (check_removed_breakpoint): Adjust.
11554 (linux_wait_for_event): Adjust.
11555 (linux_resume_one_lwp): Adjust.
11556 (fetch_register): Add regcache parameter. Adjust.
11557 (usr_store_inferior_registers): Ditto.
11558 (regsets_fetch_inferior_registers): Ditto.
11559 (regsets_store_inferior_registers): Ditto.
11560 (linux_fetch_registers, linux_store_registers): Ditto.
11561 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11562 regcache. Adjust.
11563 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11564 Ditto.
11565 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11566 prototype to take a regcache.
11567 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11568 * remote-utils.c (convert_ascii_to_int, outreg)
11569 (prepare_resume_reply): Change prototype to take a regcache.
11570 Adjust.
11571 * target.h (struct target_ops) <fetch_registers, store_registers>:
11572 Change prototype to take a regcache.
11573 (fetch_inferior_registers, store_inferior_registers): Change
11574 prototype to take a regcache. Adjust.
11575 * proc-service.c (ps_lgetregs): Adjust.
11576 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11577 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11578 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11579 take a regcache. Adjust.
11580 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11581 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11582 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11583 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11584 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11585 (cris_cannot_fetch_register):
11586 (cris_breakpoint_at): Change prototype to take a regcache.
11587 Adjust.
11588 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11589 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11590 to take a regcache. Adjust.
11591 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11592 Adjust.
11593 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11594 take a regcache. Adjust.
11595 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11596 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11597 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11598 * linux-mips-low.c (mips_get_pc):
11599 (mips_set_pc): Change prototype to take a regcache. Adjust.
11600 (mips_reinsert_addr): Adjust.
11601 (mips_collect_register): Change prototype to take a regcache.
11602 Adjust.
11603 (mips_supply_register):
11604 (mips_collect_register_32bit, mips_supply_register_32bit)
11605 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11606 (mips_store_fpregset): Ditto.
11607 * linux-ppc-low.c (ppc_supply_ptrace_register)
11608 (ppc_supply_ptrace_register): Ditto.
11609 (parse_spufs_run): Adjust.
11610 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11611 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11612 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11613 take a regcache. Adjust.
11614 * linux-s390-low.c (s390_collect_ptrace_register)
11615 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11616 (s390_set_pc): Change prototype to take a regcache. Adjust.
11617 (s390_arch_setup): Adjust.
11618 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11619 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11620 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11621 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11622 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11623 regcache. Adjust.
11624 (sparc_breakpoint_at): Adjust.
11625 * linux-xtensa-low.c (xtensa_fill_gregset):
11626 (xtensa_store_gregset):
11627 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11628 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11629 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11630 prototype to take a regcache. Adjust.
11631 * win32-arm-low.c (arm_fetch_inferior_register)
11632 (arm_store_inferior_register): Change prototype to take a
11633 regcache. Adjust.
11634 * win32-i386-low.c (i386_fetch_inferior_register)
11635 (i386_store_inferior_register): Change prototype to take a
11636 regcache. Adjust.
11637 * win32-low.c (child_fetch_inferior_registers)
11638 (child_store_inferior_registers): Change prototype to take a
11639 regcache. Adjust.
11640 (win32_wait): Adjust.
11641 (win32_fetch_inferior_registers): Change prototype to take a
11642 regcache. Adjust.
11643 (win32_store_inferior_registers): Adjust.
11644 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11645 store_inferior_register>: Change prototype to take a regcache.
11646
11647 2010-01-20 Doug Evans <dje@google.com>
11648
11649 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11650 #ifdef.
11651 (linux_wait_for_event1, linux_init_signals): Ditto.
11652 (W_STOPCODE): Provide definition if missing.
11653
11654 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11655
11656 * linux-low.c (linux_core_of_thread): New.
11657 (compare_ints, show_process, list_threads): New.
11658 (linux_qxfer_osdata): Report threads and cores.
11659 (linux_target_op): Register linux_core_of_thread.
11660 * remote-utils.c (prepare_resume_reply): Report the core.
11661 (buffer_xml_printf): Support %d specifier.
11662 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11663 New.
11664 (handle_query): Handle qXfer:threads. Announce availability
11665 thereof.
11666 * target.h (struct target_ops): New field core_of_thread.
11667
11668 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11669
11670 * Makefile.in (clean): Remove new generated files.
11671 (reg-s390.o, reg-s390.c): Remove rules.
11672 (reg-s390x.o, reg-s390x.c): Likewise.
11673 (s390-linux32.o, s390-linux32.c): Add rules.
11674 (s390-linux64.o, s390-linux64.c): Likewise.
11675 (s390x-linux64.o, s390x-linux64.c): Likewise.
11676 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11677 * linux-s390-low.c: Include <elf.h>.
11678 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11679 (init_registers_s390): Remove prototype.
11680 (init_registers_s390x): Likewise.
11681 (init_registers_s390_linux32): Add prototype.
11682 (init_registers_s390_linux64): Likewise.
11683 (init_registers_s390x_linux64): Likewise.
11684 (s390_num_regs_3264): New define.
11685 (s390_regmap_3264): New global variable.
11686 (s390_cannot_fetch_register): Remove obsolete check.
11687 (s390_cannot_store_register): Likewise.
11688 (s390_collect_ptrace_register): Handle upper/lower register halves.
11689 (s390_supply_ptrace_register): Likewise.
11690 (s390_fill_gregset): Update to register number changes.
11691 (s390_get_hwcap): New routine.
11692 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11693 Install appropriate regmap and register set.
11694
11695 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11696
11697 * server.c (gdbserver_version): Update copyright year to 2010.
11698 * gdbreplay.c (gdbreplay_version): Likewise.
11699
11700 2009-12-28 Doug Evans <dje@google.com>
11701
11702 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11703 elf/external.h. Include <elf.h> instead but only if necessary.
11704
11705 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11706
11707 * linux-low.c (linux_remove_process): Remove `detaching'
11708 parameter. Don't release/detach from thread_db here.
11709 (linux_kill): Release/detach from thread_db here, ...
11710 (linux_detach): ... and here, before actually detaching.
11711 (linux_wait_1): ... and here, when a process exits.
11712 * thread-db.c (any_thread_of): New.
11713 (thread_db_free): Switch the current inferior to a thread of the
11714 passed in process.
11715
11716 2009-12-21 Doug Evans <dje@google.com>
11717
11718 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11719
11720 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11721 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11722 warning ifndef __NR_tkill. Move setting of errno there too.
11723 Delete unnecessary resetting of errno after syscall.
11724 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11725
11726 * configure.ac: Check for dladdr.
11727 * config.in: Regenerate.
11728 * configure: Regenerate.
11729 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11730 (try_thread_db_load): Update.
11731
11732 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11733
11734 2009-12-18 Doug Evans <dje@google.com>
11735
11736 * event-loop.c: Include unistd.h if it exists.
11737
11738 * linux-low.c (my_waitpid): Move definition away from being in
11739 between linux_tracefork_child/linux_test_for_tracefork.
11740
11741 * gdb_proc_service.h (psaddr_t): Fix type.
11742 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11743 signature to match glibc.
11744
11745 2009-12-16 Doug Evans <dje@google.com>
11746
11747 * linux-low.c (linux_read_memory): Fix argument to read.
11748
11749 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11750
11751 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11752 events, don't leave current_inferior pointing at null.
11753
11754 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11755
11756 * win32-low.c (LOG): Delete.
11757 (OUTMSG): Output to stderr.
11758 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11759 on compile time LOG macro.
11760 (win32_wait): Fix debug output.
11761
11762 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11763
11764 * win32-low.c (win32_add_one_solib): If the dll name is
11765 "ntdll.dll", prepend the system directory to the dll path.
11766
11767 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11768
11769 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11770
11771 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11772 Vladimir Prus <vladimir@codesourcery.com>
11773
11774 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11775 * configure.ac: Check for __mcoldfire__ and set
11776 gdb_cv_m68k_is_coldfire.
11777 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11778 reg-cf.o and reg-m68k.o.
11779 * configure: Regenerated.
11780
11781 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11782
11783 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11784 Pass it to thread_db_free.
11785 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11786 proper `detaching' argument to linux_remove_process.
11787 * linux-low.h (thread_db_free): Add `detaching' parameter.
11788 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11789 to thread_db_free.
11790 (thread_db_free): Add `detaching' parameter. Only
11791 call td_ta_clear_event if detaching from process.
11792
11793 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11794
11795 * thread-db.c (thread_db_free): Fix typo.
11796
11797 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11798
11799 PR gdb/10838
11800 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11801
11802 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11803
11804 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11805 with an i686 compiler.
11806 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11807 needed.
11808 * configure: Rebuilt.
11809
11810 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11811
11812 PR gdb/10783
11813
11814 * server.c (handle_search_memory_1): Correct read_addr initialization
11815 in loop for searching subsequent chunks.
11816
11817 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11818
11819 * configure.ac: New --with-libthread-db option.
11820 * thread-db.c: Allow direct dependence on libthread_db.
11821 (thread_db_free): Adjust.
11822 * config.in: Regenerate.
11823 * configure: Likewise.
11824
11825 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11826
11827 PR gdb/10757
11828 * thread-db.c (attach_thread): New function.
11829 (maybe_attach_thread): Return success/failure.
11830 (find_new_threads_callback): Adjust.
11831 (thread_db_find_new_threads): Loop until no new threads.
11832
11833 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11834
11835 * proc-service.c (ps_lgetregs): Formatting.
11836
11837 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11838
11839 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11840 * configure.ac: Adjust.
11841 * linux-low.h (struct process_info_private): Move members to struct
11842 thread_db.
11843 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11844 * linux-low.c (linux_remove_process): Adjust.
11845 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11846 * server.c (handle_query): Move code ...
11847 (handle_monitor_command): ... here. New function.
11848 * target.h (struct target_ops): New member.
11849 * thread-db.c (struct thread_db): New.
11850 (libthread_db_search_path): New variable.
11851 (thread_db_create_event, thread_db_enable_reporting)
11852 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11853 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11854 (try_thread_db_load_1, dladdr_to_soname): New functions.
11855 (try_thread_db_load, thread_db_load_search): New functions.
11856 (thread_db_init): Search for libthread_db.
11857 (thread_db_free): New function.
11858 (thread_db_handle_monitor_command): Likewise.
11859 * config.in: Regenerate.
11860 * configure: Regenerate.
11861
11862 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11863
11864 * spu-low.c (spu_kill): Wait for inferior to terminate.
11865 Call clear_inferiors.
11866 (spu_detach): Call clear_inferiors.
11867
11868 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11869
11870 * aclocal.m4: Regenerate.
11871 * config.in: Likewise.
11872 * configure: Likewise.
11873
11874 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11875
11876 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11877 (parse_spufs_run): New function.
11878 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11879 (ppc_breakpoint_at): Handle SPU breakpoints.
11880
11881 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11882
11883 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11884 (SPUFS_MAGIC): Define.
11885 (spu_enumerate_spu_ids): New function.
11886 (linux_qxfer_spu): New function.
11887 (linux_target_ops): Install linux_qxfer_spu.
11888
11889 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11890
11891 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11892 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11893 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11894 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11895 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11896 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11897 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11898 (init_registers_powerpc_cell32l): Add prototype.
11899 (init_registers_powerpc_cell64l): Likewise.
11900 (ppc_arch_setup): Detect Cell/B.E. architecture.
11901
11902 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11903
11904 * Makefile.in (datarootdir): New variable.
11905
11906 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11907
11908 * linux-low.c (linux_write_memory): Update debugging output.
11909 * Makefile.in (clean): Add new descriptions.
11910 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11911 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11912 * configure.srv: Add new files for arm*-*-linux*.
11913 * linux-arm-low.c: Add new declarations.
11914 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11915 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11916 (HWCAP_VFPv3D16): New.
11917 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11918 instead of __IWMMXT__.
11919 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11920 (arm_arch_setup): New.
11921 (target_regsets): Remove #ifdef. Add VFP regset.
11922 (the_low_target): Use arm_arch_setup.
11923
11924 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11925
11926 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11927 the main thread again.
11928
11929 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11930
11931 Adding Neutrino gdbserver.
11932 * configure: Regenerated.
11933 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11934 * configure.srv (i[34567]86-*-nto*): New target.
11935 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11936 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11937 (nto_comctrl) [__QNX__]: New function.
11938 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11939
11940 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11941
11942 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11943 srv_tgtobj.
11944
11945 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11946 Pedro Alves <pedro@codesourcery.com>
11947
11948 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11949 don't support CONTEXT_EXTENDED_REGISTERS.
11950 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11951 (the_low_target): Install them.
11952 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11953 failing with ERROR_PIPE_NOT_CONNECTED.
11954
11955 2009-06-30 Doug Evans <dje@google.com>
11956 Pierre Muller <muller@ics.u-strasbg.fr>
11957
11958 Add h/w watchpoint support to x86-linux, win32-i386.
11959 * Makefile.in (SFILES): Add i386-low.c
11960 (i386_low_h): Define.
11961 (i386-low.o): Add dependencies.
11962 (linux-x86-low.o): Add i386-low.h dependency.
11963 (win32-i386-low.o): Ditto.
11964 * i386-low.c: New file.
11965 * i386-low.h: New file.
11966 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11967 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11968 * linux-low.c (linux_add_process): Initialize arch_private.
11969 (linux_remove_process): Free arch_private.
11970 (add_lwp): Initialize arch_private.
11971 (delete_lwp): Free arch_private.
11972 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11973 provided.
11974 * linux-low.h (process_info_private): New member arch_private.
11975 (lwp_info): New member arch_private.
11976 (linux_target_ops): New members new_process, new_thread,
11977 prepare_to_resume.
11978 (ptid_of): New macro.
11979 * linux-x86-low.c: Include stddef.h, i386-low.h.
11980 (arch_process_info): New struct.
11981 (arch_lwp_info): New struct.
11982 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11983 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11984 (i386_dr_low_get_status): New function.
11985 (x86_insert_point, x86_remove_point): New functions.
11986 (x86_stopped_by_watchpoint): New function.
11987 (x86_stopped_data_address): New function.
11988 (x86_linux_new_process, x86_linux_new_thread): New functions.
11989 (x86_linux_prepare_to_resume): New function.
11990 (the_low_target): Add entries for insert_point, remove_point,
11991 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11992 prepare_to_resume.
11993 * server.c (debug_hw_points): New global.
11994 (monitor_show_help): Document set debug-hw-points.
11995 (handle_query): Process "set debug-hw-points".
11996 * server.h (debug_hw_points): Declare.
11997 (paddress): Declare.
11998 * utils.c (NUMCELLS, CELLSIZE): New macros.
11999 (get_sell, xsnprintf, paddress): New functions.
12000 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12001 remove_point, stopped_by_watchpoint, stopped_data_address.
12002 * win32-i386-low.c: Include i386-low.h.
12003 (debug_reg_state): Replaces dr.
12004 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12005 (i386_dr_low_get_status): New function.
12006 (i386_insert_point, i386_remove_point): New functions.
12007 (i386_stopped_by_watchpoint): New function.
12008 (i386_stopped_data_address): New function.
12009 (i386_initial_stuff): Update.
12010 (get_thread_context,set_thread_context,i386_thread_added): Update.
12011 (the_low_target): Add entries for insert_point,
12012 remove_point, stopped_by_watchpoint, stopped_data_address.
12013 * win32-low.c (win32_insert_watchpoint): New function.
12014 (win32_remove_watchpoint): New function.
12015 (win32_stopped_by_watchpoint): New function.
12016 (win32_stopped_data_address): New function.
12017 (win32_target_ops): Add entries for insert_watchpoint,
12018 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12019 * win32-low.h (win32_target_ops): New members insert_point,
12020 remove_point, stopped_by_watchpoint, stopped_data_address.
12021
12022 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12023
12024 * server.c (process_serial_event): Re-return unsupported, not
12025 error, if the type isn't recognized. Re-allow supporting only
12026 insert or remove packets. Also call require_running for
12027 breakpoints. Add missing break statement to default case. Tidy.
12028 * target.h (struct target_ops): Rename insert_watchpoint to
12029 insert_point, and remove_watchpoint to remove_point.
12030
12031 * linux-low.h (struct linux_target_ops): Likewise.
12032 * linux-low.c (linux_insert_watchpoint): Rename to ...
12033 (linux_insert_point): ... this. Adjust.
12034 (linux_remove_watchpoint): Rename to ...
12035 (linux_remove_point): ... this. Adjust.
12036 (linux_target_ops): Adjust.
12037 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12038 (cris_insert_point): ... this.
12039 (cris_remove_watchpoint): Rename to ...
12040 (cris_remove_point): ... this.
12041 (the_low_target): Adjust.
12042
12043 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12044
12045 * server.c (handle_v_kill): Pass signal_pid to
12046 kill_inferior if multi_process is zero.
12047
12048 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12049
12050 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12051 * target.h (target_ops): Comment for *_watchpoint to make it clear
12052 the functions can get types '0' and '1'.
12053
12054 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12055
12056 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12057 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12058 * regcache.c (get_regcache): Likewise.
12059 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12060 * win32-low.c (child_fetch_inferior_registers): Remove check for
12061 regno 0.
12062
12063 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12064 Pedro Alves <pedro@codesourcery.com>
12065
12066 * target.h (struct target_ops) <supports_multi_process>: New
12067 callback.
12068 (target_supports_multi_process): New.
12069 * server.c (handle_query): Even if GDB reports support, only
12070 enable multi-process if the target also supports it. Report
12071 multi-process support only if the target backend supports it.
12072 * linux-low.c (linux_supports_multi_process): New function.
12073 (linux_target_ops): Install it as target_supports_multi_process
12074 callback.
12075
12076 2009-05-24 Doug Evans <dje@google.com>
12077
12078 Global renaming of find_thread_pid to find_thread_ptid.
12079 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12080 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12081 All callers updated.
12082
12083 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12084 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12085 directly.
12086
12087 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12088 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12089 (linux_resume_one_lwp): Ditto.
12090
12091 2009-05-23 Doug Evans <dje@google.com>
12092
12093 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12094 from struct inferior_list_entry * to struct lwp_info *.
12095 All callers updated.
12096
12097 2009-05-13 Doug Evans <dje@google.com>
12098
12099 * linux-x86-low.c: Don't include assert.h.
12100 (x86_siginfo_fixup): Use fatal, not assert.
12101 (x86_arch_setup): Fix comment.
12102
12103 2009-05-12 Doug Evans <dje@google.com>
12104
12105 Biarch support for i386/amd64 gdbserver.
12106 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12107 Add linux-x86-low.c.
12108 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12109 (linux-x86-low.o): Add.
12110 * linux-x86-64-low.c: Delete.
12111 * linux-i386-low.c: Delete.
12112 * linux-x86-low.c: New file.
12113 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12114 linux-x86-low.o.
12115 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12116 linux-x86-low.o.
12117 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12118 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12119 (linux_child_pid_to_exec_file): New function.
12120 (elf_64_header_p, elf_64_file_p): New functions.
12121 (siginfo_fixup): New function.
12122 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12123 give target a chance to convert layout.
12124 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12125 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12126
12127 2009-05-07 Doug Evans <dje@google.com>
12128
12129 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12130 (regsets_store_inferior_registers): Ditto.
12131
12132 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12133
12134 PR server/10048
12135
12136 * linux-low.c (must_set_ptrace_flags): Delete.
12137 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12138 of the global.
12139 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12140 `lwp->must_set_ptrace_flags' instead.
12141 (linux_wait_for_event_1): Set ptrace options here.
12142 (linux_wait_1): ... not here.
12143
12144 2009-04-30 Doug Evans <dje@google.com>
12145
12146 * inferiors.c (started_inferior_callback): New function.
12147 (attached_inferior_callback): New function.
12148 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12149 * server.c (print_started_pid, print_attached_pid): New functions.
12150 (detach_or_kill_for_exit): New function.
12151 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12152 * server.h (have_started_inferiors_p): Declare.
12153 (have_attached_inferiors_p): Declare.
12154
12155 * inferiors.c (remove_process): Fix memory leak, free process.
12156 * linux-low.c (linux_remove_process): New function.
12157 (linux_kill): Call it instead of remove_process.
12158 (linux_detach, linux_wait_1): Ditto.
12159
12160 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12161
12162 * configure.srv: Add x86 Windows CE target.
12163
12164 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12165
12166 * inferiors.c (get_thread_process): Make global.
12167 * server.h (get_thread_process): Add prototype.
12168 * thread-db.c (find_one_thread): Use get_thread_process
12169 instead of current_process.
12170 (thread_db_get_tls_address): Do not crash if called when
12171 thread layer is not yet initialized.
12172
12173 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12174
12175 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12176 * spu-low.c (current_tid): Rename to ...
12177 (current_ptid): ... this.
12178 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12179 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12180 ptid_get_lwp (current_ptid) instead of current_tid.
12181 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12182 instead of current_tid. Use find_process_pid to verify pid
12183 argument is valid. Pass proper argument to remove_process.
12184 (spu_thread_alive): Compare current_ptid instead of current_tid.
12185 (spu_resume): Likewise.
12186
12187 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12188
12189 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12190 variable.
12191
12192 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12193
12194 Implement the multiprocess extensions, and add linux multiprocess
12195 support.
12196
12197 * server.h (ULONGEST): Declare.
12198 (struct ptid, ptid_t): New.
12199 (minus_one_ptid, null_ptid): Declare.
12200 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12201 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12202 (struct inferior_list_entry): Change `id' type from unsigned from
12203 to ptid_t.
12204 (struct sym_cache, struct breakpoint, struct
12205 process_info_private): Forward declare.
12206 (struct process_info): Declare.
12207 (current_process): Declare.
12208 (all_processes): Declare.
12209 (initialize_inferiors): Declare.
12210 (add_thread): Adjust to use ptid_t.
12211 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12212 (add_process, remove_process, find_thread_pid): Declare.
12213 (find_inferior_id): Adjust to use ptid_t.
12214 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12215 (multi_process): Declare.
12216 (push_event): Adjust to use ptid_t.
12217 (read_ptid, write_ptid): Declare.
12218 (prepare_resume_reply): Adjust to use ptid_t.
12219 (clear_symbol_cache): Declare.
12220 * inferiors.c (all_processes): New.
12221 (null_ptid, minus_one_ptid): New.
12222 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12223 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12224 (add_thread): Change unsigned long to ptid. Remove gdb_id
12225 parameter. Adjust.
12226 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12227 (gdb_id_to_thread): Rename to ...
12228 (find_thread_pid): ... this. Change unsigned long to ptid.
12229 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12230 (loaded_dll, pull_pid_from_list): Adjust.
12231 (add_process, remove_process, find_process_pid)
12232 (get_thread_process, current_process, initialize_inferiors): New.
12233 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12234 (struct target_waitstatus) <related_pid>: Ditto.
12235 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12236 return type to int.
12237 (struct target_ops) <join>: Add `pid' argument.
12238 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12239 (struct target_ops) <wait>: Add `ptid' field. Change return type
12240 to ptid.
12241 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12242 (mywait): Add `ptid' argument. Change return type to ptid_t.
12243 (target_pid_to_str): Declare.
12244 * target.c (set_desired_inferior): Adjust to use ptids.
12245 (mywait): Add new `ptid' argument. Adjust.
12246 (target_pid_to_str): New.
12247 * mem-break.h (free_all_breakpoints): Declare.
12248 * mem-break.c (breakpoints): Delelete.
12249 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12250 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12251 to use per-process breakpoint list.
12252 (free_all_breakpoints): New.
12253 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12254 (symbol_cache, all_symbols_looked_up): Delete.
12255 (hexchars): New.
12256 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12257 read_ptid): New.
12258 (prepare_resume_reply): Change ptid argument's type from unsigned
12259 long to ptid_t. Adjust. Implement W;process and X;process.
12260 (free_sym_cache, clear_symbol_cache): New.
12261 (look_up_one_symbol): Adjust to per-process symbol cache. *
12262 * server.c (cont_thread, general_thread, step_thread): Change type
12263 to ptid_t.
12264 (attached): Delete.
12265 (multi_process): New.
12266 (last_ptid): Change type to ptid_t.
12267 (struct vstop_notif) <ptid>: Change type to ptid_t.
12268 (queue_stop_reply, push_event): Change `ptid' argument's type to
12269 ptid_t.
12270 (discard_queued_stop_replies): Add `pid' argument.
12271 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12272 changes. Don't reference the `attached' global.
12273 (attach_inferior): Adjust to mywait interface changes.
12274 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12275 features. Handle and report "multiprocess+". Handle
12276 "qAttached:PID".
12277 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12278 changes.
12279 (handle_v_kill): New.
12280 (handle_v_stopped): Adjust to use target_pid_to_str.
12281 (handle_v_requests): Allow multiple attaches and runs when
12282 multiprocess extensions are in effect. Handle "vKill".
12283 (myresume): Adjust to use ptids.
12284 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12285 (handle_status): Adjust to discard_queued_stop_replies interface
12286 change.
12287 (first_thread_of, kill_inferior_callback)
12288 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12289 (main): Call initialize_inferiors. Adjust to use ptids, killing
12290 and detaching from all inferiors. Handle multiprocess packet
12291 variants.
12292 * linux-low.h: Include gdb_proc_service.h.
12293 (struct process_info_private): New.
12294 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12295 <lwpid_of>: Use ptid_get_lwp.
12296 (get_lwp_thread): Adjust.
12297 (struct lwp_info): Add `dead' member.
12298 (find_lwp_pid): Declare.
12299 * linux-low.c (thread_db_active): Delete.
12300 (new_inferior): Adjust comment.
12301 (inferior_pid): Delete.
12302 (linux_add_process): New.
12303 (handle_extended_wait): Adjust.
12304 (add_lwp): Change unsigned long to ptid.
12305 (linux_create_inferior): Add process to processes table. Adjust
12306 to use ptids. Don't set new_inferior here.
12307 (linux_attach_lwp): Rename to ...
12308 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12309 it. Adjust to use ptids.
12310 (linux_attach_lwp): New.
12311 (linux_attach): Add process to processes table. Don't set
12312 new_inferior here.
12313 (struct counter): New.
12314 (second_thread_of_pid_p, last_thread_of_process_p): New.
12315 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12316 multiple processes.
12317 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12318 processes. Remove process from process table.
12319 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12320 to multiple processes.
12321 (any_thread_of): New.
12322 (linux_detach): Add `pid' argument, and handle it. Remove process
12323 from processes table.
12324 (linux_join): Add `pid' argument. Handle it.
12325 (linux_thread_alive): Change unsighed long argument to ptid_t.
12326 Consider dead lwps as not being alive.
12327 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12328 threads we're not interested in.
12329 (same_lwp, find_lwp_pid): New.
12330 (linux_wait_for_lwp): Change `pid' argument's type from int to
12331 ptid_t. Adjust.
12332 (linux_wait_for_event): Rename to ...
12333 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12334 from int to ptid_t. Adjust.
12335 (linux_wait_for_event): New.
12336 (linux_wait_1): Add `ptid' argument. Change return type to
12337 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12338 that exit from the process table.
12339 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12340 Adjust.
12341 (mark_lwp_dead): New.
12342 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12343 stopping all threads, mark its main lwp as dead.
12344 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12345 ptids.
12346 (fetch_register, usr_store_inferior_registers)
12347 (regsets_fetch_inferior_registers)
12348 (regsets_store_inferior_registers, linux_read_memory)
12349 (linux_write_memory): Inline `inferior_pid'.
12350 (linux_look_up_symbols): Adjust to use per-process
12351 `thread_db_active'.
12352 (linux_request_interrupt): Adjust to use ptids.
12353 (linux_read_auxv): Inline `inferior_pid'.
12354 (initialize_low): Don't reference thread_db_active.
12355 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12356 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12357 (ps_getpid): Return the pid of the current inferior.
12358 * thread-db.c (proc_handle, thread_agent): Delete.
12359 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12360 per-process data.
12361 (find_one_thread): Change argument type to ptid_t. Adjust to
12362 per-process data.
12363 (maybe_attach_thread): Adjust to per-process data and ptids.
12364 (thread_db_find_new_threads): Ditto.
12365 (thread_db_init): Ditto.
12366 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12367 processes table. Adjust to use ptids.
12368 (spu_kill, spu_detach): Adjust interface. Remove process from
12369 processes table.
12370 (spu_join, spu_thread_alive): Adjust interface.
12371 (spu_wait): Adjust interface. Remove process from processes
12372 table. Adjust to use ptids.
12373 * win32-low.c (current_inferior_tid): Delete.
12374 (current_inferior_ptid): New.
12375 (debug_event_ptid): New.
12376 (thread_rec): Take a ptid. Adjust.
12377 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12378 (child_delete_thread): Ditto.
12379 (do_initial_child_stuff): Add `attached' argument. Add process to
12380 processes table.
12381 (child_fetch_inferior_registers, child_store_inferior_registers):
12382 Adjust.
12383 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12384 (win32_attach): Pass 1 to do_initial_child_stuff.
12385 (win32_kill): Adjust interface. Remove process from processes
12386 table.
12387 (win32_detach): Ditto.
12388 (win32_join): Adjust interface.
12389 (win32_thread_alive): Take a ptid.
12390 (win32_resume): Adjust to use ptids.
12391 (get_child_debug_event): Ditto.
12392 (win32_wait): Adjust interface. Remove exiting process from
12393 processes table.
12394
12395 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12396
12397 Non-stop mode support.
12398
12399 * server.h (non_stop): Declare.
12400 (gdb_client_data, handler_func): Declare.
12401 (delete_file_handler, add_file_handler, start_event_loop):
12402 Declare.
12403 (handle_serial_event, handle_target_event, push_event)
12404 (putpkt_notif): Declare.
12405 * target.h (enum resume_kind): New.
12406 (struct thread_resume): Replace `step' field by `kind' field.
12407 (TARGET_WNOHANG): Define.
12408 (struct target_ops) <wait>: Add `options' argument.
12409 <supports_non_stop, async, start_non_stop>: New fields.
12410 (target_supports_non_stop, target_async): New.
12411 (start_non_stop): Declare.
12412 (mywait): Add `options' argument.
12413 * target.c (mywait): Add `options' argument. Print child exit
12414 notifications here.
12415 (start_non_stop): New.
12416 * server.c (non_stop, own_buf, mem_buf): New globals.
12417 (struct vstop_notif): New.
12418 (notif_queue): New global.
12419 (queue_stop_reply, push_event, discard_queued_stop_replies)
12420 (send_next_stop_reply): New.
12421 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12422 interface changes.
12423 (attach_inferior): In non-stop mode, don't wait for the target
12424 here.
12425 (handle_general_set): Handle QNonStop.
12426 (handle_query): When handling qC, return the current general
12427 thread, instead of the first thread of the list.
12428 (handle_query): If the backend supports non-stop mode, include
12429 QNonStop+ in the qSupported query response.
12430 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12431 and non-stop mode.
12432 (handle_v_attach, handle_v_run): Handle non-stop mode.
12433 (handle_v_stopped): New.
12434 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12435 (myresume): Adjust to use resume_kind. Handle non-stop.
12436 (queue_stop_reply_callback): New.
12437 (handle_status): Handle non-stop mode.
12438 (main): Clear non_stop flag on reconnection. Use the event-loop.
12439 Refactor serial protocol handling from here ...
12440 (process_serial_event): ... to this new function. When GDB
12441 selects any thread, select one here. In non-stop mode, wait until
12442 GDB acks all pending events before exiting.
12443 (handle_serial_event, handle_target_event): New.
12444 * remote-utils.c (remote_open): Install remote_desc in the event
12445 loop.
12446 (remote_close): Remove remote_desc from the event loop.
12447 (putpkt_binary): Rename to...
12448 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12449 (putpkt_binary): New as wrapper around putpkt_binary_1.
12450 (putpkt_notif): New.
12451 (prepare_resume_reply): In non-stop mode, don't change the
12452 general_thread.
12453 * event-loop.c: New.
12454 * Makefile.in (OBJ): Add event-loop.o.
12455 (event-loop.o): New rule.
12456
12457 * linux-low.h (pid_of): Moved here.
12458 (lwpid_of): New.
12459 (get_lwp_thread): Use lwpid_of.
12460 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12461 * linux-low.c (pid_of): Delete.
12462 (inferior_pid): Use lwpid_of.
12463 (linux_event_pipe): New.
12464 (target_is_async_p): New.
12465 (delete_lwp): New.
12466 (handle_extended_wait): Use lwpid_of.
12467 (add_lwp): Don't set lwpid field.
12468 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12469 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12470 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12471 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12472 first. Adjust to linux_wait_for_event interface changes. Use
12473 lwpid_of.
12474 (linux_detach): Don't delete the main lwp here.
12475 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12476 (status_pending_p): Don't consider explicitly suspended lwps.
12477 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12478 pointer. Add OPTIONS argument. Change return type to int. Use
12479 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12480 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12481 pointer. Add status pointer argument. Return a pid instead of a
12482 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12483 changes. In non-stop mode, don't switch to a random thread.
12484 (linux_wait): Rename to...
12485 (linux_wait_1): ... this. Add target_options argument, and handle
12486 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12487 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12488 clean exit and signal exit code. Don't stop all threads in
12489 non-stop mode. In all-stop mode, only stop all threads when
12490 reporting a stop to GDB. Handle explicit thread stop requests.
12491 (async_file_flush, async_file_mark): New.
12492 (linux_wait): New.
12493 (send_sigstop): Use lwpid_of.
12494 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12495 interface changes. In non-stop mode, don't switch to a random
12496 thread.
12497 (linux_resume_one_lwp): Use lwpid_of.
12498 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12499 (linux_resume_one_thread): ... this. Handle resume_stop. In
12500 non-stop mode, don't look for pending flag in all threads.
12501 (resume_status_pending_p): Don't consider explicitly suspended
12502 threads.
12503 (my_waitpid): Reimplement. Emulate __WALL.
12504 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12505 Use lwpid_of.
12506 (sigchld_handler, linux_supports_non_stop, linux_async)
12507 (linux_start_non_stop): New.
12508 (linux_target_ops): Register linux_supports_non_stop, linux_async
12509 and linux_start_non_stop.
12510 (initialize_low): Install SIGCHLD handler.
12511 * thread-db.c (thread_db_create_event, find_one_thread)
12512 (thread_db_get_tls_address): Use lwpid_of.
12513 * win32-low.c (win32_detach): Adjust to use resume_kind.
12514 (win32_wait): Add `options' argument.
12515 * spu-low.c (spu_resume): Adjust to use resume_kind.
12516 (spu_wait): Add `options' argument.
12517
12518 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12519
12520 Decouple target code from remote protocol.
12521
12522 * target.h (enum target_waitkind): New.
12523 (struct target_waitstatus): New.
12524 (struct target_ops) <wait>: Return an unsigned long. Take a
12525 target_waitstatus pointer instead of a char pointer.
12526 (mywait): Likewise.
12527 * target.c (mywait): Change prototype to return an unsigned long.
12528 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12529 * server.h (thread_from_wait, old_thread_from_wait): Delete
12530 declarations.
12531 (prepare_resume_reply): Change prototype to take a
12532 target_waitstatus.
12533 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12534 (last_status, last_ptid): New.
12535 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12536 pid instead of a signal.
12537 (attach_inferior): Remove "status" and "signal" parameters.
12538 Adjust.
12539 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12540 not as an address.
12541 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12542 (handle_v_requests, myresume): Remove "status" and "signal"
12543 parameters. Adjust.
12544 (handle_status): New.
12545 (main): Delete local `status'. Adjust.
12546 * remote-utils.c: Include target.h.
12547 (prepare_resume_reply): Change prototype to take a
12548 target_waitstatus. Adjust.
12549
12550 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12551 interface.
12552 * spu-low.c (spu_wait): Adjust.
12553 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12554 Delete.
12555 (win32_wait): Adjust.
12556
12557 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12558
12559 * target.h (struct thread_resume): Delete leave_stopped member.
12560 (struct target_ops): Add a `n' argument to the `resume' callback.
12561 * server.c (start_inferior): Adjust.
12562 (handle_v_cont, myresume): Adjust.
12563 * linux-low.c (check_removed_breakpoint): Adjust to resume
12564 interface change, and to removed leave_stopped field.
12565 (resume_ptr): Delete.
12566 (struct thread_resume_array): New.
12567 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12568 resume interface change.
12569 (linux_continue_one_thread, linux_queue_one_thread)
12570 (resume_status_pending_p): Check if the resume field is NULL
12571 instead of checking the leave_stopped member.
12572 (linux_resume): Adjust to the target resume interface change.
12573 * spu-low.c (spu_resume): Adjust to the target resume interface
12574 change.
12575 * win32-low.c (win32_detach, win32_resume): Ditto.
12576
12577 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12578
12579 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12580 flag.
12581 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12582 pending.
12583 (linux_continue_one_thread): Only preserve the stepping flag if
12584 there's a pending breakpoint.
12585
12586 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12587
12588 * server.c (main): After the inferior having exited, call
12589 remote_close before exiting gdbserver.
12590
12591 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12592
12593 Fix size of FPSCR in Power 7 processors.
12594 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12595 (PPC_FEATURE_HAS_DFP): New #define.
12596 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12597 size of the FPSCR.
12598
12599 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12600
12601 * server.c (handle_query) Whitespace and formatting.
12602
12603 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12604
12605 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12606 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12607 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12608 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12609 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12610 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12611 Makefile.in, configure.ac: Fix whitespace throughout.
12612 * configure: Regenerate.
12613
12614 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12615
12616 * inferiors.c (find_inferior): Make it safe for the callback
12617 function to delete the currently iterated inferior.
12618
12619 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12620
12621 * Makefile.in (linuw_low_h): Move higher.
12622 (thread-db.o): Depend on $(linux_low_h).
12623
12624 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12625
12626 Rename "process" to "lwp" throughout.
12627
12628 * linux-low.c (all_processes): Rename to...
12629 (all_lwps): ... this.
12630 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12631 (add_process): Rename to ...
12632 (add_lwp): ... this. Adjust.
12633 (linux_create_inferior): Adjust.
12634 (linux_attach_lwp): Adjust.
12635 (linux_attach): Adjust.
12636 (linux_kill_one_process): Rename to ...
12637 (linux_kill_one_lwp): ... this. Adjust.
12638 (linux_kill): Adjust.
12639 (linux_detach_one_process): Rename to ...
12640 (linux_detach_one_lwp): ... this. Adjust.
12641 (linux_detach): Adjust.
12642 (check_removed_breakpoint): Adjust.
12643 (status_pending_p): Adjust.
12644 (linux_wait_for_process): Rename to ...
12645 (linux_wait_for_lwp): ... this. Adjust.
12646 (linux_wait_for_event): Adjust.
12647 (send_sigstop): Adjust.
12648 (wait_for_sigstop): Adjust.
12649 (stop_all_processes): Rename to ...
12650 (stop_all_lwps): ... this.
12651 (linux_resume_one_process): Rename to ...
12652 (linux_resume_one_lwp): ... this. Adjust.
12653 (linux_set_resume_request, linux_continue_one_thread)
12654 (linux_queue_one_thread, resume_status_pending_p)
12655 (usr_store_inferior_registers, regsets_store_inferior_registers)
12656 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12657 Adjust.
12658 * linux-low.h (get_process): Rename to ...
12659 (get_lwp): ... this. Adjust.
12660 (get_thread_process): Rename to ...
12661 (get_thread_lwp): ... this. Adjust.
12662 (get_process_thread): Rename to ...
12663 (get_lwp_thread): ... this. Adjust.
12664 (struct process_info): Rename to ...
12665 (struct lwp_info): ... this.
12666 (all_processes): Rename to ...
12667 (all_lwps): ... this.
12668 * proc-service.c (ps_lgetregs): Adjust.
12669 * thread-db.c (thread_db_create_event, find_one_thread)
12670 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12671
12672 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12673
12674 * server.c (handle_query): Handle "qAttached".
12675
12676 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12677
12678 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12679 GPLv3, update license URL.
12680
12681 2009-03-01 Doug Evans <dje@google.com>
12682
12683 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12684 (server_h): Add gdb_signals.h.
12685 (signals.o): Update.
12686 * server.h (target_signal_from_host,target_signal_to_host_p)
12687 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12688
12689 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12690
12691 * remote-utils.c (getpkt): Also generate remote-debug
12692 information if noack_mode is set.
12693
12694 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12695
12696 * server.c (handle_query): Report qXfer:siginfo:read and
12697 qXfer:siginfo:write as supported and handle them.
12698 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12699 * linux-low.c (linux_xfer_siginfo): New.
12700 (linux_target_ops): Set it.
12701
12702 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12703
12704 * server.c (gdbserver_usage): Mention --remote-debug.
12705 (main): Accept '--remote-debug' switch.
12706
12707 2009-01-18 Doug Evans <dje@google.com>
12708
12709 * regcache.c (new_register_cache): No need to check result of xcalloc.
12710 * server.c (handle_search_memory): Back out calls to xmalloc,
12711 result is checked and error is returned to user upon failure.
12712 (handle_query): Ditto. Add more checks for result of malloc.
12713 (handle_v_cont): Check result of malloc, report error back to
12714 user upon failure.
12715 (handle_v_run): Ditto. Call freeargv.
12716 * server.h (freeargv): Declare.
12717 * utils.c (freeargv): New fn.
12718
12719 2009-01-15 Doug Evans <dje@google.com>
12720
12721 * gdbreplay.c (perror_with_name): Make arg const char *.
12722 * server.h (target_signal_to_name): Make return type const char *.
12723 * thread-db.c (thread_db_err_str): Make return type const char *.
12724 * utils.c (perror_with_name): Make arg const char *.
12725
12726 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12727
12728 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12729 when handling a EXIT_PROCESS_DEBUG_EVENT.
12730
12731 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12732
12733 * gdbreplay.c (gdbreplay_version): Update copyright year.
12734 * server.c (gdbserver_version): Likewise.
12735
12736 2009-01-05 Doug Evans <dje@google.com>
12737
12738 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12739 (handle_extended_wait): Improve comment.
12740
12741 2008-12-13 Doug Evans <dje@google.com>
12742
12743 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12744 * server.h (ATTR_MALLOC): New macro.
12745 (xmalloc,xcalloc,xstrdup): Declare.
12746 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12747 * inferiors.c: Ditto.
12748 * linux-low.c: Ditto.
12749 * mem-break.c: Ditto.
12750 * regcache.c: Ditto.
12751 * remote-utils.c: Ditto.
12752 * server.c: Ditto.
12753 * target.c: Ditto.
12754 * win32-low.c: Ditto.
12755
12756 2008-12-12 Doug Evans <dje@google.com>
12757
12758 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12759 in debugging printf.
12760
12761 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12762
12763 2008-12-09 Doug Evans <dje@google.com>
12764
12765 * linux-low.h (struct process_info): Delete member tid, unused.
12766 * thread-db.c (find_one_thread): Update.
12767 (maybe_attach_thread): Update.
12768
12769 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12770
12771 * target.h (struct target_ops): Add qxfer_osdata member.
12772 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12773 and dirent.h.
12774 (linux_qxfer_osdata): New functions.
12775 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12776 callback.
12777 * server.c (handle_query): Handle "qXfer:osdata:read:".
12778 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12779 (buffer_xml_printf): New functions.
12780 * server.h (struct buffer): New.
12781 (buffer_grow_str, buffer_grow_str0): New macros.
12782 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12783 (buffer_xml_printf): Declare.
12784
12785 2008-11-24 Doug Evans <dje@google.com>
12786
12787 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12788
12789 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12790
12791 * server.c (handle_v_run): Always use the supplied argument list.
12792
12793 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12794
12795 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12796 (xtensa_regmap_table): Add entry for scompare1.
12797
12798 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12799
12800 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12801 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12802 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12803 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12804 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12805 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12806 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12807 XML target descriptions.
12808 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12809 when inferior is running on an ISA 2.05 or later processor. Add
12810 special case to return offset for full 64-bit slot of FPSCR when
12811 in 32-bits.
12812
12813 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12814
12815 * Makefile.in (SFILES, clean): Added sparc64 files.
12816 (reg-sparc64.o, reg-sparc64.c): New.
12817 * configure.srv (sparc*-*-linux*): New configuration.
12818 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12819 syscall arguments for SPARC.
12820 (regsets_store_inferior_registers): Likewise.
12821 * linux-sparc-low.c: New file.
12822
12823 2008-10-21 Doug Evans <dje@google.com>
12824
12825 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12826 (READLINE_DIR,READLINE_DEP): Delete.
12827 (INTERNAL_CFLAGS): Update.
12828 (LINTFLAGS): Update.
12829
12830 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12831
12832 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12833 whole argv from the last run, not just argv[0].
12834
12835 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12836
12837 * regcache.c (new_register_cache): Return NULL if the register
12838 cache size isn't known yet.
12839 (free_register_cache): Avoid dereferencing a NULL regcache.
12840
12841 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12842
12843 * configure.srv: Merge MIPS and MIPS64.
12844
12845 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12846
12847 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12848
12849 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12850
12851 * Makefile.in: Add required vsx dependencies.
12852
12853 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12854 Declare init_registers_powerpc_vsx32l.
12855 Declare init_registers_powerpc_vsx64l.
12856 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12857 (ppc_arch_setup): Check for VSX in hwcap.
12858 (ppc_fill_vsxregset): New function.
12859 (ppc_store_vsxregset): New function.
12860 Add new VSX entry in regset_info target_regsets.
12861
12862 * configure.srv: Add new VSX dependencies.
12863
12864 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12865
12866 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12867 (remote_open): Set or clear transport_is_reliable.
12868 (putpkt_binary): Don't expect acks in noack mode.
12869 (getpkt): Don't send ack/nac in noack mode.
12870 * server.c (handle_general_set): Handle QStartNoAckMode.
12871 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12872 qSupported.
12873 (main): Reset noack_mode on every connection.
12874 * server.h (noack_mode): Declare.
12875
12876 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12877
12878 * Makefile.in (GDBREPLAY_OBS): New variable.
12879 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12880
12881 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12882 Daniel Jacobowitz <dan@codesourcery.com>
12883
12884 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12885 (usr_store_inferior_registers): Likewise.
12886 (regsets_store_inferior_registers): Likewise.
12887
12888 2008-07-31 Rolf Jansen <rj@surtec.com>
12889 Pedro Alves <pedro@codesourcery.com>
12890
12891 * configure.ac: Check for memmem declaration.
12892 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12893 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12894 (disable_packet_qfThreadInfo): Unconditionally compile.
12895 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12896 * configure, config.in: Regenerate.
12897
12898 2008-07-28 Doug Kwan <dougkwan@google.com>
12899
12900 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12901 (linux_write_memory): Remove declaration of errno.
12902
12903 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12904
12905 * linux-low.c (handle_extended_wait): Do not use "status"
12906 variable uninitialized.
12907
12908 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12909
12910 * server.c (handle_v_attach): Inhibit reporting dll changes.
12911
12912 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12913
12914 * remote-utils.c (prepare_resume_reply): If requested, don't
12915 output "thread:TID" in the T stop reply.
12916
12917 * server.c (disable_packet_vCont, disable_packet_Tthread)
12918 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12919 (handle_query): If requested, disable support for qC, qfThreadInfo
12920 and qsThreadInfo.
12921 (handle_v_requests): If requested, disable support for vCont.
12922 (gdbserver_show_disableable): New.
12923 (main): Handle --disable-packet and --disable-packet=LIST.
12924
12925 * server.h (disable_packet_vCont, disable_packet_Tthread)
12926 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12927
12928 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12929
12930 * server.c (gdbserver_usage): Mention --version.
12931
12932 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12933
12934 * Makefile.in (gdbreplay.o): New rule.
12935
12936 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12937
12938 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12939 message, not gdbserver.
12940
12941 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12942 Nathan Sidwell <nathan@codesourcery.com>
12943 Joseph Myers <joseph@codesourcery.com>
12944
12945 * acinclude.m4: Include ../../config/acx.m4.
12946 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12947 * configure, config.in: Regenerate.
12948 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12949 * server.c (gdbserver_version): Print PKGVERSION.
12950 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12951 (main): Adjust gdbserver_usage calls.
12952 * gdbreplay.c (version, host_name): Add declarations.
12953 (gdbreplay_version, gdbreplay_usage): New.
12954 (main): Accept --version and --help options.
12955
12956 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12957
12958 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12959 (arm_breakpoint_at): Handle Thumb.
12960 (the_low_target): Add comment.
12961
12962 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12963
12964 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12965
12966 2008-05-09 Doug Evans <dje@google.com>
12967
12968 * server.h (decode_search_memory_packet): Declare.
12969 * remote-utils.c (decode_search_memory_packet): New fn.
12970 * server.c (handle_search_memory_1): New fn.
12971 (handle_search_memory): New fn.
12972 (handle_query): Process qSearch:memory packets.
12973
12974 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12975
12976 * regcache.c (registers_length): Remove.
12977 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12978 full register packet.
12979 * regcache.h (registers_length): Remove prototype.
12980 * server.h (PBUFSIZ): Define to 16384.
12981
12982 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12983
12984 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12985 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12986 powerpc-64l.o, and powerpc-altivec64l.o.
12987 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12988 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12989 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12990 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12991 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12992 to srv_xmlfiles.
12993
12994 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12995 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12996 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12997 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12998 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12999 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13000 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13001 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13002 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13003 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13004 (clean): Update.
13005
13006 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13007 (init_registers_powerpc_32l): ... this new prototype.
13008 (init_registers_powerpc_32): Remove, replace by ...
13009 (init_registers_powerpc_altivec32l): ... this new prototype.
13010 (init_registers_powerpc_e500): Remove, replace by ...
13011 (init_registers_powerpc_e500l): ... this new prototype.
13012 (init_registers_ppc64): Remove, replace by ...
13013 (init_registers_powerpc_64l): ... this new prototype.
13014 (init_registers_powerpc_64): Remove, replace by ...
13015 (init_registers_powerpc_altivec64l): ... this new prototype.
13016 (ppc_num_regs): Set to 73.
13017 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13018 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13019 (ppc_cannot_store_register): Handle orig_r3 and trap.
13020 (ppc_arch_setup): Update init_registers_... calls.
13021 (ppc_fill_gregset): Handle orig_r3 and trap.
13022
13023 * inferiors.c (clear_inferiors): Reset current_inferior.
13024
13025 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13026
13027 * acinclude.m4: Add override.m4.
13028 * configure: Regenerate.
13029
13030 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13031
13032 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13033 initial call to init_register_ppc64.
13034
13035 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13036
13037 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13038 single powerpc*-*-linux* case.
13039 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13040
13041 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13042
13043 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13044 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13045 from reg_xmlfiles.
13046 * linux-ppc-low.c: Include <elf.h>.
13047 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13048 (ppc_hwcap): New global variable.
13049 (ppc_regmap): Remove __SPE__ #ifdef sections.
13050 (ppc_regmap_e500): New global variable.
13051 (ppc_cannot_store_register): Update __SPE__ special case.
13052 (ppc_get_hwcap): New function.
13053 (ppc_arch_setup): Use it to determine whether inferior supports
13054 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13055 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13056 Do not access registers if target does not support AltiVec.
13057 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13058 Do not access registers if target does not support SPE.
13059 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13060
13061 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13062
13063 * linux-low.c (disabled_regsets, num_regsets): New.
13064 (use_regsets_p): Delete.
13065 (linux_wait_for_process): Clear disabled_regsets.
13066 (regsets_fetch_inferior_registers): Check and set it.
13067 (regsets_store_inferior_registers): Likewise.
13068 (linux_fetch_registers, linux_store_registers): Do not use
13069 use_regsets_p.
13070 (initialize_low): Allocate disabled_regsets.
13071
13072 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13073
13074 * Makefile.in (LIBOBJS): New.
13075 (OBS): Use LIBOBJS.
13076 (memmem.o): New rule.
13077 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13078 * configure: Regenerated.
13079
13080 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13081
13082 * server.c (handle_query): Never return "unsupported" for
13083 qXfer:features:read queries.
13084
13085 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13086
13087 * server.c (get_features_xml): Fix inverted condition.
13088 (handle_query): Always support qXfer:feature:read.
13089
13090 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13091
13092 * server.c (wrapper_argv): New.
13093 (start_inferior): Handle wrapper_argv. If set, expect an extra
13094 trap.
13095 (gdbserver_usage): Document --wrapper.
13096 (main): Parse --wrapper.
13097
13098 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13099
13100 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13101 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13102 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13103 (ppc_set_pc): Likewise.
13104 (ppc_arch_setup): New function.
13105 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13106 of collect_register.
13107 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13108
13109 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13110
13111 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13112 instead of linux-ppc64-low.o.
13113 * linux-ppc64-low.c: Remove file.
13114 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13115 (linux-ppc64-low.o): Remove rule.
13116
13117 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13118 (init_registers_powerpc_64): Likewise.
13119 (ppc_regmap): Conditionally define depending on __powerpc64__.
13120 (ppc_cannot_store_register): Do not special-case "fpscr" when
13121 compiled on __powerpc64__.
13122 (ppc_collect_ptrace_register): New function.
13123 (ppc_supply_ptrace_register): New function.
13124 (ppc_breakpoint): Change type to "unsigned int".
13125 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13126 (the_low_target): Conditionally provide initializers for the
13127 arch_setup member depending on __powerpc64__. Install
13128 collect_ptrace_register and supply_ptrace_register members.
13129
13130 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13131
13132 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13133 * server.c (gdbserver_xmltarget): Define.
13134 (get_features_xml): Use it to replace "target.xml" and arch_string.
13135
13136 * configure.srv: Remove srv_xmltarget. Add XML files that were
13137 mentioned there to srv_xmlfiles instead. Remove conditional tests
13138 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13139 srv_xmlfiles and srv_regobj to include all possible choices.
13140 * configure.ac (srv_xmltarget): Remove.
13141 (srv_xmlfiles): Do not add "target.xml".
13142 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13143 checks for supplementary target information.
13144 * configure: Regenerate.
13145 * Makefile.in (XML_TARGET): Remove.
13146 (target.xml): Remove rule.
13147 (clean): Do not clean up target.xml.
13148 (.PRECIOUS): Do not mention target.xml.
13149
13150 * target.h (struct target_ops): Remove arch_string member.
13151 * linux-low.c (linux_arch_string): Remove.
13152 (linux_target_ops): Remove arch_string initializer.
13153 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13154 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13155 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13156 * spu-low.c (spu_arch_string): Remove.
13157 (spu_target_ops): Remove arch_string initializer.
13158 * win32-low.c (win32_arch_string): Remove.
13159 (win32_target_ops): Remove arch_string initializer.
13160 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13161 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13162 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13163
13164 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13165
13166 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13167 by collect_ptrace_register and supply_ptrace_register hooks.
13168 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13169 instead of checking for the_low_target.left_pad_xfer.
13170 (usr_store_inferior_registers): Use collect_ptrace_register callback
13171 instead of checking for the_low_target.left_pad_xfer.
13172
13173 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13174 (s390_supply_ptrace_register): Likewise.
13175 (s390_fill_gregset): Call s390_collect_ptrace_register.
13176 (the_low_target): Update.
13177
13178 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13179 (ppc_supply_ptrace_register): Likewise.
13180 (the_low_target): Update.
13181
13182 * linux-i386-low.c (the_low_target): Update.
13183 * linux-x86-64-low.c (the_low_target): Update.
13184
13185 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13186
13187 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13188 reg-s390.o and reg-s390x.o.
13189
13190 * linux-low.c (new_inferior): New global variable.
13191 (linux_create_inferior, linux_attach): Set it.
13192 (linux_wait_for_process): Call the_low_target.arch_setup after the
13193 target has stopped for the first time.
13194 (initialize_low): Do not call the_low_target.arch_setup.
13195
13196 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13197 (s390_set_pc): Likewise.
13198 (s390_arch_setup): New function.
13199 (the_low_target): Use s390_arch_setup as arch_setup routine.
13200
13201 * regcache.c (realloc_register_cache): New function.
13202 (set_register_cache): Call it for each existing regcache.
13203
13204 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13205
13206 * server.h (init_registers): Remove prototype.
13207
13208 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13209 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13210 instead of init_registers ().
13211 * linux-arm-low.c (init_registers_arm): Add prototype.
13212 (init_registers_arm_with_iwmmxt): Likewise.
13213 (the_low_target): Add initializer for arch_setup field.
13214 * linux-cris-low.c (init_registers_cris): Add prototype.
13215 (the_low_target): Add initializer for arch_setup field.
13216 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13217 (the_low_target): Add initializer for arch_setup field.
13218 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13219 (the_low_target): Add initializer for arch_setup field.
13220 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13221 (the_low_target): Add initializer for arch_setup field.
13222 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13223 (the_low_target): Add initializer for arch_setup field.
13224 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13225 (the_low_target): Add initializer for arch_setup field.
13226 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13227 (init_registers_mips64_linux): Likewise.
13228 (the_low_target): Add initializer for arch_setup field.
13229 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13230 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13231 (the_low_target): Add initializer for arch_setup field.
13232 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13233 (init_registers_powerpc_64): Likewise.
13234 (the_low_target): Add initializer for arch_setup field.
13235 * linux-s390-low.c (init_registers_s390): Add prototype.
13236 (init_registers_s390x): Likewise.
13237 (the_low_target): Add initializer for arch_setup field.
13238 * linux-sh-low.c (init_registers_sh): Add prototype.
13239 (the_low_target): Add initializer for arch_setup field.
13240 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13241 (the_low_target): Add initializer for arch_setup field.
13242 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13243 (the_low_target): Add initializer for arch_setup field.
13244
13245 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13246 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13247 instead of init_registers ().
13248 * win32-arm-low.c (init_registers_arm): Add prototype.
13249 (the_low_target): Add initializer for arch_setup field.
13250 * win32-i386-low.c (init_registers_i386): Add prototype.
13251 (the_low_target): Add initializer for arch_setup field.
13252
13253 * spu-low.c (init_registers_spu): Add prototype.
13254 (initialize_low): Call initialie_registers_spu () instead of
13255 initialize_registers ().
13256
13257 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13258
13259 * server.c (handle_v_requests): When handling the vRun and vAttach
13260 packets, if already debugging a process, don't kill it. Return an
13261 error instead.
13262
13263 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13264
13265 * server.c (handle_query): Correct length check.
13266
13267 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13268
13269 * win32-low.c (do_initial_child_stuff): Add process handle
13270 parameter. Set current_process_handle and current_process_id from the
13271 parameters. Clear globals.
13272 (win32_create_inferior): Don't set current_process_handle and
13273 current_process_id here. Instead pass them on the call to
13274 do_initial_child_stuff.
13275 (win32_attach): Likewise.
13276 (win32_clear_inferiors): New.
13277 (win32_kill): Don't close the current process handle or the
13278 current thread handle here. Instead call win32_clear_inferiors.
13279 (win32_detach): Don't open a new handle to the process. Call
13280 win32_clear_inferiors.
13281 (win32_join): Don't rely on current_process_handle; open a new
13282 handle using the process id.
13283 (win32_wait): Call win32_clear_inferiors when the inferior process
13284 has exited.
13285
13286 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13287
13288 * server.c (monitor_show_help): Add "exit".
13289
13290 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13291
13292 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13293 (clean): Add reg-xtensa.c.
13294 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13295 * configure.srv (xtensa*-*-linux*) New target.
13296 * linux-xtensa-low.c: New.
13297 * xtensa-xtregs.c: New.
13298
13299 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13300
13301 * hostio.c: Don't include errno.h.
13302 (errno_to_fileio_errno): Move to hostio-errno.
13303 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13304 error number outputting to the target->hostio_last_error callback.
13305 (hostio_packet_error): Use FILEIO_EINVAL directly.
13306 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13307 calls to hostio_error.
13308 * hostio-errno.c: New.
13309 * server.h (hostio_last_error_from_errno): Declare.
13310 * target.h (target_ops): Add hostio_last_error member.
13311 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13312 as hostio_last_error handler.
13313 * spu-low.c (spu_target_ops): Likewise.
13314 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13315 (wince_hostio_last_error): New functions.
13316 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13317 as hostio_last_error handler.
13318 (win32_target_ops) [!_WIN32_WCE]: Register
13319 hostio_last_error_from_errno as hostio_last_error handler.
13320 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13321 (hostio-errno.o): New rule.
13322 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13323 * configure.srv (srv_hostio_err_objs): New variable. Default to
13324 hostio-errno.o.
13325 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13326 * configure: Regenerate.
13327
13328 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13331 (linux_kill, linux_detach): Clean up the process list.
13332 * remote-utils.c (remote_open): Improve port number parsing.
13333 (putpkt_binary, input_interrupt): Only send interrupts if the target
13334 is running.
13335 * server.c (extended_protocol): Make static.
13336 (attached): Define earlier.
13337 (exit_requested, response_needed, program_argv): New variables.
13338 (target_running): New.
13339 (start_inferior): Clear attached here.
13340 (attach_inferior): Set attached here.
13341 (require_running): Define.
13342 (handle_query): Use require_running and target_running. Implement
13343 "monitor exit".
13344 (handle_v_attach, handle_v_run): New.
13345 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13346 (gdbserver_usage): Update.
13347 (main): Redo argument parsing. Handle --debug and --multi. Handle
13348 --attach along with other options or after the port. Save
13349 program_argv. Support no initial program. Resynchronize
13350 communication with GDB after an error. Handle "monitor exit".
13351 Use require_running and target_running. Always allow the extended
13352 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13353 restart in extended mode.
13354 * README: Refer to the GDB manual. Update --attach usage.
13355
13356 2007-12-20 Andreas Schwab <schwab@suse.de>
13357
13358 * linux-low.c (STACK_SIZE): Define.
13359 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13360 (linux_test_for_tracefork): Likewise.
13361
13362 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13363
13364 * linux-low.c (linux_wait_for_event): Update messages. Do not
13365 reinsert auto-delete breakpoints.
13366 * mem-break.c (struct breakpoint): Change return type of handler to
13367 int.
13368 (set_breakpoint_at): Update handler type.
13369 (reinsert_breakpoint_handler): Return 1 instead of calling
13370 delete_breakpoint.
13371 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13372 setting a new one.
13373 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13374 * mem-break.h (set_breakpoint_at): Update handler type.
13375 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13376 * win32-low.c (auto_delete_breakpoint): New.
13377 (get_child_debug_event): Use it.
13378
13379 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13380
13381 * configure.ac: Check for pread and pwrite.
13382 * hostio.c (handle_pread): Fall back to lseek and read.
13383 (handle_pwrite): Fall back to lseek and write.
13384 * config.in, configure: Regenerated.
13385
13386 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13387
13388 * server.c (myresume): Add own_buf argument.
13389 (main): Update calls.
13390
13391 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13392
13393 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13394 * remote-utils.c (remote_open): Do not call disable_async_io.
13395 (block_async_io): Delete.
13396 (unblock_async_io): Make static.
13397 (initialize_async_io): New.
13398 * server.c (handle_v_cont): Handle async I/O here.
13399 (myresume): Likewise. Move other common resume tasks here...
13400 (main): ... from here. Call initialize_async_io. Disable async
13401 I/O before the main loop.
13402 * server.h (initialize_async_io): Declare.
13403 (block_async_io, unblock_async_io): Delete prototypes.
13404 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13405
13406 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13407
13408 * remote-utils.c (readchar): Allow binary data in received messages.
13409
13410 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13411
13412 * win32-low.c (attaching): New global.
13413 (win32_create_inferior): Clear the `attaching' global.
13414 (win32_attach): Set the `attaching' global.
13415 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13416 attaching. Only set a breakpoint at the entry point if not
13417 attaching.
13418
13419 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13420
13421 * server.c (main): Don't report dll events on the initial
13422 connection on attaches.
13423
13424 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13425
13426 * server.c (main): Relax numerical bases supported for the pid of
13427 the --attach command line argument.
13428
13429 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13430
13431 * win32-low.c (win32_attach): Call OpenProcess before
13432 DebugActiveProcess, not after. Add last error output to error
13433 call.
13434
13435 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13436
13437 * win32-low.c (win32_get_thread_context)
13438 (win32_set_thread_context): New functions.
13439 (thread_rec): Use win32_get_thread_context.
13440 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13441 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13442 field.
13443
13444 2007-12-03 Leo Zayas
13445 Pedro Alves <pedro_alves@portugalmail.pt>
13446
13447 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13448 global variables.
13449 (child_add_thread): Minor cleanup.
13450 (child_continue): Resume artificially suspended threads before
13451 calling ContinueDebugEvent.
13452 (suspend_one_thread): New.
13453 (fake_breakpoint_event): New.
13454 (get_child_debug_event): Change return type to int. Check here if
13455 gdb sent an interrupt request. If a soft interrupt was requested,
13456 fake a breakpoint event. Return 0 if there is no event to handle,
13457 and 1 otherwise.
13458 (win32_wait): Don't check here if gdb sent an interrupt request.
13459 Ensure there is a valid event to handle.
13460 (win32_request_interrupt): Add soft interruption method as last
13461 resort.
13462
13463 2007-12-03 Leo Zayas
13464 Pedro Alves <pedro_alves@portugalmail.pt>
13465
13466 * win32-low.h (win32_thread_info): Add descriptions to the
13467 structure members. Replace `suspend_count' counter by a
13468 `suspended' flag.
13469 * win32-low.c (thread_rec): Update condition of when to get the
13470 context from the inferior. Rely on ContextFlags being set if it
13471 has already been retrieved. Only suspend the inferior thread if
13472 we haven't already. Warn if that fails.
13473 (continue_one_thread): s/suspend_count/suspended/. Only call
13474 ResumeThread once. Warn if that fails.
13475
13476 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13477
13478 * win32-low.c (win32_wait): Don't read from the inferior when it
13479 has already exited.
13480
13481 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13482
13483 * Makefile.in (win32_low_h): New variable.
13484 (win32-low.o): Add dependency on $(win32_low_h).
13485 (win32-arm-low.o, win32-i386-low.o): New rules.
13486
13487 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13488
13489 * hostio.c: Correct copyright year.
13490
13491 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13492
13493 * Makefile.in (OBS): Add hostio.o.
13494 (hostio.o): New rule.
13495 * server.h (handle_vFile): Declare.
13496 * hostio.c: New file.
13497 * server.c (handle_v_requests): Take packet_len and new_packet_len
13498 for binary packets. Call handle_vFile.
13499 (main): Update call to handle_v_requests.
13500
13501 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13502
13503 * linux-low.c: Include <sched.h>.
13504
13505 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13506
13507 * linux-low.c (linux_tracefork_grandchild): New.
13508 (linux_tracefork_child): Use clone.
13509 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13510
13511 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13512
13513 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13514
13515 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13516
13517 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13518
13519 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13520
13521 * inferiors.c (change_inferior_id): Delete.
13522 (add_pid_to_list, pull_pid_from_list): New.
13523 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13524 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13525 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13526 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13527 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13528 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13529 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13530 (using_threads): Always set to 1.
13531 (handle_extended_wait): New.
13532 (add_process): Do not set TID.
13533 (linux_create_inferior): Set must_set_ptrace_flags.
13534 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13535 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13536 (linux_thread_alive): Rename TID argument to LWPID.
13537 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13538 (linux_wait_for_event): Do not use TID or check using_threads. Update
13539 call to dead_thread_notify. Call handle_extended_wait.
13540 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13541 (send_sigstop): Delete sigstop_sent.
13542 (wait_for_sigstop): Avoid TID.
13543 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13544 (linux_test_for_tracefork): New.
13545 (linux_lookup_signals): Use thread_db_active and
13546 linux_supports_tracefork_flag.
13547 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13548 * linux-low.h (get_process_thread): Avoid TID.
13549 (struct process_ifo): Move thread_known and tid to the end. Remove
13550 sigstop_sent.
13551 (linux_attach_lwp, thread_db_init): Update prototypes.
13552 * server.h (change_inferior_id): Delete prototype.
13553 (add_pid_to_list, pull_pid_from_list): New prototypes.
13554 * thread-db.c (thread_db_use_events): New.
13555 (find_first_thread): Rename to...
13556 (find_one_thread): ...this. Update callers and messages. Do not
13557 call fatal. Check thread_db_use_events. Do not call
13558 change_inferior_id or new_thread_notify.
13559 (maybe_attach_thread): Update. Do not call new_thread_notify.
13560 (thread_db_init): Set thread_db_use_events. Check use_events.
13561 * utils.c (fatal, warning): Correct message prefix.
13562
13563 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13564
13565 * Makefile.in (clean): Remove new files.
13566 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13567 (powerpc-64.o, powerpc-64.c): New rules.
13568 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13569 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13570 with SPE.
13571 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13572 SPE targets.
13573 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13574 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13575 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13576 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13577 (target_regsets): Add AltiVec and SPE register sets.
13578 * configure.ac: Check for AltiVec and SPE.
13579 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13580 (ppc_fill_vrregset, ppc_store_vrregset): New.
13581 (target_regsets): Add AltiVec register set.
13582 * configure: Regenerated.
13583
13584 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * linux-low.c (O_LARGEFILE): Define.
13587 (linux_read_memory): Use /proc/PID/mem.
13588 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13589 * configure, config.in: Regenerated.
13590
13591 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13592
13593 * linux-low.c (linux_wait_for_event): Do not pass signals while
13594 single-stepping.
13595
13596 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13597
13598 * win32-low.c (create_process): New.
13599 (win32_create_inferior): Use create_process instead of
13600 CreateProcess. If create_process failed retry appending an ".exe"
13601 suffix. Store the GetLastError result immediatelly after
13602 create_process calls and use it on the call to error.
13603
13604 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13605
13606 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13607
13608 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13609
13610 * configure.ac: Switch license to GPLv3.
13611
13612 2007-08-01 Michael Snyder <msnyder@access-company.com>
13613
13614 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13615
13616 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13617
13618 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13619 typedef.
13620 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13621 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13622 CloseToolhelp32Snapshot.
13623 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13624 CloseToolhelp32Snapshot.
13625
13626 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13627
13628 * server.c (main): Check for inferior exit before main loop.
13629
13630 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13631
13632 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13633 instead of on tmp_desc.
13634
13635 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13636 Daniel Jacobowitz <dan@codesourcery.com>
13637
13638 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13639 (add_thread): Minor cleanups.
13640 (clear_inferiors): Move lower in the file. Clear the DLL
13641 list.
13642 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13643 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13644 (xml_escape_text): New.
13645 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13646 for qSupported.
13647 (handle_v_cont): Report errors.
13648 (gdbserver_version): Update.
13649 (main): Correct size of own_buf. Do not report initial DLL events.
13650 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13651 (unloaded_dll, xml_escape_text): New.
13652 * win32-low.c (enum target_waitkind): Update comments.
13653 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13654 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13655 (win32_EnumProcessModules, win32_GetModuleInformation)
13656 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13657 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13658 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13659 (win32_Module32First, win32_Module32Next, load_toolhelp)
13660 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13661 (get_child_debug_event): Handle DLL events.
13662 (win32_wait): Likewise.
13663
13664 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13667 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13668
13669 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13670
13671 * win32-low.c (handle_output_debug_string): Ignore event if not
13672 waiting.
13673
13674 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13675
13676 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13677
13678 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13679
13680 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13681
13682 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13683
13684 * inferiors.c (change_inferior_id): Add comment.
13685 * linux-low.c (check_removed_breakpoint): Add an early
13686 prototype. Improve debug output.
13687 (linux_attach): Doc update.
13688 (linux_detach_one_process, linux_detach): Clean up before releasing
13689 each process.
13690 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13691 * linux-low.h (struct process_info): Doc improvement.
13692 * mem-break.c (delete_all_breakpoints): New.
13693 * mem-break.h (delete_all_breakpoints): New prototype.
13694 * thread-db.c (find_first_thread): New.
13695 (thread_db_create_event): Call it instead of
13696 thread_db_find_new_threads. Clean up unused variables.
13697 (maybe_attach_thread): Remove first thread handling.
13698 (thread_db_find_new_threads): Use find_first_thread.
13699 (thread_db_get_tls_address): Likewise.
13700
13701 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13702
13703 * thread-db.c (thread_db_find_new_threads): Add prototype.
13704 (thread_db_create_event): Check for the main thread before adding
13705 a new thread.
13706 (maybe_attach_thread): Only enable event reporting if TID == 0.
13707 (thread_db_get_tls_address): Check for new threads.
13708
13709 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13710
13711 * linux-low.c (linux_create_inferior): Try execv before execvp.
13712 * spu-low.c (spu_create_inferior): Likewise.
13713
13714 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13715
13716 * linux-low.c (linux_create_inferior): Change execv to execvp.
13717 * spu-low.c (spu_create_inferior): Likewies.
13718
13719 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13720
13721 * Makefile.in (clean): Clean new files instead of deleted ones.
13722 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13723 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13724 rules.
13725 * configure.srv: Specify XML files and new regformats for MIPS and
13726 MIPS64 GNU/Linux.
13727 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13728 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13729 an entry for the restart register.
13730 (mips_cannot_fetch_register, mips_cannot_store_register)
13731 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13732 register names to match the XML descriptions.
13733 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13734 restart register instead of $0.
13735
13736 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13737 Markus Deuling <deuling@de.ibm.com>
13738
13739 * remote-utils.c (decode_xfer_write): New function.
13740 * server.h (decode_xfer_write): Add prototype.
13741 * server.c (handle_query): Add PACKET_LEN argument. Support
13742 qXfer:spu:read and qXfer:spu:write packets.
13743 (main): Pass packet_len to handle_query.
13744 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13745 * target.h (target_ops): Add qxfer_spu.
13746
13747 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13748
13749 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13750 accessing non-seekable spufs files.
13751
13752 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13753
13754 * server.c (handle_query): Add reply for qC packet.
13755
13756 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13757 Leo Zayas <lerele@champenstudios@com>
13758
13759 * server.h (check_remote_input_interrupt_request): New function.
13760 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13761 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13762 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13763 (check_remote_input_interrupt_request): New function.
13764 * server.h (check_remote_input_interrupt_request): Declare.
13765 * win32-low.c (winapi_DebugBreakProcess,
13766 winapi_GenerateConsoleCtrlEvent): New typedefs.
13767 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13768 to 250 ms.
13769 (win32_wait): Check for remote interrupt request
13770 with check_remote_input_interrupt_request.
13771 (win32_request_interrupt): New function.
13772 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13773
13774 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13775
13776 * win32-low.c (debug_registers_changed,
13777 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13778 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13779 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13780 (thread_rec): Get context using the low target.
13781 (child_add_thread): Call thread_added on the low target,
13782 which does the same thing.
13783 (regptr): Delete.
13784 (do_initial_child_stuff): Remove debug registers references.
13785 Set context using the low target. Resume threads after
13786 setting the contexts.
13787 (child_continue): Remove dead variable. Remove debug
13788 registers references.
13789 (child_fetch_inferior_registers): Go through the low target.
13790 (do_child_store_inferior_registers): Remove.
13791 (child_store_inferior_registers): Go through the low target.
13792 (win32_resume): Remove debug registers references.
13793 Set context using the low target.
13794 (handle_exception): Change return type to void. Don't record
13795 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13796 first chance exception.
13797 (get_child_debug_event): Change return type to void. Remove
13798 goto loop. Always return after waiting for debug event.
13799 (win32_wait): Convert to switch statement. Handle spurious
13800 events.
13801
13802 * win32-i386-low.c (debug_registers_changed,
13803 debug_registers_used): New.
13804 (initial_stuff): Rename to ...
13805 (i386_initial_stuff): ... this. Clear debug registers
13806 state variables.
13807 (store_debug_registers): Delete.
13808 (i386_get_thread_context): New.
13809 (load_debug_registers): Delete.
13810 (i386_set_thread_context): New.
13811 (i386_thread_added): New.
13812 (single_step): Rename to ...
13813 (i386_single_step): ... this.
13814 (do_fetch_inferior_registers): Rename to ...
13815 (i386_fetch_inferior_register): ... this.
13816 (i386_store_inferior_register): New.
13817 (the_low_target): Adapt to new interface.
13818
13819 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13820 (arm_get_thread_context): New.
13821 (arm_set_thread_context): New.
13822 (regptr): New.
13823 (do_fetch_inferior_registers): Rename to ...
13824 (arm_fetch_inferior_register): ... this.
13825 (arm_store_inferior_register): New.
13826 (arm_wince_breakpoint): Reimplement as unsigned long.
13827 (arm_wince_breakpoint_len): Define.
13828 (the_low_target): Adapt to new interface.
13829
13830 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13831 load_debug_registers. Add get_thread_context, set_thread_context,
13832 thread_added and store_inferior_register. Rename
13833 fetch_inferior_registers to fetch_inferior_register.
13834 (regptr): Remove declaration.
13835
13836 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13837
13838 * linux-low.c (linux_detach): Change return type to int. Return 0.
13839 * spu-low.c (spu_detach): Likewise.
13840
13841 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13842
13843 * target.h (target_ops): Change return type of detach to int.
13844 Add join.
13845 (join_inferior): New.
13846 * server.c (main): Don't skip detach support on mingw32.
13847 If the inferior doesn't support detaching return error.
13848 Call join_inferior instead of using waitpid.
13849 * linux-low.c (linux_join): New.
13850 (linux_target_op): Add linux_join.
13851 * spu-low.c (spu_join): New.
13852 (spu_target_ops): Add spu_join.
13853 * win32-low.c (win32_detach): Adapt to new interface.
13854 Reopen current_process_handle before detaching. Issue a child
13855 resume before detaching.
13856 (win32_join): New.
13857 (win32_target_op): Add win32_join.
13858
13859 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13860
13861 * win32-low.c (win32-attach): Fix return value.
13862 * target.h (target_ops): Describe ATTACH return values.
13863
13864 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13865
13866 * win32-low.c (GETPROCADDRESS): Define.
13867 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13868 (winapi_DebugSetProcessKillOnExit): Likewise.
13869 (win32_create_inferior): Force usage of ansi CreateProcessA.
13870 (win32_attach): Use GETPROCADDRESS.
13871 (win32_detach): Likewise.
13872
13873 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13874
13875 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13876
13877 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13878
13879 * win32-low.c: Commit leftover changes from 2007-03-29.
13880
13881 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13882
13883 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13884 fields short instead of int. Add explicit padding.
13885 (i387_cache_to_fsave): Remove unnecessary casts.
13886 (i387_fsave_to_cache): Doc fix.
13887 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13888
13889 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13892 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13893
13894 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13895
13896 * configure.srv (arm*-*-mingw32ce*): Move near the other
13897 arm targets.
13898
13899 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13900
13901 * configure.ac: Add errno checking.
13902 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13903 sys/file.h and malloc.h.
13904 (AC_CHECK_DECLS): Add perror.
13905 (srv_mingwce): Handle.
13906 * configure.srv (i[34567]86-*-cygwin*): Add
13907 win32-i386-low.o to srv_tgtobj.
13908 (i[34567]86-*-mingw*): Likewise.
13909 (arm*-*-mingw32ce*): Add case.
13910 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13911 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13912 [__MINGW32CE__] (strerror): New function.
13913 [__MINGW32CE__] (errno): Define to GetLastError.
13914 [__MINGW32CE__] (COUNTOF): New macro.
13915 (remote_open): Remove extra close call.
13916 * mem-break.c (delete_breakpoint_at): New function.
13917 * mem-break.h (delete_breakpoint_at): Declare.
13918 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13919 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13920 [USE_WIN32API] (read, write): Add char* casts.
13921 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13922 * server.h: Include wincecompat.h on Windows CE.
13923 [HAVE_ERRNO_H]: Check.
13924 (perror): Declare if not declared.
13925 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13926 (perror_with_name): Remove errno declaration.
13927 * wincecompat.h: New.
13928 * wincecompat.c: New.
13929 * win32-low.h: New.
13930 * win32-arm-low.c: New.
13931 * win32-i386-low.c: New.
13932 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13933 (OUTMSG2): Make it safe.
13934 (_T): New macro.
13935 (COUNTOF): New macro.
13936 (NUM_REGS): Get it from the low target.
13937 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13938 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13939 (thread_rec): Let low target handle debug registers.
13940 (child_add_thread): Likewise.
13941 (child_init_thread_list): Likewise.
13942 (continue_one_thread): Likewise.
13943 (regptr): New.
13944 (do_child_fetch_inferior_registers): Move to ...
13945 * win32-i386-low.c: ... here, and rename to ...
13946 (do_fetch_inferior_registers): ... this.
13947 * win32-low.c (child_fetch_inferior_registers):
13948 Go through the low target.
13949 (do_child_store_inferior_registers): Use regptr.
13950 (strwinerror): New function.
13951 (win32_create_inferior): Handle Windows CE.
13952 Use strwinerror instead of strerror on Windows error
13953 codes. Add program to the error output.
13954 Don't close the main thread handle on Windows CE.
13955 (win32_attach): Use coredll.dll on Windows CE.
13956 (win32_kill): Close current process and current
13957 thread handles.
13958 (win32_detach): Use coredll.dll on Windows CE.
13959 (win32_resume): Let low target handle debug registers, and
13960 step request.
13961 (handle_exception): Add/Remove initial breakpoint. Avoid
13962 non-existant WSTOPSIG on Windows CE.
13963 (win32_read_inferior_memory): Cast to remove warning.
13964 (win32_arch_string): Go through the low target.
13965 (initialize_low): Call set_breakpoint_data with the low
13966 target's breakpoint.
13967 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13968 FOP_REGNUM, mappings): Move to ...
13969 * win32-i386-low.c: ... here.
13970 * win32-low.c (win32_thread_info): Move to ...
13971 * win32-low.h: ... here.
13972 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13973 win32-arm-low.c and wincecompat.c.
13974 (all:): Add $EXEEXT.
13975 (install-only:): Likewise.
13976 (gdbserver:): Likewise.
13977 (gdbreplay:): Likewise.
13978 * config.in: Regenerate.
13979 * configure: Regenerate.
13980
13981 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13982
13983 * win32-low.c: Rename typedef thread_info to
13984 win32_thread_info throughout.
13985
13986 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13987
13988 * win32-i386-low.c: Rename to ...
13989 * win32-low.c: ... this.
13990 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13991 * Makefile.in: Likewise.
13992
13993 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13994
13995 * remote-utils.c (monitor_output): Constify msg parameter.
13996 * server.h (monitor_output): Likewise.
13997 * win32-i386-low.c (handle_output_debug_string): New.
13998 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13999 handle_output_debug_string.
14000 (get_child_debug_event): Likewise.
14001
14002 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14003
14004 * server.c (main): Correct strtoul check.
14005
14006 2007-03-27 Jon Ringle <jon@ringle.org>
14007
14008 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14009
14010 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14011
14012 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14013
14014 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14015
14016 * terminal.h: Check HAVE_SGTTY_H.
14017
14018 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14019
14020 * remote-utils.c (remote_open): Print out the assigned port number.
14021
14022 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14023
14024 * remote-utils.c (monitor_output): New function.
14025 * server.c (debug_threads): Define here.
14026 (monitor_show_help): New function.
14027 (handle_query): Handle qRcmd.
14028 (main): Do not handle 'd' packet.
14029 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14030 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14031 of debug_threads.
14032
14033 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14034
14035 * Makefile.in (EXEEXT): New.
14036 (clean): Use $(EXEEXT).
14037
14038 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14039
14040 * target.h (target_ops): Rename send_signal to request_interrupt,
14041 and remove enum target_signal parameter.
14042 * linux-low.c (linux_request_interrupt): Rename from
14043 linux_send_signal, and always send SIGINT.
14044 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14045 and always send SIGINT.
14046 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14047 of send_signal.
14048 (input_interrupt): Likewise.
14049
14050 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14051
14052 * server.c (get_features_xml): Check if target implemented
14053 arch_string.
14054 * win32-i386-low.c (win32_arch_string): New.
14055 (win32_target_ops): Add win32_arch_string as arch_string member.
14056
14057 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14058
14059 * spu-low.c (spu_arch_string): New.
14060 (spu_target_ops): Add spu_arch_string.
14061
14062 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14063
14064 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14065 * configure.ac: Do not check for terminal.h.
14066 * configure, config.in: Regenerated.
14067
14068 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14069
14070 * Makefile.in (OBS): Add $(XML_BUILTIN).
14071 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14072 (clean): Update.
14073 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14074 (arm-with-iwmmxt.c): New.
14075 * config.in, configure: Regenerate.
14076 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14077 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14078 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14079 (arm*-*-linux*): Add iWMMXt and regset support.
14080 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14081 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14082 (arm_store_wmmxregset, target_regsets): New.
14083 * server.c (get_features_xml): Take annex argument. Check builtin
14084 XML documents.
14085 (handle_query): Handle multiple annexes.
14086
14087 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * remote-utils.c [USE_WIN32API] (read, write): Define.
14090 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14091 write.
14092
14093 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * linux-i386-low.c (the_low_target): Set arch_string.
14096 * linux-x86-64-low.c (the_low_target): Likewise.
14097 * linux-low.c (linux_arch_string): New.
14098 (linux_target_ops): Add it.
14099 * linux-low.h (struct linux_target_ops): Add arch_string.
14100 * server.c (write_qxfer_response): Use const void * for DATA.
14101 (get_features_xml): New.
14102 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14103 * target.h (struct target_ops): Add arch_string method.
14104
14105 2007-01-03 Denis Pilat <denis.pilat@st.com>
14106 Daniel Jacobowitz <dan@codesourcery.com>
14107
14108 * linux-low.c (linux_kill): Handle being called with no threads.
14109 * win32-i386-low.c (win32_kill): Likewise.
14110 (get_child_debug_event): Clear current_process_handle.
14111
14112 2006-12-30 Denis PILAT <denis.pilat@st.com>
14113 Daniel Jacobowitz <dan@codesourcery.com>
14114
14115 * remote-utils.c (remote_open): Check the type of specified
14116 serial port devices before opening them.
14117 * server.c (main): Kill the inferior if an error occurs during
14118 the first remote_open.
14119
14120 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14121
14122 * README: Update supported targets.
14123
14124 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14125
14126 * Makefile.in (clean): Remove reg-mips64.c.
14127 (reg-mips64.c, reg-mips64.o): New rules.
14128 * configure.srv: Handle mips64. Include regset support for mips.
14129 * linux-mips-low.c (union mips_register): New.
14130 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14131 (mips_breakpoint, mips_breakpoint_at): Use int.
14132 (mips_collect_register, mips_supply_register)
14133 (mips_collect_register_32bit, mips_supply_register_32bit)
14134 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14135 (mips_store_fpregset, target_regsets): New.
14136 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14137
14138 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14139
14140 * configure.srv: Add target "spu*-*-*".
14141 * Makefile.in (clean): Remove reg-spu.c.
14142 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14143 * spu-low.c: New file.
14144
14145 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * configure.ac: Correct td_thr_tls_get_addr test.
14148 * configure: Regenerated.
14149
14150 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14151
14152 * linux-low.c (linux_wait_for_event): Reformat. Use the
14153 pass_signals array.
14154 * remote-utils.c (decode_address_to_semicolon): New.
14155 * server.c (pass_signals, handle_general_set): New.
14156 (handle_query): Mention QPassSignals for qSupported.
14157 (main): Call handle_general_set.
14158 * server.h (pass_signals, decode_address_to_semicolon): New.
14159
14160 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14161
14162 * server.c (handle_query): Correct error handling for read_auxv.
14163
14164 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14165
14166 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14167 and srv_linux_thread_db to yes.
14168 * linux-s390-low.c (s390_fill_gregset): New function.
14169 (target_regsets): Define data structure.
14170
14171 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14174 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14175 * config.in, configure: Regenerated.
14176 * inferiors.c (gdb_id_to_thread): New function.
14177 (gdb_id_to_thread_id): Use it.
14178 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14179 * linux-low.h (struct process_info): Add th member.
14180 (thread_db_get_tls_address): New prototype.
14181 * remote-utils.c (decode_address): Make non-static.
14182 * server.c (handle_query): Handle qGetTLSAddr.
14183 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14184 * target.h (struct target_ops): Add get_tls_address.
14185 * thread-db.c (maybe_attach_thread): Save the thread handle.
14186 (thread_db_get_tls_address): New.
14187
14188 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14189
14190 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14191 (linux_resume_one_process): Take a siginfo_t *. Update all
14192 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14193 (struct pending_signals): Add a siginfo_t.
14194 (linux_wait_for_process): Always set last_status.
14195 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14196 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14197 * linux-low.h (struct process_info): Add last_status.
14198
14199 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14200
14201 * remote-utils.c (try_rle): New function.
14202 (putpkt_binary): Use it.
14203
14204 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14205
14206 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14207 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14208 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14209 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14210 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14211 point registers.
14212
14213 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14214
14215 * server.c (terminal_fd): New variable.
14216 (old_foreground_pgrp): Likewise.
14217 (restore_old_foreground_pgrp): New function.
14218 (start_inferior): Record the terminal file descriptor in terminal_fd
14219 and its original foreground group in old_foreground_pgrp. Register
14220 restore_old_foreground_pgrp with atexit().
14221
14222 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14223
14224 * server.c (handle_query): Correct qPart to qXfer.
14225
14226 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * configure.ac: Check for more headers which are missing on
14229 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14230 * configure.srv: Add Cygwin and mingw32.
14231 * remote-utils.c: Don't include headers unconditionally which
14232 are missing on mingw32. Include <winsock.h> for mingw32.
14233 (remote_open): Adjust for mingw32 support. Flush
14234 standard error after writing to it.
14235 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14236 (unblock_async_io, enable_async_io, disable_async_io)
14237 (readchar, getpkt): Update for Winsock support.
14238 (prepare_resume_reply): Expect a protocol signal number.
14239 * server.c: Disable <sys/wait.h> on mingw32.
14240 (start_inferior): Adjust for mingw32 support. Flush
14241 standard error after writing to it.
14242 (attach_inferior): Likewise. Use protocol signal
14243 numbers.
14244 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14245 and names.
14246 * win32-i386-low.c: New file.
14247 * Makefile.in (XM_CLIBS): Set.
14248 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14249 (win32-i386-low.o): New dependency rule.
14250 * linux-low.c (linux_wait): Use target signal numbers.
14251 * target.h (struct target_ops): Doc fix.
14252 * server.h (target_signal_to_name): New prototype.
14253 * gdbreplay.c: Don't include headers unconditionally which
14254 are missing on mingw32. Include <winsock.h> for mingw32.
14255 (remote_close, remote_open): Adjust for Winsock support.
14256 * configure, config.in: Regenerated.
14257
14258 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14259
14260 * server.c (decode_xfer_read, write_qxfer_response): New.
14261 (handle_query): Take a packet length argument. Handle
14262 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14263 the qSupported response.
14264 (main): Update call to handle_query.
14265
14266 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14267
14268 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14269 (putpkt_binary): Renamed from putpkt and adjusted for binary
14270 data.
14271 (putpkt): New wrapper for putpkt_binary.
14272 (readchar): Don't mask off the high bit.
14273 (decode_X_packet): New function.
14274 * server.c (main): Call putpkt_binary if a handler sets the packet
14275 length. Save the length of the incoming packet. Handle 'X'.
14276 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14277
14278 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14279
14280 * server.c (handle_query): Handle qSupported.
14281
14282 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14283
14284 * remote-utils.c (all_symbols_looked_up): New variable.
14285 (look_up_one_symbol): Check it.
14286 * server.h (look_up_one_symbol): New declaration.
14287 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14288
14289 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14290
14291 * Makefile.in (linux-arm-low.o): Update dependencies.
14292 * linux-arm-low.c: Include "gdb_proc_service.h".
14293 (PTRACE_GET_THREAD_AREA): Define.
14294 (ps_get_thread_area): New function.
14295
14296 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14297
14298 * configure.srv (m68k*-*-uclinux*): New target.
14299 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14300 (linux_resume_one_process): Remove extraneous cast.
14301 (linux_read_offsets): New.
14302 (linux_target_op): Add linux_read_offsets on mmuless systems.
14303 * server.c (handle_query): Add qOffsets logic.
14304 * target.h (struct target_ops): Add read_offsets.
14305
14306 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14307
14308 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14309 (PTRACE_GET_THREAD_AREA): Define.
14310 (ps_get_thread_area): New function.
14311 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14312 (linux-x86-64-low.o): Update.
14313
14314 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14315
14316 * configure.ac: Remove checks for prfpregset_t.
14317 * gdb_proc_service.h: New file.
14318 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14319 new "gdb_proc_service.h".
14320 * proc-service.c: Likewise.
14321 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14322 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14323 * Makefile.in (gdb_proc_service_h): Updated.
14324 * configure, config.in: Regenerated.
14325
14326 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * remote-utils.c (prepare_resume_reply): Move declaration
14329 of gdb_id_from_wait to the top of the block.
14330
14331 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * linux-low.c (regsets_store_inferior_registers): Read the regset
14334 from the target before filling it.
14335
14336 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14337
14338 * server.c (attach_inferior): Return SIGTRAP for a successful
14339 attach.
14340
14341 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14342
14343 * Makefile.in (OBS): Add version.o.
14344 (STAGESTUFF): Delete.
14345 (version.o): Add dependencies.
14346 (version.c): Replace rule.
14347 (clean): Remove version.c.
14348 * server.c (gdbserver_version): New.
14349 (gdbserver_usage): Use printf.
14350 (main): Handle --version and --help.
14351 * server.h (version, host_name): Add declarations.
14352
14353 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14354
14355 * linux-arm-low.c:
14356 * linux-arm-low.c:
14357 * inferiors.c:
14358 * i387-fp.h:
14359 * i387-fp.c:
14360 * gdbreplay.c:
14361 * regcache.c:
14362 * proc-service.c:
14363 * mem-break.h:
14364 * mem-break.c:
14365 * linux-x86-64-low.c:
14366 * linux-sh-low.c:
14367 * linux-s390-low.c:
14368 * linux-ppc64-low.c:
14369 * linux-ppc-low.c:
14370 * linux-mips-low.c:
14371 * linux-m68k-low.c:
14372 * linux-m32r-low.c:
14373 * linux-low.h:
14374 * linux-low.c:
14375 * linux-ia64-low.c:
14376 * linux-i386-low.c:
14377 * linux-crisv32-low.c:
14378 * thread-db.c:
14379 * terminal.h:
14380 * target.h:
14381 * target.c:
14382 * server.h:
14383 * server.c:
14384 * remote-utils.c:
14385 * regcache.h:
14386 * utils.c:
14387 * Makefile.in:
14388 * configure.ac:
14389 * gdbserver.1: Add (C) after Copyright. Update the FSF
14390 address.
14391
14392 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14393
14394 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14395 (arm_breakpoint_at): Recognize both breakpoints.
14396 (the_low_target): Use the correct breakpoint instruction.
14397
14398 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14399
14400 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14401 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14402 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14403 (the_low_target): Update.
14404
14405 2005-10-25 Andreas Schwab <schwab@suse.de>
14406
14407 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14408
14409 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14410 (ia64_num_regs): Reduce to 462.
14411
14412 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14413
14414 * acinclude.m4: Correct quoting.
14415 * aclocal.m4: Regenerated.
14416
14417 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14418 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14419 (thread_db_init): Call thread_db_err_str.
14420 * configure.ac: Check for TD_VERSION.
14421 * config.in, configure: Regenerated.
14422
14423 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14424
14425 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14426
14427 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14428
14429 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14430 is not available. Define HAVE_PTRACE_GETREGS if it is.
14431 * config.in, configure: Regenerated.
14432 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14433 * linux-i386-low.c, linux-m68k-low.c: Update to use
14434 HAVE_PTRACE_GETREGS.
14435 * linux-low.c (regsets_fetch_inferior_registers)
14436 (regsets_store_inferior_registers): Only return 0 if we processed
14437 GENERAL_REGS.
14438 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14439 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14440
14441 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14442
14443 * inferiors.c (struct thread_info): Add gdb_id.
14444 (add_thread): Add gdb_id argument.
14445 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14446 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14447 calls to add_thread.
14448 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14449 * server.c (handle_query): Use thread_to_gdb_id.
14450 (handle_v_cont, main): Use gdb_id_to_thread_id.
14451 * server.h (add_thread): Update prototype.
14452 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14453 prototypes.
14454
14455 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14456
14457 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14458 left-padded registers.
14459 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14460 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14461
14462 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14463
14464 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14465 * configure: Regenerate.
14466 * config.in: Regenerate.
14467 * server.h (NEED_DECLARATION_STRERROR):
14468 Replace with !HAVE_DECL_STRERROR.
14469
14470 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14471
14472 * linux-low.c (linux_wait, linux_send_signal): Don't test
14473 an unsigned long variable for > 0 if it could be MAX_ULONG.
14474 * server.c (myresume): Likewise.
14475 * target.c (set_desired_inferior): Likewise.
14476
14477 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14478
14479 * configure.ac: Simplify and improve check for socklen_t.
14480 * configure, config.in: Regenerate.
14481
14482 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14483
14484 * acconfig.h: Remove.
14485 * configure.ac: Add a test for socklen_t. Use three-argument
14486 AC_DEFINE throughout.
14487 * config.in: Regenerated using autoheader 2.59.
14488 * configure: Regenerated.
14489
14490 * gdbreplay.c (socklen_t): Provide a default.
14491 (remote_open): Use socklen_t.
14492 * remote-utils.c (socklen_t): Provide a default.
14493 (remote_open): Use socklen_t.
14494 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14495 unsigned char.
14496
14497 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14498 char for buffers.
14499 * linux-low.c (linux_read_memory, linux_write_memory)
14500 (linux_read_auxv): Likewise.
14501 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14502 (check_mem_write): Likewise.
14503 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14504 Likewise.
14505 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14506 (registers_from_string, register_data): Likewise.
14507 * server.c (handle_query, main): Likewise.
14508 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14509 (decode_M_packet): Likewise.
14510 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14511 * target.h (struct target_ops): Update read_memory, write_memory,
14512 and read_auxv.
14513 (read_inferior_memory, write_inferior_memory): Update.
14514 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14515 to unsigned char *.
14516 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14517 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14518 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14519 linux-s390-low.c, linux-sh-low.c: Update for changes in
14520 read_inferior_memory and the_low_target->breakpoint.
14521
14522 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14523
14524 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14525 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14526 * configure.srv: Add powerpc64-*-linux*.
14527 * linux-ppc64-low.c: New file.
14528
14529 2005-05-23 Orjan Friberg <orjanf@axis.com>
14530
14531 * linux-cris-low.c: New file with support for CRIS.
14532 * linux-crisv32-low.c: Ditto for CRISv32.
14533 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14534 (clean): Add reg-cris.c and reg-crisv32.c.
14535 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14536 reg-crisv32.o, and reg-crisv32.c to make rules.
14537 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14538 recognized targets.
14539
14540 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14541
14542 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14543 of sizeof (PTRACE_XFER_TYPE).
14544 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14545
14546 2005-05-12 Orjan Friberg <orjanf@axis.com>
14547
14548 * target.h (struct target_ops): Add insert_watchpoint,
14549 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14550 pointers for hardware watchpoint support.
14551 * linux-low.h (struct linux_target_ops): Ditto.
14552 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14553 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14554 to linux_target_ops.
14555 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14556 reply packet.
14557 * server.c (main): Recognize 'Z' and 'z' packets.
14558
14559 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14560
14561 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14562 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14563 (the_low_target): Add new members.
14564
14565 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14566
14567 * proc-service.c (ps_lgetregs): Search all_processes instead of
14568 all_threads.
14569
14570 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14571
14572 * server.c (start_inferior): Change return type to int.
14573 (attach_inferior): Change sigptr to int *.
14574 (handle_v_cont, handle_v_requests): Change signal to int *.
14575 (main): Change signal to int.
14576
14577 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14578
14579 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14580 * configure.srv: Add m32r*-*-linux*.
14581 * linux-m32r-low.c: New file.
14582
14583 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14584
14585 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14586
14587 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14588
14589 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14590 Take unsigned long arguments for PIDs.
14591 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14592 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14593 (wait_for_sigstop, linux_resume_one_process)
14594 (regsets_fetch_inferior_registers, linux_send_signal)
14595 (linux_read_auxv): Likewise. Update the types of variables holding
14596 PIDs. Update format string specifiers.
14597 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14598 * remote-utils.c (prepare_resume_reply): Likewise.
14599 * server.c (cont_thread, general_thread, step_thread)
14600 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14601 unsigned long.
14602 (handle_query): Update format specifiers.
14603 (handle_v_cont, main): Use strtoul for thread IDs.
14604 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14605 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14606 (general_thread, step_thread, thread_from_wait)
14607 (old_thread_from_wait): Update.
14608 * target.h (struct thread_resume): Use unsigned long for THREAD.
14609 (struct target_ops): Use unsigned long for arguments to attach and
14610 thread_alive.
14611
14612 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14613
14614 * acinclude.m4: Include bfd/bfd.m4 directly.
14615 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14616 <agriffis@toolchain.org>.
14617 * aclocal.m4, configure: Regenerated.
14618
14619 2005-01-07 Andrew Cagney <cagney@gnu.org>
14620
14621 * configure.ac: Rename configure.in, require autoconf 2.59.
14622 * configure: Re-generate.
14623
14624 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14625
14626 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14627 LIBS when finished.
14628 * aclocal.m4: Regenerated.
14629 * configure: Regenerated.
14630
14631 2004-11-21 Andreas Schwab <schwab@suse.de>
14632
14633 * linux-m68k-low.c (m68k_num_gregs): Define.
14634 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14635 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14636 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14637 (m68k_breakpoint_at): New. Add to the_low_target.
14638
14639 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14640 srv_linux_thread_db to yes.
14641
14642 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14643
14644 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14645 (ARCH_SET_FS): Likewise.
14646 (ARCH_GET_FS): Likewise.
14647 (ARCH_GET_GS): Likewise.
14648
14649 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14650
14651 * linux-i386-low.c (ps_get_thread_area): New.
14652 * linux-x86-64-low.c (ps_get_thread_area): New.
14653 * linux-low.c: Include <sys/syscall.h>.
14654 (linux_kill_one_process): Don't kill the first thread here.
14655 (linux_kill): Kill the first thread here.
14656 (kill_lwp): New function.
14657 (send_sigstop, linux_send_signal): Use it.
14658 * proc-service.c: Clean up #ifdefs.
14659 (fpregset_info): Delete.
14660 (ps_lgetregs): Update and enable implementation.
14661 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14662 implementations.
14663 * remote-utils.c (struct sym_cache, symbol_cache): New.
14664 (input_interrupt): Print a clearer message.
14665 (async_io_enabled): New variable.
14666 (enable_async_io, disable_async_io): Use it. Update comments.
14667 (look_up_one_symbol): Use the symbol cache.
14668 * thread-db.c (thread_db_look_up_symbols): New function.
14669 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14670
14671 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14672
14673 * configure.in: Test for -rdynamic.
14674 * configure: Regenerated.
14675 * Makefile (INTERNAL_LDFLAGS): New.
14676 (gdbserver, gdbreplay): Use it.
14677
14678 2004-09-02 Andrew Cagney <cagney@gnu.org>
14679
14680 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14681
14682 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14683
14684 * linux-low.c (linux_wait): Clear all_processes list also.
14685
14686 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14687
14688 * linux-low.c: Include <errno.h>. Remove extern declaration of
14689 errno.
14690
14691 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14692
14693 * gdbreplay.c, server.h, utils.c: Update copyright years.
14694
14695 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14696
14697 * server.c (main): Print child status or termination signal from
14698 variable 'signal', not 'sig'.
14699
14700 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14701
14702 * linux-low.c (linux_read_memory): Change return type to
14703 int. Check for and return error from ptrace().
14704 * target.c (read_inferior_memory): Change return type to int. Pass
14705 back return status from the_target->read_memory().
14706 * target.h (struct target_ops): Adapt *read_memory() prototype.
14707 Update comment.
14708 (read_inferior_memory): Adapt prototype.
14709 * server.c (main): Return an error packet if
14710 read_inferior_memory() returns an error.
14711
14712 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14713
14714 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14715 Unify with other clean targets.
14716
14717 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14718
14719 * server.c (handle_v_cont): Call set_desired_inferior.
14720
14721 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14722
14723 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14724
14725 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14726
14727 * linux-low.c (linux_wait): Unblock async I/O.
14728 (linux_resume): Block and enable async I/O.
14729 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14730 * server.h (block_async_io, unblock_async_io): Add prototypes.
14731
14732 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14733
14734 * remote-utils.c (remote_open): Print a status notice after
14735 opening a TCP port.
14736 * server.c (attach_inferior): Print a status notice after
14737 attaching.
14738
14739 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14740
14741 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14742
14743 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14744
14745 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14746 error packet.
14747 * server.c, target.h: Update copyright years.
14748
14749 2004-02-25 Roland McGrath <roland@redhat.com>
14750
14751 * target.h (struct target_ops): New member `read_auxv'.
14752 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14753 * linux-low.c (linux_read_auxv): New function.
14754 (linux_target_ops): Initialize `read_auxv' member to that.
14755
14756 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14757
14758 Committed by Jim Blandy <jimb@redhat.com>.
14759
14760 * linux-s390-low.c (s390_num_regs): Update.
14761 (s390_regmap): Remove control registers. Use __s390x__ predefine
14762 instead of GPR_SIZE to distiguish s390 and s390x targets.
14763
14764 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14765
14766 * linux-low.c: Update copyright year.
14767 (check_removed_breakpoint): Clear pending_is_breakpoint.
14768 (linux_set_resume_request, linux_queue_one_thread)
14769 (resume_status_pending_p): New functions.
14770 (linux_continue_one_thread): Use process->resume.
14771 (linux_resume): Only resume threads if there are no pending events.
14772 * linux-low.h (struct process_info): Add resume request
14773 pointer.
14774
14775 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14776
14777 * regcache.c (new_register_cache): Clear the allocated register
14778 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14779
14780 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14781
14782 * linux-low.c (linux_resume): Take a struct thread_resume *
14783 argument.
14784 (linux_wait): Update call.
14785 (resume_ptr): New static variable.
14786 (linux_continue_one_thread): Renamed from
14787 linux_continue_one_process. Use resume_ptr.
14788 (linux_resume): Use linux_continue_one_thread.
14789 * server.c (handle_v_cont, handle_v_requests): New functions.
14790 (myresume): New function.
14791 (main): Handle 'v' case.
14792 * target.h (struct thread_resume): New type.
14793 (struct target_ops): Change argument of "resume" to struct
14794 thread_resume *.
14795 (myresume): Delete macro.
14796
14797 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14798
14799 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14800 (uninstall): Support DESTDIR.
14801
14802 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14803
14804 * configure.srv: Add xscale*linux copy of arm*linux entry.
14805
14806 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14807
14808 * linux-arm-low.c (arm_reinsert_addr): New function.
14809 (the_low_target): Add arm_reinsert_addr.
14810
14811 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14812
14813 * mem-break.c: Remove whitespace at end of file.
14814
14815 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14816
14817 * configure.in: Check whether we need to prototype strerror.
14818 * server.h: Optionally prototype strerror.
14819 * gdbreplay.c (perror_with_name): Use strerror.
14820 * linux-low.c (linux_attach_lwp): Use strerror.
14821 * utils.c (perror_with_name): Use strerror.
14822 * config.in, configure: Regenerated.
14823
14824 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14825
14826 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14827 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14828
14829 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14830
14831 * Makefile.in (SFILES): Update.
14832 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14833 low-sun3.c: Remove files.
14834
14835 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14836
14837 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14838 (linux_detach_one_process, linux_detach): New functions.
14839 (linux_target_ops): Add linux_detach.
14840 * server.c (main): Handle 'D' packet.
14841 * target.h (struct target_ops): Add "detach" member.
14842 (detach_inferior): Define.
14843
14844 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14845
14846 From Kelley Cook <kelleycook@wideopenwest.com>:
14847 * configure.srv: Accept i[34567]86 variants.
14848
14849 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14850
14851 * linux-low.c (linux_wait_for_event): Correct comment typos.
14852 (linux_resume_one_process): Call check_removed_breakpoint.
14853 (linux_send_signal): New function.
14854 (linux_target_ops): Add linux_send_signal.
14855 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14856 of kill.
14857 * target.h (struct target_ops): Add send_signal.
14858
14859 2003-05-29 Jim Blandy <jimb@redhat.com>
14860
14861 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14862 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14863 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14864 away part of the register's value.
14865
14866 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14867
14868 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14869 (linux_wait_for_event, linux_init_signals): Likewise.
14870
14871 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14872
14873 * configure.in: Check for stdlib.h.
14874 * configure: Regenerated.
14875 * config.in: Regenerated.
14876
14877 2003-01-04 Andreas Schwab <schwab@suse.de>
14878
14879 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14880
14881 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14882
14883 * Makefile.in: Remove obsolete code.
14884
14885 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14886
14887 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14888 defined(PT_FPR0_HI).
14889
14890 2002-11-17 Stuart Hughes <seh@zee2.com>
14891
14892 * linux-arm-low.c (arm_num_regs): Increase.
14893 (arm_regmap): Include status register.
14894
14895 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14896
14897 * linux-low.c (register_addr): Remove incorrect -1 check.
14898
14899 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14900
14901 * linux-low.c (linux_create_inferior): Call setpgid. Return
14902 the new PID.
14903 (unstopped_p, linux_signal_pid): Remove.
14904 (linux_target_ops): Remove linux_signal_pid.
14905 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14906 global instead of target method.
14907 * target.h (struct target_ops): Remove signal_pid. Update comment
14908 for create_inferior.
14909 * server.c (signal_pid): New variable.
14910 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14911 gdbserver. Set the child to be the foreground process group.
14912 (attach_inferior): Set signal_pid.
14913
14914 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14915
14916 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14917
14918 2002-08-20 Jim Blandy <jimb@redhat.com>
14919
14920 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14921 default for this.
14922
14923 2002-08-01 Andrew Cagney <cagney@redhat.com>
14924
14925 * Makefile.in: Make chill references obsolete.
14926
14927 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14928
14929 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14930 * configure: Regenerate.
14931 * config.in: Regenerate.
14932
14933 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14934
14935 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14936 (perror_with_name, remote_close, remote_open, expect, play): Static.
14937
14938 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14939
14940 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14941 byte offsets instead of an array of indexes.
14942 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14943
14944 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14945
14946 * regcache.c: Add comment.
14947
14948 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14949
14950 * thread-db.c: New file.
14951 * proc-service.c: New file.
14952 * acinclude.m4: New file.
14953 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14954 proc-service.o, and thread-db.o.
14955 (linux-low.o): Add USE_THREAD_DB.
14956 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14957 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14958 * aclocal.m4: Regenerated.
14959 * config.in: Regenerated.
14960 * configure: Regenerated.
14961 * configure.in: Check for proc_service.h, sys/procfs.h,
14962 thread_db.h, and linux/elf.h headrs.
14963 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14964 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14965 Check for -lthread_db and thread support.
14966 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14967 PowerPC, and SuperH.
14968 * i387-fp.c: Constify arguments.
14969 * i387-fp.h: Likewise.
14970 * inferiors.c: (struct thread_info): Renamed from
14971 `struct inferior_info'. Remove PID member. Use generic inferior
14972 list header. All uses updated.
14973 (inferiors, signal_pid): Removed.
14974 (all_threads): New variable.
14975 (get_thread): Define.
14976 (add_inferior_to_list): New function.
14977 (for_each_inferior): New function.
14978 (change_inferior_id): New function.
14979 (add_inferior): Removed.
14980 (remove_inferior): New function.
14981 (add_thread): New function.
14982 (free_one_thread): New function.
14983 (remove_thread): New function.
14984 (clear_inferiors): Use for_each_inferior and free_one_thread.
14985 (find_inferior): New function.
14986 (find_inferior_id): New function.
14987 (inferior_target_data): Update argument type.
14988 (set_inferior_target_data): Likewise.
14989 (inferior_regcache_data): Likewise.
14990 (set_inferior_regcache_data): Likewise.
14991 * linux-low.c (linux_bp_reinsert): Remove.
14992 (all_processes, stopping_threads, using_thrads)
14993 (struct pending_signals, debug_threads, pid_of): New.
14994 (inferior_pid): Replace with macro.
14995 (struct inferior_linux_data): Remove.
14996 (get_stop_pc, add_process): New functions.
14997 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14998 Use add_process and add_thread.
14999 (linux_attach_lwp): New function, based on old linux_attach. Use
15000 add_process and add_thread. Set stop_expected for new threads.
15001 (linux_attach): New function.
15002 (linux_kill_one_process): New function.
15003 (linux_kill): Kill all LWPs.
15004 (linux_thread_alive): Use find_inferior_id.
15005 (check_removed_breakpoints, status_pending_p): New functions.
15006 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15007 Update. Use WNOHANG. Wait for cloned processes also. Update process
15008 struct for the found process.
15009 (linux_wait_for_event): New function.
15010 (linux_wait): Use it. Support LWPs.
15011 (send_sigstop, wait_for_sigstop, stop_all_processes)
15012 (linux_resume_one_process, linux_continue_one_process): New functions.
15013 (linux_resume): Support LWPs.
15014 (REGISTER_RAW_SIZE): Remove.
15015 (fetch_register): Use register_size instead. Call supply_register.
15016 (usr_store_inferior_registers): Likewise. Call collect_register.
15017 Fix recursive case.
15018 (regsets_fetch_inferior_registers): Improve error message.
15019 (regsets_store_inferior_registers): Add debugging.
15020 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15021 (unstopped_p, linux_signal_pid): New functions.
15022 (linux_target_ops): Add linux_signal_pid.
15023 (linux_init_signals): New function.
15024 (initialize_low): Call it. Initialize using_threads.
15025 * regcache.c (inferior_regcache_data): Add valid
15026 flag.
15027 (get_regcache): Fetch registers lazily. Add fetch argument
15028 and update all callers.
15029 (regcache_invalidate_one, regcache_invalidate): New
15030 functions.
15031 (new_register_cache): Renamed from create_register_cache.
15032 Return the new regcache.
15033 (free_register_cache): Change argument to a void *.
15034 (registers_to_string, registers_from_string): Call get_regcache
15035 with fetch flag set.
15036 (register_data): Make static. Pass fetch flag to get_regcache.
15037 (supply_register): Call get_regcache with fetch flag clear.
15038 (collect_register): Call get_regcache with fetch flag set.
15039 (collect_register_as_string): New function.
15040 * regcache.h: Update.
15041 * remote-utils.c (putpkt): Flush after debug output and use
15042 stderr.
15043 Handle input interrupts while waiting for an ACK.
15044 (input_interrupt): Use signal_pid method.
15045 (getpkt): Flush after debug output and use stderr.
15046 (outreg): Use collect_register_as_string.
15047 (new_thread_notify, dead_thread_notify): New functions.
15048 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15049 and general_thread.
15050 (look_up_one_symbol): Flush after debug output.
15051 * server.c (step_thread, server_waiting): New variables.
15052 (start_inferior): Don't use signal_pid. Update call to mywait.
15053 (attach_inferior): Update call to mywait.
15054 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15055 (main): Don't fetch/store registers explicitly. Use
15056 set_desired_inferior. Support proposed ``Hs'' packet. Update
15057 calls to mywait.
15058 * server.h: Update.
15059 (struct inferior_list, struct_inferior_list_entry): New.
15060 * target.c (set_desired_inferior): New.
15061 (write_inferior_memory): Constify.
15062 (mywait): New function.
15063 * target.h: Update.
15064 (struct target_ops): New signal_pid method.
15065 (mywait): Removed macro, added prototype.
15066
15067 * linux-low.h (regset_func): Removed.
15068 (regset_fill_func, regset_store_func): New.
15069 (enum regset_type): New.
15070 (struct regset_info): Add type field. Use new operation types.
15071 (struct linux_target_ops): stop_pc renamed to get_pc.
15072 Add decr_pc_after_break and breakpoint_at.
15073 (get_process, get_thread_proess, get_process_thread)
15074 (strut process_info, all_processes, linux_attach_lwp)
15075 (thread_db_init): New.
15076
15077 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15078 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15079 (the_low_target): Add new members.
15080 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15081 (i386_store_fpxregset): Constify.
15082 (target_regsets): Add new kind identifier.
15083 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15084 (i386_set_pc): Add debugging.
15085 (i386_breakpoint_at): New function.
15086 (the_low_target): Add new members.
15087 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15088 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15089 (mips_breakpoint_at): New.
15090 (the_low_target): Add new members.
15091 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15092 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15093 (the_low_target): Add new members.
15094 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15095 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15096 (the_low_target): Add new members.
15097 * linux-x86-64-low.c (target_regsets): Add new kind
15098 identifier.
15099
15100 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15101
15102 From Martin Pool <mbp@samba.org>:
15103 * server.c (gdbserver_usage): New function.
15104 (main): Call it.
15105
15106 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15107
15108 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15109 stop_at -> stop_pc.
15110
15111 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15112
15113 * Makefile.in: Remove obsolete code.
15114
15115 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15116
15117 * linux-low.c (regsets_fetch_inferior_registers),
15118 (regsets_store_inferior_registers): Removed cast to int from
15119 ptrace() calls.
15120 * regcache.h: Added declaration of struct inferior_info.
15121
15122 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15123
15124 * inferiors.c (struct inferior_info): Add regcache_data.
15125 (add_inferior): Call create_register_cache.
15126 (clear_inferiors): Call free_register_cache.
15127 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15128 * regcache.c (struct inferior_regcache_data): New.
15129 (registers): Remove.
15130 (get_regcache): New function.
15131 (create_register_cache, free_register_cache): New functions.
15132 (set_register_cache): Don't initialize the register cache here.
15133 (registers_to_string, registers_from_string, register_data): Call
15134 get_regcache.
15135 * regcache.h: Add prototypes.
15136 * server.h: Likewise.
15137
15138 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15139
15140 * mem-break.c: New file.
15141 * mem-break.h: New file.
15142 * Makefile.in: Add mem-break.o rule; update server.h
15143 dependencies.
15144 * inferiors.c (struct inferior_info): Add target_data
15145 member.
15146 (clear_inferiors): Free target_data member if set.
15147 (inferior_target_data, set_inferior_target_data): New functions.
15148 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15149 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15150 * linux-low.c (linux_bp_reinsert): New variable.
15151 (struct inferior_linux_data): New.
15152 (linux_create_inferior): Use set_inferior_target_data.
15153 (linux_attach): Likewise. Call add_inferior.
15154 (linux_wait_for_one_inferior): New function.
15155 (linux_wait): Call it.
15156 (linux_write_memory): Add const.
15157 (initialize_low): Call set_breakpoint_data.
15158 * linux-low.h (struct linux_target_ops): Add breakpoint
15159 handling members.
15160 * server.c (attach_inferior): Remove extra add_inferior
15161 call.
15162 * server.h: Include mem-break.h. Update inferior.c
15163 prototypes.
15164 * target.c (read_inferior_memory)
15165 (write_inferior_memory): New functions.
15166 * target.h (read_inferior_memory)
15167 (write_inferior_memory): Change macros to prototypes.
15168 (struct target_ops): Update comments. Add const to write_memory
15169 definition.
15170
15171 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15172
15173 * linux-low.c (usr_store_inferior_registers): Support
15174 registers which are allowed to fail to store.
15175 * linux-low.h (linux_target_ops): Likewise.
15176 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15177 (ppc_cannot_store_register): FPSCR may not be storable.
15178
15179 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15180
15181 * server.h: Include <string.h> if HAVE_STRING_H.
15182 * ChangeLog: Correct paths in last ChangeLog entry.
15183
15184 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15185
15186 * linux-low.h: Remove obsolete prototypes.
15187 (struct linux_target_ops): New.
15188 (extern the_low_target): New.
15189 * linux-low.c (num_regs, regmap): Remove declarations.
15190 (register_addr): Use the_low_target explicitly.
15191 (fetch_register): Likewise.
15192 (usr_fetch_inferior_registers): Likewise.
15193 (usr_store_inferior_registers): Likewise.
15194 * linux-arm-low.c (num_regs): Remove.
15195 (arm_num_regs): Define.
15196 (arm_regmap): Renamed from regmap, made static.
15197 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15198 made static.
15199 (arm_cannot_store_register): Renamed from cannot_store_register,
15200 made static.
15201 (the_low_target): New.
15202 * linux-i386-low.c (num_regs): Remove.
15203 (i386_num_regs): Define.
15204 (i386_regmap): Renamed from regmap, made static.
15205 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15206 made static.
15207 (i386_cannot_store_register): Renamed from cannot_store_register,
15208 made static.
15209 (the_low_target): New.
15210 * linux-ia64-low.c (num_regs): Remove.
15211 (ia64_num_regs): Define.
15212 (ia64_regmap): Renamed from regmap, made static.
15213 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15214 made static.
15215 (ia64_cannot_store_register): Renamed from cannot_store_register,
15216 made static.
15217 (the_low_target): New.
15218 * linux-m68k-low.c (num_regs): Remove.
15219 (m68k_num_regs): Define.
15220 (m68k_regmap): Renamed from regmap, made static.
15221 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15222 made static.
15223 (m68k_cannot_store_register): Renamed from cannot_store_register,
15224 made static.
15225 (the_low_target): New.
15226 * linux-mips-low.c (num_regs): Remove.
15227 (mips_num_regs): Define.
15228 (mips_regmap): Renamed from regmap, made static.
15229 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15230 made static.
15231 (mips_cannot_store_register): Renamed from cannot_store_register,
15232 made static.
15233 (the_low_target): New.
15234 * linux-ppc-low.c (num_regs): Remove.
15235 (ppc_num_regs): Define.
15236 (ppc_regmap): Renamed from regmap, made static.
15237 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15238 made static.
15239 (ppc_cannot_store_register): Renamed from cannot_store_register,
15240 made static.
15241 (the_low_target): New.
15242 * linux-s390-low.c (num_regs): Remove.
15243 (s390_num_regs): Define.
15244 (s390_regmap): Renamed from regmap, made static.
15245 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15246 made static.
15247 (s390_cannot_store_register): Renamed from cannot_store_register,
15248 made static.
15249 (the_low_target): New.
15250 * linux-sh-low.c (num_regs): Remove.
15251 (sh_num_regs): Define.
15252 (sh_regmap): Renamed from regmap, made static.
15253 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15254 made static.
15255 (sh_cannot_store_register): Renamed from cannot_store_register,
15256 made static.
15257 (the_low_target): New.
15258 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15259 (the_low_target): New.
15260
15261 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15262
15263 * Makefile.in: Add stamp-h target.
15264 * configure.in: Create stamp-h.
15265 * configure: Regenerated.
15266
15267 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15268
15269 * inferiors.c: New file.
15270 * target.c: New file.
15271 * target.h: New file.
15272 * Makefile.in: Add target.o and inferiors.o. Update
15273 dependencies.
15274 * linux-low.c (inferior_pid): New static variable,
15275 moved from server.c.
15276 (linux_create_inferior): Renamed from create_inferior.
15277 Call add_inferior. Return 0 on success instead of a PID.
15278 (linux_attach): Renamed from myattach.
15279 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15280 (linux_thread_alive): Renamed from mythread_alive.
15281 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15282 child dies.
15283 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15284 (regsets_store_inferior_registers): Correct error message.
15285 Add missing ``return 0''.
15286 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15287 (linux_store_registers): Renamed from store_inferior_registers.
15288 (linux_read_memory): Renamed from read_inferior_memory.
15289 (linux_write_memory): Renamed from write_inferior_memory.
15290 (linux_target_ops): New structure.
15291 (initialize_low): Call set_target_ops ().
15292 * remote-utils.c (unhexify): New function.
15293 (hexify): New function.
15294 (input_interrupt): Send signals to ``signal_pid''.
15295 * server.c (inferior_pid): Remove.
15296 (start_inferior): Update create_inferior call.
15297 (attach_inferior): Call add_inferior.
15298 (handle_query): New function.
15299 (main): Call handle_query for `q' packets.
15300 * server.h: Include "target.h". Remove obsolete prototypes.
15301 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15302
15303 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15304
15305 * Makefile.in: Add WARN_CFLAGS. Update configury
15306 dependencies.
15307 * configure.in: Check for <string.h>
15308 * configure: Regenerate.
15309 * config.in: Regenerate.
15310 * gdbreplay.c: Include needed system headers.
15311 (remote_open): Remove strchr prototype.
15312 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15313 * regcache.c (supply_register): Change buf argument to const void *.
15314 (supply_register_by_name): Likewise.
15315 (collect_register): Change buf argument to void *.
15316 (collect_register_by_name): Likewise.
15317 * regcache.h: Add missing prototypes.
15318 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15319 * server.c (handle_query): New function.
15320 (attached): New static variable, moved out of main.
15321 (main): Quiet longjmp clobber warnings.
15322 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15323 * utils.c (error): Remove NORETURN.
15324 (fatal): Likewise.
This page took 0.381752 seconds and 4 git commands to generate.