[GDBserver] Shorten srv_i386_linux_xmlfiles
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv (srv_i386_linux_xmlfiles): Remove
4 i386/i386-XXX-linux.xml from it.
5
6 2017-09-05 Yao Qi <yao.qi@linaro.org>
7
8 * configure.srv: Set srv_i386_linux_regobj empty if $development
9 is false.
10 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
11 initialize_low_tdesc.
12 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
13 with #if initialize_low_tdesc.
14 * linux-x86-tdesc-selftest.c: New file.
15 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
16
17 2017-09-05 Yao Qi <yao.qi@linaro.org>
18
19 * Makefile.in (arch-i386.o): New rule.
20 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
21 (x86_64-*-linux*): Likewise.
22 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
23 include arch/i386.h.
24 (i386_linux_read_description): Remove code and call
25 i386_create_target_description.
26 * tdesc.c (allocate_target_description): New function.
27 * tdesc.h (set_tdesc_architecture): Remove declaration.
28 (set_tdesc_osabi): Likewise.
29
30 2017-09-05 Yao Qi <yao.qi@linaro.org>
31
32 * linux-x86-tdesc.c: Don't include <inttypes.h>.
33 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
34 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
35 .xmltarget.
36 * server.c (get_features_xml): Call tdesc_get_features_xml.
37 * tdesc.c (set_tdesc_architecture): New function.
38 (set_tdesc_osabi): New function.
39 (tdesc_get_features_xml): New function.
40 (tdesc_create_feature): Add an argument.
41 * tdesc.h (struct target_desc) <features>: New field.
42 <arch, osabi>: New field.
43 (~target_desc): xfree features, arch, and osabi.
44 (target_desc::oerator==): Don't compare .xmltarget.
45 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
46 (set_tdesc_osabi): Likewise.
47 (tdesc_get_features_xml): Likewise.
48
49 2017-09-05 Yao Qi <yao.qi@linaro.org>
50
51 * linux-x86-tdesc.c: Include selftest.h.
52 (i386_tdesc_test): New function.
53 (initialize_low_tdesc): Call selftests::register_test.
54 * tdesc.h: Include regdef.h.
55 (target_desc): Override operator == and !=.
56
57 2017-09-05 Yao Qi <yao.qi@linaro.org>
58
59 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
60 (ipa_obj): Likewise.
61 * linux-i386-ipa.c: Include common/x86-xstate.h
62 (get_ipa_tdesc): Call i386_linux_read_description.
63 (initialize_low_tracepoint): Don't call init_registers_XXX
64 functions, call initialize_low_tdesc instead.
65 * linux-x86-low.c (x86_linux_read_description): Call
66 i386_linux_read_description.
67 (initialize_low_arch): Don't call init_registers_i386_XXX
68 functions, call initialize_low_tdesc.
69 * linux-x86-tdesc.c: New file.
70 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
71 (i386_get_ipa_tdesc_idx): Declare.
72 (i386_get_ipa_tdesc): Declare.
73 (initialize_low_tdesc): Declare.
74
75 2017-09-05 Yao Qi <yao.qi@linaro.org>
76
77 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
78 instead of 0.
79
80 2017-09-05 Yao Qi <yao.qi@linaro.org>
81
82 * Makefile.in (IPA_OBJS): Add vec-ipa.o
83 * regcache.c (get_thread_regcache): Use VEC_length.
84 (init_register_cache): Likewise.
85 (regcache_cpy): Likewise.
86 (registers_to_string): Iterate reg_defs via VEC_iterate.
87 (find_regno): Likewise.
88 (find_register_by_number): Use VEC_index.
89 (register_size): Call find_register_by_number.
90 (register_data): Call find_register_by_number.
91 (supply_regblock): Use VEC_length.
92 (regcache_raw_read_unsigned): Likewise.
93 * tdesc.c (init_target_desc): Iterate reg_defs via
94 VEC_iterate.
95 (default_description): Update initializer.
96 (copy_target_description): Don't update field num_registers.
97 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
98 <num_registers>: Remove.
99
100 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
101
102 * Makefile.in (.SECONDARY): Define target.
103
104 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
105
106 * linux-low.c (linux_wait_1): Adjust.
107 * server.c (queue_stop_reply_callback): Adjust.
108
109 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
110
111 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
112 QEnvironmentUnset and QEnvironmentReset packets.
113 (handle_query): Inform remote that QEnvironmentHexEncoded,
114 QEnvironmentUnset and QEnvironmentReset are supported.
115
116 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
117
118 * inferiors.h (inferior_target_data): Rename to ...
119 (thread_target_data): ... this.
120 (inferior_regcache_data): Rename to ...
121 (thread_regcache_data): ... this.
122 (set_inferior_regcache_data): Rename to ...
123 (set_thread_regcache_data): ... this.
124 * inferiors.c (inferior_target_data): Rename to ...
125 (thread_target_data): ... this.
126 (inferior_regcache_data): Rename to ...
127 (thread_regcache_data): ... this.
128 (set_inferior_regcache_data): Rename to ...
129 (set_thread_regcache_data): ... this.
130 (free_one_thread): Update.
131 * linux-low.h (get_thread_lwp): Update.
132 * regcache.c (get_thread_regcache): Update.
133 (regcache_invalidate_thread): Update.
134 (free_register_cache_thread): Update.
135 * win32-i386-low.c (update_debug_registers_callback): Update.
136 (win32_get_current_dr): Update.
137 * win32-low.c (thread_rec): Update.
138 (delete_thread_info): Update.
139 (continue_one_thread): Update.
140 (suspend_one_thread): Update.
141
142 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
143
144 * inferiors.c (set_inferior_target_data): Remove.
145 * inferiors.h (set_inferior_target_data): Remove.
146
147 2017-08-18 Yao Qi <yao.qi@linaro.org>
148
149 * Makefile.in (OBS): Add selftest.o.
150 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
151 * configure, config.in: Re-generated.
152 * server.c: Include common/sefltest.h.
153 (captured_main): Handle option --selftest.
154
155 2017-08-09 Yao Qi <yao.qi@linaro.org>
156
157 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
158 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
159 i386-avx-mpx.o and i386-mmx.o.
160 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
161 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
162 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
163 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
164 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
165 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
166 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
167 i386/amd64-avx-mpx.xml.
168
169 2017-08-09 Yao Qi <yao.qi@linaro.org>
170
171 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
172 and x32-avx-avx512.o.
173 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
174 i386/x32-avx-avx512.xml.
175
176 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
177
178 * tracepoint.h (enum class fast_tpoint_collect_result): New
179 enumeration.
180 (fast_tracepoint_collecting): Change return type to
181 fast_tpoint_collect_result.
182 * tracepoint.c (fast_tracepoint_collecting): Likewise.
183 * linux-low.h: Include tracepoint.h.
184 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
185 fast_tpoint_collect_result.
186 * linux-low.c (handle_tracepoints): Adjust.
187 (linux_fast_tracepoint_collecting): Change return type to
188 fast_tpoint_collect_result.
189 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
190 linux_wait_1, stuck_in_jump_pad_callback,
191 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
192 proceed_one_lwp): Adjust to type change.
193
194 2017-07-10 Yao Qi <yao.qi@linaro.org>
195
196 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
197
198 2017-06-29 Yao Qi <yao.qi@linaro.org>
199
200 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
201 Remove.
202 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
203
204 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
205
206 * Makefile.in (IPA_OBJS): Sort and format one item per line.
207
208 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
209
210 * linux-low.c (linux_create_inferior): Adjust code to access the
211 environment information via 'gdb_environ' class.
212 * lynx-low.c (lynx_create_inferior): Likewise.
213 * server.c (our_environ): Make it an instance of 'gdb_environ'.
214 (get_environ): Return a pointer to 'our_environ'.
215 (captured_main): Initialize 'our_environ'.
216 * server.h (get_environ): Adjust prototype.
217 * spu-low.c (spu_create_inferior): Adjust code to access the
218 environment information via 'gdb_environ' class.
219
220 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
221
222 * linux-low.c (linux_read_memory, linux_write_memory): Remove
223 usage of "register" keyword.
224
225 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
226
227 * configure: Re-generate.
228
229 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
230
231 * configure: Re-generate.
232
233 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
234
235 * Makefile.in (COMPILE.pre): Add "-x c++".
236
237 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
238
239 * fork-child.c: Conditionally include <signal.h>.
240
241 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
242
243 * server.c (handle_general_set): Handle new packet
244 "QStartupWithShell".
245 (handle_query): Add "QStartupWithShell" to the list of supported
246 packets.
247 (gdbserver_usage): Add help text explaining the
248 new "--startup-with-shell" and "--no-startup-with-shell" CLI
249 options.
250 (captured_main): Recognize and act upon the presence of the new
251 CLI options.
252
253 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
254 Pedro Alves <palves@redhat.com>
255
256 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
257 * configure: Regenerate.
258 * configure.srv (srv_linux_obj): Add "fork-child.o" and
259 "fork-inferior.o".
260 (i[34567]86-*-lynxos*): Likewise.
261 (spu*-*-*): Likewise.
262 * fork-child.c: New file.
263 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
264 and "environ.h".
265 (linux_ptrace_fun): New function.
266 (linux_create_inferior): Adjust function prototype to reflect
267 change on "target.h". Adjust function code to use
268 "fork_inferior".
269 (linux_request_interrupt): Delete "signal_pid".
270 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
271 (lynx_ptrace_fun): New function.
272 (lynx_create_inferior): Adjust function prototype to reflect
273 change on "target.h". Adjust function code to use
274 "fork_inferior".
275 * nto-low.c (nto_create_inferior): Adjust function prototype and
276 code to reflect change on "target.h". Update comments.
277 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
278 "common-terminal.h" and "environ.h".
279 (terminal_fd): Moved to fork-child.c.
280 (old_foreground_pgrp): Likewise.
281 (restore_old_foreground_pgrp): Likewise.
282 (last_status): Make it global.
283 (last_ptid): Likewise.
284 (our_environ): New variable.
285 (startup_with_shell): Likewise.
286 (program_name): Likewise.
287 (program_argv): Rename to...
288 (program_args): ...this.
289 (wrapper_argv): New variable.
290 (start_inferior): Delete function.
291 (get_exec_wrapper): New function.
292 (get_exec_file): Likewise.
293 (get_environ): Likewise.
294 (prefork_hook): Likewise.
295 (post_fork_inferior): Likewise.
296 (postfork_hook): Likewise.
297 (postfork_child_hook): Likewise.
298 (handle_v_run): Update code to deal with arguments coming from the
299 remote host. Update calls from "start_inferior" to
300 "create_inferior".
301 (captured_main): Likewise. Initialize environment variable. Call
302 "have_job_control".
303 * server.h (post_fork_inferior): New prototype.
304 (get_environ): Likewise.
305 (last_status): Declare.
306 (last_ptid): Likewise.
307 (signal_pid): Likewise.
308 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
309 (spu_ptrace_fun): New function.
310 (spu_create_inferior): Adjust function prototype to reflect change
311 on "target.h". Adjust function code to use "fork_inferior".
312 * target.c (target_terminal_init): New function.
313 (target_terminal_inferior): Likewise.
314 (target_terminal_ours): Likewise.
315 * target.h: Include <vector>.
316 (struct target_ops) <create_inferior>: Update prototype.
317 (create_inferior): Update macro.
318 * utils.c (gdb_flush_out_err): New function.
319 * win32-low.c (win32_create_inferior): Adjust function prototype
320 and code to reflect change on "target.h".
321
322 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
323
324 * inferiors.c (switch_to_thread): New function.
325
326 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
327
328 * Makefile.in (SFILE): Add "common/job-control.c".
329 (OBS): Add "job-control.o".
330
331 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
332
333 * Makefile: Remove "@host_makefile_frag@".
334
335 2017-05-05 Pedro Alves <palves@redhat.com>
336
337 * configure: Regenerate.
338
339 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
340
341 * configure: Regenerate.
342
343 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
344
345 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
346 software_single_step change of return type to
347 std::vector<CORE_ADDR>.
348 * linux-low.c (install_software_single_step_breakpoints):
349 Likewise.
350 * linux-low.h (install_software_single_step_breakpoints):
351 Likewise.
352
353 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
354
355 * remote-utils.c: Include "gdb_termios.h" instead of
356 "terminal.h".
357 * terminal.h: Delete file.
358
359 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
360
361 * server.c: Include <vector>.
362 <program_argv, wrapper_argv>: Convert to std::vector.
363 (start_inferior): Rewrite function to use C++.
364 (handle_v_run): Likewise. Update code that calculates the argv
365 based on the vRun packet; use C++.
366 (captured_main): Likewise.
367
368 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
369
370 * server.c (handle_v_cont): Initialize thread_resume::thread
371 with null_ptid.
372
373 2017-04-05 Pedro Alves <palves@redhat.com>
374
375 * configure: Regenerate.
376
377 2017-04-05 Pedro Alves <palves@redhat.com>
378
379 * gdbreplay.c (sync_error): Constify.
380 * linux-x86-low.c (push_opcode): Constify.
381
382 2017-04-05 Pedro Alves <palves@redhat.com>
383
384 * win32-low.c (get_child_debug_event)
385 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
386 Report TARGET_WAITKIND_SPURIOUS instead.
387
388 2017-04-05 Pedro Alves <palves@redhat.com>
389
390 * remote-utils.c (remote_prepare, remote_open): Constify.
391 * remote-utils.h (remote_prepare, remote_open): Constify.
392 * server.c (captured_main): Constify 'port' handling.
393
394 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
395
396 * Makefile.in (clean): Clear .deps.
397
398 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
399
400 * .gitignore: Remove generated files, replace with wildcard.
401 * (clean): Replace removal of generated files with wildcard.
402 (version.c): Replace with...
403 (version-generated.c): ...this.
404 (xml-builtin.c): Replace with...
405 (xml-builtin-generated.c): ...this.
406 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
407 (%.c: *regformats*): Replace with...
408 (%-generated.c: *regformats*): ...this.
409
410 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
411
412 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
413 (xtensa_fill_gregset): Call collect_register_by_name for
414 threadptr register.
415 (xtensa_store_gregset): Call supply_register_by_name for
416 threadptr register.
417
418 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
419
420 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
421 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
422 (xtensa_store_gregset): Call supply_register for all registers in
423 a0_regnum..a0_regnum + C0_NREGS range.
424
425 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
426
427 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
428 (ax-ipa.o: ax.c): Remove.
429 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
430 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
431 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
432 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
433 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
434
435 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
436
437 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
438 (print-utils-ipa.o: ../common/print-utils.c): Remove.
439 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
440 (errors-ipa.o: ../common/errors.c): Remove.
441 (format-ipa.o: ../common/format.c): Remove.
442 (common-utils-ipa.o: ../common/common-utils.c): Remove.
443
444 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
445
446 * Makefile.in (%-ipa.o: %.c): New rule.
447 (tracepoint-ipa.o: tracepoint.c): Remove.
448 (utils-ipa.o: utils.c): Remove.
449 (remote-utils-ipa.o: remote-utils.c): Remove.
450 (regcache-ipa.o: regcache.c): Remove.
451 (i386-linux-ipa.o: i386-linux.c): Remove.
452 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
453 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
454 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
455 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
456 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
457 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
458 (amd64-linux-ipa.o: amd64-linux.c): Remove.
459 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
460 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
461 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
462 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
463 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
464 (aarch64-ipa.o: aarch64.c): Remove.
465 (s390-linux32-ipa.o: s390-linux32.c): Remove.
466 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
467 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
468 (s390-linux64-ipa.o: s390-linux64.c): Remove.
469 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
470 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
471 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
472 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
473 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
474 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
475 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
476 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
477 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
478 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
479 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
480 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
481 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
482 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
483 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
484 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
485 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
486 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
487 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
488 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
489 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
490 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
491 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
492 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
493 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
494 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
495 (tdesc-ipa.o: tdesc.c): Remove.
496 (x32-linux-ipa.o: x32-linux.c): Remove.
497 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
498 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
499
500 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
501
502 * Makefile.in (%.o: ../arch/%.c): New rule.
503 (arm.o: ../arch/arm.c): Remove.
504 (arm-linux.o: ../arch/arm-linux.c): Remove.
505 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
506 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
507
508 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
509
510 * Makefile.in (%.o: ../nat/%.c): New rule.
511 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
512 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
513 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
514 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
515 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
516 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
517 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
518 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
519 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
520 (linux-personality.o: ../nat/linux-personality.c): Remove.
521 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
522 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
523 (x86-linux.o: ../nat/x86-linux.c): Remove.
524 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
525 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
526
527 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
528
529 * Makefile.in (%.o: ../common/%.c): New rule.
530 (signals.o: ../common/signals.c): Remove.
531 (print-utils.o: ../common/print-utils.c): Remove.
532 (rsp-low.o: ../common/rsp-low.c): Remove.
533 (common-utils.o: ../common/common-utils.c): Remove.
534 (posix-strerror.o: ../common/posix-strerror.c): Remove.
535 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
536 (vec.o: ../common/vec.c): Remove.
537 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
538 (xml-utils.o: ../common/xml-utils.c): Remove.
539 (ptid.o: ../common/ptid.c): Remove.
540 (buffer.o: ../common/buffer.c): Remove.
541 (format.o: ../common/format.c): Remove.
542 (filestuff.o: ../common/filestuff.c): Remove.
543 (agent.o: ../common/agent.c): Remove.
544 (errors.o: ../common/errors.c): Remove.
545 (environ.o: ../common/environ.c): Remove.
546 (common-debug.o: ../common/common-debug.c): Remove.
547 (cleanups.o: ../common/cleanups.c): Remove.
548 (common-exceptions.o: ../common/common-exceptions.c): Remove.
549 (fileio.o: ../common/fileio.c): Remove.
550 (common-regcache.o: ../common/common-regcache.c): Remove.
551 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
552 (new-op.o: ../common/new-op.c): Remove.
553 (btrace-common.o: ../common/btrace-common.c): Remove.
554
555 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
556
557 * Makefile.in (%.o: ../target/%.c): New rule.
558 (waitstatus.o: ../target/waitstatus.c): Remove.
559
560 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
561
562 * Makefile.in
563 (%.c: ../regformats/%.dat,
564 (%.c: ../regformats/arm/%.dat,
565 (%.c: ../regformats/i386/%.dat,
566 (%.c: ../regformats/rs6000/%.dat): New rules.
567 (aarch64.c): Remove.
568 (reg-arm.c): Remove.
569 (arm-with-iwmmxt.c): Remove.
570 (arm-with-vfpv2.c): Remove.
571 (arm-with-vfpv3.c): Remove.
572 (arm-with-neon.c): Remove.
573 (reg-bfin.c): Remove.
574 (reg-cris.c): Remove.
575 (reg-crisv32.c): Remove.
576 (i386.c): Remove.
577 (i386-linux.c): Remove.
578 (i386-avx.c): Remove.
579 (i386-avx-linux.c): Remove.
580 (i386-avx-avx512.c): Remove.
581 (i386-avx-avx512-linux.c): Remove.
582 (i386-mpx.c): Remove.
583 (i386-mpx-linux.c): Remove.
584 (i386-avx-mpx-avx512-pku.c): Remove.
585 (i386-avx-mpx-avx512-pku-linux.c): Remove.
586 (i386-avx-mpx.c): Remove.
587 (i386-avx-mpx-linux.c): Remove.
588 (i386-mmx.c): Remove.
589 (i386-mmx-linux.c): Remove.
590 (reg-ia64.c): Remove.
591 (reg-m32r.c): Remove.
592 (reg-m68k.c): Remove.
593 (reg-cf.c): Remove.
594 (mips-linux.c): Remove.
595 (mips-dsp-linux.c): Remove.
596 (mips64-linux.c): Remove.
597 (mips64-dsp-linux.c): Remove.
598 (nios2-linux.c): Remove.
599 (powerpc-32.c): Remove.
600 (powerpc-32l.c): Remove.
601 (powerpc-altivec32l.c): Remove.
602 (powerpc-cell32l.c): Remove.
603 (powerpc-vsx32l.c): Remove.
604 (powerpc-isa205-32l.c): Remove.
605 (powerpc-isa205-altivec32l.c): Remove.
606 (powerpc-isa205-vsx32l.c): Remove.
607 (powerpc-e500l.c): Remove.
608 (powerpc-64l.c): Remove.
609 (powerpc-altivec64l.c): Remove.
610 (powerpc-cell64l.c): Remove.
611 (powerpc-vsx64l.c): Remove.
612 (powerpc-isa205-64l.c): Remove.
613 (powerpc-isa205-altivec64l.c): Remove.
614 (powerpc-isa205-vsx64l.c): Remove.
615 (s390-linux32.c): Remove.
616 (s390-linux32v1.c): Remove.
617 (s390-linux32v2.c): Remove.
618 (s390-linux64.c): Remove.
619 (s390-linux64v1.c): Remove.
620 (s390-linux64v2.c): Remove.
621 (s390-te-linux64.c): Remove.
622 (s390-vx-linux64.c): Remove.
623 (s390-tevx-linux64.c): Remove.
624 (s390x-linux64.c): Remove.
625 (s390x-linux64v1.c): Remove.
626 (s390x-linux64v2.c): Remove.
627 (s390x-te-linux64.c): Remove.
628 (s390x-vx-linux64.c): Remove.
629 (s390x-tevx-linux64.c): Remove.
630 (tic6x-c64xp-linux.c): Remove.
631 (tic6x-c64x-linux.c): Remove.
632 (tic6x-c62x-linux.c): Remove.
633 (reg-sh.c): Remove.
634 (reg-sparc64.c): Remove.
635 (reg-spu.c): Remove.
636 (amd64.c): Remove.
637 (amd64-linux.c): Remove.
638 (amd64-avx.c): Remove.
639 (amd64-avx-linux.c): Remove.
640 (amd64-avx-avx512.c): Remove.
641 (amd64-avx-avx512-linux.c): Remove.
642 (amd64-mpx.c): Remove.
643 (amd64-mpx-linux.c): Remove.
644 (amd64-avx-mpx-avx512-pku.c): Remove.
645 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
646 (amd64-avx-mpx.c): Remove.
647 (amd64-avx-mpx-linux.c): Remove.
648 (x32.c): Remove.
649 (x32-linux.c): Remove.
650 (x32-avx.c): Remove.
651 (x32-avx-linux.c): Remove.
652 (x32-avx-avx512.c): Remove.
653 (x32-avx-avx512-linux.c): Remove.
654 (reg-xtensa.c): Remove.
655 (reg-tilegx.c): Remove.
656 (reg-tilegx32.c): Remove.
657
658 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
659
660 * Makefile.in (SFILES): Add "common/environ.c".
661 (OBJS): Add "common/environ.h".
662
663 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
664
665 * configure.ac: Check if the fs_base and gs_base members of
666 `struct user_regs_struct' exist.
667 * config.in: Regenerated.
668 * configure: Likewise.
669
670 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
671
672 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
673 target_read_memory.
674 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
675 (get_next_pcs_syscall_next_pc): Likewise.
676
677 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
678
679 * win32-i386-low.c: Fix incorrect reference to a couple source files.
680 * nto-x86-low.c: Likewise.
681
682 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
683
684 * Makefile.in: Include disable-implicit-rules.mk.
685
686 2016-11-23 Pedro Alves <palves@redhat.com>
687
688 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
689 (debug_vprintf): Use std::chrono::steady_clock instead of
690 gettimeofday. Use '.' instead of ':'.
691 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
692 (get_timestamp): Use std::chrono::steady_clock instead of
693 gettimeofday.
694
695 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
696
697 * Makefile.in: Fix whitespace formatting.
698
699 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
700
701 * Makefile.in (SFILES, OBS): Flatten list and order
702 alphabetically.
703
704 2016-11-23 Pedro Alves <palves@redhat.com>
705
706 * event-loop.c (handle_file_event): Use warning.
707 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
708 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
709 Use warning.
710
711 2016-11-23 Pedro Alves <palves@redhat.com>
712
713 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
714 output.
715 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
716 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
717 debug_printf and debug_flush for debug output.
718 * server.c (handle_general_set): Likewise.
719 * thread-db.c (try_thread_db_load): Use debug_printf for debug
720 output.
721
722 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
723
724 * Makefile.in (.c.o): Replace rule with ...
725 (%.o: %.c): ... this one.
726
727 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
728
729 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
730 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
731 make.
732 * configure.ac: Remove checks for the make program.
733 * configure: Re-generate.
734
735 2016-10-28 Pedro Alves <palves@redhat.com>
736
737 * Makefile.in (CXX_DIALECT): Get from configure.
738 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
739 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
740 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
741 * config.in: Regenerate.
742 * configure: Regenerate.
743
744 2016-10-27 Yao Qi <yao.qi@linaro.org>
745
746 * linux-low.c (linux_supports_range_stepping): Return true if
747 can_software_single_step return true.
748
749 2016-10-27 Yao Qi <yao.qi@linaro.org>
750
751 * inferiors.c (find_inferior_in_random): New function.
752 * inferiors.h (find_inferior_in_random): Declare.
753 * linux-low.c (linux_wait_for_event_filtered): Call
754 find_inferior_in_random instead of find_inferior.
755
756 2016-10-27 Yao Qi <yao.qi@linaro.org>
757
758 * linux-low.c (linux_wait_1): If single-step breakpoints are
759 inserted, remove them.
760
761 2016-10-26 Pedro Alves <palves@redhat.com>
762
763 * linux-low.c (handle_extended_wait): Link parent/child fork
764 threads.
765 (linux_wait_1): Unlink them.
766 (linux_set_resume_request): Ignore resume requests for
767 already-resumed and unhandled fork child threads.
768 * linux-low.h (struct lwp_info) <fork_relative>: New field.
769 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
770 New functions.
771 (handle_v_requests) <vCont>: Don't call require_running.
772 * server.h (in_queued_stop_replies): New declaration.
773
774 2016-10-24 Yao Qi <yao.qi@linaro.org>
775
776 PR server/20733
777 * linux-aarch64-low.c (append_insns): Cast the return value to
778 'uint32_t *'.
779
780 2016-10-10 Yao Qi <yao.qi@linaro.org>
781
782 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
783
784 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
785
786 * target.c (target_supports_multi_process): New function, moved
787 from...
788 * target.h (target_supports_multi_process): ... here. Remove
789 macro.
790
791 2016-10-05 Tom Tromey <tom@tromey.com>
792
793 PR remote/20655:
794 * tracepoint.c (handle_tracepoint_bkpts): Check
795 ipa_error_tracepoint, not ipa_stopping_tracepoint.
796
797 2016-10-05 Yao Qi <yao.qi@linaro.org>
798
799 * configure.srv: Update the path of arm-*.xml files.
800
801 2016-10-05 Terry Guo <terry.guo@arm.com>
802 Yao Qi <yao.qi@linaro.org>
803
804 * Makefile.in: Adjust the path of rules.
805 * configure.srv: Update the path of xml files.
806 * regformats/arm-with-iwmmxt.dat: Regenerated.
807 * regformats/arm-with-neon.dat: Likewise.
808 * regformats/arm-with-vfpv2.dat: Likewise.
809 * regformats/arm-with-vfpv3.dat Likewise.
810
811 2016-09-30 Yao Qi <yao.qi@linaro.org>
812
813 PR gdbserver/20627
814 * target.c (target_stop_and_wait): Don't call
815 target_continue_no_signal, use resume_stop instead.
816
817 2016-09-26 Yao Qi <yao.qi@linaro.org>
818
819 * linux-low.c (linux_wait_1): Call debug_exit.
820
821 2016-09-23 Pedro Alves <palves@redhat.com>
822
823 * Makefile.in (SFILES): Add common/new-op.c.
824 (OBS): Add common/new-op.o.
825 (new-op.o): New rule.
826
827 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
828
829 * .gitinore: Ignore more files.
830
831 2016-09-21 Yao Qi <yao.qi@linaro.org>
832
833 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
834 23.
835
836 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
837
838 * server.c (start_inferior): Call target_mourn_inferior instead of
839 mourn_inferior; pass ptid_t argument to it.
840 (resume): Likewise.
841 (handle_target_event): Likewise.
842 * target.c (target_mourn_inferior): New function.
843 * target.h (mourn_inferior): Delete macro.
844
845 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
846
847 * linux-low.c (lwp_is_stepping): New function.
848
849 2016-09-06 Carl Love <cel@us.ibm.com>
850
851 * server.c (start_inferior): Fixed comment, requested comment change
852 didn't get updated correctly. Removed reference to ptrace () call as
853 it is only true on Linux systems.
854
855 2016-09-06 Carl Love <cel@us.ibm.com>
856
857 * server.c (start_inferior): Do not call
858 function target_post_create_inferior () if the
859 inferior process has already exited.
860
861 2016-09-05 Pedro Alves <palves@redhat.com>
862
863 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
864 (COMPILE.pre, CC_LD): Use CXX directly.
865 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
866 * acinclude.m4: Don't include build-with-cxx.m4.
867 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
868 * configure: Regenerate.
869
870 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
871
872 PR gdb/19495
873 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
874 call writing data to own_buf.
875
876 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
877
878 * target.c (mywait): Call target_wait instead of
879 the_target->wait.
880 (target_wait): New function.
881
882 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
883
884 * server.c (start_inferior): New variable 'ptid'. Replace calls
885 to the_target->resume by target_continue{,_no_signal}, depending
886 on the case.
887 * target.c (target_stop_and_wait): Call target_continue_no_signal
888 instead of the_target->resume.
889 (target_continue): New function.
890
891 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
892
893 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
894
895 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
896
897 PR server/20491
898 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
899 ps_prochandle.
900 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
901 * linux-arm-low.c (ps_get_thread_area): Likewise.
902 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
903 * linux-m68k-low.c (ps_get_thread_area): Likewise.
904 * linux-mips-low.c (ps_get_thread_area): Likewise.
905 * linux-nios2-low.c (ps_get_thread_area): Likewise.
906 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
907 * linux-x86-low.c (ps_get_thread_area): Likewise.
908 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
909
910 2016-08-19 Pedro Alves <palves@redhat.com>
911
912 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
913
914 2016-08-19 Pedro Alves <palves@redhat.com>
915
916 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
917 comment. Use memcpy instead of casting through unsigned long.
918
919 2016-08-19 Pedro Alves <palves@redhat.com>
920
921 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
922 allocating around 0x80000000.
923
924 2016-08-19 Pedro Alves <palves@redhat.com>
925
926 PR gdb/20415
927 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
928 (x32-avx512-linux-ipa.o): New rules.
929 * configure.ac (x86_64-*-linux*): New x32 check.
930 * configure.srv (ipa_x32_linux_regobj): New.
931 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
932 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
933 descriptions.
934 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
935 descriptions.
936 * configure: Regenerate.
937
938 2016-08-09 Pedro Alves <palves@redhat.com>
939
940 PR gdb/18653
941 * Makefile.in (OBS): Add signals-state-save-restore.o.
942 (signals-state-save-restore.o): New rule.
943 * config.in: Regenerate.
944 * configure: Regenerate.
945 * linux-low.c: Include "signals-state-save-restore.h".
946 (linux_create_inferior): Call
947 restore_original_signals_state.
948 * server.c: Include "dispositions-save-restore.h".
949 (captured_main): Call save_original_signals_state.
950
951 2016-08-05 Pedro Alves <palves@redhat.com>
952
953 * configure: Regenerate.
954
955 2016-08-04 Yao Qi <yao.qi@linaro.org>
956
957 * linux-low.c (regsets_fetch_inferior_registers): Check
958 errno is ESRCH or not.
959
960 2016-08-02 Yao Qi <yao.qi@linaro.org>
961
962 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
963 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
964 (thread_db_load_search): Update.
965 (try_thread_db_load_1): Don't look for td_ta_event_addr,
966 td_ta_set_event and td_ta_event_getmsg.
967
968 2016-07-26 Pedro Alves <palves@redhat.com>
969
970 PR server/20414
971 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
972 of unsigned long for 64-bit registers and use uint32_t instead of
973 unsigned int for 32-bit registers.
974
975 2016-07-26 Pedro Alves <palves@redhat.com>
976
977 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
978 to 'ptrace'.
979
980 2016-07-21 Tom Tromey <tom@tromey.com>
981
982 * configure: Rebuild.
983
984 2016-07-21 Yao Qi <yao.qi@linaro.org>
985
986 * mem-break.c (find_gdb_breakpoint): Cast bp to
987 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
988
989 2016-07-21 Yao Qi <yao.qi@linaro.org>
990
991 * server.c (handle_v_requests): Support s and S actions
992 if target_supports_software_single_step return true.
993
994 2016-07-21 Yao Qi <yao.qi@linaro.org>
995
996 * linux-low.c (resume_stopped_resumed_lwps): If resume request
997 is resume_step, call maybe_hw_step.
998 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
999 and unstop them.
1000 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1001 breakpoints or not.
1002 (proceed_one_lwp): If resume request is resume_step, install
1003 reinsert breakpoints and call maybe_hw_step.
1004
1005 2016-07-21 Yao Qi <yao.qi@linaro.org>
1006
1007 * linux-low.c (proceed_one_lwp): Declare.
1008 (linux_resume_one_thread): Remove local variable 'step'.
1009 Lift code enqueue signal. Call proceed_one_lwp instead of
1010 linux_resume_one_lwp.
1011
1012 2016-07-21 Yao Qi <yao.qi@linaro.org>
1013
1014 * linux-low.c (linux_resume_one_thread): Call
1015 enqueue_pending_signal.
1016
1017 2016-07-21 Yao Qi <yao.qi@linaro.org>
1018
1019 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1020 * inferiors.c (do_restore_current_thread_cleanup): New function.
1021 (make_cleanup_restore_current_thread): Likewise.
1022 * linux-low.c (install_software_single_step_breakpoints): Call
1023 make_cleanup_restore_current_thread. Switch current_thread to
1024 thread.
1025
1026 2016-07-21 Yao Qi <yao.qi@linaro.org>
1027
1028 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1029 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1030 (clone_one_breakpoint): Likewise.
1031 (delete_reinsert_breakpoints): Change parameter to thread.
1032 Callers updated.
1033 (has_reinsert_breakpoints): Likewise.
1034 (uninsert_reinsert_breakpoints): Likewise.
1035 (reinsert_reinsert_breakpoints): Likewise.
1036 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1037 (delete_reinsert_breakpoints): Likewise.
1038 (reinsert_reinsert_breakpoints): Likewise.
1039 (uninsert_reinsert_breakpoints): Likewise.
1040 (has_reinsert_breakpoints): Likewise.
1041
1042 2016-07-21 Yao Qi <yao.qi@linaro.org>
1043
1044 * inferiors.c (get_thread_process): Make parameter const.
1045 * inferiors.h (get_thread_process): Update declaration.
1046 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1047 Add new parameters child_thread and parent_thread. Callers
1048 updated.
1049 * mem-break.h (clone_all_breakpoints): Update declaration.
1050
1051 2016-07-21 Yao Qi <yao.qi@linaro.org>
1052
1053 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1054 <command_list, handler>: Remove.
1055 (struct gdb_breakpoint): New.
1056 (struct other_breakpoint): New.
1057 (struct reinsert_breakpoint): New.
1058 (is_gdb_breakpoint): New function.
1059 (any_persistent_commands): Update command_list if
1060 is_gdb_breakpoint returns true.
1061 (set_breakpoint): Create breakpoints according to their types.
1062 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1063 (set_gdb_breakpoint_1): Likewise.
1064 (set_gdb_breakpoint): Likewise.
1065 (clear_breakpoint_conditions): Change parameter type to
1066 'struct gdb_breakpoint *'.
1067 (clear_breakpoint_commands): Likewise.
1068 (clear_breakpoint_conditions_and_commands): Likewise.
1069 (add_condition_to_breakpoint): Likewise.
1070 (add_breakpoint_condition): Likewise.
1071 (add_commands_to_breakpoint): Likewise.
1072 (check_breakpoints): Check other_breakpoint.
1073 (clone_one_breakpoint): Clone breakpopint according to its type.
1074 * mem-break.h (struct gdb_breakpoint): Declare.
1075 (set_gdb_breakpoint): Update declaration.
1076 (clear_breakpoint_conditions_and_commands): Likewise.
1077 (add_breakpoint_condition): Likewise.
1078 (add_breakpoint_commands): Likewise.
1079 * server.c (process_point_options): Change parameter type to
1080 'struct gdb_breakpoint *'.
1081
1082 2016-07-21 Yao Qi <yao.qi@linaro.org>
1083
1084 * mem-break.c (set_breakpoint_at): Rename it to ...
1085 (set_breakpoint_type_at): ... it.
1086 (set_breakpoint_at): Call set_breakpoint_type_at.
1087 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1088 * mem-break.h (set_breakpoint_at): Update comments.
1089
1090 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1091
1092 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1093 to buf parameter.
1094 (nios2_store_gregset): Likewise.
1095
1096 2016-07-01 Pedro Alves <palves@redhat.com>
1097 Antoine Tremblay <antoine.tremblay@ericsson.com>
1098
1099 * linux-low.c: Change interface to take the target lwp_info
1100 pointer directly and return void. Handle detaching from a zombie
1101 thread.
1102 (linux_detach_lwp_callback): New function.
1103 (linux_detach): Detach from the leader thread after detaching from
1104 the clone threads.
1105
1106 2016-06-28 Yao Qi <yao.qi@linaro.org>
1107
1108 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1109 for variable new_offset.
1110 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1111 (aarch64_ftrace_insn_reloc_cb): Likewise.
1112 (aarch64_ftrace_insn_reloc_tb): Likewise.
1113 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1114 PRIx64 instead of PRIx32.
1115
1116 2016-06-28 Yao Qi <yao.qi@linaro.org>
1117
1118 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1119 (the_low_target): Install arm_get_syscall_trapinfo.
1120
1121 2016-06-28 Yao Qi <yao.qi@linaro.org>
1122
1123 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1124 function.
1125 (the_low_target): Install aarch64_get_syscall_trapinfo.
1126
1127 2016-06-28 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1130 Callers updated.
1131 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1132 Remove parameter sysno.
1133 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1134 sysret.
1135
1136 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1137
1138 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1139 (s390_emit_ne_goto): Likewise.
1140 (s390_emit_lt_goto): Likewise.
1141 (s390_emit_le_goto): Likewise.
1142 (s390_emit_gt_goto): Likewise.
1143 (s390_emit_ge_goto): Likewise.
1144 (s390x_emit_eq_goto): Likewise.
1145 (s390x_emit_ne_goto): Likewise.
1146 (s390x_emit_lt_goto): Likewise.
1147 (s390x_emit_le_goto): Likewise.
1148 (s390x_emit_gt_goto): Likewise.
1149 (s390x_emit_ge_goto): Likewise.
1150 (s390_emit_ops_impl): Mark variable static.
1151 (s390x_emit_ops): Likewise.
1152
1153 2016-06-17 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-low.c (handle_extended_wait): Call
1156 uninsert_reinsert_breakpoints for the parent process. Remove
1157 reinsert breakpoints from the child process. Reinsert them to
1158 the parent process when vfork is done.
1159 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1160 (reinsert_reinsert_breakpoints): New function.
1161 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1162 (reinsert_reinsert_breakpoints): Declare.
1163
1164 2016-06-17 Yao Qi <yao.qi@linaro.org>
1165
1166 * linux-low.c (handle_extended_wait): If the parent is doing
1167 step-over, remove the reinsert breakpoints from the forked child.
1168
1169 2016-06-17 Yao Qi <yao.qi@linaro.org>
1170
1171 * linux-low.c (unsuspend_all_lwps): Declare.
1172 (linux_low_filter_event): If thread exited, call finish_step_over.
1173 If step-over is finished, unsuspend other threads.
1174
1175 2016-06-17 Yao Qi <yao.qi@linaro.org>
1176
1177 * linux-low.c (linux_resume_one_lwp_throw): Assert
1178 has_reinsert_breakpoints returns false.
1179 * mem-break.c (delete_disabled_breakpoints): Assert
1180 bp type isn't reinsert_breakpoint.
1181
1182 2016-06-17 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-low.c (maybe_hw_step): New function.
1185 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1186 (finish_step_over): Switch current_thread to lwp temporarily,
1187 and assert has_reinsert_breakpoints returns true.
1188 (proceed_one_lwp): Call maybe_hw_step.
1189 * mem-break.c (has_reinsert_breakpoints): New function.
1190 * mem-break.h (has_reinsert_breakpoints): Declare.
1191
1192 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1193
1194 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1195
1196 2016-05-17 Yao Qi <yao.qi@linaro.org>
1197
1198 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1199 instead of find_inferior.
1200
1201 2016-05-05 Yao Qi <yao.qi@linaro.org>
1202
1203 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1204 Initialize res to zero.
1205
1206 2016-05-05 Yao Qi <yao.qi@linaro.org>
1207
1208 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1209 to uint32_t.
1210
1211 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1212
1213 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1214 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1215 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1216
1217 2016-04-28 Par Olsson <par.olsson@windriver.com>
1218 Simon Marchi <simon.marchi@ericsson.com>
1219
1220 * tracepoint.c (write_inferior_int8): New function.
1221 (cmd_qtenable_disable): Write enable flag using
1222 write_inferior_int8.
1223
1224 2016-04-25 Yao Qi <yao.qi@linaro.org>
1225
1226 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1227 (need_step_over_p): Return zero if the LWP has pending signals
1228 can be delivered on software single step target.
1229
1230 2016-04-25 Yao Qi <yao.qi@linaro.org>
1231
1232 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1233 return instead of error.
1234
1235 2016-04-22 Yao Qi <yao.qi@linaro.org>
1236
1237 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1238 to 23.
1239
1240 2016-04-22 Yao Qi <yao.qi@linaro.org>
1241
1242 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1243 signal when stepping over breakpoint with software single
1244 step.
1245
1246 2016-04-21 Pedro Alves <palves@redhat.com>
1247
1248 * linux-s390-low.c (s390_collect_ptrace_register)
1249 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1250 add casts.
1251 (s390_check_regset): Use void * instead of gdb_byte *.
1252
1253 2016-04-20 Pedro Alves <palves@redhat.com>
1254
1255 * configure: Renegerate.
1256
1257 2016-04-20 Yao Qi <yao.qi@linaro.org>
1258
1259 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1260 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1261 number 16.
1262 (arm_store_gregset): Likewise.
1263
1264 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1265
1266 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1267 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1268 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1269 (amd64-avx-mpx-linux.c): New rules.
1270 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1271 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1272 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1273 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1274 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1275 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1276 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1277 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1278 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1279 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1280 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1281 * linux-x86-low.c (x86_linux_read_description): Add case for
1282 X86_XSTATE_AVX_MPX_MASK.
1283 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1284 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1285 init_registers_i386_avx_mpx_linux.
1286 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1287 (initialize_low_tracepoint): Call
1288 init_registers_i386_avx_mpx_linux.
1289 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1290 (initialize_low_tracepoint): Call
1291 init_registers_amd64_avx_mpx_linux.
1292 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1293 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1294 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1295 declarations.
1296
1297 2016-04-18 Pedro Alves <palves@redhat.com>
1298
1299 * configure: Regenerate.
1300
1301 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1302
1303 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1304 (aarch64_emit_sub): Likewise.
1305
1306 2016-04-12 Pedro Alves <palves@redhat.com>
1307
1308 * utils.c (prepare_to_throw_exception): Delete.
1309
1310 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1311
1312 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1313
1314 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1315
1316 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1317
1318 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1319
1320 * linux-aarch64-ipa.c: Add <elf.h> include.
1321 * linux-ppc-ipa.c: Add <elf.h> include.
1322 * linux-s390-ipa.c: Add <elf.h> include.
1323
1324 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1325
1326 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1327 (get_raw_reg_ptr): Likewise.
1328 (get_trace_state_variable_value_ptr): Likewise.
1329 (set_trace_state_variable_value_ptr): Likewise.
1330 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1331 char *.
1332
1333 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1334 Marcin Kościelnicki <koriakin@0x04.net>
1335
1336 PR/17221
1337 * linux-ppc-low.c (emit_insns): New function.
1338 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1339 (ppc_emit_prologue): New function.
1340 (ppc_emit_epilogue): New function.
1341 (ppc_emit_add): New function.
1342 (ppc_emit_sub): New function.
1343 (ppc_emit_mul): New function.
1344 (ppc_emit_lsh): New function.
1345 (ppc_emit_rsh_signed): New function.
1346 (ppc_emit_rsh_unsigned): New function.
1347 (ppc_emit_ext): New function.
1348 (ppc_emit_zero_ext): New function.
1349 (ppc_emit_log_not): New function.
1350 (ppc_emit_bit_and): New function.
1351 (ppc_emit_bit_or): New function.
1352 (ppc_emit_bit_xor): New function.
1353 (ppc_emit_bit_not): New function.
1354 (ppc_emit_equal): New function.
1355 (ppc_emit_less_signed): New function.
1356 (ppc_emit_less_unsigned): New function.
1357 (ppc_emit_ref): New function.
1358 (ppc_emit_const): New function.
1359 (ppc_emit_reg): New function.
1360 (ppc_emit_pop): New function.
1361 (ppc_emit_stack_flush): New function.
1362 (ppc_emit_swap): New function.
1363 (ppc_emit_stack_adjust): New function.
1364 (ppc_emit_call): New function.
1365 (ppc_emit_int_call_1): New function.
1366 (ppc_emit_void_call_2): New function.
1367 (ppc_emit_if_goto): New function.
1368 (ppc_emit_goto): New function.
1369 (ppc_emit_eq_goto): New function.
1370 (ppc_emit_ne_goto): New function.
1371 (ppc_emit_lt_goto): New function.
1372 (ppc_emit_le_goto): New function.
1373 (ppc_emit_gt_goto): New function.
1374 (ppc_emit_ge_goto): New function.
1375 (ppc_write_goto_address): New function.
1376 (ppc_emit_ops_impl): New static variable.
1377 (ppc64v1_emit_prologue): New function.
1378 (ppc64v2_emit_prologue): New function.
1379 (ppc64_emit_epilogue): New function.
1380 (ppc64_emit_add): New function.
1381 (ppc64_emit_sub): New function.
1382 (ppc64_emit_mul): New function.
1383 (ppc64_emit_lsh): New function.
1384 (ppc64_emit_rsh_signed): New function.
1385 (ppc64_emit_rsh_unsigned): New function.
1386 (ppc64_emit_ext): New function.
1387 (ppc64_emit_zero_ext): New function.
1388 (ppc64_emit_log_not): New function.
1389 (ppc64_emit_bit_and): New function.
1390 (ppc64_emit_bit_or): New function.
1391 (ppc64_emit_bit_xor): New function.
1392 (ppc64_emit_bit_not): New function.
1393 (ppc64_emit_equal): New function.
1394 (ppc64_emit_less_signed): New function.
1395 (ppc64_emit_less_unsigned): New function.
1396 (ppc64_emit_ref): New function.
1397 (ppc64_emit_const): New function.
1398 (ppc64v1_emit_reg): New function.
1399 (ppc64v2_emit_reg): New function.
1400 (ppc64_emit_pop): New function.
1401 (ppc64_emit_stack_flush): New function.
1402 (ppc64_emit_swap): New function.
1403 (ppc64v1_emit_call): New function.
1404 (ppc64v2_emit_call): New function.
1405 (ppc64v1_emit_int_call_1): New function.
1406 (ppc64v2_emit_int_call_1): New function.
1407 (ppc64v1_emit_void_call_2): New function.
1408 (ppc64v2_emit_void_call_2): New function.
1409 (ppc64_emit_if_goto): New function.
1410 (ppc64_emit_eq_goto): New function.
1411 (ppc64_emit_ne_goto): New function.
1412 (ppc64_emit_lt_goto): New function.
1413 (ppc64_emit_le_goto): New function.
1414 (ppc64_emit_gt_goto): New function.
1415 (ppc64_emit_ge_goto): New function.
1416 (ppc64v1_emit_ops_impl): New static variable.
1417 (ppc64v2_emit_ops_impl): New static variable.
1418 (ppc_emit_ops): New function.
1419 (linux_low_target): Wire in ppc_emit_ops.
1420
1421 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1422 Marcin Kościelnicki <koriakin@0x04.net>
1423
1424 PR/17221
1425 * Makefile.in: Add powerpc-*-ipa.o
1426 * configure.srv: Add ipa_obj for powerpc*-linux.
1427 * linux-ppc-ipa.c: New file.
1428 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1429 includes.
1430 (PPC_FIELD): New macro.
1431 (PPC_SEXT): New macro.
1432 (PPC_OP6): New macro.
1433 (PPC_BO): New macro.
1434 (PPC_LI): New macro.
1435 (PPC_BD): New macro.
1436 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1437 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1438 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1439 (ppc_get_thread_area): New function.
1440 (is_elfv2_inferior): New function.
1441 (gen_ds_form): New function.
1442 (GEN_STD): New macro.
1443 (GEN_STDU): New macro.
1444 (GEN_LD): New macro.
1445 (GEN_LDU): New macro.
1446 (gen_d_form): New function.
1447 (GEN_ADDI): New macro.
1448 (GEN_ADDIS): New macro.
1449 (GEN_LI): New macro.
1450 (GEN_LIS): New macro.
1451 (GEN_ORI): New macro.
1452 (GEN_ORIS): New macro.
1453 (GEN_LWZ): New macro.
1454 (GEN_STW): New macro.
1455 (GEN_STWU): New macro.
1456 (gen_xfx_form): New function.
1457 (GEN_MFSPR): New macro.
1458 (GEN_MTSPR): New macro.
1459 (GEN_MFCR): New macro.
1460 (GEN_MTCR): New macro.
1461 (GEN_SYNC): New macro.
1462 (GEN_LWSYNC): New macro.
1463 (gen_x_form): New function.
1464 (GEN_OR): New macro.
1465 (GEN_MR): New macro.
1466 (GEN_LWARX): New macro.
1467 (GEN_STWCX): New macro.
1468 (GEN_CMPW): New macro.
1469 (gen_md_form): New function.
1470 (GEN_RLDICL): New macro.
1471 (GEN_RLDICR): New macro.
1472 (gen_i_form): New function.
1473 (GEN_B): New macro.
1474 (GEN_BL): New macro.
1475 (gen_b_form): New function.
1476 (GEN_BNE): New macro.
1477 (GEN_LOAD): New macro.
1478 (GEN_STORE): New macro.
1479 (gen_limm): New function.
1480 (gen_atomic_xchg): New function.
1481 (gen_call): New function.
1482 (ppc_relocate_instruction): New function.
1483 (ppc_install_fast_tracepoint_jump_pad): New function.
1484 (ppc_get_min_fast_tracepoint_insn_len): New function.
1485 (ppc_get_ipa_tdesc_idx): New function.
1486 (the_low_target): Wire in the new functions.
1487 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1488 tdescs.
1489 * linux-ppc-tdesc.h: New file.
1490
1491 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1492
1493 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1494 (alloc_jump_pad_buffer): New function.
1495 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1496 (alloc_jump_pad_buffer): New function.
1497 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1498 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1499 (alloc_jump_pad_buffer): New function.
1500 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1501 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1502 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1503 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1504
1505 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1506
1507 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1508 * linux-amd64-ipa.c: Likewise.
1509 * linux-i386-ipa.c: Likewise.
1510 * linux-s390-ipa.c: Likewise.
1511 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1512 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1513 set_trace_state_variable_value_ptr.
1514 (struct ipa_sym_addresses): Likewise.
1515 (symbol_list): Likewise.
1516 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1517 accessing gdb_collect directly.
1518 (gdb_collect_ptr_type): New typedef.
1519 (get_raw_reg_ptr_type): New typedef.
1520 (get_trace_state_variable_value_ptr_type): New typedef.
1521 (set_trace_state_variable_value_ptr_type): New typedef.
1522 (gdb_collect_ptr): New global.
1523 (get_raw_reg_ptr): New global.
1524 (get_trace_state_variable_value_ptr): New global.
1525 (set_trace_state_variable_value_ptr): New global.
1526 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1527 accessing get_raw_reg directly.
1528 (get_get_tsv_func_addr): Likewise for
1529 get_trace_state_variable_value_ptr.
1530 (get_set_tsv_func_addr): Likewise for
1531 set_trace_state_variable_value_ptr.
1532 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1533
1534 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1537
1538 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1539
1540 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1541 packets.
1542 (relocate_instruction): Remove own_buf.
1543 * server.c (own_buf): Make global.
1544 (handle_v_requests): Make global.
1545 * server.h (own_buf): New declaration.
1546 (handle_v_requests): New prototype.
1547
1548 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1549
1550 PR 18377
1551 * linux-s390-low.c (add_insns): New function.
1552 (s390_emit_prologue): New function.
1553 (s390_emit_epilogue): New function.
1554 (s390_emit_add): New function.
1555 (s390_emit_sub): New function.
1556 (s390_emit_mul): New function.
1557 (s390_emit_lsh): New function.
1558 (s390_emit_rsh_signed): New function.
1559 (s390_emit_rsh_unsigned): New function.
1560 (s390_emit_ext): New function.
1561 (s390_emit_log_not): New function.
1562 (s390_emit_bit_and): New function.
1563 (s390_emit_bit_or): New function.
1564 (s390_emit_bit_xor): New function.
1565 (s390_emit_bit_not): New function.
1566 (s390_emit_equal): New function.
1567 (s390_emit_less_signed): New function.
1568 (s390_emit_less_unsigned): New function.
1569 (s390_emit_ref): New function.
1570 (s390_emit_if_goto): New function.
1571 (s390_emit_goto): New function.
1572 (s390_write_goto_address): New function.
1573 (s390_emit_litpool): New function.
1574 (s390_emit_const): New function.
1575 (s390_emit_call): New function.
1576 (s390_emit_reg): New function.
1577 (s390_emit_pop): New function.
1578 (s390_emit_stack_flush): New function.
1579 (s390_emit_zero_ext): New function.
1580 (s390_emit_swap): New function.
1581 (s390_emit_stack_adjust): New function.
1582 (s390_emit_set_r2): New function.
1583 (s390_emit_int_call_1): New function.
1584 (s390_emit_void_call_2): New function.
1585 (s390_emit_eq_goto): New function.
1586 (s390_emit_ne_goto): New function.
1587 (s390_emit_lt_goto): New function.
1588 (s390_emit_le_goto): New function.
1589 (s390_emit_gt_goto): New function.
1590 (s390_emit_ge_goto): New function.
1591 (s390x_emit_prologue): New function.
1592 (s390x_emit_epilogue): New function.
1593 (s390x_emit_add): New function.
1594 (s390x_emit_sub): New function.
1595 (s390x_emit_mul): New function.
1596 (s390x_emit_lsh): New function.
1597 (s390x_emit_rsh_signed): New function.
1598 (s390x_emit_rsh_unsigned): New function.
1599 (s390x_emit_ext): New function.
1600 (s390x_emit_log_not): New function.
1601 (s390x_emit_bit_and): New function.
1602 (s390x_emit_bit_or): New function.
1603 (s390x_emit_bit_xor): New function.
1604 (s390x_emit_bit_not): New function.
1605 (s390x_emit_equal): New function.
1606 (s390x_emit_less_signed): New function.
1607 (s390x_emit_less_unsigned): New function.
1608 (s390x_emit_ref): New function.
1609 (s390x_emit_if_goto): New function.
1610 (s390x_emit_const): New function.
1611 (s390x_emit_call): New function.
1612 (s390x_emit_reg): New function.
1613 (s390x_emit_pop): New function.
1614 (s390x_emit_stack_flush): New function.
1615 (s390x_emit_zero_ext): New function.
1616 (s390x_emit_swap): New function.
1617 (s390x_emit_stack_adjust): New function.
1618 (s390x_emit_int_call_1): New function.
1619 (s390x_emit_void_call_2): New function.
1620 (s390x_emit_eq_goto): New function.
1621 (s390x_emit_ne_goto): New function.
1622 (s390x_emit_lt_goto): New function.
1623 (s390x_emit_le_goto): New function.
1624 (s390x_emit_gt_goto): New function.
1625 (s390x_emit_ge_goto): New function.
1626 (s390_emit_ops): New function.
1627 (struct linux_target_ops): Fill in emit_ops hook.
1628
1629 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1630
1631 PR 18377
1632 * Makefile.in: Add s390 IPA files.
1633 * configure.srv: Build IPA for s390.
1634 * linux-s390-ipa.c: New file.
1635 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1636 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1637 (tdesc_s390_linux32): Likewise.
1638 (init_registers_s390_linux32v1): Likewise.
1639 (tdesc_s390_linux32v1): Likewise.
1640 (init_registers_s390_linux32v2): Likewise.
1641 (tdesc_s390_linux32v2): Likewise.
1642 (init_registers_s390_linux64): Likewise.
1643 (tdesc_s390_linux64): Likewise.
1644 (init_registers_s390_linux64v1): Likewise.
1645 (tdesc_s390_linux64v1): Likewise.
1646 (init_registers_s390_linux64v2): Likewise.
1647 (tdesc_s390_linux64v2): Likewise.
1648 (init_registers_s390_te_linux64): Likewise.
1649 (tdesc_s390_te_linux64): Likewise.
1650 (init_registers_s390_vx_linux64): Likewise.
1651 (tdesc_s390_vx_linux64): Likewise.
1652 (init_registers_s390_tevx_linux64): Likewise.
1653 (tdesc_s390_tevx_linux64): Likewise.
1654 (init_registers_s390x_linux64): Likewise.
1655 (tdesc_s390x_linux64): Likewise.
1656 (init_registers_s390x_linux64v1): Likewise.
1657 (tdesc_s390x_linux64v1): Likewise.
1658 (init_registers_s390x_linux64v2): Likewise.
1659 (tdesc_s390x_linux64v2): Likewise.
1660 (init_registers_s390x_te_linux64): Likewise.
1661 (tdesc_s390x_te_linux64): Likewise.
1662 (init_registers_s390x_vx_linux64): Likewise.
1663 (tdesc_s390x_vx_linux64): Likewise.
1664 (init_registers_s390x_tevx_linux64): Likewise.
1665 (tdesc_s390x_tevx_linux64): Likewise.
1666 (have_hwcap_s390_vx): New static variable.
1667 (s390_arch_setup): Fill have_hwcap_s390_vx.
1668 (s390_get_thread_area): New function.
1669 (s390_ft_entry_gpr_esa): New const.
1670 (s390_ft_entry_gpr_zarch): New const.
1671 (s390_ft_entry_misc): New const.
1672 (s390_ft_entry_fr): New const.
1673 (s390_ft_entry_vr): New const.
1674 (s390_ft_main_31): New const.
1675 (s390_ft_main_64): New const.
1676 (s390_ft_exit_fr): New const.
1677 (s390_ft_exit_vr): New const.
1678 (s390_ft_exit_misc): New const.
1679 (s390_ft_exit_gpr_esa): New const.
1680 (s390_ft_exit_gpr_zarch): New const.
1681 (append_insns): New function.
1682 (s390_relocate_instruction): New function.
1683 (s390_install_fast_tracepoint_jump_pad): New function.
1684 (s390_get_min_fast_tracepoint_insn_len): New function.
1685 (s390_get_ipa_tdesc_idx): New function.
1686 (struct linux_target_ops): Wire in the above functions.
1687 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1688 * linux-s390-tdesc.h: New file.
1689
1690 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1691
1692 * linux-s390-low.c (s390_supports_tracepoints): New function.
1693 (struct linux_target_ops): Fill supports_tracepoints hook.
1694
1695 2016-03-18 Yao Qi <yao.qi@linaro.org>
1696
1697 * linux-low.c (lwp_signal_can_be_delivered): New function.
1698 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1699
1700 2016-03-18 Yao Qi <yao.qi@linaro.org>
1701
1702 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1703 0 if signal is enqueued. Remove 'signal' from one debugging
1704 message. Move one debugging message to some lines below.
1705 Remove code setting 'signal' to 0.
1706
1707 2016-03-18 Yao Qi <yao.qi@linaro.org>
1708
1709 * linux-low.c (linux_low_filter_event): Remove redundant
1710 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1711
1712 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1713
1714 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1715 (struct linux_target_ops): Wire in the above.
1716
1717 2016-03-03 Yao Qi <yao.qi@linaro.org>
1718
1719 * linux-low.c: Update comments to start_step_over.
1720
1721 2016-03-03 Yao Qi <yao.qi@linaro.org>
1722
1723 PR server/19736
1724 * linux-low.c (handle_extended_wait): Set child suspended
1725 if event_lwp->bp_reinsert isn't zero.
1726
1727 2016-03-02 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1730 enqueue_pending_signal.
1731
1732 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1733
1734 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1735 is actually loaded.
1736
1737 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1738
1739 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1740 (s390_regmap_3264) [!__s390x__]: New global.
1741 (s390_collect_ptrace_register): Skip map entries containing -1.
1742 (s390_supply_ptrace_register): Ditto.
1743 (s390_fill_gprs_high): New function.
1744 (s390_store_gprs_high): New function.
1745 (s390_regsets): Add NT_S390_HIGH_GPRS.
1746 (s390_get_hwcap): Enable on 31-bit.
1747 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1748 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1749 Detect NT_S390_HIGH_GPRS.
1750 (s390_usrregs_info_3264): Enable on 31-bit.
1751 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1752 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1753
1754 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1755
1756 PR gdb/13808
1757 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1758 * configure.srv: Ditto.
1759 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1760 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1761 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1762 (init_registers_amd64_linux): Remove prototype.
1763 (tdesc_amd64_linux): Remove declaration.
1764 (get_ipa_tdesc): New function.
1765 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1766 initialize remaining tdescs.
1767 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1768 (init_registers_i386_linux): Remove prototype.
1769 (tdesc_i386_linux): Remove declaration.
1770 (get_ipa_tdesc): New function.
1771 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1772 initialize remaining tdescs.
1773 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1774 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1775 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1776 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1777 (x86_get_ipa_tdesc_idx): New function.
1778 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1779 * linux-x86-tdesc.h: New file.
1780 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1781 (target_get_ipa_tdesc_idx): New macro.
1782 * tracepoint.c (ipa_tdesc_idx): New macro.
1783 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1784 (symbol_list): Add ipa_tdesc_idx.
1785 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1786 (ipa_tdesc): Remove.
1787 (ipa_tdesc_idx): New variable.
1788 (get_context_regcache): Use get_ipa_tdesc.
1789 (gdb_collect): Ditto.
1790 (gdb_probe): Ditto.
1791 * tracepoint.h (get_ipa_tdesc): New prototype.
1792 (ipa_tdesc): Remove.
1793
1794 2016-02-24 Pedro Alves <palves@redhat.com>
1795
1796 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1797 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1798 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1799 Factor out common code between the USE_SIGTRAP_SIGINFO and
1800 !USE_SIGTRAP_SIGINFO blocks.
1801 (linux_low_filter_event): Call save_stop_reason instead of
1802 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1803 Update comments.
1804 (linux_wait_1): Update comments.
1805
1806 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1807
1808 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1809 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1810 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1811 ppc_insert_point, ppc_remove_point.
1812
1813 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1814
1815 * linux-s390-low.c (s390_supports_z_point_type): New function.
1816 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1817
1818 2016-02-16 Yao Qi <yao.qi@linaro.org>
1819
1820 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1821 PC. Get pc from regcache_read_pc.
1822
1823 2016-02-12 Yao Qi <yao.qi@linaro.org>
1824
1825 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1826 or linux_get_pc_32bit.
1827 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1828
1829 2016-02-12 Yao Qi <yao.qi@linaro.org>
1830
1831 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1832 arm_linux_get_next_pcs_fixup.
1833
1834 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1835
1836 * tracepoint.c (x_tracepoint_action_download): Change
1837 write_inferior_data_ptr to write_inferior_data_pointer.
1838 (cmd_qtstart): Likewise.
1839 (write_inferior_data_ptr): Remove.
1840 (download_agent_expr): Change write_inferior_data_ptr to
1841 write_inferior_data_pointer.
1842 (download_tracepoint_1): Likewise.
1843 (download_tracepoint): Likewise.
1844 (download_trace_state_variables): Likewise.
1845
1846 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1847 Marcin Kościelnicki <koriakin@0x04.net>
1848
1849 * tracepoint.c (struct tracepoint_action_ops): Remove.
1850 (struct tracepoint_action): Remove ops.
1851 (m_tracepoint_action_download, r_tracepoint_action_download)
1852 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1853 size and offset accordingly.
1854 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1855 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1856 (tracepoint_action_send, tracepoint_action_download): New functions.
1857 Helpers for trace action handlers.
1858 (add_tracepoint_action): Remove setup actions ops.
1859 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1860
1861 2016-02-10 Yao Qi <yao.qi@linaro.org>
1862
1863 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1864
1865 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1866
1867 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1868 to AC_OUTPUT.
1869 * configure: Regenerate.
1870
1871 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1872
1873 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1874 void * to gdb_byte *.
1875 * linux-low.c (siginfo_fixup): Likewise.
1876 (linux_xfer_siginfo): Likewise.
1877 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1878 Likewise.
1879 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1880
1881 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1882
1883 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1884 to srv_tgtobj.
1885 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1886 to srv_tgtobj.
1887 * linux-x86-low.c [__x86_64__]: Include
1888 "nat/amd64-linux-siginfo.h".
1889 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1890 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1891 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1892 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1893 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1894 (cpt_si_fd, si_timerid, si_overrun): Move from
1895 nat/amd64-linux-siginfo.c.
1896 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1897
1898 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * server.c (skip_to_semicolon): Remove.
1901 (process_point_options): Use strchrnul instead of
1902 skip_to_semicolon.
1903
1904 2016-01-26 Yao Qi <yao.qi@linaro.org>
1905
1906 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1907 * linux-low.c (install_software_single_step_breakpoints): Don't
1908 call regcache_read_pc.
1909 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1910 argument pc.
1911
1912 2016-01-26 Yao Qi <yao.qi@linaro.org>
1913
1914 * linux-low.c (install_software_single_step_breakpoints): Call
1915 regcache_read_pc instead of get_pc.
1916
1917 2016-01-26 Yao Qi <yao.qi@linaro.org>
1918
1919 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1920 (unblock_async_io): Rename to ...
1921 (block_unblock_async_io): ... it. New function.
1922 (enable_async_io): Don't install SIGIO handler. Unblock it
1923 instead.
1924 (disable_async_io): Don't ignore SIGIO. Block it instead.
1925 (initialize_async_io): Install SIGIO handler. Don't call
1926 unblock_async_io.
1927
1928 2016-01-26 Yao Qi <yao.qi@linaro.org>
1929
1930 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1931 first character is '\003', call *the_target->request_interrupt.
1932
1933 2016-01-25 Yao Qi <yao.qi@linaro.org>
1934
1935 * remote-utils.c (new_thread_notify): Remove.
1936 (dead_thread_notify): Likewise.
1937 * remote-utils.h (new_thread_notify): Remove declaration.
1938 (dead_thread_notify): Likewise.
1939
1940 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1941
1942 * gdb.trace/pending.exp: Fix expected message on continue.
1943
1944 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1945
1946 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1947 it works properly on big-endian machines where sizeof (CORE_ADDR)
1948 != sizeof (void *).
1949
1950 2016-01-21 Pedro Alves <palves@redhat.com>
1951
1952 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1953 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1954 * configure: Regenerate.
1955
1956 2016-01-21 Yao Qi <yao.qi@linaro.org>
1957
1958 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1959 is_thumb and set it according to CPSR saved on the stack.
1960 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1961 arm_sigreturn_next_pc.
1962
1963 2016-01-18 Yao Qi <yao.qi@linaro.org>
1964
1965 * linux-low.c (linux_set_pc_64bit): New function.
1966 (linux_get_pc_64bit): New function.
1967 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1968 Declare.
1969 * linux-sparc-low.c (debug_threads): Remove declaration.
1970 (sparc_get_pc): Remove.
1971 (the_low_target): Use linux_get_pc_64bit instead of
1972 sparc_get_pc.
1973 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1974 (the_low_target): Use linux_get_pc_64bit and
1975 linux_set_pc_64bit.
1976
1977 2016-01-18 Yao Qi <yao.qi@linaro.org>
1978
1979 * linux-arm-low.c (debug_threads): Remove declaration.
1980 (arm_get_pc, arm_set_pc): Remove.
1981 (the_low_target): Use linux_get_pc_32bit and
1982 linux_set_pc_32bit.
1983 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1984 (the_low_target): Use linux_get_pc_32bit and
1985 linux_set_pc_32bit.
1986 * linux-cris-low.c (debug_threads): Remove declaration.
1987 (cris_get_pc, cris_set_pc,): Remove.
1988 (the_low_target): Use linux_get_pc_32bit and
1989 linux_set_pc_32bit.
1990 * linux-crisv32-low.c (debug_threads): Remove declaration.
1991 (cris_get_pc, cris_set_pc): Remove.
1992 (the_low_target): Use linux_get_pc_32bit and
1993 linux_set_pc_32bit.
1994 * linux-low.c: Include inttypes.h.
1995 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1996 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1997 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1998 (the_low_target): Use linux_get_pc_32bit and
1999 linux_set_pc_32bit.
2000 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2001 (the_low_target): Use linux_get_pc_32bit and
2002 linux_set_pc_32bit.
2003 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2004 (the_low_target): Use linux_get_pc_32bit and
2005 linux_set_pc_32bit.
2006 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2007 (the_low_target): Use linux_get_pc_32bit and
2008 linux_set_pc_32bit.
2009 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2010 (the_low_target): Use linux_get_pc_32bit and
2011 linux_set_pc_32bit.
2012
2013 2016-01-18 Gary Benson <gbenson@redhat.com>
2014
2015 * configure.ac (AC_FUNC_FORK): New check.
2016 * config.in: Regenerate.
2017 * configure: Likewise.
2018
2019 2016-01-14 Yao Qi <yao.qi@linaro.org>
2020
2021 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2022 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2023 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2024 arm_get_next_pcs_ctor.
2025
2026 2016-01-12 Josh Stone <jistone@redhat.com>
2027 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2028
2029 * inferiors.h: Include "gdb_vecs.h".
2030 (struct process_info): Add syscalls_to_catch.
2031 * inferiors.c (remove_process): Free syscalls_to_catch.
2032 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2033 syscall_return stops.
2034 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2035 * server.c (handle_general_set): Handle QCatchSyscalls.
2036 (handle_query): Report support for QCatchSyscalls.
2037 * target.h (struct target_ops): Add supports_catch_syscall.
2038 (target_supports_catch_syscall): New macro.
2039 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2040 (struct lwp_info): Add syscall_state.
2041 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2042 Maintain syscall_state and syscalls_to_catch across exec.
2043 (get_syscall_trapinfo): New function, proxy to the_low_target.
2044 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2045 (linux_low_filter_event): Toggle syscall_state entry/return for
2046 syscall traps, and set it ignored for all others.
2047 (gdb_catching_syscalls_p): New function.
2048 (gdb_catch_this_syscall_p): New function.
2049 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2050 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2051 (linux_supports_catch_syscall): New function.
2052 (linux_target_ops): Install it.
2053 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2054 (the_low_target): Install it.
2055
2056 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2057
2058 * acinclude.m4: Include new ../warning.m4 file.
2059 * configure: Regenerated.
2060 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2061
2062 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2063
2064 * ax.c (is_goto_target): Mark static.
2065 * linux-low.c (register_addr): Likewise.
2066 (linux_fetch_registers, linux_store_registers): Likewise.
2067 * mem-break.c (any_persistent_commands): Fix old prototype.
2068 (add_commands_to_breakpoint): Mark static.
2069 * regcache.c (find_register_by_name): Delete unused func.
2070 * remote-utils.c (hex_or_minus_one): Mark static.
2071 * server.c (monitor_show_help): Mark static.
2072 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2073 handle_v_requests): Likewise.
2074
2075 2016-01-12 Pedro Alves <palves@redhat.com>
2076
2077 Remove use of the registered trademark symbol throughout.
2078
2079 2016-01-08 Yao Qi <yao.qi@linaro.org>
2080
2081 * remote-utils.c (getpkt): If c is '\003', call target hook
2082 request_interrupt.
2083
2084 2016-01-06 Yao Qi <yao.qi@linaro.org>
2085
2086 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2087 linux-aarch32-low.c.
2088 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2089 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2090 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2091 (thumb2_breakpoint): Declare.
2092 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2093 linux-aarch32-low.h.
2094 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2095 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2096 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2097
2098 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2099
2100 * gdbreplay.c (gdbreplay_version): Change copyright year in
2101 version message.
2102 * server.c (gdbserver_version): Likewise.
2103
2104 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2105
2106 * server.c (crc32_table): Delete.
2107 (crc32): Use libiberty's xcrc32 function.
2108
2109 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2110
2111 * lynx-low.c (lynx_delete_thread_callback): New function.
2112 (lynx_mourn): Properly delete our process and all of its
2113 threads. Remove call to clear_inferiors.
2114
2115 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2116
2117 * target.c (thread_search_callback): Add check that
2118 the thread_stopped target callback is not NULL before
2119 calling it.
2120
2121 2015-12-21 Yao Qi <yao.qi@linaro.org>
2122
2123 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2124 arm breakpoint.
2125
2126 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2127
2128 * server.c (handle_query): Call target_supports_software_single_step.
2129
2130 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2131
2132 * linux-low.c (single_step): New function.
2133 (linux_resume_one_lwp_throw): Call single_step.
2134 (start_step_over): Likewise.
2135
2136 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2137
2138 * Makefile.in (SFILES): Append arch/arm-linux.c,
2139 arch/arm-get-next-pcs.c.
2140 (arm-linux.o): New rule.
2141 (arm-get-next-pcs.o): New rule.
2142 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2143 arm-linux.o.
2144 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2145 to linux-aarch32-low.c.
2146 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2147 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2148 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2149 (thumb2_breakpoint_len): Likewise.
2150 (arm_is_thumb_mode): Make non-static.
2151 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2152 from linux-aarch32-low.c.
2153 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2154 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2155 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2156 (thumb2_breakpoint_len): Likewise.
2157 (arm_is_thumb_mode): New declaration.
2158 * linux-arm-low.c: Include arch/arm-linux.h
2159 aarch/arm-get-next-pcs.h, sys/syscall.h.
2160 (get_next_pcs_ops): New struct.
2161 (get_next_pcs_addr_bits_remove): New function.
2162 (get_next_pcs_is_thumb): New function.
2163 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2164 (arm_sigreturn_next_pc): Likewise.
2165 (get_next_pcs_syscall_next_pc): Likewise.
2166 (arm_gdbserver_get_next_pcs): Likewise.
2167 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2168 Initialize.
2169 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2170 * server.h: Include gdb_vecs.h.
2171
2172 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2173
2174 * Makefile.in (SFILES): Append common/common-regcache.c.
2175 (OBS): Append common-regcache.o.
2176 (common-regcache.o): New rule.
2177 * regcache.c (init_register_cache): Initialize cache to
2178 REG_UNAVAILABLE.
2179 (regcache_raw_read_unsigned): New function.
2180 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2181 register_status enum.
2182
2183 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2184
2185 * linux-aarch64-low.c (the_low_targets): Rename
2186 breakpoint_reinsert_addr to get_next_pcs.
2187 * linux-arm-low.c (the_low_targets): Likewise.
2188 * linux-bfin-low.c (the_low_targets): Likewise.
2189 * linux-cris-low.c (the_low_targets): Likewise.
2190 * linux-crisv32-low.c (the_low_targets): Likewise.
2191 * linux-low.c (can_software_single_step): Likewise.
2192 (install_software_single_step_breakpoints): New function.
2193 (start_step_over): Use install_software_single_step_breakpoints.
2194 * linux-low.h: New CORE_ADDR vector.
2195 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2196 get_next_pcs.
2197 * linux-mips-low.c (the_low_targets): Likewise.
2198 * linux-nios2-low.c (the_low_targets): Likewise.
2199 * linux-sparc-low.c (the_low_targets): Likewise.
2200
2201 2015-12-17 Pedro Alves <palves@redhat.com>
2202
2203 * linux-low.c (linux_kill_one_lwp): Remove references to
2204 LinuxThreads.
2205 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2206 to 'kill'.
2207 (linux_init_signals): Delete.
2208 (initialize_low): Adjust.
2209 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2210
2211 2015-12-16 Pedro Alves <palves@redhat.com>
2212
2213 * configure.ac (compiler warning flags): When testing a
2214 -Wno-foo option, check whether -Wfoo works instead.
2215 * configure: Regenerate.
2216
2217 2015-12-11 Don Breazeal <donb@codesourcery.com>
2218
2219 * server.c (process_serial_event): Don't exit from gdbserver
2220 in remote mode if there are still active inferiors.
2221
2222 2015-12-11 Yao Qi <yao.qi@linaro.org>
2223
2224 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2225 arm_breakpoint_at if the process is 32-bit.
2226
2227 2015-12-11 Yao Qi <yao.qi@linaro.org>
2228
2229 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2230 arm breakpoint.
2231
2232 2015-12-07 Yao Qi <yao.qi@linaro.org>
2233
2234 * configure.srv: Append arm.o to srv_tgtobj for
2235 aarch64*-*-linux* target.
2236 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2237 from linux-arm-low.c.
2238 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2239 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2240 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2241 (thumb2_breakpoint_len): Likewise.
2242 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2243 (arm_breakpoint_kinds): Likewise.
2244 (arm_breakpoint_kind_from_pc): Likewise.
2245 (arm_sw_breakpoint_from_kind): Likewise.
2246 (arm_breakpoint_kind_from_current_state): Likewise.
2247 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2248 (arm_sw_breakpoint_from_kind): Declare.
2249 (arm_breakpoint_kind_from_current_state): Declare.
2250 (arm_breakpoint_at): Declare.
2251 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2252 arm_sw_breakpoint_from_kind if process is 32-bit.
2253 (aarch64_breakpoint_kind_from_pc): New function.
2254 (aarch64_breakpoint_kind_from_current_state): New function.
2255 (the_low_target): Initialize fields breakpoint_kind_from_pc
2256 and breakpoint_kind_from_current_state.
2257 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2258 linux-aarch32-low.c.
2259 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2260 (arm_breakpoint, arm_breakpoint_len): Likewise.
2261 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2262 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2263 (arm_is_thumb_mode): Likewise.
2264 (arm_breakpoint_at): Likewise.
2265 (arm_breakpoint_kind_from_pc): Likewise.
2266 (arm_sw_breakpoint_from_kind): Likewise.
2267 (arm_breakpoint_kind_from_current_state): Likewise.
2268
2269 Revert:
2270 2015-08-04 Yao Qi <yao.qi@linaro.org>
2271
2272 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2273 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2274 * server.c (extended_protocol): Remove "static".
2275 * server.h (extended_protocol): Declare it.
2276
2277 2015-12-04 Josh Stone <jistone@redhat.com>
2278
2279 * target.h (struct target_ops) <arch_setup>: Rename to ...
2280 (struct target_ops) <post_create_inferior>: ... this.
2281 (target_arch_setup): Rename to ...
2282 (target_post_create_inferior): ... this, calling post_create_inferior.
2283 * server.c (start_inferior): Update target_arch_setup calls to
2284 target_post_create_inferior.
2285 * linux-low.c (linux_low_ptrace_options): Forward declare.
2286 (linux_arch_setup): Update its comment for general use.
2287 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2288 (struct linux_target_ops): Use linux_post_create_inferior.
2289 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2290 to post_create_inferior.
2291 * nto-low.c (struct nto_target_ops): Likewise.
2292 * spu-low.c (struct spu_target_ops): Likewise.
2293 * win32-low.c (struct win32_target_ops): Likewise.
2294
2295 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2296
2297 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2298
2299 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2300
2301 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2302 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2303 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2304 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2305 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2306 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2307 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2308 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2309 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2310 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2311 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2312 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2313
2314 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2315
2316 * linux-low.c (linux_look_up_symbols): Don't call
2317 linux_supports_traceclone.
2318 * linux-low.h (thread_db_init): Remove use_events argument.
2319 * thread-db.c (thread_db_use_event): Remove global variable.
2320 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2321 (struct thread_db) <td_create_bp>: Remove field.
2322 (thread_db_create_event): Remove function.
2323 (thread_db_enable_reporting): Likewise.
2324 (find_one_thread): Don't check for thread_db_use_events.
2325 (attach_thread): Likewise.
2326 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2327 (try_thread_db_load_1): Don't check for thread_db_use_events.
2328 (thread_db_init): Remove use_events argument and thread events
2329 handling.
2330 (remove_thread_event_breakpoints): Remove function.
2331 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2332
2333 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2334
2335 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2336 New function.
2337 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2338 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2339 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2340 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2341 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2342 Initialize.
2343 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2344 New function.
2345 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2346 * linux-low.c (can_hardware_single_step): Use
2347 supports_hardware_single_step.
2348 (can_software_single_step): New function.
2349 (start_step_over): Call can_software_single_step.
2350 (linux_supports_hardware_single_step): New function.
2351 (struct target_ops) <supports_software_single_step>: Initialize.
2352 * linux-low.h (struct linux_target_ops)
2353 <supports_hardware_single_step>: Initialize.
2354 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2355 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2356 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2357 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2358 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2359 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2360 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2361 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2362 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2363 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2364 Initialize.
2365 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2366 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2367 Initialize.
2368 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2369 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2370 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2371 New function.
2372 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2373 * target.h (struct target_ops): <supports_software_single_step>:
2374 New field.
2375 (target_supports_software_single_step): New macro.
2376
2377 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2378
2379 * linux-low.c (linux_wait_1): Fix pc advance condition.
2380 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2381 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2382
2383 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2384
2385 * linux-arm-low.c (arm_is_thumb_mode): New function.
2386 (arm_breakpoint_at): Use arm_is_thumb_mode.
2387 (arm_breakpoint_kind_from_current_state): New function.
2388 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2389 Initialize.
2390 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2391 (linux_breakpoint_kind_from_current_state): New function.
2392 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2393 * linux-low.h (struct linux_target_ops)
2394 <breakpoint_kind_from_current_state>: New field.
2395 * target.h (struct target_ops): Likewise.
2396 (target_breakpoint_kind_from_current_state): New macro.
2397
2398 2015-11-30 Pedro Alves <palves@redhat.com>
2399
2400 * linux-low.c (linux_resume): Wake up the event loop before
2401 returning.
2402
2403 2015-11-30 Pedro Alves <palves@redhat.com>
2404
2405 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2406 check.
2407 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2408 to -1.
2409 * target.c (struct thread_search): New structure.
2410 (thread_search_callback): New function.
2411 (prev_general_thread): New global.
2412 (prepare_to_access_memory, done_accessing_memory): New functions.
2413 * target.h (prepare_to_access_memory, done_accessing_memory):
2414 Replace macros with function declarations.
2415
2416 2015-11-30 Pedro Alves <palves@redhat.com>
2417
2418 PR 14618
2419 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2420 report TARGET_WAITKIND_NO_RESUMED.
2421 * remote-utils.c (prepare_resume_reply): Handle
2422 TARGET_WAITKIND_NO_RESUMED.
2423 * server.c (report_no_resumed): New global.
2424 (handle_query) <qSupported>: Handle "no-resumed+". Report
2425 "no-resumed+" support.
2426 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2427 return error if the client doesn't support no-resumed events.
2428 (push_stop_notification): New function.
2429 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2430 events if the client supports them.
2431
2432 2015-11-30 Pedro Alves <palves@redhat.com>
2433
2434 * linux-low.c (thread_still_has_status_pending_p): Don't check
2435 vCont;t here.
2436 (lwp_resumed): New function.
2437 (status_pending_p_callback): Return early if the LWP is not
2438 supposed to be resumed.
2439
2440 2015-11-30 Pedro Alves <palves@redhat.com>
2441
2442 * linux-low.c (handle_extended_wait): Assert that the LWP's
2443 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2444 thread create events, leave the new child's status pending.
2445 (linux_low_filter_event): If GDB wants to hear about thread exit
2446 events, leave the LWP marked dead and don't delete it.
2447 (linux_wait_for_event_filtered): Don't check for thread exit.
2448 (filter_exit_event): New function.
2449 (linux_wait_1): Use it, when returning an exit event.
2450 (linux_resume_one_lwp_throw): Assert that the LWP's
2451 waitstatus is TARGET_WAITKIND_IGNORE.
2452 * remote-utils.c (prepare_resume_reply): Handle
2453 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2454 * server.c (report_thread_events): New global.
2455 (handle_general_set): Handle QThreadEvents.
2456 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2457 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2458 TARGET_WAITKIND_THREAD_EXITED.
2459 * server.h (report_thread_events): Declare.
2460
2461 2015-11-30 Pedro Alves <palves@redhat.com>
2462
2463 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2464 the thread's last_resume_kind was resume_stop.
2465
2466 2015-11-30 Pedro Alves <palves@redhat.com>
2467
2468 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2469 before returning.
2470
2471 2015-11-30 Pedro Alves <palves@redhat.com>
2472
2473 * server.c (handle_v_requests): Handle vCtrlC.
2474
2475 2015-11-30 Pedro Alves <palves@redhat.com>
2476
2477 * gdbthread.h (find_any_thread_of_pid): Declare.
2478 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2479 functions.
2480 * server.c (handle_query): If current_thread is NULL, look for
2481 another thread of the selected process.
2482
2483 2015-11-26 Daniel Colascione <dancol@dancol.org>
2484 Simon Marchi <simon.marchi@ericsson.com>
2485
2486 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2487 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2488 name in reply.
2489 * target.h (struct target_ops) <thread_name>: New field.
2490 (target_thread_name): New macro.
2491
2492 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2493
2494 * regcache.h (regcache_invalidate_pid): Add declaration.
2495 * regcache.c (regcache_invalidate_pid): New function, extracted
2496 from regcache_invalidate.
2497 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2498 Add trivial documentation comment.
2499 * lynx-low.c: Use regcache_invalidate_pid instead of
2500 regcache_invalidate.
2501
2502 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2503
2504 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2505 and Elf64_auxv_t if the target is Android.
2506
2507 2015-11-22 Doug Evans <xdje42@gmail.com>
2508
2509 * target.h: #include <sys/types.h>.
2510
2511 2015-11-19 Pedro Alves <palves@redhat.com>
2512
2513 * linux-low.c (linux_process_qsupported): Change prototype.
2514 Adjust.
2515 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2516 Change prototype.
2517 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2518 and adjust to loop over all features.
2519 * server.c (handle_query) <qSupported>: Adjust to call
2520 target_process_qsupported once, passing it a vector of unprocessed
2521 features.
2522 * target.h (struct target_ops) <process_qsupported>: Change
2523 prototype.
2524 (target_process_qsupported): Adjust.
2525
2526 2015-11-19 Pedro Alves <palves@redhat.com>
2527
2528 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2529 mode.
2530 * configure: Regenerate.
2531
2532 2015-11-19 Pedro Alves <palves@redhat.com>
2533
2534 * configure: Regenerate.
2535
2536 2015-11-19 Yao Qi <yao.qi@linaro.org>
2537
2538 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2539 type to uint32_t.
2540
2541 2015-11-19 Yao Qi <yao.qi@linaro.org>
2542
2543 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2544 (struct aarch64_operand): Move enum out.
2545
2546 2015-11-19 Yao Qi <yao.qi@linaro.org>
2547
2548 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2549 struct user_fpsimd_state *.
2550 (aarch64_store_fpregset): Likewise.
2551
2552 2015-11-19 Yao Qi <yao.qi@linaro.org>
2553
2554 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2555 struct user_pt_regs *.
2556 (aarch64_store_gregset): Likewise.
2557
2558 2015-11-18 Pedro Alves <palves@redhat.com>
2559
2560 * Makefile.in (all_object_files): Add $IPA_OBJS.
2561
2562 2015-11-17 Pedro Alves <palves@redhat.com>
2563
2564 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2565 GDB_SIGNAL_0 and gdb_signal_to_string.
2566
2567 2015-11-17 Pedro Alves <palves@redhat.com>
2568
2569 * win32-low.c (handle_output_debug_string): Remove parameter.
2570 (win32_kill): Remove our_status local and adjust call to
2571 handle_output_debug_string.
2572 (get_child_debug_event): Adjust call to
2573 handle_output_debug_string.
2574
2575 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2576
2577 * linux-mips-low.c (mips_fill_gregset): Add cast.
2578 (mips_store_gregset): Likewise.
2579 (mips_fill_fpregset): Likewise.
2580 (mips_store_fpregset): Likewise.
2581
2582 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2583
2584 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2585 priv.
2586
2587 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2588
2589 * linux-mips-low.c (mips_linux_new_thread): Change type of
2590 watch_type to enum target_hw_bp_type.
2591
2592 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2593
2594 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2595 Change return type to arm_hwbp_type.
2596
2597 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2598
2599 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2600 (arm_store_gregset): Likewise.
2601 * linux-arm-low.c (arm_get_hwcap): Likewise.
2602 (arm_read_description): Likewise.
2603
2604 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2605
2606 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2607
2608 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2609
2610 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2611 (ppc_fill_vsxregset): Likewise.
2612 (ppc_store_vsxregset): Likewise.
2613 (ppc_fill_vrregset): Likewise.
2614 (ppc_store_vrregset): Likewise.
2615 (ppc_fill_evrregset): Likewise.
2616 (ppc_store_evrregset): Likewise.
2617
2618 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2619
2620 * linux-ppc-low.c (ppc_usrregs_info): Remove
2621 forward-declaration.
2622 (ppc_arch_setup): Move lower in file.
2623
2624 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2625
2626 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2627 (ps_pdwrite): Likewise.
2628
2629 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2630
2631 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2632 to after assert checks.
2633
2634 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2635
2636 * proc-service.c (ps_pdread): Add/adjust casts.
2637 (ps_pdwrite): Add/adjust casts.
2638
2639 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2640
2641 * server.c (handle_search_memory_1): Cast return value of
2642 memmem.
2643
2644 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2645
2646 * server.c (write_qxfer_response): Change type of data to
2647 gdb_byte *.
2648
2649 2015-10-29 Pedro Alves <palves@redhat.com>
2650
2651 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2652
2653 2015-10-29 Pedro Alves <palves@redhat.com>
2654
2655 * tracepoint.c (clear_installed_tracepoints): Add casts.
2656
2657 2015-10-29 Pedro Alves <palves@redhat.com>
2658
2659 * server.c (handle_v_cont, process_serial_event): Add enum
2660 gdb_signal casts to signal parsing code.
2661
2662 2015-10-29 Pedro Alves <palves@redhat.com>
2663
2664 * linux-low.h (NULL_REGSET): Define.
2665 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2666 * linux-arm-low.c (arm_regsets): Likewise.
2667 * linux-crisv32-low.c (cris_regsets): Likewise.
2668 * linux-m68k-low.c (m68k_regsets): Likewise.
2669 * linux-mips-low.c (mips_regsets): Likewise.
2670 * linux-nios2-low.c (nios2_regsets): Likewise.
2671 * linux-ppc-low.c (ppc_regsets): Likewise.
2672 * linux-s390-low.c (s390_regsets): Likewise.
2673 * linux-sh-low.c (sh_regsets): Likewise.
2674 * linux-sparc-low.c (sparc_regsets): Likewise.
2675 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2676 * linux-tile-low.c (tile_regsets): Likewise.
2677 * linux-x86-low.c (x86_regsets): Likewise.
2678 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2679
2680 2015-10-29 Pedro Alves <palves@redhat.com>
2681
2682 * linux-low.h (NULL_REGSET): Define.
2683 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2684 * linux-arm-low.c (arm_regsets): Likewise.
2685 * linux-crisv32-low.c (cris_regsets): Likewise.
2686 * linux-m68k-low.c (m68k_regsets): Likewise.
2687 * linux-mips-low.c (mips_regsets): Likewise.
2688 * linux-nios2-low.c (nios2_regsets): Likewise.
2689 * linux-ppc-low.c (ppc_regsets): Likewise.
2690 * linux-s390-low.c (s390_regsets): Likewise.
2691 * linux-sh-low.c (sh_regsets): Likewise.
2692 * linux-sparc-low.c (sparc_regsets): Likewise.
2693 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2694 * linux-tile-low.c (tile_regsets): Likewise.
2695 * linux-x86-low.c (x86_regsets): Likewise.
2696 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2697
2698 2015-10-26 Doug Evans <dje@google.com>
2699
2700 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2701
2702 2015-10-26 Doug Evans <dje@google.com>
2703
2704 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2705
2706 2015-10-26 Doug Evans <dje@google.com>
2707
2708 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2709 for debug_printf.
2710 (attach_thread, find_new_threads_callback): Ditto.
2711
2712 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2713
2714 * mem-break.h (set_breakpoint_data): Remove.
2715
2716 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2717
2718 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2719 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2720 (initialize_low): Remove set_breakpoint_data call.
2721 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2722 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2723 (initialize_low): Remove set_breakpoint_data call.
2724 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2725 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2726 (initialize_low): Remove set_breakpoint_data call.
2727
2728 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2729
2730 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2731 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2732 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2733 * target.h (target_breakpoint_kind_from_pc): New macro.
2734
2735 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2736
2737 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2738 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2739 the default breakpoint kind.
2740
2741 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2742
2743 * linux-arm-low.c (arm_supports_z_point_type): Add software
2744 breakpoint support.
2745
2746 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2747
2748 * linux-arm-low.c: Refactor breakpoint definitions.
2749 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2750 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2751
2752 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2753
2754 * Makefile.in: Add arm.c/o.
2755 * configure.srv: Likewise.
2756 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2757 (arm_breakpoint_kind_from_pc): New function.
2758 (arm_sw_breakpoint_from_kind): Return proper kind.
2759 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2760
2761 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2762
2763 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2764 removal.
2765 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2766 (struct raw_breakpoint) <size>: Remove.
2767 (struct raw_breakpoint) <kind>: Add.
2768 (bp_size): New function.
2769 (bp_opcode): Likewise.
2770 (find_raw_breakpoint_at): Adjust for kind.
2771 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2772 (remove_memory_breakpoint): Adjust for kind call bp_size.
2773 (set_raw_breakpoint_at): Adjust for kind.
2774 (set_breakpoint): Likewise.
2775 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2776 (delete_raw_breakpoint): Adjust for kind.
2777 (delete_breakpoint): Likewise.
2778 (find_gdb_breakpoint): Likewise.
2779 (set_gdb_breakpoint_1): Likewise.
2780 (set_gdb_breakpoint): Likewise.
2781 (delete_gdb_breakpoint_1): Likewise.
2782 (delete_gdb_breakpoint): Likewise.
2783 (uninsert_raw_breakpoint): Likewise.
2784 (reinsert_raw_breakpoint): Likewise.
2785 (set_breakpoint_data): Remove.
2786 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2787 (check_mem_read): Adjust for kind call bp_size.
2788 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2789 (clone_one_breakpoint): Adjust for kind.
2790 * mem-break.h (set_gdb_breakpoint): Likewise.
2791 (delete_gdb_breakpoint): Likewise.
2792 * server.c (process_serial_event): Likewise.
2793
2794 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2795
2796 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2797 (struct linux_target_ops) <breakpoint>: Remove.
2798 (struct linux_target_ops) <breakpoint_len>: Remove.
2799 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2800 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2801 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2802 (arm_sw_breakpoint_from_kind): New function.
2803 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2804 (struct linux_target_ops) <breakpoint>: Remove.
2805 (struct linux_target_ops) <breakpoint_len>: Remove.
2806 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2807 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2808 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2809 (struct linux_target_ops) <breakpoint>: Remove.
2810 (struct linux_target_ops) <breakpoint_len>: Remove.
2811 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2812 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2813 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2814 (struct linux_target_ops) <breakpoint>: Remove.
2815 (struct linux_target_ops) <breakpoint_len>: Remove.
2816 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2817 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2818 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2819 and sw_breakpoint_from_kind to increment the pc.
2820 (linux_breakpoint_kind_from_pc): New function.
2821 (linux_sw_breakpoint_from_kind): New function.
2822 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2823 (initialize_low): Call breakpoint_kind_from_pc and
2824 sw_breakpoint_from_kind to replace breakpoint_data/len.
2825 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2826 New field.
2827 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2828 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2834 (struct linux_target_ops) <breakpoint>: Remove.
2835 (struct linux_target_ops) <breakpoint_len>: Remove.
2836 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2837 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2838 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2839 (struct linux_target_ops) <breakpoint>: Remove.
2840 (struct linux_target_ops) <breakpoint_len>: Remove.
2841 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2842 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2843 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2844 (struct linux_target_ops) <breakpoint>: Remove.
2845 (struct linux_target_ops) <breakpoint_len>: Remove.
2846 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2847 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2848 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2849 (struct linux_target_ops) <breakpoint>: Remove.
2850 (struct linux_target_ops) <breakpoint_len>: Remove.
2851 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2852 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2853 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2854 (struct linux_target_ops) <breakpoint>: Remove.
2855 (struct linux_target_ops) <breakpoint_len>: Remove.
2856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2857 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2858 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2859 (struct linux_target_ops) <breakpoint>: Remove.
2860 (struct linux_target_ops) <breakpoint_len>: Remove.
2861 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2862 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2863 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2864 (struct linux_target_ops) <breakpoint>: Remove.
2865 (struct linux_target_ops) <breakpoint_len>: Remove.
2866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2868 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2869 (struct linux_target_ops) <breakpoint>: Remove.
2870 (struct linux_target_ops) <breakpoint_len>: Remove.
2871 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2872 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2873 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2874 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2875 (struct linux_target_ops) <breakpoint>: Remove.
2876 (struct linux_target_ops) <breakpoint_len>: Remove.
2877 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2878 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2879 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2880 (struct linux_target_ops) <breakpoint>: Remove.
2881 (struct linux_target_ops) <breakpoint_len>: Remove.
2882 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2883 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2884
2885 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2886
2887 * linux-cris-low.c (cris_get_pc): Remove void arg.
2888
2889 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2890
2891 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2892 variable name.
2893
2894 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2895
2896 * inferiors.c (thread_pid_matches_callback): New function.
2897 (find_thread_process): New function.
2898 (remove_thread): Reset current_thread.
2899 (remove_process): Assert threads have been removed first.
2900
2901 2015-10-15 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2904 if it is 3.
2905 (aarch64_remove_point): Likewise.
2906 * regcache.c (regcache_register_size): New function.
2907
2908 2015-10-12 Yao Qi <yao.qi@linaro.org>
2909
2910 * linux-aarch64-low.c: Update all callers as emit_load_store
2911 is renamed to aarch64_emit_load_store.
2912
2913 2015-10-12 Yao Qi <yao.qi@linaro.org>
2914
2915 * linux-aarch64-low.c: Update all callers of function renaming
2916 from emit_insn to aarch64_emit_insn.
2917
2918 2015-10-12 Yao Qi <yao.qi@linaro.org>
2919
2920 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2921 arch/aarch64-insn.h.
2922 (struct aarch64_memory_operand): Likewise.
2923 (ENCODE): Likewise.
2924 (emit_insn): Move to arch/aarch64-insn.c.
2925 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2926 (emit_load_store): Move to arch/aarch64-insn.c.
2927 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2928 (can_encode_int32): Remove.
2929
2930 2015-10-12 Yao Qi <yao.qi@linaro.org>
2931
2932 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2933 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2934 (aarch64_relocate_instruction): Likewise.
2935 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2936 (struct aarch64_insn_visitor): Likewise.
2937
2938 2015-10-12 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2941 (struct aarch64_insn_visitor): New.
2942 (struct aarch64_insn_relocation_data): New.
2943 (aarch64_ftrace_insn_reloc_b): New function.
2944 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2945 (aarch64_ftrace_insn_reloc_cb): Likewise.
2946 (aarch64_ftrace_insn_reloc_tb): Likewise.
2947 (aarch64_ftrace_insn_reloc_adr): Likewise.
2948 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2949 (aarch64_ftrace_insn_reloc_others): Likewise.
2950 (visitor): New.
2951 (aarch64_relocate_instruction): Use visitor.
2952
2953 2015-10-12 Yao Qi <yao.qi@linaro.org>
2954
2955 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2956 int. Add argument buf.
2957 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2958 aarch64_relocate_instruction.
2959
2960 2015-10-12 Yao Qi <yao.qi@linaro.org>
2961
2962 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2963 argument insn. Remove local variable insn. Don't call
2964 target_read_uint32.
2965 (aarch64_install_fast_tracepoint_jump_pad): Call
2966 target_read_uint32.
2967
2968 2015-09-30 Yao Qi <yao.qi@linaro.org>
2969
2970 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2971 (emit_load_store_pair): Likewise.
2972
2973 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2974
2975 * dll.c (match_dll): Add cast(s).
2976 (unloaded_dll): Likewise.
2977 * linux-low.c (second_thread_of_pid_p): Likewise.
2978 (delete_lwp_callback): Likewise.
2979 (count_events_callback): Likewise.
2980 (select_event_lwp_callback): Likewise.
2981 (linux_set_resume_request): Likewise.
2982 * server.c (accumulate_file_name_length): Likewise.
2983 (emit_dll_description): Likewise.
2984 (handle_qxfer_threads_worker): Likewise.
2985 (visit_actioned_threads): Likewise.
2986 * thread-db.c (any_thread_of): Likewise.
2987 * tracepoint.c (same_process_p): Likewise.
2988 (match_blocktype): Likewise.
2989 (build_traceframe_info_xml): Likewise.
2990
2991 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2992
2993 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2994 assignment.
2995 (gdb_unparse_agent_expr): Likewise.
2996 * hostio.c (require_data): Likewise.
2997 (handle_pread): Likewise.
2998 * linux-low.c (disable_regset): Likewise.
2999 (fetch_register): Likewise.
3000 (store_register): Likewise.
3001 (get_dynamic): Likewise.
3002 (linux_qxfer_libraries_svr4): Likewise.
3003 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3004 (set_fast_tracepoint_jump): Likewise.
3005 (uninsert_fast_tracepoint_jumps_at): Likewise.
3006 (reinsert_fast_tracepoint_jumps_at): Likewise.
3007 (validate_inserted_breakpoint): Likewise.
3008 (clone_agent_expr): Likewise.
3009 * regcache.c (init_register_cache): Likewise.
3010 * remote-utils.c (putpkt_binary_1): Likewise.
3011 (decode_M_packet): Likewise.
3012 (decode_X_packet): Likewise.
3013 (look_up_one_symbol): Likewise.
3014 (relocate_instruction): Likewise.
3015 (monitor_output): Likewise.
3016 * server.c (handle_search_memory): Likewise.
3017 (handle_qxfer_exec_file): Likewise.
3018 (handle_qxfer_libraries): Likewise.
3019 (handle_qxfer): Likewise.
3020 (handle_query): Likewise.
3021 (handle_v_cont): Likewise.
3022 (handle_v_run): Likewise.
3023 (captured_main): Likewise.
3024 * target.c (write_inferior_memory): Likewise.
3025 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3026 * tracepoint.c (init_trace_buffer): Likewise.
3027 (add_tracepoint_action): Likewise.
3028 (add_traceframe): Likewise.
3029 (add_traceframe_block): Likewise.
3030 (cmd_qtdpsrc): Likewise.
3031 (cmd_qtdv): Likewise.
3032 (cmd_qtstatus): Likewise.
3033 (response_source): Likewise.
3034 (response_tsv): Likewise.
3035 (cmd_qtnotes): Likewise.
3036 (gdb_collect): Likewise.
3037 (initialize_tracepoint): Likewise.
3038
3039 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3040
3041 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3042 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3043 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3044 <NOP>: New.
3045 (enum aarch64_condition_codes): New enum.
3046 (w0): New static global.
3047 (fp): Likewise.
3048 (lr): Likewise.
3049 (struct aarch64_memory_operand) <type>: New
3050 MEMORY_OPERAND_POSTINDEX type.
3051 (postindex_memory_operand): New helper function.
3052 (emit_ret): New function.
3053 (emit_load_store_pair): New function, factored out of emit_stp
3054 with support for MEMORY_OPERAND_POSTINDEX.
3055 (emit_stp): Rewrite using emit_load_store_pair.
3056 (emit_ldp): New function.
3057 (emit_load_store): Likewise.
3058 (emit_ldr): Mention post-index instruction in comment.
3059 (emit_ldrh): New function.
3060 (emit_ldrb): New function.
3061 (emit_ldrsw): Mention post-index instruction in comment.
3062 (emit_str): Likewise.
3063 (emit_subs): New function.
3064 (emit_cmp): Likewise.
3065 (emit_and): Likewise.
3066 (emit_orr): Likewise.
3067 (emit_orn): Likewise.
3068 (emit_eor): Likewise.
3069 (emit_mvn): Likewise.
3070 (emit_lslv): Likewise.
3071 (emit_lsrv): Likewise.
3072 (emit_asrv): Likewise.
3073 (emit_mul): Likewise.
3074 (emit_sbfm): Likewise.
3075 (emit_sbfx): Likewise.
3076 (emit_ubfm): Likewise.
3077 (emit_ubfx): Likewise.
3078 (emit_csinc): Likewise.
3079 (emit_cset): Likewise.
3080 (emit_nop): Likewise.
3081 (emit_ops_insns): New helper function.
3082 (emit_pop): Likewise.
3083 (emit_push): Likewise.
3084 (aarch64_emit_prologue): New function.
3085 (aarch64_emit_epilogue): Likewise.
3086 (aarch64_emit_add): Likewise.
3087 (aarch64_emit_sub): Likewise.
3088 (aarch64_emit_mul): Likewise.
3089 (aarch64_emit_lsh): Likewise.
3090 (aarch64_emit_rsh_signed): Likewise.
3091 (aarch64_emit_rsh_unsigned): Likewise.
3092 (aarch64_emit_ext): Likewise.
3093 (aarch64_emit_log_not): Likewise.
3094 (aarch64_emit_bit_and): Likewise.
3095 (aarch64_emit_bit_or): Likewise.
3096 (aarch64_emit_bit_xor): Likewise.
3097 (aarch64_emit_bit_not): Likewise.
3098 (aarch64_emit_equal): Likewise.
3099 (aarch64_emit_less_signed): Likewise.
3100 (aarch64_emit_less_unsigned): Likewise.
3101 (aarch64_emit_ref): Likewise.
3102 (aarch64_emit_if_goto): Likewise.
3103 (aarch64_emit_goto): Likewise.
3104 (aarch64_write_goto_address): Likewise.
3105 (aarch64_emit_const): Likewise.
3106 (aarch64_emit_call): Likewise.
3107 (aarch64_emit_reg): Likewise.
3108 (aarch64_emit_pop): Likewise.
3109 (aarch64_emit_stack_flush): Likewise.
3110 (aarch64_emit_zero_ext): Likewise.
3111 (aarch64_emit_swap): Likewise.
3112 (aarch64_emit_stack_adjust): Likewise.
3113 (aarch64_emit_int_call_1): Likewise.
3114 (aarch64_emit_void_call_2): Likewise.
3115 (aarch64_emit_eq_goto): Likewise.
3116 (aarch64_emit_ne_goto): Likewise.
3117 (aarch64_emit_lt_goto): Likewise.
3118 (aarch64_emit_le_goto): Likewise.
3119 (aarch64_emit_gt_goto): Likewise.
3120 (aarch64_emit_ge_got): Likewise.
3121 (aarch64_emit_ops_impl): New static global variable.
3122 (aarch64_emit_ops): New target function, return
3123 &aarch64_emit_ops_impl.
3124 (struct linux_target_ops): Install it.
3125
3126 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3127
3128 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3129 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3130 aarch64-ipa.o.
3131 * linux-aarch64-ipa.c: New file.
3132 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3133 and endian.h.
3134 (aarch64_get_thread_area): New target method.
3135 (extract_signed_bitfield): New helper function.
3136 (aarch64_decode_ldr_literal): New function.
3137 (enum aarch64_opcodes): New enum.
3138 (struct aarch64_register): New struct.
3139 (struct aarch64_operand): New struct.
3140 (x0): New static global.
3141 (x1): Likewise.
3142 (x2): Likewise.
3143 (x3): Likewise.
3144 (x4): Likewise.
3145 (w2): Likewise.
3146 (ip0): Likewise.
3147 (sp): Likewise.
3148 (xzr): Likewise.
3149 (aarch64_register): New helper function.
3150 (register_operand): Likewise.
3151 (immediate_operand): Likewise.
3152 (struct aarch64_memory_operand): New struct.
3153 (offset_memory_operand): New helper function.
3154 (preindex_memory_operand): Likewise.
3155 (enum aarch64_system_control_registers): New enum.
3156 (ENCODE): New macro.
3157 (emit_insn): New helper function.
3158 (emit_b): New function.
3159 (emit_bcond): Likewise.
3160 (emit_cb): Likewise.
3161 (emit_tb): Likewise.
3162 (emit_blr): Likewise.
3163 (emit_stp): Likewise.
3164 (emit_ldp_q_offset): Likewise.
3165 (emit_stp_q_offset): Likewise.
3166 (emit_load_store): Likewise.
3167 (emit_ldr): Likewise.
3168 (emit_ldrsw): Likewise.
3169 (emit_str): Likewise.
3170 (emit_ldaxr): Likewise.
3171 (emit_stxr): Likewise.
3172 (emit_stlr): Likewise.
3173 (emit_data_processing_reg): Likewise.
3174 (emit_data_processing): Likewise.
3175 (emit_add): Likewise.
3176 (emit_sub): Likewise.
3177 (emit_mov): Likewise.
3178 (emit_movk): Likewise.
3179 (emit_mov_addr): Likewise.
3180 (emit_mrs): Likewise.
3181 (emit_msr): Likewise.
3182 (emit_sevl): Likewise.
3183 (emit_wfe): Likewise.
3184 (append_insns): Likewise.
3185 (can_encode_int32_in): New helper function.
3186 (aarch64_relocate_instruction): New function.
3187 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3188 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3189 (struct linux_target_ops): Install aarch64_get_thread_area,
3190 aarch64_install_fast_tracepoint_jump_pad and
3191 aarch64_get_min_fast_tracepoint_insn_len.
3192
3193 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3194
3195 * Makefile.in (aarch64-insn.o): New rule.
3196 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3197
3198 2015-09-21 Yao Qi <yao.qi@linaro.org>
3199
3200 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3201
3202 2015-09-21 Yao Qi <yao.qi@linaro.org>
3203
3204 * tracepoint.c (max_jump_pad_size): Remove.
3205
3206 2015-09-18 Yao Qi <yao.qi@linaro.org>
3207
3208 * linux-aarch64-low.c: Don't include sys/uio.h.
3209 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3210
3211 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3212
3213 * tracepoint.c (eval_result_type): Change prototype.
3214 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3215
3216 2015-09-15 Pedro Alves <palves@redhat.com>
3217
3218 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3219 Check whether to report exec events instead of checking whether
3220 multiprocess is enabled.
3221
3222 2015-09-15 Pedro Alves <palves@redhat.com>
3223
3224 PR remote/18965
3225 * remote-utils.c (prepare_resume_reply): Merge
3226 TARGET_WAITKIND_VFORK_DONE switch case with the
3227 TARGET_WAITKIND_FORKED case.
3228
3229 2015-09-15 Yao Qi <yao.qi@linaro.org>
3230
3231 * server.c (handle_query): Check string comparison using
3232 "else if" instead of "if".
3233
3234 2015-09-15 Yao Qi <yao.qi@linaro.org>
3235
3236 * server.c (vCont_supported): New global variable.
3237 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3238 matches. Append ";vContSupported+" to own_buf.
3239 (handle_v_requests): Append ";s;S" to own_buf if target supports
3240 hardware single step or vCont_supported is false.
3241 (capture_main): Set vCont_supported to zero.
3242
3243 2015-09-15 Yao Qi <yao.qi@linaro.org>
3244
3245 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3246 it to ...
3247 (linux_supports_hardware_single_step): ... New function.
3248 (linux_target_ops): Update.
3249 * lynx-low.c (lynx_target_ops): Set field
3250 supports_hardware_single_step to target_can_do_hardware_single_step.
3251 * nto-low.c (nto_target_ops): Likewise.
3252 * spu-low.c (spu_target_ops): Likewise.
3253 * win32-low.c (win32_target_ops): Likewise.
3254 * target.c (target_can_do_hardware_single_step): New function.
3255 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3256 Remove. <supports_hardware_single_step>: New field.
3257 (target_supports_conditional_breakpoints): Remove.
3258 (target_supports_hardware_single_step): New macro.
3259 (target_can_do_hardware_single_step): Declare.
3260 * server.c (handle_query): Use target_supports_hardware_single_step
3261 instead of target_supports_conditional_breakpoints.
3262
3263 2015-09-15 Yao Qi <yao.qi@linaro.org>
3264
3265 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3266 function.
3267 (struct linux_target_ops the_low_target): Install
3268 aarch64_linux_siginfo_fixup.
3269
3270 2015-09-11 Don Breazeal <donb@codesourcery.com>
3271 Luis Machado <lgustavo@codesourcery.com>
3272
3273 * linux-low.c (linux_mourn): Static declaration.
3274 (linux_arch_setup): Move in front of
3275 handle_extended_wait.
3276 (linux_arch_setup_thread): New function.
3277 (handle_extended_wait): Handle exec events. Call
3278 linux_arch_setup_thread. Make event_lwp argument a
3279 pointer-to-a-pointer.
3280 (check_zombie_leaders): Do not check stopped threads.
3281 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3282 (linux_low_filter_event): Add lwp and thread for exec'ing
3283 non-leader thread if leader thread has been deleted.
3284 Refactor code into linux_arch_setup_thread and call it.
3285 Pass child lwp pointer by reference to handle_extended_wait.
3286 (linux_wait_for_event_filtered): Update comment.
3287 (linux_wait_1): Prevent clobbering exec event status.
3288 (linux_supports_exec_events): New function.
3289 (linux_target_ops) <supports_exec_events>: Initialize new member.
3290 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3291 new member.
3292 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3293 * server.c (report_exec_events): New global variable.
3294 (handle_query): Handle qSupported query for exec-events feature.
3295 (captured_main): Initialize report_exec_events.
3296 * server.h (report_exec_events): Declare new global variable.
3297 * target.h (struct target_ops) <supports_exec_events>: New
3298 member.
3299 (target_supports_exec_events): New macro.
3300 * win32-low.c (win32_target_ops) <supports_exec_events>:
3301 Initialize new member.
3302
3303 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3304
3305 * linux-low.c (linux_low_enable_btrace): Remove.
3306 (linux_target_ops): Replace linux_low_enable_btrace with
3307 linux_enable_btrace.
3308
3309 2015-09-03 Yao Qi <yao.qi@linaro.org>
3310
3311 * linux-aarch64-low.c (aarch64_insert_point): Call
3312 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3313 returns true.
3314
3315 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3316
3317 * linux-low.c (check_stopped_by_breakpoint): Use
3318 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3319
3320 2015-08-27 Pedro Alves <palves@redhat.com>
3321
3322 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3323
3324 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3325
3326 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3327 the XNEW-family equivalent.
3328 (compile_bytecodes): Likewise.
3329 * dll.c (loaded_dll): Likewise.
3330 * event-loop.c (append_callback_event): Likewise.
3331 (create_file_handler): Likewise.
3332 (create_file_event): Likewise.
3333 * hostio.c (handle_open): Likewise.
3334 * inferiors.c (add_thread): Likewise.
3335 (add_process): Likewise.
3336 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3337 * linux-arm-low.c (arm_new_process): Likewise.
3338 (arm_new_thread): Likewise.
3339 * linux-low.c (add_to_pid_list): Likewise.
3340 (linux_add_process): Likewise.
3341 (handle_extended_wait): Likewise.
3342 (add_lwp): Likewise.
3343 (enqueue_one_deferred_signal): Likewise.
3344 (enqueue_pending_signal): Likewise.
3345 (linux_resume_one_lwp_throw): Likewise.
3346 (linux_resume_one_thread): Likewise.
3347 (linux_read_memory): Likewise.
3348 (linux_write_memory): Likewise.
3349 * linux-mips-low.c (mips_linux_new_process): Likewise.
3350 (mips_linux_new_thread): Likewise.
3351 (mips_add_watchpoint): Likewise.
3352 * linux-x86-low.c (initialize_low_arch): Likewise.
3353 * lynx-low.c (lynx_add_process): Likewise.
3354 * mem-break.c (set_raw_breakpoint_at): Likewise.
3355 (set_breakpoint): Likewise.
3356 (add_condition_to_breakpoint): Likewise.
3357 (add_commands_to_breakpoint): Likewise.
3358 (clone_agent_expr): Likewise.
3359 (clone_one_breakpoint): Likewise.
3360 * regcache.c (new_register_cache): Likewise.
3361 * remote-utils.c (look_up_one_symbol): Likewise.
3362 * server.c (queue_stop_reply): Likewise.
3363 (start_inferior): Likewise.
3364 (queue_stop_reply_callback): Likewise.
3365 (handle_target_event): Likewise.
3366 * spu-low.c (fetch_ppc_memory): Likewise.
3367 (store_ppc_memory): Likewise.
3368 * target.c (set_target_ops): Likewise.
3369 * thread-db.c (thread_db_load_search): Likewise.
3370 (try_thread_db_load_1): Likewise.
3371 * tracepoint.c (add_tracepoint): Likewise.
3372 (add_tracepoint_action): Likewise.
3373 (create_trace_state_variable): Likewise.
3374 (cmd_qtdpsrc): Likewise.
3375 (cmd_qtro): Likewise.
3376 (add_while_stepping_state): Likewise.
3377 * win32-low.c (child_add_thread): Likewise.
3378 (get_image_name): Likewise.
3379
3380 2015-08-25 Yao Qi <yao.qi@linaro.org>
3381
3382 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3383
3384 2015-08-25 Yao Qi <yao.qi@linaro.org>
3385
3386 * Makefile.in (aarch64-linux.o): New rule.
3387 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3388 srv_tgtobj.
3389 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3390 (aarch64_init_debug_reg_state): Make it extern.
3391 (aarch64_linux_prepare_to_resume): Remove.
3392
3393 2015-08-25 Yao Qi <yao.qi@linaro.org>
3394
3395 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3396 lwp_arch_private_info and ptid_of_lwp.
3397
3398 2015-08-25 Yao Qi <yao.qi@linaro.org>
3399
3400 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3401 Find proc_info by find_process_pid. All callers updated.
3402
3403 2015-08-25 Yao Qi <yao.qi@linaro.org>
3404
3405 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3406 Remove.
3407 (debug_reg_change_callback): Remove.
3408 (aarch64_notify_debug_reg_change): Remove.
3409
3410 2015-08-25 Yao Qi <yao.qi@linaro.org>
3411
3412 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3413 Call current_lwp_ptid.
3414
3415 2015-08-25 Yao Qi <yao.qi@linaro.org>
3416
3417 * linux-aarch64-low.c (debug_reg_change_callback): Use
3418 debug_printf.
3419
3420 2015-08-25 Yao Qi <yao.qi@linaro.org>
3421
3422 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3423
3424 2015-08-25 Yao Qi <yao.qi@linaro.org>
3425
3426 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3427
3428 2015-08-25 Yao Qi <yao.qi@linaro.org>
3429
3430 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3431 the code.
3432
3433 2015-08-25 Yao Qi <yao.qi@linaro.org>
3434
3435 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3436 Remove.
3437 (debug_reg_change_callback): Remove argument entry and add argument
3438 lwp. Remove local variable thread. Don't print thread id in the
3439 debugging output. Don't check whether pid of thread equals to pid.
3440 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3441 iterate_over_lwps instead find_inferior.
3442
3443 2015-08-24 Pedro Alves <palves@redhat.com>
3444
3445 * inferiors.c (get_first_process): New function.
3446 * inferiors.h (get_first_process): New declaration.
3447 * remote-utils.c (read_ptid): Default to the first process in the
3448 list, instead of to the current thread's process.
3449
3450 2015-08-24 Pedro Alves <palves@redhat.com>
3451
3452 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3453 * event-loop.c: Likewise.
3454 * remote-utils.c: Likewise.
3455 * tracepoint.c: Likewise.
3456
3457 2015-08-24 Pedro Alves <palves@redhat.com>
3458
3459 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3460 ptid_get_lwp.
3461
3462 2015-08-21 Pedro Alves <palves@redhat.com>
3463
3464 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3465 instead of literal 1.
3466
3467 2015-08-21 Pedro Alves <palves@redhat.com>
3468
3469 * tdesc.c (default_description): Explicitly zero-initialize.
3470
3471 2015-08-21 Pedro Alves <palves@redhat.com>
3472
3473 PR gdb/18749
3474 * inferiors.c (remove_thread): Discard any pending stop reply for
3475 this thread.
3476 * server.c (remove_all_on_match_pid): Rename to ...
3477 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3478 instead of a pid.
3479 (discard_queued_stop_replies): Change parameter to a ptid. Now
3480 extern.
3481 (handle_v_kill, kill_inferior_callback, captured_main)
3482 (process_serial_event): Adjust.
3483 * server.h (discard_queued_stop_replies): Declare.
3484
3485 2015-08-21 Pedro Alves <palves@redhat.com>
3486
3487 * linux-low.c (wait_for_sigstop): Always switch to no thread
3488 selected if the previously current thread dies.
3489 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3490 process instead of the current thread's.
3491 * remote-utils.c (input_interrupt): Don't check if there's no
3492 current thread.
3493 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3494 current thread to the general thread fails, error out.
3495 (handle_qxfer_auxv, handle_qxfer_libraries)
3496 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3497 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3498 (handle_query): Check if there's a thread selected instead of
3499 checking whether there's any thread in the thread list.
3500 (handle_qxfer_threads, handle_qxfer_btrace)
3501 (handle_qxfer_btrace_conf): Don't error out early if there's no
3502 thread in the thread list.
3503 (handle_v_cont, myresume): Don't set the current thread to the
3504 continue thread.
3505 (process_serial_event) <Hg handling>: Also set thread_id if the
3506 previous general thread is still alive.
3507 (process_serial_event) <g/G handling>: If setting the current
3508 thread to the general thread fails, error out.
3509 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3510 thread's lwp instead of the current thread's.
3511 * target.c (set_desired_thread): If the desired thread was not
3512 found, leave the current thread pointing to NULL. Return an int
3513 (boolean) indicating success.
3514 * target.h (set_desired_thread): Change return type to int.
3515
3516 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3517
3518 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3519 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3520 #includes.
3521 (ps_get_thread_area): New function.
3522
3523 2015-08-19 Gary Benson <gbenson@redhat.com>
3524
3525 * hostio.c (handle_pread): Do not attempt to read more data
3526 than hostio_reply_with_data can fit in a packet.
3527
3528 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3529
3530 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3531
3532 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3533
3534 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3535
3536 2015-08-06 Pedro Alves <palves@redhat.com>
3537
3538 * tracepoint.c (expr_eval_result): Now an int.
3539
3540 2015-08-06 Pedro Alves <palves@redhat.com>
3541
3542 * gdbthread.h (struct regcache): Forward declare.
3543 (struct thread_info) <regcache_data>: Now a struct regcache
3544 pointer.
3545 * inferiors.c (inferior_regcache_data)
3546 (set_inferior_regcache_data): Now work with struct regcache
3547 pointers.
3548 * inferiors.h (struct regcache): Forward declare.
3549 (inferior_regcache_data, set_inferior_regcache_data): Now work
3550 with struct regcache pointers.
3551 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3552 (free_register_cache_thread): Remove struct regcache pointer
3553 casts.
3554
3555 2015-08-06 Pedro Alves <palves@redhat.com>
3556
3557 * server.c (captured_main): On error, print the exception message
3558 to stderr, and if run_once is set, throw a quit.
3559
3560 2015-08-06 Pedro Alves <palves@redhat.com>
3561
3562 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3563 the current thread.
3564
3565 2015-08-06 Pedro Alves <palves@redhat.com>
3566
3567 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3568 reading beyond the passed in buffer length.
3569
3570 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3571
3572 * tracepoint.c (symbol_list) <required>: Remove.
3573
3574 2015-08-06 Pedro Alves <palves@redhat.com>
3575
3576 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3577 count if stopping and suspending threads.
3578 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3579 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3580 (linux_detach): Complete an ongoing step-over.
3581 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3582 throughout.
3583 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3584 (linux_wait_1): If passing a signal to the inferior after
3585 finishing a step-over, unsuspend and re-resume all lwps. If we
3586 see a single-step event but the thread should be continuing, don't
3587 pass the trap to gdb.
3588 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3589 internal_error instead of gdb_assert.
3590 (enqueue_pending_signal): New function.
3591 (check_ptrace_stopped_lwp_gone): Add debug output.
3592 (start_step_over): Use internal_error instead of gdb_assert.
3593 (complete_ongoing_step_over): New function.
3594 (linux_resume_one_thread): Don't resume a suspended thread.
3595 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3596 it stepping.
3597
3598 2015-08-06 Pedro Alves <palves@redhat.com>
3599
3600 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3601 (linux_thread_alive): Use lwp_is_marked_dead.
3602 (extended_event_reported): Delete.
3603 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3604 instead of extended_event_reported.
3605 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3606 as well.
3607 (lwp_is_marked_dead): New function.
3608 (lwp_running): Use lwp_is_marked_dead.
3609 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3610 comment.
3611
3612 2015-08-06 Pedro Alves <palves@redhat.com>
3613
3614 * linux-low.c (linux_wait_1): Move fork event output out of the
3615 !report_to_gdb check. Pass event_child->waitstatus to
3616 target_waitstatus_to_string instead of ourstatus.
3617
3618 2015-08-04 Yao Qi <yao.qi@linaro.org>
3619
3620 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3621 if current_thread is 32 bit.
3622
3623 2015-08-04 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3626 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3627 * server.c (extended_protocol): Remove "static".
3628 * server.h (extended_protocol): Declare it.
3629
3630 2015-08-04 Yao Qi <yao.qi@linaro.org>
3631
3632 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3633 both aarch64 and aarch32.
3634 (aarch64_set_pc): Likewise.
3635
3636 2015-08-04 Yao Qi <yao.qi@linaro.org>
3637
3638 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3639 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3640 arm-with-neon.xml to srv_xmlfiles.
3641 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3642 (is_64bit_tdesc): New function.
3643 (aarch64_linux_read_description): New function.
3644 (aarch64_arch_setup): Call aarch64_linux_read_description.
3645 (regs_info): Rename to regs_info_aarch64.
3646 (aarch64_regs_info): Return right regs_info.
3647 (initialize_low_arch): Call initialize_low_arch_aarch32.
3648
3649 2015-08-04 Yao Qi <yao.qi@linaro.org>
3650
3651 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3652 * linux-aarch32-low.c: New file.
3653 * linux-aarch32-low.h: New file.
3654 * linux-arm-low.c (arm_fill_gregset): Move it to
3655 linux-aarch32-low.c.
3656 (arm_store_gregset): Likewise.
3657 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3658 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3659 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3660 (regs_info): Rename to regs_info_arm.
3661 (arm_regs_info): Return regs_info_aarch32 if
3662 have_ptrace_getregset is 1 and target description is
3663 arm_with_neon or arm_with_vfpv3.
3664 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3665 Call initialize_low_arch_aarch32 instead.
3666
3667 2015-08-04 Yao Qi <yao.qi@linaro.org>
3668
3669 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3670 * linux-low.c: ... here.
3671 * linux-low.h (have_ptrace_getregset): Declare it.
3672
3673 2015-08-04 Pedro Alves <palves@redhat.com>
3674
3675 * thread-db.c (struct thread_db): Use new typedefs.
3676 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3677 CHK calls.
3678 (disable_thread_event_reporting): Cast result of dlsym to
3679 destination function pointer type.
3680 (thread_db_mourn): Use td_ta_delete_ftype.
3681
3682 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3683
3684 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3685 arch variant.
3686 (CDX_BREAKPOINT): Define for R2.
3687 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3688 (the_low_target): Add comments.
3689
3690 2015-07-30 Yao Qi <yao.qi@linaro.org>
3691
3692 * linux-arm-low.c (arm_hwcap): Remove it.
3693 (arm_read_description): New local variable arm_hwcap. Don't
3694 set arm_hwcap to zero.
3695
3696 2015-07-30 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3699 Use regcache->tdesc instead.
3700 (arm_store_wmmxregset): Likewise.
3701 (arm_fill_vfpregset): Likewise.
3702 (arm_store_vfpregset): Likewise.
3703
3704 2015-07-30 Yao Qi <yao.qi@linaro.org>
3705
3706 * linux-arm-low.c: Include arch/arm.h.
3707 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3708 (arm_store_gregset): Likewise.
3709
3710 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3711
3712 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3713 ptrace's 4th parameter.
3714
3715 2015-07-27 Yao Qi <yao.qi@linaro.org>
3716
3717 * configure.srv (case aarch64*-*-linux*): Don't set
3718 srv_linux_usrregs.
3719
3720 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3721
3722 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3723 sys/ptrace.h.
3724 * linux-arm-low.c: Likewise.
3725 * linux-cris-low.c: Likewise.
3726 * linux-crisv32-low.c: Likewise.
3727 * linux-low.c: Likewise.
3728 * linux-m68k-low.c: Likewise.
3729 * linux-mips-low.c: Likewise.
3730 * linux-nios2-low.c: Likewise.
3731 * linux-s390-low.c: Likewise.
3732 * linux-sparc-low.c: Likewise.
3733 * linux-tic6x-low.c: Likewise.
3734 * linux-tile-low.c: Likewise.
3735 * linux-x86-low.c: Likewise.
3736
3737 2015-07-24 Pedro Alves <palves@redhat.com>
3738
3739 * config.in: Regenerate.
3740 * configure: Regenerate.
3741
3742 2015-07-24 Pedro Alves <palves@redhat.com>
3743
3744 * acinclude.m4: Include ../ptrace.m4.
3745 * configure.ac: Call GDB_AC_PTRACE.
3746 * config.in, configure: Regenerate.
3747
3748 2015-07-24 Yao Qi <yao.qi@linaro.org>
3749
3750 * linux-low.c (linux_create_inferior): Remove setting to
3751 proc->priv->new_inferior.
3752 (linux_attach): Likewise.
3753 (linux_low_filter_event): Likewise.
3754 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3755
3756 2015-07-24 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-low.c (linux_arch_setup): New function.
3759 (linux_low_filter_event): If proc->tdesc is NULL and
3760 proc->attached is true, call the_low_target.arch_setup.
3761 Otherwise, keep status pending, and return.
3762 (linux_resume_one_lwp_throw): Don't call get_pc if
3763 thread->while_stepping isn't NULL. Don't call
3764 get_thread_regcache if proc->tdesc is NULL.
3765 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3766 (linux_target_ops): Install arch_setup.
3767 * server.c (start_inferior): Call the_target->arch_setup.
3768 * target.h (struct target_ops) <arch_setup>: New field.
3769 (target_arch_setup): New marco.
3770 * lynx-low.c (lynx_target_ops): Update.
3771 * nto-low.c (nto_target_ops): Update.
3772 * spu-low.c (spu_target_ops): Update.
3773 * win32-low.c (win32_target_ops): Update.
3774
3775 2015-07-24 Yao Qi <yao.qi@linaro.org>
3776
3777 * linux-low.c (linux_add_process): Don't set
3778 proc->priv->new_inferior.
3779 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3780 (linux_attach): Likewise.
3781
3782 2015-07-24 Yao Qi <yao.qi@linaro.org>
3783
3784 * server.c (start_inferior): Code refactor.
3785
3786 2015-07-24 Yao Qi <yao.qi@linaro.org>
3787
3788 * server.c (process_serial_event): Set general_thread.
3789
3790 2015-07-21 Yao Qi <yao.qi@linaro.org>
3791
3792 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3793 aarch64_linux_get_debug_reg_capacity.
3794
3795 2015-07-17 Yao Qi <yao.qi@linaro.org>
3796
3797 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3798 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3799 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3800 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3801 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3802 (AARCH64_HWP_ALIGNMENT): Likewise.
3803 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3804 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3805 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3806 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3807 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3808 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3809 (struct aarch64_debug_reg_state): Likewise.
3810 (struct arch_lwp_info): Likewise.
3811 (aarch64_align_watchpoint): Likewise.
3812 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3813 (aarch64_watchpoint_length): Likewise.
3814 (aarch64_point_encode_ctrl_reg): Likewise
3815 (aarch64_point_is_aligned): Likewise.
3816 (aarch64_align_watchpoint): Likewise.
3817 (aarch64_linux_set_debug_regs):
3818 (aarch64_dr_state_insert_one_point): Likewise.
3819 (aarch64_dr_state_remove_one_point): Likewise.
3820 (aarch64_handle_breakpoint): Likewise.
3821 (aarch64_handle_aligned_watchpoint): Likewise.
3822 (aarch64_handle_unaligned_watchpoint): Likewise.
3823 (aarch64_handle_watchpoint): Likewise.
3824
3825 2015-07-17 Yao Qi <yao.qi@linaro.org>
3826
3827 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3828 and don't aarch64_get_debug_reg_state. All callers update.
3829 (aarch64_handle_aligned_watchpoint): Likewise.
3830 (aarch64_handle_unaligned_watchpoint): Likewise.
3831 (aarch64_handle_watchpoint): Likewise.
3832 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3833 (aarch64_remove_point): Likewise.
3834
3835 2015-07-17 Yao Qi <yao.qi@linaro.org>
3836
3837 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3838 debug_printf.
3839 (aarch64_handle_unaligned_watchpoint): Likewise.
3840
3841 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3842
3843 Revert the previous 3 commits:
3844 Move gdb_regex* to common/
3845 Move linux_find_memory_regions_full & co.
3846 gdbserver build-id attribute generator
3847
3848 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3849 Jan Kratochvil <jan.kratochvil@redhat.com>
3850
3851 gdbserver build-id attribute generator.
3852 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3853 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3854 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3855 (find_phdr): New.
3856 (get_dynamic): Use find_pdhr to traverse program headers.
3857 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3858 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3859 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3860 (get_hex_build_id): New.
3861 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3862 to reply XML document.
3863
3864 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3865 Jan Kratochvil <jan.kratochvil@redhat.com>
3866
3867 * target.c: Include target/target-utils.h and fcntl.h.
3868 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3869 (target_fileio_read_stralloc): New functions.
3870
3871 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3872
3873 * Makefile.in (OBS): Add gdb_regex.o.
3874 (gdb_regex.o): New.
3875 * config.in: Rebuilt.
3876 * configure: Rebuilt.
3877
3878 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3879 Jan Kratochvil <jan.kratochvil@redhat.com>
3880
3881 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3882 * Makefile.in (OBS): Add target-utils.o.
3883 (linux-maps.o, target-utils.o): New.
3884 * configure.srv (srv_linux_obj): Add linux-maps.o.
3885
3886 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3887
3888 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3889 function, return 1.
3890 (the_low_target): Install it.
3891
3892 2015-07-14 Pedro Alves <palves@redhat.com>
3893
3894 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3895 Instead, ignore ECHILD, and throw an error for other errnos.
3896
3897 2015-07-10 Pedro Alves <palves@redhat.com>
3898
3899 * event-loop.c (struct callback_event) <data>: Change type to
3900 gdb_client_data instance instead of gdb_client_data pointer.
3901 (append_callback_event): Adjust.
3902
3903 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3904
3905 * linux-aarch64-low.c: Add comments for each linux_target_ops
3906 method. Remove comments already covered in target_ops and
3907 linux_target_ops definitions.
3908 (the_low_target): Add comments for each unimplemented method.
3909
3910 2015-07-09 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-aarch64-low.c (aarch64_regmap): Remove.
3913 (aarch64_usrregs_info): Remove.
3914 (regs_info): Set field usrregs to NULL.
3915
3916 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3917
3918 * linux-low.c: Include "rsp-low.h"
3919 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3920 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3921 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3922 (handle_btrace_enable_pt): New.
3923 (handle_btrace_general_set): Support "pt".
3924 (handle_btrace_conf_general_set): Support "pt:size".
3925
3926 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3927
3928 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3929 Z_PACKET_SW_BP.
3930
3931 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3932
3933 * linux-aarch64-low.c: Remove comment about endianness.
3934 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3935 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3936 memcmp.
3937
3938 2015-06-24 Gary Benson <gbenson@redhat.com>
3939
3940 * linux-i386-ipa.c (stdint.h): Do not include.
3941 * lynx-i386-low.c (stdint.h): Likewise.
3942 * lynx-ppc-low.c (stdint.h): Likewise.
3943 * mem-break.c (stdint.h): Likewise.
3944 * thread-db.c (stdint.h): Likewise.
3945 * tracepoint.c (stdint.h): Likewise.
3946 * win32-low.c (stdint.h): Likewise.
3947
3948 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3949
3950 * server.c (write_qxfer_response): Update call to
3951 remote_escape_output.
3952
3953 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3954 Jan Kratochvil <jan.kratochvil@redhat.com>
3955
3956 Merge multiple hex conversions.
3957 * gdbreplay.c (tohex): Rename to 'fromhex'.
3958 (logchar): Use fromhex.
3959
3960 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3961
3962 * server.c (handle_qxfer_libraries): Set `version' attribute for
3963 <library-list>.
3964
3965 2015-06-10 Gary Benson <gbenson@redhat.com>
3966
3967 * target.h (struct target_ops) <multifs_open>: New field.
3968 <multifs_unlink>: Likewise.
3969 <multifs_readlink>: Likewise.
3970 * linux-low.c (nat/linux-namespaces.h): New include.
3971 (linux_target_ops): Initialize the_target->multifs_open,
3972 the_target->multifs_unlink and the_target->multifs_readlink.
3973 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3974 * hostio.c (hostio_fs_pid): New static variable.
3975 (hostio_handle_new_gdb_connection): New function.
3976 (handle_setfs): Likewise.
3977 (handle_open): Use the_target->multifs_open as appropriate.
3978 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3979 (handle_readlink): Use the_target->multifs_readlink as
3980 appropriate.
3981 (handle_vFile): Handle vFile:setfs packets.
3982 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3983 after target_handle_new_gdb_connection.
3984
3985 2015-06-10 Gary Benson <gbenson@redhat.com>
3986
3987 * configure.ac (AC_CHECK_FUNCS): Add setns.
3988 * config.in: Regenerate.
3989 * configure: Likewise.
3990 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3991 (linux-namespaces.o): New rule.
3992 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3993
3994 2015-06-09 Gary Benson <gbenson@redhat.com>
3995
3996 * hostio.c (handle_open): Process mode argument with
3997 fileio_to_host_mode.
3998
3999 2015-06-01 Yao Qi <yao.qi@linaro.org>
4000
4001 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4002 * linux-x86-low.c: Likewise.
4003
4004 2015-05-28 Don Breazeal <donb@codesourcery.com>
4005
4006 * linux-low.c (handle_extended_wait): Initialize
4007 thread_info.last_resume_kind for new fork children.
4008
4009 2015-05-15 Pedro Alves <palves@redhat.com>
4010
4011 * target.h (target_handle_new_gdb_connection): Rewrite using if
4012 wrapped in do/while.
4013
4014 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4015
4016 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4017 * configure, config.in: Regenerate.
4018 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4019 Declare typedef.
4020
4021 2015-05-12 Don Breazeal <donb@codesourcery.com>
4022
4023 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4024 PTRACE_EVENT_VFORK_DONE.
4025 (linux_low_ptrace_options, extended_event_reported): Add vfork
4026 events.
4027 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4028 and "vforkdone" for RSP 'T' Stop Reply Packet.
4029 * server.h (report_vfork_events): Declare
4030 global variable.
4031
4032 2015-05-12 Don Breazeal <donb@codesourcery.com>
4033
4034 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4035 (the_low_target) <new_fork>: Initialize new member.
4036 * linux-arm-low.c (arm_new_fork): New function.
4037 (the_low_target) <new_fork>: Initialize new member.
4038 * linux-low.c (handle_extended_wait): Call new target function
4039 new_fork.
4040 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4041 * linux-mips-low.c (mips_add_watchpoint): New function
4042 extracted from mips_insert_point.
4043 (the_low_target) <new_fork>: Initialize new member.
4044 (mips_linux_new_fork): New function.
4045 (mips_insert_point): Call mips_add_watchpoint.
4046 * linux-x86-low.c (x86_linux_new_fork): New function.
4047 (the_low_target) <new_fork>: Initialize new member.
4048
4049 2015-05-12 Don Breazeal <donb@codesourcery.com>
4050
4051 * linux-low.c (handle_extended_wait): Implement return value,
4052 rename argument 'event_child' to 'event_lwp', handle
4053 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4054 (linux_low_ptrace_options): New function.
4055 (linux_low_filter_event): Call linux_low_ptrace_options,
4056 use different argument fo linux_enable_event_reporting,
4057 use return value from handle_extended_wait.
4058 (extended_event_reported): New function.
4059 (linux_wait_1): Call extended_event_reported and set
4060 status to report fork events.
4061 (linux_write_memory): Add pid to debug message.
4062 (reset_lwp_ptrace_options_callback): New function.
4063 (linux_handle_new_gdb_connection): New function.
4064 (linux_target_ops): Initialize new structure member.
4065 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4066 * lynx-low.c: Initialize new structure member.
4067 * remote-utils.c (prepare_resume_reply): Implement stop reason
4068 "fork" for "T" stop message.
4069 * server.c (handle_query): Call handle_new_gdb_connection.
4070 * server.h (report_fork_events): Declare global flag.
4071 * target.h (struct target_ops) <handle_new_gdb_connection>:
4072 New member.
4073 (target_handle_new_gdb_connection): New macro.
4074 * win32-low.c: Initialize new structure member.
4075
4076 2015-05-12 Don Breazeal <donb@codesourcery.com>
4077
4078 * mem-break.c (APPEND_TO_LIST): Define macro.
4079 (clone_agent_expr): New function.
4080 (clone_one_breakpoint): New function.
4081 (clone_all_breakpoints): New function.
4082 * mem-break.h: Declare new functions.
4083
4084 2015-05-12 Don Breazeal <donb@codesourcery.com>
4085
4086 * linux-low.c (linux_supports_fork_events): New function.
4087 (linux_supports_vfork_events): New function.
4088 (linux_target_ops): Initialize new structure members.
4089 (initialize_low): Call linux_check_ptrace_features.
4090 * lynx-low.c (lynx_target_ops): Initialize new structure
4091 members.
4092 * server.c (report_fork_events, report_vfork_events):
4093 New global flags.
4094 (handle_query): Add new features to qSupported packet and
4095 response.
4096 (captured_main): Initialize new global variables.
4097 * target.h (struct target_ops) <supports_fork_events>:
4098 New member.
4099 <supports_vfork_events>: New member.
4100 (target_supports_fork_events): New macro.
4101 (target_supports_vfork_events): New macro.
4102 * win32-low.c (win32_target_ops): Initialize new structure
4103 members.
4104
4105 2015-05-12 Gary Benson <gbenson@redhat.com>
4106
4107 * server.c (handle_qxfer_exec_file): Use current process
4108 if annex is empty.
4109
4110 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4111
4112 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4113 Remove HAVE_PTRACE_GETREGS conditionals.
4114 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4115 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4116
4117 2015-05-08 Yao Qi <yao.qi@linaro.org>
4118
4119 * linux-low.c (linux_supports_conditional_breakpoints): New
4120 function.
4121 (linux_target_ops): Install new target method.
4122 * lynx-low.c (lynx_target_ops): Install NULL hook for
4123 supports_conditional_breakpoints.
4124 * nto-low.c (nto_target_ops): Likewise.
4125 * spu-low.c (spu_target_ops): Likewise.
4126 * win32-low.c (win32_target_ops): Likewise.
4127 * server.c (handle_query): Check
4128 target_supports_conditional_breakpoints.
4129 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4130 New field.
4131 (target_supports_conditional_breakpoints): New macro.
4132
4133 2015-05-06 Pedro Alves <palves@redhat.com>
4134
4135 PR server/18081
4136 * server.c (start_inferior): If the process exits, mourn it.
4137
4138 2015-04-21 Gary Benson <gbenson@redhat.com>
4139
4140 * hostio.c (fileio_open_flags_to_host): Factored out to
4141 fileio_to_host_openflags in common/fileio.c. Single use
4142 updated.
4143
4144 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4145
4146 * linux-xtensa-low.c (xtensa_fill_gregset)
4147 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4148 XCHAL_HAVE_LOOP.
4149
4150 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4151
4152 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4153 (regs_info): Replace usrregs pointer with NULL.
4154
4155 2015-04-17 Gary Benson <gbenson@redhat.com>
4156
4157 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4158 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4159 * server.c (handle_qxfer_exec_file): New function.
4160 (qxfer_packets): Add exec-file entry.
4161 (handle_query): Report qXfer:exec-file:read as supported packet.
4162
4163 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4164
4165 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4166
4167 2015-04-09 Gary Benson <gbenson@redhat.com>
4168
4169 * hostio-errno.c (errno_to_fileio_error): Remove function.
4170 Update caller to use remote_fileio_to_fio_error.
4171
4172 2015-04-09 Yao Qi <yao.qi@linaro.org>
4173
4174 * linux-low.c (linux_insert_point): Call
4175 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4176 (linux_remove_point): Call remove_memory_breakpoint if type is
4177 raw_bkpt_type_sw.
4178 * linux-x86-low.c (x86_insert_point): Don't call
4179 insert_memory_breakpoint.
4180 (x86_remove_point): Don't call remove_memory_breakpoint.
4181
4182 2015-04-01 Pedro Alves <palves@redhat.com>
4183 Cleber Rosa <crosa@redhat.com>
4184
4185 * server.c (gdbserver_usage): Reorganize and extend the usage
4186 message.
4187
4188 2015-03-24 Pedro Alves <palves@redhat.com>
4189
4190 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4191 output. Also dump TRAP_TRACE.
4192 (linux_low_filter_event): In debug output, distinguish a
4193 resume_stop SIGSTOP from a delayed SIGSTOP.
4194
4195 2015-03-24 Gary Benson <gbenson@redhat.com>
4196
4197 * linux-x86-low.c (x86_linux_new_thread): Moved to
4198 nat/x86-linux.c.
4199 (x86_linux_prepare_to_resume): Likewise.
4200
4201 2015-03-24 Gary Benson <gbenson@redhat.com>
4202
4203 * Makefile.in (x86-linux-dregs.o): New rule.
4204 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4205 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4206 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4207 (x86_linux_dr_get): Likewise.
4208 (x86_linux_dr_set): Likewise.
4209 (update_debug_registers_callback): Likewise.
4210 (x86_linux_dr_set_addr): Likewise.
4211 (x86_linux_dr_get_addr): Likewise.
4212 (x86_linux_dr_set_control): Likewise.
4213 (x86_linux_dr_get_control): Likewise.
4214 (x86_linux_dr_get_status): Likewise.
4215 (x86_linux_update_debug_registers): Likewise.
4216
4217 2015-03-24 Gary Benson <gbenson@redhat.com>
4218
4219 * linux-x86-low.c (x86_linux_update_debug_registers):
4220 New function, factored out from...
4221 (x86_linux_prepare_to_resume): ...this.
4222
4223 2015-03-24 Gary Benson <gbenson@redhat.com>
4224
4225 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4226 (x86_linux_dr_set): Likewise.
4227 (update_debug_registers_callback): Likewise.
4228 (x86_linux_dr_set_addr): Likewise.
4229 (x86_linux_dr_get_addr): Likewise.
4230 (x86_linux_dr_set_control): Likewise.
4231 (x86_linux_dr_get_control): Likewise.
4232 (x86_linux_dr_get_status): Likewise.
4233 (x86_linux_prepare_to_resume): Likewise.
4234
4235 2015-03-24 Gary Benson <gbenson@redhat.com>
4236
4237 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4238 Use perror_with_name. Pass string through gettext.
4239 (x86_linux_dr_set): Likewise.
4240
4241 2015-03-24 Gary Benson <gbenson@redhat.com>
4242
4243 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4244 (x86_linux_dr_set_addr): ...this.
4245 (x86_dr_low_get_addr): Rename to...
4246 (x86_linux_dr_get_addr): ...this.
4247 (x86_dr_low_set_control): Rename to...
4248 (x86_linux_dr_set_control): ...this.
4249 (x86_dr_low_get_control): Rename to...
4250 (x86_linux_dr_get_control): ...this.
4251 (x86_dr_low_get_status): Rename to...
4252 (x86_linux_dr_get_status): ...this.
4253 (x86_dr_low): Update with new function names.
4254
4255 2015-03-24 Gary Benson <gbenson@redhat.com>
4256
4257 * Makefile.in (x86-linux.o): New rule.
4258 * configure.srv: Add x86-linux.o to relevant targets.
4259 * linux-low.c (lwp_set_arch_private_info): New function.
4260 (lwp_arch_private_info): Likewise.
4261 * linux-x86-low.c: Include nat/x86-linux.h.
4262 (arch_lwp_info): Removed structure.
4263 (update_debug_registers_callback):
4264 Use lwp_set_debug_registers_changed.
4265 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4266 and lwp_set_debug_registers_changed.
4267 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4268
4269 2015-03-24 Gary Benson <gbenson@redhat.com>
4270
4271 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4272 * linux-arm-low.c (arm_new_thread): Likewise.
4273 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4274 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4275 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4276 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4277
4278 2015-03-24 Gary Benson <gbenson@redhat.com>
4279
4280 * linux-low.c (ptid_of_lwp): New function.
4281 (lwp_is_stopped): Likewise.
4282 (lwp_stop_reason): Likewise.
4283 * linux-x86-low.c (update_debug_registers_callback):
4284 Use lwp_is_stopped.
4285 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4286 lwp_stop_reason.
4287
4288 2015-03-24 Gary Benson <gbenson@redhat.com>
4289
4290 * linux-low.h (linux_stop_lwp): Remove declaration.
4291
4292 2015-03-24 Gary Benson <gbenson@redhat.com>
4293
4294 * linux-low.h: Include nat/linux-nat.h.
4295 * linux-low.c (iterate_over_lwps_args): New structure.
4296 (iterate_over_lwps_filter): New function.
4297 (iterate_over_lwps): Likewise.
4298 * linux-x86-low.c (update_debug_registers_callback):
4299 Update signature to what iterate_over_lwps expects.
4300 Remove PID check that iterate_over_lwps now performs.
4301 (x86_dr_low_set_addr): Use iterate_over_lwps.
4302 (x86_dr_low_set_control): Likewise.
4303
4304 2015-03-24 Gary Benson <gbenson@redhat.com>
4305
4306 * linux-x86-low.c (x86_debug_reg_state): New function.
4307 (x86_linux_prepare_to_resume): Use the above.
4308
4309 2015-03-24 Gary Benson <gbenson@redhat.com>
4310
4311 * linux-low.c (current_lwp_ptid): New function.
4312 * linux-x86-low.c: Include nat/linux-nat.h.
4313 (x86_dr_low_get_addr): Use current_lwp_ptid.
4314 (x86_dr_low_get_control): Likewise.
4315 (x86_dr_low_get_status): Likewise.
4316
4317 2015-03-20 Pedro Alves <palves@redhat.com>
4318
4319 * tracepoint.c (cmd_qtstatus): Make "str" const.
4320
4321 2015-03-20 Pedro Alves <palves@redhat.com>
4322
4323 * server.c (handle_general_set): Make "req_str" const.
4324
4325 2015-03-19 Pedro Alves <palves@redhat.com>
4326
4327 * linux-low.c (linux_resume_one_lwp): Rename to ...
4328 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4329 instead call perror_with_name.
4330 (check_ptrace_stopped_lwp_gone): New function.
4331 (linux_resume_one_lwp): Reimplement as wrapper around
4332 linux_resume_one_lwp_throw that swallows errors if the LWP is
4333 gone.
4334
4335 2015-03-19 Pedro Alves <palves@redhat.com>
4336
4337 * linux-low.c (count_events_callback, select_event_lwp_callback):
4338 No longer check whether the thread has resume_stop as last resume
4339 kind.
4340
4341 2015-03-19 Pedro Alves <palves@redhat.com>
4342
4343 * linux-low.c (count_events_callback, select_event_lwp_callback):
4344 Use the lwp's status_pending_p field, not the thread's.
4345
4346 2015-03-19 Pedro Alves <palves@redhat.com>
4347
4348 * linux-low.c (select_event_lwp_callback): Update comments to
4349 no longer mention SIGTRAP.
4350
4351 2015-03-18 Gary Benson <gbenson@redhat.com>
4352
4353 * server.c (handle_query): Do not report vFile:fstat as supported.
4354
4355 2015-03-11 Gary Benson <gbenson@redhat.com>
4356
4357 * hostio.c (sys/types.h): New include.
4358 (sys/stat.h): Likewise.
4359 (common-remote-fileio.h): Likewise.
4360 (handle_fstat): New function.
4361 (handle_vFile): Handle vFile:fstat packets.
4362
4363 2015-03-11 Gary Benson <gbenson@redhat.com>
4364
4365 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4366 struct stat.st_blocks and struct stat.st_blksize.
4367 * configure: Regenerate.
4368 * config.in: Likewise.
4369 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4370 (OBS): Add common-remote-fileio.o.
4371 (common-remote-fileio.o): New rule.
4372
4373 2015-03-09 Pedro Alves <palves@redhat.com>
4374
4375 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4376 'struct sockaddr' pointer in 'accept' call.
4377
4378 2015-03-09 Pedro Alves <palves@redhat.com>
4379
4380 Revert:
4381 2015-03-07 Pedro Alves <palves@redhat.com>
4382 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4383 or <winsock2.h> here. Instead include "gdb_socket.h".
4384 (remote_open): Use union gdb_sockaddr_u.
4385 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4386 or <winsock2.h> here. Instead include "gdb_socket.h".
4387 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4388 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4389 or <sys/un.h>.
4390 (init_named_socket, gdb_agent_helper_thread): Use union
4391 gdb_sockaddr_u.
4392
4393 2015-03-07 Pedro Alves <palves@redhat.com>
4394
4395 * configure.ac (build_warnings): Move
4396 -Wdeclaration-after-statement to the C-specific set.
4397 * configure: Regenerate.
4398
4399 2015-03-07 Pedro Alves <palves@redhat.com>
4400
4401 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4402 or <winsock2.h> here. Instead include "gdb_socket.h".
4403 (remote_open): Use union gdb_sockaddr_u.
4404 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4405 or <winsock2.h> here. Instead include "gdb_socket.h".
4406 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4407 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4408 or <sys/un.h>.
4409 (init_named_socket, gdb_agent_helper_thread): Use union
4410 gdb_sockaddr_u.
4411
4412 2015-03-07 Pedro Alves <palves@redhat.com>
4413
4414 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4415 instead.
4416
4417 2015-03-06 Yao Qi <yao.qi@linaro.org>
4418
4419 * linux-aarch64-low.c (aarch64_insert_point): Use
4420 show_debug_regs as a boolean.
4421 (aarch64_remove_point): Likewise.
4422
4423 2015-03-05 Pedro Alves <palves@redhat.com>
4424
4425 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4426 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4427 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4428 * nto-low.c (nto_target_ops): Likewise.
4429 * spu-low.c (spu_target_ops): Likewise.
4430 * win32-low.c (win32_target_ops): Likewise.
4431
4432 2015-03-04 Pedro Alves <palves@redhat.com>
4433
4434 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4435 Decide whether a breakpoint triggered based on the SIGTRAP's
4436 siginfo.si_code.
4437 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4438 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4439 (linux_low_filter_event): Check for breakpoints before checking
4440 watchpoints.
4441 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4442 siginfo.si_code.
4443 (linux_stopped_by_sw_breakpoint)
4444 (linux_supports_stopped_by_sw_breakpoint)
4445 (linux_stopped_by_hw_breakpoint)
4446 (linux_supports_stopped_by_hw_breakpoint): New functions.
4447 (linux_target_ops): Install new target methods.
4448
4449 2015-03-04 Pedro Alves <palves@redhat.com>
4450
4451 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4452 * server.c (swbreak_feature, hwbreak_feature): New globals.
4453 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4454 (captured_main): Clear swbreak_feature and hwbreak_feature.
4455 * server.h (swbreak_feature, hwbreak_feature): Declare.
4456 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4457 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4458 supports_stopped_by_hw_breakpoint>: New fields.
4459 (target_supports_stopped_by_sw_breakpoint)
4460 (target_stopped_by_sw_breakpoint)
4461 (target_supports_stopped_by_hw_breakpoint)
4462 (target_stopped_by_hw_breakpoint): Declare.
4463
4464 2015-03-04 Pedro Alves <palves@redhat.com>
4465
4466 enum lwp_stop_reason -> enum target_stop_reason
4467 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4468 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4469 (linux_wait_1, stuck_in_jump_pad_callback)
4470 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4471 (linux_stopped_by_watchpoint):
4472 * linux-low.h (enum lwp_stop_reason): Delete.
4473 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4474 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4475
4476 2015-03-04 Yao Qi <yao.qi@linaro.org>
4477
4478 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4479
4480 2015-03-03 Gary Benson <gbenson@redhat.com>
4481
4482 * hostio.c (handle_vFile): Fix prefix lengths.
4483
4484 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4485
4486 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4487 ptr_bits.
4488
4489 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4490
4491 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4492 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4493 (clean): Add "rm -f" for above C files.
4494 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4495 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4496 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4497 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4498 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4499 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4500 (init_registers_s390x_vx_linux64)
4501 (init_registers_s390x_tevx_linux64)
4502 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4503 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4504 declarations.
4505 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4506 (s390_store_vxrs_high): New functions.
4507 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4508 NT_S390_VXRS_HIGH.
4509 (s390_arch_setup): Add logic for selecting one of the new target
4510 descriptions. Activate the new vector regsets if applicable.
4511 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4512 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4513 and init_registers_s390x_tevx_linux64.
4514
4515 2015-03-01 Pedro Alves <palves@redhat.com>
4516
4517 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4518 parameter.
4519
4520 2015-02-27 Pedro Alves <palves@redhat.com>
4521
4522 * linux-x86-low.c (u_debugreg_offset): New function.
4523 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4524
4525 2015-02-27 Pedro Alves <palves@redhat.com>
4526
4527 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4528 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4529 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4530 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4531 (ps_lsetfpregs, ps_getpid)
4532 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4533 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4534 (ps_lsetxregs, ps_plog): Declare.
4535
4536 2015-02-27 Pedro Alves <palves@redhat.com>
4537
4538 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4539 IP_AGENT_EXPORT_FUNC.
4540 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4541 IP_AGENT_EXPORT_FUNC.
4542 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4543 (IP_AGENT_EXPORT): Delete.
4544 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4545 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4546 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4547 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4548 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4549 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4550 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4551 (traceframe_read_count, traceframe_write_count)
4552 (traceframes_created, trace_state_variables, get_raw_reg)
4553 (get_trace_state_variable_value, set_trace_state_variable_value)
4554 (ust_loaded, helper_thread_id, cmd_buf): Use
4555 IPA_SYM_EXPORTED_NAME.
4556 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4557 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4558 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4559 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4560 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4561 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4562 EXTERN_C_PUSH/EXTERN_C_POP.
4563 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4564 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4565 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4566 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4567 (traceframe_write_count, traceframe_read_count)
4568 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4569 (about_to_request_buffer_space, get_trace_state_variable_value)
4570 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4571 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4572 EXTERN_C_PUSH/EXTERN_C_POP.
4573 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4574 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4575 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4576 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4577 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4578 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4579 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4580 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4581 Define.
4582 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4583 (IP_AGENT_EXPORT_VAR_DECL): Define.
4584 (tracing): Declare.
4585 (gdb_agent_get_raw_reg): Declare.
4586
4587 2015-02-27 Tom Tromey <tromey@redhat.com>
4588 Pedro Alves <palves@redhat.com>
4589
4590 Rename symbols whose names are reserved C++ keywords throughout.
4591
4592 2015-02-27 Pedro Alves <palves@redhat.com>
4593
4594 * Makefile.in (COMPILER): New, get it from autoconf.
4595 (CXX): Get from autoconf instead.
4596 (COMPILE.pre): Use COMPILER.
4597 (CC-LD): Rename to ...
4598 (CC_LD): ... this. Use COMPILER.
4599 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4600 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4601 * acinclude.m4: Include build-with-cxx.m4.
4602 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4603 Disable -Werror by default if building in C++ mode.
4604 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4605 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4606 the C++ compiler. Save/restore CXXFLAGS too.
4607 * configure: Regenerate.
4608
4609 2015-02-27 Pedro Alves <palves@redhat.com>
4610
4611 * acinclude.m4: Include libiberty.m4.
4612 * configure.ac: Call libiberty_INIT.
4613 * config.in, configure: Regenerate.
4614
4615 2015-02-26 Pedro Alves <palves@redhat.com>
4616
4617 * linux-low.c (linux_wait_1): When incrementing the PC past a
4618 program breakpoint always use the_low_target.breakpoint_len as
4619 increment, rather than the maximum between that and
4620 the_low_target.decr_pc_after_break.
4621
4622 2015-02-23 Pedro Alves <palves@redhat.com>
4623
4624 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4625 thread was doing a step-over; always adjust the PC if
4626 we stepped over a permanent breakpoint.
4627 (linux_wait_1): If we stepped over breakpoint that was on top of a
4628 permanent breakpoint, manually advance the PC past it.
4629
4630 2015-02-23 Pedro Alves <palves@redhat.com>
4631
4632 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4633 modes.
4634 (x86_fill_gregset, x86_store_gregset): Use it when handling
4635 $orig_eax.
4636
4637 2015-02-20 Pedro Alves <palves@redhat.com>
4638
4639 * thread-db.c: Include "nat/linux-procfs.h".
4640 (thread_db_init): Skip listing new threads if the kernel supports
4641 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4642
4643 2015-02-20 Pedro Alves <palves@redhat.com>
4644
4645 * linux-low.c (status_pending_p_callback): Use ptid_match.
4646
4647 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4648
4649 PR breakpoints/16812
4650 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4651 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4652 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4653
4654 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4655
4656 PR breakpoints/15956
4657 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4658
4659 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4660
4661 * linux-low.c (linux_low_btrace_conf): Print size.
4662 * server.c (handle_btrace_conf_general_set): New.
4663 (hanle_general_set): Call handle_btrace_conf_general_set.
4664 (handle_query): Report Qbtrace-conf:bts:size as supported.
4665
4666 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4667
4668 * linux-low.c (linux_low_enable_btrace): Update parameters.
4669 (linux_low_btrace_conf): New.
4670 (linux_target_ops)<to_btrace_conf>: Initialize.
4671 * server.c (current_btrace_conf): New.
4672 (handle_btrace_enable): Rename to ...
4673 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4674 to target_enable_btrace. Update comment. Update users.
4675 (handle_qxfer_btrace_conf): New.
4676 (qxfer_packets): Add btrace-conf entry.
4677 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4678 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4679 (target_ops)<read_btrace_conf>: New.
4680 (target_enable_btrace): Update parameters.
4681 (target_read_btrace_conf): New.
4682
4683 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4684
4685 * server.c (handle_btrace_general_set): Remove call to
4686 target_supports_btrace.
4687 (supported_btrace_packets): New.
4688 (handle_query): Call supported_btrace_packets.
4689 * target.h: include btrace-common.h.
4690 (btrace_target_info): Removed.
4691 (supports_btrace, target_supports_btrace): Update parameters.
4692
4693 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4694
4695 * Makefile.in (SFILES): Add common/btrace-common.c.
4696 (OBS): Add common/btrace-common.o.
4697 (btrace-common.o): Add build rules.
4698 * linux-low: Include btrace-common.h.
4699 (linux_low_read_btrace): Use struct btrace_data. Call
4700 btrace_data_init and btrace_data_fini.
4701
4702 2015-02-06 Pedro Alves <palves@redhat.com>
4703
4704 * thread-db.c (find_new_threads_callback): Add debug output.
4705
4706 2015-02-04 Pedro Alves <palves@redhat.com>
4707
4708 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4709 (resume_stopped_resumed_lwps): New function.
4710 (linux_wait_for_event_filtered): Use it.
4711
4712 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4713
4714 * Makefile.in (SFILES): Add linux-personality.c.
4715 (linux-personality.o): New rule.
4716 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4717 list of objects to be built.
4718 * linux-low.c: Include nat/linux-personality.h.
4719 (linux_create_inferior): Remove code to disable address space
4720 randomization (moved to ../nat/linux-personality.c). Create
4721 cleanup to disable address space randomization.
4722
4723 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4724
4725 * Makefile.in (posix-strerror.o): New rule.
4726 (mingw-strerror.o): Likewise.
4727 * configure: Regenerated.
4728 * configure.ac: Source file ../common/common.host. Initialize new
4729 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4730
4731 2015-01-14 Yao Qi <yao@codesourcery.com>
4732
4733 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4734 (ppc-linux.o): New rule.
4735 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4736 * configure.ac: AC_CHECK_FUNCS(getauxval).
4737 * config.in: Re-generated.
4738 * configure: Re-generated.
4739 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4740 ppc64_64bit_inferior_p
4741
4742 2015-01-14 Yao Qi <yao@codesourcery.com>
4743
4744 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4745 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4746 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4747 (PT_ORIG_R3, PT_TRAP): Likewise.
4748 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4749 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4750 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4751
4752 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4753
4754 * i387-fp.c (i387_cache_to_xsave): In look over
4755 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4756 zmmh_low_space field by use of zmmh_high_space.
4757
4758 2015-01-09 Pedro Alves <palves@redhat.com>
4759
4760 * linux-low.c (step_over_bkpt): Move higher up in the file.
4761 (handle_extended_wait): Don't store the stop_pc here.
4762 (get_stop_pc): Adjust comments and rename to ...
4763 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4764 stopped for a software breakpoint or hardware breakpoint.
4765 (thread_still_has_status_pending_p): New function.
4766 (status_pending_p_callback): Use
4767 thread_still_has_status_pending_p. If the event is no longer
4768 interesting, resume the LWP.
4769 (handle_tracepoints): Add assert.
4770 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4771 (wstatus_maybe_breakpoint): New function.
4772 (cancel_breakpoint): Delete function.
4773 (check_stopped_by_watchpoint): New function, factored out from
4774 linux_low_filter_event.
4775 (lp_status_maybe_breakpoint): Delete function.
4776 (linux_low_filter_event): Remove filter_ptid argument.
4777 Leave thread group exits pending here. Store the LWP's stop PC.
4778 Always leave events pending.
4779 (linux_wait_for_event_filtered): Pull all events out of the
4780 kernel, and leave them all pending.
4781 (count_events_callback, select_event_lwp_callback): Consider all
4782 events.
4783 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4784 (select_event_lwp): Only give preference to the stepping LWP in
4785 all-stop mode. Adjust comments.
4786 (ignore_event): New function.
4787 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4788 references to cancel_breakpoints. Adjust to renames. Also give
4789 equal priority to all LWPs that have had events in non-stop mode.
4790 If reporting a software breakpoint event, unadjust the LWP's PC.
4791 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4792 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4793 Adjust.
4794 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4795 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4796 (linux_stopped_by_watchpoint): Adjust.
4797 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4798 * linux-low.h (enum lwp_stop_reason): New.
4799 (struct lwp_info) <stop_pc>: Adjust comment.
4800 <stopped_by_watchpoint>: Delete field.
4801 <stop_reason>: New field.
4802 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4803 * mem-break.c (software_breakpoint_inserted_here)
4804 (hardware_breakpoint_inserted_here): New function.
4805 * mem-break.h (software_breakpoint_inserted_here)
4806 (hardware_breakpoint_inserted_here): Declare.
4807 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4808 (cancel_breakpoints): Delete.
4809 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4810 (upload_fast_traceframes): Remove references to
4811 cancel_breakpoints.
4812
4813 2015-01-09 Pedro Alves <palves@redhat.com>
4814
4815 * thread-db.c (find_new_threads_callback): Ignore thread if the
4816 kernel thread ID is -1.
4817
4818 2015-01-09 Pedro Alves <palves@redhat.com>
4819
4820 * linux-low.c (linux_attach_fail_reason_string): Move to
4821 nat/linux-ptrace.c, and rename.
4822 (linux_attach_lwp): Update comment.
4823 (attach_proc_task_lwp_callback): New function.
4824 (linux_attach): Adjust to rename and use
4825 linux_proc_attach_tgid_threads.
4826 (linux_attach_fail_reason_string): Delete declaration.
4827
4828 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4829
4830 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4831 * server.c (gdbserver_version): Likewise.
4832
4833 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4834
4835 * remote-utils.c: Include ctype.h.
4836 (input_interrupt): Explicitly handle the case when the char
4837 received is the NUL byte. Improve the printing of non-ASCII
4838 characters.
4839
4840 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4841
4842 * linux-low.c (linux_low_filter_event): Update call to
4843 linux_enable_event_reporting following the addition of
4844 a new parameter to that function.
4845
4846 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4847
4848 PR server/17457
4849 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4850 (AARCH64_FPCR_REGNO): Likewise.
4851 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4852 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4853 (aarch64_store_fpregset): Likewise.
4854
4855 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4856
4857 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4858 Remove FIXME comment about assumption about N.
4859
4860 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4861
4862 * configure.ac: If large-file support is disabled in GDBserver,
4863 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4864 * configure: Regenerate.
4865
4866 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4867
4868 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4869 warning upon ENODATA from ptrace.
4870 * linux-s390-low.c (s390_store_tdb): New.
4871 (s390_regsets): Add regset for NT_S390_TDB.
4872
4873 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4874
4875 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4876 without a fill_function.
4877 * linux-s390-low.c (s390_fill_last_break): Remove.
4878 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4879 (s390_arch_setup): Use regset's size instead of fill_function for
4880 loop end condition.
4881
4882 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4883
4884 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4885 the regset's store function when ptrace returned an error.
4886 * regcache.c (get_thread_regcache): Invalidate register cache
4887 before fetching inferior's registers.
4888
4889 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4890
4891 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4892 while-loop as for-loop.
4893 (regsets_store_inferior_registers): Likewise.
4894
4895 2014-11-28 Yao Qi <yao@codesourcery.com>
4896
4897 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4898 * config.in, configure: Re-generate.
4899 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4900 is defined.
4901
4902 2014-11-21 Yao Qi <yao@codesourcery.com>
4903
4904 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4905 (AC_CHECK_HEADERS): Remove malloc.h.
4906 * configure: Re-generated.
4907 * config.in: Re-generated.
4908 * server.h: Don't include alloca.h and malloc.h.
4909 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4910 Don't include malloc.h.
4911
4912 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4913
4914 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4915 corresponding ERRNO check in same block.
4916
4917 2014-11-12 Pedro Alves <palves@redhat.com>
4918
4919 * server.c (cont_thread): Update comment.
4920 (start_inferior, attach_inferior): No longer clear cont_thread.
4921 (handle_v_cont): No longer set cont_thread.
4922 (captured_main): Clear cont_thread each time a GDB connects.
4923
4924 2014-11-12 Pedro Alves <palves@redhat.com>
4925
4926 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4927 thread, and don't resume all threads if the Hc thread has exited.
4928
4929 2014-11-12 Pedro Alves <palves@redhat.com>
4930
4931 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4932 the process group instead of to a specific LWP.
4933
4934 2014-10-15 Pedro Alves <palves@redhat.com>
4935
4936 PR server/17487
4937 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4938 parameter.
4939 (arm_set_thread_context): Delete.
4940 (the_low_target): Adjust.
4941 * win32-i386-low.c (debug_registers_changed)
4942 (debug_registers_used): Delete.
4943 (update_debug_registers_callback): New function.
4944 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4945 needing to update their debug registers.
4946 (win32_get_current_dr): New function.
4947 (x86_dr_low_get_addr, x86_dr_low_get_control)
4948 (x86_dr_low_get_status): Fetch the debug register from the thread
4949 record's context.
4950 (i386_initial_stuff): Adjust.
4951 (i386_get_thread_context): Remove current_event parameter. Don't
4952 clear debug_registers_changed nor copy DR values to
4953 debug_reg_state.
4954 (i386_set_thread_context): Delete.
4955 (i386_prepare_to_resume): New function.
4956 (i386_thread_added): Mark the thread as needing to update irs
4957 debug registers.
4958 (the_low_target): Remove i386_set_thread_context and install
4959 i386_prepare_to_resume.
4960 * win32-low.c (win32_get_thread_context): Adjust.
4961 (win32_set_thread_context): Use SetThreadContext
4962 directly.
4963 (win32_prepare_to_resume): New function.
4964 (win32_require_context): New function, factored out from ...
4965 (thread_rec): ... this.
4966 (continue_one_thread): Call win32_prepare_to_resume on each thread
4967 we're about to continue.
4968 (win32_resume): Call win32_prepare_to_resume on the event thread.
4969 * win32-low.h (struct win32_thread_info)
4970 <debug_registers_changed>: New field.
4971 (struct win32_target_ops): Change prototype of set_thread_context,
4972 delete set_thread_context and add prepare_to_resume.
4973 (win32_require_context): New declaration.
4974
4975 2014-10-08 Gary Benson <gbenson@redhat.com>
4976
4977 * server.h: Do not include common-exceptions.h.
4978
4979 2014-10-08 Gary Benson <gbenson@redhat.com>
4980
4981 * server.h: Do not include cleanups.h.
4982
4983 2014-09-30 James Hogan <james.hogan@imgtec.com>
4984
4985 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4986 mips64-dsp-linux.c.
4987
4988 2014-09-23 Yao Qi <yao@codesourcery.com>
4989
4990 * linux-low.c (lp_status_maybe_breakpoint): New function.
4991 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4992 (count_events_callback): Likewise.
4993 (select_event_lwp_callback): Likewise.
4994 (cancel_breakpoints_callback): Likewise.
4995
4996 2014-09-19 Don Breazeal <donb@codesourcery.com>
4997
4998 * linux-low.c (handle_extended_wait): Call
4999 linux_ptrace_get_extended_event.
5000 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5001 linux_is_extended_waitstatus.
5002
5003 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5004
5005 * Makefile.in (CPPFLAGS): Define.
5006 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5007 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5008
5009 2014-09-16 Gary Benson <gbenson@redhat.com>
5010
5011 * inferiors.h (current_inferior): Renamed as...
5012 (current_thread): New variable. All uses updated.
5013 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5014 (maybe_move_out_of_jump_pad): Likewise.
5015 (cancel_breakpoint): Likewise.
5016 (linux_low_filter_event): Likewise.
5017 (wait_for_sigstop): Likewise.
5018 (linux_resume_one_lwp): Likewise.
5019 (need_step_over_p): Likewise.
5020 (start_step_over): Likewise.
5021 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5022 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5023 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5024 and save_inferior as saved_thread.
5025 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5026 saved_thread.
5027 (regcache_invalidate_thread): Likewise.
5028 * remote-utils.c (prepare_resume_reply): Likewise.
5029 * thread-db.c (thread_db_get_tls_address): Likewise.
5030 (disable_thread_event_reporting): Likewise.
5031 (remove_thread_event_breakpoints): Likewise.
5032 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5033 as saved_thread.
5034 * target.h (set_desired_inferior): Renamed as...
5035 (set_desired_thread): New declaration. All uses updated.
5036 * server.c (myresume): Updated comment to reference thread instead
5037 of inferior.
5038 (handle_serial_event): Likewise.
5039 (handle_target_event): Likewise.
5040
5041 2014-09-12 Tom Tromey <tromey@redhat.com>
5042 Gary Benson <gbenson@redhat.com>
5043
5044 * regcache.h: Include common-regcache.h.
5045 (regcache_read_pc): Don't declare.
5046 * regcache.c (get_thread_regcache_for_ptid): New function.
5047
5048 2014-09-11 Tom Tromey <tromey@redhat.com>
5049 Gary Benson <gbenson@redhat.com>
5050
5051 * symbol.c: New file.
5052 * Makefile.in (SFILES): Add symbol.c.
5053 (OBS): Add symbol.o.
5054
5055 2014-09-11 Gary Benson <gbenson@redhat.com>
5056
5057 * target.c (target_stop_ptid, target_continue_ptid): New
5058 functions.
5059
5060 2014-09-11 Tom Tromey <tromey@redhat.com>
5061 Gary Benson <gbenson@redhat.com>
5062
5063 * target.h: Include target/target.h.
5064 * target.c (target_read_memory, target_read_uint32)
5065 (target_write_memory): New functions.
5066
5067 2014-09-11 Gary Benson <gbenson@redhat.com>
5068
5069 * server.h (debug_hw_points): Don't declare.
5070 * server.c (debug_hw_points): Don't define. Replace all uses
5071 with show_debug_regs.
5072 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5073 all uses with show_debug_regs.
5074
5075 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5076
5077 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5078 endianness into account.
5079 (ppc_supply_ptrace_register): Likewise.
5080
5081 2014-09-03 James Hogan <james.hogan@imgtec.com>
5082
5083 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5084 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5085
5086 2014-09-03 Gary Benson <gbenson@redhat.com>
5087
5088 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5089 ALL_DEBUG_ADDRESS_REGISTERS.
5090
5091 2014-09-02 Gary Benson <gbenson@redhat.com>
5092
5093 * i386-low.h: Renamed as...
5094 * x86-low.h: New file. All type, function and variable name
5095 prefixes changed from "i386_" to "x86_". All references updated.
5096 * i386-low.c: Renamed as...
5097 * x86-low.c: New file. All type, function and variable name
5098 prefixes changed from "i386_" to "x86_". All references updated.
5099
5100 2014-09-02 Gary Benson <gbenson@redhat.com>
5101
5102 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5103 (x86_linux_new_thread): Likewise.
5104
5105 2014-08-29 Gary Benson <gbenson@redhat.com>
5106
5107 * server.h (setjmp.h): Do not include.
5108 (toplevel): Do not declare.
5109 (common-exceptions.h): Include.
5110 (cleanups.h): Likewise.
5111 * server.c (toplevel): Do not define.
5112 (exit_code): New static global.
5113 (detach_or_kill_for_exit_cleanup): New function.
5114 (main): New function. Original main renamed to...
5115 (captured_main): New function.
5116 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5117
5118 2014-08-29 Gary Benson <gbenson@redhat.com>
5119
5120 * Makefile.in (SFILES): Add common/common-exceptions.c.
5121 (OBS): Add common-exceptions.o.
5122 (common-exceptions.o): New rule.
5123 * utils.c (prepare_to_throw_exception): New function.
5124
5125 2014-08-29 Gary Benson <gbenson@redhat.com>
5126
5127 * config.in: Regenerate.
5128 * configure: Likewise.
5129
5130 2014-08-29 Gary Benson <gbenson@redhat.com>
5131
5132 * Makefile.in (SFILES): Add common/cleanups.c.
5133 (OBS): cleanups.o.
5134 (cleanups.o): New rule.
5135
5136 2014-08-29 Gary Benson <gbenson@redhat.com>
5137
5138 * utils.c (internal_vwarning): New function.
5139
5140 2014-08-28 Gary Benson <gbenson@redhat.com>
5141
5142 * utils.h (fatal): Remove declaration.
5143 * utils.c (fatal): Remove function.
5144
5145 2014-08-28 Gary Benson <gbenson@redhat.com>
5146
5147 * tracepoint.c (gdb_agent_init): Replace fatal with
5148 perror_with_name.
5149 (initialize_tracepoint): Likewise.
5150
5151 2014-08-28 Gary Benson <gbenson@redhat.com>
5152
5153 * remote-utils.c (remote_prepare): Replace fatal with error.
5154
5155 2014-08-28 Gary Benson <gbenson@redhat.com>
5156
5157 * linux-low.c (linux_async): Replace fatal with warning.
5158 Tidy up and return.
5159 (linux_start_non_stop): Return -1 if linux_async failed.
5160
5161 2014-08-28 Gary Benson <gbenson@redhat.com>
5162
5163 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5164 gdb_assert.
5165 (i386_dr_low_get_addr): Remove vague comment.
5166 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5167 gdb_assert.
5168
5169 2014-08-28 Gary Benson <gbenson@redhat.com>
5170
5171 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5172 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5173 internal_error.
5174 (linux_resume_one_lwp): Likewise.
5175 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5176 gdb_assert.
5177 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5178 with internal_error.
5179 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5180 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5181 (find_register_by_name): Replace fatal with internal_error.
5182 (find_regno): Likewise.
5183 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5184 * thread-db.c (thread_db_create_event): Likewise.
5185 (thread_db_load_search): Likewise.
5186 (try_thread_db_load_1): Likewise.
5187 * tracepoint.c (get_jump_space_head): Replace fatal with
5188 internal_error.
5189 (claim_trampoline_space): Likewise.
5190 (have_fast_tracepoint_trampoline_buffer): Likewise.
5191 (cmd_qtstart): Likewise.
5192 (stop_tracing): Likewise.
5193 (fast_tracepoint_collecting): Likewise.
5194 (target_malloc): Likewise.
5195 (download_tracepoint): Likewise.
5196 (download_trace_state_variables): Replace check with gdb_assert.
5197 (upload_fast_traceframes): Replace fatal with internal_error.
5198
5199 2014-08-19 Tom Tromey <tromey@redhat.com>
5200 Gary Benson <gbenson@redhat.com>
5201
5202 * Makefile.in (SFILES): Add common/common-debug.c.
5203 (OBS): Add common-debug.o.
5204 (common-debug.o): New rule.
5205 * debug.h (debug_printf): Don't declare.
5206 * debug.c (debug_printf): Renamed and rewritten as...
5207 (debug_vprintf): New function.
5208
5209 2014-08-19 Gary Benson <gbenson@redhat.com>
5210
5211 * utils.h: Do not include print-utils.h.
5212
5213 2014-08-19 Tom Tromey <tromey@redhat.com>
5214 Gary Benson <gbenson@redhat.com>
5215
5216 * server.h: Add static assertion.
5217 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5218
5219 2014-08-19 Tom Tromey <tromey@redhat.com>
5220 Gary Benson <gbenson@redhat.com>
5221
5222 * Makefile.in (SFILES): Add common/errors.c.
5223 (OBS): Add errors.o.
5224 (IPA_OBS): Add errors-ipa.o.
5225 (errors.o): New rule.
5226 (errors-ipa.o): Likewise.
5227 * utils.h (perror_with_name, error, warning): Don't declare.
5228 * utils.c (warning): Renamed and rewritten as...
5229 (vwarning): New function.
5230 (error): Renamed and rewritten as...
5231 (verror): New function.
5232 (internal_error): Renamed and rewritten as...
5233 (internal_verror): New function.
5234
5235 2014-08-07 Gary Benson <gbenson@redhat.com>
5236
5237 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5238 * configure: Regenerate.
5239 * config.in: Likewise.
5240 * server.h: Do not include errno.h.
5241 * event-loop.c: Likewise.
5242 * hostio-errno.c: Likewise.
5243 * linux-low.c: Likewise.
5244 * remote-utils.c: Likewise.
5245 * spu-low.c: Likewise.
5246 * utils.c: Likewise.
5247 * gdbreplay.c: Unconditionally include errno.h.
5248
5249 2014-08-07 Gary Benson <gbenson@redhat.com>
5250
5251 * server.h: Do not include string.h.
5252 * event-loop.c: Likewise.
5253 * linux-low.c: Likewise.
5254 * regcache.c: Likewise.
5255 * remote-utils.c: Likewise.
5256 * spu-low.c: Likewise.
5257 * utils.c: Likewise.
5258
5259 2014-08-07 Gary Benson <gbenson@redhat.com>
5260
5261 * server.h: Do not include gdb_assert.h.
5262
5263 2014-08-07 Gary Benson <gbenson@redhat.com>
5264
5265 * server.h: Do not include common-utils.h.
5266
5267 2014-08-07 Gary Benson <gbenson@redhat.com>
5268
5269 * server.h: Do not include ptid.h.
5270 * notif.h: Likewise.
5271
5272 2014-08-07 Gary Benson <gbenson@redhat.com>
5273
5274 * server.h: Do not include gdb_locale.h.
5275
5276 2014-08-07 Gary Benson <gbenson@redhat.com>
5277
5278 * server.h: Do not include gdb/signals.h.
5279 * win32-low.c: Likewise.
5280
5281 2014-08-07 Gary Benson <gbenson@redhat.com>
5282
5283 * server.h: Do not include pathmax.h.
5284
5285 2014-08-07 Gary Benson <gbenson@redhat.com>
5286
5287 * server.h: Do not include libiberty.h.
5288 * linux-bfin-low.c: Likewise.
5289
5290 2014-08-07 Gary Benson <gbenson@redhat.com>
5291
5292 * server.h: Do not include ansidecl.h.
5293
5294 2014-08-07 Gary Benson <gbenson@redhat.com>
5295
5296 * linux-x86-low.c: Do not include stddef.h.
5297 * lynx-ppc-low.c: Likewise.
5298 * tracepoint.c: Likewise.
5299
5300 2014-08-07 Gary Benson <gbenson@redhat.com>
5301
5302 * server.h: Do not include stdarg.h.
5303 * nto-low.c: Likewise.
5304
5305 2014-08-07 Gary Benson <gbenson@redhat.com>
5306
5307 * server.h: Do not include stdlib.h.
5308 * inferiors.c: Likewise.
5309 * linux-low.c: Likewise.
5310 * regcache.c: Likewise.
5311 * spu-low.c: Likewise.
5312 * tracepoint.c: Likewise.
5313 * utils.c: Likewise.
5314
5315 2014-08-07 Gary Benson <gbenson@redhat.com>
5316
5317 * server.h: Do not include stdio.h.
5318 * linux-low.c: Likewise.
5319 * remote-utils.c: Likewise.
5320 * spu-low.c: Likewise.
5321 * utils.c: Likewise.
5322 * wincecompat.c: Likewise.
5323
5324 2014-08-06 Gary Benson <gbenson@redhat.com>
5325
5326 * regcache.c (init_register_cache): Move conditionals inside if.
5327
5328 2014-08-06 Gary Benson <gbenson@redhat.com>
5329
5330 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5331
5332 2014-07-31 Gary Benson <gbenson@redhat.com>
5333
5334 * ax.h: Do not include server.h.
5335 * gdbthread.h: Likewise.
5336 * lynx-low.h: Likewise.
5337 * notif.h: Likewise.
5338
5339 2014-07-30 Gary Benson <gbenson@redhat.com>
5340
5341 * server.h: Include common-defs.h.
5342 Do not include config.h or build-gnulib-gdbserver/config.h.
5343
5344 2014-07-30 Gary Benson <gbenson@redhat.com>
5345
5346 * hostio-errno.c: Move server.h to top of includes list.
5347 * inferiors.c: Likewise.
5348 * linux-x86-low.c: Likewise.
5349 * notif.c: Include server.h.
5350
5351 2014-07-24 Tom Tromey <tromey@redhat.com>
5352 Gary Benson <gbenson@redhat.com>
5353
5354 * server.h (CORE_ADDR): Now unsigned.
5355
5356 2014-07-16 Pedro Alves <palves@redhat.com>
5357
5358 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5359
5360 2014-07-15 Pedro Alves <palves@redhat.com>
5361
5362 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5363 copy.
5364
5365 2014-07-11 Pedro Alves <palves@redhat.com>
5366
5367 * linux-low.c (kill_wait_lwp): New function, based on
5368 kill_one_lwp_callback, but use my_waitpid directly.
5369 (kill_one_lwp_callback, linux_kill): Use it.
5370
5371 2014-06-23 Pedro Alves <palves@redhat.com>
5372
5373 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5374 before setting DR0..DR3.
5375
5376 2014-06-20 Gary Benson <gbenson@redhat.com>
5377
5378 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5379 * configure: Regenerated.
5380 * config.in: Likewise.
5381
5382 2014-06-20 Gary Benson <gbenson@redhat.com>
5383
5384 * Makefile.in (SFILES): Update locations for files moved
5385 from common to nat.
5386 (object file files): Reordered.
5387
5388 2014-06-20 Gary Benson <gbenson@redhat.com>
5389
5390 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5391 (i386_dr_low_set_addr): Likewise.
5392 (i386_dr_low_get_addr): Likewise.
5393 (i386_dr_low_can_set_control): Likewise.
5394 (i386_dr_low_set_control): Likewise.
5395 (i386_dr_low_get_control): Likewise.
5396 (i386_dr_low_get_status): Likewise.
5397 (i386_get_debug_register_length): Likewise.
5398 * linux-x86-low.c (i386_dr_low_set_addr):
5399 Changed signature. Made static.
5400 (i386_dr_low_get_addr): Likewise.
5401 (i386_dr_low_set_control): Likewise.
5402 (i386_dr_low_get_control): Likewise.
5403 (i386_dr_low_get_status): Likewise.
5404 (i386_dr_low): New global variable.
5405 * win32-i386-low.c (i386_dr_low_set_addr):
5406 Changed signature. Made static.
5407 (i386_dr_low_get_addr): Likewise.
5408 (i386_dr_low_set_control): Likewise.
5409 (i386_dr_low_get_control): Likewise.
5410 (i386_dr_low_get_status): Likewise.
5411 (i386_dr_low): New global variable.
5412
5413 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5414
5415 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5416 * Makefile.in (AR, AR_FLAGS): Define.
5417 * configure: Regenerate.
5418
5419 2014-06-19 Gary Benson <gbenson@redhat.com>
5420
5421 * Makefile.in (i386-dregs.o): New rule.
5422 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5423 * i386-low.c (target.h): Remove include.
5424 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5425 (DR_CONTROL_SHIFT): Likewise.
5426 (DR_CONTROL_SIZE): Likewise.
5427 (DR_RW_EXECUTE): Likewise.
5428 (DR_RW_WRITE): Likewise.
5429 (DR_RW_READ): Likewise.
5430 (DR_RW_IORW): Likewise.
5431 (DR_LEN_1): Likewise.
5432 (DR_LEN_2): Likewise.
5433 (DR_LEN_4): Likewise.
5434 (DR_LEN_8): Likewise.
5435 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5436 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5437 (DR_ENABLE_SIZE): Likewise.
5438 (DR_LOCAL_SLOWDOWN): Likewise.
5439 (DR_GLOBAL_SLOWDOWN): Likewise.
5440 (DR_CONTROL_RESERVED): Likewise.
5441 (I386_DR_CONTROL_MASK): Likewise.
5442 (I386_DR_VACANT): Likewise.
5443 (I386_DR_LOCAL_ENABLE): Likewise.
5444 (I386_DR_GLOBAL_ENABLE): Likewise.
5445 (I386_DR_DISABLE): Likewise.
5446 (I386_DR_SET_RW_LEN): Likewise.
5447 (I386_DR_GET_RW_LEN): Likewise.
5448 (I386_DR_WATCH_HIT): Likewise.
5449 (i386_wp_op_t): Likewise.
5450 (i386_show_dr): Likewise.
5451 (i386_length_and_rw_bits): Likewise.
5452 (i386_insert_aligned_watchpoint): Likewise.
5453 (i386_remove_aligned_watchpoint): Likewise.
5454 (i386_handle_nonaligned_watchpoint): Likewise.
5455 i386_update_inferior_debug_regs(): Likewise.
5456 (i386_dr_insert_watchpoint): Likewise.
5457 (i386_dr_remove_watchpoint): Likewise.
5458 (i386_dr_region_ok_for_watchpoint): Likewise.
5459 (i386_dr_stopped_data_address): Likewise.
5460 (i386_dr_stopped_by_watchpoint): Likewise.
5461
5462 2014-06-19 Gary Benson <gbenson@redhat.com>
5463
5464 * i386-low.c (i386_dr_show): Renamed to
5465 i386_show_dr and made static. All uses updated.
5466 (i386_dr_length_and_rw_bits): Renamed to
5467 i386_length_and_rw_bits and made static.
5468 All uses updated.
5469 (i386_dr_insert_aligned_watchpoint): Renamed to
5470 i386_insert_aligned_watchpoint and made static.
5471 All uses updated.
5472 (i386_dr_remove_aligned_watchpoint): Renamed to
5473 i386_remove_aligned_watchpoint and made static.
5474 All uses updated.
5475 (i386_dr_update_inferior_debug_regs): Renamed to
5476 i386_update_inferior_debug_regs and made static.
5477 All uses updated.
5478
5479 2014-06-18 Gary Benson <gbenson@redhat.com>
5480
5481 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5482 (i386_dr_low_can_set_control): Likewise.
5483 (i386_get_debug_register_length): Likewise.
5484 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5485 (i386_dr_low_can_set_control): Likewise.
5486 (i386_get_debug_register_length): Likewise.
5487
5488 2014-06-17 Gary Benson <gbenson@redhat.com>
5489
5490 * i386-low.h (i386-dregs.h): New include.
5491 (DR_FIRSTADDR): Now in i386-dregs.h.
5492 (DR_LASTADDR): Likewise.
5493 (DR_NADDR): Likewise.
5494 (DR_STATUS): Likewise.
5495 (DR_CONTROL): Likewise.
5496 (i386_debug_reg_state): Likewise.
5497 (i386_dr_insert_watchpoint): Likewise.
5498 (i386_dr_remove_watchpoint): Likewise.
5499 (i386_dr_region_ok_for_watchpoint): Likewise.
5500 (i386_dr_stopped_data_address): Likewise.
5501 (i386_dr_stopped_by_watchpoint): Likewise.
5502 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5503
5504 2014-06-18 Gary Benson <gbenson@redhat.com>
5505
5506 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5507 i386_dr_insert_watchpoint.
5508 (i386_low_remove_watchpoint): Renamed to
5509 i386_dr_remove_watchpoint.
5510 (i386_low_region_ok_for_watchpoint): Renamed to
5511 i386_dr_region_ok_for_watchpoint.
5512 (i386_low_stopped_data_address): Renamed to
5513 i386_dr_stopped_data_address.
5514 (i386_low_stopped_by_watchpoint): Renamed to
5515 i386_dr_stopped_by_watchpoint.
5516 * i386-low.c (i386_show_dr): Renamed to
5517 i386_dr_show and made nonstatic. All uses updated.
5518 (i386_length_and_rw_bits): Renamed to
5519 i386_dr_length_and_rw_bits and made nonstatic.
5520 All uses updated.
5521 (i386_insert_aligned_watchpoint): Renamed to
5522 i386_dr_insert_aligned_watchpoint and made nonstatic.
5523 All uses updated.
5524 (i386_remove_aligned_watchpoint): Renamed to
5525 i386_dr_remove_aligned_watchpoint and made nonstatic.
5526 All uses updated.
5527 (i386_update_inferior_debug_regs): Renamed to
5528 i386_dr_update_inferior_debug_regs and made nonstatic.
5529 All uses updated.
5530 (i386_low_insert_watchpoint): Renamed to
5531 i386_dr_insert_watchpoint. All uses updated.
5532 (i386_low_remove_watchpoint): Renamed to
5533 i386_dr_remove_watchpoint. All uses updated.
5534 (i386_low_region_ok_for_watchpoint): Renamed to
5535 i386_dr_region_ok_for_watchpoint. All uses updated.
5536 (i386_low_stopped_data_address): Renamed to
5537 i386_dr_stopped_data_address. All uses updated.
5538 (i386_low_stopped_by_watchpoint): Renamed to
5539 i386_dr_stopped_by_watchpoint. All uses updated.
5540
5541 2014-06-18 Gary Benson <gbenson@redhat.com>
5542
5543 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5544 (i386_dr_low_can_set_control): Likewise.
5545 (i386_insert_aligned_watchpoint): New check.
5546
5547 2014-06-18 Gary Benson <gbenson@redhat.com>
5548
5549 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5550 Renamed to state.
5551
5552 2014-06-18 Gary Benson <gbenson@redhat.com>
5553
5554 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5555 instead of fatal and error.
5556 (i386_handle_nonaligned_watchpoint): Likewise.
5557
5558 2014-06-18 Gary Benson <gbenson@redhat.com>
5559
5560 * i386-low.c (i386_get_debug_register_length): New macro.
5561 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5562 (i386_show_dr): Use debug_printf instead of fprintf. Use
5563 phex to format values.
5564
5565 2014-06-18 Gary Benson <gbenson@redhat.com>
5566
5567 * i386-low.h: Comment changes.
5568 * i386-low.c: Likewise.
5569
5570 2014-06-18 Gary Benson <gbenson@redhat.com>
5571
5572 * i386-low.c: Whitespace changes.
5573
5574 2014-06-12 Tom Tromey <tromey@redhat.com>
5575
5576 * utils.c (freeargv): Remove.
5577
5578 2014-06-12 Tom Tromey <tromey@redhat.com>
5579
5580 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5581 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5582 (parse_debug_format_options): Likewise.
5583 (gdbserver_usage): Likewise.
5584 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5585 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5586 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5587 against libiberty.
5588 ($(LIBGNU)): Depend on libiberty.
5589 (all-lib): Recurse into all subdirs.
5590 (install-only): Invoke "install" target in subdirs.
5591 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5592 targets.
5593 * configure: Rebuild.
5594 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5595 for vasprintf, vsnprintf, or gettimeofday.
5596 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5597 srv_tgtobj.
5598
5599 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5600
5601 * development.sh: Delete.
5602 * Makefile.in (config.status): Adjust dependency on development.sh.
5603 * configure.ac: Adjust development.sh source call.
5604 * configure: Regenerate.
5605
5606 2014-06-02 Pedro Alves <palves@redhat.com>
5607
5608 * ax.c (gdb_free_agent_expr): New function.
5609 * ax.h (gdb_free_agent_expr): New declaration.
5610 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5611 list.
5612 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5613 static.
5614 (clear_breakpoint_conditions_and_commands): New function.
5615 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5616 (clear_breakpoint_conditions_and_commands): New declaration.
5617
5618 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5619
5620 * linux-aarch64-low.c (asm/ptrace.h): Include.
5621
5622 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5623
5624 Fix TLS access for -static -pthread.
5625 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5626 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5627 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5628
5629 2014-05-20 Pedro Alves <palves@redhat.com>
5630
5631 * linux-aarch64-low.c (aarch64_insert_point)
5632 (aarch64_remove_point): No longer check whether the type is
5633 supported here. Adjust to new interface.
5634 (the_low_target): Install aarch64_supports_z_point_type as
5635 supports_z_point_type method.
5636 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5637 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5638 instead of a Z packet char. Adjust.
5639 (arm_supports_z_point_type): New function.
5640 (arm_insert_point, arm_remove_point): Adjust to new interface.
5641 (the_low_target): Install arm_supports_z_point_type.
5642 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5643 (cris_insert_point, cris_remove_point): Adjust to new interface.
5644 Don't check whether the type is supported here.
5645 (the_low_target): Install cris_supports_z_point_type.
5646 * linux-low.c (linux_supports_z_point_type): New function.
5647 (linux_insert_point, linux_remove_point): Adjust to new interface.
5648 * linux-low.h (struct linux_target_ops) <insert_point,
5649 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5650 raw_breakpoint pointer parameter.
5651 <supports_z_point_type>: New method.
5652 * linux-mips-low.c (mips_supports_z_point_type): New function.
5653 (mips_insert_point, mips_remove_point): Adjust to new interface.
5654 Use mips_supports_z_point_type.
5655 (the_low_target): Install mips_supports_z_point_type.
5656 * linux-ppc-low.c (the_low_target): Install NULL as
5657 supports_z_point_type method.
5658 * linux-s390-low.c (the_low_target): Install NULL as
5659 supports_z_point_type method.
5660 * linux-sparc-low.c (the_low_target): Install NULL as
5661 supports_z_point_type method.
5662 * linux-x86-low.c (x86_supports_z_point_type): New function.
5663 (x86_insert_point): Adjust to new insert_point interface. Use
5664 insert_memory_breakpoint. Adjust to new
5665 i386_low_insert_watchpoint interface.
5666 (x86_remove_point): Adjust to remove_point interface. Use
5667 remove_memory_breakpoint. Adjust to new
5668 i386_low_remove_watchpoint interface.
5669 (the_low_target): Install x86_supports_z_point_type.
5670 * lynx-low.c (lynx_target_ops): Install NULL as
5671 supports_z_point_type callback.
5672 * nto-low.c (nto_supports_z_point_type): New.
5673 (nto_insert_point, nto_remove_point): Adjust to new interface.
5674 (nto_target_ops): Install nto_supports_z_point_type.
5675 * mem-break.c: Adjust intro comment.
5676 (struct raw_breakpoint) <raw_type, size>: New fields.
5677 <inserted>: Update comment.
5678 <shlib_disabled>: Delete field.
5679 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5680 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5681 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5682 (raw_bkpt_type_to_target_hw_bp_type): New function.
5683 (find_enabled_raw_code_breakpoint_at): New function.
5684 (find_raw_breakpoint_at): New type and size parameters. Use them.
5685 (insert_memory_breakpoint): New function, based off
5686 set_raw_breakpoint_at.
5687 (remove_memory_breakpoint): New function.
5688 (set_raw_breakpoint_at): Reimplement.
5689 (set_breakpoint): New, based on set_breakpoint_at.
5690 (set_breakpoint_at): Reimplement.
5691 (delete_raw_breakpoint): Go through the_target->remove_point
5692 instead of assuming memory breakpoints.
5693 (find_gdb_breakpoint_at): Delete.
5694 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5695 (find_gdb_breakpoint): New function.
5696 (set_gdb_breakpoint_at): Delete.
5697 (z_type_supported): New function.
5698 (set_gdb_breakpoint_1): New function, loosely based off
5699 set_gdb_breakpoint_at.
5700 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5701 (delete_gdb_breakpoint_at): Delete.
5702 (delete_gdb_breakpoint_1): New function, loosely based off
5703 delete_gdb_breakpoint_at.
5704 (delete_gdb_breakpoint): New function.
5705 (clear_gdb_breakpoint_conditions): Rename to ...
5706 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5707 breakpoint.
5708 (add_condition_to_breakpoint): Make static.
5709 (add_breakpoint_condition): Take a struct breakpoint pointer
5710 instead of an address. Adjust.
5711 (gdb_condition_true_at_breakpoint): Rename to ...
5712 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5713 z_type parameter.
5714 (gdb_condition_true_at_breakpoint): Reimplement.
5715 (add_breakpoint_commands): Take a struct breakpoint pointer
5716 instead of an address. Adjust.
5717 (gdb_no_commands_at_breakpoint): Rename to ...
5718 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5719 parameter. Return true if no breakpoint was found. Change debug
5720 output.
5721 (gdb_no_commands_at_breakpoint): Reimplement.
5722 (run_breakpoint_commands): Rename to ...
5723 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5724 and change return type to boolean.
5725 (run_breakpoint_commands): New function.
5726 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5727 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5728 breakpoint. Go through the_target->remove_point instead of
5729 assuming memory breakpoint.
5730 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5731 software and hardware breakpoints.
5732 (reinsert_raw_breakpoint): Go through the_target->insert_point
5733 instead of assuming memory breakpoint.
5734 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5735 software and hardware breakpoints.
5736 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5737 Check both software and hardware breakpoints.
5738 (validate_inserted_breakpoint): Assert the breakpoint is a
5739 software breakpoint. Set the inserted flag to -1 instead of
5740 setting shlib_disabled.
5741 (delete_disabled_breakpoints): Adjust.
5742 (validate_breakpoints): Only validate software breakpoints.
5743 Adjust to inserted flag change.
5744 (check_mem_read, check_mem_write): Skip breakpoint types other
5745 than software breakpoints. Adjust to inserted flag change.
5746 * mem-break.h (enum raw_bkpt_type): New enum.
5747 (raw_breakpoint, struct process_info): Forward declare.
5748 (Z_packet_to_target_hw_bp_type): Delete declaration.
5749 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5750 (set_gdb_breakpoint, delete_gdb_breakpoint)
5751 (clear_breakpoint_conditions): New declarations.
5752 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5753 (breakpoint_inserted_here): Update comment.
5754 (add_breakpoint_condition, add_breakpoint_commands): Replace
5755 address parameter with a breakpoint pointer parameter.
5756 (gdb_breakpoint_here): Update comment.
5757 (delete_gdb_breakpoint_at): Delete.
5758 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5759 * server.c (process_point_options): Take a struct breakpoint
5760 pointer instead of an address. Adjust.
5761 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5762 delete_gdb_breakpoint.
5763 * spu-low.c (spu_target_ops): Install NULL as
5764 supports_z_point_type method.
5765 * target.h: Include mem-break.h.
5766 (struct target_ops) <prepare_to_access_memory>: Update comment.
5767 <supports_z_point_type>: New field.
5768 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5769 instead of a char. Also take a raw breakpoint pointer.
5770 * win32-arm-low.c (the_low_target): Install NULL as
5771 supports_z_point_type.
5772 * win32-i386-low.c (i386_supports_z_point_type): New function.
5773 (i386_insert_point, i386_remove_point): Adjust to new interface.
5774 (the_low_target): Install i386_supports_z_point_type.
5775 * win32-low.c (win32_supports_z_point_type): New function.
5776 (win32_insert_point, win32_remove_point): Adjust to new interface.
5777 (win32_target_ops): Install win32_supports_z_point_type.
5778 * win32-low.h (struct win32_target_ops):
5779 <supports_z_point_type>: New method.
5780 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5781 instead of a char. Also take a raw breakpoint pointer.
5782
5783 2014-05-20 Pedro Alves <palves@redhat.com>
5784
5785 * mem-break.h: Include break-common.h.
5786 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5787 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5788 (Z_packet_to_target_hw_bp_type): New declaration.
5789 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5790 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5791 (Z_PACKET_ACCESS_WP): Delete macros.
5792 (Z_packet_to_hw_type): Delete function.
5793 * i386-low.h: Don't include break-common.h here.
5794 (Z_packet_to_hw_type): Delete declaration.
5795 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5796 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5797 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5798 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5799 * linux-aarch64-low.c: Don't include break-common.h here.
5800 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5801 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5802 (Z_packet_to_target_hw_bp_type): Delete function.
5803 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5804 function.
5805 (mips_insert_point, mips_remove_point): Use
5806 Z_packet_to_target_hw_bp_type.
5807
5808 2014-05-20 Pedro Alves <palves@redhat.com>
5809
5810 * linux-aarch64-low.c: Include break-common.h.
5811 (enum target_point_type): Delete.
5812 (Z_packet_to_point_type): Rename to ...
5813 (Z_packet_to_target_hw_bp_type): ... this, and return a
5814 target_hw_bp_type instead.
5815 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5816 instead of an enum target_point_type.
5817 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5818 breakpoint type.
5819 (aarch64_dr_state_insert_one_point)
5820 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5821 (aarch64_handle_aligned_watchpoint)
5822 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5823 Take an enum target_hw_bp_type instead of an enum
5824 target_point_type.
5825 (aarch64_supports_z_point_type): New function.
5826 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5827 use Z_packet_to_target_hw_bp_type.
5828
5829 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5830
5831 * configure.ac: Only use -Werror by default when DEVELOPMENT
5832 is true.
5833 * configure: Regenerate.
5834
5835 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5836
5837 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5838 * linux-x86-low.c (X86_64_USER_REGS): New.
5839 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5840
5841 2014-04-28 Yao Qi <yao@codesourcery.com>
5842
5843 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5844 name.
5845
5846 2014-04-25 Pedro Alves <palves@redhat.com>
5847
5848 PR server/16255
5849 * linux-low.c (linux_attach_fail_reason_string): New function.
5850 (linux_attach_lwp): Delete.
5851 (linux_attach_lwp_1): Rename to ...
5852 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5853 argument. Remove "initial" parameter. Return int instead of
5854 void. Don't error or warn here.
5855 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5856 failure to attach to the tgid. Call warning when failing to
5857 attach to an lwp.
5858 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5859 argument. Remove "initial" parameter. Return int instead of
5860 void. Don't error or warn here.
5861 (linux_attach_fail_reason_string): New declaration.
5862 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5863 interface change. Use linux_attach_fail_reason_string.
5864
5865 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5866 Walfred Tedeschi <walfred.tedeschi@intel.com>
5867
5868 * Makefile.in: Added rules to handle new files
5869 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5870 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5871 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5872 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5873 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5874 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5875 x32-avx512-linux.o.
5876 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5877 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5878 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5879 i386/x32-avx512.xml.
5880 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5881 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5882 i386/x32-avx512-linux.xml.
5883 * i387-fp.c (num_avx512_k_registers): New constant for number
5884 of K registers.
5885 (num_avx512_zmmh_low_registers): New constant for number of
5886 lower ZMM registers (0-15).
5887 (num_avx512_zmmh_high_registers): New constant for number of
5888 higher ZMM registers (16-31).
5889 (num_avx512_ymmh_registers): New contant for number of higher
5890 YMM registers (ymm16-31 added by avx521 on x86_64).
5891 (num_avx512_xmm_registers): New constant for number of higher
5892 XMM registers (xmm16-31 added by AVX512 on x86_64).
5893 (struct i387_xsave): Add space for AVX512 registers.
5894 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5895 Add code to handle AVX512 registers.
5896 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5897 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5898 prototypei from generated file.
5899 (tdesc_amd64_avx512_linux): Likewise.
5900 (init_registers_x32_avx512_linux): Likewise.
5901 (tdesc_x32_avx512_linux): Likewise.
5902 (init_registers_i386_avx512_linux): Likewise.
5903 (tdesc_i386_avx512_linux): Likewise.
5904 (x86_64_regmap): Add AVX512 registers.
5905 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5906 mask.
5907 (initialize_low_arch): Add code to initialize AVX512 registers.
5908
5909 2014-04-23 Pedro Alves <palves@redhat.com>
5910
5911 * mem-break.c (find_gdb_breakpoint_at): Make static.
5912 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5913
5914 2014-04-23 Pedro Alves <palves@redhat.com>
5915
5916 * i386-low.c: Don't include break-common.h here.
5917 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5918 prototype to take target_hw_bp_type as argument instead of a Z
5919 packet char.
5920 * i386-low.h: Include break-common.h here.
5921 (Z_packet_to_hw_type): Declare.
5922 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5923 prototypes.
5924 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5925 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5926 (x86_remove_point): Convert the packet number to a
5927 target_hw_bp_type before calling i386_low_remove_watchpoint.
5928 * win32-i386-low.c (i386_insert_point): Convert the packet number
5929 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5930 (i386_remove_point): Convert the packet number to a
5931 target_hw_bp_type before calling i386_low_remove_watchpoint.
5932
5933 2014-04-23 Pedro Alves <palves@redhat.com>
5934
5935 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5936
5937 2014-04-10 Pedro Alves <palves@redhat.com>
5938
5939 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5940 Check if the condition or command is NULL before checking if the
5941 breakpoint is known. On success, return true.
5942 * mem-break.h (add_breakpoint_condition): Document return.
5943 (add_breakpoint_commands): Add describing comment.
5944 * server.c (skip_to_semicolon): New function.
5945 (process_point_options): Use it.
5946
5947 2014-04-09 Pedro Alves <palves@redhat.com>
5948
5949 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5950 to lwpid_of.
5951
5952 2014-02-27 Pedro Alves <palves@redhat.com>
5953
5954 PR 12702
5955 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5956 macros.
5957 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5958 output.
5959 (last_thread_of_process_p): Take a PID argument instead of a
5960 thread pointer.
5961 (linux_wait_for_lwp): Delete.
5962 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5963 functions.
5964 (linux_low_filter_event): New function, party factored out from
5965 linux_wait_for_event.
5966 (linux_wait_for_event): Rename to ...
5967 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5968 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5969 sigsuspend. Check for zombie leaders.
5970 (linux_wait_for_event): Reimplement as wrapper around
5971 linux_wait_for_event_filtered.
5972 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5973 a normal or signal exit is seen, it's the whole process exiting.
5974 (wait_for_sigstop): No longer a for_each_inferior callback.
5975 Rewrite on top of linux_wait_for_event_filtered.
5976 (stop_all_lwps): Call wait_for_sigstop directly.
5977 * server.c (resume, handle_target_event): Handle
5978 TARGET_WAITKIND_NO_RESUMED.
5979
5980 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5981
5982 * win32-low.c (psapi_get_dll_name,
5983 * win32_CreateToolhelp32Snapshot): Delete.
5984 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5985 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5986 Delete.
5987 (handle_load_dll): Add function description.
5988 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5989
5990 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5991
5992 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5993 Add comment.
5994 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5995 base address when calling win32_add_one_solib.
5996 (handle_load_dll): Delete local variable load_addr.
5997 Remove 0x1000 offset applied to DLL base address when calling
5998 win32_add_one_solib.
5999 (handle_unload_dll): Add comment.
6000
6001 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6002
6003 * win32-low.c (win32_add_all_dlls): Renames
6004 win32_ensure_ntdll_loaded. Rewrite function documentation.
6005 Adjust implementation to always load all DLLs.
6006 Add 0x1000 offset to DLL base address when calling
6007 win32_add_one_solib.
6008 (child_initialization_done): New static global.
6009 (do_initial_child_stuff): Set child_initialization_done to
6010 zero during child initialization, and 1 after. Replace call
6011 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6012 Add comment.
6013 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6014 (handle_unload_dll): Add function documentation.
6015 (get_child_debug_event): Ignore load and unload DLL events
6016 during child initialization.
6017
6018 2014-02-20 Doug Evans <dje@google.com>
6019
6020 Remove global all_lwps.
6021 * inferiors.h (ptid_of): Move here from linux-low.h.
6022 (pid_of, lwpid_of): Ditto.
6023 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6024 parameter is a struct thread_info * now.
6025 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6026 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6027 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6028 directly.
6029 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6030 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6031 * linux-arm-low.c (update_registers_callback): Update, "entry"
6032 parameter is a struct thread_info * now.
6033 Fetch lwpid from current_inferior directly.
6034 (arm_insert_point): Pass &all_threads to find_inferior instead of
6035 &all_lwps.
6036 (arm_remove_point): Ditto.
6037 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6038 (arm_prepare_to_resume): Fetch pid from thread.
6039 (arm_read_description): Fetch lwpid from current_inferior directly.
6040 * linux-low.c (all_lwps): Delete.
6041 (delete_lwp): Delete call to remove_inferior.
6042 (handle_extended_wait): Fetch lwpid from thread.
6043 (add_lwp): Don't set lwp->entry.id. Remove call to
6044 add_inferior_to_list.
6045 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6046 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6047 (kill_one_lwp_callback): Ditto.
6048 (linux_kill): Don't dereference NULL pointer.
6049 Fetch ptid,lwpid from thread.
6050 (get_detach_signal): Fetch ptid from thread.
6051 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6052 Simplify call to regcache_invalidate_thread.
6053 (delete_lwp_callback): Update, "entry" parameter is a
6054 struct thread_info * now. Fetch pid from thread.
6055 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6056 (status_pending_p_callback): Update, "entry" parameter is a
6057 struct thread_info * now. Fetch ptid from thread.
6058 (find_lwp_pid): Update, "entry" parameter is a
6059 struct thread_info * now.
6060 (linux_wait_for_lwp): Fetch pid from thread.
6061 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6062 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6063 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6064 (dequeue_one_deferred_signal): Ditto.
6065 (cancel_breakpoint): Fetch ptid from current_inferior.
6066 (linux_wait_for_event): Pass &all_threads to find_inferior,
6067 not &all_lwps. Fetch ptid, lwpid from thread.
6068 (count_events_callback): Update, "entry" parameter is a
6069 struct thread_info * now.
6070 (select_singlestep_lwp_callback): Ditto.
6071 (select_event_lwp_callback): Ditto.
6072 (cancel_breakpoints_callback): Ditto.
6073 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6074 not &all_lwps.
6075 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6076 (unsuspend_one_lwp): Update, "entry" parameter is a
6077 struct thread_info * now.
6078 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6079 not &all_lwps.
6080 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6081 Fetch lwpid from thread, not lwp.
6082 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6083 Pass &all_threads to find_inferior, not &all_lwps.
6084 (send_sigstop): Fetch lwpid from thread, not lwp.
6085 (send_sigstop_callback): Update, "entry" parameter is a
6086 struct thread_info * now.
6087 (suspend_and_send_sigstop_callback): Ditto.
6088 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6089 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6090 struct thread_info * now.
6091 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6092 from thread, lwp.
6093 (lwp_running): Update, "entry" parameter is a
6094 struct thread_info * now.
6095 (stop_all_lwps): Fetch ptid from thread.
6096 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6097 (linux_resume_one_lwp): Fetch lwpid from thread.
6098 (linux_set_resume_request): Update, "entry" parameter is a
6099 struct thread_info * now. Fetch pid, lwpid from thread.
6100 (resume_status_pending_p): Update, "entry" parameter is a
6101 struct thread_info * now.
6102 (need_step_over_p): Ditto. Fetch lwpid from thread.
6103 (start_step_over): Fetch lwpid from thread.
6104 (linux_resume_one_thread): Update, "entry" parameter is a
6105 struct thread_info * now. Fetch lwpid from thread.
6106 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6107 (proceed_one_lwp): Update, "entry" parameter is a
6108 struct thread_info * now. Fetch lwpid from thread.
6109 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6110 struct thread_info * now.
6111 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6112 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6113 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6114 directly.
6115 (regsets_store_inferior_registers): Ditto.
6116 (fetch_register, store_register): Ditto.
6117 (linux_read_memory, linux_write_memory): Ditto.
6118 (linux_request_interrupt): Ditto.
6119 (linux_read_auxv): Ditto.
6120 (linux_xfer_siginfo): Ditto.
6121 (linux_qxfer_spu): Ditto.
6122 (linux_qxfer_libraries_svr4): Ditto.
6123 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6124 moved to inferiors.h.
6125 (get_lwp): Delete.
6126 (get_thread_lwp): Update.
6127 (struct lwp_info): Delete member "entry". Simplify comment for
6128 member "thread".
6129 (all_lwps): Delete.
6130 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6131 current_inferior directly.
6132 (update_watch_registers_callback): Update, "entry" parameter is a
6133 struct thread_info * now. Fetch pid from thread.
6134 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6135 (mips_insert_point): Fetch lwpid from current_inferior.
6136 Pass &all_threads to find_inferior, not &all_lwps.
6137 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6138 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6139 directly.
6140 (mips_stopped_data_address): Ditto.
6141 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6142 directly.
6143 * linux-tile-low.c (tile_arch_setup): Ditto.
6144 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6145 (update_debug_registers_callback): Update, "entry" parameter is a
6146 struct thread_info * now. Fetch pid from thread.
6147 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6148 Pass &all_threads to find_inferior, not &all_lwps.
6149 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6150 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6151 Pass &all_threads to find_inferior, not &all_lwps.
6152 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6153 (i386_dr_low_get_status): Ditto.
6154 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6155 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6156 (x86_linux_read_description): Ditto.
6157 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6158
6159 2014-02-20 Doug Evans <dje@google.com>
6160
6161 * inferiors.c (get_first_inferior): Fix buglet.
6162
6163 2014-02-19 Doug Evans <dje@google.com>
6164
6165 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6166 * inferiors.c (add_thread): Change result type to struct thread_info *.
6167 All callers updated.
6168 (add_lwp): Call add_thread here instead of in callers.
6169 All callers updated.
6170 * linux-low.h (get_lwp_thread): Rewrite.
6171 (struct lwp_info): New member "thread".
6172
6173 2014-02-19 Doug Evans <dje@google.com>
6174
6175 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6176 All callers updated.
6177
6178 2014-02-19 Doug Evans <dje@google.com>
6179
6180 * inferiors.c (add_thread): Fix whitespace.
6181
6182 2014-02-19 Doug Evans <dje@google.com>
6183
6184 * dll.c (clear_dlls): Replace accessing list implemention details
6185 with API function.
6186 * gdbthread.h (get_first_thread): Declare.
6187 * inferiors.c (for_each_inferior_with_data): New function.
6188 (get_first_thread): New function.
6189 (find_thread_ptid): Simplify.
6190 (get_first_inferior): New function.
6191 (clear_list): Delete.
6192 (one_inferior_p): New function.
6193 (clear_inferior_list): New function.
6194 (clear_inferiors): Update.
6195 * inferiors.h (for_each_inferior_with_data): Declare.
6196 (clear_inferior_list): Declare.
6197 (one_inferior_p): Declare.
6198 (get_first_inferior): Declare.
6199 * linux-low.c (linux_wait_for_event): Replace accessing list
6200 implemention details with API function.
6201 * server.c (target_running): Ditto.
6202 (accumulate_file_name_length): New function.
6203 (emit_dll_description): New function.
6204 (handle_qxfer_libraries): Replace accessing list implemention
6205 details with API function.
6206 (handle_qxfer_threads_worker): New function.
6207 (handle_qxfer_threads_proper): Replace accessing list implemention
6208 details with API function.
6209 (handle_query): Ditto.
6210 (visit_actioned_threads_callback_ftype): New typedef.
6211 (visit_actioned_threads_data): New struct.
6212 (visit_actioned_threads): Rewrite to be find_inferior callback.
6213 (resume): Call find_inferior.
6214 (handle_status): Replace accessing list implemention
6215 details with API function.
6216 (process_serial_event): Replace accessing list implemention details
6217 with API function.
6218 * target.c (set_desired_inferior): Replace accessing list implemention
6219 details with API function.
6220 * tracepoint.c (same_process_p): New function.
6221 (gdb_agent_about_to_close): Replace accessing list implemention
6222 details with API function.
6223 * win32-low.c (child_delete_thread): Replace accessing list
6224 implemention details with API function.
6225 (match_dll_by_basename): New function.
6226 (dll_is_loaded_by_basename): New function.
6227 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6228 details call to dll_is_loaded_by_basename.
6229
6230 2014-02-19 Doug Evans <dje@google.com>
6231
6232 * dll.h (struct dll_info): Add comment.
6233 * gdbthread.h (struct thread_info): Add comment.
6234 (current_ptid): Simplify.
6235 * inferiors.c (add_process): Update.
6236 (remove_process): Update.
6237 * inferiors.h (struct process_info): Rename member "head" to "entry".
6238 * linux-low.c (delete_lwp): Update.
6239 (add_lwp): Update.
6240 (last_thread_of_process_p): Update.
6241 (kill_one_lwp_callback, linux_kill): Update.
6242 (status_pending_p_callback): Update.
6243 (wait_for_sigstop): Update. Simplify read of ptid.
6244 (start_step_over): Update.
6245 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6246 (get_lwp_thread): Update.
6247 (struct lwp_info): Rename member "head" to "entry".
6248 * regcache.h (inferior_list_entry): Delete.
6249 * server.c (kill_inferior_callback): Update.
6250 (detach_or_kill_inferior_callback): Update.
6251 (print_started_pid): Update.
6252 (print_attached_pid): Update.
6253 (process_serial_event): Simplify read of ptid.
6254 * thread-db.c (thread_db_create_event): Update.
6255 (thread_db_get_tls_address): Update.
6256 * win32-low.c (current_inferior_ptid): Simplify.
6257
6258 2014-02-19 Tom Tromey <tromey@redhat.com>
6259
6260 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6261 argument.
6262 (target_supports_btrace): Update.
6263
6264 2014-02-14 Yao Qi <yao@codesourcery.com>
6265
6266 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6267 (rsp-low-ipa.o): New target.
6268
6269 2014-02-12 Tom Tromey <tromey@redhat.com>
6270
6271 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6272 convert_ascii_to_int.
6273 * regcache.c (registers_to_string): Likewise.
6274 * remote-utils.c (decode_M_packet): Likewise.
6275 * server.c (process_serial_event): Likewise.
6276
6277 2014-02-12 Tom Tromey <tromey@redhat.com>
6278
6279 * server.c (handle_query, handle_v_run): Use hex2bin, not
6280 unhexify.
6281 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6282
6283 2014-02-12 Tom Tromey <tromey@redhat.com>
6284
6285 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6286 convert_int_to_ascii.
6287 * regcache.c (registers_to_string, collect_register_as_string):
6288 Likewise.
6289 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6290 Likewise.
6291 * server.c (process_serial_event): Likewise.
6292 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6293 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6294
6295 2014-02-12 Tom Tromey <tromey@redhat.com>
6296
6297 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6298 bin2hex, not hexify.
6299 * tracepoint.c (cmd_qtstatus): Likewise.
6300
6301 2014-02-12 Tom Tromey <tromey@redhat.com>
6302
6303 * remote-utils.c (monitor_output): Pass explicit length to
6304 hexify.
6305
6306 2014-02-12 Tom Tromey <tromey@redhat.com>
6307
6308 * tracepoint.c: Include rsp-low.h.
6309 * server.c: Include rsp-low.h.
6310 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6311 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6312 declare.
6313 * remote-utils.c: Include rsp-low.h.
6314 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6315 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6316 (convert_int_to_ascii, convert_ascii_to_int): Move to
6317 common/rsp-low.c.
6318 * regcache.c: Include rsp-low.h.
6319 * ax.c: Include rsp-low.h.
6320 * Makefile.in (SFILES): Add common/rsp-low.c.
6321 (OBS): Add rsp-low.o.
6322 (rsp-low.o): New target.
6323
6324 2014-02-12 Tom Tromey <tromey@redhat.com>
6325
6326 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6327 Include print-utils.h.
6328 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6329 (plongest, thirty_two, phex_nz): Remove.
6330 * Makefile.in (SFILES): Add common/print-utils.c.
6331 (OBS): Add print-utils.o.
6332 (print-utils-ipa.o): New target.
6333 (print-utils.o): New target.
6334 (IPA_OBJS): Add print-utils-ipa.o.
6335
6336 2014-02-06 Tom Tromey <tromey@redhat.com>
6337
6338 * Makefile.in (SFILES): Fix indentation.
6339
6340 2014-02-05 Doug Evans <dje@google.com>
6341
6342 * linux-low.c (linux_wait_for_event): Improve comment.
6343 (linux_wait_1): Keep current_inferior in sync with event_child.
6344
6345 2014-01-22 Doug Evans <dje@google.com>
6346
6347 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6348
6349 2014-01-22 Doug Evans <dje@google.com>
6350
6351 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6352 * configure: Regenerate.
6353 * config.in: Regenerate.
6354 * Makefile.in (SFILES): Add debug.c.
6355 (OBS): Add debug.o.
6356 * debug.c: New file.
6357 * debug.h: New file.
6358 * linux-aarch64-low.c (*): Update all debugging printfs to use
6359 debug_printf instead of fprintf.
6360 * linux-arm-low.c (*): Ditto.
6361 * linux-cris-low.c (*): Ditto.
6362 * linux-crisv32-low.c (*): Ditto.
6363 * linux-m32r-low.c (*): Ditto.
6364 * linux-sparc-low.c (*): Ditto.
6365 * linux-x86.c (*): Ditto.
6366 * linux-low.c (*): Ditto.
6367 (linux_wait_1): Add calls to debug_enter, debug_exit.
6368 (linux_wait): Remove redundant debugging printf.
6369 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6370 (linux_resume, unstop_all_lwps): Ditto.
6371 * mem-break.c (*): Update all debugging printfs to use
6372 debug_printf instead of fprintf.
6373 * remote-utils.c (*): Ditto.
6374 * thread-db.c (*): Ditto.
6375 * server.c #include <ctype.h>, "gdb_vecs.h".
6376 (debug_threads): Moved to debug.c.
6377 (*): Update all debugging printfs to use debug_printf instead of
6378 fprintf.
6379 (start_inferior): Replace call to fflush with call to debug_flush.
6380 (monitor_show_help): Mention set debug-format.
6381 (parse_debug_format_options): New function.
6382 (handle_monitor_command): Handle "monitor set debug-format".
6383 (gdbserver_usage): Mention --debug-format.
6384 (main): Parse --debug-format.
6385 * server.h (debug_threads): Declaration moved to debug.h.
6386 #include "debug.h".
6387 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6388 trace_debug_1 that uses debug_printf.
6389 (tracepoint_look_up_symbols): Update all debugging printfs to use
6390 debug_printf instead of fprintf.
6391
6392 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6393
6394 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6395 sys/ptrace.h.
6396
6397 2014-01-17 Pedro Alves <palves@redhat.com>
6398
6399 PR build/16445
6400 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6401 defined after including gdb_proc_service.h.
6402
6403 2014-01-16 Doug Evans <dje@google.com>
6404
6405 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6406 (match_dll): Use it.
6407
6408 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6409
6410 * target.h (target_ops) <read_btrace>: Change parameters and
6411 return type to allow error reporting.
6412 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6413 trace reading errors on.
6414 * linux-low.c (linux_low_read_btrace): Pass trace reading
6415 errors on.
6416 (linux_low_disable_btrace): New.
6417
6418 2014-01-15 Doug Evans <dje@google.com>
6419
6420 * inferiors.c (thread_id_to_gdb_id): Delete.
6421 * inferiors.h (thread_id_to_gdb_id): Delete.
6422
6423 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6424
6425 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6426 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6427 versions.
6428
6429 2014-01-08 Pedro Alves <palves@redhat.com>
6430
6431 * server.c (handle_status): Don't discard previous queued stop
6432 replies or thread's pending status here.
6433 (main) <disconnection>: Do it here instead.
6434
6435 2014-01-08 Pedro Alves <palves@redhat.com>
6436
6437 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6438 * server.c (visit_actioned_threads, handle_pending_status): New
6439 function.
6440 (handle_v_cont): Factor out parts to ...
6441 (resume): ... this new function. If in all-stop, and a thread
6442 being resumed has a pending status, report it without actually
6443 resuming.
6444 (myresume): Adjust to use the new 'resume' function.
6445 (clear_pending_status_callback, set_pending_status_callback)
6446 (find_status_pending_thread_callback): New functions.
6447 (handle_status): Handle the case of multiple threads having
6448 interesting statuses to report. Report threads' real last signal
6449 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6450 with an interesting thread to report the status for, instead of
6451 always reporting the status of the first thread.
6452
6453 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6454
6455 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6456 * gdbreplay.c (gdbreplay_version): Likewise.
6457
6458 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6459
6460 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6461 iov.iov_len with the real length in use.
6462
6463 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6464
6465 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6466 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6467 for all targets that use win32-low.c.
6468 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6469 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6470
6471 2013-12-13 Pedro Alves <palves@redhat.com>
6472
6473 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6474 if equal to TARGET_WAITKIND_LOADED.
6475 * win32-low.c (cached_status): New static global.
6476 (win32_wait): Add declaration.
6477 (do_initial_child_stuff): Flush all initial pending debug events
6478 up to the initial breakpoint.
6479 (win32_wait): If CACHED_STATUS was set, return that instead
6480 of doing a real wait. Remove the code resuming the execution
6481 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6482 during the initial phase. Also remove the code changing
6483 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6484 TARGET_WAITKIND_STOPPED.
6485
6486 2013-12-11 Yao Qi <yao@codesourcery.com>
6487
6488 * notif.c (handle_notif_ack): Return 0 if no notification
6489 matches.
6490
6491 2013-11-20 Doug Evans <dje@google.com>
6492
6493 * linux-low.c (linux_set_resume_request): Fix comment.
6494
6495 2013-11-20 Doug Evans <dje@google.com>
6496
6497 * linux-low.c (resume_status_pending_p): Tweak comment.
6498
6499 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6500
6501 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6502 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6503 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6504 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6505 (srv_amd64_regobj): Add amd64-mpx.o.
6506 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6507 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6508 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6509 * i387-fp.c (num_pl_bnd_register) Added constant.
6510 (num_pl_bnd_cfg_registers) Added constant.
6511 (struct i387_xsave) Added reserved area and MPX fields.
6512 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6513 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6514 function.
6515 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6516 (init_registers_amd64_mpx_linux): Declare new function.
6517 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6518 (x86_64_regmap): Add MPX registers.
6519 (x86_linux_read_description): Add MPX case.
6520 (initialize_low_arch): Initialize MPX targets.
6521
6522 2013-11-18 Tom Tromey <tromey@redhat.com>
6523
6524 * configure: Rebuild.
6525 * configure.ac: Don't check for stdlib.h.
6526 * gdbreplay.c: Unconditionally include stdlib.h.
6527
6528 2013-11-18 Tom Tromey <tromey@redhat.com>
6529
6530 * config.in: Rebuild.
6531 * configure: Rebuild.
6532 * configure.ac: Don't use AC_HEADER_DIRENT.
6533
6534 2013-11-18 Tom Tromey <tromey@redhat.com>
6535
6536 * server.h: Don't check HAVE_STRING_H.
6537 * gdbreplay.c: Don't check HAVE_STRING_H.
6538 * configure: Rebuild.
6539
6540 2013-11-18 Tom Tromey <tromey@redhat.com>
6541
6542 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6543 LIBGNU.
6544
6545 2013-11-08 Tom Tromey <tromey@redhat.com>
6546
6547 * configure, config.in: Rebuild.
6548 * configure.ac: Remove unused configury.
6549
6550 2013-11-08 Tom Tromey <tromey@redhat.com>
6551
6552 * acinclude.m4: Include common.m4, codeset.m4.
6553 * configure, config.in: Rebuild.
6554 * configure.ac: Use GDB_AC_COMMON.
6555
6556 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6557
6558 * linux-s390-low.c (HWCAP_S390_TE): New define.
6559 (s390_arch_setup): Consider the TE field in the HWCAP for
6560 determining 'have_regset_tdb'.
6561
6562 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6563
6564 PR gdb/16014
6565 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6566 call to sizeof.
6567
6568 2013-10-02 Pedro Alves <palves@redhat.com>
6569
6570 * server.c (process_serial_event): Don't output "GDBserver
6571 exiting" if GDB is connected through stdio.
6572 * target.c (mywait): Likewise, be silent if GDB is connected
6573 through stdio.
6574
6575 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6576
6577 * lynx-low.c (lynx_add_threads_after_attach): New function.
6578 (lynx_attach): Remove call to add_thread. Add call to
6579 lynx_add_threads_after_attach instead.
6580
6581 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6582
6583 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6584 * config.in, configure: Regenerated.
6585
6586 2013-09-18 Yao Qi <yao@codesourcery.com>
6587
6588 PR server/15959
6589 * server.c (start_inferior): Clear 'resume_info'.
6590
6591 2013-09-16 Jiong Wang <jiwang@tilera.com>
6592
6593 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6594 for each register.
6595
6596 2013-09-16 Jiong Wang <jiwang@tilera.com>
6597
6598 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6599 linux-tile-low.o to srv_tgtobj.
6600
6601 2013-09-16 Will Newton <will.newton@linaro.org>
6602
6603 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6604 out regs.
6605
6606 2013-09-06 Pedro Alves <palves@redhat.com>
6607
6608 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6609 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6610 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6611 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6612 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6613 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6614
6615 2013-09-06 Pedro Alves <palves@redhat.com>
6616
6617 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6618 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6619
6620 2013-09-06 Pedro Alves <palves@redhat.com>
6621
6622 * linux-amd64-ipa.c: Include tracepoint.h.
6623 * linux-i386-ipa.c: Include tracepoint.h.
6624
6625 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6626
6627 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6628 (ps_get_thread_area): New function.
6629
6630 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6631
6632 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6633 (initialize_low_arch): Call init_registers_crisv32 rather than
6634 init_register_crisv32.
6635
6636 2013-09-05 Pedro Alves <palves@redhat.com>
6637
6638 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6639 to ...
6640 * hostio.h: ... this new file.
6641 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6642 win32-low.c: Include hostio.h.
6643
6644 2013-09-05 Pedro Alves <palves@redhat.com>
6645
6646 * server.h (gdb_client_data, handler_func, callback_handler_func)
6647 (delete_file_handler, add_file_handler, append_callback_event)
6648 (delete_callback_event, start_event_loop, initialize_event_loop):
6649 Move to event-loop.h and include it.
6650 * event-loop.h: New file.
6651
6652 2013-09-05 Pedro Alves <palves@redhat.com>
6653
6654 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6655 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6656 (loaded_dll, unloaded_dll): Move to ...
6657 * dll.h: ... this new file.
6658 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6659
6660 2013-09-05 Pedro Alves <palves@redhat.com>
6661
6662 * server.h (current_process, get_thread_process, all_processes)
6663 (add_inferior_to_list, for_each_inferior, current_inferior)
6664 (remove_inferior, add_process, remove_process, find_process_pid)
6665 (have_started_inferiors_p, have_attached_inferiors_p)
6666 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6667 (clear_inferiors, find_inferior, find_inferior_id)
6668 (inferior_target_data, set_inferior_target_data)
6669 (inferior_regcache_data, set_inferior_regcache_data): Move to
6670 inferiors.h, and include it.
6671 * inferiors.h: New file.
6672
6673 2013-09-05 Pedro Alves <palves@redhat.com>
6674
6675 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6676 Move ...
6677 * ax.h: ... here.
6678
6679 2013-09-05 Pedro Alves <palves@redhat.com>
6680
6681 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6682 tracepoint.h.
6683 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6684 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6685 (handle_tracepoint_general_set, handle_tracepoint_query)
6686 (tracepoint_finished_step, tracepoint_was_hit)
6687 (release_while_stepping_state_list, current_traceframe)
6688 (in_readonly_region, traceframe_read_mem)
6689 (fetch_traceframe_registers, traceframe_read_sdata)
6690 (traceframe_read_info, struct fast_tpoint_collect_status)
6691 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6692 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6693 (supply_fast_tracepoint_registers)
6694 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6695 (ipa_tdesc, claim_trampoline_space)
6696 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6697 (agent_mem_read, agent_get_trace_state_variable_value)
6698 (agent_set_trace_state_variable_value, agent_tsv_read)
6699 (agent_mem_read_string, get_raw_reg_func_addr)
6700 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6701 * tracepoint.h: ... this new file.
6702
6703 2013-09-05 Pedro Alves <palves@redhat.com>
6704
6705 * server.h (perror_with_name, error, fatal, warning, paddress)
6706 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6707 include it.
6708 * utils.h: New file.
6709
6710 2013-09-05 Pedro Alves <palves@redhat.com>
6711
6712 * server.h (remote_debug, noack_mode, transport_is_reliable)
6713 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6714 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6715 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6716 (write_enn, initialize_async_io, enable_async_io)
6717 (disable_async_io, check_remote_input_interrupt_request)
6718 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6719 (dead_thread_notify, prepare_resume_reply)
6720 (decode_address_to_semicolon, decode_address, decode_m_packet)
6721 (decode_M_packet, decode_X_packet, decode_xfer_write)
6722 (decode_search_memory_packet, unhexify, hexify)
6723 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6724 (look_up_one_symbol, relocate_instruction)
6725 (monitor_output): Move to remote-utils.h, and include it.
6726 * remote-utils.h: New file.
6727
6728 2013-09-05 Pedro Alves <palves@redhat.com>
6729
6730 * server.h (_): Delete.
6731
6732 2013-09-02 Pedro Alves <palves@redhat.com>
6733
6734 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6735 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6736 allocated.
6737 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6738
6739 2013-09-02 Pierre Muller <muller@sourceware.org>
6740
6741 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6742 or WriteProcessMemory complete successfully and handle
6743 ERROR_PARTIAL_COPY error.
6744
6745 2013-09-02 Pedro Alves <palves@redhat.com>
6746
6747 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6748 error instead of EIO.
6749
6750 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6751
6752 PR server/15604
6753 * linux-low.c: Include filestuff.h.
6754 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6755 * lynx-low.c: Include filestuff.h.
6756 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6757 * server.c: Include filestuff.h.
6758 (main): Call notice_open_fds.
6759 * spu-low.c: Include filestuff.h.
6760 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6761
6762 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6763
6764 * Makefile.in: Explain why ../target and ../nat are not
6765 listed as include file search paths.
6766 (linux-waitpid.o): New object file rule.
6767 * configure.srv (srv_native_linux_obj): New variable.
6768 Replace all occurrences of linux native object files with
6769 $srv_native_linux_obj.
6770 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6771 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6772 (linux_enable_event_reporting): Remove declaration.
6773 (my_waitpid): Moved to common/linux-waitpid.c.
6774 (linux_wait_for_event): Pass ptid when calling
6775 linux_enable_event_reporting.
6776 (linux_supports_tracefork_flag): Remove.
6777 (linux_enable_event_reporting): Likewise.
6778 (linux_tracefork_grandchild): Remove.
6779 (STACK_SIZE): Moved to common/linux-ptrace.c.
6780 (linux_tracefork_child): Remove.
6781 (linux_test_for_tracefork): Remove.
6782 (linux_look_up_symbols): Call linux_supports_traceclone.
6783 (initialize_low): Remove call to linux_test_for_tracefork.
6784 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6785 common/linux-ptrace.h.
6786 (PTRACE_TYPE_ARG4): Likewise.
6787 Include linux-ptrace.h.
6788
6789 2013-08-21 Pedro Alves <palves@redhat.com>
6790
6791 * config.in: Renegerate.
6792
6793 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6794
6795 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6796 (SFILES): Remove $(srcdir)/common/target-common.c and
6797 add $(srcdir)/target/waitstatus.c.
6798 (OBS): Remove target-common.o and add waitstatus.o.
6799 (server_h): Remove $(srcdir)/../common/target-common.h and
6800 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6801 and $(srcdir)/../target/waitstatus.h.
6802 (target-common.o): Remove.
6803 (waitstatus.o): New target object file.
6804 * target.h: Do not include target-common.h and
6805 include target/resume.h, target/wait.h and
6806 target/waitstatus.h.
6807
6808 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6809
6810 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6811 to PTRACE_TYPE_ARG3.
6812 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6813 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6814 PTRACE_TYPE_ARG4.
6815 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6816 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6817
6818 2013-07-27 Jie Zhang <jie@codesourcery.com>
6819 Daniel Jacobowitz <dan@codesourcery.com>
6820 Yao Qi <yao@codesourcery.com>
6821
6822 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6823 (mips-linux-watch.o): New rule.
6824 (mips_linux_watch_h): New variable.
6825 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6826 srv_tgtobj.
6827 * linux-mips-low.c: Include mips-linux-watch.h.
6828 (struct arch_process_info, struct arch_lwp_info): New.
6829 (update_watch_registers_callback): New function.
6830 (mips_linux_new_process, mips_linux_new_thread) New functions.
6831 (mips_linux_prepare_to_resume, mips_insert_point): New
6832 functions.
6833 (mips_remove_point, mips_stopped_by_watchpoint): New
6834 functions.
6835 (rsp_bp_type_to_target_hw_bp_type): New function.
6836 (mips_stopped_data_address): New function.
6837 (the_low_target): Add watchpoint support functions.
6838
6839 2013-07-27 Yao Qi <yao@codesourcery.com>
6840
6841 * i386-low.c: Include break-common.h.
6842 (enum target_hw_bp_type): Remove.
6843
6844 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6845
6846 * Makefile.in (SFILES): /common/target-common.c.
6847 (OBS): Add target-common.o.
6848 (server_h): Add $(srcdir)/../common/target-common.h.
6849 (target-common.o): New target.
6850 * server.c (queue_stop_reply_callback): Free
6851 status string after use.
6852 * target.c (target_waitstatus_to_string): Remove.
6853 * target.h: Include target-common.h.
6854 (resume_kind): Likewise.
6855 (target_waitkind): Likewise.
6856 (target_waitstatus): Likewise.
6857 (TARGET_WNOHANG): Likewise.
6858
6859 2013-07-04 Yao Qi <yao@codesourcery.com>
6860
6861 * Makefile.in (host_alias): Use @host_noncanonical@.
6862 (target_alias): Use @target_noncanonical@.
6863 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6864 ACX_NONCANONICAL_HOST.
6865 * configure: Regenerated.
6866
6867 Revert:
6868 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6869
6870 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6871 * configure: Rebuild.
6872 * Makefile.in (version_host, version_target): Get from configure.
6873 (version.c): Use $(version_host) and $(version_target).
6874
6875 2013-07-03 Pedro Alves <palves@redhat.com>
6876
6877 * Makefile.in (config.status): Depend on development.sh.
6878 * acinclude.m4: Include libmcheck.m4.
6879 * configure: Regenerate.
6880
6881 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6882
6883 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6884 attribute inside the parentheses.
6885 (winapi_DebugSetProcessKillOnExit): Ditto.
6886 (winapi_DebugBreakProcess): Ditto.
6887 (winapi_GenerateConsoleCtrlEvent): Ditto.
6888
6889 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6890
6891 * notif.h (notif_event): Add a dummy member to avoid compiler
6892 errors.
6893
6894 2013-07-01 Pedro Alves <palves@redhat.com>
6895
6896 * hostio.c (HOSTIO_PATH_MAX): Define.
6897 (require_filename, handle_open, handle_unlink, handle_readlink):
6898 Use it.
6899
6900 2013-07-01 Pedro Alves <palves@redhat.com>
6901
6902 * server.h: Include "pathmax.h".
6903 * linux-low.c: Don't include sys/param.h.
6904 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6905 MAXPATHLEN.
6906 * win32-low.c: Don't include sys/param.h.
6907 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6908
6909 2013-07-01 Pedro Alves <palves@redhat.com>
6910
6911 * event-loop.c: Don't check HAVE_UNISTD_H before including
6912 <unistd.h>.
6913 * gdbreplay.c: Likewise.
6914 * remote-utils.c: Likewise.
6915 * server.c: Likewise.
6916 * configure.ac: Don't check for unistd.h.
6917 * configure: Regenerate.
6918
6919 2013-06-28 Tom Tromey <tromey@redhat.com>
6920
6921 * Makefile.in (version.c): Use version.in, not
6922 common/version.in.
6923
6924 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6925
6926 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6927 * configure: Rebuild.
6928 * Makefile.in (version_host, version_target): Get from configure.
6929 (version.c): Use $(version_host) and $(version_target).
6930
6931 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6932
6933 Fix trace-status to output user name without trailing colon.
6934 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6935
6936 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6937
6938 Fix trace-status to output proper start-time and stop-time.
6939 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6940 output start time and stop time in hex as gdb expects.
6941
6942 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6943
6944 * tracepoint.c (build_traceframe_info_xml): Output trace state
6945 variables present in the trace buffer.
6946
6947 2013-06-24 Tom Tromey <tromey@redhat.com>
6948
6949 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6950 create-version.sh.
6951 (version.o): Remove.
6952 * gdbreplay.c: Include version.h.
6953 (version, host_name): Don't declare.
6954 * server.h: Include version.h.
6955 (version, host_name): Don't declare.
6956
6957 2013-06-12 Pedro Alves <palves@redhat.com>
6958
6959 * linux-x86-low.c (linux_is_elf64): Delete global.
6960 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6961 with local linux_pid_exe_is_elf_64_file use.
6962
6963 2013-06-11 Pedro Alves <palves@redhat.com>
6964
6965 * linux-low.c (regset_disabled, disable_regset): New functions.
6966 (regsets_fetch_inferior_registers)
6967 (regsets_store_inferior_registers): Use them.
6968 (initialize_regsets_info); Don't allocate the disabled_regsets
6969 array here.
6970 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6971 comment.
6972
6973 2013-06-11 Pedro Alves <palves@redhat.com>
6974
6975 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6976 xmalloc.
6977
6978 2013-06-11 Pedro Alves <palves@redhat.com>
6979
6980 * linux-x86-low.c (initialize_low_arch): Call
6981 init_registers_x32_avx_linux.
6982
6983 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6984
6985 Fix compatibility with Android Bionic.
6986 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6987 it is not empty.
6988
6989 2013-06-07 Pedro Alves <palves@redhat.com>
6990
6991 PR server/14823
6992 * Makefile.in (OBS): Add tdesc.o.
6993 (IPA_OBJS): Add tdesc-ipa.o.
6994 (tdesc-ipa.o): New rule.
6995 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6996 interface.
6997 * linux-low.c (new_inferior): Delete.
6998 (disabled_regsets, num_regsets): Delete.
6999 (linux_add_process): Adjust to set the new per-process
7000 new_inferior flag.
7001 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7002 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7003 was a stop. When calling arch_setup, switch the current inferior
7004 to the thread that got an event.
7005 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7006 (regsets_fetch_inferior_registers)
7007 (regsets_store_inferior_registers): New regsets_info parameter.
7008 Adjust to use it.
7009 (linux_register_in_regsets): New regs_info parameter. Adjust to
7010 use it.
7011 (register_addr, fetch_register, store_register): New usrregs_info
7012 parameter. Adjust to use it.
7013 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7014 parameter regs_info. Adjust to use it.
7015 (linux_fetch_registers): Get the current inferior's regs_info, and
7016 adjust to use it.
7017 (linux_store_registers): Ditto.
7018 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7019 (initialize_low): Don't initialize the target_regsets here. Call
7020 initialize_low_arch.
7021 * linux-low.h (target_regsets): Delete declaration.
7022 (struct regsets_info): New.
7023 (struct usrregs_info): New.
7024 (struct regs_info): New.
7025 (struct process_info_private) <new_inferior>: New field.
7026 (struct linux_target_ops): Delete the num_regs, regmap, and
7027 regset_bitmap fields. New field regs_info.
7028 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7029 * i387-fp.c (num_xmm_registers): Delete.
7030 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7031 calls to new interface.
7032 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7033 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7034 Infer the number of xmm registers from the regcache's target
7035 description.
7036 * i387-fp.h (num_xmm_registers): Delete.
7037 * inferiors.c (add_thread): Don't install the thread's regcache
7038 here.
7039 * proc-service.c (gregset_info): Fetch the current inferior's
7040 regs_info. Adjust to use it.
7041 * regcache.c: Include tdesc.h.
7042 (register_bytes, reg_defs, num_registers)
7043 (gdbserver_expedite_regs): Delete.
7044 (get_thread_regcache): If the thread doesn't have a regcache yet,
7045 create one, instead of aborting gdbserver.
7046 (regcache_invalidate_one): Rename to ...
7047 (regcache_invalidate_thread): ... this.
7048 (regcache_invalidate_one): New.
7049 (regcache_invalidate): Only invalidate registers of the current
7050 process.
7051 (init_register_cache): Add target_desc parameter, and use it.
7052 (new_register_cache): Ditto. Assert the target description has a
7053 non zero registers_size.
7054 (regcache_cpy): Add assertions. Adjust.
7055 (realloc_register_cache, set_register_cache): Delete.
7056 (registers_to_string, registers_from_string): Adjust.
7057 (find_register_by_name, find_regno, find_register_by_number)
7058 (register_cache_size): Add target_desc parameter, and use it.
7059 (free_register_cache_thread, free_register_cache_thread_one)
7060 (regcache_release, register_cache_size): New.
7061 (register_size): Add target_desc parameter, and use it.
7062 (register_data, supply_register, supply_register_zeroed)
7063 (supply_regblock, supply_register_by_name, collect_register)
7064 (collect_register_as_string, collect_register_by_name): Adjust.
7065 * regcache.h (struct target_desc): Forward declare.
7066 (struct regcache) <tdesc>: New field.
7067 (init_register_cache, new_register_cache): Add target_desc
7068 parameter.
7069 (regcache_invalidate_thread): Declare.
7070 (regcache_invalidate_one): Delete declaration.
7071 (regcache_release): Declare.
7072 (find_register_by_number, register_cache_size, register_size)
7073 (find_regno): Add target_desc parameter.
7074 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7075 declarations.
7076 * remote-utils.c: Include tdesc.h.
7077 (outreg, prepare_resume_reply): Adjust.
7078 * server.c: Include tdesc.h.
7079 (gdbserver_xmltarget): Delete declaration.
7080 (get_features_xml, process_serial_event): Adjust.
7081 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7082 declare.
7083 (struct process_info) <tdesc>: New field.
7084 (ipa_tdesc): Declare.
7085 * tdesc.c: New file.
7086 * tdesc.h: New file.
7087 * tracepoint.c: Include tdesc.h.
7088 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7089 (get_context_regcache): Adjust to pass ipa_tdesc down.
7090 (do_action_at_tracepoint): Adjust to get the register cache size
7091 from the context regcache's description.
7092 (traceframe_walk_blocks): Adjust to get the register cache size
7093 from the current trace frame's description.
7094 (traceframe_get_pc): Adjust to get current trace frame's
7095 description and pass it down.
7096 (gdb_collect): Adjust to get the register cache size from the
7097 IPA's description.
7098 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7099 (gdbserver_xmltarget): Delete.
7100 (initialize_low_tracepoint): Set the ipa's target description.
7101 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7102 (initialize_low_tracepoint): Set the ipa's target description.
7103 * linux-x86-low.c: Include tdesc.h.
7104 [__x86_64__] (is_64bit_tdesc): New.
7105 (ps_get_thread_area, x86_get_thread_area): Use it.
7106 (i386_cannot_store_register): Rename to ...
7107 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7108 (i386_cannot_fetch_register): Rename to ...
7109 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7110 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7111 to new interface.
7112 (target_regsets): Rename to ...
7113 (x86_regsets): ... this.
7114 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7115 interface.
7116 (x86_siginfo_fixup): Use is_64bit_tdesc.
7117 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7118 (tdesc_x32_avx_linux, tdesc_x32_linux)
7119 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7120 Declare.
7121 (x86_linux_update_xmltarget): Delete.
7122 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7123 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7124 (AMD64_LINUX_USER64_CS): New.
7125 (x86_linux_read_description): New, based on
7126 x86_linux_update_xmltarget.
7127 (same_process_callback): New.
7128 (x86_arch_setup_process_callback): New.
7129 (x86_linux_update_xmltarget): New.
7130 (x86_regsets_info): New.
7131 (amd64_linux_regs_info): New.
7132 (i386_linux_usrregs_info): New.
7133 (i386_linux_regs_info): New.
7134 (x86_linux_regs_info): New.
7135 (x86_arch_setup): Reimplement.
7136 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7137 (x86_emit_ops): Ditto.
7138 (the_low_target): Adjust. Install x86_linux_regs_info,
7139 x86_cannot_fetch_register, and x86_cannot_store_register.
7140 (initialize_low_arch): New.
7141 * linux-ia64-low.c (tdesc_ia64): Declare.
7142 (ia64_fetch_register): Adjust.
7143 (ia64_usrregs_info, regs_info): New globals.
7144 (ia64_regs_info): New function.
7145 (the_low_target): Adjust.
7146 (initialize_low_arch): New function.
7147 * linux-sparc-low.c (tdesc_sparc64): Declare.
7148 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7149 Adjust.
7150 (sparc_arch_setup): New function.
7151 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7152 (the_low_target): Adjust.
7153 (initialize_low_arch): New function.
7154 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7155 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7156 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7157 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7158 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7159 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7160 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7161 (tdesc_powerpc_isa205_vsx64l): Declare.
7162 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7163 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7164 (ppc_set_pc, ppc_get_hwcap): Adjust.
7165 (ppc_usrregs_info): Forward declare.
7166 (!__powerpc64__) ppc_regmap_adjusted: New global.
7167 (ppc_arch_setup): Adjust to the current process'es target
7168 description.
7169 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7170 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7171 (ppc_store_evrregset): Adjust.
7172 (target_regsets): Rename to ...
7173 (ppc_regsets): ... this, and make static.
7174 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7175 (ppc_regs_info): New function.
7176 (the_low_target): Adjust.
7177 (initialize_low_arch): New function.
7178 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7179 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7180 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7181 (tdesc_s390x_linux64v2): Declare.
7182 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7183 (s390_fill_gregset, s390_store_last_break): Adjust.
7184 (target_regsets): Rename to ...
7185 (s390_regsets): ... this, and make static.
7186 (s390_get_pc, s390_set_pc): Adjust.
7187 (s390_get_hwcap): New target_desc parameter, and use it.
7188 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7189 (s390_arch_setup): Adjust to set the current process'es target
7190 description. Don't adjust the regmap.
7191 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7192 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7193 (regs_info_3264): New globals.
7194 (s390_regs_info): New function.
7195 (the_low_target): Adjust.
7196 (initialize_low_arch): New function.
7197 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7198 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7199 [__mips64] (init_registers_mips_linux)
7200 (init_registers_mips_dsp_linux): Delete defines.
7201 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7202 (have_dsp): New global.
7203 (mips_read_description): New, based on mips_arch_setup.
7204 (mips_arch_setup): Reimplement.
7205 (get_usrregs_info): New function.
7206 (mips_cannot_fetch_register, mips_cannot_store_register)
7207 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7208 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7209 (target_regsets): Rename to ...
7210 (mips_regsets): ... this, and make static.
7211 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7212 (dsp_regs_info, regs_info): New globals.
7213 (mips_regs_info): New function.
7214 (the_low_target): Adjust.
7215 (initialize_low_arch): New function.
7216 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7217 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7218 Declare.
7219 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7220 (arm_read_description): New, with bits factored from
7221 arm_arch_setup.
7222 (arm_arch_setup): Reimplement.
7223 (target_regsets): Rename to ...
7224 (arm_regsets): ... this, and make static.
7225 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7226 (arm_regs_info): New function.
7227 (the_low_target): Adjust.
7228 (initialize_low_arch): New function.
7229 * linux-m68k-low.c (tdesc_m68k): Declare.
7230 (target_regsets): Rename to ...
7231 (m68k_regsets): ... this, and make static.
7232 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7233 (m68k_regs_info): New function.
7234 (m68k_arch_setup): New function.
7235 (the_low_target): Adjust.
7236 (initialize_low_arch): New function.
7237 * linux-sh-low.c (tdesc_sharch): Declare.
7238 (target_regsets): Rename to ...
7239 (sh_regsets): ... this, and make static.
7240 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7241 (sh_regs_info, sh_arch_setup): New functions.
7242 (the_low_target): Adjust.
7243 (initialize_low_arch): New function.
7244 * linux-bfin-low.c (tdesc_bfin): Declare.
7245 (bfin_arch_setup): New function.
7246 (bfin_usrregs_info, regs_info): New globals.
7247 (bfin_regs_info): New function.
7248 (the_low_target): Adjust.
7249 (initialize_low_arch): New function.
7250 * linux-cris-low.c (tdesc_cris): Declare.
7251 (cris_arch_setup): New function.
7252 (cris_usrregs_info, regs_info): New globals.
7253 (cris_regs_info): New function.
7254 (the_low_target): Adjust.
7255 (initialize_low_arch): New function.
7256 * linux-cris-low.c (tdesc_crisv32): Declare.
7257 (cris_arch_setup): New function.
7258 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7259 (cris_regs_info): New function.
7260 (the_low_target): Adjust.
7261 (initialize_low_arch): New function.
7262 * linux-m32r-low.c (tdesc_m32r): Declare.
7263 (m32r_arch_setup): New function.
7264 (m32r_usrregs_info, regs_info): New globals.
7265 (m32r_regs_info): Adjust.
7266 (initialize_low_arch): New function.
7267 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7268 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7269 (tic6x_usrregs_info): Forward declare.
7270 (tic6x_read_description): New function, based on ...
7271 (tic6x_arch_setup): ... this. Reimplement.
7272 (target_regsets): Rename to ...
7273 (tic6x_regsets): ... this, and make static.
7274 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7275 (tic6x_regs_info): New function.
7276 (the_low_target): Adjust.
7277 (initialize_low_arch): New function.
7278 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7279 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7280 (target_regsets): Rename to ...
7281 (xtensa_regsets): ... this, and make static.
7282 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7283 globals.
7284 (xtensa_arch_setup, xtensa_regs_info): New functions.
7285 (the_low_target): Adjust.
7286 (initialize_low_arch): New function.
7287 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7288 (nios2_arch_setup): Set the current process'es tdesc.
7289 (target_regsets): Rename to ...
7290 (nios2_regsets): ... this.
7291 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7292 (nios2_regs_info): New function.
7293 (the_low_target): Adjust.
7294 (initialize_low_arch): New function.
7295 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7296 (aarch64_arch_setup): Set the current process'es tdesc.
7297 (target_regsets): Rename to ...
7298 (aarch64_regsets): ... this.
7299 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7300 (aarch64_regs_info): New function.
7301 (the_low_target): Adjust.
7302 (initialize_low_arch): New function.
7303 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7304 globals.
7305 (target_regsets): Rename to ...
7306 (tile_regsets): ... this.
7307 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7308 (tile_regs_info): New function.
7309 (tile_arch_setup): Set the current process'es tdesc.
7310 (the_low_target): Adjust.
7311 (initialize_low_arch): New function.
7312 * spu-low.c (tdesc_spu): Declare.
7313 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7314 * win32-arm-low.c (tdesc_arm): Declare.
7315 (arm_arch_setup): New function.
7316 (the_low_target): Install arm_arch_setup instead of
7317 init_registers_arm.
7318 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7319 (init_windows_x86): Rename to ...
7320 (i386_arch_setup): ... this. Set `win32_tdesc'.
7321 (the_low_target): Adjust.
7322 * win32-low.c (win32_tdesc): New global.
7323 (child_add_thread): Don't create the thread cache here.
7324 (do_initial_child_stuff): Set the new process'es tdesc.
7325 * win32-low.h (struct target_desc): Forward declare.
7326 (win32_tdesc): Declare.
7327 * lynx-i386-low.c (tdesc_i386): Declare global.
7328 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7329 * lynx-low.c (lynx_tdesc): New global.
7330 (lynx_add_process): Set the new process'es tdesc.
7331 * lynx-low.h (struct target_desc): Forward declare.
7332 (lynx_tdesc): Declare global.
7333 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7334 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7335 * nto-low.c (nto_tdesc): New global.
7336 (do_attach): Set the new process'es tdesc.
7337 * nto-low.h (struct target_desc): Forward declare.
7338 (nto_tdesc): Declare.
7339 * nto-x86-low.c (tdesc_i386): Declare.
7340 (nto_x86_arch_setup): Set `nto_tdesc'.
7341
7342 2013-06-04 Gary Benson <gbenson@redhat.com>
7343
7344 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7345 to qSupported response when appropriate.
7346 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7347 with nonzero-length annex.
7348 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7349 arguments supplied in annex.
7350
7351 2013-05-31 Doug Evans <dje@google.com>
7352
7353 PR server/15594
7354 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7355 64 bits in 64-cross-32 environment.
7356
7357 2013-05-28 Pedro Alves <palves@redhat.com>
7358
7359 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7360 (aarch64-without-fpu.c): Delete rule.
7361 * configure.srv (aarch64*-*-linux*): Remove references to
7362 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7363 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7364 declaration.
7365
7366 2013-05-24 Pedro Alves <palves@redhat.com>
7367
7368 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7369 instead of strchr/decode_address. Error if the range isn't split
7370 with a ','. Don't assume there's be a ':' in the action.
7371
7372 2013-05-23 Yao Qi <yao@codesourcery.com>
7373 Pedro Alves <palves@redhat.com>
7374
7375 * linux-low.c (lwp_in_step_range): New function.
7376 (linux_wait_1): If the thread was range stepping and stopped
7377 outside the stepping range, report the stop to GDB. Otherwise,
7378 continue stepping. Add range stepping debug output.
7379 (linux_set_resume_request): Copy the step range from the resume
7380 request to the lwp.
7381 (linux_supports_range_stepping): New.
7382 (linux_target_ops) <supports_range_stepping>: Set to
7383 linux_supports_range_stepping.
7384 * linux-low.h (struct linux_target_ops)
7385 <supports_range_stepping>: New field.
7386 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7387 * linux-x86-low.c (x86_supports_range_stepping): New.
7388 (the_low_target) <supports_range_stepping>: Set to
7389 x86_supports_range_stepping.
7390 * server.c (handle_v_cont): Handle 'r' action.
7391 (handle_v_requests): Append ";r" if the target supports range
7392 stepping.
7393 * target.h (struct thread_resume) <step_range_start,
7394 step_range_end>: New fields.
7395 (struct target_ops) <supports_range_stepping>:
7396 New field.
7397 (target_supports_range_stepping): New macro.
7398
7399 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7400
7401 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7402 confusion in comment.
7403
7404 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7405
7406 * lynx-low.c (struct process_info_private): New type.
7407 (lynx_add_process): New function.
7408 (lynx_create_inferior, lynx_attach): Replace calls to
7409 add_process by calls to lynx_add_process.
7410 (lynx_resume): If PTID is null, then try using
7411 current_process()->private->last_wait_event_ptid.
7412 Add comments.
7413 (lynx_clear_inferiors): Delete. The contents of that function
7414 has been inlined in lynx_mourn;
7415 (lynx_wait_1): Save the ptid in the process's private data.
7416 (lynx_mourn): Free the process' private data. Replace call
7417 to lynx_clear_inferiors by call to clear_inferiors.
7418
7419 2013-05-17 Yao Qi <yao@codesourcery.com>
7420
7421 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7422 the right place.
7423
7424 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7425
7426 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7427 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7428 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7429 PT_TEXT_END_ADDR guards. Update comments.
7430 (linux_target_op) <read_offsets>: Conditionally define to
7431 linux_read_offsets if the target is UCLIBC and if it defines
7432 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7433
7434 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7435 Andrew Jenner <andrew@codesourcery.com>
7436
7437 * Makefile.in (SFILES): Add linux-nios2-low.c.
7438 (clean): Add action to delete nios2-linux.c.
7439 (nios2-linux.c): New rule.
7440 * configure.srv: Add nios2*-*-linux*.
7441 * linux-nios2-low.c: New.
7442
7443 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7444
7445 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7446
7447 2013-04-25 Hui Zhu <hui@codesourcery.com>
7448
7449 PR gdb/15186
7450 * ax.c (ax_printf): Add fflush.
7451
7452 2013-04-22 Tom Tromey <tromey@redhat.com>
7453
7454 * Makefile.in (SFILES): Add filestuff.c.
7455 (OBS): Add filestuff.o.
7456 (filestuff.o): New target.
7457 * config.in, configure: Rebuild.
7458 * configure.ac: Check for fdwalk, pipe2.
7459
7460 2013-04-17 Pedro Alves <palves@redhat.com>
7461
7462 * configure.ac (USE_THREAD_DB): Delete variable.
7463 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7464 Don't AC_SUBST USE_THREAD_DB.
7465 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7466 * config.in, configure: Regenerate.
7467
7468 2013-04-16 Pedro Alves <palves@redhat.com>
7469
7470 * linux-low.h (struct lwp_info) <thread_known>: Move under
7471 the USE_THREAD_DB #ifdef.
7472
7473 2013-04-16 Pedro Alves <palves@redhat.com>
7474
7475 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7476 (linux-low.o): Delete rule.
7477 * linux-low.h: Always include "gdb_thread_db.h" instead of
7478 conditionally including thread_db.h.
7479 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7480 HAVE_THREAD_DB_H.
7481
7482 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7483
7484 * Makefile.in (install-only): Fix make install regression.
7485
7486 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7487
7488 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7489 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7490 installation.
7491 * gdbserver.1: Remove.
7492
7493 2013-03-22 Pedro Alves <palves@redhat.com>
7494
7495 * linux-low.c (handle_extended_wait): Don't call
7496 linux_enable_event_reporting.
7497
7498 2013-03-15 Tony Theodore <tonyt@logyst.com>
7499
7500 PR build/9098:
7501 * Makefile.in (SHELL): Use @SHELL@.
7502
7503 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7504
7505 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7506 compiler warning.
7507
7508 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7509
7510 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7511 Remove extraneous NULL element.
7512
7513 2013-03-13 Yao Qi <yao@codesourcery.com>
7514
7515 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7516 'V' block in trace frame.
7517
7518 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7519
7520 * target.h (struct target_ops): Add btrace ops.
7521 (target_supports_btrace): New macro.
7522 (target_enable_btrace): New macro.
7523 (target_disable_btrace): New macro.
7524 (target_read_btrace): New macro.
7525 * gdbthread.h (struct thread_info): Add btrace field.
7526 * server.c: Include btrace-common.h.
7527 (handle_btrace_general_set): New function.
7528 (handle_btrace_enable): New function.
7529 (handle_btrace_disable): New function.
7530 (handle_general_set): Call handle_btrace_general_set.
7531 (handle_qxfer_btrace): New function.
7532 (struct qxfer qxfer_packets[]): Add btrace entry.
7533 * inferiors.c (remove_thread): Disable btrace.
7534 * linux-low: Include linux-btrace.h.
7535 (linux_low_enable_btrace): New function.
7536 (linux_low_read_btrace): New function.
7537 (linux_target_ops): Add btrace ops.
7538 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7539 Add srv_linux_btrace=yes.
7540 (x86_64-*-linux*): Add linux-btrace.o.
7541 Add srv_linux_btrace=yes.
7542 * configure.ac: Define HAVE_LINUX_BTRACE.
7543 * config.in: Regenerated.
7544 * configure: Regenerated.
7545
7546 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7547
7548 * server.c (handle_qxfer): Preserve error message if -3 is
7549 returned.
7550 (qxfer): Document the -3 return value.
7551
7552 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7553
7554 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7555 (linux_btrace_h): New variable.
7556 (linux-btrace.o): New rule.
7557
7558 2013-03-08 Stan Shebs <stan@codesourcery.com>
7559 Hafiz Abid Qadeer <abidh@codesourcery.com>
7560
7561 * tracepoint.c (trace_buffer_size): New global.
7562 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7563 (init_trace_buffer): Change to one-argument function. Allocate
7564 trace buffer memory.
7565 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7566 handle QTBuffer:size packet.
7567 (cmd_bigqtbuffer_size): New function.
7568 (initialize_tracepoint): Call init_trace_buffer with
7569 DEFAULT_TRACE_BUFFER_SIZE.
7570 * server.c (handle_query): Add QTBuffer:size in the
7571 supported packets.
7572
7573 2013-03-07 Yao Qi <yao@codesourcery.com>
7574
7575 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7576 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7577 of -1.
7578 (cmd_qtsp): Adjust condition. Do post increment.
7579 Set cur_action and cur_step_action back to 0.
7580
7581 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7582
7583 PR server/15236
7584 * linux-low.c (linux_write_memory): Return early success if LEN is
7585 zero.
7586
7587 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7588
7589 * configure.srv: Add x86_64-*-cygwin* as target.
7590
7591 2013-02-28 Tom Tromey <tromey@redhat.com>
7592
7593 * configure.ac: Invoke AC_SYS_LARGEFILE.
7594 * configure, config.in: Rebuild.
7595
7596 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7597
7598 * win32-low.c: Throughout, fix format strings and casts of
7599 printf-like functions to avoid type related warnings on all
7600 platforms.
7601 (get_child_debug_event): Print dwDebugEventCode as hex since
7602 that's how it's usually documented.
7603
7604 2013-02-28 Yao Qi <yao@codesourcery.com>
7605
7606 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7607 pulongest.
7608
7609 2013-02-27 Jiong Wang <jiwang@tilera.com>
7610
7611 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7612 (reg-tilegx32.c): New rule.
7613 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7614 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7615 different register info initializer according to elf class.
7616 (init_registers_tilgx32): New function. The tilegx32 register info
7617 initializer.
7618 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7619 (tile_store_gregset): Likewise.
7620
7621 2013-02-27 Yao Qi <yao@codesourcery.com>
7622
7623 * server.c (process_point_options): Print debug message when
7624 debug_threads is true.
7625
7626 2013-02-26 Yao Qi <yao@codesourcery.com>
7627
7628 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7629
7630 2013-02-19 Pedro Alves <palves@redhat.com>
7631 Kai Tietz <ktietz@redhat.com>
7632
7633 PR gdb/15161
7634
7635 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7636 instead of strtoul to extract address from packet.
7637 (process_serial_event) <'z'>: Likewise.
7638
7639 2013-02-18 Yao Qi <yao@codesourcery.com>
7640
7641 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7642
7643 2013-02-14 Pedro Alves <palves@redhat.com>
7644
7645 Plug memory leak.
7646
7647 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7648 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7649
7650 2013-02-14 Pedro Alves <palves@redhat.com>
7651
7652 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7653
7654 2013-02-14 Pedro Alves <palves@redhat.com>
7655
7656 * tracepoint.c (save_string): Delete.
7657 (add_tracepoint_action): Use savestring instead of save_string.
7658
7659 2013-02-12 Pedro Alves <palves@redhat.com>
7660
7661 * linux-xtensa-low.c: Ditto.
7662 * xtensa-xtregs.c: Ditto.
7663
7664 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7665
7666 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7667 thread_db.
7668
7669 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7670
7671 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7672 aarch64_num_wp_regs and aarch64_num_bp_regs to
7673 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7674
7675 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7676
7677 * linux-aarch64-low.c (ps_get_thread_area): Replace
7678 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7679
7680 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7681 Marcus Shawcroft <marcus.shawcroft@arm.com>
7682 Nigel Stephens <nigel.stephens@arm.com>
7683 Yufeng Zhang <yufeng.zhang@arm.com>
7684
7685 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7686 (aarch64.c, aarch64-without-fpu.c): New targets.
7687 * configure.srv (aarch64*-*-linux*): New.
7688 * linux-aarch64-low.c: New file.
7689
7690 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7691
7692 * linux-low.c (handle_extended_wait, linux_create_inferior)
7693 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7694 (dequeue_one_deferred_signal, linux_resume_one_thread)
7695 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7696 (linux_tracefork_grandchild, linux_test_for_tracefork)
7697 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7698 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7699 where the argument is 0.
7700
7701 2013-01-25 Yao Qi <yao@codesourcery.com>
7702
7703 * event-loop.c: Include "queue.h".
7704 (gdb_event_p): New typedef.
7705 (struct gdb_event) <next_event>: Remove.
7706 (event_queue): Change to QUEUE(gdb_event_p).
7707 (async_queue_event): Remove.
7708 (gdb_event_xfree): New.
7709 (initialize_event_loop): New.
7710 (process_event): Use API from QUEUE.
7711 (wait_for_event): Likewise.
7712 * server.c (main): Call initialize_event_loop.
7713 * server.h (initialize_event_loop): Declare.
7714
7715 2013-01-18 Yao Qi <yao@codesourcery.com>
7716
7717 * ax.h (struct eval_agent_expr_context): New.
7718 (gdb_eval_agent_expr): Update declaration.
7719 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7720 TFRAME. Add new argument CTX.
7721 * server.h (struct eval_agent_expr_context): Declare.
7722 (agent_mem_read, agent_tsv_read): Update declaration.
7723 (agent_mem_read_string): Likewise.
7724 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7725 (add_traceframe_block): Add new argument TPOINT.
7726 Increase TPOINT->traceframe_usage.
7727 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7728 eval_tracepoint_agent_expr.
7729 (condition_true_at_tracepoint): Likewise.
7730 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7731 (agent_mem_read_string, agent_tsv_read): Likewise.
7732
7733 2013-01-16 Yao Qi <yao@codesourcery.com>
7734
7735 * linux-low.c (linux_resume_one_lwp): Don't check
7736 'lwp->bp_reinsert != 0'.
7737
7738 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7739 Pedro Alves <palves@redhat.com>
7740
7741 * lynx-low.c (ptrace_request_to_str): Define a temporary
7742 macro and use it to simplify this function's implementation.
7743
7744 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7745
7746 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7747 sets errno.
7748
7749 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7750
7751 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7752
7753 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7754
7755 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7756
7757 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7758
7759 * lynx-low.c (lynx_resume): Use the resume_info parameter
7760 to determine the ptid for the lynx_ptrace call, unless
7761 it is equal to minus_one_ptid, in which case we use the
7762 ptid of the current_inferior.
7763 (lynx_wait_1): After having received a thread create/exit
7764 event, resume the inferior's execution using the signaling
7765 thread's ptid, rather than the old ptid.
7766
7767 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7768
7769 * lynx-low.c (lynx_resume): Delete variable ret.
7770
7771 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7772
7773 * gdbreplay.c (gdbreplay_version): Update copyright year.
7774 * server.c (gdbserver_version): Likewise.
7775
7776 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7777
7778 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7779 new thread.
7780
7781 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7782
7783 * lynx-low.c (ptrace_request_to_str): Add handling for
7784 PTRACE_GETTRACESIG.
7785
7786 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7787
7788 * lynx-low.c (lynx_attach): Delete variable new_process.
7789
7790 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7791
7792 * lynx-low.c (lynx_create_inferior): Delete variable
7793 new_process.
7794
7795 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7796
7797 * lynx-low.c (ptrace_request_to_str): Do not handle
7798 PTRACE_GETTHREADLIST if this macro does not exist.
7799
7800 2012-12-15 Yao Qi <yao@codesourcery.com>
7801
7802 * Makefile.in (OBS): Add notif.o.
7803 * notif.c, notif.h: New.
7804 * server.c: Include "notif.h".
7805 (struct vstop_notif) <next>: Remove.
7806 <base>: New field.
7807 (queue_stop_reply): Update.
7808 (push_event, send_next_stop_reply): Remove.
7809 (discard_queued_stop_replies): Update.
7810 (notif_stop): New variable.
7811 (handle_v_stopped): Remove.
7812 (handle_v_requests): Don't call handle_v_stopped. Call
7813 handle_ack_notif instead.
7814 (queue_stop_reply_callback): Call notif_event_enque instead
7815 of queue_stop_reply.
7816 (handle_status): Don't call send_next_stop_reply, call
7817 notif_write_event instead.
7818 (kill_inferior_callback): Likewise.
7819 (detach_or_kill_inferior_callback): Likewise.
7820 (main): Call initialize_notif.
7821 (process_serial_event): Call QUEUE_is_empty.
7822 (handle_target_event): Call notif_push instead of push event.
7823 * server.h (push_event): Remove declaration.
7824
7825 2012-12-10 Tom Tromey <tromey@redhat.com>
7826
7827 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7828 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7829 macros.
7830 (.c.o): Rewrite.
7831 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7832 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7833 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7834 (amd64-linux-ipa.o, ax.o): Rewrite.
7835 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7836 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7837 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7838 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7839 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7840 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7841 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7842 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7843 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7844 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7845 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7846 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7847 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7848 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7849 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7850 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7851 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7852 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7853 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7854 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7855 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7856 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7857 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7858 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7859 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7860 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7861 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7862 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7863 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7864 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7865 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7866 (reg-tilegx.o): Remove.
7867 (all_object_files): New macro.
7868 Include .deps files.
7869 * aclocal.m4, configure: Rebuild.
7870 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7871 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7872 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7873
7874 2012-12-05 Tom Tromey <tromey@redhat.com>
7875
7876 PR gdb/14917:
7877 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7878
7879 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7880
7881 * configure.ac: Check for linux/perf_event.h.
7882 * config.in: Regenerated.
7883 * configure: Regenerated.
7884
7885 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7886
7887 * hostio.c (handle_readlink): Decrease buffer size
7888 parameter passed to readlink by one byte.
7889
7890 2012-11-26 Yao Qi <yao@codesourcery.com>
7891
7892 * configure.ac (build_warnings): Append '-Wempty-body'.
7893 * configure: Regenerated.
7894 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7895 body.
7896
7897 2012-11-15 Pierre Muller <muller@sourceware.org>
7898
7899 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7900 * config.in: Regenerate.
7901 * configure: Regenerate.
7902 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7903 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7904 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7905 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7906 header.
7907 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7908 instead of <sys/wait.h> header.
7909 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7910
7911 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7912
7913 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7914 (various make rules): Remove -DGDBSERVER
7915
7916 2012-11-09 Yao Qi <yao@codesourcery.com>
7917
7918 * spu-low.c (current_ptid): Move it to ..
7919 * gdbthread.h: ... here. New.
7920 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7921 * server.c (myresume, process_serial_event): Likewise.
7922 * thread-db.c (thread_db_find_new_threads): Likewise.
7923 * tracepoint.c (run_inferior_command): Likewise.
7924
7925 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7926
7927 * server.c (handle_search_memory_1): Include access length in
7928 warning message.
7929
7930 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7931
7932 * linux-crisv32-low.c: Fix compile errors.
7933
7934 2012-09-04 Yao Qi <yao@codesourcery.com>
7935
7936 * tracepoint.c (cmd_qtsv): Adjust debug message.
7937 Don't check CUR_TPOINT.
7938
7939 2012-08-28 Yao Qi <yao@codesourcery.com>
7940
7941 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7942 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7943 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7944 Remove declarations of xmalloc, xreallloc, xstrdup and
7945 freeargv.
7946 * Makefile.in (libiberty_h): New.
7947 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7948 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7949
7950 2012-08-23 Yao Qi <yao@codesourcery.com>
7951
7952 * server.h: Remove declaration of 'xsnprintf'.
7953
7954 2012-08-22 Keith Seitz <keiths@redhat.com>
7955
7956 * server.h: Include build-gnulib-gbserver/config.h.
7957 * gdbreplay.c: Likewise.
7958
7959 2012-08-08 Doug Evans <dje@google.com>
7960
7961 * Makefile.in (SFILES): Add gdb_vecs.c.
7962 (OBS): Add gdb_vecs.o.
7963 (gdb_vecs_h, host_defs_h): New variables.
7964 (thread-db.o): Add $(gdb_vecs_h) dependency.
7965 (gdb_vecs.o): New rule.
7966 * thread-db.c: #include "gdb_vecs.h".
7967 (thread_db_load_search): Use a vector to iterate over path elements.
7968 Handle text appearing after "$pdir".
7969
7970 * configure.ac: Add check for strstr.
7971 * config.in: Regenerate.
7972 * configure: Regenerate.
7973
7974 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7975
7976 * hostio.c (handle_pread): If pread fails, fall back to attempting
7977 lseek/read.
7978 (handle_pwrite): Likewise for pwrite.
7979
7980 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7981
7982 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7983 between unsupported TYPE and unimplementable ADDR/LEN combination.
7984 (arm_insert_point): Act on new return value.
7985
7986 2012-07-31 Pedro Alves <palves@redhat.com>
7987
7988 * server.c (process_point_options): Only skip tokens if we find
7989 one that is unrecognized. Don't treat 'X' specially while
7990 skipping unrecognized tokens.
7991
7992 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7993
7994 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7995 to 4-byte-align HW breakpoint addresses for Thumb.
7996
7997 2012-07-27 Yao Qi <yao@codesourcery.com>
7998
7999 PR remote/14161.
8000
8001 * server.h: Declare gdb_agent_about_to_close.
8002 * target.c (kill_inferior): Include "agent.h".
8003 New. Send command 'kill'.
8004 * target.h (kill_inferior): Removed macro.
8005 * tracepoint.c (gdb_agent_about_to_close): New.
8006 (gdb_agent_helper_thread): Handle command 'close'.
8007 Wait endlessly until the inferior stops.
8008 Install gdb_agent_remove_socket to atexit hook.
8009 (agent_socket_name): New static variable.
8010 (gdb_agent_socket_init): Replace local variable 'name' with
8011 'agent_socket_name'.
8012 (gdb_agent_remove_socket): New.
8013
8014 2012-07-27 Yao Qi <yao@codesourcery.com>
8015
8016 * server.c (process_point_options): Stop at 'X' when parsing.
8017
8018 2012-07-19 Michael Eager <eager@eagercon.com>
8019
8020 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8021 to hw_execute.
8022 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8023 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8024 hardware breakpoint.
8025
8026 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8027
8028 * gdbserver/linux-low.c (initialize_low): Call
8029 linux_ptrace_init_warnings.
8030
8031 2012-07-02 Doug Evans <dje@google.com>
8032
8033 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8034 pointer to int.
8035
8036 2012-07-02 Stan Shebs <stan@codesourcery.com>
8037
8038 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8039 (ax.o): Add it to build rule.
8040 (ax-ipa.o): Ditto.
8041 (OBS): Add format.o.
8042 (IPA_OBS): Add format.o.
8043 * server.c (handle_query): Claim support for breakpoint commands.
8044 (process_point_options): Add command case.
8045 (process_serial_event): Leave running if there are printfs in
8046 effect.
8047 * mem-break.h (any_persistent_commands): Declare.
8048 (add_breakpoint_commands): Declare.
8049 (gdb_no_commands_at_breakpoint): Declare.
8050 (run_breakpoint_commands): Declare.
8051 * mem-break.c (struct point_command_list): New struct.
8052 (struct breakpoint): New field command_list.
8053 (any_persistent_commands): New function.
8054 (add_commands_to_breakpoint): New function.
8055 (add_breakpoint_commands): New function.
8056 (gdb_no_commands_at_breakpoint): New function.
8057 (run_breakpoint_commands): New function.
8058 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8059 locally.
8060 * ax.c: Include format.h.
8061 (ax_printf): New function.
8062 (gdb_eval_agent_expr): Add printf opcode.
8063
8064 2012-06-13 Yao Qi <yao@codesourcery.com>
8065
8066 * server.c (start_inferior): Remove duplicated writes to fields
8067 'last_resume_kind' and 'last_status' of 'current_inferior'.
8068
8069 2012-06-12 Yao Qi <yao@codesourcery.com>
8070 Pedro Alves <palves@redhat.com>
8071
8072 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8073 comment.
8074 * server.c (handle_v_cont): Extend comment.
8075
8076 2012-06-11 Yao Qi <yao@codesourcery.com>
8077
8078 * linux-low.c (linux_attach): Add 'static'.
8079
8080 2012-06-06 Yao Qi <yao@codesourcery.com>
8081
8082 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8083
8084 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8085
8086 Fix gcc -flto compilation warning.
8087 * server.c (main): Make variable multi_mode and attach volatile.
8088
8089 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8090
8091 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8092 if the platform doesn't know about it.
8093
8094 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8095
8096 * Makefile.in (SFILES): Add linux-tile-low.c.
8097 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8098 * configure.srv: Handle tilegx-*-linux*.
8099 * linux-tile-low.c: New file.
8100
8101 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8102
8103 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8104
8105 2012-05-24 Pedro Alves <palves@redhat.com>
8106
8107 PR gdb/7205
8108
8109 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8110
8111 2012-05-24 Pedro Alves <palves@redhat.com>
8112
8113 PR gdb/7205
8114
8115 Replace target_signal with gdb_signal throughout.
8116
8117 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8118
8119 * linux-low.c (linux_store_registers): Avoid the copying sequence
8120 when no data has been retrieved by ptrace.
8121
8122 2012-05-22 Will Deacon <will.deacon@arm.com>
8123
8124 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8125 Include asm/ptrace.h.
8126 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8127 already defined.
8128
8129 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8130
8131 * linux-low.c (linux_store_registers): Don't re-retrieve data
8132 with ptrace that has already been obtained from /proc. Always
8133 copy any data retrieved with ptrace to the buffer supplied.
8134
8135 2012-05-11 Yao Qi <yao@codesourcery.com>
8136 Pedro Alves <palves@redhat.com>
8137
8138 * linux-low.c (enum stopping_threads_kind): New.
8139 (stopping_threads): Change type to `enum stopping_threads_kind'.
8140 (handle_extended_wait): If stopping and suspending threads, leave
8141 the new_lwp suspended too.
8142 (linux_wait_for_event): Adjust.
8143 (stop_all_lwps): Set `stopping_threads' to
8144 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8145 whether we're suspending threads or just stopping them. Assert no
8146 recursion happens.
8147
8148 2012-04-29 Yao Qi <yao@codesourcery.com>
8149
8150 * server.h: Move some code to ...
8151 * gdbthread.h: ... here. New.
8152 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8153 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8154 (nto-low.o, win32-low.o): Likewise.
8155 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8156 * regcache.c, remote-utils.c, server.c: Likewise.
8157 * target.c, tracepoint.c, win32-low.c: Likewise.
8158
8159 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8160
8161 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8162 (PTRACE_ARG4_TYPE): Likewise.
8163 (PTRACE_XFER_TYPE): Likewise.
8164 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8165 ptrace to PTRACE_ARG3_TYPE.
8166 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8167 (PTRACE_ARG4_TYPE): Likewise.
8168 (PTRACE_XFER_TYPE): Likewise.
8169 (linux_detach_one_lwp): Cast fourth argument of
8170 ptrace to long then PTRACE_ARG4_TYPE.
8171 (regsets_fetch_inferior_registers): Cast third argument of
8172 ptrace to long then PTRACE_ARG3_TYPE.
8173 (regsets_store_inferior_registers): Likewise.
8174
8175 2012-04-20 Pedro Alves <palves@redhat.com>
8176
8177 * configure: Regenerate.
8178
8179 2012-04-19 Pedro Alves <palves@redhat.com>
8180
8181 * Makefile.in (GNULIB_BUILDDIR): New.
8182 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8183 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8184 (all, install-only, uninstall, clean-info, all-lib, clean): No
8185 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8186 (maintainer-clean realclean distclean): Use subdir_do.
8187 (subdir_do): New.
8188 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8189 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8190 * acinclude.m4: Include acx_configure_dir.m4.
8191 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8192 calls. Call AC_PROG_RANLIB. Configure gnulib using
8193 ACX_CONFIGURE_DIR.
8194 (GNULIB): New.
8195 (GNULIB_STDINT_H): Adjust.
8196 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8197 * gdbreplay.c: Include build-gnulib/config.h.
8198 * server.h: Likewise.
8199 * aclocal.m4: Regenerate.
8200 * config.in: Regenerate.
8201 * configure: Regenerate.
8202
8203 2012-04-19 Pedro Alves <palves@redhat.com>
8204
8205 * Makefile.in (LIBGNU, INCGNU): Adjust.
8206 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8207 (all, install-only, uninstall, clean-info, all-lib, clean)
8208 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8209 * configure.ac: Adjust AC_OUTPUT output.
8210 * aclocal.m4: Regenerate.
8211 * configure: Regenerate.
8212
8213 2012-04-19 Pedro Alves <palves@redhat.com>
8214
8215 * Makefile.in (generated_files): New.
8216 (server_h): Remove the explicit dependency on config.h, and depend
8217 on $generated_files.
8218
8219 2012-04-19 Pedro Alves <palves@redhat.com>
8220
8221 * Makefile.in (INCGNU): Add -Ignulib.
8222
8223 2012-04-19 Pedro Alves <palves@redhat.com>
8224
8225 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8226 (INCGNU): ... this, and spell out -I here.
8227 (GNULIB_LIB): Rename to ...
8228 (LIBGNU): ... this.
8229 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8230
8231 2012-04-19 Pedro Alves <palves@redhat.com>
8232
8233 * config.in: Regenerate.
8234
8235 2012-04-19 Pedro Alves <palves@redhat.com>
8236
8237 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8238 * server.h (memmem): Remove declaration.
8239 * config.in: Regenerate.
8240 * configure: Regenerate.
8241
8242 2012-04-19 Yao Qi <yao@codesourcery.com>
8243
8244 * Makefile.in (SFILES): Add common/vec.c.
8245 (OBS): Add vec.o.
8246 (vec.o): New rule.
8247
8248 2012-04-19 Yao Qi <yao@codesourcery.com>
8249
8250 * remote-utils.c (prepare_resume_reply): Replace with macro
8251 target_core_of_thread.
8252 * server.c (handle_qxfer_threads_proper): Likewise.
8253 * target.h (traget_core_of_thread): New macro.
8254
8255 2012-04-18 Pedro Alves <palves@redhat.com>
8256
8257 * aclocal.m4: Regenerate.
8258 * configure: Regenerate.
8259
8260 2012-04-16 Yao Qi <yao@codesourcery.com>
8261
8262 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8263 duplicated on address.
8264
8265 2012-04-16 Yao Qi <yao@codesourcery.com>
8266
8267 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8268 (struct tracepoint_action_ops) <send>: New field.
8269 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8270 (agent_expr_send, x_tracepoint_action_send): New.
8271 (l_tracepoint_action_send): New.
8272 (cmd_qtdp): Download and install tracepoint
8273 according to `use_agent'.
8274 (run_inferior_command): Add one more parameter `len'.
8275 Update callers.
8276 (tracepoint_send_agent): New.
8277 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8278
8279 2012-04-16 Yao Qi <yao@codesourcery.com>
8280
8281 * tracepoint.c (download_tracepoints): Moved to ...
8282 (cmd_qtstart): ... here.
8283
8284 2012-04-14 Yao Qi <yao@codesourcery.com>
8285
8286 * tracepoint.c: Include inttypes.h.
8287 (struct collect_memory_action): Use sized types.
8288 (struct tracepoint): Likewise.
8289 (cmd_qtdp, stop_tracing): Update print specifiers.
8290 (cmd_qtp, response_tracepoint): Likewise.
8291 (collect_data_at_tracepoint): Likewise.
8292 (collect_data_at_step): Likewise.
8293
8294 2012-04-14 Yao Qi <yao@codesourcery.com>
8295
8296 Import gnulib module inttypes.
8297 * aclocal.m4, config.in, configure: Regenerated.
8298
8299 2012-04-14 Yao Qi <yao@codesourcery.com>
8300
8301 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8302 Makefile and config.status at last.
8303
8304 2012-04-13 Yao Qi <yao@codesourcery.com>
8305
8306 * tracepoint.c: Include stdint.h unconditionally.
8307
8308 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8309
8310 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8311 on BFD_HAVE_SYS_PROCFS_TYPE.
8312 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8313 * configure: Regenerate.
8314 * config.in: Likewise.
8315
8316 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8317
8318 * Makefile.in (clean): Also remove x32.c x32-linux.c
8319 x32-avx.c x32-avx-linux.c.
8320 (x32.o): New target.
8321 (x32.c): Likewise.
8322 (x32-linux.o): Likewise.
8323 (x32-linux.c): Likewise.
8324 (x32-avx.o): Likewise.
8325 (x32-avx.c): Likewise.
8326 (x32-avx-linux.o): Likewise.
8327 (x32-avx-linux.c): Likewise.
8328
8329 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8330 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8331 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8332 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8333 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8334 i386/x32-avx-linux.xml.
8335
8336 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8337 (init_registers_x32_avx_linux): Likwise.
8338 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8339 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8340
8341 2012-04-13 Pedro Alves <palves@redhat.com>
8342
8343 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8344 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8345 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8346 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8347 the sub-make.
8348
8349 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8350
8351 * linux-x86-low.c (compat_x32_clock_t): New.
8352 (compat_x32_siginfo_t): Likewise.
8353 (compat_x32_siginfo_from_siginfo): Likewise.
8354 (siginfo_from_compat_x32_siginfo): Likewise.
8355 (linux_is_elf64): Likewise.
8356 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8357 and siginfo_from_compat_x32_siginfo for x32.
8358 (x86_arch_setup): Set linux_is_elf64.
8359
8360 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8361
8362 PR gdb/13969
8363 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8364 e_machine field.
8365 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8366 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8367 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8368 compatible with process.
8369
8370 2012-04-12 Yao Qi <yao@codesourcery.com>
8371
8372 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8373 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8374 (install-only, install-info, clean): Handle sub dir gnulib.
8375 (all-lib, am--refresh): New targets.
8376 (memmem.o): Remove target.
8377 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8378 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8379 (AC_REPLACE_FUNCS): Remove memmem.
8380 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8381 (AC_OUTPUT): Generate Makefile in gnulib/.
8382 * aclocal.m4, config.in, configure: Regenerated.
8383
8384 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8385
8386 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8387
8388 2012-04-05 Pedro Alves <palves@redhat.com>
8389
8390 -Werror=strict-aliasing
8391
8392 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8393 pointer.
8394
8395 2012-04-04 Pedro Alves <palves@redhat.com>
8396
8397 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8398 (sparc_store_gregset_from_stack, sparc_store_gregset)
8399 (sparc_breakpoint_at): Fix formatting.
8400
8401 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8402
8403 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8404 are available.
8405 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8406 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8407 * config.in: Regenerate.
8408 * configure: Likewise.
8409
8410 2012-03-29 Pedro Alves <palves@redhat.com>
8411
8412 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8413 Correct ptrace arguments.
8414
8415 2012-03-28 Pedro Alves <palves@redhat.com>
8416
8417 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8418 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8419 (IA64_FR1_REGNUM): New defines.
8420 (ia64_fetch_register): New.
8421 (the_low_target): Install it.
8422 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8423 field.
8424 * linux-low.c (linux_fetch_registers): Try the
8425 the_low_target.fetch_register hook first.
8426
8427 * linux-arm-low.c (the_low_target): Adjust.
8428 * linux-bfin-low.c (the_low_target): Adjust.
8429 * linux-cris-low.c (the_low_target): Adjust.
8430 * linux-crisv32-low.c (the_low_target): Adjust.
8431 * linux-m32r-low.c (the_low_target): Adjust.
8432 * linux-m68k-low.c (the_low_target): Adjust.
8433 * linux-mips-low.c (the_low_target): Adjust.
8434 * linux-ppc-low.c (the_low_target): Adjust.
8435 * linux-s390-low.c (the_low_target): Adjust.
8436 * linux-sh-low.c (the_low_target): Adjust.
8437 * linux-sparc-low.c (the_low_target): Adjust.
8438 * linux-tic6x-low.c (the_low_target): Adjust.
8439 * linux-x86-low.c (the_low_target): Adjust.
8440 * linux-xtensa-low.c (the_low_target): Adjust.
8441
8442 2012-03-26 Pedro Alves <palves@redhat.com>
8443
8444 * server.c (handle_qxfer_libraries): Don't bail early if
8445 the_target->qxfer_libraries_svr4 is not NULL.
8446
8447 2012-03-26 Pedro Alves <palves@redhat.com>
8448
8449 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8450
8451 2012-03-23 Pedro Alves <palves@redhat.com>
8452
8453 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8454 "library-list-svr4" element's start tag when the the DSO list is
8455 empty.
8456
8457 2012-03-23 Pedro Alves <palves@redhat.com>
8458
8459 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8460 a variable whose type size is the same as the inferior's pointer
8461 size.
8462
8463 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8464
8465 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8466 struct siginfo.
8467 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8468 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8469 * linux-low.h: Include <signal.h>.
8470 (struct siginfo): Remove forward declaration.
8471 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8472 struct siginfo.
8473
8474 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8475
8476 * .gitignore: Ignore more files.
8477
8478 2012-03-19 Pedro Alves <palves@redhat.com>
8479 Jan Kratochvil <jan.kratochvil@redhat.com>
8480
8481 * server.c (cont_thread, general_thread): Add describing comments.
8482 (start_inferior): Clear `cont_thread'.
8483 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8484 of a process.
8485
8486 2012-03-15 Yao Qi <yao@codesourcery.com>
8487
8488 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8489 handling to ...
8490 (cmd_qtdp): ... here.
8491
8492 2012-03-15 Yao Qi <yao@codesourcery.com>
8493
8494 * tracepoint.c (struct tracepoint_action_ops): New.
8495 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8496 (m_tracepoint_action_download): New.
8497 (r_tracepoint_action_download): New.
8498 (x_tracepoint_action_download): New.
8499 (l_tracepoint_action_download): New.
8500 (add_tracepoint_action): Install `action->ops' according type.
8501 (download_tracepoint_1): Move code `download' function pointer
8502 of various tracepoint_action_ops.
8503
8504 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8505
8506 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8507 linux_ptrace_attach_warnings.
8508
8509 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8510
8511 * Makefile.in (linux-ptrace.o): New.
8512 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8513 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8514 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8515 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8516 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8517 of these targets.
8518 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8519
8520 2012-03-08 Yao Qi <yao@codesourcery.com>
8521 Pedro Alves <palves@redhat.com>
8522
8523 Fix PR server/13392.
8524 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8525 offset of JMP insn.
8526 * tracepoint.c (remove_tracepoint): New.
8527 (cmd_qtdp): Call remove_tracepoint when failed to install.
8528
8529 2012-03-07 Pedro Alves <palves@redhat.com>
8530
8531 * linux-low.c (get_detach_signal): New.
8532 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8533 Pass on pending signals to PTRACE_DETACH. Check the result of the
8534 ptrace call.
8535 * server.c (program_signals, program_signals_p): New.
8536 (handle_general_set): Handle QProgramSignals.
8537 * server.h (program_signals, program_signals_p): Declare.
8538
8539 2012-03-05 Pedro Alves <palves@redhat.com>
8540 Jan Kratochvil <jan.kratochvil@redhat.com>
8541
8542 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8543 New comment why.
8544
8545 2012-03-03 Yao Qi <yao@codesourcery.com>
8546
8547 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8548 agent_look_up_symbols.
8549
8550 2012-03-03 Yao Qi <yao@codesourcery.com>
8551
8552 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8553 (linux-x86-low.o): Likewise.
8554 * server.h: Remove in_process_agent_loaded.
8555 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8556 common/agent.c.
8557 Update callers.
8558
8559 2012-03-03 Yao Qi <yao@codesourcery.com>
8560
8561 * tracepoint.c (gdb_agent_capability): New global.
8562 (in_process_agent_loaded_ust): Renamed to
8563 `in_process_agent_supports_ust'.
8564 Update callers.
8565 (in_process_agent_supports_ust): Call agent_capability_check.
8566 (clear_installed_tracepoints): Assert that agent supports
8567 agent.
8568
8569 2012-03-03 Yao Qi <yao@codesourcery.com>
8570
8571 * linux-low.c (linux_supports_agent): New.
8572 (linux_target_ops): Initialize field `supports_agent' with
8573 linux_supports_agent.
8574 * target.h (struct target_ops) <supports_agent>: New.
8575 (target_supports_agent): New macro.
8576 * server.c (handle_general_set): Handle packet 'QAgent'.
8577 (handle_query): Send `QAgent+'.
8578 * Makefile.in (server.o): Depends on agent.h.
8579
8580 2012-03-03 Yao Qi <yao@codesourcery.com>
8581
8582 * Makefile.in (OBS): Add agent.o.
8583 Add new rule for agent.o.
8584 Track dependence of tracepoint.c on agent.h.
8585 * tracepoint.c (run_inferior_command_1):
8586 (run_inferior_command): Call agent_run_command.
8587 (gdb_ust_connect_sync_socket): Deleted. Move it to
8588 common/agent.c.
8589 (resume_thread, stop_thread): Likewise.
8590 (gdb_ust_socket_init): Renamed to ...
8591 (gdb_agent_socket_init): ... New.
8592 (gdb_ust_thread): Renamed to ...
8593 (gdb_agent_helper_thread): ... New.
8594 (gdb_ust_init): Move some code to ...
8595 (gdb_agent_init): ... here. New.
8596 [HAVE_UST]: Call gdb_ust_init.
8597 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8598 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8599 * config.in, configure: Regenerated.
8600
8601 2012-03-02 Pedro Alves <palves@redhat.com>
8602
8603 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8604 * linux-low.c (struct simple_pid_list): New.
8605 (stopped_pids): New a struct simple_pid_list pointer.
8606 (add_to_pid_list, pull_pid_from_list): New.
8607 (handle_extended_wait): Don't assume the first signal new children
8608 report is SIGSTOP. Adjust call to pull_pid_from_list.
8609 (linux_wait_for_lwp): Adjust.
8610
8611 2012-03-02 Yao Qi <yao@codesourcery.com>
8612
8613 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8614 debug log.
8615
8616 2012-03-02 Yao Qi <yao@codesourcery.com>
8617
8618 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8619 `stop_pc' and `tpoint'. Update caller.
8620
8621 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8622
8623 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8624 * linux-low.c (use_linux_regsets): New macro.
8625 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8626 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8627 (linux_register_in_regsets): New function.
8628 (usr_fetch_inferior_registers): Skip registers covered by
8629 regsets.
8630 (usr_store_inferior_registers): Likewise.
8631 (usr_fetch_inferior_registers): New macro.
8632 (usr_store_inferior_registers): Likewise.
8633 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8634 (linux_store_registers): Likewise.
8635 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8636 prototype.
8637 (init_registers_mips64_dsp_linux): Likewise.
8638 (init_registers_mips_linux): New macro.
8639 (init_registers_mips_dsp_linux): Likewise.
8640 (mips_dsp_num_regs): Likewise.
8641 (DSP_BASE, DSP_CONTROL): New fallback macros.
8642 (mips_base_regs): New macro.
8643 (mips_regmap): Use it. Fix the size.
8644 (mips_dsp_regmap): New variable.
8645 (mips_dsp_regset_bitmap): Likewise.
8646 (mips_arch_setup): New function.
8647 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8648 than mips_regmap.
8649 (mips_cannot_store_register): Likewise.
8650 (the_low_target): Update .arch_setup, .num_regs and .regmap
8651 initializers. Add .regset_bitmap initializer.
8652 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8653 initializer.
8654 * linux-bfin-low.c (the_low_target): Likewise.
8655 * linux-cris-low.c (the_low_target): Likewise.
8656 * linux-crisv32-low.c (the_low_target): Likewise.
8657 * linux-ia64-low.c (the_low_target): Likewise.
8658 * linux-m32r-low.c (the_low_target): Likewise.
8659 * linux-m68k-low.c (the_low_target): Likewise.
8660 * linux-ppc-low.c (the_low_target): Likewise.
8661 * linux-s390-low.c (the_low_target): Likewise.
8662 * linux-sh-low.c (the_low_target): Likewise.
8663 * linux-sparc-low.c (the_low_target): Likewise.
8664 * linux-tic6x-low.c (the_low_target): Likewise.
8665 * linux-x86-low.c (the_low_target): Likewise.
8666 * linux-xtensa-low.c (the_low_target): Likewise.
8667 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8668 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8669 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8670 srv_xmlfiles.
8671 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8672 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8673
8674 2012-02-29 Yao Qi <yao@codesourcery.com>
8675 Pedro Alves <palves@redhat.com>
8676
8677 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8678 `step_over_finished' is true.
8679
8680 2012-02-27 Pedro Alves <palves@redhat.com>
8681
8682 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8683 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8684
8685 2012-02-27 Pedro Alves <palves@redhat.com>
8686
8687 PR server/9684
8688 * linux-low.c (pid_is_stopped): New.
8689 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8690
8691 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8692
8693 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8694 of conditions.
8695
8696 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8697
8698 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8699
8700 2012-02-24 Luis Machado <lgustavo@codesourcery>
8701
8702 * server.c (handle_query): Advertise support for target-side
8703 breakpoint condition evaluation.
8704 (process_point_options): New function.
8705 (process_serial_event): When inserting a breakpoint, check for
8706 a target-side condition that should be evaluated.
8707
8708 * mem-break.c: Include regcache.h and ax.h.
8709 (point_cond_list_t): New data structure.
8710 (breakpoint) <cond_list>: New field.
8711 (find_gdb_breakpoint_at): Make non-static.
8712 (delete_gdb_breakpoint_at): Clear any target-side
8713 conditions.
8714 (clear_gdb_breakpoint_conditions): New function.
8715 (add_condition_to_breakpoint): Likewise.
8716 (add_breakpoint_condition): Likewise.
8717 (gdb_condition_true_at_breakpoint): Likewise.
8718 (gdb_breakpoint_here): Return result directly instead
8719 of going through a local variable.
8720
8721 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8722 (clear_gdb_breakpoint_conditions): Likewise.
8723 (add_breakpoint_condition): Likewise.
8724 (gdb_condition_true_at_breakpoint): Likewise.
8725
8726 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8727 (need_step_over_p): Take target-side breakpoint condition into
8728 consideration.
8729
8730 2012-02-24 Luis Machado <lgustavo@codesourcery>
8731
8732 * server.h: Include tracepoint.h.
8733 (agent_mem_read, agent_get_trace_state_variable_value,
8734 agent_set_trace_state_variable_value,
8735 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8736 get_set_tsv_func_addr): New prototypes.
8737
8738 * ax.h: New include file.
8739 * ax.c: New source file.
8740
8741 * tracepoint.c: Include ax.h.
8742 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8743 agent_expr, eval_result_type): Move to ax.h.
8744 (parse_agent_expr): Rename to ...
8745 (gdb_parse_agent_expr): ... this, make it non-static and move
8746 to ax.h.
8747 (unparse_agent_expr) Rename to ...
8748 (gdb_unparse_agent_expr): ... this, make it non-static and move
8749 to ax.h.
8750 (eval_agent_expr): Rename to ...
8751 (eval_tracepoint_agent_expr): ... this.
8752 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8753 forward declarations.
8754 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8755 (agent_get_trace_state_variable_value): New function.
8756 (agent_set_trace_state_variable_value): New function.
8757 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8758 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8759 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8760 (condition_true_at_tracepoint): Likewise.
8761 (parse_agent_expr): Rename to ...
8762 (gdb_parse_agent_expr): ... this and move to ax.c.
8763 (unparse_agent_expr): Rename to ...
8764 (gdb_unparse_agent_expr): ... this and move to ax.c.
8765 (gdb_agent_op_name): Move to ax.c.
8766 (eval_agent_expr): Rename to ...
8767 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8768 and move to ax.c.
8769 (eval_tracepoint_agent_expr): New function.
8770 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8771 non-static.
8772 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8773 ax.c.
8774 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8775 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8776 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8777 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8778 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8779 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8780 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8781 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8782 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8783 (compile_bytecodes): Remove forward declaration.
8784 (is_goto_target): Move to ax.c.
8785 (compile_bytecodes): Move to ax.c and call
8786 agent_get_trace_state_variable_value (...) and
8787 agent_set_trace_state_variable_value (...).
8788
8789 * Makefile.in: Update ax.c and IPA dependencies.
8790
8791 2012-02-24 Pedro Alves <palves@redhat.com>
8792
8793 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8794 (cmd_bigqtbuffer_circular): ... this. Only handle
8795 'QTBuffer:circular:'.
8796 (handle_tracepoint_general_set): Adjust.
8797
8798 2012-02-16 Yao Qi <yao@codesourcery.com>
8799
8800 * inferiors.c: Move code to ...
8801 * dll.c: .... here. New.
8802 * server.h: Declare clear_dlls.
8803 * Makefile.in (SFILES): Add dll.c.
8804 (OBS): Add dll.o
8805 (dll.o): New rule.
8806
8807 2012-02-11 Yao Qi <yao@codesourcery.com>
8808
8809 * server.c: (handle_monitor_command): Add a new parameter
8810 `own_buf'.
8811 (handle_query): Update caller.
8812
8813 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8814
8815 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8816 * configure, config.in: Regenerate.
8817 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8818 is not defined.
8819
8820 2012-02-02 Pedro Alves <palves@redhat.com>
8821
8822 Try SIGKILL first, then PTRACE_KILL.
8823 * linux-low.c (linux_kill_one_lwp): New.
8824 (linux_kill_one_lwp): Rename to ...
8825 (kill_one_lwp_callback): ... this. Use the new
8826 linux_kill_one_lwp.
8827
8828 2012-02-02 Pedro Alves <palves@redhat.com>
8829
8830 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8831 inferior.
8832
8833 2012-01-27 Pedro Alves <palves@redhat.com>
8834
8835 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8836 (elf_64_file_p): Make static.
8837 (linux_pid_exe_is_elf_64_file): New.
8838 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8839 Delete declarations.
8840 (linux_pid_exe_is_elf_64_file): Declare.
8841 * linux-x86-low.c (x86_arch_setup): Use
8842 linux_pid_exe_is_elf_64_file.
8843
8844 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8845
8846 * linux-low.c (linux_wait_for_event_1): Rename to ...
8847 (linux_wait_for_event): ... here and merge it with former
8848 linux_wait_for_event - new variable wait_ptid, use it.
8849 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8850
8851 2012-01-23 Pedro Alves <palves@redhat.com>
8852
8853 * server.c (main): Avoid yet another case of infinite loop while
8854 detaching/killing after a longjmp.
8855
8856 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8857
8858 Code cleanup.
8859 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8860
8861 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8862
8863 * hostio.c (handle_readlink): New function.
8864 (handle_vFile): Call it to handle "vFile:readlink" packets.
8865
8866 2012-01-20 Pedro Alves <palves@redhat.com>
8867 Ulrich Weigand <ulrich.weigand@linaro.org>
8868
8869 * server.c (handle_v_requests): Only support vAttach and vRun to
8870 start multiple processes when in extended protocol mode.
8871
8872 2012-01-17 Pedro Alves <palves@redhat.com>
8873
8874 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8875 memalign plus mprotect to allocate the scratch buffer.
8876
8877 2012-01-13 Pedro Alves <palves@redhat.com>
8878
8879 * server.c (attach_inferior): Clear `cont_thread'.
8880
8881 2012-01-13 Pedro Alves <palves@redhat.com>
8882
8883 * server.c (main): Avoid infinite loop while detaching/killing
8884 after a longjmp.
8885
8886 2012-01-09 Doug Evans <dje@google.com>
8887
8888 * server.c (start_inferior): Set last_ptid in --wrapper case.
8889
8890 2012-01-06 Yao Qi <yao@codesourcery.com>
8891
8892 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8893 defined.
8894 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8895
8896 2012-01-04 Yao Qi <yao@codesourcery.com>
8897
8898 * tracepoint.c (cmd_qtdp): Print debug message
8899 for static tracepoint.
8900
8901 2012-01-04 Yao Qi <yao@codesourcery.com>
8902
8903 * tracepoint.c (trace_vdebug): Differentiate debug message
8904 between gdbserver and IPA.
8905
8906 2012-01-03 Yao Qi <yao@codesourcery.com>
8907
8908 * tracepoint.c (tracepoint_was_hit): Don't collect for
8909 static tracepoint.
8910
8911 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8912
8913 * terminal.h: Reformat copyright header.
8914
8915 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8916
8917 * server.c (gdbserver_version): Update copyright year.
8918 * gdbreplay.c (gdbreplay_version): Likewise.
8919
8920 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8921
8922 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8923
8924 Revert:
8925 2011-12-18 Hui Zhu <teawater@gmail.com>
8926 * linux-low.c (linux_create_inferior): Save return value to ret.
8927
8928 2011-12-18 Hui Zhu <teawater@gmail.com>
8929
8930 * linux-low.c (linux_create_inferior): Save return value to ret.
8931
8932 2011-12-16 Doug Evans <dje@google.com>
8933
8934 * linux-low.c (linux_create_inferior): If stdio connection,
8935 redirect stdin from /dev/null, stdout to stderr.
8936 * remote-utils.c (remote_is_stdio): New static global.
8937 (remote_connection_is_stdio): New function.
8938 (remote_prepare): Handle stdio connection.
8939 (remote_open): Ditto.
8940 (remote_close): Don't close stdin for stdio connections.
8941 (read_prim,write_prim): New functions. Replace all calls to
8942 read/write to these.
8943 * server.c (main): Watch for "-" argument. Move call to
8944 remote_prepare before start_inferior.
8945 * server.h (STDIO_CONNECTION_NAME): New macro.
8946 (remote_connection_is_stdio): Declare.
8947
8948 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8949 in debugging output.
8950
8951 2011-12-15 Yao Qi <yao@codesourcery.com>
8952
8953 * tracepoint.c: Include sys/syscall.h.
8954 (gdb_ust_thread): Remove preprocessor conditional.
8955
8956 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8957
8958 * linux-low.c (linux_detach_one_lwp): Call
8959 the_low_target.prepare_to_resume before detaching.
8960
8961 2011-12-14 Yao Qi <yao@codesourcery.com>
8962
8963 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8964 of write.
8965
8966 2011-12-14 Yao Qi <yao@codesourcery.com>
8967
8968 * i386-low.c (i386_low_stopped_data_address): Initialize local
8969 variable `control'.
8970
8971 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8972
8973 PR remote/13492
8974
8975 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8976 DR_CONTROL unless necessary. Extend comments.
8977 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8978 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8979
8980 2011-12-13 Yao Qi <yao@codesourcery.com>
8981
8982 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8983 macros.
8984 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8985
8986 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8987
8988 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8989 Print new debug message for such case.
8990
8991 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8992
8993 Fix overlapping memcpy.
8994 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8995 the read_inferior_memory transfer.
8996 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8997 write_inferior_memory transfer.
8998 (set_fast_tracepoint_jump): New variable buf. Use it for the
8999 read_inferior_memory and write_inferior_memory transfers.
9000 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9001 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9002 Use it for the write_inferior_memory transfer.
9003 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9004 buffers.
9005
9006 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9007
9008 * linux-low.c (fetch_register, store_register): Make code
9009 consistent, fix formatting.
9010
9011 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9012
9013 * linux-low.c (usr_store_inferior_registers): Factor out code
9014 to handle individual registers into...
9015 (store_register): ... this new function.
9016
9017 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9018
9019 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9020 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9021 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9022 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9023 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9024 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9025 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9026 (srv_xmlfiles): Add new XML files.
9027
9028 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9029 and <sys/uio.h>.
9030 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9031 (init_registers_s390_linux32v1): Add prototype.
9032 (init_registers_s390_linux32v2): Likewise.
9033 (init_registers_s390_linux64v1): Likewise.
9034 (init_registers_s390_linux64v2): Likewise.
9035 (init_registers_s390x_linux64v1): Likewise.
9036 (init_registers_s390x_linux64v2): Likewise.
9037 (s390_num_regs): Increment to 52.
9038 (s390_regmap): Add orig_r2 register.
9039 (s390_num_regs_3264): Increment to 68.
9040 (s390_regmap_3264): Add orig_r2 register.
9041 (s390_collect_ptrace_register): Handle orig_r2 register.
9042 (s390_supply_ptrace_register): Likewise.
9043 (s390_fill_last_break): New function.
9044 (s390_store_last_break): Likewise.
9045 (s390_fill_system_call): New function.
9046 (s390_store_system_call): Likewise.
9047 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9048 register sets.
9049 (s390_check_regset): New function.
9050 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9051 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9052 Update target_regsets for available register sets.
9053
9054 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9055 Jan Kratochvil <jan.kratochvil@redhat.com>
9056
9057 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9058 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9059 New.
9060 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9061 * linux-low.h (struct process_info_private): New member r_debug.
9062 * server.c (handle_qxfer_libraries): Call
9063 the_target->qxfer_libraries_svr4.
9064 (handle_qxfer_libraries_svr4): New function.
9065 (qxfer_packets): New entry "libraries-svr4".
9066 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9067 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9068 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9069 PACKET_qXfer_libraries_svr4.
9070
9071 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9072
9073 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9074 PSW address/mask between 8-byte and 16-byte formats.
9075 (s390_supply_ptrace_register): Likewise.
9076 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9077 basic addressing mode bit.
9078
9079 2011-11-24 Stan Shebs <stan@codesourcery.com>
9080
9081 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9082
9083 2011-11-17 Stan Shebs <stan@codesourcery.com>
9084
9085 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9086 (tracing_start_time): New global.
9087 (tracing_stop_time): New global.
9088 (tracing_user_name): New global.
9089 (tracing_notes): New global.
9090 (tracing_stop_note): New global.
9091 (cmd_qtstart): Set traceframe_usage, start_time.
9092 (stop_tracing): Set stop_time.
9093 (cmd_qtstatus): Report additional status.
9094 (cmd_qtp): New function.
9095 (handle_tracepoint_query): Call it.
9096 (cmd_qtnotes): New function.
9097 (handle_tracepoint_general_set): Call it.
9098 (get_timestamp): Rename from tsv_get_timestamp.
9099
9100 2011-11-14 Stan Shebs <stan@codesourcery.com>
9101 Kwok Cheung Yeung <kcy@codesourcery.com>
9102
9103 * linux-x86-low.c (small_jump_insn): New.
9104 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9105 trampoline and error message, build a trampoline and issue a small
9106 jump instruction to it.
9107 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9108 trampoline and error message.
9109 (x86_get_min_fast_tracepoint_insn_len): New.
9110 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9111 * linux-low.h (struct linux_target_ops): Add arguments to
9112 install_fast_tracepoint_jump_pad operation, add new operation.
9113 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9114 arguments.
9115 (linux_get_min_fast_tracepoint_insn_len): New function.
9116 (linux_target_op): Add new operation.
9117 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9118 (gdb_trampoline_buffer_end): Ditto.
9119 (gdb_trampoline_buffer_error): Ditto.
9120 (struct ipa_sym_addresses): Add fields for new IPA variables.
9121 (symbol_list): Add entries for new IPA variables.
9122 (struct tracepoint): Add fields to hold the address range of the
9123 trampoline used by the tracepoint.
9124 (trampoline_buffer_head): New static variable.
9125 (trampoline_buffer_tail): Ditto.
9126 (claim_trampoline_space): New function.
9127 (have_fast_tracepoint_trampoline_buffer): New function.
9128 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9129 structure.
9130 (install_fast_tracepoint): Ditto, also add error buffer argument.
9131 (cmd_qtminftpilen): New function.
9132 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9133 (fast_tracepoint_from_trampoline_address): New function.
9134 (fast_tracepoint_collecting): Handle trampoline as part of jump
9135 pad space.
9136 (set_trampoline_buffer_space): New function.
9137 (initialize_tracepoint): Initialize new IPA variables.
9138 * target.h (struct target_ops): Add arguments to
9139 install_fast_tracepoint_jump_pad operation, add new
9140 get_min_fast_tracepoint_insn_len operation.
9141 (target_get_min_fast_tracepoint_insn_len): New.
9142 (install_fast_tracepoint_jump_pad): Add arguments.
9143 * server.h (IPA_BUFSIZ): Define.
9144 * linux-i386-ipa.c: Include extra header files.
9145 (initialize_fast_tracepoint_trampoline_buffer): New function.
9146 (initialize_low_tracepoint): Call it.
9147 * server.h (set_trampoline_buffer_space): Declare.
9148 (claim_trampoline_space): Ditto.
9149 (have_fast_tracepoint_trampoline_buffer): Ditto.
9150
9151 2011-11-14 Yao Qi <yao@codesourcery.com>
9152
9153 * server.c (handle_query): Handle InstallInTrace for qSupported.
9154 * tracepoint.c (add_tracepoint): Sort list.
9155 (install_tracepoint, download_tracepoint): New.
9156 (cmd_qtdp): Call them to install and download tracepoints.
9157 (sort_tracepoints): Removed.
9158 (cmd_qtstart): Update.
9159
9160 2011-11-14 Yao Qi <yao@codesourcery.com>
9161
9162 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9163 * mem-break.h: Declare.
9164 * tracepoint.c (cmd_qtstart): Move some code to ...
9165 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9166 New.
9167 (download_tracepoints): Move some code to ...
9168 (download_tracepoint_1): ... here. New.
9169
9170 2011-11-08 Yao Qi <yao@codesourcery.com>
9171
9172 * remote-utils.c (relocate_instruction): A comment fix.
9173
9174 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9175
9176 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9177 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9178 dr_status_mirror and dr_control_mirror from debug_reg_state.
9179 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9180 (i386_initial_stuff): Remove use of deleted globals.
9181 (i386_get_thread_context, i386_set_thread_context,
9182 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9183 from debug_reg_state.
9184
9185 2011-11-05 Yao Qi <yao@codesourcery.com>
9186
9187 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9188 address as TPOINT's.
9189
9190 2011-11-02 Stan Shebs <stan@codesourcery.com>
9191
9192 * tracepoint.c (agent_mem_read_string): New function.
9193 (eval_agent_expr): Call it for tracenz.
9194 * server.c (handle_query): Report support for tracenz.
9195
9196 2011-11-02 Yao Qi <yao@codesourcery.com>
9197
9198 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9199
9200 2011-11-02 Yao Qi <yao@codesourcery.com>
9201
9202 * target.h: Fix a typo in comment.
9203
9204 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9205
9206 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9207 clobber the breakpoints' shadows with fast tracepoint jumps.
9208 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9209 * target.c (write_inferior_memory): Also pass MYADDR down to
9210 check_mem_write.
9211
9212 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9213
9214 * configure.ac: Check support for personality routine.
9215 * configure: Regenerate.
9216 * config.in: Likewise.
9217 * linux-low.c: Include <sys/personality.h>.
9218 Define ADDR_NO_RANDOMIZE if necessary.
9219 (linux_create_inferior): Disable address space randomization when
9220 forking inferior, if requested.
9221 (linux_supports_disable_randomization): New function.
9222 (linux_target_ops): Install it.
9223 * server.h (disable_randomization): Declare.
9224 * server.c (disable_randomization): New global variable.
9225 (handle_general_set): Handle QDisableRandomization.
9226 (handle_query): Likewise for qSupported.
9227 (main): Support --disable-randomization and --no-disable-randomization
9228 command line arguments.
9229 * target.h (struct target_ops): Add supports_disable_randomization.
9230 (target_supports_disable_randomization): New macro.
9231
9232 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9233
9234 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9235 ifdef check.
9236 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9237 [!PT_GETDSBT] (target_loadmap): New definition.
9238 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9239 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9240 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9241 and PT_GETDSBT to LINUX_LOADMAP.
9242 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9243 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9244
9245 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9246
9247 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9248 (arm_linux_hwbp_cap): New static variable.
9249 (arm_linux_get_hwbp_cap): Replace by ...
9250 (arm_linux_init_hwbp_cap): ... this new function.
9251 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9252 (arm_linux_get_hw_watchpoint_count): Likewise.
9253 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9254 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9255 (arm_prepare_to_resume): Use perror_with_name instead of error.
9256
9257 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9258
9259 * linux-arm-low.c: Include <signal.h>.
9260 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9261 (struct arm_linux_hwbp_cap): New data type.
9262 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9263 (struct arm_linux_hw_breakpoint): New data type.
9264 (MAX_BPTS, MAX_WPTS): Define.
9265 (struct arch_process_info, struct arch_lwp_info): New data types.
9266 (arm_linux_get_hwbp_cap): New function.
9267 (arm_linux_get_hw_breakpoint_count): Likewise.
9268 (arm_linux_get_hw_watchpoint_count): Likewise.
9269 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9270 (arm_hwbp_control_initialize): Likewise.
9271 (arm_hwbp_control_is_enabled): Likewise.
9272 (arm_hwbp_control_is_initialized): Likewise.
9273 (arm_hwbp_control_disable): Likewise.
9274 (arm_linux_hw_breakpoint_equal): Likewise.
9275 (arm_linux_hw_point_initialize): Likewise.
9276 (struct update_registers_data): New data structure.
9277 (update_registers_callback: New function.
9278 (arm_insert_point): Likewise.
9279 (arm_remove_point): Likewise.
9280 (arm_stopped_by_watchpoint): Likewise.
9281 (arm_stopped_data_address): Likewise.
9282 (arm_new_process): Likewise.
9283 (arm_new_thread): Likewise.
9284 (arm_prepare_to_resume): Likewise.
9285 (the_low_target): Register arm_insert_point, arm_remove_point,
9286 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9287 arm_new_thread, and arm_prepare_to_resume.
9288
9289 2011-09-15 Stan Shebs <stan@codesourcery.com>
9290
9291 * server.h (struct emit_ops): Add compare-goto fields.
9292 * tracepoint.c (gdb_agent_op_sizes): New table.
9293 (emit_eq_goto): New function.
9294 (emit_ne_goto): New function.
9295 (emit_lt_goto): New function.
9296 (emit_le_goto): New function.
9297 (emit_gt_goto): New function.
9298 (emit_ge_goto): New function.
9299 (is_goto_target): New function.
9300 (compile_bytecodes): Recognize special cases of compare-goto
9301 combinations and call specialized emitters for them.
9302 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9303 (amd64_emit_ne_goto): New function.
9304 (amd64_emit_lt_goto): New function.
9305 (amd64_emit_le_goto): New function.
9306 (amd64_emit_gt_goto): New function.
9307 (amd64_emit_ge_goto): New function.
9308 (amd64_emit_ops): Add the new functions.
9309 (i386_emit_eq_goto): New function.
9310 (i386_emit_ne_goto): New function.
9311 (i386_emit_lt_goto): New function.
9312 (i386_emit_le_goto): New function.
9313 (i386_emit_gt_goto): New function.
9314 (i386_emit_ge_goto): New function.
9315 (i386_emit_ops): Add the new functions.
9316
9317 2011-09-08 Stan Shebs <stan@codesourcery.com>
9318
9319 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9320 (i386_emit_epilogue): Restore %ebx.
9321
9322 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9323
9324 * server.c (step_thread): Remove definition.
9325 (process_serial_event): Don't handle Hs.
9326 * server.h (step_thread): Remove declaration.
9327 * target.c (set_desired_inferior): Remove use of step_thread.
9328
9329 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9330
9331 * linux-low.c: Include linux-procfs.h.
9332 (linux_attach_lwp_1): Update comments.
9333 (linux_attach): Scan for existing threads when attaching to a
9334 process that is the tgid.
9335 * Makefile.in: Update dependencies.
9336
9337 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9338
9339 * configure.srv: Add linux-procfs.o dependencies.
9340
9341 2011-08-14 Yao Qi <yao@codesourcery.com>
9342
9343 * target.h (struct target_ops): Fix indent.
9344 * win32-low.c (win32_target_ops): Fix comment.
9345
9346 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9347 Yao Qi <yao@codesourcery.com>
9348
9349 * Makefile.in (clean): Remove tic6x-*.c files.
9350 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9351 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9352 (tic6x-c64xp-linux.c): Likewise.
9353 * configure.srv: Add support for tic6x-*-uclinux.
9354 * linux-tic6x-low.c: New.
9355 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9356
9357 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9358 Yao Qi <yao@codesourcery.com>
9359
9360 * target.h (struct target_ops): Add read_loadmap.
9361 * linux-low.c (struct target_loadseg): New type.
9362 (struct target_loadmap): New type.
9363 (linux_read_loadmap): New function.
9364 (linux_target_ops): Add linux_read_loadmap.
9365 * server.c (handle_query): Support qXfer:fdpic:read packet.
9366 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9367 to NULL.
9368
9369 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9370
9371 * win32-low.c: Include <stdint.h>.
9372
9373 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9374
9375 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9376 to the inferior here.
9377 (i386_remove_aligned_watchpoint): Ditto.
9378 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9379 fit part of the watchpoint in the debug registers.
9380 (i386_update_inferior_debug_regs): New.
9381 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9382 registers, and only update the inferior on success.
9383 (i386_low_remove_watchpoint): Ditto.
9384
9385 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9386
9387 * linux-low.c (compare_ints, unique, list_threads, show_process,
9388 linux_core_of_thread): Delete.
9389 (linux_target_ops): Change linux_core_of_thread to
9390 linux_common_core_of_thread.
9391 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9392 * utils.c (malloc_failure): Change type of argument.
9393 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9394 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9395 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9396 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9397 (IPA_OBJS): Add common-utils-ipa.o.
9398 (ptid_h, linux_osdata_h): New macros.
9399 (server_h): Add common/common-utils.h, common/xml-utils.h,
9400 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9401 common/ptid.h.
9402 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9403 ptid.o, buffer.o): New rules.
9404 (linux-low.o): Add common/linux-osdata.h as a dependency.
9405 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9406 * configure.ac: Add AC_HEADER_DIRENT check.
9407 * config.in: Regenerate.
9408 * configure: Regenerate.
9409 * remote-utils.c (xml_escape_text): Delete.
9410 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9411 buffer_xml_printf): Move to common/buffer.c.
9412 * server.c (main): Remove call to initialize_inferiors.
9413 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9414 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9415 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9416 internal_error, gdb_assert, gdb_assert_fail): Delete.
9417 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9418 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9419 common/buffer.h.
9420 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9421 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9422 initialize_inferiors): Delete.
9423
9424 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9425
9426 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9427 symbol error.
9428
9429 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9430
9431 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9432 assertion.
9433 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9434
9435 2011-05-26 Yao Qi <yao@codesourcery.com>
9436
9437 * Makefile.in (thread-db.o): Track dependence to
9438 common/gdb_thread_db.h.
9439 * thread-db.c: include gdb_thread_db.h from right place.
9440
9441 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9442
9443 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9444 __FILE__ and __LINE__ to internal_error.
9445
9446 2011-05-13 Doug Evans <dje@google.com>
9447
9448 * thread-db.c (try_thread_db_load_from_sdir): New function.
9449 (try_thread_db_load_from_dir): New function.
9450 (thread_db_load_search): Handle $sdir, ignore $pdir.
9451 Remove trying of system directories if search of
9452 libthread-db-search-path fails, that is now done via $sdir.
9453
9454 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9455
9456 * server.c (handle_query): Add EnableDisableTracepoints to the list
9457 of supported features.
9458 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9459 tracepoints.
9460 (cmd_qtenable_disable): New.
9461 (cmd_qtstart): Install tracepoints even if disabled.
9462 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9463 receiving a QTEnable or QTDisable packet.
9464 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9465 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9466 tracepoints.
9467 (gdb_probe): Skip data collection if static tracepoint is disabled.
9468
9469 2011-05-10 Doug Evans <dje@google.com>
9470
9471 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9472
9473 2011-05-04 Doug Evans <dje@google.com>
9474
9475 * linux-low.c (linux_join): Skip process lookup.
9476 * spu-low.c (spu_join): Ditto.
9477 * server.c (join_inferiors_callback): Delete.
9478 (process_serial_event): For 'D' packet (detach) call join_inferior
9479 directly.
9480
9481 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9482
9483 * README: Don't mention xscale*-*-linux*.
9484 * configure.srv (xscale*-*-linux*): Don't handle target.
9485
9486 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9487
9488 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9489 casting pointers.
9490 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9491 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9492 (i386_emit_void_call_2): Likewise.
9493
9494 2011-04-26 Yao Qi <yao@codesourcery.com>
9495
9496 * linux-low.c: Move common macros to linux-ptrace.h.
9497 Include linux-ptrace.h.
9498 * Makefile.in (linux_ptrace_h): New.
9499 (linux-low.o): Depends on linux-ptrace.h.
9500
9501 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9502
9503 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9504 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9505 (remote_prepare): New function with most of the TCP code from ...
9506 (remote_open): ... here. Detect PORT here unconditionally. Move also
9507 setting transport_is_reliable.
9508 * server.c (run_once): New variable.
9509 (gdbserver_usage): Document it.
9510 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9511 the first run if RUN_ONCE.
9512 * server.h (run_once, remote_prepare): New declarations.
9513
9514 2011-04-19 Tom Tromey <tromey@redhat.com>
9515
9516 * win32-low.c (handle_load_dll): Remove duplicate "the".
9517
9518 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9519
9520 Remove support for old Cygwin 1.5 versions.
9521 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9522 function to avoid warning.
9523 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9524 warning.
9525
9526 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9527
9528 * gdbserver/server.h (Macro _): Define it if not available.
9529
9530 2011-03-14 Michael Snyder <msnyder@vmware.com>
9531
9532 * hostio.c (handle_close): Remove unnecessary null test.
9533
9534 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9535
9536 * Makefile.in (maintainer-clean realclean distclean): Remove
9537 "make ... subdir_do" command.
9538
9539 2011-03-10 Michael Snyder <msnyder@vmware.com>
9540
9541 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9542
9543 * server.c (handle_v_run): Free alloced buffer on early return.
9544
9545 2011-03-09 Yao Qi <yao@codesourcery.com>
9546
9547 Revert:
9548 2011-03-04 Yao Qi <yao@codesourcery.com>
9549
9550 * Makefile.in: Remove GNU make feature --directory.
9551
9552 2011-03-05 Yao Qi <yao@codesourcery.com>
9553
9554 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9555 (subdir_do): New make target. Copied from gdb/Makefile.
9556 (maintainer-clean, realclean, distclean, clean): Call corresponding
9557 make targets in common/Makefile.
9558
9559 2011-02-11 Yao Qi <yao@codesourcery.com>
9560
9561 * configure.ac: Call AC_PROG_RANLIB.
9562 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9563 * configure: Regenerate.
9564
9565 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9566
9567 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9568
9569 2011-03-06 Yao Qi <yao@codesourcery.com>
9570
9571 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9572
9573 2011-03-05 Yao Qi <yao@codesourcery.com>
9574
9575 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9576 (subdir_do): New make target. Copied from gdb/Makefile.
9577 (maintainer-clean, realclean, distclean, clean): Call corresponding
9578 make targets in common/Makefile.
9579
9580 2011-03-04 Yao Qi <yao@codesourcery.com>
9581
9582 * Makefile.in: Remove GNU make feature --directory.
9583
9584 2011-03-04 Michael Snyder <msnyder@vmware.com>
9585
9586 * server.c (queue_stop_reply): Call xmalloc not malloc.
9587
9588 2011-03-02 Michael Snyder <msnyder@vmware.com>
9589
9590 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9591
9592 2011-02-28 Michael Snyder <msnyder@vmware.com>
9593
9594 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9595 (cmd_qtframe): Ditto.
9596 (cmd_qtbuffer): Ditto.
9597 (cmd_bigqtbuffer): Ditto.
9598
9599 * utils.c (decimal2str): Initialize 'width' to nine, then
9600 don't mess with it.
9601
9602 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9603
9604 * hostio.c (require_data): Free *data, not data.
9605
9606 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9607
9608 * hostio.c (require_data): Use free, not xfree.
9609
9610 2011-02-27 Michael Snyder <msnyder@vmware.com>
9611
9612 * server.c (handle_query): Discard unused value.
9613
9614 * hostio.c (require_data): Free malloc memory before returning
9615 error.
9616
9617 2011-02-26 Michael Snyder <msnyder@vmware.com>
9618
9619 * linux-low.c (list_threads): Call closedir for dirent.
9620
9621 2011-02-27 Michael Snyder <msnyder@vmware.com>
9622
9623 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9624 a case statement falls through.
9625
9626 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9627
9628 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9629 in comparison.
9630
9631 2011-02-26 Michael Snyder <msnyder@vmware.com>
9632
9633 * utils.c (decimal2str): Eliminate dead code and dead param.
9634 (pulongest): Drop dead param from call to decimal2str.
9635 (plongest): Ditto.
9636
9637 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9638
9639 Revert the following patch (not approved yet):
9640 2011-02-21 Hui Zhu <teawater@gmail.com>
9641 * tracepoint.c (tp_printf): New function.
9642 (eval_agent_expr): Handle gdb_agent_op_printf.
9643
9644 2011-02-21 Hui Zhu <teawater@gmail.com>
9645
9646 * tracepoint.c (tp_printf): New function.
9647 (eval_agent_expr): Handle gdb_agent_op_printf.
9648
9649 2011-02-18 Tom Tromey <tromey@redhat.com>
9650
9651 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9652 (tracepoint.o): Likewise.
9653 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9654 (gdb_agent_op_names): Likewise.
9655
9656 2011-02-18 Tom Tromey <tromey@redhat.com>
9657
9658 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9659 gdb_agent_op_rot>: New constants.
9660 (gdb_agent_op_names): Add pick and roll.
9661 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9662 cases.
9663
9664 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9665
9666 * aclocal.m4: Regenerated with aclocal-1.11.1.
9667
9668 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9669
9670 * server.c (handle_qxfer_traceframe_info): New.
9671 (qxfer_packets): Register "traceframe-info".
9672 (handle_query): Report support for qXfer:traceframe-info:read+.
9673 * tracepoint.c (match_blocktype): New.
9674 (traceframe_find_block_type): Rename to ...
9675 (traceframe_walk_blocks): ... this. Add callback filter argument,
9676 and use it.
9677 (traceframe_find_block_type): New, reimplemented on top of
9678 traceframe_walk_blocks.
9679 (build_traceframe_info_xml): New.
9680 (traceframe_read_info): New.
9681 * server.h (traceframe_read_info): Declare.
9682
9683 2011-02-11 Yao Qi <yao@codesourcery.com>
9684
9685 * configure.ac: Call AC_PROG_RANLIB.
9686 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9687 * configure: Regenerate.
9688
9689 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9690
9691 * server.c (gdb_read_memory): Change return semantics to allow
9692 partial transfers.
9693 (handle_search_memory_1): Adjust.
9694 (process_serial_event) <'m' packet>: Handle partial transfers.
9695 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9696
9697 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9698
9699 * regcache.c (init_register_cache): Initialize
9700 regcache->register_status.
9701 (free_register_cache): Release regcache->register_status.
9702 (regcache_cpy): Copy register_status.
9703 (registers_to_string): Print 'x's for unavailable registers.
9704 (supply_register): Mark the register's status valid or
9705 unavailable, depending on whether a buffer was passed in or not.
9706 (supply_register_zeroed): New.
9707 (supply_regblock): Mark the registers' status valid or
9708 unavailable, depending on whether a buffer was passed in or not.
9709 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9710 (struct regcache): New `register_status' field.
9711 (supply_register_zeroed): Declare.
9712 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9713 supply_register_zeroed, rather than passing a NULL buffer to
9714 supply_register.
9715 * tracepoint.c (fetch_traceframe_registers): Update comment.
9716
9717 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9718
9719 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9720 buffer explicit.
9721
9722 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9723
9724 * server.h (decode_xfer_write): Change prototype.
9725 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9726 and don't extract the annex here.
9727 * server.c (decode_xfer_read): Remove `annex' parameter,
9728 and don't extract the annex here.
9729 (decode_xfer): New.
9730 (struct qxfer): New.
9731 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9732 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9733 (handle_qxfer_statictrace): New functions, abstracted out from
9734 handle_query, and made to use the struct qxfer interface.
9735 (handle_threads_qxfer_proper): Rename to ...
9736 (handle_qxfer_threads_proper): ... this.
9737 (handle_threads_qxfer): Rename to ...
9738 (handle_qxfer_threads): ... this. Adjust.
9739 (qxfer_packets): New array.
9740 (handle_qxfer): New function.
9741 (handle_query): Use handle_qxfer.
9742
9743 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9744
9745 * gdbreplay.c: Shorten lines of >= 80 columns.
9746 * linux-low.c: Ditto.
9747 * linux-ppc-low.c: Ditto.
9748 * linux-s390-low.c: Ditto.
9749 * linux-sparc-low.c: Ditto.
9750 * linux-x86-low.c: Ditto.
9751 * linux-xtensa-low.c: Ditto.
9752 * mem-break.c: Ditto.
9753 * nto-low.c: Ditto.
9754 * regcache.h: Ditto.
9755 * remote-utils.c: Ditto.
9756 * server.c: Ditto.
9757 * server.h: Ditto.
9758 * thread-db.c: Ditto.
9759 * tracepoint.c: Ditto.
9760 * utils.c: Ditto.
9761 * win32-low.h: Ditto.
9762
9763 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9764
9765 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9766 update.
9767
9768 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9769
9770 * server.c (gdbserver_version): Update copyright year in version
9771 output.
9772 * gdbreplay.c (gdbreplay_version): Ditto.
9773
9774 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9775
9776 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9777 * linux-bfin-low.c: New file.
9778 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9779 PT_DATA_ADDR for BFIN targets.
9780 * Makefile.in (SFILES): Add linux-bfin-low.c.
9781 (clean): Remove reg-bfin.c.
9782 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9783 * README: Mention supported Blackfin targets.
9784
9785 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9786
9787 * .gitignore: New file.
9788
9789 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9790
9791 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9792
9793 2010-10-22 Jie Zhang <jie@codesourcery.com>
9794
9795 * Makefile.in: Add FLAGS_TO_PASS variable.
9796 (install): Remove dependency of install-only and recursively
9797 invoke make for install-only.
9798
9799 2010-10-04 Doug Evans <dje@google.com>
9800
9801 * Makefile.in (uninstall): Use $(DESTDIR).
9802
9803 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9804
9805 PR gdb/11842
9806
9807 * linux-x86-low.c (compat_siginfo_from_siginfo)
9808 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9809 si_code is < 0. Check for si_code == SI_TIMER before checking for
9810 si_code < 0.
9811
9812 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9813
9814 * lynx-i386-low.c: New file.
9815 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9816
9817 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9818
9819 * lynx-low.c (ptrace_request_to_str): Remove handling for
9820 request values that have been removed in LynxOS 5.x.
9821
9822 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9823
9824 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9825 <ptrace.h>
9826
9827 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9828
9829 * configure.ac: Add --enable-inprocess-agent option.
9830 * configure: Rebuilt.
9831
9832 2010-09-06 Yao Qi <yao@codesourcery.com>
9833
9834 * linux-low.c (linux_kill): Remove unused variable.
9835 (linux_stabilize_threads): Likewise.
9836 * server.c (start_inferior): Likewise.
9837 (queue_stop_reply_callback): Likewise.
9838 * tracepoint.c (do_action_at_tracepoint): Likewise.
9839
9840 2010-09-06 Yao Qi <yao@codesourcery.com>
9841
9842 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9843 on return.
9844
9845 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9846
9847 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9848
9849 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9850
9851 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9852 "$(IPA_DEPFILES)".
9853
9854 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9855
9856 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9857 gdbserver/lynx-ppc-low.c: New files.
9858 * Makefile.in (lynx_low_h): New variable.
9859 (lynx-low.o, lynx-ppc-low.o): New rules.
9860 * configure.ac: On LynxOS, link with -lnetinet.
9861 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9862 * configure: regenerate.
9863
9864 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9865
9866 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9867 * configure.ac: Add check for vasprintf and vsnprintf.
9868 * configure, config.in: Regenerate.
9869 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9870
9871 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9872
9873 * gdbreplay.c: Move include of alloca.h up, next to include of
9874 malloc.h.
9875 * server.h: Add include of malloc.h.
9876 * mem-break.c: Remove include of malloc.h.
9877 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9878
9879 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9880
9881 * Makefile.in (memmem.o): Build with -Wno-error.
9882
9883 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9884
9885 * utils.c (xsnprintf): Make non-static.
9886 * server.h: Add xsnprintf declaration.
9887 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9888 replace calls to snprintf by calls to xsnprintf throughout.
9889
9890 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9891
9892 * configure.ac: Add configure check for alloca.
9893 * configure, config.in: Regenerate.
9894 * server.h: Include alloca.h if it exists.
9895 * gdbreplay.c: Include alloca.h if it exists.
9896
9897 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9898
9899 * linux-low.c (__SIGRTMIN): Define if not already defined.
9900 (linux_create_inferior): Check for __ANDROID__ rather than
9901 __SIGRTMIN.
9902 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9903 are already deferred.
9904 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9905 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9906 stopped and already has a pending signal to report.
9907 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9908 a pending signal to report or is moving out of a jump pad.
9909 (linux_init_signals): Check for __ANDROID__ rather than
9910 __SIGRTMIN.
9911
9912 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9913
9914 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9915 debug_threads check. Avoid a linear search when not doing debug
9916 output.
9917
9918 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9919
9920 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9921 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9922 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9923 (process_event): Change local fd's type to gdb_fildes_t.
9924 (create_file_handler): Adjust prototype.
9925 (delete_file_handler): Adjust prototype.
9926 (handle_file_event): Adjust prototype. Use pfildes.
9927 (create_file_event): Adjsut prototype.
9928 * remote-utils.c (remote_desc, listen_desc): Change type to
9929 gdb_fildes_t.
9930 * server.h: New gdb_fildes_t typedef.
9931 [USE_WIN32API]: Include winsock2.h.
9932 (delete_file_handler, add_file_handler): Adjust prototypes.
9933 (pfildes): Declare.
9934 * utils.c (pfildes): New.
9935
9936 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9937
9938 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9939 * configure: Regenerate.
9940
9941 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9942
9943 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9944 (linux_done_accessing_memory): ... this.
9945 (linux_target_ops): Adjust.
9946 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9947 * nto-low.c (nto_target_ops): Adjust comment.
9948 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9949 * spu-low.c (spu_target_ops): Adjust comment.
9950 * target.h (target_ops): Rename unprepare_to_access_memory field
9951 to done_accessing_memory.
9952 (unprepare_to_access_memory): Rename to ...
9953 (done_accessing_memory): ... this.
9954
9955 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9956
9957 * linux-low.c (linux_prepare_to_access_memory): New.
9958 (linux_unprepare_to_access_memory): New.
9959 (linux_target_ops): Install them.
9960 * server.c (read_memory): Rename to ...
9961 (gdb_read_memory): ... this. Use
9962 prepare_to_access_memory/prepare_to_access_memory.
9963 (write_memory): Rename to ...
9964 (gdb_write_memory): ... this. Use
9965 prepare_to_access_memory/prepare_to_access_memory.
9966 (handle_search_memory_1): Adjust.
9967 (process_serial_event): Adjust.
9968 * target.h (struct target_ops): New fields
9969 prepare_to_access_memory and unprepare_to_access_memory.
9970 (prepare_to_access_memory, unprepare_to_access_memory): New.
9971 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9972 prepare_to_access_memory/prepare_to_access_memory.
9973 * nto-low.c (nto_target_ops): Adjust.
9974 * spu-low.c (spu_target_ops): Adjust.
9975 * win32-low.c (win32_target_ops): Adjust.
9976
9977 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9978
9979 * Makefile.in (WARN_CFLAGS): Get it from configure.
9980 (WERROR_CFLAGS): New.
9981 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9982 * configure.ac: Introduce --enable-werror, which adds -Werror to
9983 the compiler command line. Enabled by default. Disable with
9984 --disable-werror. Add -Wdeclaration-after-statement
9985 Wpointer-arith and -Wformat-nonliteral to warning flags.
9986 * configure: Regenerate.
9987
9988 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9989
9990 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9991
9992 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9993
9994 * gdbreplay.c (remote_error): New.
9995 (gdbchar): New.
9996 (expect): Use gdbchar. Check for error reading from GDB.
9997 Clarify sync error output.
9998 (play): Check for errors writing to GDB.
9999 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10000 * remote-utils.c (getpkt): Check for errors writing to the remote
10001 descriptor.
10002
10003 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10004
10005 * linux-low.c (linux_wait_1): Move non-debugging code out of
10006 `debug_threads' control.
10007
10008 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10009
10010 * linux-low.c (linux_wait_1): Don't set last_status here.
10011 * server.c (push_event, queue_stop_reply_callback): Assert we're
10012 not pushing a TARGET_WAITKIND_IGNORE event.
10013 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10014 (myresume, handle_target_event): Set the thread's last_resume_kind
10015 and last_status from the target returned status.
10016
10017 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10018
10019 PR threads/10729
10020
10021 * linux-x86-low.c (update_debug_registers_callback): New.
10022 (i386_dr_low_set_addr): Use it.
10023 (i386_dr_low_get_addr): New.
10024 (i386_dr_low_set_control): Use update_debug_registers_callback.
10025 (i386_dr_low_get_control): New.
10026 (i386_dr_low_get_status): Adjust.
10027 * linux-low.c (linux_stop_lwp): New.
10028 * linux-low.h (linux_stop_lwp): Declare.
10029
10030 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10031 argument instead of a i386_debug_reg_state.
10032 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10033 a i386_debug_reg_state.
10034 (i386_insert_aligned_watchpoint): Adjust.
10035 (i386_remove_aligned_watchpoint): Adjust.
10036 (i386_low_stopped_data_address): Read the debug registers from the
10037 inferior instead of from the mirrors.
10038 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10039 (i386_dr_low_get_addr): Declare.
10040 (i386_dr_low_get_control): Declare.
10041 (i386_dr_low_get_status): Change prototype.
10042
10043 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10044 (i386_dr_low_get_addr): New.
10045 (i386_dr_low_get_control): New.
10046 (i386_dr_low_get_status): Adjust prototype. Return
10047 dr_status_mirror.
10048 (i386_initial_stuff): Clear dr_status_mirror and
10049 dr_control_mirror.
10050 (i386_get_thread_context): Adjust.
10051 (i386_set_thread_context): Adjust.
10052 (i386_thread_added): Adjust.
10053
10054 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10055
10056 * linux-low.h (linux_thread_area): Delete declaration.
10057
10058 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10059
10060 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10061 after its termination.
10062
10063 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10064
10065 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10066 (gdb_wants_all_stopped): Delete.
10067 (linux_wait_1): Don't call them.
10068 * server.c (handle_v_cont): Tag all threads as want-stopped.
10069 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10070 stopped as "client-wants-stopped".
10071
10072 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10073
10074 * Makefile.in (signals_h): New.
10075 (server_h): Depend on it.
10076 (server.o): Don't depend on $(signals_def).
10077 (signals.o): Depend on $(signals_def).
10078
10079 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10080
10081 * Makefile.in (signals_def): New.
10082 (server_h): Append include/gdb/signals.h and signals_def.
10083 (server.o): Append signals_def.
10084
10085 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10086
10087 * server.c (handle_target_event): Use target_signal_to_host for
10088 resume_info.sig initialization.
10089 * target.h (struct thread_resume) <sig>: New comment.
10090
10091 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10092
10093 * server.c (handle_query): strcpy() the returned string from paddress()
10094 instead of sprintf().
10095 * utils.c (paddress): Return phex_nz().
10096
10097 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10098
10099 * server.c (handle_v_cont): Call mourn_inferior if process
10100 just exited.
10101 (myresume): Likewise.
10102
10103 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10104
10105 Static tracepoints, and integration with UST.
10106
10107 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10108 * mem-break.c (uninsert_all_breakpoints)
10109 (reinsert_all_breakpoints): New.
10110 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10111 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10112 (gdb_agent_ust_loaded, helper_thread_id)
10113 (gdb_agent_helper_thread_id): New macros.
10114 (struct ipa_sym_addresses): Add addr_ust_loaded,
10115 addr_helper_thread_id, addr_cmd_buf.
10116 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10117 (in_process_agent_loaded_ust): New.
10118 (write_e_ust_not_loaded): New.
10119 (maybe_write_ipa_ust_not_loaded): New.
10120 (struct collect_static_trace_data_action): New.
10121 (enum tracepoint_type) <static_tracepoint>: New.
10122 (struct tracepoint) <handle>: Mention static tracepoints.
10123 (struct static_tracepoint_ctx): New.
10124 (CMD_BUF_SIZE): New.
10125 (add_tracepoint_action): Handle static tracepoint actions.
10126 (unprobe_marker_at): New.
10127 (clear_installed_tracepoints): Handle static tracepoints.
10128 (cmd_qtdp): Handle static tracepoints.
10129 (probe_marker_at): New.
10130 (cmd_qtstart): Handle static tracepoints.
10131 (response_tracepoint): Handle static tracepoints.
10132 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10133 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10134 (get_context_regcache): Handle static tracepoints.
10135 (do_action_at_tracepoint): Handle static tracepoint actions.
10136 (traceframe_find_block_type): Handle static trace data blocks.
10137 (traceframe_read_sdata): New.
10138 (download_tracepoints): Download static tracepoint actions.
10139 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10140 (GDB_PROBE_NAME): New.
10141 (ust_ops): New.
10142 (GET_UST_SYM): New.
10143 (USTF): New.
10144 (dlsym_ust): New.
10145 (ust_marker_to_static_tracepoint): New.
10146 (gdb_probe): New.
10147 (collect_ust_data_at_tracepoint): New.
10148 (gdb_ust_probe): New.
10149 (UNIX_PATH_MAX, SOCK_DIR): New.
10150 (gdb_ust_connect_sync_socket): New.
10151 (resume_thread, stop_thread): New.
10152 (run_inferior_command): New.
10153 (init_named_socket): New.
10154 (gdb_ust_socket_init): New.
10155 (cstr_to_hexstr): New.
10156 (next_st): New.
10157 (first_marker, next_marker): New.
10158 (response_ust_marker): New.
10159 (cmd_qtfstm, cmd_qtsstm): New.
10160 (unprobe_marker_at, probe_marker_at): New.
10161 (cmd_qtstmat, gdb_ust_thread): New.
10162 (gdb_ust_init): New.
10163 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10164 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10165 (ST_REGENTRY): New.
10166 (x86_64_st_collect_regmap): New.
10167 (X86_64_NUM_ST_COLLECT_GREGS): New.
10168 (AMD64_RIP_REGNUM): New.
10169 (supply_static_tracepoint_registers): New.
10170 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10171 (ST_REGENTRY): New.
10172 (i386_st_collect_regmap): New.
10173 (i386_NUM_ST_COLLECT_GREGS): New.
10174 (supply_static_tracepoint_registers): New.
10175 * server.c (handle_query): Handle qXfer:statictrace:read.
10176 <qSupported>: Report support for StaticTracepoints, and
10177 qXfer:statictrace:read features.
10178 * server.h (traceframe_read_sdata)
10179 (supply_static_tracepoint_registers): Declare.
10180 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10181 (unpack_varlen_hex): Include in IPA build.
10182 * Makefile.in (ustlibs, ustinc): New.
10183 (IPA_OBJS): Add remote-utils-ipa.o.
10184 ($(IPA_LIB)): Link -ldl and -lpthread.
10185 (UST_CFLAGS): New.
10186 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10187 * config.in, configure: Regenerate.
10188
10189 2010-06-20 Ian Lance Taylor <iant@google.com>
10190 Pedro Alves <pedro@codesourcery.com>
10191
10192 * linux-x86-low.c (always_true): Delete.
10193 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10194 trying to fool the compiler with always_true.
10195
10196 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10197
10198 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10199 conditions in gdbserver.
10200
10201 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10202
10203 * spu-low.c (spu_read_memory): Wrap around local store limit.
10204 (spu_write_memory): Likewise.
10205
10206 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10207
10208 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10209 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10210 LONGEST uses.
10211 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10212 uses.
10213 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10214 uses with LONGEST uses.
10215
10216 2010-06-14 Stan Shebs <stan@codesourcery.com>
10217 Pedro Alves <pedro@codesourcery.com>
10218
10219 Bytecode compiler.
10220
10221 * linux-x86-low.c: Include limits.h.
10222 (add_insns): New.
10223 (always_true): New.
10224 (EMIT_ASM): New.
10225 (EMIT_ASM32): New.
10226 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10227 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10228 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10229 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10230 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10231 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10232 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10233 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10234 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10235 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10236 (amd64_emit_void_call_2): New.
10237 (amd64_emit_ops): New.
10238 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10239 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10240 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10241 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10242 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10243 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10244 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10245 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10246 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10247 (i386_emit_stack_adjust, i386_emit_int_call_1)
10248 (i386_emit_void_call_2): New.
10249 (i386_emit_ops): New.
10250 (x86_emit_ops): New.
10251 (the_low_target): Install x86_emit_ops.
10252 * server.h (struct emit_ops): New.
10253 (get_raw_reg_func_addr): Declare.
10254 (current_insn_ptr, emit_error): Declare.
10255 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10256 (set_trace_state_variable_value): New defines.
10257 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10258 addr_get_trace_state_variable_value and
10259 addr_set_trace_state_variable_value.
10260 (symbol_list): New fields for get_raw_reg,
10261 get_trace_state_variable_value and set_trace_state_variable_value.
10262 (condfn): New typedef.
10263 (struct tracepoint): New field `compiled_cond'.
10264 (do_action_at_tracepoint): Clear compiled_cond.
10265 (get_trace_state_variable_value, set_trace_state_variable_value):
10266 Export in the IPA.
10267 (condition_true_at_tracepoint): If there's a compiled condition,
10268 run that.
10269 (current_insn_ptr, emit_error): New globals.
10270 (struct bytecode_address): New.
10271 (get_raw_reg_func_addr): New.
10272 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10273 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10274 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10275 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10276 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10277 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10278 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10279 (compile_tracepoint_condition, compile_bytecodes): New.
10280 * target.h (emit_ops): Forward declare.
10281 (struct target_ops): New field emit_ops.
10282 (target_emit_ops): New.
10283 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10284 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10285 * linux-low.c (linux_emit_ops): New.
10286 (linux_target_ops): Install it.
10287 * linux-low.h (struct linux_target_ops): New field emit_ops.
10288
10289 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10290
10291 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10292 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10293
10294 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10295 Stan Shebs <stan@codesourcery.com>
10296
10297 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10298 (all): Depend on $(extra_libraries).
10299 (install-only): Install the IPA.
10300 (IPA_OBJS, IPA_LIB): New.
10301 (clean): Remove the IPA lib.
10302 (IPAGENT_CFLAGS): New.
10303 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10304 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10305 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10306 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10307 * configure.ac: Check for atomic builtins support in the compiler.
10308 (IPA_DEPFILES, extra_libraries): Define.
10309 * configure.srv (ipa_obj): Add description.
10310 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10311 (i[34567]86-*-linux*): Set ipa_obj.
10312 (x86_64-*-linux*): Set ipa_obj.
10313 * linux-low.c (stabilizing_threads): New.
10314 (supports_fast_tracepoints): New.
10315 (linux_detach): Stabilize threads before detaching.
10316 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10317 the lwp is either not stabilizing, or is moving out of a jump pad.
10318 (linux_fast_tracepoint_collecting): New.
10319 (maybe_move_out_of_jump_pad): New.
10320 (enqueue_one_deferred_signal): New.
10321 (dequeue_one_deferred_signal): New.
10322 (linux_wait_for_event_1): If moving out of a jump pad, defer
10323 pending signals to later.
10324 (linux_stabilize_threads): New.
10325 (linux_wait_1): Check if threads need moving out of jump pads, and
10326 do it if so.
10327 (stuck_in_jump_pad_callback): New.
10328 (move_out_of_jump_pad_callback): New.
10329 (lwp_running): New.
10330 (linux_resume_one_lwp): Handle moving out of jump pads.
10331 (linux_set_resume_request): Dequeue deferred signals.
10332 (need_step_over_p): Also step over fast tracepoint jumps.
10333 (start_step_over): Also uninsert fast tracepoint jumps.
10334 (finish_step_over): Also reinsert fast tracepoint jumps.
10335 (linux_install_fast_tracepoint_jump): New.
10336 (linux_target_ops): Install linux_stabilize_threads and
10337 linux_install_fast_tracepoint_jump_pad.
10338 * linux-low.h (linux_target_ops) <get_thread_area,
10339 install_fast_tracepoint_jump_pad>: New fields.
10340 (struct lwp_info) <collecting_fast_tracepoint,
10341 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10342 (linux_get_thread_area): Declare.
10343 * linux-x86-low.c (jump_insn): New.
10344 (x86_get_thread_area): New.
10345 (append_insns): New.
10346 (push_opcode): New.
10347 (amd64_install_fast_tracepoint_jump_pad): New.
10348 (i386_install_fast_tracepoint_jump_pad): New.
10349 (x86_install_fast_tracepoint_jump_pad): New.
10350 (the_low_target): Install x86_get_thread_area and
10351 x86_install_fast_tracepoint_jump_pad.
10352 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10353 (struct fast_tracepoint_jump): New.
10354 (fast_tracepoint_jump_insn): New.
10355 (fast_tracepoint_jump_shadow): New.
10356 (find_fast_tracepoint_jump_at): New.
10357 (fast_tracepoint_jump_here): New.
10358 (delete_fast_tracepoint_jump): New.
10359 (set_fast_tracepoint_jump): New.
10360 (uninsert_fast_tracepoint_jumps_at): New.
10361 (reinsert_fast_tracepoint_jumps_at): New.
10362 (set_breakpoint_at): Use write_inferior_memory.
10363 (uninsert_raw_breakpoint): Use write_inferior_memory.
10364 (check_mem_read): Mask out fast tracepoint jumps.
10365 (check_mem_write): Mask out fast tracepoint jumps.
10366 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10367 (set_fast_tracepoint_jump): Declare.
10368 (delete_fast_tracepoint_jump)
10369 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10370 (reinsert_fast_tracepoint_jumps_at): Declare.
10371 * regcache.c: Don't compile many functions when building the
10372 in-process agent library.
10373 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10374 the register buffer in the heap.
10375 (free_register_cache): If the register buffer isn't owned by the
10376 regcache, don't free it.
10377 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10378 pre-existing register caches.
10379 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10380 type.
10381 (convert_ascii_to_int): : Constify `from' parameter type.
10382 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10383 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10384 the needed buffer in-place.
10385 (relocate_instruction): New.
10386 * server.c (handle_query) <qSymbols>: If the target supports
10387 tracepoints, give it a chance of looking up symbols. Report
10388 support for fast tracepoints.
10389 (handle_status): Stabilize threads.
10390 (process_serial_event): Adjust.
10391 * server.h (struct fast_tracepoint_jump): Forward declare.
10392 (struct process_info) <fast_tracepoint_jumps>: New field.
10393 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10394 (decode_X_packet, decode_M_packet): Adjust.
10395 (relocate_instruction): Declare.
10396 (in_process_agent_loaded): Declare.
10397 (tracepoint_look_up_symbols): Declare.
10398 (struct fast_tpoint_collect_status): Declare.
10399 (fast_tracepoint_collecting): Declare.
10400 (force_unlock_trace_buffer): Declare.
10401 (handle_tracepoint_bkpts): Declare.
10402 (initialize_low_tracepoint)
10403 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10404 * target.h (struct target_ops) <stabilize_threads,
10405 install_fast_tracepoint_jump_pad>: New fields.
10406 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10407 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10408 [HAVE_STDINT_H]: Include stdint.h.
10409 (trace_debug_1): Rename to ...
10410 (trace_vdebug): ... this.
10411 (trace_debug): Rename to ...
10412 (trace_debug_1): ... this. Add `level' parameter.
10413 (trace_debug): New.
10414 (ATTR_USED, ATTR_NOINLINE): New.
10415 (IP_AGENT_EXPORT): New.
10416 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10417 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10418 (about_to_request_buffer_space, trace_buffer_is_full)
10419 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10420 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10421 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10422 (traceframe_write_count, traceframes_created)
10423 (trace_state_variables)
10424 New renaming defines.
10425 (struct ipa_sym_addresses): New.
10426 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10427 (symbol_list): New.
10428 (ipa_sym_addrs): New.
10429 (all_tracepoint_symbols_looked_up): New.
10430 (in_process_agent_loaded): New.
10431 (write_e_ipa_not_loaded): New.
10432 (maybe_write_ipa_not_loaded): New.
10433 (tracepoint_look_up_symbols): New.
10434 (debug_threads) [IN_PROCESS_AGENT]: New.
10435 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10436 (UNKNOWN_SIDE_EFFECTS): New.
10437 (stop_tracing): New.
10438 (flush_trace_buffer): New.
10439 (stop_tracing_bkpt): New.
10440 (flush_trace_buffer_bkpt): New.
10441 (read_inferior_integer): New.
10442 (read_inferior_uinteger): New.
10443 (read_inferior_data_pointer): New.
10444 (write_inferior_data_pointer): New.
10445 (write_inferior_integer): New.
10446 (write_inferior_uinteger): New.
10447 (struct collect_static_trace_data_action): Delete.
10448 (enum tracepoint_type): New.
10449 (struct tracepoint) <type>: New field `type'.
10450 <actions_str, step_actions, step_actions_str>: Only include in
10451 GDBserver.
10452 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10453 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10454 (tracepoints): Use IP_AGENT_EXPORT.
10455 (last_tracepoint): Don't include in the IPA.
10456 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10457 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10458 (alloced_trace_state_variables): New.
10459 (trace_state_variables): Use IP_AGENT_EXPORT.
10460 (traceframe_t): Delete unused variable.
10461 (circular_trace_buffer): Don't include in the IPA.
10462 (trace_buffer_start): Delete.
10463 (struct trace_buffer_control): New.
10464 (trace_buffer_free): Delete.
10465 (struct ipa_trace_buffer_control): New.
10466 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10467 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10468 New.
10469 (trace_buffer_ctrl): New.
10470 (TRACE_BUFFER_CTRL_CURR): New.
10471 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10472 Reimplement as macros.
10473 (trace_buffer_wrap): Delete.
10474 (traceframe_write_count, traceframe_read_count)
10475 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10476 (struct tracepoint_hit_ctx) <type>: New field.
10477 (struct fast_tracepoint_ctx): New.
10478 (memory_barrier): New.
10479 (cmpxchg): New.
10480 (record_tracepoint_error): Update atomically in the IPA.
10481 (clear_inferior_trace_buffer): New.
10482 (about_to_request_buffer_space): New.
10483 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10484 updating the same buffer.
10485 (add_tracepoint): Default the tracepoint's type to trap
10486 tracepoint, and orig_size to -1.
10487 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10488 internal variables.
10489 (create_trace_state_variable): New parameter `gdb'. Handle it.
10490 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10491 (cmd_qtdp): Handle fast tracepoints.
10492 (cmd_qtdv): Adjust.
10493 (max_jump_pad_size): New.
10494 (gdb_jump_pad_head): New.
10495 (get_jump_space_head): New.
10496 (claim_jump_space): New.
10497 (sort_tracepoints): New.
10498 (MAX_JUMP_SIZE): New.
10499 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10500 IPA.
10501 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10502 support. Upload fast traceframes, and delete internal IPA
10503 breakpoints.
10504 (stop_tracing_handler): New.
10505 (flush_trace_buffer_handler): New.
10506 (cmd_qtstop): Upload fast tracepoints.
10507 (response_tracepoint): Handle fast tracepoints.
10508 (tracepoint_finished_step): Upload fast traceframes. Set the
10509 tracepoint hit context's tracepoint type.
10510 (handle_tracepoint_bkpts): New.
10511 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10512 type. Add comment about fast tracepoints.
10513 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10514 non-existing action_str field.
10515 (get_context_regcache): Handle fast tracepoints.
10516 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10517 to the regcache.
10518 (fast_tracepoint_from_jump_pad_address): New.
10519 (fast_tracepoint_from_ipa_tpoint_address): New.
10520 (collecting_t): New.
10521 (force_unlock_trace_buffer): New.
10522 (fast_tracepoint_collecting): New.
10523 (collecting): New.
10524 (gdb_collect): New.
10525 (write_inferior_data_ptr): New.
10526 (target_tp_heap): New.
10527 (target_malloc): New.
10528 (download_agent_expr): New.
10529 (UALIGN): New.
10530 (download_tracepoints): New.
10531 (download_trace_state_variables): New.
10532 (upload_fast_traceframes): New.
10533 (IPA_FIRST_TRACEFRAME): New.
10534 (IPA_NEXT_TRACEFRAME_1): New.
10535 (IPA_NEXT_TRACEFRAME): New.
10536 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10537 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10538 (gdb_jump_pad_buffer_end): New.
10539 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10540 (initialize_tracepoint): Adjust.
10541 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10542 buffer. Initialize the low module.
10543 * utils.c (PREFIX, TOOLNAME): New.
10544 (malloc_failure): Use PREFIX.
10545 (error): In the IPA, an error causes an exit.
10546 (fatal, warning): Use PREFIX.
10547 (internal_error): Use TOOLNAME.
10548 (NUMCELLS): Increase to 10.
10549 * configure, config.in: Regenerate.
10550
10551 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10552
10553 * server.c (handle_query) <qSupported>: Do two passes over the
10554 qSupported string to avoid nesting strtok.
10555
10556 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10557
10558 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10559 (CDEPS): New.
10560 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10561 -Wl,--dynamic-list.
10562 * configure: Regenerate.
10563 * proc-service.list: New.
10564
10565 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10566
10567 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10568 New comment.
10569
10570 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10571
10572 * gdbreplay.c (remote_open): Check error return from socket() call by
10573 its equality to -1 not by it being negative.
10574 * remote-utils.c (remote_open): Likewise.
10575
10576 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10577
10578 * config.h: Regenerate.
10579
10580 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10581
10582 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10583 doesn't provide PTRACE_GET_THREAD_AREA.
10584
10585 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10586
10587 * linux-m68k-low.c: Include <asm/ptrace.h>
10588 (ps_get_thread_area): Implement.
10589
10590 2010-05-03 Doug Evans <dje@google.com>
10591
10592 * event-loop.c (struct callback_event): New struct.
10593 (callback_list): New global.
10594 (append_callback_event, delete_callback_event): New functions.
10595 (process_callback): New function.
10596 (start_event_loop): Call it.
10597 * remote-utils.c (NOT_SCHEDULED): Define.
10598 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10599 moved out of readchar.
10600 (readchar): Rewrite. Call reschedule before returning.
10601 (reset_readchar): New function.
10602 (remote_close): Call it.
10603 (process_remaining, reschedule): New functions.
10604 * server.h (callback_handler_func): New typedef.
10605 (append_callback_event, delete_callback_event): Declare.
10606
10607 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10608
10609 * proc-service.c (ps_pglobal_lookup): Use
10610 thread_db_look_up_one_symbol.
10611 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10612 parameter. Use it instead of all_symbols_looked_up.
10613 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10614 field.
10615 (all_symbols_looked_up): Don't declare.
10616 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10617 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10618 field.
10619 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10620 Set all_symbols_looked_up here.
10621 (thread_db_look_up_one_symbol): New.
10622 (thread_db_get_tls_address): Adjust.
10623 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10624 thread_db object on the heap, and tentatively set it in the
10625 process structure.
10626 (thread_db_init): Don't set all_symbols_looked_up here.
10627 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10628
10629 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10630
10631 * linux-low.c (linux_kill, linux_detach): Adjust.
10632 (status_pending_p_callback): Remove redundant statement. Check
10633 for !TARGET_WAITIKIND_IGNORE, instead of
10634 TARGET_WAITKIND_STOPPED.
10635 (handle_tracepoints): Make sure LWP is locked. Adjust.
10636 (linux_wait_for_event_1): Adjust.
10637 (linux_cancel_breakpoints): New.
10638 (unsuspend_one_lwp): New.
10639 (unsuspend_all_lwps): New.
10640 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10641 (send_sigstop_callback): Change return type to int, add new
10642 `except' parameter and handle it.
10643 (suspend_and_send_sigstop_callback): New.
10644 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10645 pass them down. If SUSPEND, also increment the lwp's suspend
10646 count.
10647 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10648 (need_step_over_p): Don't consider suspended LWPs.
10649 (start_step_over): Adjust.
10650 (proceed_one_lwp): Change return type to int, add new `except'
10651 parameter and handle it.
10652 (unsuspend_and_proceed_one_lwp): New.
10653 (proceed_all_lwps): Use find_inferior instead of
10654 for_each_inferior.
10655 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10656 also decrement the suspend count of LWPs. Pass `except' down,
10657 instead of hacking its suspend count.
10658 (linux_pause_all): Add `freeze' parameter. Adjust.
10659 (linux_unpause_all): New.
10660 (linux_target_ops): Install linux_unpause_all.
10661 * server.c (handle_status): Adjust.
10662 * target.h (struct target_ops): New fields `unpause_all' and
10663 `cancel_breakpoints'. Add new parameter to `pause_all'.
10664 (pause_all): Add new `freeze' parameter.
10665 (unpause_all): New.
10666 (cancel_breakpoints): New.
10667 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10668 cancel breakpoints.
10669 (cmd_qtstart): Pause threads.
10670 (stop_tracing): Pause threads, and cancel breakpoints.
10671 * win32-low.c (win32_target_ops): Adjust.
10672
10673 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10674
10675 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10676 the inferior right away from here...
10677 (linux_wait_1): ... to here, and adjust to check the thread's
10678 last_resume_kind instead of the lwp's step or stop_expected flags.
10679
10680 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10681
10682 * README: Use consistent `GDB' and `GDBserver' spellings.
10683
10684 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10685
10686 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10687 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10688 (linux_detach_one_lwp): Assume the lwp is stopped.
10689 (any_thread_of): Delete.
10690 (linux_detach): Stop all lwps here. Don't blindly delete all
10691 breakpoints.
10692 (delete_lwp_callback): New.
10693 (linux_mourn): Delete all lwps of the process that is gone.
10694 (linux_wait_1): Don't delete the last lwp of the process here.
10695 * mem-break.h (mark_breakpoints_out): Declare.
10696 * mem-break.c (mark_breakpoints_out): New.
10697 (free_all_breakpoints): Use it.
10698 * server.c (handle_target_event): If the process is gone, mark
10699 breakpoints out.
10700 * thread-db.c (struct thread_db) <create_bp>: New field.
10701 (thread_db_enable_reporting): Fix prototype. Store a thread event
10702 breakpoint reference in the thread_db struct.
10703 (thread_db_load_search): Clear the thread_db object.
10704 (try_thread_db_load_1): Ditto.
10705 (switch_to_process): New.
10706 (disable_thread_event_reporting): Use it.
10707 (remove_thread_event_breakpoints): New.
10708 (thread_db_detach, thread_db_mourn): Use it.
10709
10710 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10711
10712 * linux-low.c (linux_enable_event_reporting): New.
10713 (linux_wait_for_event_1, handle_extended_wait): Use it.
10714
10715 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10716
10717 * linux-low.c (linux_kill_one_lwp, linux_kill)
10718 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10719 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10720 SIGSTOP even if the LWP is stopped.
10721 (send_sigstop_callback): New.
10722 (stop_all_lwps): Use send_sigstop_callback instead.
10723 (linux_resume_one_thread): Adjust.
10724 (proceed_one_lwp): Still proceed an LWP that the client has
10725 requested to stop, if we haven't reported it as stopped yet. Make
10726 sure that LWPs the client want stopped, have a pending SIGSTOP.
10727
10728 2010-04-26 Doug Evans <dje@google.com>
10729
10730 * server.c (handle_general_set): Make static.
10731
10732 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10733 Print received char after testing for error/eof instead of before.
10734 (input_interrupt): Tweak comment.
10735
10736 2010-04-23 Doug Evans <dje@google.com>
10737
10738 * server.c (start_inferior): Print inferior argv if --debug.
10739
10740 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10741
10742 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10743 * nto-x86-low.c: Include server.h
10744
10745 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10746
10747 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10748 be consistent with other sources of this directory.
10749 (init_registers_amd64): Correct name of source file of this function
10750 in the comment.
10751
10752 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10753
10754 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10755 64-bit executables.
10756
10757 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10758
10759 * win32-i386-low.c: Add 64-bit support.
10760 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10761 (init_registers_amd64): Declare.
10762 (mappings): Add 64-bit version of array.
10763 (init_windows_x86): New function.
10764 (the_low_target): Change init_arch field to init_windows_x86.
10765
10766 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10767
10768 * win32-low.c: Adapt to support also 64-bit architecture.
10769 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10770 (get_image_name): Use SIZE_T type for local variable `done'.
10771 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10772 (toolhelp_get_dll_name): Idem.
10773 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10774 Use uintptr_t typecast to avoid warning.
10775 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10776 (handle_exception): Use phex_nz to avoid warning.
10777 (win32_wait): Remove unused local variable `process'.
10778
10779 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10780
10781 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10782 `amd64-avx.o'.
10783
10784 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10785
10786 * configure.ac: Use `ws2_32' library for srv_mingw.
10787 * configure: Regenerate.
10788 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10789 * remote-utils.c: Likewise.
10790
10791 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10792
10793 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10794 if __x86_64__ is defined.
10795
10796 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10797
10798 * configure: Regenerate.
10799
10800 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10801
10802 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10803 * target.h (target_ops): New get_tib_address field.
10804 * win32-low.h (win32_thread_info): Add thread_local_base field.
10805 * win32-low.c (child_add_thread): Add tlb argument.
10806 Set thread_local_base field to TLB.
10807 (get_child_debug_event): Adapt to child_add_thread change.
10808 (win32_get_tib_address): New function.
10809 (win32_target_ops): Set get_tib_address field to
10810 win32_get_tib_address.
10811 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10812
10813 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10814
10815 * linux-low.c (linux_mourn): Also remove the process.
10816 * server.c (handle_target_event): Don't remove the process here.
10817 * nto-low.c (nto_mourn): New.
10818 (nto_target_ops): Install it.
10819 * spu-low.c (spu_mourn): New.
10820 (spu_target_ops): Install it.
10821 * win32-low.c (win32_mourn): New.
10822 (win32_target_ops): Install it.
10823
10824 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10825
10826 * server.h (buffer_xml_printf): Remove redundant `;'.
10827
10828 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10829
10830 * regcache.c (set_register_cache): Invalidate regcaches before
10831 changing the register cache layout.
10832 (regcache_invalidate_one): Allow a NULL regcache.
10833 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10834 regcaches before changing the register cache layout or the target
10835 regsets.
10836
10837 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10838
10839 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10840 variable warning on Linux/x86-64.
10841
10842 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10843
10844 GDBserver disconnected tracing support.
10845
10846 * linux-low.c (linux_remove_process): Delete.
10847 (add_lwp): Don't set last_resume_kind here.
10848 (linux_kill): Use `mourn'.
10849 (linux_detach): Use `thread_db_detach', and `mourn'.
10850 (linux_mourn): New.
10851 (linux_attach_lwp_1): Adjust comment.
10852 (linux_attach): last_resume_kind moved the thread_info; adjust.
10853 (status_pending_p_callback): Adjust.
10854 (linux_wait_for_event_1): Adjust.
10855 (count_events_callback, select_singlestep_lwp_callback)
10856 (select_event_lwp_callback, cancel_breakpoints_callback)
10857 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10858 (proceed_one_lwp): Adjust.
10859 (linux_async): Add debug output.
10860 (linux_thread_stopped): New.
10861 (linux_pause_all): New.
10862 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10863 linux_pause_all.
10864 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10865 (thread_db_free): Delete declaration.
10866 (thread_db_detach, thread_db_mourn): Declare.
10867 * thread-db.c (thread_db_init): Use thread_db_mourn.
10868 (thread_db_free): Delete, split in two.
10869 (disable_thread_event_reporting): New.
10870 (thread_db_detach): New.
10871 (thread_db_mourn): New.
10872
10873 * server.h (struct thread_info) <last_resume_kind>: New field.
10874 <attached>: Add comment.
10875 <gdb_detached>: New field.
10876 (handler_func): Change return type to int.
10877 (handle_serial_event, handle_target_event): Ditto.
10878 (gdb_connected): Declare.
10879 (tracing): Delete.
10880 (disconnected_tracing): Declare.
10881 (stop_tracing): Declare.
10882
10883 * server.c (handle_query) <qSupported>: Report support for
10884 disconnected tracing.
10885 (queue_stop_reply_callback): Account for running threads.
10886 (gdb_wants_thread_stopped): New.
10887 (gdb_wants_all_threads_stopped): New.
10888 (gdb_reattached_process): New.
10889 (handle_status): Clear the `gdb_detached' flag of all processes.
10890 In all-stop, stop all threads.
10891 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10892 (process_serial_event): If the remote connection breaks, or if an
10893 exit was forced with "monitor exit", force an event loop exit.
10894 Handle disconnected tracing on detach.
10895 (handle_serial_event): Adjust.
10896 (handle_target_event): If GDB isn't connected, forward events back
10897 to the inferior, unless the last process exited, in which case,
10898 exit gdbserver. Adjust interface.
10899
10900 * remote-utils.c (remote_open): Don't block in accept. Instead
10901 register an event loop source on the listen socket file
10902 descriptor. Refactor bits into ...
10903 (listen_desc): ... this new global.
10904 (gdb_connected): ... this new function.
10905 (enable_async_notification): ... this new function.
10906 (handle_accept_event): ... this new function.
10907 (remote_close): Clear remote_desc.
10908
10909 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10910
10911 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10912 New fields.
10913 (mourn_inferior): Define.
10914 (target_process_qsupported): Avoid the dangling else problem.
10915 (thread_stopped): Define.
10916 (pause_all): Define.
10917 (target_waitstatus_to_string): Declare.
10918 * target.c (target_waitstatus_to_string): New.
10919
10920 * tracepoint.c (tracing): Make extern.
10921 (disconnected_tracing): New.
10922 (stop_tracing): Make extern. Handle tracing stops due to GDB
10923 disconnecting.
10924 (cmd_qtdisconnected): New.
10925 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10926 (handle_tracepoint_general_set): Handle QTDisconnected.
10927
10928 * event-loop.c (event_handler_func): Change return type to int.
10929 (process_event): Bail out if the event handler wants the event
10930 loop to stop.
10931 (handle_file_event): Ditto.
10932 (start_event_loop): Bail out if the event handler wants the event
10933 loop to stop.
10934
10935 * nto-low.c (nto_target_ops): Adjust.
10936 * spu-low.c (spu_wait): Don't remove the process here.
10937 (spu_target_ops): Adjust.
10938 * win32-low.c (win32_wait): Don't remove the process here.
10939 (win32_target_ops): Adjust.
10940
10941 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10942
10943 * regcache.c (realloc_register_cache): Invalidate inferior's
10944 regcache before recreating it.
10945
10946 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10947
10948 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10949
10950 2010-04-09 Stan Shebs <stan@codesourcery.com>
10951 Pedro Alves <pedro@codesourcery.com>
10952
10953 * server.h (LONGEST): New.
10954 (struct thread_info) <while_stepping>: New field.
10955 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10956 Declare.
10957 (initialize_tracepoint, handle_tracepoint_general_set)
10958 (handle_tracepoint_query, tracepoint_finished_step)
10959 (tracepoint_was_hit, release_while_stepping_state_list):
10960 (current_traceframe): Declare.
10961 * server.c (handle_general_set): Handle tracepoint packets.
10962 (read_memory): New.
10963 (write_memory): New.
10964 (handle_search_memory_1): Use read_memory.
10965 (handle_query): Report support for conditional tracepoints, trace
10966 state variables, and tracepoint sources. Handle tracepoint
10967 queries.
10968 (main): Initialize the tracepoints module.
10969 (process_serial_event): Handle traceframe reads/writes.
10970
10971 * linux-low.c (handle_tracepoints): New.
10972 (linux_wait_1): Call it.
10973 (linux_resume_one_lwp): Handle while-stepping.
10974 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10975 (linux_target_ops): Install them.
10976 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10977 New field.
10978 * linux-x86-low.c (x86_supports_tracepoints): New.
10979 (the_low_target). Install it.
10980
10981 * mem-break.h (delete_breakpoint): Declare.
10982 * mem-break.c (delete_breakpoint): Make external.
10983
10984 * target.h (struct target_ops): Add `supports_tracepoints',
10985 `read_pc', and `write_pc' fields.
10986 (target_supports_tracepoints): Define.
10987 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10988 (phex_nz): New.
10989
10990 * regcache.h (struct regcache) <registers_owned>: New field.
10991 (init_register_cache, regcache_cpy): Declare.
10992 (regcache_read_pc, regcache_write_pc): Declare.
10993 (register_cache_size): Declare.
10994 (supply_regblock): Declare.
10995 * regcache.c (init_register_cache): New.
10996 (new_register_cache): Use it.
10997 (regcache_cpy): New.
10998 (register_cache_size): New.
10999 (supply_regblock): New.
11000 (regcache_read_pc, regcache_write_pc): New.
11001
11002 * tracepoint.c: New.
11003
11004 * Makefile.in (OBS): Add tracepoint.o.
11005 (tracepoint.o): New rule.
11006
11007 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11008
11009 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11010 (i386-mmx.o): New.
11011 (i386-mmx.c): Likewise.
11012 (i386-mmx-linux.o): Likewise.
11013 (i386-mmx-linux.c): Likewise.
11014
11015 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11016 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11017 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11018 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11019
11020 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11021 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11022 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11023
11024 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11025
11026 * Makefile.in (clean): Updated.
11027 (i386-avx.o): New.
11028 (i386-avx.c): Likewise.
11029 (i386-avx-linux.o): Likewise.
11030 (i386-avx-linux.c): Likewise.
11031 (amd64-avx.o): Likewise.
11032 (amd64-avx.c): Likewise.
11033 (amd64-avx-linux.o): Likewise.
11034 (amd64-avx-linux.c): Likewise.
11035
11036 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11037 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11038 (srv_amd64_regobj): Add amd64-avx.o.
11039 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11040 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11041 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11042 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11043 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11044 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11045 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11046
11047 * i387-fp.c: Include "i386-xstate.h".
11048 (i387_xsave): New.
11049 (i387_cache_to_xsave): Likewise.
11050 (i387_xsave_to_cache): Likewise.
11051 (x86_xcr0): Likewise.
11052
11053 * i387-fp.h (i387_cache_to_xsave): Likewise.
11054 (i387_xsave_to_cache): Likewise.
11055 (x86_xcr0): Likewise.
11056
11057 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11058 * linux-crisv32-low.c (target_regsets): Likewise.
11059 * linux-m68k-low.c (target_regsets): Likewise.
11060 * linux-mips-low.c (target_regsets): Likewise.
11061 * linux-ppc-low.c (target_regsets): Likewise.
11062 * linux-s390-low.c (target_regsets): Likewise.
11063 * linux-sh-low.c (target_regsets): Likewise.
11064 * linux-sparc-low.c (target_regsets): Likewise.
11065 * linux-xtensa-low.c (target_regsets): Likewise.
11066
11067 * linux-low.c: Include <sys/uio.h>.
11068 (regsets_fetch_inferior_registers): Support nt_type.
11069 (regsets_store_inferior_registers): Likewise.
11070 (linux_process_qsupported): New.
11071 (linux_target_ops): Add linux_process_qsupported.
11072
11073 * linux-low.h (regset_info): Add nt_type.
11074 (linux_target_ops): Add process_qsupported.
11075
11076 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11077 and <sys/uio.h>.
11078 (init_registers_i386_avx_linux): New.
11079 (init_registers_amd64_avx_linux): Likewise.
11080 (xmltarget_i386_linux_no_xml): Likewise.
11081 (xmltarget_amd64_linux_no_xml): Likewise.
11082 (PTRACE_GETREGSET): Likewise.
11083 (PTRACE_SETREGSET): Likewise.
11084 (x86_fill_xstateregset): Likewise.
11085 (x86_store_xstateregset): Likewise.
11086 (use_xml): Likewise.
11087 (x86_linux_update_xmltarget): Likewise.
11088 (x86_linux_process_qsupported): Likewise.
11089 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11090 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11091 init_registers_i386_linux here. Call
11092 x86_linux_update_xmltarget.
11093 (the_low_target): Add x86_linux_process_qsupported.
11094
11095 * server.c (handle_query): Call target_process_qsupported.
11096
11097 * target.h (target_ops): Add process_qsupported.
11098 (target_process_qsupported): New.
11099
11100 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11101
11102 * inferiors.c (add_thread): Set last_status kind to
11103 TARGET_WAITKIND_IGNORE.
11104 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11105 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11106 (linux_wait_1): Move `thread' local definition to block that uses
11107 it. Don't NULL initialize `event_child'.
11108 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11109 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11110 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11111
11112 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11113
11114 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11115 an extended waitstatus, or by a watchpoint.
11116 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11117 thread was stepping or has been stopped by a watchpoint.
11118
11119 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11120
11121 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11122 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11123 of another, then delete the previous, and validate all
11124 breakpoints.
11125 (validate_inserted_breakpoint): New.
11126 (delete_disabled_breakpoints): New.
11127 (validate_breakpoints): New.
11128 (check_mem_read): Validate breakpoints before trusting their
11129 shadow. Delete disabled breakpoints.
11130 (check_mem_write): Validate breakpoints before trusting they
11131 should be inserted. Delete disabled breakpoints.
11132 * mem-break.h (validate_breakpoints):
11133 * server.c (handle_query): Validate breakpoints when we see a
11134 qSymbol query.
11135
11136 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11137
11138 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11139 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11140 if we could tell there's a GDB breakpoint at stop_pc.
11141 (need_step_over_p): Don't do a step over if we find a GDB
11142 breakpoint at the resume PC.
11143
11144 * mem-break.c (struct raw_breakpoint): New.
11145 (enum bkpt_type): New type `gdb_breakpoint'.
11146 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11147 fields. New field `raw'.
11148 (find_raw_breakpoint_at): New.
11149 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11150 breakpoint instead.
11151 (set_breakpoint_at): Adjust.
11152 (delete_raw_breakpoint): New.
11153 (release_breakpoint): New.
11154 (delete_breakpoint): Rename to...
11155 (delete_breakpoint_1): ... this. Add proc parameter. Use
11156 release_breakpoint. Return ENOENT.
11157 (delete_breakpoint): Reimplement.
11158 (find_breakpoint_at): Delete.
11159 (find_gdb_breakpoint_at): New.
11160 (delete_breakpoint_at): Delete.
11161 (set_gdb_breakpoint_at): New.
11162 (delete_gdb_breakpoint_at): New.
11163 (gdb_breakpoint_here): New.
11164 (set_reinsert_breakpoint): Use release_breakpoint.
11165 (uninsert_breakpoint): Rename to ...
11166 (uninsert_raw_breakpoint): ... this.
11167 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11168 (reinsert_raw_breakpoint): Change parameter type to
11169 raw_breakpoint.
11170 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11171 instead.
11172 (check_breakpoints): Adjust. Use release_breakpoint.
11173 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11174 (breakpoint_inserted_here): Ditto.
11175 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11176 Don't trust the breakpoint's shadow if it is not inserted.
11177 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11178 (delete_all_breakpoints): Adjust.
11179 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11180 use delete_breakpoint_1.
11181
11182 * mem-break.h (breakpoints_supported): Delete declaration.
11183 (set_gdb_breakpoint_at): Declare.
11184 (gdb_breakpoint_here): Declare.
11185 (delete_breakpoint_at): Delete.
11186 (delete_gdb_breakpoint_at): Declare.
11187
11188 * server.h (struct raw_breakpoint): Forward declare.
11189 (struct process_info): New field `raw_breakpoints'.
11190
11191 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11192 breakpoints.
11193
11194 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11195
11196 * linux-low.c (status_pending_p_callback): Fix comment.
11197 (linux_wait_for_event_1): Move most of the internal breakpoint
11198 handling from here...
11199 (linux_wait_1): ... to here.
11200 (count_events_callback): New.
11201 (select_singlestep_lwp_callback): New.
11202 (select_event_lwp_callback): New.
11203 (cancel_breakpoints_callback): New.
11204 (select_event_lwp): New.
11205 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11206 priority to all LWPs that have had events that should be reported
11207 to the client. Cancel breakpoints when about to reporting the
11208 event to the client, not while stopping lwps. No longer cancel
11209 finished single-steps here.
11210 (cancel_finished_single_step): Delete.
11211 (cancel_finished_single_steps): Delete.
11212
11213 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11214
11215 * mem-break.c (enum bkpt_type): New.
11216 (struct breakpoint): New field `type'.
11217 (set_breakpoint_at): Change return type to struct breakpoint
11218 pointer. Set type to `other_breakpoint' by default.
11219 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11220 in the breakpoint list.
11221 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11222 (reinsert_breakpoint): Rename to ...
11223 (reinsert_raw_breakpoint): ... this.
11224 (reinsert_breakpoints_at): Adjust.
11225 * mem-break.h (struct breakpoint): Declare.
11226 (set_breakpoint_at): Change return type to struct breakpoint
11227 pointer.
11228
11229 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11230
11231 * server.c (handle_query): Assign, not compare.
11232
11233 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11234
11235 Teach linux gdbserver to step-over-breakpoints.
11236
11237 * linux-low.c (can_hardware_single_step): New.
11238 (supports_breakpoints): New.
11239 (handle_extended_wait): If stopping threads, read the stop pc of
11240 the new cloned LWP.
11241 (get_pc): New.
11242 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11243 low target doesn't support retrieving the PC.
11244 (add_lwp): Set last_resume_kind to resume_continue.
11245 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11246 (linux_attach): Don't clear stop_expected. Set the lwp's
11247 last_resume_kind to resume_stop.
11248 (linux_detach_one_lwp): Don't check for removed breakpoints.
11249 (check_removed_breakpoint): Delete.
11250 (status_pending_p): Rename to ...
11251 (status_pending_p_callback): ... this. Don't check for removed
11252 breakpoints. Don't consider threads that are stopped from GDB's
11253 perspective.
11254 (linux_wait_for_lwp): Always read the stop_pc here.
11255 (cancel_breakpoint): New.
11256 (step_over_bkpt): New global.
11257 (linux_wait_for_event_1): Implement stepping over breakpoints.
11258 (gdb_wants_lwp_stopped): New.
11259 (gdb_wants_all_stopped): New.
11260 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11261 single-step traps here. Store the thread's last reported target
11262 wait status.
11263 (send_sigstop): Don't clear stop_expected. Always set it,
11264 instead.
11265 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11266 (cancel_finished_single_step): New.
11267 (cancel_finished_single_steps): New.
11268 (wait_for_sigstop): Don't cancel finished single-step traps here.
11269 (linux_resume_one_lwp): Don't check for removed breakpoints.
11270 Don't set `step' on non-hardware step archs.
11271 (linux_set_resume_request): Ignore resume_stop requests if already
11272 stopping or stopped. Set the lwp's last_resume_kind.
11273 (resume_status_pending_p): Don't check for removed breakpoints.
11274 (need_step_over_p): New.
11275 (start_step_over): New.
11276 (finish_step_over): New.
11277 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11278 requests. Clear the thread's last reported target waitstatus.
11279 Don't use the `suspended' flag. Don't consider pending breakpoints.
11280 (linux_resume): Start a step-over if necessary.
11281 (proceed_one_lwp): New.
11282 (proceed_all_lwps): New.
11283 (unstop_all_lwps): New.
11284 * linux-low.h (struct lwp_info): Rewrite comment for the
11285 `suspended' flag. Add the `stop_pc' field. Delete the
11286 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11287 Add `'last_resume_kind' and `need_step_over' fields.
11288 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11289 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11290 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11291 (set_raw_breakpoint_at): New.
11292 (set_breakpoint_at): Rewrite to use it.
11293 (reinsert_breakpoint_handler): Delete.
11294 (set_reinsert_breakpoint): New.
11295 (reinsert_breakpoint_by_bp): Delete.
11296 (delete_reinsert_breakpoints): New.
11297 (uninsert_breakpoint): Rewrite.
11298 (uninsert_breakpoints_at): New.
11299 (reinsert_breakpoint): Rewrite.
11300 (reinsert_breakpoints_at): New.
11301 (check_breakpoints): Rewrite.
11302 (breakpoint_here): New.
11303 (breakpoint_inserted_here): New.
11304 (check_mem_read): Adjust.
11305 * mem-break.h (breakpoints_supported, breakpoint_here)
11306 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11307 (reinsert_breakpoint_by_bp): Delete declaration.
11308 (delete_reinsert_breakpoints): Declare.
11309 (reinsert_breakpoint): Delete declaration.
11310 (reinsert_breakpoints_at): Declare.
11311 (uninsert_breakpoint): Delete declaration.
11312 (uninsert_breakpoints_at): Declare.
11313 (check_breakpoints): Adjust prototype.
11314 * server.h: Adjust include order.
11315 (struct thread_info): Declare here. Add a `last_status' field.
11316
11317 2010-03-23 Michael Snyder <msnyder@vmware.com>
11318
11319 * server.c (crc32): New function.
11320 (handle_query): Add handling for 'qCRC:' request.
11321
11322 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11323
11324 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11325 lwp had been stopped by a watchpoint.
11326
11327 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11328
11329 * server.h (internal_error): Declare.
11330 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11331 * utils.c (internal_error): New function.
11332
11333 2010-03-15 Andreas Schwab <schwab@redhat.com>
11334
11335 * configure.srv: Fix typo setting srv_regobj.
11336
11337 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11338
11339 * linux-low.c (fetch_register): Avoid passing a non string literal
11340 format to `error'.
11341 (usr_store_inferior_registers): Ditto.
11342
11343 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11344
11345 * linux-low.c (linux_write_memory): Bail out early if peeking
11346 memory failed.
11347
11348 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11349
11350 * linux-low.h (struct lwp_info): New fields
11351 `stopped_by_watchpoint' and `stopped_data_address'.
11352 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11353 here, and cache them in the lwp object.
11354 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11355 directly.
11356 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11357 field.
11358 (linux_stopped_by_watchpoint): Rewrite.
11359 (linux_stopped_data_address): Rewrite.
11360
11361 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11362
11363 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11364 switching the current inferior, not before.
11365
11366 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11367
11368 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11369 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11370 i386-linux.c and amd64-linux.c.
11371 (reg-i386.o): Removed.
11372 (reg-i386.c): Likewise.
11373 (reg-i386-linux.o): Likewise.
11374 (reg-i386-linux.c): Likewise.
11375 (reg-x86-64.o): Likewise.
11376 (reg-x86-64.c): Likewise.
11377 (reg-x86-64-linux.o): Likewise.
11378 (reg-x86-64-linux.c): Likewise.
11379 (i386.o): New.
11380 (i386.c): Likewise.
11381 (i386-linux.o): Likewise.
11382 (i386-linux.c): Likewise.
11383 (amd64.o): Likewise.
11384 (amd64.c): Likewise.
11385 (amd64-linux.o): Likewise.
11386 (amd64-linux.c): Likewise.
11387
11388 * configure.srv (srv_i386_regobj): New.
11389 (srv_i386_linux_regobj): Likewise.
11390 (srv_amd64_regobj): Likewise.
11391 (srv_amd64_linux_regobj): Likewise.
11392 (srv_i386_32bit_xmlfiles): Likewise.
11393 (srv_i386_64bit_xmlfiles): Likewise.
11394 (srv_i386_xmlfiles): Likewise.
11395 (srv_amd64_xmlfiles): Likewise.
11396 (srv_i386_linux_xmlfiles): Likewise.
11397 (srv_amd64_linux_xmlfiles): Likewise.
11398 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11399 srv_xmlfiles to $srv_i386_xmlfiles.
11400 (i[34567]86-*-mingw32ce*): Likewise.
11401 (i[34567]86-*-mingw*): Likewise.
11402 (i[34567]86-*-nto*): Likewise.
11403 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11404 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11405 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11406 (x86_64-*-linux*): Likewise.
11407
11408 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11409 (init_registers_amd64_linux): New.
11410 (x86_arch_setup): Replace init_registers_x86_64_linux with
11411 init_registers_amd64_linux.
11412
11413 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11414
11415 * configure.ac: Check for libdl. If it is not available link against
11416 static libthread_db.
11417 * configure: Regenerate.
11418
11419 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11420
11421 PR9605
11422
11423 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11424 handing a read watchpoint.
11425 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11426
11427 2010-02-12 Doug Evans <dje@google.com>
11428
11429 * linux-low.c (linux_supports_tracefork_flag): Document.
11430 (linux_look_up_symbols): Add comment.
11431
11432 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11433
11434 * regcache.c (supply_register): Clear regcache if buf is NULL.
11435
11436 2010-02-02 Nicolas Roche <roche@sourceware.org>
11437 Joel Brobecker <brobecker@adacore.com>
11438
11439 * inferiors.c (find_inferior): Add function documentation.
11440 (unloaded_dll): Handle the case where the unloaded dll has not
11441 been previously registered in the dll list.
11442
11443 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11444
11445 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11446 (thumb2_breakpoint): New.
11447 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11448
11449 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11450
11451 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11452 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11453 breakpoints.
11454
11455 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11456
11457 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11458
11459 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11460
11461 * linux-s390-low.c (s390_collect_ptrace_register)
11462 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11463
11464 2010-01-21 Doug Evans <dje@google.com>
11465
11466 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11467 (PTRACE_ARG4_TYPE): New macro.
11468 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11469 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11470 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11471 (usr_store_inferior_registers): Ditto.
11472 (linux_read_memory, linux_write_memory): Ditto.
11473 (linux_test_for_tracefork): Ditto.
11474
11475 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11476 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11477
11478 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11479
11480 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11481 target.
11482
11483 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11484
11485 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11486 prototype to take a regcache. Adjust.
11487
11488 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11489
11490 * regcache.h (struct thread_info): Forward declare.
11491 (struct regcache): New.
11492 (new_register_cache): Adjust prototype.
11493 (get_thread_regcache): Declare.
11494 (free_register_cache): Adjust prototype.
11495 (registers_to_string, registers_from_string): Ditto.
11496 (supply_register, supply_register_by_name, collect_register)
11497 (collect_register_as_string, collect_register_by_name): Ditto.
11498 * regcache.c (struct inferior_regcache_data): Delete.
11499 (get_regcache): Rename to ...
11500 (get_thread_regcache): ... this. Adjust. Switch inferior before
11501 fetching registers.
11502 (regcache_invalidate_one): Adjust.
11503 (regcache_invalidate): Fix prototype.
11504 (new_register_cache): Return the new register cache.
11505 (free_register_cache): Change prototype.
11506 (realloc_register_cache): Adjust.
11507 (registers_to_string): Change prototype to take a regcache. Adjust.
11508 (registers_from_string): Ditto.
11509 (register_data): Ditto.
11510 (supply_register): Ditto.
11511 (supply_register_by_name): Ditto.
11512 (collect_register): Ditto.
11513 (collect_register_as_string): Ditto.
11514 (collect_register_by_name): Ditto.
11515 * server.c (process_serial_event): Adjust.
11516 * linux-low.h (regset_fill_func, regset_store_func): Change
11517 prototype.
11518 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11519 Change prototype.
11520 * linux-low.c (get_stop_pc): Adjust.
11521 (check_removed_breakpoint): Adjust.
11522 (linux_wait_for_event): Adjust.
11523 (linux_resume_one_lwp): Adjust.
11524 (fetch_register): Add regcache parameter. Adjust.
11525 (usr_store_inferior_registers): Ditto.
11526 (regsets_fetch_inferior_registers): Ditto.
11527 (regsets_store_inferior_registers): Ditto.
11528 (linux_fetch_registers, linux_store_registers): Ditto.
11529 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11530 regcache. Adjust.
11531 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11532 Ditto.
11533 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11534 prototype to take a regcache.
11535 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11536 * remote-utils.c (convert_ascii_to_int, outreg)
11537 (prepare_resume_reply): Change prototype to take a regcache.
11538 Adjust.
11539 * target.h (struct target_ops) <fetch_registers, store_registers>:
11540 Change prototype to take a regcache.
11541 (fetch_inferior_registers, store_inferior_registers): Change
11542 prototype to take a regcache. Adjust.
11543 * proc-service.c (ps_lgetregs): Adjust.
11544 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11545 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11546 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11547 take a regcache. Adjust.
11548 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11549 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11550 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11551 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11552 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11553 (cris_cannot_fetch_register):
11554 (cris_breakpoint_at): Change prototype to take a regcache.
11555 Adjust.
11556 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11557 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11558 to take a regcache. Adjust.
11559 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11560 Adjust.
11561 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11562 take a regcache. Adjust.
11563 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11564 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11565 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11566 * linux-mips-low.c (mips_get_pc):
11567 (mips_set_pc): Change prototype to take a regcache. Adjust.
11568 (mips_reinsert_addr): Adjust.
11569 (mips_collect_register): Change prototype to take a regcache.
11570 Adjust.
11571 (mips_supply_register):
11572 (mips_collect_register_32bit, mips_supply_register_32bit)
11573 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11574 (mips_store_fpregset): Ditto.
11575 * linux-ppc-low.c (ppc_supply_ptrace_register)
11576 (ppc_supply_ptrace_register): Ditto.
11577 (parse_spufs_run): Adjust.
11578 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11579 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11580 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11581 take a regcache. Adjust.
11582 * linux-s390-low.c (s390_collect_ptrace_register)
11583 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11584 (s390_set_pc): Change prototype to take a regcache. Adjust.
11585 (s390_arch_setup): Adjust.
11586 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11587 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11588 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11589 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11590 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11591 regcache. Adjust.
11592 (sparc_breakpoint_at): Adjust.
11593 * linux-xtensa-low.c (xtensa_fill_gregset):
11594 (xtensa_store_gregset):
11595 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11596 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11597 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11598 prototype to take a regcache. Adjust.
11599 * win32-arm-low.c (arm_fetch_inferior_register)
11600 (arm_store_inferior_register): Change prototype to take a
11601 regcache. Adjust.
11602 * win32-i386-low.c (i386_fetch_inferior_register)
11603 (i386_store_inferior_register): Change prototype to take a
11604 regcache. Adjust.
11605 * win32-low.c (child_fetch_inferior_registers)
11606 (child_store_inferior_registers): Change prototype to take a
11607 regcache. Adjust.
11608 (win32_wait): Adjust.
11609 (win32_fetch_inferior_registers): Change prototype to take a
11610 regcache. Adjust.
11611 (win32_store_inferior_registers): Adjust.
11612 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11613 store_inferior_register>: Change prototype to take a regcache.
11614
11615 2010-01-20 Doug Evans <dje@google.com>
11616
11617 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11618 #ifdef.
11619 (linux_wait_for_event1, linux_init_signals): Ditto.
11620 (W_STOPCODE): Provide definition if missing.
11621
11622 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11623
11624 * linux-low.c (linux_core_of_thread): New.
11625 (compare_ints, show_process, list_threads): New.
11626 (linux_qxfer_osdata): Report threads and cores.
11627 (linux_target_op): Register linux_core_of_thread.
11628 * remote-utils.c (prepare_resume_reply): Report the core.
11629 (buffer_xml_printf): Support %d specifier.
11630 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11631 New.
11632 (handle_query): Handle qXfer:threads. Announce availability
11633 thereof.
11634 * target.h (struct target_ops): New field core_of_thread.
11635
11636 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11637
11638 * Makefile.in (clean): Remove new generated files.
11639 (reg-s390.o, reg-s390.c): Remove rules.
11640 (reg-s390x.o, reg-s390x.c): Likewise.
11641 (s390-linux32.o, s390-linux32.c): Add rules.
11642 (s390-linux64.o, s390-linux64.c): Likewise.
11643 (s390x-linux64.o, s390x-linux64.c): Likewise.
11644 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11645 * linux-s390-low.c: Include <elf.h>.
11646 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11647 (init_registers_s390): Remove prototype.
11648 (init_registers_s390x): Likewise.
11649 (init_registers_s390_linux32): Add prototype.
11650 (init_registers_s390_linux64): Likewise.
11651 (init_registers_s390x_linux64): Likewise.
11652 (s390_num_regs_3264): New define.
11653 (s390_regmap_3264): New global variable.
11654 (s390_cannot_fetch_register): Remove obsolete check.
11655 (s390_cannot_store_register): Likewise.
11656 (s390_collect_ptrace_register): Handle upper/lower register halves.
11657 (s390_supply_ptrace_register): Likewise.
11658 (s390_fill_gregset): Update to register number changes.
11659 (s390_get_hwcap): New routine.
11660 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11661 Install appropriate regmap and register set.
11662
11663 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11664
11665 * server.c (gdbserver_version): Update copyright year to 2010.
11666 * gdbreplay.c (gdbreplay_version): Likewise.
11667
11668 2009-12-28 Doug Evans <dje@google.com>
11669
11670 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11671 elf/external.h. Include <elf.h> instead but only if necessary.
11672
11673 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11674
11675 * linux-low.c (linux_remove_process): Remove `detaching'
11676 parameter. Don't release/detach from thread_db here.
11677 (linux_kill): Release/detach from thread_db here, ...
11678 (linux_detach): ... and here, before actually detaching.
11679 (linux_wait_1): ... and here, when a process exits.
11680 * thread-db.c (any_thread_of): New.
11681 (thread_db_free): Switch the current inferior to a thread of the
11682 passed in process.
11683
11684 2009-12-21 Doug Evans <dje@google.com>
11685
11686 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11687
11688 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11689 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11690 warning ifndef __NR_tkill. Move setting of errno there too.
11691 Delete unnecessary resetting of errno after syscall.
11692 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11693
11694 * configure.ac: Check for dladdr.
11695 * config.in: Regenerate.
11696 * configure: Regenerate.
11697 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11698 (try_thread_db_load): Update.
11699
11700 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11701
11702 2009-12-18 Doug Evans <dje@google.com>
11703
11704 * event-loop.c: Include unistd.h if it exists.
11705
11706 * linux-low.c (my_waitpid): Move definition away from being in
11707 between linux_tracefork_child/linux_test_for_tracefork.
11708
11709 * gdb_proc_service.h (psaddr_t): Fix type.
11710 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11711 signature to match glibc.
11712
11713 2009-12-16 Doug Evans <dje@google.com>
11714
11715 * linux-low.c (linux_read_memory): Fix argument to read.
11716
11717 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11718
11719 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11720 events, don't leave current_inferior pointing at null.
11721
11722 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11723
11724 * win32-low.c (LOG): Delete.
11725 (OUTMSG): Output to stderr.
11726 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11727 on compile time LOG macro.
11728 (win32_wait): Fix debug output.
11729
11730 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11731
11732 * win32-low.c (win32_add_one_solib): If the dll name is
11733 "ntdll.dll", prepend the system directory to the dll path.
11734
11735 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11736
11737 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11738
11739 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11740 Vladimir Prus <vladimir@codesourcery.com>
11741
11742 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11743 * configure.ac: Check for __mcoldfire__ and set
11744 gdb_cv_m68k_is_coldfire.
11745 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11746 reg-cf.o and reg-m68k.o.
11747 * configure: Regenerated.
11748
11749 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11750
11751 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11752 Pass it to thread_db_free.
11753 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11754 proper `detaching' argument to linux_remove_process.
11755 * linux-low.h (thread_db_free): Add `detaching' parameter.
11756 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11757 to thread_db_free.
11758 (thread_db_free): Add `detaching' parameter. Only
11759 call td_ta_clear_event if detaching from process.
11760
11761 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11762
11763 * thread-db.c (thread_db_free): Fix typo.
11764
11765 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11766
11767 PR gdb/10838
11768 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11769
11770 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11771
11772 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11773 with an i686 compiler.
11774 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11775 needed.
11776 * configure: Rebuilt.
11777
11778 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11779
11780 PR gdb/10783
11781
11782 * server.c (handle_search_memory_1): Correct read_addr initialization
11783 in loop for searching subsequent chunks.
11784
11785 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11786
11787 * configure.ac: New --with-libthread-db option.
11788 * thread-db.c: Allow direct dependence on libthread_db.
11789 (thread_db_free): Adjust.
11790 * config.in: Regenerate.
11791 * configure: Likewise.
11792
11793 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11794
11795 PR gdb/10757
11796 * thread-db.c (attach_thread): New function.
11797 (maybe_attach_thread): Return success/failure.
11798 (find_new_threads_callback): Adjust.
11799 (thread_db_find_new_threads): Loop until no new threads.
11800
11801 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11802
11803 * proc-service.c (ps_lgetregs): Formatting.
11804
11805 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11806
11807 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11808 * configure.ac: Adjust.
11809 * linux-low.h (struct process_info_private): Move members to struct
11810 thread_db.
11811 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11812 * linux-low.c (linux_remove_process): Adjust.
11813 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11814 * server.c (handle_query): Move code ...
11815 (handle_monitor_command): ... here. New function.
11816 * target.h (struct target_ops): New member.
11817 * thread-db.c (struct thread_db): New.
11818 (libthread_db_search_path): New variable.
11819 (thread_db_create_event, thread_db_enable_reporting)
11820 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11821 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11822 (try_thread_db_load_1, dladdr_to_soname): New functions.
11823 (try_thread_db_load, thread_db_load_search): New functions.
11824 (thread_db_init): Search for libthread_db.
11825 (thread_db_free): New function.
11826 (thread_db_handle_monitor_command): Likewise.
11827 * config.in: Regenerate.
11828 * configure: Regenerate.
11829
11830 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11831
11832 * spu-low.c (spu_kill): Wait for inferior to terminate.
11833 Call clear_inferiors.
11834 (spu_detach): Call clear_inferiors.
11835
11836 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11837
11838 * aclocal.m4: Regenerate.
11839 * config.in: Likewise.
11840 * configure: Likewise.
11841
11842 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11843
11844 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11845 (parse_spufs_run): New function.
11846 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11847 (ppc_breakpoint_at): Handle SPU breakpoints.
11848
11849 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11850
11851 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11852 (SPUFS_MAGIC): Define.
11853 (spu_enumerate_spu_ids): New function.
11854 (linux_qxfer_spu): New function.
11855 (linux_target_ops): Install linux_qxfer_spu.
11856
11857 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11858
11859 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11860 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11861 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11862 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11863 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11864 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11865 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11866 (init_registers_powerpc_cell32l): Add prototype.
11867 (init_registers_powerpc_cell64l): Likewise.
11868 (ppc_arch_setup): Detect Cell/B.E. architecture.
11869
11870 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11871
11872 * Makefile.in (datarootdir): New variable.
11873
11874 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11875
11876 * linux-low.c (linux_write_memory): Update debugging output.
11877 * Makefile.in (clean): Add new descriptions.
11878 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11879 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11880 * configure.srv: Add new files for arm*-*-linux*.
11881 * linux-arm-low.c: Add new declarations.
11882 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11883 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11884 (HWCAP_VFPv3D16): New.
11885 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11886 instead of __IWMMXT__.
11887 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11888 (arm_arch_setup): New.
11889 (target_regsets): Remove #ifdef. Add VFP regset.
11890 (the_low_target): Use arm_arch_setup.
11891
11892 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11893
11894 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11895 the main thread again.
11896
11897 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11898
11899 Adding Neutrino gdbserver.
11900 * configure: Regenerated.
11901 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11902 * configure.srv (i[34567]86-*-nto*): New target.
11903 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11904 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11905 (nto_comctrl) [__QNX__]: New function.
11906 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11907
11908 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11909
11910 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11911 srv_tgtobj.
11912
11913 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11914 Pedro Alves <pedro@codesourcery.com>
11915
11916 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11917 don't support CONTEXT_EXTENDED_REGISTERS.
11918 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11919 (the_low_target): Install them.
11920 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11921 failing with ERROR_PIPE_NOT_CONNECTED.
11922
11923 2009-06-30 Doug Evans <dje@google.com>
11924 Pierre Muller <muller@ics.u-strasbg.fr>
11925
11926 Add h/w watchpoint support to x86-linux, win32-i386.
11927 * Makefile.in (SFILES): Add i386-low.c
11928 (i386_low_h): Define.
11929 (i386-low.o): Add dependencies.
11930 (linux-x86-low.o): Add i386-low.h dependency.
11931 (win32-i386-low.o): Ditto.
11932 * i386-low.c: New file.
11933 * i386-low.h: New file.
11934 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11935 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11936 * linux-low.c (linux_add_process): Initialize arch_private.
11937 (linux_remove_process): Free arch_private.
11938 (add_lwp): Initialize arch_private.
11939 (delete_lwp): Free arch_private.
11940 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11941 provided.
11942 * linux-low.h (process_info_private): New member arch_private.
11943 (lwp_info): New member arch_private.
11944 (linux_target_ops): New members new_process, new_thread,
11945 prepare_to_resume.
11946 (ptid_of): New macro.
11947 * linux-x86-low.c: Include stddef.h, i386-low.h.
11948 (arch_process_info): New struct.
11949 (arch_lwp_info): New struct.
11950 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11951 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11952 (i386_dr_low_get_status): New function.
11953 (x86_insert_point, x86_remove_point): New functions.
11954 (x86_stopped_by_watchpoint): New function.
11955 (x86_stopped_data_address): New function.
11956 (x86_linux_new_process, x86_linux_new_thread): New functions.
11957 (x86_linux_prepare_to_resume): New function.
11958 (the_low_target): Add entries for insert_point, remove_point,
11959 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11960 prepare_to_resume.
11961 * server.c (debug_hw_points): New global.
11962 (monitor_show_help): Document set debug-hw-points.
11963 (handle_query): Process "set debug-hw-points".
11964 * server.h (debug_hw_points): Declare.
11965 (paddress): Declare.
11966 * utils.c (NUMCELLS, CELLSIZE): New macros.
11967 (get_sell, xsnprintf, paddress): New functions.
11968 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11969 remove_point, stopped_by_watchpoint, stopped_data_address.
11970 * win32-i386-low.c: Include i386-low.h.
11971 (debug_reg_state): Replaces dr.
11972 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11973 (i386_dr_low_get_status): New function.
11974 (i386_insert_point, i386_remove_point): New functions.
11975 (i386_stopped_by_watchpoint): New function.
11976 (i386_stopped_data_address): New function.
11977 (i386_initial_stuff): Update.
11978 (get_thread_context,set_thread_context,i386_thread_added): Update.
11979 (the_low_target): Add entries for insert_point,
11980 remove_point, stopped_by_watchpoint, stopped_data_address.
11981 * win32-low.c (win32_insert_watchpoint): New function.
11982 (win32_remove_watchpoint): New function.
11983 (win32_stopped_by_watchpoint): New function.
11984 (win32_stopped_data_address): New function.
11985 (win32_target_ops): Add entries for insert_watchpoint,
11986 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11987 * win32-low.h (win32_target_ops): New members insert_point,
11988 remove_point, stopped_by_watchpoint, stopped_data_address.
11989
11990 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11991
11992 * server.c (process_serial_event): Re-return unsupported, not
11993 error, if the type isn't recognized. Re-allow supporting only
11994 insert or remove packets. Also call require_running for
11995 breakpoints. Add missing break statement to default case. Tidy.
11996 * target.h (struct target_ops): Rename insert_watchpoint to
11997 insert_point, and remove_watchpoint to remove_point.
11998
11999 * linux-low.h (struct linux_target_ops): Likewise.
12000 * linux-low.c (linux_insert_watchpoint): Rename to ...
12001 (linux_insert_point): ... this. Adjust.
12002 (linux_remove_watchpoint): Rename to ...
12003 (linux_remove_point): ... this. Adjust.
12004 (linux_target_ops): Adjust.
12005 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12006 (cris_insert_point): ... this.
12007 (cris_remove_watchpoint): Rename to ...
12008 (cris_remove_point): ... this.
12009 (the_low_target): Adjust.
12010
12011 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12012
12013 * server.c (handle_v_kill): Pass signal_pid to
12014 kill_inferior if multi_process is zero.
12015
12016 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12017
12018 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12019 * target.h (target_ops): Comment for *_watchpoint to make it clear
12020 the functions can get types '0' and '1'.
12021
12022 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12023
12024 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12025 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12026 * regcache.c (get_regcache): Likewise.
12027 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12028 * win32-low.c (child_fetch_inferior_registers): Remove check for
12029 regno 0.
12030
12031 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12032 Pedro Alves <pedro@codesourcery.com>
12033
12034 * target.h (struct target_ops) <supports_multi_process>: New
12035 callback.
12036 (target_supports_multi_process): New.
12037 * server.c (handle_query): Even if GDB reports support, only
12038 enable multi-process if the target also supports it. Report
12039 multi-process support only if the target backend supports it.
12040 * linux-low.c (linux_supports_multi_process): New function.
12041 (linux_target_ops): Install it as target_supports_multi_process
12042 callback.
12043
12044 2009-05-24 Doug Evans <dje@google.com>
12045
12046 Global renaming of find_thread_pid to find_thread_ptid.
12047 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12048 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12049 All callers updated.
12050
12051 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12052 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12053 directly.
12054
12055 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12056 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12057 (linux_resume_one_lwp): Ditto.
12058
12059 2009-05-23 Doug Evans <dje@google.com>
12060
12061 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12062 from struct inferior_list_entry * to struct lwp_info *.
12063 All callers updated.
12064
12065 2009-05-13 Doug Evans <dje@google.com>
12066
12067 * linux-x86-low.c: Don't include assert.h.
12068 (x86_siginfo_fixup): Use fatal, not assert.
12069 (x86_arch_setup): Fix comment.
12070
12071 2009-05-12 Doug Evans <dje@google.com>
12072
12073 Biarch support for i386/amd64 gdbserver.
12074 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12075 Add linux-x86-low.c.
12076 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12077 (linux-x86-low.o): Add.
12078 * linux-x86-64-low.c: Delete.
12079 * linux-i386-low.c: Delete.
12080 * linux-x86-low.c: New file.
12081 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12082 linux-x86-low.o.
12083 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12084 linux-x86-low.o.
12085 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12086 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12087 (linux_child_pid_to_exec_file): New function.
12088 (elf_64_header_p, elf_64_file_p): New functions.
12089 (siginfo_fixup): New function.
12090 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12091 give target a chance to convert layout.
12092 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12093 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12094
12095 2009-05-07 Doug Evans <dje@google.com>
12096
12097 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12098 (regsets_store_inferior_registers): Ditto.
12099
12100 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12101
12102 PR server/10048
12103
12104 * linux-low.c (must_set_ptrace_flags): Delete.
12105 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12106 of the global.
12107 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12108 `lwp->must_set_ptrace_flags' instead.
12109 (linux_wait_for_event_1): Set ptrace options here.
12110 (linux_wait_1): ... not here.
12111
12112 2009-04-30 Doug Evans <dje@google.com>
12113
12114 * inferiors.c (started_inferior_callback): New function.
12115 (attached_inferior_callback): New function.
12116 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12117 * server.c (print_started_pid, print_attached_pid): New functions.
12118 (detach_or_kill_for_exit): New function.
12119 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12120 * server.h (have_started_inferiors_p): Declare.
12121 (have_attached_inferiors_p): Declare.
12122
12123 * inferiors.c (remove_process): Fix memory leak, free process.
12124 * linux-low.c (linux_remove_process): New function.
12125 (linux_kill): Call it instead of remove_process.
12126 (linux_detach, linux_wait_1): Ditto.
12127
12128 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12129
12130 * configure.srv: Add x86 Windows CE target.
12131
12132 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12133
12134 * inferiors.c (get_thread_process): Make global.
12135 * server.h (get_thread_process): Add prototype.
12136 * thread-db.c (find_one_thread): Use get_thread_process
12137 instead of current_process.
12138 (thread_db_get_tls_address): Do not crash if called when
12139 thread layer is not yet initialized.
12140
12141 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12142
12143 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12144 * spu-low.c (current_tid): Rename to ...
12145 (current_ptid): ... this.
12146 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12147 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12148 ptid_get_lwp (current_ptid) instead of current_tid.
12149 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12150 instead of current_tid. Use find_process_pid to verify pid
12151 argument is valid. Pass proper argument to remove_process.
12152 (spu_thread_alive): Compare current_ptid instead of current_tid.
12153 (spu_resume): Likewise.
12154
12155 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12156
12157 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12158 variable.
12159
12160 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12161
12162 Implement the multiprocess extensions, and add linux multiprocess
12163 support.
12164
12165 * server.h (ULONGEST): Declare.
12166 (struct ptid, ptid_t): New.
12167 (minus_one_ptid, null_ptid): Declare.
12168 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12169 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12170 (struct inferior_list_entry): Change `id' type from unsigned from
12171 to ptid_t.
12172 (struct sym_cache, struct breakpoint, struct
12173 process_info_private): Forward declare.
12174 (struct process_info): Declare.
12175 (current_process): Declare.
12176 (all_processes): Declare.
12177 (initialize_inferiors): Declare.
12178 (add_thread): Adjust to use ptid_t.
12179 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12180 (add_process, remove_process, find_thread_pid): Declare.
12181 (find_inferior_id): Adjust to use ptid_t.
12182 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12183 (multi_process): Declare.
12184 (push_event): Adjust to use ptid_t.
12185 (read_ptid, write_ptid): Declare.
12186 (prepare_resume_reply): Adjust to use ptid_t.
12187 (clear_symbol_cache): Declare.
12188 * inferiors.c (all_processes): New.
12189 (null_ptid, minus_one_ptid): New.
12190 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12191 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12192 (add_thread): Change unsigned long to ptid. Remove gdb_id
12193 parameter. Adjust.
12194 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12195 (gdb_id_to_thread): Rename to ...
12196 (find_thread_pid): ... this. Change unsigned long to ptid.
12197 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12198 (loaded_dll, pull_pid_from_list): Adjust.
12199 (add_process, remove_process, find_process_pid)
12200 (get_thread_process, current_process, initialize_inferiors): New.
12201 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12202 (struct target_waitstatus) <related_pid>: Ditto.
12203 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12204 return type to int.
12205 (struct target_ops) <join>: Add `pid' argument.
12206 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12207 (struct target_ops) <wait>: Add `ptid' field. Change return type
12208 to ptid.
12209 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12210 (mywait): Add `ptid' argument. Change return type to ptid_t.
12211 (target_pid_to_str): Declare.
12212 * target.c (set_desired_inferior): Adjust to use ptids.
12213 (mywait): Add new `ptid' argument. Adjust.
12214 (target_pid_to_str): New.
12215 * mem-break.h (free_all_breakpoints): Declare.
12216 * mem-break.c (breakpoints): Delelete.
12217 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12218 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12219 to use per-process breakpoint list.
12220 (free_all_breakpoints): New.
12221 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12222 (symbol_cache, all_symbols_looked_up): Delete.
12223 (hexchars): New.
12224 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12225 read_ptid): New.
12226 (prepare_resume_reply): Change ptid argument's type from unsigned
12227 long to ptid_t. Adjust. Implement W;process and X;process.
12228 (free_sym_cache, clear_symbol_cache): New.
12229 (look_up_one_symbol): Adjust to per-process symbol cache. *
12230 * server.c (cont_thread, general_thread, step_thread): Change type
12231 to ptid_t.
12232 (attached): Delete.
12233 (multi_process): New.
12234 (last_ptid): Change type to ptid_t.
12235 (struct vstop_notif) <ptid>: Change type to ptid_t.
12236 (queue_stop_reply, push_event): Change `ptid' argument's type to
12237 ptid_t.
12238 (discard_queued_stop_replies): Add `pid' argument.
12239 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12240 changes. Don't reference the `attached' global.
12241 (attach_inferior): Adjust to mywait interface changes.
12242 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12243 features. Handle and report "multiprocess+". Handle
12244 "qAttached:PID".
12245 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12246 changes.
12247 (handle_v_kill): New.
12248 (handle_v_stopped): Adjust to use target_pid_to_str.
12249 (handle_v_requests): Allow multiple attaches and runs when
12250 multiprocess extensions are in effect. Handle "vKill".
12251 (myresume): Adjust to use ptids.
12252 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12253 (handle_status): Adjust to discard_queued_stop_replies interface
12254 change.
12255 (first_thread_of, kill_inferior_callback)
12256 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12257 (main): Call initialize_inferiors. Adjust to use ptids, killing
12258 and detaching from all inferiors. Handle multiprocess packet
12259 variants.
12260 * linux-low.h: Include gdb_proc_service.h.
12261 (struct process_info_private): New.
12262 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12263 <lwpid_of>: Use ptid_get_lwp.
12264 (get_lwp_thread): Adjust.
12265 (struct lwp_info): Add `dead' member.
12266 (find_lwp_pid): Declare.
12267 * linux-low.c (thread_db_active): Delete.
12268 (new_inferior): Adjust comment.
12269 (inferior_pid): Delete.
12270 (linux_add_process): New.
12271 (handle_extended_wait): Adjust.
12272 (add_lwp): Change unsigned long to ptid.
12273 (linux_create_inferior): Add process to processes table. Adjust
12274 to use ptids. Don't set new_inferior here.
12275 (linux_attach_lwp): Rename to ...
12276 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12277 it. Adjust to use ptids.
12278 (linux_attach_lwp): New.
12279 (linux_attach): Add process to processes table. Don't set
12280 new_inferior here.
12281 (struct counter): New.
12282 (second_thread_of_pid_p, last_thread_of_process_p): New.
12283 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12284 multiple processes.
12285 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12286 processes. Remove process from process table.
12287 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12288 to multiple processes.
12289 (any_thread_of): New.
12290 (linux_detach): Add `pid' argument, and handle it. Remove process
12291 from processes table.
12292 (linux_join): Add `pid' argument. Handle it.
12293 (linux_thread_alive): Change unsighed long argument to ptid_t.
12294 Consider dead lwps as not being alive.
12295 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12296 threads we're not interested in.
12297 (same_lwp, find_lwp_pid): New.
12298 (linux_wait_for_lwp): Change `pid' argument's type from int to
12299 ptid_t. Adjust.
12300 (linux_wait_for_event): Rename to ...
12301 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12302 from int to ptid_t. Adjust.
12303 (linux_wait_for_event): New.
12304 (linux_wait_1): Add `ptid' argument. Change return type to
12305 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12306 that exit from the process table.
12307 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12308 Adjust.
12309 (mark_lwp_dead): New.
12310 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12311 stopping all threads, mark its main lwp as dead.
12312 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12313 ptids.
12314 (fetch_register, usr_store_inferior_registers)
12315 (regsets_fetch_inferior_registers)
12316 (regsets_store_inferior_registers, linux_read_memory)
12317 (linux_write_memory): Inline `inferior_pid'.
12318 (linux_look_up_symbols): Adjust to use per-process
12319 `thread_db_active'.
12320 (linux_request_interrupt): Adjust to use ptids.
12321 (linux_read_auxv): Inline `inferior_pid'.
12322 (initialize_low): Don't reference thread_db_active.
12323 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12324 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12325 (ps_getpid): Return the pid of the current inferior.
12326 * thread-db.c (proc_handle, thread_agent): Delete.
12327 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12328 per-process data.
12329 (find_one_thread): Change argument type to ptid_t. Adjust to
12330 per-process data.
12331 (maybe_attach_thread): Adjust to per-process data and ptids.
12332 (thread_db_find_new_threads): Ditto.
12333 (thread_db_init): Ditto.
12334 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12335 processes table. Adjust to use ptids.
12336 (spu_kill, spu_detach): Adjust interface. Remove process from
12337 processes table.
12338 (spu_join, spu_thread_alive): Adjust interface.
12339 (spu_wait): Adjust interface. Remove process from processes
12340 table. Adjust to use ptids.
12341 * win32-low.c (current_inferior_tid): Delete.
12342 (current_inferior_ptid): New.
12343 (debug_event_ptid): New.
12344 (thread_rec): Take a ptid. Adjust.
12345 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12346 (child_delete_thread): Ditto.
12347 (do_initial_child_stuff): Add `attached' argument. Add process to
12348 processes table.
12349 (child_fetch_inferior_registers, child_store_inferior_registers):
12350 Adjust.
12351 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12352 (win32_attach): Pass 1 to do_initial_child_stuff.
12353 (win32_kill): Adjust interface. Remove process from processes
12354 table.
12355 (win32_detach): Ditto.
12356 (win32_join): Adjust interface.
12357 (win32_thread_alive): Take a ptid.
12358 (win32_resume): Adjust to use ptids.
12359 (get_child_debug_event): Ditto.
12360 (win32_wait): Adjust interface. Remove exiting process from
12361 processes table.
12362
12363 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12364
12365 Non-stop mode support.
12366
12367 * server.h (non_stop): Declare.
12368 (gdb_client_data, handler_func): Declare.
12369 (delete_file_handler, add_file_handler, start_event_loop):
12370 Declare.
12371 (handle_serial_event, handle_target_event, push_event)
12372 (putpkt_notif): Declare.
12373 * target.h (enum resume_kind): New.
12374 (struct thread_resume): Replace `step' field by `kind' field.
12375 (TARGET_WNOHANG): Define.
12376 (struct target_ops) <wait>: Add `options' argument.
12377 <supports_non_stop, async, start_non_stop>: New fields.
12378 (target_supports_non_stop, target_async): New.
12379 (start_non_stop): Declare.
12380 (mywait): Add `options' argument.
12381 * target.c (mywait): Add `options' argument. Print child exit
12382 notifications here.
12383 (start_non_stop): New.
12384 * server.c (non_stop, own_buf, mem_buf): New globals.
12385 (struct vstop_notif): New.
12386 (notif_queue): New global.
12387 (queue_stop_reply, push_event, discard_queued_stop_replies)
12388 (send_next_stop_reply): New.
12389 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12390 interface changes.
12391 (attach_inferior): In non-stop mode, don't wait for the target
12392 here.
12393 (handle_general_set): Handle QNonStop.
12394 (handle_query): When handling qC, return the current general
12395 thread, instead of the first thread of the list.
12396 (handle_query): If the backend supports non-stop mode, include
12397 QNonStop+ in the qSupported query response.
12398 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12399 and non-stop mode.
12400 (handle_v_attach, handle_v_run): Handle non-stop mode.
12401 (handle_v_stopped): New.
12402 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12403 (myresume): Adjust to use resume_kind. Handle non-stop.
12404 (queue_stop_reply_callback): New.
12405 (handle_status): Handle non-stop mode.
12406 (main): Clear non_stop flag on reconnection. Use the event-loop.
12407 Refactor serial protocol handling from here ...
12408 (process_serial_event): ... to this new function. When GDB
12409 selects any thread, select one here. In non-stop mode, wait until
12410 GDB acks all pending events before exiting.
12411 (handle_serial_event, handle_target_event): New.
12412 * remote-utils.c (remote_open): Install remote_desc in the event
12413 loop.
12414 (remote_close): Remove remote_desc from the event loop.
12415 (putpkt_binary): Rename to...
12416 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12417 (putpkt_binary): New as wrapper around putpkt_binary_1.
12418 (putpkt_notif): New.
12419 (prepare_resume_reply): In non-stop mode, don't change the
12420 general_thread.
12421 * event-loop.c: New.
12422 * Makefile.in (OBJ): Add event-loop.o.
12423 (event-loop.o): New rule.
12424
12425 * linux-low.h (pid_of): Moved here.
12426 (lwpid_of): New.
12427 (get_lwp_thread): Use lwpid_of.
12428 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12429 * linux-low.c (pid_of): Delete.
12430 (inferior_pid): Use lwpid_of.
12431 (linux_event_pipe): New.
12432 (target_is_async_p): New.
12433 (delete_lwp): New.
12434 (handle_extended_wait): Use lwpid_of.
12435 (add_lwp): Don't set lwpid field.
12436 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12437 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12438 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12439 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12440 first. Adjust to linux_wait_for_event interface changes. Use
12441 lwpid_of.
12442 (linux_detach): Don't delete the main lwp here.
12443 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12444 (status_pending_p): Don't consider explicitly suspended lwps.
12445 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12446 pointer. Add OPTIONS argument. Change return type to int. Use
12447 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12448 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12449 pointer. Add status pointer argument. Return a pid instead of a
12450 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12451 changes. In non-stop mode, don't switch to a random thread.
12452 (linux_wait): Rename to...
12453 (linux_wait_1): ... this. Add target_options argument, and handle
12454 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12455 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12456 clean exit and signal exit code. Don't stop all threads in
12457 non-stop mode. In all-stop mode, only stop all threads when
12458 reporting a stop to GDB. Handle explicit thread stop requests.
12459 (async_file_flush, async_file_mark): New.
12460 (linux_wait): New.
12461 (send_sigstop): Use lwpid_of.
12462 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12463 interface changes. In non-stop mode, don't switch to a random
12464 thread.
12465 (linux_resume_one_lwp): Use lwpid_of.
12466 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12467 (linux_resume_one_thread): ... this. Handle resume_stop. In
12468 non-stop mode, don't look for pending flag in all threads.
12469 (resume_status_pending_p): Don't consider explicitly suspended
12470 threads.
12471 (my_waitpid): Reimplement. Emulate __WALL.
12472 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12473 Use lwpid_of.
12474 (sigchld_handler, linux_supports_non_stop, linux_async)
12475 (linux_start_non_stop): New.
12476 (linux_target_ops): Register linux_supports_non_stop, linux_async
12477 and linux_start_non_stop.
12478 (initialize_low): Install SIGCHLD handler.
12479 * thread-db.c (thread_db_create_event, find_one_thread)
12480 (thread_db_get_tls_address): Use lwpid_of.
12481 * win32-low.c (win32_detach): Adjust to use resume_kind.
12482 (win32_wait): Add `options' argument.
12483 * spu-low.c (spu_resume): Adjust to use resume_kind.
12484 (spu_wait): Add `options' argument.
12485
12486 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12487
12488 Decouple target code from remote protocol.
12489
12490 * target.h (enum target_waitkind): New.
12491 (struct target_waitstatus): New.
12492 (struct target_ops) <wait>: Return an unsigned long. Take a
12493 target_waitstatus pointer instead of a char pointer.
12494 (mywait): Likewise.
12495 * target.c (mywait): Change prototype to return an unsigned long.
12496 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12497 * server.h (thread_from_wait, old_thread_from_wait): Delete
12498 declarations.
12499 (prepare_resume_reply): Change prototype to take a
12500 target_waitstatus.
12501 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12502 (last_status, last_ptid): New.
12503 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12504 pid instead of a signal.
12505 (attach_inferior): Remove "status" and "signal" parameters.
12506 Adjust.
12507 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12508 not as an address.
12509 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12510 (handle_v_requests, myresume): Remove "status" and "signal"
12511 parameters. Adjust.
12512 (handle_status): New.
12513 (main): Delete local `status'. Adjust.
12514 * remote-utils.c: Include target.h.
12515 (prepare_resume_reply): Change prototype to take a
12516 target_waitstatus. Adjust.
12517
12518 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12519 interface.
12520 * spu-low.c (spu_wait): Adjust.
12521 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12522 Delete.
12523 (win32_wait): Adjust.
12524
12525 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12526
12527 * target.h (struct thread_resume): Delete leave_stopped member.
12528 (struct target_ops): Add a `n' argument to the `resume' callback.
12529 * server.c (start_inferior): Adjust.
12530 (handle_v_cont, myresume): Adjust.
12531 * linux-low.c (check_removed_breakpoint): Adjust to resume
12532 interface change, and to removed leave_stopped field.
12533 (resume_ptr): Delete.
12534 (struct thread_resume_array): New.
12535 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12536 resume interface change.
12537 (linux_continue_one_thread, linux_queue_one_thread)
12538 (resume_status_pending_p): Check if the resume field is NULL
12539 instead of checking the leave_stopped member.
12540 (linux_resume): Adjust to the target resume interface change.
12541 * spu-low.c (spu_resume): Adjust to the target resume interface
12542 change.
12543 * win32-low.c (win32_detach, win32_resume): Ditto.
12544
12545 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12546
12547 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12548 flag.
12549 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12550 pending.
12551 (linux_continue_one_thread): Only preserve the stepping flag if
12552 there's a pending breakpoint.
12553
12554 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12555
12556 * server.c (main): After the inferior having exited, call
12557 remote_close before exiting gdbserver.
12558
12559 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12560
12561 Fix size of FPSCR in Power 7 processors.
12562 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12563 (PPC_FEATURE_HAS_DFP): New #define.
12564 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12565 size of the FPSCR.
12566
12567 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12568
12569 * server.c (handle_query) Whitespace and formatting.
12570
12571 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12572
12573 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12574 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12575 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12576 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12577 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12578 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12579 Makefile.in, configure.ac: Fix whitespace throughout.
12580 * configure: Regenerate.
12581
12582 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12583
12584 * inferiors.c (find_inferior): Make it safe for the callback
12585 function to delete the currently iterated inferior.
12586
12587 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12588
12589 * Makefile.in (linuw_low_h): Move higher.
12590 (thread-db.o): Depend on $(linux_low_h).
12591
12592 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12593
12594 Rename "process" to "lwp" throughout.
12595
12596 * linux-low.c (all_processes): Rename to...
12597 (all_lwps): ... this.
12598 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12599 (add_process): Rename to ...
12600 (add_lwp): ... this. Adjust.
12601 (linux_create_inferior): Adjust.
12602 (linux_attach_lwp): Adjust.
12603 (linux_attach): Adjust.
12604 (linux_kill_one_process): Rename to ...
12605 (linux_kill_one_lwp): ... this. Adjust.
12606 (linux_kill): Adjust.
12607 (linux_detach_one_process): Rename to ...
12608 (linux_detach_one_lwp): ... this. Adjust.
12609 (linux_detach): Adjust.
12610 (check_removed_breakpoint): Adjust.
12611 (status_pending_p): Adjust.
12612 (linux_wait_for_process): Rename to ...
12613 (linux_wait_for_lwp): ... this. Adjust.
12614 (linux_wait_for_event): Adjust.
12615 (send_sigstop): Adjust.
12616 (wait_for_sigstop): Adjust.
12617 (stop_all_processes): Rename to ...
12618 (stop_all_lwps): ... this.
12619 (linux_resume_one_process): Rename to ...
12620 (linux_resume_one_lwp): ... this. Adjust.
12621 (linux_set_resume_request, linux_continue_one_thread)
12622 (linux_queue_one_thread, resume_status_pending_p)
12623 (usr_store_inferior_registers, regsets_store_inferior_registers)
12624 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12625 Adjust.
12626 * linux-low.h (get_process): Rename to ...
12627 (get_lwp): ... this. Adjust.
12628 (get_thread_process): Rename to ...
12629 (get_thread_lwp): ... this. Adjust.
12630 (get_process_thread): Rename to ...
12631 (get_lwp_thread): ... this. Adjust.
12632 (struct process_info): Rename to ...
12633 (struct lwp_info): ... this.
12634 (all_processes): Rename to ...
12635 (all_lwps): ... this.
12636 * proc-service.c (ps_lgetregs): Adjust.
12637 * thread-db.c (thread_db_create_event, find_one_thread)
12638 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12639
12640 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12641
12642 * server.c (handle_query): Handle "qAttached".
12643
12644 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12645
12646 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12647 GPLv3, update license URL.
12648
12649 2009-03-01 Doug Evans <dje@google.com>
12650
12651 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12652 (server_h): Add gdb_signals.h.
12653 (signals.o): Update.
12654 * server.h (target_signal_from_host,target_signal_to_host_p)
12655 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12656
12657 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12658
12659 * remote-utils.c (getpkt): Also generate remote-debug
12660 information if noack_mode is set.
12661
12662 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12663
12664 * server.c (handle_query): Report qXfer:siginfo:read and
12665 qXfer:siginfo:write as supported and handle them.
12666 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12667 * linux-low.c (linux_xfer_siginfo): New.
12668 (linux_target_ops): Set it.
12669
12670 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12671
12672 * server.c (gdbserver_usage): Mention --remote-debug.
12673 (main): Accept '--remote-debug' switch.
12674
12675 2009-01-18 Doug Evans <dje@google.com>
12676
12677 * regcache.c (new_register_cache): No need to check result of xcalloc.
12678 * server.c (handle_search_memory): Back out calls to xmalloc,
12679 result is checked and error is returned to user upon failure.
12680 (handle_query): Ditto. Add more checks for result of malloc.
12681 (handle_v_cont): Check result of malloc, report error back to
12682 user upon failure.
12683 (handle_v_run): Ditto. Call freeargv.
12684 * server.h (freeargv): Declare.
12685 * utils.c (freeargv): New fn.
12686
12687 2009-01-15 Doug Evans <dje@google.com>
12688
12689 * gdbreplay.c (perror_with_name): Make arg const char *.
12690 * server.h (target_signal_to_name): Make return type const char *.
12691 * thread-db.c (thread_db_err_str): Make return type const char *.
12692 * utils.c (perror_with_name): Make arg const char *.
12693
12694 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12695
12696 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12697 when handling a EXIT_PROCESS_DEBUG_EVENT.
12698
12699 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12700
12701 * gdbreplay.c (gdbreplay_version): Update copyright year.
12702 * server.c (gdbserver_version): Likewise.
12703
12704 2009-01-05 Doug Evans <dje@google.com>
12705
12706 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12707 (handle_extended_wait): Improve comment.
12708
12709 2008-12-13 Doug Evans <dje@google.com>
12710
12711 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12712 * server.h (ATTR_MALLOC): New macro.
12713 (xmalloc,xcalloc,xstrdup): Declare.
12714 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12715 * inferiors.c: Ditto.
12716 * linux-low.c: Ditto.
12717 * mem-break.c: Ditto.
12718 * regcache.c: Ditto.
12719 * remote-utils.c: Ditto.
12720 * server.c: Ditto.
12721 * target.c: Ditto.
12722 * win32-low.c: Ditto.
12723
12724 2008-12-12 Doug Evans <dje@google.com>
12725
12726 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12727 in debugging printf.
12728
12729 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12730
12731 2008-12-09 Doug Evans <dje@google.com>
12732
12733 * linux-low.h (struct process_info): Delete member tid, unused.
12734 * thread-db.c (find_one_thread): Update.
12735 (maybe_attach_thread): Update.
12736
12737 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12738
12739 * target.h (struct target_ops): Add qxfer_osdata member.
12740 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12741 and dirent.h.
12742 (linux_qxfer_osdata): New functions.
12743 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12744 callback.
12745 * server.c (handle_query): Handle "qXfer:osdata:read:".
12746 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12747 (buffer_xml_printf): New functions.
12748 * server.h (struct buffer): New.
12749 (buffer_grow_str, buffer_grow_str0): New macros.
12750 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12751 (buffer_xml_printf): Declare.
12752
12753 2008-11-24 Doug Evans <dje@google.com>
12754
12755 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12756
12757 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12758
12759 * server.c (handle_v_run): Always use the supplied argument list.
12760
12761 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12762
12763 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12764 (xtensa_regmap_table): Add entry for scompare1.
12765
12766 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12767
12768 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12769 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12770 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12771 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12772 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12773 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12774 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12775 XML target descriptions.
12776 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12777 when inferior is running on an ISA 2.05 or later processor. Add
12778 special case to return offset for full 64-bit slot of FPSCR when
12779 in 32-bits.
12780
12781 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12782
12783 * Makefile.in (SFILES, clean): Added sparc64 files.
12784 (reg-sparc64.o, reg-sparc64.c): New.
12785 * configure.srv (sparc*-*-linux*): New configuration.
12786 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12787 syscall arguments for SPARC.
12788 (regsets_store_inferior_registers): Likewise.
12789 * linux-sparc-low.c: New file.
12790
12791 2008-10-21 Doug Evans <dje@google.com>
12792
12793 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12794 (READLINE_DIR,READLINE_DEP): Delete.
12795 (INTERNAL_CFLAGS): Update.
12796 (LINTFLAGS): Update.
12797
12798 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12799
12800 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12801 whole argv from the last run, not just argv[0].
12802
12803 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12804
12805 * regcache.c (new_register_cache): Return NULL if the register
12806 cache size isn't known yet.
12807 (free_register_cache): Avoid dereferencing a NULL regcache.
12808
12809 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12810
12811 * configure.srv: Merge MIPS and MIPS64.
12812
12813 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12814
12815 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12816
12817 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12818
12819 * Makefile.in: Add required vsx dependencies.
12820
12821 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12822 Declare init_registers_powerpc_vsx32l.
12823 Declare init_registers_powerpc_vsx64l.
12824 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12825 (ppc_arch_setup): Check for VSX in hwcap.
12826 (ppc_fill_vsxregset): New function.
12827 (ppc_store_vsxregset): New function.
12828 Add new VSX entry in regset_info target_regsets.
12829
12830 * configure.srv: Add new VSX dependencies.
12831
12832 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12833
12834 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12835 (remote_open): Set or clear transport_is_reliable.
12836 (putpkt_binary): Don't expect acks in noack mode.
12837 (getpkt): Don't send ack/nac in noack mode.
12838 * server.c (handle_general_set): Handle QStartNoAckMode.
12839 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12840 qSupported.
12841 (main): Reset noack_mode on every connection.
12842 * server.h (noack_mode): Declare.
12843
12844 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12845
12846 * Makefile.in (GDBREPLAY_OBS): New variable.
12847 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12848
12849 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12850 Daniel Jacobowitz <dan@codesourcery.com>
12851
12852 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12853 (usr_store_inferior_registers): Likewise.
12854 (regsets_store_inferior_registers): Likewise.
12855
12856 2008-07-31 Rolf Jansen <rj@surtec.com>
12857 Pedro Alves <pedro@codesourcery.com>
12858
12859 * configure.ac: Check for memmem declaration.
12860 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12861 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12862 (disable_packet_qfThreadInfo): Unconditionally compile.
12863 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12864 * configure, config.in: Regenerate.
12865
12866 2008-07-28 Doug Kwan <dougkwan@google.com>
12867
12868 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12869 (linux_write_memory): Remove declaration of errno.
12870
12871 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12872
12873 * linux-low.c (handle_extended_wait): Do not use "status"
12874 variable uninitialized.
12875
12876 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12877
12878 * server.c (handle_v_attach): Inhibit reporting dll changes.
12879
12880 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12881
12882 * remote-utils.c (prepare_resume_reply): If requested, don't
12883 output "thread:TID" in the T stop reply.
12884
12885 * server.c (disable_packet_vCont, disable_packet_Tthread)
12886 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12887 (handle_query): If requested, disable support for qC, qfThreadInfo
12888 and qsThreadInfo.
12889 (handle_v_requests): If requested, disable support for vCont.
12890 (gdbserver_show_disableable): New.
12891 (main): Handle --disable-packet and --disable-packet=LIST.
12892
12893 * server.h (disable_packet_vCont, disable_packet_Tthread)
12894 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12895
12896 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12897
12898 * server.c (gdbserver_usage): Mention --version.
12899
12900 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12901
12902 * Makefile.in (gdbreplay.o): New rule.
12903
12904 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12905
12906 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12907 message, not gdbserver.
12908
12909 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12910 Nathan Sidwell <nathan@codesourcery.com>
12911 Joseph Myers <joseph@codesourcery.com>
12912
12913 * acinclude.m4: Include ../../config/acx.m4.
12914 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12915 * configure, config.in: Regenerate.
12916 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12917 * server.c (gdbserver_version): Print PKGVERSION.
12918 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12919 (main): Adjust gdbserver_usage calls.
12920 * gdbreplay.c (version, host_name): Add declarations.
12921 (gdbreplay_version, gdbreplay_usage): New.
12922 (main): Accept --version and --help options.
12923
12924 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12925
12926 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12927 (arm_breakpoint_at): Handle Thumb.
12928 (the_low_target): Add comment.
12929
12930 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12931
12932 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12933
12934 2008-05-09 Doug Evans <dje@google.com>
12935
12936 * server.h (decode_search_memory_packet): Declare.
12937 * remote-utils.c (decode_search_memory_packet): New fn.
12938 * server.c (handle_search_memory_1): New fn.
12939 (handle_search_memory): New fn.
12940 (handle_query): Process qSearch:memory packets.
12941
12942 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12943
12944 * regcache.c (registers_length): Remove.
12945 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12946 full register packet.
12947 * regcache.h (registers_length): Remove prototype.
12948 * server.h (PBUFSIZ): Define to 16384.
12949
12950 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12951
12952 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12953 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12954 powerpc-64l.o, and powerpc-altivec64l.o.
12955 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12956 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12957 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12958 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12959 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12960 to srv_xmlfiles.
12961
12962 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12963 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12964 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12965 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12966 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12967 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12968 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12969 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12970 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12971 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12972 (clean): Update.
12973
12974 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12975 (init_registers_powerpc_32l): ... this new prototype.
12976 (init_registers_powerpc_32): Remove, replace by ...
12977 (init_registers_powerpc_altivec32l): ... this new prototype.
12978 (init_registers_powerpc_e500): Remove, replace by ...
12979 (init_registers_powerpc_e500l): ... this new prototype.
12980 (init_registers_ppc64): Remove, replace by ...
12981 (init_registers_powerpc_64l): ... this new prototype.
12982 (init_registers_powerpc_64): Remove, replace by ...
12983 (init_registers_powerpc_altivec64l): ... this new prototype.
12984 (ppc_num_regs): Set to 73.
12985 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12986 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12987 (ppc_cannot_store_register): Handle orig_r3 and trap.
12988 (ppc_arch_setup): Update init_registers_... calls.
12989 (ppc_fill_gregset): Handle orig_r3 and trap.
12990
12991 * inferiors.c (clear_inferiors): Reset current_inferior.
12992
12993 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12994
12995 * acinclude.m4: Add override.m4.
12996 * configure: Regenerate.
12997
12998 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12999
13000 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13001 initial call to init_register_ppc64.
13002
13003 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13004
13005 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13006 single powerpc*-*-linux* case.
13007 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13008
13009 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13010
13011 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13012 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13013 from reg_xmlfiles.
13014 * linux-ppc-low.c: Include <elf.h>.
13015 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13016 (ppc_hwcap): New global variable.
13017 (ppc_regmap): Remove __SPE__ #ifdef sections.
13018 (ppc_regmap_e500): New global variable.
13019 (ppc_cannot_store_register): Update __SPE__ special case.
13020 (ppc_get_hwcap): New function.
13021 (ppc_arch_setup): Use it to determine whether inferior supports
13022 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13023 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13024 Do not access registers if target does not support AltiVec.
13025 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13026 Do not access registers if target does not support SPE.
13027 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13028
13029 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13030
13031 * linux-low.c (disabled_regsets, num_regsets): New.
13032 (use_regsets_p): Delete.
13033 (linux_wait_for_process): Clear disabled_regsets.
13034 (regsets_fetch_inferior_registers): Check and set it.
13035 (regsets_store_inferior_registers): Likewise.
13036 (linux_fetch_registers, linux_store_registers): Do not use
13037 use_regsets_p.
13038 (initialize_low): Allocate disabled_regsets.
13039
13040 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13041
13042 * Makefile.in (LIBOBJS): New.
13043 (OBS): Use LIBOBJS.
13044 (memmem.o): New rule.
13045 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13046 * configure: Regenerated.
13047
13048 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13049
13050 * server.c (handle_query): Never return "unsupported" for
13051 qXfer:features:read queries.
13052
13053 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13054
13055 * server.c (get_features_xml): Fix inverted condition.
13056 (handle_query): Always support qXfer:feature:read.
13057
13058 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13059
13060 * server.c (wrapper_argv): New.
13061 (start_inferior): Handle wrapper_argv. If set, expect an extra
13062 trap.
13063 (gdbserver_usage): Document --wrapper.
13064 (main): Parse --wrapper.
13065
13066 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13067
13068 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13069 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13070 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13071 (ppc_set_pc): Likewise.
13072 (ppc_arch_setup): New function.
13073 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13074 of collect_register.
13075 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13076
13077 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13078
13079 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13080 instead of linux-ppc64-low.o.
13081 * linux-ppc64-low.c: Remove file.
13082 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13083 (linux-ppc64-low.o): Remove rule.
13084
13085 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13086 (init_registers_powerpc_64): Likewise.
13087 (ppc_regmap): Conditionally define depending on __powerpc64__.
13088 (ppc_cannot_store_register): Do not special-case "fpscr" when
13089 compiled on __powerpc64__.
13090 (ppc_collect_ptrace_register): New function.
13091 (ppc_supply_ptrace_register): New function.
13092 (ppc_breakpoint): Change type to "unsigned int".
13093 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13094 (the_low_target): Conditionally provide initializers for the
13095 arch_setup member depending on __powerpc64__. Install
13096 collect_ptrace_register and supply_ptrace_register members.
13097
13098 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13099
13100 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13101 * server.c (gdbserver_xmltarget): Define.
13102 (get_features_xml): Use it to replace "target.xml" and arch_string.
13103
13104 * configure.srv: Remove srv_xmltarget. Add XML files that were
13105 mentioned there to srv_xmlfiles instead. Remove conditional tests
13106 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13107 srv_xmlfiles and srv_regobj to include all possible choices.
13108 * configure.ac (srv_xmltarget): Remove.
13109 (srv_xmlfiles): Do not add "target.xml".
13110 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13111 checks for supplementary target information.
13112 * configure: Regenerate.
13113 * Makefile.in (XML_TARGET): Remove.
13114 (target.xml): Remove rule.
13115 (clean): Do not clean up target.xml.
13116 (.PRECIOUS): Do not mention target.xml.
13117
13118 * target.h (struct target_ops): Remove arch_string member.
13119 * linux-low.c (linux_arch_string): Remove.
13120 (linux_target_ops): Remove arch_string initializer.
13121 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13122 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13123 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13124 * spu-low.c (spu_arch_string): Remove.
13125 (spu_target_ops): Remove arch_string initializer.
13126 * win32-low.c (win32_arch_string): Remove.
13127 (win32_target_ops): Remove arch_string initializer.
13128 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13129 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13130 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13131
13132 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13133
13134 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13135 by collect_ptrace_register and supply_ptrace_register hooks.
13136 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13137 instead of checking for the_low_target.left_pad_xfer.
13138 (usr_store_inferior_registers): Use collect_ptrace_register callback
13139 instead of checking for the_low_target.left_pad_xfer.
13140
13141 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13142 (s390_supply_ptrace_register): Likewise.
13143 (s390_fill_gregset): Call s390_collect_ptrace_register.
13144 (the_low_target): Update.
13145
13146 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13147 (ppc_supply_ptrace_register): Likewise.
13148 (the_low_target): Update.
13149
13150 * linux-i386-low.c (the_low_target): Update.
13151 * linux-x86-64-low.c (the_low_target): Update.
13152
13153 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13154
13155 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13156 reg-s390.o and reg-s390x.o.
13157
13158 * linux-low.c (new_inferior): New global variable.
13159 (linux_create_inferior, linux_attach): Set it.
13160 (linux_wait_for_process): Call the_low_target.arch_setup after the
13161 target has stopped for the first time.
13162 (initialize_low): Do not call the_low_target.arch_setup.
13163
13164 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13165 (s390_set_pc): Likewise.
13166 (s390_arch_setup): New function.
13167 (the_low_target): Use s390_arch_setup as arch_setup routine.
13168
13169 * regcache.c (realloc_register_cache): New function.
13170 (set_register_cache): Call it for each existing regcache.
13171
13172 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13173
13174 * server.h (init_registers): Remove prototype.
13175
13176 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13177 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13178 instead of init_registers ().
13179 * linux-arm-low.c (init_registers_arm): Add prototype.
13180 (init_registers_arm_with_iwmmxt): Likewise.
13181 (the_low_target): Add initializer for arch_setup field.
13182 * linux-cris-low.c (init_registers_cris): Add prototype.
13183 (the_low_target): Add initializer for arch_setup field.
13184 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13185 (the_low_target): Add initializer for arch_setup field.
13186 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13187 (the_low_target): Add initializer for arch_setup field.
13188 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13189 (the_low_target): Add initializer for arch_setup field.
13190 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13191 (the_low_target): Add initializer for arch_setup field.
13192 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13193 (the_low_target): Add initializer for arch_setup field.
13194 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13195 (init_registers_mips64_linux): Likewise.
13196 (the_low_target): Add initializer for arch_setup field.
13197 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13198 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13199 (the_low_target): Add initializer for arch_setup field.
13200 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13201 (init_registers_powerpc_64): Likewise.
13202 (the_low_target): Add initializer for arch_setup field.
13203 * linux-s390-low.c (init_registers_s390): Add prototype.
13204 (init_registers_s390x): Likewise.
13205 (the_low_target): Add initializer for arch_setup field.
13206 * linux-sh-low.c (init_registers_sh): Add prototype.
13207 (the_low_target): Add initializer for arch_setup field.
13208 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13209 (the_low_target): Add initializer for arch_setup field.
13210 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13211 (the_low_target): Add initializer for arch_setup field.
13212
13213 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13214 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13215 instead of init_registers ().
13216 * win32-arm-low.c (init_registers_arm): Add prototype.
13217 (the_low_target): Add initializer for arch_setup field.
13218 * win32-i386-low.c (init_registers_i386): Add prototype.
13219 (the_low_target): Add initializer for arch_setup field.
13220
13221 * spu-low.c (init_registers_spu): Add prototype.
13222 (initialize_low): Call initialie_registers_spu () instead of
13223 initialize_registers ().
13224
13225 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13226
13227 * server.c (handle_v_requests): When handling the vRun and vAttach
13228 packets, if already debugging a process, don't kill it. Return an
13229 error instead.
13230
13231 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13232
13233 * server.c (handle_query): Correct length check.
13234
13235 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13236
13237 * win32-low.c (do_initial_child_stuff): Add process handle
13238 parameter. Set current_process_handle and current_process_id from the
13239 parameters. Clear globals.
13240 (win32_create_inferior): Don't set current_process_handle and
13241 current_process_id here. Instead pass them on the call to
13242 do_initial_child_stuff.
13243 (win32_attach): Likewise.
13244 (win32_clear_inferiors): New.
13245 (win32_kill): Don't close the current process handle or the
13246 current thread handle here. Instead call win32_clear_inferiors.
13247 (win32_detach): Don't open a new handle to the process. Call
13248 win32_clear_inferiors.
13249 (win32_join): Don't rely on current_process_handle; open a new
13250 handle using the process id.
13251 (win32_wait): Call win32_clear_inferiors when the inferior process
13252 has exited.
13253
13254 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13255
13256 * server.c (monitor_show_help): Add "exit".
13257
13258 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13259
13260 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13261 (clean): Add reg-xtensa.c.
13262 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13263 * configure.srv (xtensa*-*-linux*) New target.
13264 * linux-xtensa-low.c: New.
13265 * xtensa-xtregs.c: New.
13266
13267 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13268
13269 * hostio.c: Don't include errno.h.
13270 (errno_to_fileio_errno): Move to hostio-errno.
13271 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13272 error number outputting to the target->hostio_last_error callback.
13273 (hostio_packet_error): Use FILEIO_EINVAL directly.
13274 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13275 calls to hostio_error.
13276 * hostio-errno.c: New.
13277 * server.h (hostio_last_error_from_errno): Declare.
13278 * target.h (target_ops): Add hostio_last_error member.
13279 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13280 as hostio_last_error handler.
13281 * spu-low.c (spu_target_ops): Likewise.
13282 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13283 (wince_hostio_last_error): New functions.
13284 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13285 as hostio_last_error handler.
13286 (win32_target_ops) [!_WIN32_WCE]: Register
13287 hostio_last_error_from_errno as hostio_last_error handler.
13288 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13289 (hostio-errno.o): New rule.
13290 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13291 * configure.srv (srv_hostio_err_objs): New variable. Default to
13292 hostio-errno.o.
13293 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13294 * configure: Regenerate.
13295
13296 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13297
13298 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13299 (linux_kill, linux_detach): Clean up the process list.
13300 * remote-utils.c (remote_open): Improve port number parsing.
13301 (putpkt_binary, input_interrupt): Only send interrupts if the target
13302 is running.
13303 * server.c (extended_protocol): Make static.
13304 (attached): Define earlier.
13305 (exit_requested, response_needed, program_argv): New variables.
13306 (target_running): New.
13307 (start_inferior): Clear attached here.
13308 (attach_inferior): Set attached here.
13309 (require_running): Define.
13310 (handle_query): Use require_running and target_running. Implement
13311 "monitor exit".
13312 (handle_v_attach, handle_v_run): New.
13313 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13314 (gdbserver_usage): Update.
13315 (main): Redo argument parsing. Handle --debug and --multi. Handle
13316 --attach along with other options or after the port. Save
13317 program_argv. Support no initial program. Resynchronize
13318 communication with GDB after an error. Handle "monitor exit".
13319 Use require_running and target_running. Always allow the extended
13320 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13321 restart in extended mode.
13322 * README: Refer to the GDB manual. Update --attach usage.
13323
13324 2007-12-20 Andreas Schwab <schwab@suse.de>
13325
13326 * linux-low.c (STACK_SIZE): Define.
13327 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13328 (linux_test_for_tracefork): Likewise.
13329
13330 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13331
13332 * linux-low.c (linux_wait_for_event): Update messages. Do not
13333 reinsert auto-delete breakpoints.
13334 * mem-break.c (struct breakpoint): Change return type of handler to
13335 int.
13336 (set_breakpoint_at): Update handler type.
13337 (reinsert_breakpoint_handler): Return 1 instead of calling
13338 delete_breakpoint.
13339 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13340 setting a new one.
13341 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13342 * mem-break.h (set_breakpoint_at): Update handler type.
13343 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13344 * win32-low.c (auto_delete_breakpoint): New.
13345 (get_child_debug_event): Use it.
13346
13347 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13348
13349 * configure.ac: Check for pread and pwrite.
13350 * hostio.c (handle_pread): Fall back to lseek and read.
13351 (handle_pwrite): Fall back to lseek and write.
13352 * config.in, configure: Regenerated.
13353
13354 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13355
13356 * server.c (myresume): Add own_buf argument.
13357 (main): Update calls.
13358
13359 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13360
13361 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13362 * remote-utils.c (remote_open): Do not call disable_async_io.
13363 (block_async_io): Delete.
13364 (unblock_async_io): Make static.
13365 (initialize_async_io): New.
13366 * server.c (handle_v_cont): Handle async I/O here.
13367 (myresume): Likewise. Move other common resume tasks here...
13368 (main): ... from here. Call initialize_async_io. Disable async
13369 I/O before the main loop.
13370 * server.h (initialize_async_io): Declare.
13371 (block_async_io, unblock_async_io): Delete prototypes.
13372 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13373
13374 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13375
13376 * remote-utils.c (readchar): Allow binary data in received messages.
13377
13378 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13379
13380 * win32-low.c (attaching): New global.
13381 (win32_create_inferior): Clear the `attaching' global.
13382 (win32_attach): Set the `attaching' global.
13383 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13384 attaching. Only set a breakpoint at the entry point if not
13385 attaching.
13386
13387 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13388
13389 * server.c (main): Don't report dll events on the initial
13390 connection on attaches.
13391
13392 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13393
13394 * server.c (main): Relax numerical bases supported for the pid of
13395 the --attach command line argument.
13396
13397 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13398
13399 * win32-low.c (win32_attach): Call OpenProcess before
13400 DebugActiveProcess, not after. Add last error output to error
13401 call.
13402
13403 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13404
13405 * win32-low.c (win32_get_thread_context)
13406 (win32_set_thread_context): New functions.
13407 (thread_rec): Use win32_get_thread_context.
13408 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13409 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13410 field.
13411
13412 2007-12-03 Leo Zayas
13413 Pedro Alves <pedro_alves@portugalmail.pt>
13414
13415 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13416 global variables.
13417 (child_add_thread): Minor cleanup.
13418 (child_continue): Resume artificially suspended threads before
13419 calling ContinueDebugEvent.
13420 (suspend_one_thread): New.
13421 (fake_breakpoint_event): New.
13422 (get_child_debug_event): Change return type to int. Check here if
13423 gdb sent an interrupt request. If a soft interrupt was requested,
13424 fake a breakpoint event. Return 0 if there is no event to handle,
13425 and 1 otherwise.
13426 (win32_wait): Don't check here if gdb sent an interrupt request.
13427 Ensure there is a valid event to handle.
13428 (win32_request_interrupt): Add soft interruption method as last
13429 resort.
13430
13431 2007-12-03 Leo Zayas
13432 Pedro Alves <pedro_alves@portugalmail.pt>
13433
13434 * win32-low.h (win32_thread_info): Add descriptions to the
13435 structure members. Replace `suspend_count' counter by a
13436 `suspended' flag.
13437 * win32-low.c (thread_rec): Update condition of when to get the
13438 context from the inferior. Rely on ContextFlags being set if it
13439 has already been retrieved. Only suspend the inferior thread if
13440 we haven't already. Warn if that fails.
13441 (continue_one_thread): s/suspend_count/suspended/. Only call
13442 ResumeThread once. Warn if that fails.
13443
13444 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13445
13446 * win32-low.c (win32_wait): Don't read from the inferior when it
13447 has already exited.
13448
13449 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13450
13451 * Makefile.in (win32_low_h): New variable.
13452 (win32-low.o): Add dependency on $(win32_low_h).
13453 (win32-arm-low.o, win32-i386-low.o): New rules.
13454
13455 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13456
13457 * hostio.c: Correct copyright year.
13458
13459 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13460
13461 * Makefile.in (OBS): Add hostio.o.
13462 (hostio.o): New rule.
13463 * server.h (handle_vFile): Declare.
13464 * hostio.c: New file.
13465 * server.c (handle_v_requests): Take packet_len and new_packet_len
13466 for binary packets. Call handle_vFile.
13467 (main): Update call to handle_v_requests.
13468
13469 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13470
13471 * linux-low.c: Include <sched.h>.
13472
13473 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13474
13475 * linux-low.c (linux_tracefork_grandchild): New.
13476 (linux_tracefork_child): Use clone.
13477 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13478
13479 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13480
13481 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13482
13483 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13484
13485 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13486
13487 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13488
13489 * inferiors.c (change_inferior_id): Delete.
13490 (add_pid_to_list, pull_pid_from_list): New.
13491 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13492 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13493 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13494 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13495 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13496 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13497 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13498 (using_threads): Always set to 1.
13499 (handle_extended_wait): New.
13500 (add_process): Do not set TID.
13501 (linux_create_inferior): Set must_set_ptrace_flags.
13502 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13503 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13504 (linux_thread_alive): Rename TID argument to LWPID.
13505 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13506 (linux_wait_for_event): Do not use TID or check using_threads. Update
13507 call to dead_thread_notify. Call handle_extended_wait.
13508 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13509 (send_sigstop): Delete sigstop_sent.
13510 (wait_for_sigstop): Avoid TID.
13511 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13512 (linux_test_for_tracefork): New.
13513 (linux_lookup_signals): Use thread_db_active and
13514 linux_supports_tracefork_flag.
13515 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13516 * linux-low.h (get_process_thread): Avoid TID.
13517 (struct process_ifo): Move thread_known and tid to the end. Remove
13518 sigstop_sent.
13519 (linux_attach_lwp, thread_db_init): Update prototypes.
13520 * server.h (change_inferior_id): Delete prototype.
13521 (add_pid_to_list, pull_pid_from_list): New prototypes.
13522 * thread-db.c (thread_db_use_events): New.
13523 (find_first_thread): Rename to...
13524 (find_one_thread): ...this. Update callers and messages. Do not
13525 call fatal. Check thread_db_use_events. Do not call
13526 change_inferior_id or new_thread_notify.
13527 (maybe_attach_thread): Update. Do not call new_thread_notify.
13528 (thread_db_init): Set thread_db_use_events. Check use_events.
13529 * utils.c (fatal, warning): Correct message prefix.
13530
13531 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13532
13533 * Makefile.in (clean): Remove new files.
13534 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13535 (powerpc-64.o, powerpc-64.c): New rules.
13536 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13537 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13538 with SPE.
13539 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13540 SPE targets.
13541 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13542 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13543 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13544 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13545 (target_regsets): Add AltiVec and SPE register sets.
13546 * configure.ac: Check for AltiVec and SPE.
13547 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13548 (ppc_fill_vrregset, ppc_store_vrregset): New.
13549 (target_regsets): Add AltiVec register set.
13550 * configure: Regenerated.
13551
13552 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13553
13554 * linux-low.c (O_LARGEFILE): Define.
13555 (linux_read_memory): Use /proc/PID/mem.
13556 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13557 * configure, config.in: Regenerated.
13558
13559 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13560
13561 * linux-low.c (linux_wait_for_event): Do not pass signals while
13562 single-stepping.
13563
13564 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13565
13566 * win32-low.c (create_process): New.
13567 (win32_create_inferior): Use create_process instead of
13568 CreateProcess. If create_process failed retry appending an ".exe"
13569 suffix. Store the GetLastError result immediatelly after
13570 create_process calls and use it on the call to error.
13571
13572 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13573
13574 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13575
13576 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13577
13578 * configure.ac: Switch license to GPLv3.
13579
13580 2007-08-01 Michael Snyder <msnyder@access-company.com>
13581
13582 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13583
13584 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13585
13586 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13587 typedef.
13588 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13589 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13590 CloseToolhelp32Snapshot.
13591 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13592 CloseToolhelp32Snapshot.
13593
13594 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13595
13596 * server.c (main): Check for inferior exit before main loop.
13597
13598 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13599
13600 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13601 instead of on tmp_desc.
13602
13603 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13604 Daniel Jacobowitz <dan@codesourcery.com>
13605
13606 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13607 (add_thread): Minor cleanups.
13608 (clear_inferiors): Move lower in the file. Clear the DLL
13609 list.
13610 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13611 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13612 (xml_escape_text): New.
13613 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13614 for qSupported.
13615 (handle_v_cont): Report errors.
13616 (gdbserver_version): Update.
13617 (main): Correct size of own_buf. Do not report initial DLL events.
13618 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13619 (unloaded_dll, xml_escape_text): New.
13620 * win32-low.c (enum target_waitkind): Update comments.
13621 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13622 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13623 (win32_EnumProcessModules, win32_GetModuleInformation)
13624 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13625 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13626 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13627 (win32_Module32First, win32_Module32Next, load_toolhelp)
13628 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13629 (get_child_debug_event): Handle DLL events.
13630 (win32_wait): Likewise.
13631
13632 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13633
13634 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13635 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13636
13637 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13638
13639 * win32-low.c (handle_output_debug_string): Ignore event if not
13640 waiting.
13641
13642 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13643
13644 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13645
13646 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13649
13650 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13651
13652 * inferiors.c (change_inferior_id): Add comment.
13653 * linux-low.c (check_removed_breakpoint): Add an early
13654 prototype. Improve debug output.
13655 (linux_attach): Doc update.
13656 (linux_detach_one_process, linux_detach): Clean up before releasing
13657 each process.
13658 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13659 * linux-low.h (struct process_info): Doc improvement.
13660 * mem-break.c (delete_all_breakpoints): New.
13661 * mem-break.h (delete_all_breakpoints): New prototype.
13662 * thread-db.c (find_first_thread): New.
13663 (thread_db_create_event): Call it instead of
13664 thread_db_find_new_threads. Clean up unused variables.
13665 (maybe_attach_thread): Remove first thread handling.
13666 (thread_db_find_new_threads): Use find_first_thread.
13667 (thread_db_get_tls_address): Likewise.
13668
13669 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13670
13671 * thread-db.c (thread_db_find_new_threads): Add prototype.
13672 (thread_db_create_event): Check for the main thread before adding
13673 a new thread.
13674 (maybe_attach_thread): Only enable event reporting if TID == 0.
13675 (thread_db_get_tls_address): Check for new threads.
13676
13677 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13678
13679 * linux-low.c (linux_create_inferior): Try execv before execvp.
13680 * spu-low.c (spu_create_inferior): Likewise.
13681
13682 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13683
13684 * linux-low.c (linux_create_inferior): Change execv to execvp.
13685 * spu-low.c (spu_create_inferior): Likewies.
13686
13687 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13688
13689 * Makefile.in (clean): Clean new files instead of deleted ones.
13690 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13691 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13692 rules.
13693 * configure.srv: Specify XML files and new regformats for MIPS and
13694 MIPS64 GNU/Linux.
13695 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13696 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13697 an entry for the restart register.
13698 (mips_cannot_fetch_register, mips_cannot_store_register)
13699 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13700 register names to match the XML descriptions.
13701 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13702 restart register instead of $0.
13703
13704 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13705 Markus Deuling <deuling@de.ibm.com>
13706
13707 * remote-utils.c (decode_xfer_write): New function.
13708 * server.h (decode_xfer_write): Add prototype.
13709 * server.c (handle_query): Add PACKET_LEN argument. Support
13710 qXfer:spu:read and qXfer:spu:write packets.
13711 (main): Pass packet_len to handle_query.
13712 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13713 * target.h (target_ops): Add qxfer_spu.
13714
13715 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13716
13717 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13718 accessing non-seekable spufs files.
13719
13720 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13721
13722 * server.c (handle_query): Add reply for qC packet.
13723
13724 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13725 Leo Zayas <lerele@champenstudios@com>
13726
13727 * server.h (check_remote_input_interrupt_request): New function.
13728 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13729 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13730 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13731 (check_remote_input_interrupt_request): New function.
13732 * server.h (check_remote_input_interrupt_request): Declare.
13733 * win32-low.c (winapi_DebugBreakProcess,
13734 winapi_GenerateConsoleCtrlEvent): New typedefs.
13735 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13736 to 250 ms.
13737 (win32_wait): Check for remote interrupt request
13738 with check_remote_input_interrupt_request.
13739 (win32_request_interrupt): New function.
13740 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13741
13742 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13743
13744 * win32-low.c (debug_registers_changed,
13745 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13746 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13747 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13748 (thread_rec): Get context using the low target.
13749 (child_add_thread): Call thread_added on the low target,
13750 which does the same thing.
13751 (regptr): Delete.
13752 (do_initial_child_stuff): Remove debug registers references.
13753 Set context using the low target. Resume threads after
13754 setting the contexts.
13755 (child_continue): Remove dead variable. Remove debug
13756 registers references.
13757 (child_fetch_inferior_registers): Go through the low target.
13758 (do_child_store_inferior_registers): Remove.
13759 (child_store_inferior_registers): Go through the low target.
13760 (win32_resume): Remove debug registers references.
13761 Set context using the low target.
13762 (handle_exception): Change return type to void. Don't record
13763 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13764 first chance exception.
13765 (get_child_debug_event): Change return type to void. Remove
13766 goto loop. Always return after waiting for debug event.
13767 (win32_wait): Convert to switch statement. Handle spurious
13768 events.
13769
13770 * win32-i386-low.c (debug_registers_changed,
13771 debug_registers_used): New.
13772 (initial_stuff): Rename to ...
13773 (i386_initial_stuff): ... this. Clear debug registers
13774 state variables.
13775 (store_debug_registers): Delete.
13776 (i386_get_thread_context): New.
13777 (load_debug_registers): Delete.
13778 (i386_set_thread_context): New.
13779 (i386_thread_added): New.
13780 (single_step): Rename to ...
13781 (i386_single_step): ... this.
13782 (do_fetch_inferior_registers): Rename to ...
13783 (i386_fetch_inferior_register): ... this.
13784 (i386_store_inferior_register): New.
13785 (the_low_target): Adapt to new interface.
13786
13787 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13788 (arm_get_thread_context): New.
13789 (arm_set_thread_context): New.
13790 (regptr): New.
13791 (do_fetch_inferior_registers): Rename to ...
13792 (arm_fetch_inferior_register): ... this.
13793 (arm_store_inferior_register): New.
13794 (arm_wince_breakpoint): Reimplement as unsigned long.
13795 (arm_wince_breakpoint_len): Define.
13796 (the_low_target): Adapt to new interface.
13797
13798 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13799 load_debug_registers. Add get_thread_context, set_thread_context,
13800 thread_added and store_inferior_register. Rename
13801 fetch_inferior_registers to fetch_inferior_register.
13802 (regptr): Remove declaration.
13803
13804 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13805
13806 * linux-low.c (linux_detach): Change return type to int. Return 0.
13807 * spu-low.c (spu_detach): Likewise.
13808
13809 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13810
13811 * target.h (target_ops): Change return type of detach to int.
13812 Add join.
13813 (join_inferior): New.
13814 * server.c (main): Don't skip detach support on mingw32.
13815 If the inferior doesn't support detaching return error.
13816 Call join_inferior instead of using waitpid.
13817 * linux-low.c (linux_join): New.
13818 (linux_target_op): Add linux_join.
13819 * spu-low.c (spu_join): New.
13820 (spu_target_ops): Add spu_join.
13821 * win32-low.c (win32_detach): Adapt to new interface.
13822 Reopen current_process_handle before detaching. Issue a child
13823 resume before detaching.
13824 (win32_join): New.
13825 (win32_target_op): Add win32_join.
13826
13827 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13828
13829 * win32-low.c (win32-attach): Fix return value.
13830 * target.h (target_ops): Describe ATTACH return values.
13831
13832 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13833
13834 * win32-low.c (GETPROCADDRESS): Define.
13835 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13836 (winapi_DebugSetProcessKillOnExit): Likewise.
13837 (win32_create_inferior): Force usage of ansi CreateProcessA.
13838 (win32_attach): Use GETPROCADDRESS.
13839 (win32_detach): Likewise.
13840
13841 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13842
13843 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13844
13845 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13846
13847 * win32-low.c: Commit leftover changes from 2007-03-29.
13848
13849 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13850
13851 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13852 fields short instead of int. Add explicit padding.
13853 (i387_cache_to_fsave): Remove unnecessary casts.
13854 (i387_fsave_to_cache): Doc fix.
13855 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13856
13857 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13858
13859 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13860 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13861
13862 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13863
13864 * configure.srv (arm*-*-mingw32ce*): Move near the other
13865 arm targets.
13866
13867 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13868
13869 * configure.ac: Add errno checking.
13870 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13871 sys/file.h and malloc.h.
13872 (AC_CHECK_DECLS): Add perror.
13873 (srv_mingwce): Handle.
13874 * configure.srv (i[34567]86-*-cygwin*): Add
13875 win32-i386-low.o to srv_tgtobj.
13876 (i[34567]86-*-mingw*): Likewise.
13877 (arm*-*-mingw32ce*): Add case.
13878 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13879 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13880 [__MINGW32CE__] (strerror): New function.
13881 [__MINGW32CE__] (errno): Define to GetLastError.
13882 [__MINGW32CE__] (COUNTOF): New macro.
13883 (remote_open): Remove extra close call.
13884 * mem-break.c (delete_breakpoint_at): New function.
13885 * mem-break.h (delete_breakpoint_at): Declare.
13886 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13887 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13888 [USE_WIN32API] (read, write): Add char* casts.
13889 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13890 * server.h: Include wincecompat.h on Windows CE.
13891 [HAVE_ERRNO_H]: Check.
13892 (perror): Declare if not declared.
13893 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13894 (perror_with_name): Remove errno declaration.
13895 * wincecompat.h: New.
13896 * wincecompat.c: New.
13897 * win32-low.h: New.
13898 * win32-arm-low.c: New.
13899 * win32-i386-low.c: New.
13900 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13901 (OUTMSG2): Make it safe.
13902 (_T): New macro.
13903 (COUNTOF): New macro.
13904 (NUM_REGS): Get it from the low target.
13905 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13906 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13907 (thread_rec): Let low target handle debug registers.
13908 (child_add_thread): Likewise.
13909 (child_init_thread_list): Likewise.
13910 (continue_one_thread): Likewise.
13911 (regptr): New.
13912 (do_child_fetch_inferior_registers): Move to ...
13913 * win32-i386-low.c: ... here, and rename to ...
13914 (do_fetch_inferior_registers): ... this.
13915 * win32-low.c (child_fetch_inferior_registers):
13916 Go through the low target.
13917 (do_child_store_inferior_registers): Use regptr.
13918 (strwinerror): New function.
13919 (win32_create_inferior): Handle Windows CE.
13920 Use strwinerror instead of strerror on Windows error
13921 codes. Add program to the error output.
13922 Don't close the main thread handle on Windows CE.
13923 (win32_attach): Use coredll.dll on Windows CE.
13924 (win32_kill): Close current process and current
13925 thread handles.
13926 (win32_detach): Use coredll.dll on Windows CE.
13927 (win32_resume): Let low target handle debug registers, and
13928 step request.
13929 (handle_exception): Add/Remove initial breakpoint. Avoid
13930 non-existant WSTOPSIG on Windows CE.
13931 (win32_read_inferior_memory): Cast to remove warning.
13932 (win32_arch_string): Go through the low target.
13933 (initialize_low): Call set_breakpoint_data with the low
13934 target's breakpoint.
13935 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13936 FOP_REGNUM, mappings): Move to ...
13937 * win32-i386-low.c: ... here.
13938 * win32-low.c (win32_thread_info): Move to ...
13939 * win32-low.h: ... here.
13940 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13941 win32-arm-low.c and wincecompat.c.
13942 (all:): Add $EXEEXT.
13943 (install-only:): Likewise.
13944 (gdbserver:): Likewise.
13945 (gdbreplay:): Likewise.
13946 * config.in: Regenerate.
13947 * configure: Regenerate.
13948
13949 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13950
13951 * win32-low.c: Rename typedef thread_info to
13952 win32_thread_info throughout.
13953
13954 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13955
13956 * win32-i386-low.c: Rename to ...
13957 * win32-low.c: ... this.
13958 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13959 * Makefile.in: Likewise.
13960
13961 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13962
13963 * remote-utils.c (monitor_output): Constify msg parameter.
13964 * server.h (monitor_output): Likewise.
13965 * win32-i386-low.c (handle_output_debug_string): New.
13966 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13967 handle_output_debug_string.
13968 (get_child_debug_event): Likewise.
13969
13970 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13971
13972 * server.c (main): Correct strtoul check.
13973
13974 2007-03-27 Jon Ringle <jon@ringle.org>
13975
13976 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13977
13978 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13979
13980 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13981
13982 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13983
13984 * terminal.h: Check HAVE_SGTTY_H.
13985
13986 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13987
13988 * remote-utils.c (remote_open): Print out the assigned port number.
13989
13990 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13991
13992 * remote-utils.c (monitor_output): New function.
13993 * server.c (debug_threads): Define here.
13994 (monitor_show_help): New function.
13995 (handle_query): Handle qRcmd.
13996 (main): Do not handle 'd' packet.
13997 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13998 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13999 of debug_threads.
14000
14001 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14002
14003 * Makefile.in (EXEEXT): New.
14004 (clean): Use $(EXEEXT).
14005
14006 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14007
14008 * target.h (target_ops): Rename send_signal to request_interrupt,
14009 and remove enum target_signal parameter.
14010 * linux-low.c (linux_request_interrupt): Rename from
14011 linux_send_signal, and always send SIGINT.
14012 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14013 and always send SIGINT.
14014 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14015 of send_signal.
14016 (input_interrupt): Likewise.
14017
14018 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14019
14020 * server.c (get_features_xml): Check if target implemented
14021 arch_string.
14022 * win32-i386-low.c (win32_arch_string): New.
14023 (win32_target_ops): Add win32_arch_string as arch_string member.
14024
14025 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14026
14027 * spu-low.c (spu_arch_string): New.
14028 (spu_target_ops): Add spu_arch_string.
14029
14030 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14031
14032 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14033 * configure.ac: Do not check for terminal.h.
14034 * configure, config.in: Regenerated.
14035
14036 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14037
14038 * Makefile.in (OBS): Add $(XML_BUILTIN).
14039 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14040 (clean): Update.
14041 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14042 (arm-with-iwmmxt.c): New.
14043 * config.in, configure: Regenerate.
14044 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14045 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14046 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14047 (arm*-*-linux*): Add iWMMXt and regset support.
14048 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14049 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14050 (arm_store_wmmxregset, target_regsets): New.
14051 * server.c (get_features_xml): Take annex argument. Check builtin
14052 XML documents.
14053 (handle_query): Handle multiple annexes.
14054
14055 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14056
14057 * remote-utils.c [USE_WIN32API] (read, write): Define.
14058 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14059 write.
14060
14061 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14062
14063 * linux-i386-low.c (the_low_target): Set arch_string.
14064 * linux-x86-64-low.c (the_low_target): Likewise.
14065 * linux-low.c (linux_arch_string): New.
14066 (linux_target_ops): Add it.
14067 * linux-low.h (struct linux_target_ops): Add arch_string.
14068 * server.c (write_qxfer_response): Use const void * for DATA.
14069 (get_features_xml): New.
14070 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14071 * target.h (struct target_ops): Add arch_string method.
14072
14073 2007-01-03 Denis Pilat <denis.pilat@st.com>
14074 Daniel Jacobowitz <dan@codesourcery.com>
14075
14076 * linux-low.c (linux_kill): Handle being called with no threads.
14077 * win32-i386-low.c (win32_kill): Likewise.
14078 (get_child_debug_event): Clear current_process_handle.
14079
14080 2006-12-30 Denis PILAT <denis.pilat@st.com>
14081 Daniel Jacobowitz <dan@codesourcery.com>
14082
14083 * remote-utils.c (remote_open): Check the type of specified
14084 serial port devices before opening them.
14085 * server.c (main): Kill the inferior if an error occurs during
14086 the first remote_open.
14087
14088 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14089
14090 * README: Update supported targets.
14091
14092 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14093
14094 * Makefile.in (clean): Remove reg-mips64.c.
14095 (reg-mips64.c, reg-mips64.o): New rules.
14096 * configure.srv: Handle mips64. Include regset support for mips.
14097 * linux-mips-low.c (union mips_register): New.
14098 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14099 (mips_breakpoint, mips_breakpoint_at): Use int.
14100 (mips_collect_register, mips_supply_register)
14101 (mips_collect_register_32bit, mips_supply_register_32bit)
14102 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14103 (mips_store_fpregset, target_regsets): New.
14104 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14105
14106 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14107
14108 * configure.srv: Add target "spu*-*-*".
14109 * Makefile.in (clean): Remove reg-spu.c.
14110 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14111 * spu-low.c: New file.
14112
14113 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14114
14115 * configure.ac: Correct td_thr_tls_get_addr test.
14116 * configure: Regenerated.
14117
14118 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14119
14120 * linux-low.c (linux_wait_for_event): Reformat. Use the
14121 pass_signals array.
14122 * remote-utils.c (decode_address_to_semicolon): New.
14123 * server.c (pass_signals, handle_general_set): New.
14124 (handle_query): Mention QPassSignals for qSupported.
14125 (main): Call handle_general_set.
14126 * server.h (pass_signals, decode_address_to_semicolon): New.
14127
14128 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * server.c (handle_query): Correct error handling for read_auxv.
14131
14132 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14133
14134 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14135 and srv_linux_thread_db to yes.
14136 * linux-s390-low.c (s390_fill_gregset): New function.
14137 (target_regsets): Define data structure.
14138
14139 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14140
14141 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14142 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14143 * config.in, configure: Regenerated.
14144 * inferiors.c (gdb_id_to_thread): New function.
14145 (gdb_id_to_thread_id): Use it.
14146 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14147 * linux-low.h (struct process_info): Add th member.
14148 (thread_db_get_tls_address): New prototype.
14149 * remote-utils.c (decode_address): Make non-static.
14150 * server.c (handle_query): Handle qGetTLSAddr.
14151 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14152 * target.h (struct target_ops): Add get_tls_address.
14153 * thread-db.c (maybe_attach_thread): Save the thread handle.
14154 (thread_db_get_tls_address): New.
14155
14156 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14157
14158 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14159 (linux_resume_one_process): Take a siginfo_t *. Update all
14160 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14161 (struct pending_signals): Add a siginfo_t.
14162 (linux_wait_for_process): Always set last_status.
14163 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14164 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14165 * linux-low.h (struct process_info): Add last_status.
14166
14167 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14168
14169 * remote-utils.c (try_rle): New function.
14170 (putpkt_binary): Use it.
14171
14172 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14173
14174 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14175 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14176 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14177 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14178 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14179 point registers.
14180
14181 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14182
14183 * server.c (terminal_fd): New variable.
14184 (old_foreground_pgrp): Likewise.
14185 (restore_old_foreground_pgrp): New function.
14186 (start_inferior): Record the terminal file descriptor in terminal_fd
14187 and its original foreground group in old_foreground_pgrp. Register
14188 restore_old_foreground_pgrp with atexit().
14189
14190 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14191
14192 * server.c (handle_query): Correct qPart to qXfer.
14193
14194 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14195
14196 * configure.ac: Check for more headers which are missing on
14197 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14198 * configure.srv: Add Cygwin and mingw32.
14199 * remote-utils.c: Don't include headers unconditionally which
14200 are missing on mingw32. Include <winsock.h> for mingw32.
14201 (remote_open): Adjust for mingw32 support. Flush
14202 standard error after writing to it.
14203 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14204 (unblock_async_io, enable_async_io, disable_async_io)
14205 (readchar, getpkt): Update for Winsock support.
14206 (prepare_resume_reply): Expect a protocol signal number.
14207 * server.c: Disable <sys/wait.h> on mingw32.
14208 (start_inferior): Adjust for mingw32 support. Flush
14209 standard error after writing to it.
14210 (attach_inferior): Likewise. Use protocol signal
14211 numbers.
14212 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14213 and names.
14214 * win32-i386-low.c: New file.
14215 * Makefile.in (XM_CLIBS): Set.
14216 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14217 (win32-i386-low.o): New dependency rule.
14218 * linux-low.c (linux_wait): Use target signal numbers.
14219 * target.h (struct target_ops): Doc fix.
14220 * server.h (target_signal_to_name): New prototype.
14221 * gdbreplay.c: Don't include headers unconditionally which
14222 are missing on mingw32. Include <winsock.h> for mingw32.
14223 (remote_close, remote_open): Adjust for Winsock support.
14224 * configure, config.in: Regenerated.
14225
14226 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * server.c (decode_xfer_read, write_qxfer_response): New.
14229 (handle_query): Take a packet length argument. Handle
14230 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14231 the qSupported response.
14232 (main): Update call to handle_query.
14233
14234 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14235
14236 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14237 (putpkt_binary): Renamed from putpkt and adjusted for binary
14238 data.
14239 (putpkt): New wrapper for putpkt_binary.
14240 (readchar): Don't mask off the high bit.
14241 (decode_X_packet): New function.
14242 * server.c (main): Call putpkt_binary if a handler sets the packet
14243 length. Save the length of the incoming packet. Handle 'X'.
14244 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14245
14246 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14247
14248 * server.c (handle_query): Handle qSupported.
14249
14250 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14251
14252 * remote-utils.c (all_symbols_looked_up): New variable.
14253 (look_up_one_symbol): Check it.
14254 * server.h (look_up_one_symbol): New declaration.
14255 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14256
14257 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * Makefile.in (linux-arm-low.o): Update dependencies.
14260 * linux-arm-low.c: Include "gdb_proc_service.h".
14261 (PTRACE_GET_THREAD_AREA): Define.
14262 (ps_get_thread_area): New function.
14263
14264 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14265
14266 * configure.srv (m68k*-*-uclinux*): New target.
14267 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14268 (linux_resume_one_process): Remove extraneous cast.
14269 (linux_read_offsets): New.
14270 (linux_target_op): Add linux_read_offsets on mmuless systems.
14271 * server.c (handle_query): Add qOffsets logic.
14272 * target.h (struct target_ops): Add read_offsets.
14273
14274 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14275
14276 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14277 (PTRACE_GET_THREAD_AREA): Define.
14278 (ps_get_thread_area): New function.
14279 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14280 (linux-x86-64-low.o): Update.
14281
14282 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14283
14284 * configure.ac: Remove checks for prfpregset_t.
14285 * gdb_proc_service.h: New file.
14286 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14287 new "gdb_proc_service.h".
14288 * proc-service.c: Likewise.
14289 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14290 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14291 * Makefile.in (gdb_proc_service_h): Updated.
14292 * configure, config.in: Regenerated.
14293
14294 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14295
14296 * remote-utils.c (prepare_resume_reply): Move declaration
14297 of gdb_id_from_wait to the top of the block.
14298
14299 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14300
14301 * linux-low.c (regsets_store_inferior_registers): Read the regset
14302 from the target before filling it.
14303
14304 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14305
14306 * server.c (attach_inferior): Return SIGTRAP for a successful
14307 attach.
14308
14309 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * Makefile.in (OBS): Add version.o.
14312 (STAGESTUFF): Delete.
14313 (version.o): Add dependencies.
14314 (version.c): Replace rule.
14315 (clean): Remove version.c.
14316 * server.c (gdbserver_version): New.
14317 (gdbserver_usage): Use printf.
14318 (main): Handle --version and --help.
14319 * server.h (version, host_name): Add declarations.
14320
14321 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14322
14323 * linux-arm-low.c:
14324 * linux-arm-low.c:
14325 * inferiors.c:
14326 * i387-fp.h:
14327 * i387-fp.c:
14328 * gdbreplay.c:
14329 * regcache.c:
14330 * proc-service.c:
14331 * mem-break.h:
14332 * mem-break.c:
14333 * linux-x86-64-low.c:
14334 * linux-sh-low.c:
14335 * linux-s390-low.c:
14336 * linux-ppc64-low.c:
14337 * linux-ppc-low.c:
14338 * linux-mips-low.c:
14339 * linux-m68k-low.c:
14340 * linux-m32r-low.c:
14341 * linux-low.h:
14342 * linux-low.c:
14343 * linux-ia64-low.c:
14344 * linux-i386-low.c:
14345 * linux-crisv32-low.c:
14346 * thread-db.c:
14347 * terminal.h:
14348 * target.h:
14349 * target.c:
14350 * server.h:
14351 * server.c:
14352 * remote-utils.c:
14353 * regcache.h:
14354 * utils.c:
14355 * Makefile.in:
14356 * configure.ac:
14357 * gdbserver.1: Add (C) after Copyright. Update the FSF
14358 address.
14359
14360 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14361
14362 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14363 (arm_breakpoint_at): Recognize both breakpoints.
14364 (the_low_target): Use the correct breakpoint instruction.
14365
14366 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14367
14368 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14369 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14370 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14371 (the_low_target): Update.
14372
14373 2005-10-25 Andreas Schwab <schwab@suse.de>
14374
14375 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14376
14377 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14378 (ia64_num_regs): Reduce to 462.
14379
14380 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * acinclude.m4: Correct quoting.
14383 * aclocal.m4: Regenerated.
14384
14385 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14386 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14387 (thread_db_init): Call thread_db_err_str.
14388 * configure.ac: Check for TD_VERSION.
14389 * config.in, configure: Regenerated.
14390
14391 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14392
14393 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14394
14395 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14396
14397 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14398 is not available. Define HAVE_PTRACE_GETREGS if it is.
14399 * config.in, configure: Regenerated.
14400 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14401 * linux-i386-low.c, linux-m68k-low.c: Update to use
14402 HAVE_PTRACE_GETREGS.
14403 * linux-low.c (regsets_fetch_inferior_registers)
14404 (regsets_store_inferior_registers): Only return 0 if we processed
14405 GENERAL_REGS.
14406 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14407 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14408
14409 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * inferiors.c (struct thread_info): Add gdb_id.
14412 (add_thread): Add gdb_id argument.
14413 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14414 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14415 calls to add_thread.
14416 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14417 * server.c (handle_query): Use thread_to_gdb_id.
14418 (handle_v_cont, main): Use gdb_id_to_thread_id.
14419 * server.h (add_thread): Update prototype.
14420 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14421 prototypes.
14422
14423 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14424
14425 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14426 left-padded registers.
14427 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14428 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14429
14430 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14431
14432 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14433 * configure: Regenerate.
14434 * config.in: Regenerate.
14435 * server.h (NEED_DECLARATION_STRERROR):
14436 Replace with !HAVE_DECL_STRERROR.
14437
14438 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14439
14440 * linux-low.c (linux_wait, linux_send_signal): Don't test
14441 an unsigned long variable for > 0 if it could be MAX_ULONG.
14442 * server.c (myresume): Likewise.
14443 * target.c (set_desired_inferior): Likewise.
14444
14445 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14446
14447 * configure.ac: Simplify and improve check for socklen_t.
14448 * configure, config.in: Regenerate.
14449
14450 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14451
14452 * acconfig.h: Remove.
14453 * configure.ac: Add a test for socklen_t. Use three-argument
14454 AC_DEFINE throughout.
14455 * config.in: Regenerated using autoheader 2.59.
14456 * configure: Regenerated.
14457
14458 * gdbreplay.c (socklen_t): Provide a default.
14459 (remote_open): Use socklen_t.
14460 * remote-utils.c (socklen_t): Provide a default.
14461 (remote_open): Use socklen_t.
14462 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14463 unsigned char.
14464
14465 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14466 char for buffers.
14467 * linux-low.c (linux_read_memory, linux_write_memory)
14468 (linux_read_auxv): Likewise.
14469 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14470 (check_mem_write): Likewise.
14471 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14472 Likewise.
14473 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14474 (registers_from_string, register_data): Likewise.
14475 * server.c (handle_query, main): Likewise.
14476 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14477 (decode_M_packet): Likewise.
14478 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14479 * target.h (struct target_ops): Update read_memory, write_memory,
14480 and read_auxv.
14481 (read_inferior_memory, write_inferior_memory): Update.
14482 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14483 to unsigned char *.
14484 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14485 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14486 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14487 linux-s390-low.c, linux-sh-low.c: Update for changes in
14488 read_inferior_memory and the_low_target->breakpoint.
14489
14490 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14491
14492 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14493 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14494 * configure.srv: Add powerpc64-*-linux*.
14495 * linux-ppc64-low.c: New file.
14496
14497 2005-05-23 Orjan Friberg <orjanf@axis.com>
14498
14499 * linux-cris-low.c: New file with support for CRIS.
14500 * linux-crisv32-low.c: Ditto for CRISv32.
14501 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14502 (clean): Add reg-cris.c and reg-crisv32.c.
14503 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14504 reg-crisv32.o, and reg-crisv32.c to make rules.
14505 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14506 recognized targets.
14507
14508 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14509
14510 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14511 of sizeof (PTRACE_XFER_TYPE).
14512 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14513
14514 2005-05-12 Orjan Friberg <orjanf@axis.com>
14515
14516 * target.h (struct target_ops): Add insert_watchpoint,
14517 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14518 pointers for hardware watchpoint support.
14519 * linux-low.h (struct linux_target_ops): Ditto.
14520 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14521 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14522 to linux_target_ops.
14523 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14524 reply packet.
14525 * server.c (main): Recognize 'Z' and 'z' packets.
14526
14527 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14528
14529 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14530 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14531 (the_low_target): Add new members.
14532
14533 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * proc-service.c (ps_lgetregs): Search all_processes instead of
14536 all_threads.
14537
14538 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14539
14540 * server.c (start_inferior): Change return type to int.
14541 (attach_inferior): Change sigptr to int *.
14542 (handle_v_cont, handle_v_requests): Change signal to int *.
14543 (main): Change signal to int.
14544
14545 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14546
14547 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14548 * configure.srv: Add m32r*-*-linux*.
14549 * linux-m32r-low.c: New file.
14550
14551 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14554
14555 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14556
14557 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14558 Take unsigned long arguments for PIDs.
14559 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14560 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14561 (wait_for_sigstop, linux_resume_one_process)
14562 (regsets_fetch_inferior_registers, linux_send_signal)
14563 (linux_read_auxv): Likewise. Update the types of variables holding
14564 PIDs. Update format string specifiers.
14565 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14566 * remote-utils.c (prepare_resume_reply): Likewise.
14567 * server.c (cont_thread, general_thread, step_thread)
14568 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14569 unsigned long.
14570 (handle_query): Update format specifiers.
14571 (handle_v_cont, main): Use strtoul for thread IDs.
14572 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14573 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14574 (general_thread, step_thread, thread_from_wait)
14575 (old_thread_from_wait): Update.
14576 * target.h (struct thread_resume): Use unsigned long for THREAD.
14577 (struct target_ops): Use unsigned long for arguments to attach and
14578 thread_alive.
14579
14580 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14581
14582 * acinclude.m4: Include bfd/bfd.m4 directly.
14583 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14584 <agriffis@toolchain.org>.
14585 * aclocal.m4, configure: Regenerated.
14586
14587 2005-01-07 Andrew Cagney <cagney@gnu.org>
14588
14589 * configure.ac: Rename configure.in, require autoconf 2.59.
14590 * configure: Re-generate.
14591
14592 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14593
14594 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14595 LIBS when finished.
14596 * aclocal.m4: Regenerated.
14597 * configure: Regenerated.
14598
14599 2004-11-21 Andreas Schwab <schwab@suse.de>
14600
14601 * linux-m68k-low.c (m68k_num_gregs): Define.
14602 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14603 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14604 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14605 (m68k_breakpoint_at): New. Add to the_low_target.
14606
14607 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14608 srv_linux_thread_db to yes.
14609
14610 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14611
14612 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14613 (ARCH_SET_FS): Likewise.
14614 (ARCH_GET_FS): Likewise.
14615 (ARCH_GET_GS): Likewise.
14616
14617 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14618
14619 * linux-i386-low.c (ps_get_thread_area): New.
14620 * linux-x86-64-low.c (ps_get_thread_area): New.
14621 * linux-low.c: Include <sys/syscall.h>.
14622 (linux_kill_one_process): Don't kill the first thread here.
14623 (linux_kill): Kill the first thread here.
14624 (kill_lwp): New function.
14625 (send_sigstop, linux_send_signal): Use it.
14626 * proc-service.c: Clean up #ifdefs.
14627 (fpregset_info): Delete.
14628 (ps_lgetregs): Update and enable implementation.
14629 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14630 implementations.
14631 * remote-utils.c (struct sym_cache, symbol_cache): New.
14632 (input_interrupt): Print a clearer message.
14633 (async_io_enabled): New variable.
14634 (enable_async_io, disable_async_io): Use it. Update comments.
14635 (look_up_one_symbol): Use the symbol cache.
14636 * thread-db.c (thread_db_look_up_symbols): New function.
14637 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14638
14639 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14640
14641 * configure.in: Test for -rdynamic.
14642 * configure: Regenerated.
14643 * Makefile (INTERNAL_LDFLAGS): New.
14644 (gdbserver, gdbreplay): Use it.
14645
14646 2004-09-02 Andrew Cagney <cagney@gnu.org>
14647
14648 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14649
14650 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14651
14652 * linux-low.c (linux_wait): Clear all_processes list also.
14653
14654 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14655
14656 * linux-low.c: Include <errno.h>. Remove extern declaration of
14657 errno.
14658
14659 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14660
14661 * gdbreplay.c, server.h, utils.c: Update copyright years.
14662
14663 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14664
14665 * server.c (main): Print child status or termination signal from
14666 variable 'signal', not 'sig'.
14667
14668 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14669
14670 * linux-low.c (linux_read_memory): Change return type to
14671 int. Check for and return error from ptrace().
14672 * target.c (read_inferior_memory): Change return type to int. Pass
14673 back return status from the_target->read_memory().
14674 * target.h (struct target_ops): Adapt *read_memory() prototype.
14675 Update comment.
14676 (read_inferior_memory): Adapt prototype.
14677 * server.c (main): Return an error packet if
14678 read_inferior_memory() returns an error.
14679
14680 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14681
14682 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14683 Unify with other clean targets.
14684
14685 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14686
14687 * server.c (handle_v_cont): Call set_desired_inferior.
14688
14689 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14690
14691 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14692
14693 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14694
14695 * linux-low.c (linux_wait): Unblock async I/O.
14696 (linux_resume): Block and enable async I/O.
14697 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14698 * server.h (block_async_io, unblock_async_io): Add prototypes.
14699
14700 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14701
14702 * remote-utils.c (remote_open): Print a status notice after
14703 opening a TCP port.
14704 * server.c (attach_inferior): Print a status notice after
14705 attaching.
14706
14707 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14708
14709 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14710
14711 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14712
14713 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14714 error packet.
14715 * server.c, target.h: Update copyright years.
14716
14717 2004-02-25 Roland McGrath <roland@redhat.com>
14718
14719 * target.h (struct target_ops): New member `read_auxv'.
14720 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14721 * linux-low.c (linux_read_auxv): New function.
14722 (linux_target_ops): Initialize `read_auxv' member to that.
14723
14724 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14725
14726 Committed by Jim Blandy <jimb@redhat.com>.
14727
14728 * linux-s390-low.c (s390_num_regs): Update.
14729 (s390_regmap): Remove control registers. Use __s390x__ predefine
14730 instead of GPR_SIZE to distiguish s390 and s390x targets.
14731
14732 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14733
14734 * linux-low.c: Update copyright year.
14735 (check_removed_breakpoint): Clear pending_is_breakpoint.
14736 (linux_set_resume_request, linux_queue_one_thread)
14737 (resume_status_pending_p): New functions.
14738 (linux_continue_one_thread): Use process->resume.
14739 (linux_resume): Only resume threads if there are no pending events.
14740 * linux-low.h (struct process_info): Add resume request
14741 pointer.
14742
14743 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14744
14745 * regcache.c (new_register_cache): Clear the allocated register
14746 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14747
14748 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14749
14750 * linux-low.c (linux_resume): Take a struct thread_resume *
14751 argument.
14752 (linux_wait): Update call.
14753 (resume_ptr): New static variable.
14754 (linux_continue_one_thread): Renamed from
14755 linux_continue_one_process. Use resume_ptr.
14756 (linux_resume): Use linux_continue_one_thread.
14757 * server.c (handle_v_cont, handle_v_requests): New functions.
14758 (myresume): New function.
14759 (main): Handle 'v' case.
14760 * target.h (struct thread_resume): New type.
14761 (struct target_ops): Change argument of "resume" to struct
14762 thread_resume *.
14763 (myresume): Delete macro.
14764
14765 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14766
14767 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14768 (uninstall): Support DESTDIR.
14769
14770 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14771
14772 * configure.srv: Add xscale*linux copy of arm*linux entry.
14773
14774 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14775
14776 * linux-arm-low.c (arm_reinsert_addr): New function.
14777 (the_low_target): Add arm_reinsert_addr.
14778
14779 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14780
14781 * mem-break.c: Remove whitespace at end of file.
14782
14783 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14784
14785 * configure.in: Check whether we need to prototype strerror.
14786 * server.h: Optionally prototype strerror.
14787 * gdbreplay.c (perror_with_name): Use strerror.
14788 * linux-low.c (linux_attach_lwp): Use strerror.
14789 * utils.c (perror_with_name): Use strerror.
14790 * config.in, configure: Regenerated.
14791
14792 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14793
14794 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14795 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14796
14797 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14798
14799 * Makefile.in (SFILES): Update.
14800 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14801 low-sun3.c: Remove files.
14802
14803 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14804
14805 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14806 (linux_detach_one_process, linux_detach): New functions.
14807 (linux_target_ops): Add linux_detach.
14808 * server.c (main): Handle 'D' packet.
14809 * target.h (struct target_ops): Add "detach" member.
14810 (detach_inferior): Define.
14811
14812 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14813
14814 From Kelley Cook <kelleycook@wideopenwest.com>:
14815 * configure.srv: Accept i[34567]86 variants.
14816
14817 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14818
14819 * linux-low.c (linux_wait_for_event): Correct comment typos.
14820 (linux_resume_one_process): Call check_removed_breakpoint.
14821 (linux_send_signal): New function.
14822 (linux_target_ops): Add linux_send_signal.
14823 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14824 of kill.
14825 * target.h (struct target_ops): Add send_signal.
14826
14827 2003-05-29 Jim Blandy <jimb@redhat.com>
14828
14829 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14830 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14831 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14832 away part of the register's value.
14833
14834 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14835
14836 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14837 (linux_wait_for_event, linux_init_signals): Likewise.
14838
14839 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14840
14841 * configure.in: Check for stdlib.h.
14842 * configure: Regenerated.
14843 * config.in: Regenerated.
14844
14845 2003-01-04 Andreas Schwab <schwab@suse.de>
14846
14847 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14848
14849 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14850
14851 * Makefile.in: Remove obsolete code.
14852
14853 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14854
14855 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14856 defined(PT_FPR0_HI).
14857
14858 2002-11-17 Stuart Hughes <seh@zee2.com>
14859
14860 * linux-arm-low.c (arm_num_regs): Increase.
14861 (arm_regmap): Include status register.
14862
14863 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14864
14865 * linux-low.c (register_addr): Remove incorrect -1 check.
14866
14867 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14868
14869 * linux-low.c (linux_create_inferior): Call setpgid. Return
14870 the new PID.
14871 (unstopped_p, linux_signal_pid): Remove.
14872 (linux_target_ops): Remove linux_signal_pid.
14873 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14874 global instead of target method.
14875 * target.h (struct target_ops): Remove signal_pid. Update comment
14876 for create_inferior.
14877 * server.c (signal_pid): New variable.
14878 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14879 gdbserver. Set the child to be the foreground process group.
14880 (attach_inferior): Set signal_pid.
14881
14882 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14883
14884 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14885
14886 2002-08-20 Jim Blandy <jimb@redhat.com>
14887
14888 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14889 default for this.
14890
14891 2002-08-01 Andrew Cagney <cagney@redhat.com>
14892
14893 * Makefile.in: Make chill references obsolete.
14894
14895 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14896
14897 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14898 * configure: Regenerate.
14899 * config.in: Regenerate.
14900
14901 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14902
14903 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14904 (perror_with_name, remote_close, remote_open, expect, play): Static.
14905
14906 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14907
14908 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14909 byte offsets instead of an array of indexes.
14910 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14911
14912 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14913
14914 * regcache.c: Add comment.
14915
14916 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14917
14918 * thread-db.c: New file.
14919 * proc-service.c: New file.
14920 * acinclude.m4: New file.
14921 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14922 proc-service.o, and thread-db.o.
14923 (linux-low.o): Add USE_THREAD_DB.
14924 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14925 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14926 * aclocal.m4: Regenerated.
14927 * config.in: Regenerated.
14928 * configure: Regenerated.
14929 * configure.in: Check for proc_service.h, sys/procfs.h,
14930 thread_db.h, and linux/elf.h headrs.
14931 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14932 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14933 Check for -lthread_db and thread support.
14934 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14935 PowerPC, and SuperH.
14936 * i387-fp.c: Constify arguments.
14937 * i387-fp.h: Likewise.
14938 * inferiors.c: (struct thread_info): Renamed from
14939 `struct inferior_info'. Remove PID member. Use generic inferior
14940 list header. All uses updated.
14941 (inferiors, signal_pid): Removed.
14942 (all_threads): New variable.
14943 (get_thread): Define.
14944 (add_inferior_to_list): New function.
14945 (for_each_inferior): New function.
14946 (change_inferior_id): New function.
14947 (add_inferior): Removed.
14948 (remove_inferior): New function.
14949 (add_thread): New function.
14950 (free_one_thread): New function.
14951 (remove_thread): New function.
14952 (clear_inferiors): Use for_each_inferior and free_one_thread.
14953 (find_inferior): New function.
14954 (find_inferior_id): New function.
14955 (inferior_target_data): Update argument type.
14956 (set_inferior_target_data): Likewise.
14957 (inferior_regcache_data): Likewise.
14958 (set_inferior_regcache_data): Likewise.
14959 * linux-low.c (linux_bp_reinsert): Remove.
14960 (all_processes, stopping_threads, using_thrads)
14961 (struct pending_signals, debug_threads, pid_of): New.
14962 (inferior_pid): Replace with macro.
14963 (struct inferior_linux_data): Remove.
14964 (get_stop_pc, add_process): New functions.
14965 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14966 Use add_process and add_thread.
14967 (linux_attach_lwp): New function, based on old linux_attach. Use
14968 add_process and add_thread. Set stop_expected for new threads.
14969 (linux_attach): New function.
14970 (linux_kill_one_process): New function.
14971 (linux_kill): Kill all LWPs.
14972 (linux_thread_alive): Use find_inferior_id.
14973 (check_removed_breakpoints, status_pending_p): New functions.
14974 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14975 Update. Use WNOHANG. Wait for cloned processes also. Update process
14976 struct for the found process.
14977 (linux_wait_for_event): New function.
14978 (linux_wait): Use it. Support LWPs.
14979 (send_sigstop, wait_for_sigstop, stop_all_processes)
14980 (linux_resume_one_process, linux_continue_one_process): New functions.
14981 (linux_resume): Support LWPs.
14982 (REGISTER_RAW_SIZE): Remove.
14983 (fetch_register): Use register_size instead. Call supply_register.
14984 (usr_store_inferior_registers): Likewise. Call collect_register.
14985 Fix recursive case.
14986 (regsets_fetch_inferior_registers): Improve error message.
14987 (regsets_store_inferior_registers): Add debugging.
14988 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14989 (unstopped_p, linux_signal_pid): New functions.
14990 (linux_target_ops): Add linux_signal_pid.
14991 (linux_init_signals): New function.
14992 (initialize_low): Call it. Initialize using_threads.
14993 * regcache.c (inferior_regcache_data): Add valid
14994 flag.
14995 (get_regcache): Fetch registers lazily. Add fetch argument
14996 and update all callers.
14997 (regcache_invalidate_one, regcache_invalidate): New
14998 functions.
14999 (new_register_cache): Renamed from create_register_cache.
15000 Return the new regcache.
15001 (free_register_cache): Change argument to a void *.
15002 (registers_to_string, registers_from_string): Call get_regcache
15003 with fetch flag set.
15004 (register_data): Make static. Pass fetch flag to get_regcache.
15005 (supply_register): Call get_regcache with fetch flag clear.
15006 (collect_register): Call get_regcache with fetch flag set.
15007 (collect_register_as_string): New function.
15008 * regcache.h: Update.
15009 * remote-utils.c (putpkt): Flush after debug output and use
15010 stderr.
15011 Handle input interrupts while waiting for an ACK.
15012 (input_interrupt): Use signal_pid method.
15013 (getpkt): Flush after debug output and use stderr.
15014 (outreg): Use collect_register_as_string.
15015 (new_thread_notify, dead_thread_notify): New functions.
15016 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15017 and general_thread.
15018 (look_up_one_symbol): Flush after debug output.
15019 * server.c (step_thread, server_waiting): New variables.
15020 (start_inferior): Don't use signal_pid. Update call to mywait.
15021 (attach_inferior): Update call to mywait.
15022 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15023 (main): Don't fetch/store registers explicitly. Use
15024 set_desired_inferior. Support proposed ``Hs'' packet. Update
15025 calls to mywait.
15026 * server.h: Update.
15027 (struct inferior_list, struct_inferior_list_entry): New.
15028 * target.c (set_desired_inferior): New.
15029 (write_inferior_memory): Constify.
15030 (mywait): New function.
15031 * target.h: Update.
15032 (struct target_ops): New signal_pid method.
15033 (mywait): Removed macro, added prototype.
15034
15035 * linux-low.h (regset_func): Removed.
15036 (regset_fill_func, regset_store_func): New.
15037 (enum regset_type): New.
15038 (struct regset_info): Add type field. Use new operation types.
15039 (struct linux_target_ops): stop_pc renamed to get_pc.
15040 Add decr_pc_after_break and breakpoint_at.
15041 (get_process, get_thread_proess, get_process_thread)
15042 (strut process_info, all_processes, linux_attach_lwp)
15043 (thread_db_init): New.
15044
15045 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15046 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15047 (the_low_target): Add new members.
15048 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15049 (i386_store_fpxregset): Constify.
15050 (target_regsets): Add new kind identifier.
15051 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15052 (i386_set_pc): Add debugging.
15053 (i386_breakpoint_at): New function.
15054 (the_low_target): Add new members.
15055 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15056 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15057 (mips_breakpoint_at): New.
15058 (the_low_target): Add new members.
15059 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15060 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15061 (the_low_target): Add new members.
15062 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15063 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15064 (the_low_target): Add new members.
15065 * linux-x86-64-low.c (target_regsets): Add new kind
15066 identifier.
15067
15068 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15069
15070 From Martin Pool <mbp@samba.org>:
15071 * server.c (gdbserver_usage): New function.
15072 (main): Call it.
15073
15074 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15075
15076 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15077 stop_at -> stop_pc.
15078
15079 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15080
15081 * Makefile.in: Remove obsolete code.
15082
15083 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15084
15085 * linux-low.c (regsets_fetch_inferior_registers),
15086 (regsets_store_inferior_registers): Removed cast to int from
15087 ptrace() calls.
15088 * regcache.h: Added declaration of struct inferior_info.
15089
15090 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15091
15092 * inferiors.c (struct inferior_info): Add regcache_data.
15093 (add_inferior): Call create_register_cache.
15094 (clear_inferiors): Call free_register_cache.
15095 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15096 * regcache.c (struct inferior_regcache_data): New.
15097 (registers): Remove.
15098 (get_regcache): New function.
15099 (create_register_cache, free_register_cache): New functions.
15100 (set_register_cache): Don't initialize the register cache here.
15101 (registers_to_string, registers_from_string, register_data): Call
15102 get_regcache.
15103 * regcache.h: Add prototypes.
15104 * server.h: Likewise.
15105
15106 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15107
15108 * mem-break.c: New file.
15109 * mem-break.h: New file.
15110 * Makefile.in: Add mem-break.o rule; update server.h
15111 dependencies.
15112 * inferiors.c (struct inferior_info): Add target_data
15113 member.
15114 (clear_inferiors): Free target_data member if set.
15115 (inferior_target_data, set_inferior_target_data): New functions.
15116 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15117 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15118 * linux-low.c (linux_bp_reinsert): New variable.
15119 (struct inferior_linux_data): New.
15120 (linux_create_inferior): Use set_inferior_target_data.
15121 (linux_attach): Likewise. Call add_inferior.
15122 (linux_wait_for_one_inferior): New function.
15123 (linux_wait): Call it.
15124 (linux_write_memory): Add const.
15125 (initialize_low): Call set_breakpoint_data.
15126 * linux-low.h (struct linux_target_ops): Add breakpoint
15127 handling members.
15128 * server.c (attach_inferior): Remove extra add_inferior
15129 call.
15130 * server.h: Include mem-break.h. Update inferior.c
15131 prototypes.
15132 * target.c (read_inferior_memory)
15133 (write_inferior_memory): New functions.
15134 * target.h (read_inferior_memory)
15135 (write_inferior_memory): Change macros to prototypes.
15136 (struct target_ops): Update comments. Add const to write_memory
15137 definition.
15138
15139 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15140
15141 * linux-low.c (usr_store_inferior_registers): Support
15142 registers which are allowed to fail to store.
15143 * linux-low.h (linux_target_ops): Likewise.
15144 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15145 (ppc_cannot_store_register): FPSCR may not be storable.
15146
15147 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15148
15149 * server.h: Include <string.h> if HAVE_STRING_H.
15150 * ChangeLog: Correct paths in last ChangeLog entry.
15151
15152 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15153
15154 * linux-low.h: Remove obsolete prototypes.
15155 (struct linux_target_ops): New.
15156 (extern the_low_target): New.
15157 * linux-low.c (num_regs, regmap): Remove declarations.
15158 (register_addr): Use the_low_target explicitly.
15159 (fetch_register): Likewise.
15160 (usr_fetch_inferior_registers): Likewise.
15161 (usr_store_inferior_registers): Likewise.
15162 * linux-arm-low.c (num_regs): Remove.
15163 (arm_num_regs): Define.
15164 (arm_regmap): Renamed from regmap, made static.
15165 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15166 made static.
15167 (arm_cannot_store_register): Renamed from cannot_store_register,
15168 made static.
15169 (the_low_target): New.
15170 * linux-i386-low.c (num_regs): Remove.
15171 (i386_num_regs): Define.
15172 (i386_regmap): Renamed from regmap, made static.
15173 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15174 made static.
15175 (i386_cannot_store_register): Renamed from cannot_store_register,
15176 made static.
15177 (the_low_target): New.
15178 * linux-ia64-low.c (num_regs): Remove.
15179 (ia64_num_regs): Define.
15180 (ia64_regmap): Renamed from regmap, made static.
15181 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15182 made static.
15183 (ia64_cannot_store_register): Renamed from cannot_store_register,
15184 made static.
15185 (the_low_target): New.
15186 * linux-m68k-low.c (num_regs): Remove.
15187 (m68k_num_regs): Define.
15188 (m68k_regmap): Renamed from regmap, made static.
15189 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15190 made static.
15191 (m68k_cannot_store_register): Renamed from cannot_store_register,
15192 made static.
15193 (the_low_target): New.
15194 * linux-mips-low.c (num_regs): Remove.
15195 (mips_num_regs): Define.
15196 (mips_regmap): Renamed from regmap, made static.
15197 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15198 made static.
15199 (mips_cannot_store_register): Renamed from cannot_store_register,
15200 made static.
15201 (the_low_target): New.
15202 * linux-ppc-low.c (num_regs): Remove.
15203 (ppc_num_regs): Define.
15204 (ppc_regmap): Renamed from regmap, made static.
15205 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15206 made static.
15207 (ppc_cannot_store_register): Renamed from cannot_store_register,
15208 made static.
15209 (the_low_target): New.
15210 * linux-s390-low.c (num_regs): Remove.
15211 (s390_num_regs): Define.
15212 (s390_regmap): Renamed from regmap, made static.
15213 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15214 made static.
15215 (s390_cannot_store_register): Renamed from cannot_store_register,
15216 made static.
15217 (the_low_target): New.
15218 * linux-sh-low.c (num_regs): Remove.
15219 (sh_num_regs): Define.
15220 (sh_regmap): Renamed from regmap, made static.
15221 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15222 made static.
15223 (sh_cannot_store_register): Renamed from cannot_store_register,
15224 made static.
15225 (the_low_target): New.
15226 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15227 (the_low_target): New.
15228
15229 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15230
15231 * Makefile.in: Add stamp-h target.
15232 * configure.in: Create stamp-h.
15233 * configure: Regenerated.
15234
15235 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15236
15237 * inferiors.c: New file.
15238 * target.c: New file.
15239 * target.h: New file.
15240 * Makefile.in: Add target.o and inferiors.o. Update
15241 dependencies.
15242 * linux-low.c (inferior_pid): New static variable,
15243 moved from server.c.
15244 (linux_create_inferior): Renamed from create_inferior.
15245 Call add_inferior. Return 0 on success instead of a PID.
15246 (linux_attach): Renamed from myattach.
15247 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15248 (linux_thread_alive): Renamed from mythread_alive.
15249 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15250 child dies.
15251 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15252 (regsets_store_inferior_registers): Correct error message.
15253 Add missing ``return 0''.
15254 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15255 (linux_store_registers): Renamed from store_inferior_registers.
15256 (linux_read_memory): Renamed from read_inferior_memory.
15257 (linux_write_memory): Renamed from write_inferior_memory.
15258 (linux_target_ops): New structure.
15259 (initialize_low): Call set_target_ops ().
15260 * remote-utils.c (unhexify): New function.
15261 (hexify): New function.
15262 (input_interrupt): Send signals to ``signal_pid''.
15263 * server.c (inferior_pid): Remove.
15264 (start_inferior): Update create_inferior call.
15265 (attach_inferior): Call add_inferior.
15266 (handle_query): New function.
15267 (main): Call handle_query for `q' packets.
15268 * server.h: Include "target.h". Remove obsolete prototypes.
15269 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15270
15271 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15272
15273 * Makefile.in: Add WARN_CFLAGS. Update configury
15274 dependencies.
15275 * configure.in: Check for <string.h>
15276 * configure: Regenerate.
15277 * config.in: Regenerate.
15278 * gdbreplay.c: Include needed system headers.
15279 (remote_open): Remove strchr prototype.
15280 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15281 * regcache.c (supply_register): Change buf argument to const void *.
15282 (supply_register_by_name): Likewise.
15283 (collect_register): Change buf argument to void *.
15284 (collect_register_by_name): Likewise.
15285 * regcache.h: Add missing prototypes.
15286 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15287 * server.c (handle_query): New function.
15288 (attached): New static variable, moved out of main.
15289 (main): Quiet longjmp clobber warnings.
15290 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15291 * utils.c (error): Remove NORETURN.
15292 (fatal): Likewise.
This page took 0.399232 seconds and 4 git commands to generate.